| 1 |
- "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[437],{8154:function(N,B,e){e.d(B,{Z:function(){return l}});var A=e(85893);function l(F){var m=F.title,P=F.children;return(0,A.jsxs)("div",{className:"min-h-screen min-w",children:[(0,A.jsx)("div",{className:"w-[100%] h-[80px] bg-[#FAFAFA] text-[18px] flex items-center pl-[24px] font-[400]",children:m}),(0,A.jsx)("div",{className:" min-h-[auto] m-[24px] flex flex-col gap-[24px]",children:P})]})}},83087:function(N,B,e){e.d(B,{Z:function(){return b}});var A=e(97857),l=e.n(A),F=e(5574),m=e.n(F),P=e(56717),d=e(37476),M=e(83622),I=e(67294),c=e(85893);function b(j){var S=j.children,W=j.modalFormProps,Y=j.title,K=j.initData,T=j.readOnly,$=j.modalProps,C=j.loading,q=C===void 0?!1:C,y=j.allowUpdate,Z=y===void 0?!0:y,L=j.submit,ee=(0,I.useState)(!0),G=m()(ee,2),w=G[0],H=G[1],te=(0,I.useRef)();return(0,c.jsx)(d.Y,l()(l()({autoComplete:"nope",trigger:(0,c.jsx)(M.ZP,{type:"text",icon:(0,c.jsx)(P.Z,{})}),title:(0,c.jsxs)("div",{className:"w-[auto] pl-[0px] pr-[68px] pb-4 flex justify-between",children:[(0,c.jsx)("div",{className:"py-[4px]",children:Y}),Z&&(0,c.jsxs)("div",{className:"flex gap-[8px]",children:[w?(0,c.jsx)(c.Fragment,{}):(0,c.jsx)(M.ZP,{type:"primary",onClick:function(){L&&L(),H(!0)},children:"\u63D0\u4EA4"}),(0,c.jsx)(M.ZP,{type:"text",style:{display:"flex",color:w?"#1890FF":"black",backgroundColor:w?"":"#CCCCCC",alignItems:"start"},onClick:function(){H(function(U){return!U})},children:w?"\u4FEE\u6539":"\u53D6\u6D88"})]})]}),modalProps:l()({destroyOnClose:!0,centered:!0,bodyStyle:{maxHeight:"55vh",overflow:"scroll",overflowX:"hidden"},onCancel:function(){H(!0)}},$),grid:!0,readonly:T!=null?T:w,submitter:!1},W),{},{children:S}))}},78843:function(N,B,e){e.d(B,{Z:function(){return M}});var A=e(97857),l=e.n(A),F=e(40110),m=e(55102),P=e(83622),d=e(85893);function M(I){var c=I.title,b=I.inputProps,j=I.submitFun;return(0,d.jsxs)("div",{className:"w-auto h-[130px] bg-white p-[24px] rounded-[4px] flex gap-[24px] flex-col",children:[(0,d.jsx)("div",{children:c}),(0,d.jsxs)("div",{className:"flex gap-[16px]",children:[(0,d.jsx)(m.Z,l()({prefix:(0,d.jsx)(F.Z,{className:"mr-[24px]"}),placeholder:"search...",onPressEnter:function(){j&&j()}},b)),(0,d.jsx)(P.ZP,{type:"primary",onClick:function(){j&&j()},style:{width:"48px",height:"48px",borderRadius:6,display:"flex",justifyContent:"center",alignItems:"center",fontSize:"14px",fontWeight:400,padding:16},children:"start"})]})]})}},4710:function(N,B,e){e.d(B,{Z:function(){return j}});var A=e(97857),l=e.n(A),F=e(15009),m=e.n(F),P=e(99289),d=e.n(P),M=e(83447),I=e(61362),c=e(27950),b=e(85893);function j(S){var W=S.props,Y=S.requestFun,K=S.searchKey,T=(0,c.F)();return(0,b.jsx)("div",{className:"rounded-[4px] bg-white",children:(0,b.jsx)(I.Z,l()({search:!1,pagination:{pageSize:T.md?10:5,showSizeChanger:T.md},scroll:{x:"max-content",y:T.md?600:400},cardProps:{bodyStyle:{padding:T.md?24:12}},request:d()(m()().mark(function $(){var C;return m()().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return y.next=2,Y().then(function(Z){var L=Z.detail;return console.log("detail",L),{success:!0,data:L}});case 2:if(C=y.sent,!K){y.next=9;break}return console.log("searchKey",K),C.data=(0,M.Z)({dataSource:C.data,keyWord:K}),y.abrupt("return",C);case 9:return y.abrupt("return",C);case 10:case"end":return y.stop()}},$)}))},W))})}},89154:function(N,B,e){e.r(B),e.d(B,{default:function(){return ve}});var A=e(15009),l=e.n(A),F=e(99289),m=e.n(F),P=e(5574),d=e.n(P),M=e(8154),I=e(78843),c=e(4710),b=e(76772),j=function(){var E=m()(l()().mark(function p(){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,b.request)("/api/v1/admin/setting/station/all",{method:"get"}));case 1:case"end":return t.stop()}},p)}));return function(){return E.apply(this,arguments)}}(),S=function(){var E=m()(l()().mark(function p(v){var t,_,O;return l()().wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return t=v.filename,_=v.stationId,O=new FormData,O.append("filename",t),O.append("stationId",_),R.abrupt("return",(0,b.request)("/api/v1/admin/setting/upload/station/image",{method:"put",data:O,headers:{"Content-Type":"multipart/form-data"}}));case 5:case"end":return R.stop()}},p)}));return function(v){return E.apply(this,arguments)}}(),W=function(){var E=m()(l()().mark(function p(v){var t,_;return l()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return t=v.connectorId,_=v.status,x.abrupt("return",(0,b.request)("/api/v1/admin/setting/station/connector/status",{method:"put",data:{status:_,connectorId:t}}));case 2:case"end":return x.stop()}},p)}));return function(v){return E.apply(this,arguments)}}(),Y=function(){var E=m()(l()().mark(function p(v){var t,_;return l()().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:return t=v.stationId,_=v.price,x.abrupt("return",(0,b.request)("/api/v1/admin/setting/price",{method:"put",data:{price:_,stationId:t}}));case 2:case"end":return x.stop()}},p)}));return function(v){return E.apply(this,arguments)}}(),K=function(){var E=m()(l()().mark(function p(){return l()().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,b.request)("/api/v1/admin/setting/sync",{method:"put"}));case 1:case"end":return t.stop()}},p)}));return function(){return E.apply(this,arguments)}}(),T=e(83447),$=e(17788),C=e(2453),q=e(83062),y=e(83622),Z=e(67294),L=e(116),ee=e(37804),G=e(27484),w=e.n(G),H=e(52677),te=e.n(H),X=e(97857),U=e.n(X),ae=e(83087),re=e(1413),ue=e(94737),oe=e(91146),le=function(p,v){return Z.createElement(oe.Z,(0,re.Z)((0,re.Z)({},p),{},{ref:v,icon:ue.Z}))},se=Z.forwardRef(le),ie=se,J=e(34994),V=e(5966),Q=e(62696),de=e(78367),k=e(96074),ce=e(95715),z=e(66309),pe=e(34041),n=e(85893);function me(E){var p,v,t=E.initData,_=E.mainTableReload,O=(0,Z.useRef)(),x={backgroundColor:"white",paddingLeft:"24px",paddingRight:"24px",paddingTop:"6px",borderBottom:3,borderColor:"black"},R=function(){var f=m()(l()().mark(function r(u){var s;return l()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,S(u);case 3:if(s=a.sent,console.log(s),s.code!==200){a.next=9;break}return a.abrupt("return",Promise.resolve(s));case 9:return a.abrupt("return",Promise.reject(s));case 10:a.next=15;break;case 12:return a.prev=12,a.t0=a.catch(0),a.abrupt("return",Promise.reject(a.t0));case 15:case"end":return a.stop()}},r,null,[[0,12]])}));return function(u){return f.apply(this,arguments)}}();return(0,n.jsxs)(ae.Z,{modalFormProps:{formRef:U()({},O),clearOnDestroy:!0,onInit:function(){var f=m()(l()().mark(function u(s,o){return l()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:console.log(t),o.setFieldsValue(t);case 2:case"end":return i.stop()}},u)}));function r(u,s){return f.apply(this,arguments)}return r}(),trigger:(0,n.jsx)(y.ZP,{type:"primary",children:"\u67E5\u770B\u8A73\u60C5"},"priceAdjustment"),title:(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:["Station Details",(0,n.jsx)(de.Z,{className:"mr-6",name:"file",customRequest:function(r){var u=r.file,s=r.onSuccess,o=r.onError,a=t.id;R({filename:u,stationId:a}).then(function(){s==null||s("\u4E0A\u4F20\u6210\u529F",new XMLHttpRequest),_==null||_()}).catch(function(i){o==null||o(i)})},showUploadList:!1,beforeUpload:function(r){var u=r.type.startsWith("image/");if(!u)return C.ZP.error("\u53EA\u80FD\u4E0A\u50B3\u5716\u7247\u6587\u4EF6\uFF01"),!1;var s=r.size/1024/1024<2;return s?!0:(C.ZP.error("\u5716\u7247\u5FC5\u9808\u5C0F\u65BC 2MB\uFF01"),!1)},onChange:function(r){if(r.file.status==="done"){var u;C.ZP.success("\u5716\u7247\u4E0A\u50B3\u6210\u529F"),(u=r.file.response)!==null&&u!==void 0&&u.url}else r.file.status==="error"&&C.ZP.error("\u5716\u7247\u4E0A\u50B3\u5931\u6557")},children:(0,n.jsx)(y.ZP,{icon:(0,n.jsx)(ie,{}),size:"small",type:"primary",children:"\u4FEE\u6539\u5716\u7247"})})]})},modalProps:{width:1e3},allowUpdate:!1,readOnly:!0,initData:t,title:"Station Details",children:[(0,n.jsx)(k.Z,{orientation:"left",orientationMargin:20,children:"\u5145\u96FB\u7AD9\u4FE1\u606F"}),(0,n.jsxs)(J.A.Group,{style:U()({},x),children:[(0,n.jsx)(V.Z,{label:"\u5145\u96FB\u7AD9\u7DE8\u865F",name:"id",colProps:{span:8,offset:0},readonly:!0}),(0,n.jsx)(Q.Z,{label:"\u7AD9\u70B9\u5716\u7247",name:"image",colProps:{span:8,offset:6},children:(0,n.jsx)(ce.Z,{src:t.image,width:100})}),(0,n.jsx)(Q.Z,{label:"\u50F9\u683C",name:"price",colProps:{span:8,offset:0},valueType:"money"}),(0,n.jsx)(V.Z,{label:"\u71DF\u696D\u6642\u9593",proFieldProps:{render:function(){return(0,n.jsx)("div",{children:t==null?void 0:t.business_hours_fk})}},colProps:{span:8,offset:6},readonly:!0})]}),(0,n.jsx)(k.Z,{orientation:"left",orientationMargin:20,children:"\u7AD9\u5167\u6A01\u4FE1\u606F"}),(0,n.jsxs)(J.A.Group,{style:U()({},x),children:[(0,n.jsx)(V.Z,{label:"\u6A01\u7E3D\u6578",name:"equipment_count",colProps:{span:8,offset:0},initialValue:(t==null||(p=t.Equipments)===null||p===void 0||(p=p.filter(function(f){var r;return(r=f.ConnectorInfos)===null||r===void 0?void 0:r.some(function(u){return u.park!==null})}))===null||p===void 0?void 0:p.length)||0,readonly:!0}),(0,n.jsx)(Q.Z,{label:"\u6240\u6709\u6A01\u4FE1\u606F",tooltip:"\u4FE1\u606F\u4F86\u6E90: \u63D0\u4F9B\u5546 \u7121\u6CD5\u624B\u52D5\u4FEE\u6539",name:"equipment_info",colProps:{span:24,offset:0},children:(0,n.jsx)(c.Z,{props:{toolBarRender:!1,pagination:!1,columns:[{title:"\u6A01\u7DE8\u865F",dataIndex:"id",width:100,ellipsis:{showTitle:!0},onCell:function(){return{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:100}}},copyable:!0},{title:"\u8A2D\u5099ID",dataIndex:"EquipmentID",width:180,ellipsis:!0,copyable:!0},{title:"\u8A2D\u5099\u578B\u865F",dataIndex:"EquipmentModel",width:120},{title:"\u8A2D\u5099\u985E\u578B",dataIndex:"EquipmentType",width:100,render:function(r){return r===1?"\u76F4\u6D41\u5145\u96FB\u6A01":"\u4EA4\u6D41\u5145\u96FB\u6A01"}},{title:"\u529F\u7387",dataIndex:"Power",width:100,render:function(r){return"".concat(r/1e3,"kW")}}],dataSource:t==null?void 0:t.Equipments}})})]}),(0,n.jsx)(k.Z,{orientation:"left",orientationMargin:20,children:"\u7AD9\u5167\u69CD\u4FE1\u606F"}),(0,n.jsxs)(J.A.Group,{style:U()({},x),children:[(0,n.jsx)(V.Z,{label:"\u69CD\u7E3D\u6578",name:"guns_count",colProps:{span:8,offset:0},initialValue:(t==null||(v=t.Equipments)===null||v===void 0?void 0:v.reduce(function(f,r){var u,s=((u=r.ConnectorInfos)===null||u===void 0?void 0:u.filter(function(o){return o.park!==null}))||[];return f+s.length},0))||0,readonly:!0}),(0,n.jsx)(Q.Z,{label:"\u6240\u6709\u69CD\u4FE1\u606F",tooltip:"\u4FE1\u606F\u4F86\u6E90: \u63D0\u4F9B\u5546 \u7121\u6CD5\u624B\u52D5\u4FEE\u6539",name:"gun_info",colProps:{span:24,offset:0},children:(0,n.jsx)(c.Z,{props:{toolBarRender:!1,pagination:!1,columns:[{title:"\u5145\u96FB\u69CDID",dataIndex:"ConnectorID",width:180,copyable:!0},{title:"\u5145\u96FB\u69CD\u540D\u7A31",dataIndex:"ConnectorName",width:100},{title:"\u8ECA\u4F4D\u865F",dataIndex:"park",width:80},{title:"\u529F\u7387",dataIndex:"Power",width:100,render:function(r){return"".concat(r/1e3,"kW")}},{title:"\u96FB\u6D41",dataIndex:"Current",width:100,render:function(r){return"".concat(r,"A")}},{title:"\u96FB\u58D3\u7BC4\u570D",dataIndex:"VoltageLowerLimits",width:120,render:function(r,u){return"".concat(u.VoltageLowerLimits,"~").concat(u.VoltageUpperLimits,"V")}},{title:"\u72C0\u614B",dataIndex:"Status",width:100,render:function(r){var u={\u5F85\u673A:(0,n.jsx)(z.Z,{color:"green",children:"\u5F85\u6A5F"}),\u5145\u7535\u4E2D:(0,n.jsx)(z.Z,{color:"blue",children:"\u5145\u96FB\u4E2D"}),\u79BB\u7EBF:(0,n.jsx)(z.Z,{color:"default",children:"\u96E2\u7DDA"}),\u6545\u969C:(0,n.jsx)(z.Z,{color:"red",children:"\u6545\u969C"})};return u[r]||(0,n.jsx)(z.Z,{children:"\u672A\u77E5"})}},{title:"\u8ECA\u4F4D\u72C0\u614B",dataIndex:"ParkStatus",width:100},{title:"\u9396\u72C0\u614B",dataIndex:"LockStatus",width:100},{title:"\u66F4\u65B0\u6642\u9593",dataIndex:"updatedAt",width:160,render:function(r){return w()(r).format("YYYY-MM-DD HH:mm:ss")}},{title:"\u64CD\u4F5C",dataIndex:"action",width:100,render:function(r,u){var s={1:{text:"\u544A\u8B66",color:"orange"},2:{text:"\u5F85\u6A5F",color:"green"},3:{text:"\u5145\u96FB\u4E2D",color:"blue"},4:{text:"\u96E2\u7DDA",color:"default"},5:{text:"\u5DF2\u5B8C\u6210",color:"cyan"},6:{text:"\u66AB\u505C",color:"gold"},7:{text:"\u5DF2\u63D2\u69CD",color:"geekblue"},8:{text:"\u9810\u7D04\u4E2D",color:"purple"},9:{text:"\u5DF2\u7981\u7528",color:"red"}},o=Object.entries(s).map(function(a){var i=d()(a,2),h=i[1],D=h.text,g=h.color;return{value:D,label:(0,n.jsx)(z.Z,{color:g,children:D})}});return(0,n.jsx)(pe.Z,{options:o,defaultValue:u.Status,onChange:function(){var a=m()(l()().mark(function i(h){return l()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,W({connectorId:u.ConnectorID,status:h});case 2:C.ZP.success("\u69CD\u72C0\u614B\u66F4\u65B0\u6210\u529F"),_==null||_();case 4:case"end":return g.stop()}},i)}));return function(i){return a.apply(this,arguments)}}(),children:"\u66F4\u6539\u69CD\u72C0\u614B"})}}],dataSource:t==null?void 0:t.Equipments.flatMap(function(f){return f.ConnectorInfos.map(function(r){return U()(U()({},r),{},{EquipmentID:f.id})})})}})})]}),(0,n.jsx)(k.Z,{orientation:"left",orientationMargin:20,children:"\u63D0\u4F9B\u5546\u539F\u59CB\u6570\u636E"}),(0,n.jsx)(J.A.Group,{style:U()({},x),children:Object.entries((t==null?void 0:t.snapshot)||{}).map(function(f){var r=d()(f,2),u=r[0],s=r[1];return u==="EquipmentInfos"?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(V.Z,{label:u,name:u,initialValue:te()(s)==="object"?JSON.stringify(s):s,colProps:{span:8},readonly:!0},u)})})]})}var fe=function(p){var v=p.mainTableReload,t=(0,Z.useState)(!1),_=d()(t,2),O=_[0],x=_[1],R=L.Z.useForm(),f=d()(R,1),r=f[0],u=function(o){var a=o.record;return(0,n.jsx)($.Z,{centered:!0,title:"\u50F9\u683C\u8ABF\u6574",open:O,onCancel:function(){return x(!1)},onOk:m()(l()().mark(function i(){var h;return l()().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,r.validateFields();case 2:return h=g.sent,console.log(h),console.log(a),g.next=7,Y({stationId:a.id,price:h.price});case 7:C.ZP.success("\u50F9\u683C\u8ABF\u6574\u6210\u529F"),x(!1),v==null||v();case 10:case"end":return g.stop()}},i)})),children:(0,n.jsx)(L.Z,{form:r,children:(0,n.jsx)(L.Z.Item,{label:"\u8ACB\u8F38\u5165\u65B0\u50F9\u683C",name:"price",children:(0,n.jsx)(ee.Z,{})})})})};return[{title:"\u5145\u96FB\u7AD9ID",dataIndex:"id",width:200,fixed:"left",copyable:!0},{title:"\u5145\u96FB\u7AD9\u540D\u7A31",dataIndex:["snapshot","StationName"],width:180},{title:"\u5730\u5740",dataIndex:["snapshot","Address"],width:200,ellipsis:!0,copyable:!0},{title:"\u5145\u96FB\u6A01\u6578\u91CF",dataIndex:["Equipments"],width:120,render:function(o,a){var i,h=(i=a.Equipments)===null||i===void 0?void 0:i.filter(function(D){var g;return(g=D.ConnectorInfos)===null||g===void 0?void 0:g.some(function(ne){return ne.park!==null})});return(h==null?void 0:h.length)||0}},{title:"\u5145\u96FB\u69CD\u6578\u91CF",dataIndex:["Equipments"],width:120,render:function(o,a){var i;return((i=a.Equipments)===null||i===void 0?void 0:i.reduce(function(h,D){var g,ne=((g=D.ConnectorInfos)===null||g===void 0?void 0:g.filter(function(he){return he.park!==null}))||[];return h+ne.length},0))||0}},{title:"\u6536\u8CBB\u6A19\u6E96",dataIndex:"price",width:120,render:function(o){return"HK$".concat(o,"/kWh")}},{title:"\u7D93\u7DEF\u5EA6",copyable:!0,width:200,render:function(o,a){var i,h;return"".concat(((i=a.snapshot)===null||i===void 0?void 0:i.StationLat)||"-",", ").concat(((h=a.snapshot)===null||h===void 0?void 0:h.StationLng)||"-")}},{title:"\u66F4\u65B0\u6642\u9593",dataIndex:"updatedAt",width:180,render:function(o){return o?w()(o).format("YYYY-MM-DD HH:mm:ss"):"-"}},{title:"\u5275\u5EFA\u6642\u9593",dataIndex:"createdAt",width:180,render:function(o){return o?w()(o).format("YYYY-MM-DD HH:mm:ss"):"-"}},{title:"\u64CD\u4F5C",width:120,render:function(o,a){return(0,n.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,n.jsx)(me,{initData:a,mainTableReload:v},"detailModal"),(0,n.jsx)(y.ZP,{type:"primary",onClick:function(){return x(!0)},children:"\u50F9\u683C\u8ABF\u6574"},"priceAdjustment"),(0,n.jsx)(u,{record:a})]})}}]};function ve(){var E,p=(0,Z.useRef)(),v=(0,Z.useState)(""),t=d()(v,2),_=t[0],O=t[1],x=(0,Z.useState)(!1),R=d()(x,2),f=R[0],r=R[1],u=function(){return(0,n.jsx)($.Z,{open:f,title:"\u78BA\u8A8D\u540C\u6B65\u6578\u64DA",centered:!0,onCancel:function(){return r(!1)},onOk:m()(l()().mark(function o(){var a;return l()().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,K();case 2:(a=p.current)===null||a===void 0||a.reload(),C.ZP.success("\u540C\u6B65\u6578\u64DA\u6210\u529F"),r(!1);case 5:case"end":return h.stop()}},o)})),children:(0,n.jsx)("h1",{children:"\u662F\u5426\u78BA\u8A8D\u540C\u6B65\u6578\u64DA\uFF1F"})})};return(0,n.jsxs)("div",{children:[(0,n.jsx)(u,{}),(0,n.jsxs)(M.Z,{title:"Station page",children:[(0,n.jsx)(I.Z,{title:"Search bar",submitFun:(E=p.current)===null||E===void 0?void 0:E.reload,inputProps:{value:_,onChange:function(o){var a=o.currentTarget.value;return O(a)}}}),(0,n.jsx)(c.Z,{searchKey:_,props:{headerTitle:"Station List",actionRef:p,toolBarRender:function(){return[(0,n.jsx)(q.Z,{title:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h1",{children:"\u8ACB\u5728\u4EE5\u4E0B\u60C5\u6CC1\u4E0B\u540C\u6B65\u6578\u64DA"}),(0,n.jsx)("h2",{children:"1. \u5145\u96FB\u7AD9\u4FE1\u606F\u6709\u8B8A\u52D5\u3002\u4F8B\u5982\uFF1A\u589E\u52A0\u65B0\u7684\u5145\u96FB\u7AD9\uFF0C\u6E1B\u5C11\u5DF2\u6709\u5145\u96FB\u7AD9\uFF0C\u7AD9\u5167\u65B0\u589E\u6216\u6E1B\u5C11\u6A01\u69CD\u8A2D\u65BD\u7B49"}),(0,n.jsx)("h2",{children:"2. \u5DF2\u78BA\u8A8D\u8A2D\u65BD\u63D0\u4F9B\u65B9\u6210\u529F\u66F4\u65B0\u6578\u64DA"})]}),children:(0,n.jsx)(y.ZP,{type:"primary",onClick:function(){return r(!0)},children:"\u540C\u6B65\u6578\u64DA"},"syncData")},"syncData")]},columns:fe({mainTableReload:function(){var o;return(o=p.current)===null||o===void 0?void 0:o.reload()}}),request:function(){var s=m()(l()().mark(function a(){var i;return l()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,j();case 2:if(i=D.sent,console.log("dataSource",i),!_){D.next=9;break}return i.data=(0,T.Z)({dataSource:i.data,keyWord:_}),D.abrupt("return",i);case 9:return D.abrupt("return",i);case 10:case"end":return D.stop()}},a)}));function o(){return s.apply(this,arguments)}return o}()}})]})]})}},83447:function(N,B,e){e.d(B,{Z:function(){return A}});function A(l){var F=l.dataSource,m=l.keyWord,P=function(M,I){return M.toLowerCase().includes(I.toLowerCase())};return F.filter(function(d){var M=Object.keys(d),I=M.map(function(c){if(d[c]&&typeof d[c]=="string"&&typeof m=="string")return P(d[c],m);if(d[c]&&typeof d[c]=="number"&&typeof m=="number"){var b=d[c].toString(),j=m.toString();return P(b,j)}else if(d[c]&&typeof d[c]=="string"&&typeof m=="number"){var S=m.toString();return P(d[c],S)}else if(d[c]&&typeof d[c]=="number"&&typeof m=="string"){var W=d[c].toString();return P(W,m)}});return I.includes(!0)})}}}]);
|