集成,总结MES功能
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

2 rindas
15 KiB

  1. "use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[918],{77846:function(_e,H,t){t.d(H,{M:function(){return V},y:function(){return R}});var g=t(97857),p=t.n(g),h=t(56002),R={Add:function(u){return(0,h.request)("/api/dictType/add",{method:"POST",data:p()({},u)})},Del:function(u){return(0,h.request)("/api/dictType/del",{method:"POST",data:p()({},u)})},Update:function(u){return(0,h.request)("/api/dictType/update",{method:"POST",data:p()({},u)})},Detail:function(u){return(0,h.request)("/api/dictType/detail?id=".concat(u),{method:"GET"})},List:function(u){return(0,h.request)("/api/dictType/list",{method:"POST",data:p()({},u)})},PagedList:function(u){return(0,h.request)("/api/dictType/pagedlist",{method:"POST",data:p()({},u)})}},V={Add:function(u){return(0,h.request)("/api/dictData/add",{method:"POST",data:p()({},u)})},Del:function(u){return(0,h.request)("/api/dictData/del",{method:"POST",data:p()({},u)})},Update:function(u){return(0,h.request)("/api/dictData/update",{method:"POST",data:p()({},u)})},Detail:function(u){return(0,h.request)("/api/dictData/detail?id=".concat(u),{method:"GET"})},List:function(u){return(0,h.request)("/api/dictData/list",{method:"POST",data:p()({},u)})},PagedList:function(u){return(0,h.request)("/api/dictData/pagedlist",{method:"POST",data:p()({},u)})}}},7863:function(_e,H,t){t.r(H);var g=t(15009),p=t.n(g),h=t(99289),R=t.n(h),V=t(5574),f=t.n(V),u=t(51042),re=t(83145),x=t(8232),ne=t(42075),ae=t(86738),b=t(45360),$=t(14726),w=t(85576),ue=t(66309),B=t(49978),E=t(67294),y=t(77846),a=t(85893);H.default=function(){var he=(0,E.useState)("table"),oe=f()(he,2),k=oe[0],N=oe[1],G=(0,E.useRef)(),se=(0,E.useRef)(),J=(0,E.useState)(),le=f()(J,2),q=le[0],ce=le[1],A=(0,E.useRef)(),fe=(0,E.useState)(),e=f()(fe,2),d=e[0],m=e[1],r=(0,E.useState)([]),s=f()(r,2),T=s[0],C=s[1],F=(0,E.useState)(!1),D=f()(F,2),U=D[0],O=D[1],W=(0,E.useState)(),M=f()(W,2),X=M[0],ee=M[1],I=(0,E.useState)(!1),Q=f()(I,2),Y=Q[0],L=Q[1],ie=x.Z.useForm(),de=f()(ie,1),Z=de[0],te=function(){var n,o;(n=G.current)===null||n===void 0||n.resetFields(),(o=se.current)===null||o===void 0||o.reload()},S=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInForm:!0,search:!1},{title:"\u540D\u79F0",dataIndex:"name",ellipsis:!0},{title:"\u7F16\u7801",hideInDescriptions:!0,dataIndex:"code",copyable:!0},{title:"\u6392\u5E8F",dataIndex:"sort",ellipsis:!0,hideInTable:!0,search:!1},{title:"\u64CD\u4F5C",valueType:"option",fixed:"right",render:function(n,o){return[(0,a.jsxs)(ne.Z,{children:[(0,a.jsx)("a",{onClick:function(){var l;ce(o),N("form"),(l=G.current)===null||l===void 0||l.setFieldsValue(o)},target:"_blank",rel:"noopener noreferrer",children:"\u7F16\u8F91"},+new Date+Math.random()),(0,a.jsx)("a",{onClick:R()(p()().mark(function c(){var l,P,i;return p()().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return ee(o),P={pageIndex:1,pageSize:10,name:"",typeId:o.id},console.log(o.id),v.next=5,y.M.PagedList(P);case 5:if(i=v.sent,i.statusCode!==200){v.next=10;break}C(i.data.items),v.next=11;break;case 10:return v.abrupt("return",{data:[],success:!1,total:0});case 11:O(!0),(l=A.current)===null||l===void 0||l.reload();case 13:case"end":return v.stop()}},c)})),target:"_blank",rel:"noopener noreferrer",children:"\u8BBE\u7F6E\u5B50\u9879"},+new Date+Math.random()),(0,a.jsx)(ae.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){y.y.Del(o).then(function(l){l.statusCode===200?(b.ZP.info("\u5220\u9664\u6210\u529F!"),te()):b.ZP.error(l.errors)})},onCancel:function(){b.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,a.jsx)("a",{children:"\u5220\u9664"})},"del")]},+new Date+Math.random())]}}],me=[{title:"\u4E3B\u952E",dataIndex:"id",hideInTable:!0,hideInForm:!0,search:!0},{title:"\u5916\u952Eid",dataIndex:"typeId",ellipsis:!0,hindeInForm:!0,search:!1,hideInTable:!0},{title:"\u7F16\u7801",hideInDescriptions:!0,dataIndex:"code",copyable:!0},{title:"\u72B6\u6001",hideInDescriptions:!0,dataIndex:"value",search:!1},{title:"\u6392\u5E8F",dataIndex:"sort",ellipsis:!0,search:!1},{title:"\u64CD\u4F5C",valueType:"option",dataIndex:"id",render:function(n,o){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($.ZP,{type:"primary",ghost:!0,className:"btn1",onClick:function(){m("\u7F16\u8F91\u5B50\u9879");var l=JSON.parse(JSON.stringify(o));console.log(l),l.state=l.state==="0",Z.setFieldsValue(l),L(!0)},children:"\u7F16\u8F91"},"edit"),(0,a.jsx)(ae.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u6761\u6570\u636E\u5417\uFF1F",onConfirm:function(){var l={id:o.id};y.M.Del(l).then(function(P){if(P.statusCode===200){var i;b.ZP.success(P.statusCode===200?"\u5220\u9664\u6210\u529F":P.message),(i=A.current)===null||i===void 0||i.reload()}})},onCancel:function(){b.ZP.info("\u5DF2\u53D6\u6D88\u5220\u9664")},okText:"\u786E\u8BA4",cancelText:"\u5173\u95ED",children:(0,a.jsx)($.ZP,{type:"primary",danger:!0,ghost:!0,className:"btn3",children:"\u5220\u9664"})},"del")]})}}],pe=function(){var _=R()(p()().mark(function n(o){var c,l,P,i,K;return p()().wrap(function(j){for(;;)switch(j.prev=j.next){case 0:if(!o.id){j.next=7;break}return j.next=3,y.M.Update(o);case 3:c=j.sent,c.statusCode===200?(b.ZP.success("\u4FEE\u6539\u6210\u529F"),(l=A.current)===null||l===void 0||l.reload(),L(!1)):b.ZP.error(JSON.stringify(c.errors)||"\u4FEE\u6539\u5931\u8D25"),j.next=13;break;case 7:return j.next=9,y.M.Add(o);case 9:i=j.sent,(P=A.current)===null||P===void 0||P.reload(),console.log("response",i),i.statusCode===200?((K=A.current)===null||K===void 0||K.reload(),b.ZP.success("\u6DFB\u52A0\u6210\u529F"),L(!1)):b.ZP.error(JSON.stringify(i.errors)||"\u6DFB\u52A0\u5931\u8D25");case 13:case"end":return j.stop()}},n)}));return function(o){return _.apply(this,arguments)}}();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(re.Z,{columns:S,cardBordered:!0,bordered:!0,scroll:{x:!0},rowClassName:function(n,o,c){return o%2===0?"":"even-row-background"},type:k,formRef:G,actionRef:se,form:{ignoreRules:!0,submitter:{onReset:function(){var n;(n=G.current)===null||n===void 0||n.resetFields(),N("table")},searchConfig:{resetText:k==="form"?"\u8FD4\u56DE":"\u91CD\u7F6E",submitText:k==="form"?"\u63D0\u4EA4":"\u67E5\u8BE2"}}},onSubmit:function(n){console.log(n),n.id=q==null?void 0:q.id,k==="form"&&(n.id?y.y.Update(n).then(function(o){o.statusCode===200?(b.ZP.info("\u66F4\u65B0\u6210\u529F!"),N("table"),te()):b.ZP.error(o.errors)}):y.y.Add(n).then(function(o){o.statusCode===200?(b.ZP.info("\u65B0\u589E\u6210\u529F!"),N("table"),te()):b.ZP.error(o.errors)}))},request:R()(p()().mark(function _(){var n,o,c,l=arguments;return p()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=l.length>0&&l[0]!==void 0?l[0]:{},o={pageIndex:n.current||1,pageSize:n.pageSize||10,name:n.name||"",code:n.code||""},i.next=4,y.y.PagedList(o);case 4:if(c=i.sent,c.statusCode!==200){i.next=9;break}return i.abrupt("return",{data:c.data.items,success:!0,total:c.data.total});case 9:return i.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return i.stop()}},_)})),pagination:{pageSize:10,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:function(){return[(0,a.jsxs)($.ZP,{type:"primary",onClick:function(){N("form"),ce(void 0)},children:[(0,a.jsx)(u.Z,{}),"\u65B0\u5EFA"]},"3")]}}),(0,a.jsx)(w.Z,{maskClosable:!1,title:"\u8BBE\u7F6E\u5B50\u9879",open:U,footer:!1,onCancel:function(){O(!1)},width:1e3,children:(0,a.jsx)(re.Z,{search:!1,dataSource:T,actionRef:A,request:R()(p()().mark(function _(){var n,o,c,l=arguments;return p()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return n=l.length>0&&l[0]!==void 0?l[0]:{},o={pageIndex:n.current||1,pageSize:n.pageSize||10,name:n.name||"",typeId:X.id},i.next=4,y.M.PagedList(o);case 4:return c=i.sent,console.log(c),c.statusCode===200&&C(c.data.items),i.abrupt("return",{data:c.data.items,success:!0,total:c.data.total});case 8:case"end":return i.stop()}},_)})),onChange:function(n){console.log(n)},pagination:{pageSize:5,showSizeChanger:!1},rowKey:"id",dateFormatter:"string",headerTitle:"\u5B50\u9879\u5217\u8868",columns:me,toolBarRender:function(){return[(0,a.jsx)($.ZP,{type:"primary",onClick:function(){Z.resetFields(),L(!0),m("\u65B0\u589E\u5B50\u9879"),Z.setFieldsValue({typeId:X.id})},children:"\u65B0\u589E\u5B50\u9879"},"button")]}})}),(0,a.jsx)(w.Z,{maskClosable:!1,title:(0,a.jsx)(ue.Z,{color:"#cd201f",children:d}),open:Y,onCancel:function(){L(!1)},footer:[(0,a.jsx)($.ZP,{onClick:function(){L(!1)},children:"\u8FD4\u56DE"},"back"),(0,a.jsx)($.ZP,{form:"itemForm",type:"primary",htmlType:"submit",children:"\u63D0\u4EA4"},"submit")],children:(0,a.jsxs)(x.Z,{form:Z,name:"basic",id:"itemForm",wrapperCol:{span:12},onFinish:pe,autoComplete:"off",children:[(0,a.jsx)(x.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,a.jsx)(B.Z,{})}),(0,a.jsx)(x.Z.Item,{label:"\u5916\u952Eid",name:"typeId",hidden:!0,children:(0,a.jsx)(B.Z,{})}),(0,a.jsx)(x.Z.Item,{label:"\u540D\u79F0",name:"value",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,a.jsx)(B.Z,{})}),(0,a.jsx)(x.Z.Item,{label:"\u7F16\u7801",name:"code",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,a.jsx)(B.Z,{})}),(0,a.jsx)(x.Z.Item,{label:"\u6392\u5E8F",name:"sort",rules:[{required:!0,message:"\u6B64\u9879\u4E3A\u5FC5\u586B\u9879!"}],children:(0,a.jsx)(B.Z,{})})]})})]})}},66309:function(_e,H,t){t.d(H,{Z:function(){return fe}});var g=t(67294),p=t(93967),h=t.n(p),R=t(98423),V=t(98787),f=t(69760),u=t(96159),re=t(45353),x=t(53124),ne=t(85088),ae=t(10274),b=t(14747),$=t(45503),w=t(27036);const ue=e=>{const{paddingXXS:d,lineWidth:m,tagPaddingHorizontal:r,componentCls:s,calc:T}=e,C=T(r).sub(m).equal(),F=T(d).sub(m).equal();return{[s]:Object.assign(Object.assign({},(0,b.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,ne.bf)(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${s}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${s}-close-icon`]:{marginInlineStart:F,fontSize:e.tagIconSize,color:e.colorTextDescription,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${s}-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(${s}-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}}),[`${s}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},B=e=>{const{lineWidth:d,fontSizeIcon:m,calc:r}=e,s=e.fontSizeSM;return(0,$.TS)(e,{tagFontSize:s,tagLineHeight:(0,ne.bf)(r(e.lineHeightSM).mul(s).equal()),tagIconSize:r(m).sub(r(d).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},E=e=>({defaultBg:new ae.C(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText});var y=(0,w.I$)("Tag",e=>{const d=B(e);return ue(d)},E),a=function(e,d){var m={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&d.indexOf(r)<0&&(m[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)d.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(m[r[s]]=e[r[s]]);return m},oe=g.forwardRef((e,d)=>{const{prefixCls:m,style:r,className:s,checked:T,onChange:C,onClick:F}=e,D=a(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:U,tag:O}=g.useContext(x.E_),W=Y=>{C==null||C(!T),F==null||F(Y)},M=U("tag",m),[X,ee,I]=y(M),Q=h()(M,`${M}-checkable`,{[`${M}-checkable-checked`]:T},O==null?void 0:O.className,s,ee,I);return X(g.createElement("span",Object.assign({},D,{ref:d,style:Object.assign(Object.assign({},r),O==null?void 0:O.style),className:Q,onClick:W})))}),k=t(98719);const N=e=>(0,k.Z)(e,(d,m)=>{let{textColor:r,lightBorderColor:s,lightColor:T,darkColor:C}=m;return{[`${e.componentCls}${e.componentCls}-${d}`]:{color:r,background:T,borderColor:s,"&-inverse":{color:e.colorTextLightSolid,background:C,borderColor:C},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}});var G=(0,w.bk)(["Tag","preset"],e=>{const d=B(e);return N(d)},E);function se(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const J=(e,d,m)=>{const r=se(m);return{[`${e.componentCls}${e.componentCls}-${d}`]:{color:e[`color${m}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}};var le=(0,w.bk)(["Tag","status"],e=>{const d=B(e);return[J(d,"success","Success"),J(d,"processing","Info"),J(d,"error","Error"),J(d,"warning","Warning")]},E),q=function(e,d){var m={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&d.indexOf(r)<0&&(m[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,r=Object.getOwnPropertySymbols(e);s<r.length;s++)d.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(m[r[s]]=e[r[s]]);return m};const A=g.forwardRef((e,d)=>{const{prefixCls:m,className:r,rootClassName:s,style:T,children:C,icon:F,color:D,onClose:U,bordered:O=!0,visible:W}=e,M=q(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:X,direction:ee,tag:I}=g.useContext(x.E_),[Q,Y]=g.useState(!0),L=(0,R.Z)(M,["closeIcon","closable"]);g.useEffect(()=>{W!==void 0&&Y(W)},[W]);const ie=(0,V.o2)(D),de=(0,V.yT)(D),Z=ie||de,te=Object.assign(Object.assign({backgroundColor:D&&!Z?D:void 0},I==null?void 0:I.style),T),S=X("tag",m),[me,pe,_]=y(S),n=h()(S,I==null?void 0:I.className,{[`${S}-${D}`]:Z,[`${S}-has-color`]:D&&!Z,[`${S}-hidden`]:!Q,[`${S}-rtl`]:ee==="rtl",[`${S}-borderless`]:!O},r,s,pe,_),o=v=>{v.stopPropagation(),U==null||U(v),!v.defaultPrevented&&Y(!1)},[,c]=(0,f.Z)((0,f.w)(e),(0,f.w)(I),{closable:!1,closeIconRender:v=>{const j=g.createElement("span",{className:`${S}-close-icon`,onClick:o},v);return(0,u.wm)(v,j,z=>({onClick:Ce=>{var ge;(ge=z==null?void 0:z.onClick)===null||ge===void 0||ge.call(z,Ce),o(Ce)},className:h()(z==null?void 0:z.className,`${S}-close-icon`)}))}}),l=typeof M.onClick=="function"||C&&C.type==="a",P=F||null,i=P?g.createElement(g.Fragment,null,P,C&&g.createElement("span",null,C)):C,K=g.createElement("span",Object.assign({},L,{ref:d,className:n,style:te}),i,c,ie&&g.createElement(G,{key:"preset",prefixCls:S}),de&&g.createElement(le,{key:"status",prefixCls:S}));return me(l?g.createElement(re.Z,{component:"Tag"},K):K)});A.CheckableTag=oe;var fe=A}}]);