Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

2 řádky
7.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4978,1322,9464,1981,2869,7013,9719,2383],{3408:function(N,I,t){"use strict";t.d(I,{lM:function(){return k},IH:function(){return A},mm:function(){return W},eP:function(){return j},FM:function(){return L}});var h=t(39428),D=t(11849),i=t(3182),f=t(48971);function k(a,u){return E.apply(this,arguments)}function E(){return E=(0,i.Z)((0,h.Z)().mark(function a(u,P){return(0,h.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:return w.abrupt("return",(0,f.WY)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,D.Z)({},u)}));case 1:case"end":return w.stop()}},a)})),E.apply(this,arguments)}function A(a){return v.apply(this,arguments)}function v(){return v=(0,i.Z)((0,h.Z)().mark(function a(u){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,f.WY)("/kitchen/api/sysOrg/add",{method:"POST",data:(0,D.Z)({},u)}));case 1:case"end":return e.stop()}},a)})),v.apply(this,arguments)}function Q(a){return _.apply(this,arguments)}function _(){return _=_asyncToGenerator(_regeneratorRuntime().mark(function a(u){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("\u200B/kitchen/api\u200B/sysOrg\u200B/list",{method:"POST",data:_objectSpread({},u)}));case 1:case"end":return e.stop()}},a)})),_.apply(this,arguments)}function W(a){return p.apply(this,arguments)}function p(){return p=(0,i.Z)((0,h.Z)().mark(function a(u){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,f.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/delete",{method:"POST",data:(0,D.Z)({},u)}));case 1:case"end":return e.stop()}},a)})),p.apply(this,arguments)}function j(a){return T.apply(this,arguments)}function T(){return T=(0,i.Z)((0,h.Z)().mark(function a(u){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,f.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/edit",{method:"POST",data:(0,D.Z)({},u)}));case 1:case"end":return e.stop()}},a)})),T.apply(this,arguments)}function B(a){return O.apply(this,arguments)}function O(){return O=_asyncToGenerator(_regeneratorRuntime().mark(function a(u){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",request("/kitchen\u200B/api\u200B/sysOrg\u200B/detail",{method:"POST",data:_objectSpread({},u)}));case 1:case"end":return e.stop()}},a)})),O.apply(this,arguments)}function L(a){return b.apply(this,arguments)}function b(){return b=(0,i.Z)((0,h.Z)().mark(function a(u){return(0,h.Z)().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,f.WY)("\u200B/kitchen/api\u200B/sysOrg\u200B/tree",{data:(0,D.Z)({},u)}));case 1:case"end":return e.stop()}},a)})),b.apply(this,arguments)}},6025:function(N,I,t){"use strict";t.r(I),t.d(I,{default:function(){return J}});var h=t(58024),D=t(91894),i=t(39428),f=t(3182),k=t(34792),E=t(48086),A=t(11849),v=t(2824),Q=t(43358),_=t(34041),W=t(78009),p=t(67294),j=t(16894),T=t(48971);function B(o){return O.apply(this,arguments)}function O(){return O=(0,f.Z)((0,i.Z)().mark(function o(Z){return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,T.WY)("/kitchen/api/Device/GetDeviceInfoPage",{method:"POST",data:Z}));case 1:case"end":return r.stop()}},o)})),O.apply(this,arguments)}function L(o){return b.apply(this,arguments)}function b(){return b=(0,f.Z)((0,i.Z)().mark(function o(Z){return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,T.WY)("/kitchen/api/dict-data/dic-list/".concat(Z),{method:"Get"}));case 1:case"end":return r.stop()}},o)})),b.apply(this,arguments)}function a(o){return u.apply(this,arguments)}function u(){return u=(0,f.Z)((0,i.Z)().mark(function o(Z){return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,T.WY)("\u200B/kitchen/api/Device/GetDeviceType",{method:"GET"}));case 1:case"end":return r.stop()}},o)})),u.apply(this,arguments)}function P(){return e.apply(this,arguments)}function e(){return e=_asyncToGenerator(_regeneratorRuntime().mark(function o(){return _regeneratorRuntime().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.abrupt("return",request("/kitchen/api/Device/StoreDeviceTree",{method:"GET"}));case 1:case"end":return m.stop()}},o)})),e.apply(this,arguments)}function w(o){return R.apply(this,arguments)}function R(){return R=(0,f.Z)((0,i.Z)().mark(function o(Z){return(0,i.Z)().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",(0,T.WY)("/kitchen/api/Device/UpdateDeviceInfo",{method:"POST",data:Z}));case 1:case"end":return r.stop()}},o)})),R.apply(this,arguments)}var V=t(3408),G=t(85893),Se=_.Z.Option,De=_.Z.OptGroup,z=function(Z){console.log(1),console.log(Z);var m=(0,p.useRef)(),r=(0,p.useState)(),K=(0,v.Z)(r,2),X=K[0],q=K[1],ee=(0,p.useState)([]),$=(0,v.Z)(ee,2),Oe=$[0],te=$[1],ae=(0,p.useState)([]),M=(0,v.Z)(ae,2),be=M[0],re=M[1],ne=(0,p.useState)([]),x=(0,v.Z)(ne,2),ue=x[0],se=x[1],ie=(0,p.useState)([]),Y=(0,v.Z)(ie,2),ce=Y[0],le=Y[1],oe=(0,p.useState)([]),U=(0,v.Z)(oe,2),Pe=U[0],pe=U[1];(0,p.useEffect)(function(){var S=function(){a().then(function(s){var l={},d=[];s.data.forEach(function(n){d.push({text:n.name,id:n.id}),l[n.id]={text:n.name}}),te(d),q(l)})};function g(){(0,V.FM)().then(function(c){re(c.data);var s={};l(c.data);function l(d){for(var n in d)s[d[n].value]={text:d[n].title},d[n].children&&l(d[n].children)}se(s)})}g(),S();function y(){L("DeviceClientType").then(function(c){var s=c.data,l={};if(c.succeeded){var d=[];s.forEach(function(n){l[n.code]={text:n.code},d.push({code:n.code,value:n.code})}),le(l),pe(d)}})}y()},[]);var de=(0,p.useState)({operationKey:"basis",tabActiveKey:"basis"}),F=(0,v.Z)(de,2),H=F[0],he=F[1],fe=function(g){he((0,A.Z)((0,A.Z)({},H),{},{operationKey:g}))},ve=[{key:"basis",tab:"\u5E97\u94FA\u7BA1\u7406"}],me=[{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:"\u8BBE\u5907\u7C7B\u578B",dataIndex:"deviceTypeKey",valueEnum:ce},{title:"\u5F52\u5C5E\u95E8\u5E97",dataIndex:"orgId",search:!1,valueEnum:ue},{title:"\u8BBE\u5907\u5730\u5740",dataIndex:"deviceAddr",search:!1,valueType:"textarea"},{title:"\u8BBE\u5907\u5206\u7C7B",dataIndex:"deviceTypeId",valueEnum:X},{title:"\u5750\u6807",dataIndex:"deviceLoc",valueType:"textarea",search:!1},{title:"\u72B6\u6001",dataIndex:"status",valueEnum:{0:{text:"\u6B63\u5E38",status:"Processing"},1:{text:"\u505C\u7528",status:"Success"}}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(g,y){return[(0,G.jsx)("a",{type:"primary",onClick:function(){y.status=y.status==0?1:0,w(y).then(function(s){s.data?m.current.reload():E.default.error("\u66F4\u65B0\u5931\u8D25")})},children:y.status==1?"\u542F\u7528":"\u7981\u7528"},"primary")]}}],ge={basis:(0,G.jsx)(D.Z,{title:"\u5E97\u94FA\u7BA1\u7406",style:{marginBottom:24},bordered:!1,children:(0,G.jsx)(j.ZP,{actionRef:m,rowKey:"id",search:!1,request:function(){var S=(0,f.Z)((0,i.Z)().mark(function g(y){var c,s,l;return(0,i.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return c=[],s=[],l=0,n.next=5,B(y).then(function(Ze){var Te=ye(window.location.search,"values");c=Ze.data.data;for(var C=0;C<c.length;C++)c[C].orgId==Te&&s.push(c[C]);l=s.length});case 5:return n.abrupt("return",{data:s,success:!0,total:l});case 6:case"end":return n.stop()}},g)}));return function(g){return S.apply(this,arguments)}}(),columns:me})})};function ye(S,g){if(!S||!g)return null;for(var y=S.substring(1),c=y.split("&"),s=0;s<c.length;s++){var l=c[s].split("=");if(l[0]===g)return l[1]}return null}return(0,G.jsx)(W.ZP,{title:"\u5E97\u94FA\u7BA1\u7406",onTabChange:fe,tabList:ve,children:ge[H.operationKey]})},J=z}}]);