|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[7657],{1966:function(st,x,c){"use strict";c.r(x),c.d(x,{default:function(){return Gt}});var j=c(71194),P=c(50146),O=c(58996),k=c(77933),E=c(62350),V=c(24565),Y=c(57663),F=c(71577),u=c(39428),lt=c(34792),T=c(48086),w=c(3182),D=c(2824),K=c(49101),S=c(67294),Me=c(28790),U=c(16894),xe=c(49111),L=c(19650),b=c(48736),C=c(27049),A=c(43358),h=c(34041),M=c(9715),R=c(55843),Xt=c(47673),z=c(4107),_=c(48971),$=c(96690);function ot(t){return ae.apply(this,arguments)}function ae(){return ae=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"/api/device/page",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),ae.apply(this,arguments)}function ct(){return ne.apply(this,arguments)}function ne(){return ne=(0,w.Z)((0,u.Z)().mark(function t(){return(0,u.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,_.WY)((0,$.w)()+"/api/product/list",{method:"Get"}));case 1:case"end":return i.stop()}},t)})),ne.apply(this,arguments)}function dt(t){return ue.apply(this,arguments)}function ue(){return ue=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"/api/device/add",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),ue.apply(this,arguments)}function qt(t){return ie.apply(this,arguments)}function ie(){return ie=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/PushDeviceGoods?DeviceId="+r,{method:"Get"}));case 1:case"end":return e.stop()}},t)})),ie.apply(this,arguments)}function pt(t){return se.apply(this,arguments)}function se(){return se=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"/api/device/update",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),se.apply(this,arguments)}function er(t){return le.apply(this,arguments)}function le(){return le=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/CopyDevice",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),le.apply(this,arguments)}function Ve(t){return oe.apply(this,arguments)}function oe(){return oe=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"\u200B\u200B/api/device/delete",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),oe.apply(this,arguments)}function ft(){return ce.apply(this,arguments)}function ce(){return ce=(0,w.Z)((0,u.Z)().mark(function t(){return(0,u.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,_.WY)((0,$.w)()+"\u200B/api/device/getdevicetypelist",{method:"GET"}));case 1:case"end":return i.stop()}},t)})),ce.apply(this,arguments)}function ht(t){return de.apply(this,arguments)}function de(){return de=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"\u200B/api/device/adddevicetype",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),de.apply(this,arguments)}function vt(){return pe.apply(this,arguments)}function pe(){return pe=(0,w.Z)((0,u.Z)().mark(function t(){return(0,u.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,_.WY)((0,$.w)()+"\u200B/api/devicevesion/getdevicevesionlist",{method:"GET"}));case 1:case"end":return i.stop()}},t)})),pe.apply(this,arguments)}function tr(t,r){return fe.apply(this,arguments)}function fe(){return fe=_asyncToGenerator(_regeneratorRuntime().mark(function t(r,i){return _regeneratorRuntime().wrap(function(B){for(;;)switch(B.prev=B.next){case 0:return B.abrupt("return",request(getDataBaseUrl()+"/api/device/GetDeviceGoods",{method:"POST",data:_objectSpread({},r)}));case 1:case"end":return B.stop()}},t)})),fe.apply(this,arguments)}function rr(t){return he.apply(this,arguments)}function he(){return he=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/AddDeviceGood",{method:"POST",data:_objectSpread({},r)}));case 1:case"end":return e.stop()}},t)})),he.apply(this,arguments)}function ar(t){return ve.apply(this,arguments)}function ve(){return ve=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/\u200Bapi/device/GetGoods",{method:"POST",data:_objectSpread({},r)}));case 1:case"end":return e.stop()}},t)})),ve.apply(this,arguments)}function nr(t){return me.apply(this,arguments)}function me(){return me=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/\u200Bapi/device/GetByDeviceGoods",{method:"POST",data:_objectSpread({},r)}));case 1:case"end":return e.stop()}},t)})),me.apply(this,arguments)}function ur(t){return ge.apply(this,arguments)}function ge(){return ge=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/GetDeviceStorePage",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),ge.apply(this,arguments)}function ir(t){return ye.apply(this,arguments)}function ye(){return ye=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/DelStockAdjust?Id=".concat(r),{method:"DELETE"}));case 1:case"end":return e.stop()}},t)})),ye.apply(this,arguments)}function sr(t){return we.apply(this,arguments)}function we(){return we=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/AddUpdateDeviceStocAsync",{method:"POST",data:r}));case 1:case"end":return e.stop()}},t)})),we.apply(this,arguments)}function lr(t){return Se.apply(this,arguments)}function Se(){return Se=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/AddUpdateDeviceStocAsync",{method:"put",data:r}));case 1:case"end":return e.stop()}},t)})),Se.apply(this,arguments)}function or(t){return Ze.apply(this,arguments)}function Ze(){return Ze=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/deviceconfig/getlocs?Code=".concat(r),{method:"GET"}));case 1:case"end":return e.stop()}},t)})),Ze.apply(this,arguments)}function cr(t){return De.apply(this,arguments)}function De(){return De=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/GetProductList",{method:"post",data:r}));case 1:case"end":return e.stop()}},t)})),De.apply(this,arguments)}function dr(t){return be.apply(this,arguments)}function be(){return be=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/\u200Bapi/FoodMenu/tree",{data:_objectSpread({},r)}));case 1:case"end":return e.stop()}},t)})),be.apply(this,arguments)}function pr(t){return Te.apply(this,arguments)}function Te(){return Te=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/PushDevice?DeviceId=".concat(r),{method:"post"}));case 1:case"end":return e.stop()}},t)})),Te.apply(this,arguments)}function fr(t){return Ge.apply(this,arguments)}function Ge(){return Ge=_asyncToGenerator(_regeneratorRuntime().mark(function t(r){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request(getDataBaseUrl()+"/api/device/CheckStockAdjust?DeviceId=".concat(r),{method:"POST"}));case 1:case"end":return e.stop()}},t)})),Ge.apply(this,arguments)}function Ye(t){return Ce.apply(this,arguments)}function Ce(){return Ce=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"/api/DeviceVesion/GetDeviceVesion?productId=".concat(r),{method:"Get"}));case 1:case"end":return e.stop()}},t)})),Ce.apply(this,arguments)}function mt(t){return _e.apply(this,arguments)}function _e(){return _e=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.w)()+"/api/goods/TechnologyTemplateExport?deviceId=".concat(r),{method:"post"}));case 1:case"end":return e.stop()}},t)})),_e.apply(this,arguments)}function gt(){return $e.apply(this,arguments)}function $e(){return $e=(0,w.Z)((0,u.Z)().mark(function t(){return(0,u.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,_.WY)((0,$.Wz)()+"/api/store/getstorelist",{method:"Get"}));case 1:case"end":return i.stop()}},t)})),$e.apply(this,arguments)}function yt(){return je.apply(this,arguments)}function je(){return je=(0,w.Z)((0,u.Z)().mark(function t(){return(0,u.Z)().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",(0,_.WY)((0,$.w)()+"/api/goods/getgoodslist",{method:"Get"}));case 1:case"end":return i.stop()}},t)})),je.apply(this,arguments)}function wt(t){return Be.apply(this,arguments)}function Be(){return Be=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.Wz)()+"/api/devicepushrecode/getdevicegoods?deviceId="+r,{method:"post"}));case 1:case"end":return e.stop()}},t)})),Be.apply(this,arguments)}function St(t){return Re.apply(this,arguments)}function Re(){return Re=(0,w.Z)((0,u.Z)().mark(function t(r){return(0,u.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,_.WY)((0,$.Wz)()+"/api/devicepushrecode/editdevicegoods",{method:"post",data:r}));case 1:case"end":return e.stop()}},t)})),Re.apply(this,arguments)}var p=c(85893),Zt=function(r){var i=(0,S.useState)(""),e=(0,D.Z)(i,2),B=e[0],N=e[1],H=(0,S.useState)([]),J=(0,D.Z)(H,2),Pe=J[0],ke=J[1],Q=(0,S.useState)([]),X=(0,D.Z)(Q,2),Ae=X[0],Ie=X[1],q=(0,S.useState)([]),Oe=(0,D.Z)(q,2),Ee=Oe[0],ee=Oe[1],te=(0,S.useRef)(null);(0,S.useEffect)(function(){var G;if(Object.keys(r.values).length>0)var v=r.deviceVersions.map(function(y){return{value:y.id,label:y.vesion}});ee(v);var d=r.dicData.map(function(y){return{value:y.id,label:y.label}});ke(d);var l=(G=r.StopData)===null||G===void 0?void 0:G.map(function(y){return{value:y.id,label:y.name}});Ie(l)},[r]);var Fe=function(v){Ye(v).then(function(d){var l=d.data.map(function(y){return{value:y.id,label:y.vesion}});ee(l)})},We=function(v){N(v.target.value)},Ue=function(v){if(v.preventDefault(),B.length==0)T.default.error("\u8BF7\u8F93\u5165\u540D\u79F0");else{var d={name:B};ht(d).then(function(l){l.succeeded?(T.default.success("\u6DFB\u52A0\u6210\u529F"),r.initDeviceType(),N("")):T.default.error(l.errors)})}};return(0,p.jsx)(P.Z,{title:r.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:r.createModalVisible,maskClosable:!1,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){r.onCancel()},destroyOnClose:!0,children:(0,p.jsxs)(R.Z,{layout:"Horizontal",labelCol:{span:4},preserve:!1,initialValues:r.values,onFinish:r.onFinish,children:[(0,p.jsx)(R.Z.Item,{name:"id",hidden:!0,children:(0,p.jsx)(z.Z,{})}),(0,p.jsx)(R.Z.Item,{label:"\u9009\u62E9\u573A\u666F",name:"stopId",rules:[{required:!0}],children:(0,p.jsx)(h.Z,{allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(v,d){var l;return((l=d==null?void 0:d.label)!==null&&l!==void 0?l:"").includes(v)},filterSort:function(v,d){var l,y;return((l=v==null?void 0:v.label)!==null&&l!==void 0?l:"").toLowerCase().localeCompare(((y=d==null?void 0:d.label)!==null&&y!==void 0?y:"").toLowerCase())},options:Ae})}),(0,p.jsx)(R.Z.Item,{label:"\u4EA7\u54C1",name:"productId",rules:[{required:!0}],children:(0,p.jsx)(h.Z,{onChange:Fe,allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(v,d){var l;return((l=d==null?void 0:d.label)!==null&&l!==void 0?l:"").includes(v)},filterSort:function(v,d){var l,y;return((l=v==null?void 0:v.label)!==null&&l!==void 0?l:"").toLowerCase().localeCompare(((y=d==null?void 0:d.label)!==null&&y!==void 0?y:"").toLowerCase())},options:Pe})}),(0,p.jsx)(R.Z.Item,{label:"\u4EA7\u54C1\u7248\u672C",name:"productVersionId",rules:[{required:!0}],children:(0,p.jsx)(h.Z,{allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(v,d){var l;return((l=d==null?void 0:d.label)!==null&&l!==void 0?l:"").includes(v)},filterSort:function(v,d){var l,y;return((l=v==null?void 0:v.label)!==null&&l!==void 0?l:"").toLowerCase().localeCompare(((y=d==null?void 0:d.label)!==null&&y!==void 0?y:"").toLowerCase())},options:Ee})}),(0,p.jsx)(R.Z.Item,{label:"\u8BBE\u5907\u540D\u79F0",name:"deviceName",rules:[{required:!0,max:50}],children:(0,p.jsx)(z.Z,{})}),(0,p.jsx)(R.Z.Item,{label:"\u8BBE\u5907\u6807\u7B7E",name:"deviceTypeId",rules:[{required:!1}],children:(0,p.jsx)(h.Z,{style:{width:"100%"},placeholder:"\u8BF7\u9009\u8BBE\u5907\u6807\u7B7E",options:r.storeType,allowClear:!0,showSearch:!0,optionFilterProp:"children",filterOption:function(v,d){var l;return((l=d==null?void 0:d.label)!==null&&l!==void 0?l:"").includes(v)},filterSort:function(v,d){var l,y;return((l=v==null?void 0:v.label)!==null&&l!==void 0?l:"").toLowerCase().localeCompare(((y=d==null?void 0:d.label)!==null&&y!==void 0?y:"").toLowerCase())},dropdownRender:function(v){return(0,p.jsxs)(p.Fragment,{children:[v,(0,p.jsx)(C.Z,{style:{margin:"8px 0"}}),(0,p.jsxs)(L.Z,{style:{padding:"0 8px 4px"},children:[(0,p.jsx)(z.Z,{placeholder:"\u8BF7\u8F93\u5165\u8BBE\u5907\u6807\u7B7E",ref:te,value:B,onChange:We,onKeyDown:function(l){return l.stopPropagation()}}),(0,p.jsx)(F.Z,{type:"text",icon:(0,p.jsx)(K.Z,{}),onClick:Ue,children:"\u65B0\u589E"})]})]})}})}),(0,p.jsx)(R.Z.Item,{label:"\u5730\u5740",name:"address",rules:[{max:50}],children:(0,p.jsx)(z.Z,{})}),(0,p.jsx)(R.Z.Item,{children:(0,p.jsx)(F.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u4FDD\u5B58"})})]})})},Dt=Zt,bt=c(20173),hr=c(96486),vr="message",Tt=function(){var r=(0,S.useState)(),i=(0,D.Z)(r,2),e=i[0],B=i[1],N=(0,S.useState)([]),H=(0,D.Z)(N,2),J=H[0],Pe=H[1],ke=(0,S.useState)([]),Q=(0,D.Z)(ke,2),X=Q[0],Ae=Q[1],Ie=(0,S.useState)([]),q=(0,D.Z)(Ie,2),Oe=q[0],Ee=q[1],ee=(0,S.useState)([]),te=(0,D.Z)(ee,2),Fe=te[0],We=te[1],Ue=(0,S.useState)([]),G=(0,D.Z)(Ue,2),v=G[0],d=G[1],l=(0,S.useState)([]),y=(0,D.Z)(l,2),Ct=y[0],Ke=y[1],_t=(0,S.useState)(!1),ze=(0,D.Z)(_t,2),$t=ze[0],W=ze[1],I=(0,S.useRef)(),jt=(0,S.useState)(),Ne=(0,D.Z)(jt,2),Le=Ne[0],He=Ne[1],Bt=(0,S.useState)([]),Je=(0,D.Z)(Bt,2),re=Je[0],Qe=Je[1],Rt=(0,S.useState)([]),Xe=(0,D.Z)(Rt,2),Pt=Xe[0],kt=Xe[1],At=(0,S.useState)(!1),qe=(0,D.Z)(At,2),It=qe[0],et=qe[1],Ot=(0,S.useState)([]),tt=(0,D.Z)(Ot,2),Et=tt[0],Ft=tt[1],Wt=(0,S.useState)([]),rt=(0,D.Z)(Wt,2),at=rt[0],nt=rt[1],Ut=(0,S.useState)([]),ut=(0,D.Z)(Ut,2),mr=ut[0],gr=ut[1];(0,S.useEffect)(function(){gt().then(function(a){kt(a.data)}),yt().then(function(a){var m=a.data,n=[];m.forEach(function(s){n.push({key:s.id,title:s.name,description:s.name})}),Ft(n)});function g(){(0,bt.FM)().then(function(a){m(a.data);function m(f){for(var Z in f)f[Z].type==2||f[Z].type==3?f[Z].disabled=!1:f[Z].disabled=!0,f[Z].children&&m(f[Z].children)}Ae(a.data);var n={};s(a.data);function s(f){for(var Z in f)n[f[Z].disabled]=!0,n[f[Z].value]={text:f[Z].title},f[Z].children&&s(f[Z].children)}Ee(n)})}g(),it();function o(){ct().then(function(a){var m=a.data,n={};if(a.succeeded){var s=[];m.forEach(function(f){n[f.name]={text:f.name},s.push({id:f.id,label:f.name,text:f.name})}),We(n),d(s)}})}o(),Lt()},[]);var it=function(){ft().then(function(o){var a={},m=[];o.data.forEach(function(n){m.push({label:n.name,text:n.name,value:n.id}),a[n.id]={text:n.name}}),Pe(m),B(a)})},Lt=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(){var a;return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,vt();case 2:a=n.sent,a.statusCode==200?Ke(a.data):T.default.error("\u83B7\u53D6\u8BBE\u5907\u7248\u672C\u5931\u8D25");case 4:case"end":return n.stop()}},o)}));return function(){return g.apply(this,arguments)}}(),Mt=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){var m;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,Ye(a==null?void 0:a.productId);case 2:m=s.sent,m.statusCode==200?Ke(m.data):T.default.error("\u83B7\u53D6\u8BBE\u5907\u7248\u672C\u5931\u8D25");case 4:case"end":return s.stop()}},o)}));return function(a){return g.apply(this,arguments)}}(),xt=function(){return(re==null?void 0:re.length)>0&&(0,p.jsx)(V.Z,{title:"\u786E\u8BA4\u5220\u9664\u5417?",onConfirm:Vt,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,p.jsx)(F.Z,{type:"primary",children:"\u6279\u91CF\u5220\u9664"})})},Vt=function(){var o,a;Yt(re),Qe([]),(o=I.current)===null||o===void 0||(a=o.reloadAndRest)===null||a===void 0||a.call(o)},Yt=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a){n.next=2;break}return n.abrupt("return",!0);case 2:return n.next=4,Ve(a.map(function(s){return s.id})).then(function(s){s.data?(T.default.success("\u5220\u9664\u6210\u529F"),I.current.reload()):T.default.error("\u5220\u9664\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5")});case 4:return n.abrupt("return",!0);case 5:case"end":return n.stop()}},o)}));return function(a){return g.apply(this,arguments)}}(),Kt=[{title:"\u4E3B\u952E",dataIndex:"id",hideInSearch:!0,hideInTable:!0,tip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key"},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",valueType:"textarea"},{title:"\u4EA7\u54C1",dataIndex:"productName",valueEnum:Fe,hideInSearch:!0},{title:"\u4EA7\u54C1\u7248\u672C",dataIndex:"productVersionName",search:!1},{title:"\u6240\u5C5E\u573A\u666F",dataIndex:"stopName",search:!1},{title:"\u5730\u5740",dataIndex:"address",search:!1},{title:"\u8BBE\u5907\u6807\u7B7E",dataIndex:"deviceTypeId",valueEnum:e},{title:"\u8BBE\u5907\u552F\u4E00key",dataIndex:"autoKey",search:!1},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",fixed:"right",width:300,render:function(o,a){return[(0,p.jsx)("a",{onClick:function(){Mt(a),W(!0),He(a)},children:"\u66F4\u65B0"},"update"),(0,p.jsx)(V.Z,{type:"primary",title:"\u786E\u8BA4\u5220\u9664\u5417\uFF1F",okText:"\u662F",cancelText:"\u5426",onConfirm:(0,w.Z)((0,u.Z)().mark(function m(){return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,Ve([a.id]).then(function(f){f.data?(T.default.success("\u5220\u9664\u6210\u529F"),I.current.reload()):T.default.error(f.errors)});case 2:case"end":return s.stop()}},m)})),onCancel:function(){},children:(0,p.jsx)("a",{href:"#",children:"\u5220\u9664"})},"primary"),(0,p.jsx)("a",{onClick:(0,w.Z)((0,u.Z)().mark(function m(){var n,s;return(0,u.Z)().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:return Z.next=2,mt(a.id);case 2:if(n=Z.sent,n!=""){Z.next=6;break}return T.default.error("\u5F53\u524D\u6A21\u677F\u4E0D\u5B58\u5728\uFF01"),Z.abrupt("return");case 6:s=document.createElement("a"),s.href=n,s.click();case 9:case"end":return Z.stop()}},m)})),children:"\u5BFC\u51FA\u5DE5\u827A\u6A21\u7248"},"add")]}}],zt=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,dt(JSON.stringify(a)).then(function(s){if(s.succeeded)T.default.success("\u6DFB\u52A0\u6210\u529F"),W(!1),I.current.reload();else return T.default.error(s.errors),!1});case 2:case"end":return n.stop()}},o)}));return function(a){return g.apply(this,arguments)}}(),Nt=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,pt(JSON.stringify(a)).then(function(s){if(s.succeeded)T.default.success("\u66F4\u65B0\u6210\u529F"),W(!1),I.current.reload();else return T.default.error(s.errors),!1});case 2:case"end":return n.stop()}},o)}));return function(a){return g.apply(this,arguments)}}(),Ht=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(){var a,m;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:a=[],at.forEach(function(f,Z,Qt){a.push({goodsId:f,goodsName:""})}),m={deviceId:Le.id,goodsList:a,autoKey:Le.autoKey},St(m).then(function(f){if(f.succeeded)T.default.success("\u7F16\u8F91\u6210\u529F"),W(!1),I.current.reload();else return T.default.error(f.errors),!1}),et(!1);case 5:case"end":return s.stop()}},o)}));return function(){return g.apply(this,arguments)}}(),yr=function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){var m;return(0,u.Z)().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:m=[],wt(a).then(function(f){f.data.forEach(function(Z,Qt,wr){m.push(Z.goodsId)}),nt(m)});case 2:case"end":return s.stop()}},o)}));return function(a){return g.apply(this,arguments)}}(),Jt=function(o){nt(o)};return(0,p.jsxs)(Me.ZP,{host:!0,header:{title:"",breadcrumb:{}},children:[(0,p.jsx)(U.ZP,{headerTitle:"\u8BBE\u5907\u4FE1\u606F",actionRef:I,rowKey:"id",pagination:{defaultPageSize:10},search:{labelWidth:120},scroll:{x:2e3},toolBarRender:function(){return[(0,p.jsxs)(F.Z,{type:"primary",onClick:function(){W(!0)},children:[(0,p.jsx)(K.Z,{})," \u65B0\u5EFA"]},"primary"),(0,p.jsx)(xt,{})]},request:function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){var m,n;return(0,u.Z)().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return m=[],n=0,f.next=4,ot(a).then(function(Z){m=Z.data.data,n=Z.data.total});case 4:return f.abrupt("return",{data:m,success:!0,total:n});case 5:case"end":return f.stop()}},o)}));return function(o){return g.apply(this,arguments)}}(),columns:Kt,rowSelection:{onChange:function(o,a){Qe(a)}}}),(0,p.jsx)(Dt,{storeType:J,OrgData:X,dicData:v,initDeviceType:it,onFinish:function(){var g=(0,w.Z)((0,u.Z)().mark(function o(a){return(0,u.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:a.id?Nt(a):zt(a);case 1:case"end":return n.stop()}},o)}));return function(o){return g.apply(this,arguments)}}(),onCancel:function(){W(!1),He(void 0)},createModalVisible:$t,deviceVersions:Ct,values:Le||{},StopData:Pt}),(0,p.jsx)(P.Z,{width:600,title:"\u7F16\u8F91\u8BBE\u5907\u5546\u54C1",open:It,onOk:function(){Ht()},onCancel:function(){et(!1)},children:(0,p.jsx)(k.Z,{className:"tree-transfer",dataSource:Et,targetKeys:at,onChange:Jt,onSearch:function(){},render:function(o){return o.title}})})]})},Gt=Tt},20173:function(st,x,c){"use strict";c.d(x,{lM:function(){return V},IH:function(){return F},mm:function(){return w},eP:function(){return K},FM:function(){return xe}});var j=c(39428),P=c(11849),O=c(3182),k=c(48971),E=c(96690);function V(b,C){return Y.apply(this,arguments)}function Y(){return Y=(0,O.Z)((0,j.Z)().mark(function b(C,A){return(0,j.Z)().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:return M.abrupt("return",(0,k.WY)((0,E.w)()+"/api/organize/page",{method:"POST",data:(0,P.Z)({},C)}));case 1:case"end":return M.stop()}},b)})),Y.apply(this,arguments)}function F(b){return u.apply(this,arguments)}function u(){return u=(0,O.Z)((0,j.Z)().mark(function b(C){return(0,j.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,k.WY)((0,E.w)()+"/api/organize/addorg",{method:"POST",data:(0,P.Z)({},C)}));case 1:case"end":return h.stop()}},b)})),u.apply(this,arguments)}function lt(b){return T.apply(this,arguments)}function T(){return T=_asyncToGenerator(_regeneratorRuntime().mark(function b(C){return _regeneratorRuntime().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",request(getDataBaseUrl()+"\u200B/api\u200B/organize/getorglist",{method:"POST",data:_objectSpread({},C)}));case 1:case"end":return h.stop()}},b)})),T.apply(this,arguments)}function w(b){return D.apply(this,arguments)}function D(){return D=(0,O.Z)((0,j.Z)().mark(function b(C){return(0,j.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,k.WY)((0,E.w)()+"\u200B/api\u200B/organize/deleteorg?id="+C,{method:"GET"}));case 1:case"end":return h.stop()}},b)})),D.apply(this,arguments)}function K(b){return S.apply(this,arguments)}function S(){return S=(0,O.Z)((0,j.Z)().mark(function b(C){return(0,j.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,k.WY)((0,E.w)()+"\u200B/api\u200B/organize/updateorg",{method:"POST",data:(0,P.Z)({},C)}));case 1:case"end":return h.stop()}},b)})),S.apply(this,arguments)}function Me(b){return U.apply(this,arguments)}function U(){return U=_asyncToGenerator(_regeneratorRuntime().mark(function b(C){return _regeneratorRuntime().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",request(getDataBaseUrl()+"/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},C)}));case 1:case"end":return h.stop()}},b)})),U.apply(this,arguments)}function xe(b){return L.apply(this,arguments)}function L(){return L=(0,O.Z)((0,j.Z)().mark(function b(C){return(0,j.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",(0,k.WY)((0,E.w)()+"\u200B/api\u200B/organize/tree",{method:"GET",data:(0,P.Z)({},C)}));case 1:case"end":return h.stop()}},b)})),L.apply(this,arguments)}}}]);
|