集成,总结MES功能
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

2 lines
13 KiB

  1. "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[36],{37387:function(z,j,t){var m=t(97857),p=t.n(m),u=t(56002);j.Z={Add:function(o){return(0,u.request)("/api/devicesinfo/add",{method:"POST",data:p()({},o)})},Del:function(o){return(0,u.request)("/api/devicesinfo/del",{method:"POST",data:p()({},o)})},Update:function(o){return(0,u.request)("/api/devicesinfo/update",{method:"POST",data:p()({},o)})},Detail:function(o){return(0,u.request)("/api/devicesinfo/detail?id=".concat(o),{method:"GET"})},List:function(){return(0,u.request)("/api/devicesinfo/list",{method:"POST"})},UnBindList:function(){return(0,u.request)("/api/devicesinfo/UnBindList",{method:"GET"})},PagedList:function(o){return(0,u.request)("/api/devicesinfo/pagedlist",{method:"POST",data:p()({},o)})},BatchUpdate:function(o){return(0,u.request)("/api/devicerecipe/batchupdate",{method:"POST",data:o})},RecipeList:function(o){return(0,u.request)(" api/devicerecipe/list",{method:"POST",data:{deviceId:o}})},selectlist:function(){return(0,u.request)("/api/devicesinfo/selectlist",{method:"GET"})}}},77386:function(z,j,t){var m=t(97857),p=t.n(m),u=t(56002);j.Z={Add:function(o){return(0,u.request)("/api/deviceProduct/add",{method:"POST",data:p()({},o)})},Del:function(o){return(0,u.request)("/api/deviceProduct/del",{method:"POST",data:p()({},o)})},Update:function(o){return(0,u.request)("/api/deviceProduct/update",{method:"POST",data:p()({},o)})},Detail:function(o){return(0,u.request)("/api/deviceProduct/detail?id=".concat(o),{method:"GET"})},List:function(o){return(0,u.request)("/api/deviceProduct/list",{method:"POST",data:p()({},o)})},PagedList:function(o){return(0,u.request)("/api/deviceProduct/pagedlist",{method:"POST",data:p()({},o)})},SelectList:function(){return(0,u.request)("/api/deviceProduct/selectlist",{method:"GET"})}}},99260:function(z,j,t){t.r(j);var m=t(15009),p=t.n(m),u=t(99289),_=t.n(u),o=t(5574),y=t.n(o),H=t(83145),G=t(32808),b=t(8232),I=t(14726),V=t(86738),M=t(45360),J=t(85576),$=t(66309),Z=t(49978),R=t(34041),B=t(67294),L=t(37387),Y=t(77386),re=t(27484),N=t.n(re),n=t(85893),X=G.default;j.default=function(){var Q=b.Z.useForm(),w=y()(Q,1),A=w[0],k=(0,B.useState)(),K=y()(k,2),ne=K[0],W=K[1],q=(0,B.useState)(!1),e=y()(q,2),s=e[0],i=e[1],r=(0,B.useState)([]),a=y()(r,2),E=a[0],C=a[1],P=(0,B.useRef)(),T=[{title:"id",dataIndex:"id",tooltip:"\u89C4\u5219\u540D\u79F0\u662F\u552F\u4E00\u7684 key",hideInSearch:!0,hideInTable:!0},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"name",ellipsis:!0},{title:"\u8BBE\u5907\u7F16\u53F7",dataIndex:"code",ellipsis:!0},{title:"\u8BBE\u5907\u63CF\u8FF0",dataIndex:"describe",ellipsis:!0,hideInSearch:!0},{title:"\u8BBE\u5907\u7C7B\u578B",dataIndex:"deviceType",ellipsis:!0,hideInSearch:!0,render:function(v,c,g,h,f){var l;return(0,n.jsx)(n.Fragment,{children:(l=E.find(function(O){return O.key==c.deviceType}))===null||l===void 0?void 0:l.value})}},{title:"\u8BBE\u5907\u7EF4\u4FDD\u65E5\u671F",dataIndex:"repairDate",ellipsis:!0,hideInSearch:!0,render:function(v,c){return(0,n.jsx)(n.Fragment,{children:N()(c.repairDate).format("YYYY-MM-DD")})}},{title:"\u64CD\u4F5C",valueType:"option",key:"option",fixed:"right",render:function(v,c){return[(0,n.jsx)(I.ZP,{type:"primary",size:"small",onClick:_()(p()().mark(function g(){var h;return p()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:i(!0),W("\u7F16\u8F91\u4FE1\u606F"),h=JSON.parse(JSON.stringify(c)),h.repairDate=N()(c.repairDate),console.log("record",c),A.setFieldsValue(h);case 6:case"end":return l.stop()}},g)})),children:"\u7F16\u8F91"},"edit"),(0,n.jsx)(V.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var h={id:c.id};L.Z.Del(h).then(function(f){if(f.statusCode===200){var l,O;M.ZP.success(f.statusCode===200?"\u5220\u9664\u6210\u529F":f.message),(l=P.current)===null||l===void 0||(O=l.reloadAndRest)===null||O===void 0||O.call(l)}})},onCancel:function(){M.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,n.jsx)(I.ZP,{type:"primary",size:"small",danger:!0,children:"\u5220\u9664"})},"del")]}}];(0,B.useEffect)(function(){Y.Z.SelectList().then(function(d){d.statusCode===200&&C(d.data)})},[]);var x=function(){var d=_()(p()().mark(function v(c){var g,h,f,l;return p()().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:if(!c.id){D.next=7;break}return D.next=3,L.Z.Update(c);case 3:g=D.sent,g.statusCode===200?(M.ZP.success("\u4FEE\u6539\u6210\u529F"),(h=P.current)===null||h===void 0||h.reload(),i(!1)):M.ZP.error(JSON.stringify(g.errors)||"\u4FEE\u6539\u5931\u8D25"),D.next=12;break;case 7:return D.next=9,L.Z.Add(c);case 9:f=D.sent,console.log("response",f),f.statusCode===200?(M.ZP.success("\u6DFB\u52A0\u6210\u529F"),(l=P.current)===null||l===void 0||l.reload(),i(!1)):M.ZP.error(JSON.stringify(f.errors)||"\u6DFB\u52A0\u5931\u8D25");case 12:case"end":return D.stop()}},v)}));return function(c){return d.apply(this,arguments)}}();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(H.Z,{columns:T,actionRef:P,cardBordered:!0,bordered:!0,rowClassName:function(v,c,g){return c%2===0?"":"even-row-background"},request:_()(p()().mark(function d(){var v,c,g,h=arguments;return p()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return v=h.length>0&&h[0]!==void 0?h[0]:{},c={pageIndex:v.current||1,pageSize:v.pageSize||10,name:v.name||"",code:v.code},l.next=4,L.Z.PagedList(c);case 4:if(g=l.sent,g.statusCode!==200){l.next=9;break}return l.abrupt("return",{data:g.data.items,success:!0,total:g.data.total});case 9:return l.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return l.stop()}},d)})),rowKey:"id",pagination:{pageSize:10,showSizeChanger:!1},dateFormatter:"string",headerTitle:"\u8BBE\u5907\u5217\u8868",toolBarRender:function(){return[(0,n.jsx)(I.ZP,{type:"primary",onClick:function(){A.resetFields(),i(!0),W("\u65B0\u589E\u4FE1\u606F")},children:"\u65B0\u5EFA\u8BBE\u5907"},"button")]}},"myTable"),(0,n.jsx)(J.Z,{maskClosable:!1,width:800,title:(0,n.jsx)($.Z,{color:"#cd201f",children:ne}),open:s,onCancel:function(){i(!1)},footer:[(0,n.jsx)(I.ZP,{onClick:function(){i(!1)},children:"\u8FD4\u56DE"},"back"),(0,n.jsx)(I.ZP,{form:"deviceInfoForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,n.jsxs)(b.Z,{form:A,name:"basic",id:"deviceInfoForm",onFinish:x,autoComplete:"off",children:[(0,n.jsx)(b.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,n.jsx)(Z.Z,{})}),(0,n.jsx)(b.Z.Item,{label:"\u8BBE\u5907\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,n.jsx)(Z.Z,{})}),(0,n.jsx)(b.Z.Item,{label:"\u8BBE\u5907\u7F16\u53F7",name:"code",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,n.jsx)(Z.Z,{})}),(0,n.jsx)(b.Z.Item,{label:"\u8BBE\u5907\u63CF\u8FF0",name:"describe",children:(0,n.jsx)(Z.Z,{})}),(0,n.jsx)(b.Z.Item,{label:"\u8BBE\u5907\u7C7B\u578B",name:"deviceType",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,n.jsx)(R.Z,{placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907\u7C7B\u578B",style:{width:375},children:E.map(function(d){return(0,n.jsx)(R.Z.Option,{value:d.key,children:(0,n.jsx)("span",{children:d.value})},d.key)})})}),(0,n.jsx)(b.Z.Item,{label:"\u8BBE\u5907\u7EF4\u4FDD\u65E5\u671F",name:"repairDate",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,n.jsx)(X,{})})]})},"01")]})}},66309:function(z,j,t){t.d(j,{Z:function(){return q}});var m=t(67294),p=t(93967),u=t.n(p),_=t(98423),o=t(98787),y=t(69760),H=t(96159),G=t(45353),b=t(53124),I=t(85088),V=t(10274),M=t(14747),J=t(45503),$=t(27036);const Z=e=>{const{paddingXXS:s,lineWidth:i,tagPaddingHorizontal:r,componentCls:a,calc:E}=e,C=E(r).sub(i).equal(),P=E(s).sub(i).equal();return{[a]:Object.assign(Object.assign({},(0,M.Wf)(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:C,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${(0,I.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:P,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:C}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},R=e=>{const{lineWidth:s,fontSizeIcon:i,calc:r}=e,a=e.fontSizeSM;return(0,J.TS)(e,{tagFontSize:a,tagLineHeight:(0,I.bf)(r(e.lineHeightSM).mul(a).equal()),tagIconSize:r(i).sub(r(s).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},B=e=>({defaultBg:new V.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var L=(0,$.I$)("Tag",e=>{const s=R(e);return Z(s)},B),Y=function(e,s){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&s.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)s.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(i[r[a]]=e[r[a]]);return i},N=m.forwardRef((e,s)=>{const{prefixCls:i,style:r,className:a,checked:E,onChange:C,onClick:P}=e,T=Y(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:x,tag:d}=m.useContext(b.E_),v=O=>{C==null||C(!E),P==null||P(O)},c=x("tag",i),[g,h,f]=L(c),l=u()(c,`${c}-checkable`,{[`${c}-checkable-checked`]:E},d==null?void 0:d.className,a,h,f);return g(m.createElement("span",Object.assign({},T,{ref:s,style:Object.assign(Object.assign({},r),d==null?void 0:d.style),className:l,onClick:v})))}),n=t(98719);const X=e=>(0,n.Z)(e,(s,i)=>{let{textColor:r,lightBorderColor:a,lightColor:E,darkColor:C}=i;return{[`${e.componentCls}${e.componentCls}-${s}`]:{color:r,background:E,borderColor:a,"&-inverse":{color:e.colorTextLightSolid,background:C,borderColor:C},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var Q=(0,$.bk)(["Tag","preset"],e=>{const s=R(e);return X(s)},B);function w(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const A=(e,s,i)=>{const r=w(i);return{[`${e.componentCls}${e.componentCls}-${s}`]:{color:e[`color${i}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var k=(0,$.bk)(["Tag","status"],e=>{const s=R(e);return[A(s,"success","Success"),A(s,"processing","Info"),A(s,"error","Error"),A(s,"warning","Warning")]},B),K=function(e,s){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&s.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)s.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(i[r[a]]=e[r[a]]);return i};const W=m.forwardRef((e,s)=>{const{prefixCls:i,className:r,rootClassName:a,style:E,children:C,icon:P,color:T,onClose:x,bordered:d=!0,visible:v}=e,c=K(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:g,direction:h,tag:f}=m.useContext(b.E_),[l,O]=m.useState(!0),D=(0,_.Z)(c,["closeIcon","closable"]);m.useEffect(()=>{v!==void 0&&O(v)},[v]);const ae=(0,o.o2)(T),oe=(0,o.yT)(T),ee=ae||oe,ce=Object.assign(Object.assign({backgroundColor:T&&!ee?T:void 0},f==null?void 0:f.style),E),S=g("tag",i),[ue,_e,me]=L(S),fe=u()(S,f==null?void 0:f.className,{[`${S}-${T}`]:ee,[`${S}-has-color`]:T&&!ee,[`${S}-hidden`]:!l,[`${S}-rtl`]:h==="rtl",[`${S}-borderless`]:!d},r,a,_e,me),se=U=>{U.stopPropagation(),x==null||x(U),!U.defaultPrevented&&O(!1)},[,pe]=(0,y.Z)((0,y.w)(e),(0,y.w)(f),{closable:!1,closeIconRender:U=>{const he=m.createElement("span",{className:`${S}-close-icon`,onClick:se},U);return(0,H.wm)(U,he,F=>({onClick:de=>{var te;(te=F==null?void 0:F.onClick)===null||te===void 0||te.call(F,de),se(de)},className:u()(F==null?void 0:F.className,`${S}-close-icon`)}))}}),ve=typeof c.onClick=="function"||C&&C.type==="a",le=P||null,ge=le?m.createElement(m.Fragment,null,le,C&&m.createElement("span",null,C)):C,ie=m.createElement("span",Object.assign({},D,{ref:s,className:fe,style:ce}),ge,pe,ae&&m.createElement(Q,{key:"preset",prefixCls:S}),oe&&m.createElement(k,{key:"status",prefixCls:S}));return ue(ve?m.createElement(G.Z,{component:"Tag"},ie):ie)});W.CheckableTag=N;var q=W}}]);