"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[1446],{85968:function(A,E,n){var P=n(23674),o=n(62086),j=function(h){var a=(0,P.useModel)("@@initialState"),v=a.initialState,O=a.loading,D=a.error,p=a.refresh,I=a.setInitialState,f=v==null?void 0:v.authPermissionAction;if(!f)return(0,o.jsx)("span",{children:h.children});var M=f.indexOf(h.action);return M>=0?(0,o.jsx)("span",{children:h.children}):(0,o.jsx)(o.Fragment,{})};E.Z=j},20371:function(A,E,n){n.r(E);var P=n(57213),o=n.n(P),j=n(25359),m=n.n(j),h=n(49811),a=n.n(h),v=n(93236),O=n(23674),D=n(61385),p=n(14649),I=n(51676),f=n(50336),M=n(87708),R=n(85968),y=n(90627),e=n(62086),x=y.Z.DeviceStoreController,K=x.deviceStoreItems,B=x.deviceStoreDelete;E.default=function(){var C=(0,v.useRef)(),S=function(){var _=a()(m()().mark(function t(r){var s,u,i;return m()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,B(r);case 2:s=l.sent,u=s.success,u&&(C.current.clearSelected(),(i=C.current)===null||i===void 0||i.reload());case 5:case"end":return l.stop()}},t)}));return function(r){return _.apply(this,arguments)}}(),T=[{title:"ID",dataIndex:"id",search:!1},{title:"\u95E8\u5E97",dataIndex:"name",search:!1,render:function(t,r){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{children:r.name}),(0,e.jsx)("div",{children:r.addr})]})}},{title:"\u6570\u91CF",dataIndex:"device_num",search:!1},{title:"\u7535\u8D39",dataIndex:"dian_price",search:!1},{title:"\u670D\u52A1\u8D39",dataIndex:"fee",search:!1},{title:"\u505C\u8F66\u8D39",dataIndex:"p_price",search:!1},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(t,r){return(0,e.jsx)(D.Z,{children:(0,e.jsx)(R.Z,{action:"admin/device_store/update",children:(0,e.jsx)(p.ZP,{type:"link",onClick:function(){O.history.push("store/".concat(r.id,"/update"))},children:"\u7F16\u8F91"})},"admin/device_store/update")})}}];return(0,e.jsx)(f._z,{ghost:!0,children:(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(M.Z,{actionRef:C,rowKey:"id",search:{defaultCollapsed:!1},toolBarRender:function(){return[(0,e.jsx)(R.Z,{action:"admin/device_store/create",children:(0,e.jsx)(p.ZP,{type:"primary",onClick:function(){O.history.push("store/0/create")},children:"\u6DFB\u52A0"})},"admin/device_store/create")]},request:function(){var _=a()(m()().mark(function t(r,s,u){var i,d,l;return m()().wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,K(o()(o()({},r),{},{sorter:s,filter:u}));case 2:return i=c.sent,d=i.data,l=i.success,c.abrupt("return",{data:(d==null?void 0:d.data)||[],total:d==null?void 0:d.total,success:l});case 6:case"end":return c.stop()}},t)}));return function(t,r,s){return _.apply(this,arguments)}}(),columns:T,tableAlertRender:function(t){var r=t.selectedRowKeys,s=t.selectedRows,u=t.onCleanSelected;return(0,e.jsxs)(D.Z,{size:24,children:[(0,e.jsxs)("span",{children:["\u5DF2\u9009 ",r.length," \u9879"]}),(0,e.jsx)("span",{children:(0,e.jsx)("a",{style:{marginInlineStart:8},onClick:u,children:"\u53D6\u6D88\u9009\u62E9"})})]})},tableAlertOptionRender:function(t){var r=t.selectedRowKeys,s=t.selectedRows,u=t.onCleanSelected;return(0,e.jsx)(D.Z,{size:16,children:(0,e.jsx)(R.Z,{action:"admin/device_store/delete",children:(0,e.jsx)(I.Z,{title:"\u786E\u8BA4\u5220\u9664\uFF1F",onConfirm:function(){S({id:r})},children:(0,e.jsx)(p.ZP,{type:"link",danger:!0,children:"\u6279\u91CF\u5220\u9664"})})},"admin/device_store/delete")})},pagination:{showSizeChanger:!0}})})})}}}]);
