選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 

2 行
8.2 KiB

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