25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 

2 satır
7.8 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[4978,7975,1322,1793,7005,3042,3721,607,8863,1587,4001],{3408:function(H,I,t){"use strict";t.d(I,{lM:function(){return k},IH:function(){return G},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 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)("/kitchen/api/sysOrg\u200B/page",{method:"GET",params:(0,D.Z)({},u)}));case 1:case"end":return E.stop()}},a)})),P.apply(this,arguments)}function G(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 w.apply(this,arguments)}function w(){return w=_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)})),w.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 K(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(H,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),P=t(48086),G=t(11849),v=t(2824),Q=t(43358),w=t(34041),W=t(78009),p=t(67294),j=t(16894),T=t(48971);function K(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 _(){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 E(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),C=t(85893),Se=w.Z.Option,De=w.Z.OptGroup,z=function(Z){console.log(1),console.log(Z);var m=(0,p.useRef)(),r=(0,p.useState)(),$=(0,v.Z)(r,2),X=$[0],q=$[1],ee=(0,p.useState)([]),M=(0,v.Z)(ee,2),Oe=M[0],te=M[1],ae=(0,p.useState)([]),x=(0,v.Z)(ae,2),be=x[0],re=x[1],ne=(0,p.useState)([]),B=(0,v.Z)(ne,2),ue=B[0],se=B[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),_e=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"}),N=(0,v.Z)(de,2),F=N[0],he=N[1],fe=function(g){he((0,G.Z)((0,G.Z)({},F),{},{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,C.jsx)("a",{type:"primary",onClick:function(){y.status=y.status==0?1:0,E(y).then(function(s){s.data?m.current.reload():P.default.error("\u66F4\u65B0\u5931\u8D25")})},children:y.status==1?"\u542F\u7528":"\u7981\u7528"},"primary")]}}],ge={basis:(0,C.jsx)(D.Z,{title:"\u5E97\u94FA\u7BA1\u7406",style:{marginBottom:24},bordered:!1,children:(0,C.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,K(y).then(function(Ze){var Te=ye(window.location.search,"values");c=Ze.data.data;for(var A=0;A<c.length;A++)c[A].orgId==Te&&s.push(c[A]);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,C.jsx)(W.ZP,{title:"\u5E97\u94FA\u7BA1\u7406",onTabChange:fe,tabList:ve,children:ge[F.operationKey]})},J=z}}]);