集成,总结MES功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

3 line
13 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[402],{77386:function(l,h,e){"use strict";var F=e(97857),m=e.n(F),o=e(56002);h.Z={Add:function(a){return(0,o.request)("/api/deviceProduct/add",{method:"POST",data:m()({},a)})},Del:function(a){return(0,o.request)("/api/deviceProduct/del",{method:"POST",data:m()({},a)})},Update:function(a){return(0,o.request)("/api/deviceProduct/update",{method:"POST",data:m()({},a)})},Detail:function(a){return(0,o.request)("/api/deviceProduct/detail?id=".concat(a),{method:"GET"})},List:function(a){return(0,o.request)("/api/deviceProduct/list",{method:"POST",data:m()({},a)})},PagedList:function(a){return(0,o.request)("/api/deviceProduct/pagedlist",{method:"POST",data:m()({},a)})},SelectList:function(){return(0,o.request)("/api/deviceProduct/selectlist",{method:"GET"})}}},16940:function(l,h,e){"use strict";var F=e(97857),m=e.n(F),o=e(56002);h.Z={Add:function(a){return(0,o.request)("/api/deviceproductfunction/add",{method:"POST",data:m()({},a)})},Del:function(a){return(0,o.request)("/api/deviceproductfunction/del",{method:"POST",data:m()({},a)})},Update:function(a){return(0,o.request)("/api/deviceproductfunction/update",{method:"POST",data:m()({},a)})},Detail:function(a){return(0,o.request)("/api/deviceproductfunction/detail?id=".concat(a),{method:"GET"})},List:function(a){return(0,o.request)("/api/deviceproductfunction/list",{method:"POST",data:m()({},a)})},PagedList:function(a){return(0,o.request)("/api/deviceproductfunction/pagedlist",{method:"POST",data:m()({},a)})}}},69640:function(l,h,e){"use strict";e.r(h),e.d(h,{default:function(){return ve}});var F=e(19632),m=e.n(F),o=e(15009),c=e.n(o),a=e(99289),s=e.n(a),I=e(5574),j=e.n(I),W=e(51042),H=e(26346),k=e(34994),B=e(83145),u=e(93410),i=e(57632),g=e(8232),E=e(42075),x=e(14726),J=e(86738),P=e(45360),le=e(71230),ce=e(96074),fe=e(85576),U=e(49978),me=e(34041),S=e(67294),O=e(77386),M=e(16940),t=e(85893),pe=[{label:"\u6570\u636E",value:0},{label:"\u6570\u7EC4",value:1}],ve=function(){var he=(0,S.useState)("table"),Q=j()(he,2),L=Q[0],D=Q[1],N=(0,S.useRef)(),X=(0,S.useRef)(),xe=(0,S.useState)("table"),Y=j()(xe,2),$=Y[0],A=Y[1],z=(0,S.useRef)(),q=(0,S.useRef)(),Pe=g.Z.useForm(),ge=j()(Pe,1),_=ge[0],Ce=(0,S.useState)(),ee=j()(Ce,2),y=ee[0],ye=ee[1],Fe=(0,S.useState)([]),te=j()(Fe,2),T=te[0],b=te[1],je=(0,S.useState)(),re=j()(je,2),ne=re[0],ae=re[1],Se=(0,S.useState)(!1),ue=j()(Se,2),Ze=ue[0],K=ue[1],Ee=(0,S.useState)(!1),oe=j()(Ee,2),se=oe[0],ie=oe[1],V=function(){var r,n;(r=N.current)===null||r===void 0||r.resetFields(),(n=X.current)===null||n===void 0||n.reload()},de=function(){var r,n;(r=z.current)===null||r===void 0||r.resetFields(),(n=q.current)===null||n===void 0||n.reload()},Te=[{title:"\u4E3B\u952E",dataIndex:"id",formItemProps:{hidden:!0},search:!1},{title:"\u540D\u79F0",dataIndex:"name",formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]}},{title:"\u7F16\u7801",dataIndex:"code",formItemProps:{rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}]},search:!1},{title:"\u63CF\u8FF0",dataIndex:"description",search:!1},{title:"\u64CD\u4F5C",valueType:"option",fixed:"right",render:function(r,n){return[(0,t.jsxs)(E.Z,{children:[(0,t.jsx)(x.ZP,{type:"primary",size:"small",onClick:function(){var f;D("form"),(f=N.current)===null||f===void 0||f.setFieldsValue(n)},target:"_blank",rel:"noopener noreferrer",children:"\u7F16\u8F91"},+new Date+Math.random()),(0,t.jsx)(x.ZP,{type:"primary",size:"small",onClick:function(){ie(!0),ye(n),b([])},children:"\u8BBE\u7F6E\u529F\u80FD"}),(0,t.jsx)(J.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){O.Z.Del(n).then(function(f){f.statusCode===200?(P.ZP.info("\u5220\u9664\u6210\u529F!"),V()):P.ZP.error(f.errors)})},onCancel:function(){P.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,t.jsx)(x.ZP,{type:"primary",size:"small",danger:!0,children:"\u5220\u9664"})},"del")]},+new Date+Math.random())]}}];return(0,t.jsx)(t.Fragment,{children:se?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.Z,{bordered:!0,children:se?(0,t.jsx)(x.ZP,{icon:(0,t.jsx)(H.Z,{}),type:"primary",size:"middle",onClick:function(){ie(!1)},children:"\u8FD4\u56DE\u4EA7\u54C1\u5217\u8868"}):""}),(0,t.jsxs)(u.Z,{bordered:!0,children:[(0,t.jsxs)("div",{children:["\u4EA7\u54C1\u540D\u79F0\uFF1A",y==null?void 0:y.name]}),(0,t.jsxs)("div",{children:["\u4EA7\u54C1\u63CF\u8FF0\uFF1A",y==null?void 0:y.description]})]}),(0,t.jsx)(B.Z,{type:$,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(r,n,p){return n%2===0?"":"even-row-background"},headerTitle:"\u5217\u8868",formRef:z,actionRef:q,search:!1,columns:[{title:"\u529F\u80FD\u4E3B\u952E",dataIndex:"id",search:!1,formItemProps:{hidden:!0},readonly:!0},{title:"\u529F\u80FD\u540D\u79F0",dataIndex:"name",ellipsis:!0,search:!1},{title:"\u529F\u80FD\u7F16\u7801",hideInDescriptions:!0,dataIndex:"code",search:!1},{title:"\u8F93\u5165\u53C2\u6570",hideInDescriptions:!0,hideInTable:!0,dataIndex:"params",search:!1,renderFormItem:function(r,n,p,f){return(0,t.jsxs)("div",{children:[T.map(function(Z,d){return(0,t.jsx)(le.Z,{style:{borderBottom:"0.5px solid #f3e0e0",margin:"10px"},children:(0,t.jsxs)(E.Z,{split:(0,t.jsx)(ce.Z,{type:"vertical"}),children:[(0,t.jsxs)("div",{children:["\u53C2\u6570\u540D\u79F0\uFF1A",Z.paramName]}),(0,t.jsxs)("div",{children:["\u53C2\u6570\u4EE3\u7801\uFF1A",Z.paramCode]}),(0,t.jsx)(x.ZP,{type:"link",onClick:function(){K(!0),setTimeout(function(){_.setFieldsValue(T[d])},100)},children:"\u8BBE\u7F6E"}),(0,t.jsx)(x.ZP,{type:"link",onClick:function(){var C=m()(T);C.splice(d,1),setTimeout(function(){b(C)},100)},children:"\u5220\u9664"})]})},+new Date+Math.random())}),(0,t.jsx)(x.ZP,{type:"link",onClick:function(){_.resetFields(),K(!0)},children:"+\u589E\u52A0\u53C2\u6570"}),(0,t.jsx)(fe.Z,{maskClosable:!1,destroyOnClose:!0,title:"\u8BBE\u7F6E\u53C2\u6570",footer:!1,onCancel:function(){return K(!1)},open:Ze,children:(0,t.jsxs)(k.A,{form:_,id:"paramsForm",onFinish:function(){var Z=s()(c()().mark(function d(G){var C;return c()().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:console.log(G),C=_.getFieldsValue(),C.id?(T.forEach(function(R){R.id===C.id&&(R.paramCode=C.paramCode,R.paramName=C.paramName,R.paramType=C.paramType,R.paramUnit=C.paramUnit)}),b(T)):(C.id=(0,i.Z)(),T.push(C)),b(T),console.log(C),K(!1);case 6:case"end":return w.stop()}},d)}));return function(d){return Z.apply(this,arguments)}}(),children:[(0,t.jsx)(g.Z.Item,{label:"\u4E3B\u952E",hidden:!0,name:"id",children:(0,t.jsx)(U.Z,{})}),(0,t.jsx)(g.Z.Item,{label:"\u53C2\u6570\u540D\u79F0",name:"paramName",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,t.jsx)(U.Z,{})}),(0,t.jsx)(g.Z.Item,{label:"\u53C2\u6570\u4EE3\u7801",name:"paramCode",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,t.jsx)(U.Z,{})}),(0,t.jsx)(g.Z.Item,{label:"\u53C2\u6570\u7C7B\u578B",name:"paramType",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,t.jsx)(me.Z,{onChange:function(d){ae(d!==0)},placeholder:"\u9009\u62E9\u6570\u636E\u7C7B\u578B",options:pe})}),(0,t.jsx)(g.Z.Item,{label:"\u53C2\u6570\u5355\u4F4D",hidden:ne,name:"paramUnit",rules:[{required:!ne,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,t.jsx)(U.Z,{})})]})})]})}},{title:"\u63CF\u8FF0",dataIndex:"description",search:!1},{title:"\u64CD\u4F5C",valueType:"option",dataIndex:"id",fixed:"right",render:function(r,n){return[(0,t.jsxs)(E.Z,{children:[(0,t.jsx)("a",{onClick:function(){A("form"),console.log("row",n),setTimeout(function(){var f;if((f=z.current)===null||f===void 0||f.setFieldsValue(n),n.params){var Z=JSON.parse(n.params);b(Z)}else b([])},200)},target:"_blank",rel:"noopener noreferrer",children:"\u7F16\u8F91"},+new Date+Math.random()),(0,t.jsx)(J.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){M.Z.Del(n).then(function(f){f.statusCode===200?(P.ZP.info("\u5220\u9664\u6210\u529F!"),V()):P.ZP.error(f.errors)})},onCancel:function(){P.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,t.jsx)("a",{children:"\u5220\u9664"})},"del")]},+new Date+Math.random())]}}],onSubmit:function(r){console.log(r,T),r.params=JSON.stringify(T),r.deviceProductId=y==null?void 0:y.id,$==="form"&&(r.id?M.Z.Update(r).then(function(n){n.statusCode===200?(P.ZP.info("\u66F4\u65B0\u6210\u529F!"),A("table"),de()):P.ZP.error(n.errors)}):M.Z.Add(r).then(function(n){n.statusCode===200?(P.ZP.info("\u65B0\u589E\u6210\u529F!"),A("table"),de()):P.ZP.error(n.errors)}))},request:s()(c()().mark(function v(){var r,n,p,f=arguments;return c()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return r=f.length>0&&f[0]!==void 0?f[0]:{},n={pageIndex:r.current||1,pageSize:r.pageSize||10,deviceProductId:y==null?void 0:y.id},d.next=4,M.Z.PagedList(n);case 4:if(p=d.sent,p.statusCode!==200){d.next=9;break}return d.abrupt("return",{data:p.data.items,success:!0,total:p.data.total});case 9:return d.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return d.stop()}},v)})),form:{ignoreRules:!0,submitter:{onReset:function(){var r;(r=z.current)===null||r===void 0||r.resetFields(),A("table")},searchConfig:{resetText:$==="form"?"\u8FD4\u56DE":"\u91CD\u7F6E",submitText:$==="form"?"\u63D0\u4EA4":"\u67E5\u8BE2"}}},pagination:{pageSize:5,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",toolBarRender:function(){return[(0,t.jsxs)(x.ZP,{type:"primary",onClick:function(){A("form"),b([])},children:[(0,t.jsx)(W.Z,{}),"\u6DFB\u52A0\u529F\u80FD"]},"3")]}})]}):(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(B.Z,{columns:Te,type:L,formRef:N,actionRef:X,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(r,n,p){return n%2===0?"":"even-row-background"},onSubmit:function(r){console.log(r),L==="form"&&(r.id?O.Z.Update(r).then(function(n){n.statusCode===200?(P.ZP.info("\u66F4\u65B0\u6210\u529F!"),D("table"),V()):P.ZP.error(n.errors)}):O.Z.Add(r).then(function(n){n.statusCode===200?(P.ZP.info("\u65B0\u589E\u6210\u529F!"),D("table"),V()):P.ZP.error(n.errors)}))},request:s()(c()().mark(function v(){var r,n,p,f=arguments;return c()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return r=f.length>0&&f[0]!==void 0?f[0]:{},n={pageIndex:r.current||1,pageSize:r.pageSize||10,name:r.name||""},d.next=4,O.Z.PagedList(n);case 4:if(p=d.sent,p.statusCode!==200){d.next=9;break}return d.abrupt("return",{data:p.data.items,success:!0,total:p.data.total});case 9:return d.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return d.stop()}},v)})),pagination:{pageSize:5,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:function(){return[(0,t.jsxs)(x.ZP,{type:"primary",onClick:function(){D("form")},children:[(0,t.jsx)(W.Z,{}),"\u65B0\u5EFA"]},"3")]},form:{ignoreRules:!0,submitter:{onReset:function(){var r;(r=N.current)===null||r===void 0||r.resetFields(),D("table")},searchConfig:{resetText:L==="form"?"\u8FD4\u56DE":"\u91CD\u7F6E",submitText:L==="form"?"\u63D0\u4EA4":"\u67E5\u8BE2"}}}})})})}},57632:function(l,h,e){"use strict";e.d(h,{Z:function(){return B}});var F=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),m={randomUUID:F},o,c=new Uint8Array(16);function a(){if(!o&&(o=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(c)}for(var s=[],I=0;I<256;++I)s.push((I+256).toString(16).slice(1));function j(u,i=0){return(s[u[i+0]]+s[u[i+1]]+s[u[i+2]]+s[u[i+3]]+"-"+s[u[i+4]]+s[u[i+5]]+"-"+s[u[i+6]]+s[u[i+7]]+"-"+s[u[i+8]]+s[u[i+9]]+"-"+s[u[i+10]]+s[u[i+11]]+s[u[i+12]]+s[u[i+13]]+s[u[i+14]]+s[u[i+15]]).toLowerCase()}function W(u,i=0){var g=j(u,i);if(!validate(g))throw TypeError("Stringified UUID is invalid");return g}var H=null;function k(u,i,g){if(m.randomUUID&&!i&&!u)return m.randomUUID();u=u||{};var E=u.random||(u.rng||a)();if(E[6]=E[6]&15|64,E[8]=E[8]&63|128,i){g=g||0;for(var x=0;x<16;++x)i[g+x]=E[x];return i}return j(E)}var B=k},96446:function(l,h,e){var F=e(37923);function m(o){if(Array.isArray(o))return F(o)}l.exports=m,l.exports.__esModule=!0,l.exports.default=l.exports},96936:function(l){function h(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}l.exports=h,l.exports.__esModule=!0,l.exports.default=l.exports},88619:function(l){function h(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  2. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}l.exports=h,l.exports.__esModule=!0,l.exports.default=l.exports},19632:function(l,h,e){var F=e(96446),m=e(96936),o=e(96263),c=e(88619);function a(s){return F(s)||m(s)||o(s)||c()}l.exports=a,l.exports.__esModule=!0,l.exports.default=l.exports}}]);