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.

2 lines
6.2KB

  1. var Z=Object.defineProperty,ee=Object.defineProperties;var ae=Object.getOwnPropertyDescriptors;var T=Object.getOwnPropertySymbols;var te=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable;var B=(d,a,o)=>a in d?Z(d,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):d[a]=o,C=(d,a)=>{for(var o in a||(a={}))te.call(a,o)&&B(d,o,a[o]);if(T)for(var o of T(a))oe.call(a,o)&&B(d,o,a[o]);return d},E=(d,a)=>ee(d,ae(a));var f=(d,a,o)=>new Promise((v,g)=>{var x=i=>{try{m(o.next(i))}catch(y){g(y)}},D=i=>{try{m(o.throw(i))}catch(y){g(y)}},m=i=>i.done?v(i.value):Promise.resolve(i.value).then(x,D);m((o=o.apply(d,a)).next())});import{_ as le,d as se,A as ne,z as re,r as p,b as ie,a3 as I,o as de,c,e as S,f as U,i as s,j as n,g as b,k as w,t as V,F as q,J as ce,I as ue,X as pe,x as fe}from"./index.5a1f26bc.js";import{a as me,e as _e,f as be,g as ve}from"./flowConfiguration.e42d944e.js";import{d as ge,p as ye}from"./flowPathConfiguration.0114c55e.js";const we={class:"flexRight mb-16"},De=["onClick"],ke=["onClick"],Ce=["onClick"],Ee=["onClick"],xe=se({name:"flowList"}),he=Object.assign(xe,{setup(d){const{proxy:a}=fe(),o=ne(),v=re(),g=p(),x=ie([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u6D41\u7A0B\u540D\u79F0",key:"processDefName",prop:"processDefName"},{label:"\u6D41\u7A0B\u7C7B\u578B",key:"type",width:"200",render:e=>I("span",e.type==="DEFAULT"?"\u9ED8\u8BA4\u6D41\u7A0B":e.type==="SEAL"?"\u76D6\u7AE0\u6D41\u7A0B":e.type==="JOINT_REVIEW"?"\u91CD\u5927\u9879\u76EE\u8054\u5BA1\u6D41\u7A0B":"\u5176\u4ED6\u6D41\u7A0B")},{label:"\u72B6\u6001",key:"isStop",width:"80",render:e=>[I("span",{class:["dot mr-4",`${e.isStop?"bg-danger":"bg-success"}`]}),I("span",{class:e.isStop?"text-danger":"text-success"},e.isStop?"\u7981\u7528":"\u542F\u7528")]},{label:"\u521B\u5EFA\u65F6\u95F4",key:"created",prop:"created",width:"240"},{label:"\u64CD\u4F5C",slot:"action",fixed:"right",width:"300"}]),D=p([]),m=p(0),i=(...t)=>f(this,[...t],function*(e=g.value.pageParams){const u=yield me(E(C({},e),{orgCode:v.query.id}));m.value=u.data.total,D.value=u.data.records}),y=e=>{o.push({name:"unitConfigEdit",query:{processDefId:e.processDefId,orgCode:v.query.id}})},A=e=>{a.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u6D41\u7A0B?","\u63D0\u793A\uFF01",{type:"warning"}).then(()=>f(this,null,function*(){yield ge({processDefId:e.processDefId}),a.$message.success("\u5220\u9664\u6210\u529F\uFF01"),i()}))},M=e=>{const t=e.isStop?"\u542F\u7528":"\u7981\u7528";a.$messageBox.confirm(`\u662F\u5426${t}\u8BE5\u6D41\u7A0B?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>f(this,null,function*(){t==="\u542F\u7528"?yield _e({processDefId:e.processDefId}):yield be({processDefId:e.processDefId}),a.$message.success(`${t}\u6210\u529F\uFF01`),i()}))},k=p(!1),F=p(),N=e=>f(this,null,function*(){if(k.value=!0,F.value=e?"\u7F16\u8F91\u4FE1\u606F":"\u65B0\u589E\u6D41\u7A0B",e&&e.processDefId){const t=yield ye({processDefId:e.processDefId});l.value=E(C({},t.data),{isEnable:!t.data.isStop})}else l.value={isEnable:!0,type:"DEFAULT"}}),$=p(),O=p({DEFAULT:"\u9ED8\u8BA4\u6D41\u7A0B",SEAL:"\u76D6\u7AE0\u6D41\u7A0B",OTHER:"\u5176\u4ED6\u6D41\u7A0B",JOINT_REVIEW:"\u91CD\u5927\u9879\u76EE\u8054\u5BA1\u6D41\u7A0B"}),j={processDefName:[{required:!0,message:"\u8BF7\u586B\u5199\u6D41\u7A0B\u540D\u79F0",trigger:"blur"}],type:[{required:!0,message:"\u8BF7\u9009\u62E9\u6D41\u7A0B\u7C7B\u578B",trigger:"change"}]},l=p({}),J=e=>f(this,null,function*(){!e||(yield e.validate(t=>f(this,null,function*(){if(t){const u=E(C({},l.value),{process:l.value.process?JSON.parse(l.value.process):void 0,orgCode:v.query.id,isStop:!l.value.isEnable,isEnable:void 0});yield ve(u),a.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),i(),k.value=!1,l.value={}}})))}),L=()=>{k.value=!1};return de(()=>{i()}),(e,t)=>{const u=c("el-button"),z=c("table-list"),P=c("el-card"),W=c("el-input"),h=c("el-form-item"),R=c("el-col"),G=c("el-radio"),H=c("el-radio-group"),K=c("el-row"),X=c("el-switch"),Q=c("el-form"),Y=c("el-dialog");return S(),U(q,null,[s(P,{class:"box-card"},{default:n(()=>[b("div",we,[s(u,{type:"primary",icon:"Plus",size:"small",onClick:t[0]||(t[0]=()=>N())},{default:n(()=>[w(" \u589E\u52A0\u6D41\u7A0B ")]),_:1})]),s(z,{ref_key:"tableListRef",ref:g,column:x,data:D.value,total:m.value,onGetTableData:i},{action:n(({scope:r})=>[b("a",{onClick:_=>N(r.row)},"\u7F16\u8F91\u4FE1\u606F",8,De),b("a",{onClick:_=>y(r.row)},"\u7F16\u8F91\u6D41\u7A0B",8,ke),b("a",{onClick:_=>M(r.row)},V(r.row.isStop?"\u542F\u7528":"\u7981\u7528"),9,Ce),b("a",{class:"text-danger",onClick:_=>A(r.row)},"\u5220\u9664",8,Ee)]),_:1},8,["column","data","total"])]),_:1}),s(Y,{"model-value":k.value,title:F.value,width:"600px",onClose:L},{footer:n(()=>[s(u,{type:"primary",onClick:t[4]||(t[4]=r=>J($.value))},{default:n(()=>[w(" \u63D0\u4EA4 ")]),_:1}),s(u,{onClick:L},{default:n(()=>[w(" \u5173\u95ED ")]),_:1})]),default:n(()=>[s(Q,{ref_key:"addFormRef",ref:$,model:l.value,rules:j,"label-width":"90px","label-suffix":":"},{default:n(()=>[s(K,null,{default:n(()=>[s(R,{span:24},{default:n(()=>[s(h,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"processDefName"},{default:n(()=>[s(W,{modelValue:l.value.processDefName,"onUpdate:modelValue":t[1]||(t[1]=r=>l.value.processDefName=r),placeholder:"\u8BF7\u586B\u5199 "},null,8,["modelValue"])]),_:1})]),_:1}),s(R,{span:24},{default:n(()=>[s(h,{label:"\u6D41\u7A0B\u7C7B\u578B",prop:"type"},{default:n(()=>[s(H,{modelValue:l.value.type,"onUpdate:modelValue":t[2]||(t[2]=r=>l.value.type=r)},{default:n(()=>[(S(!0),U(q,null,ce(O.value,(r,_)=>(S(),ue(G,{key:_,label:_},{default:n(()=>[w(V(r),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),s(h,{label:"\u72B6\u6001",prop:"isEnable"},{default:n(()=>[s(X,{modelValue:l.value.isEnable,"onUpdate:modelValue":t[3]||(t[3]=r=>l.value.isEnable=r),style:{"--el-switch-on-color":"#4ecb74","--el-switch-off-color":"#ff3b30"}},null,8,["modelValue"]),w("\xA0 "),b("span",{style:pe({color:l.value.isEnable?"#4ECB74":"#FF3B30"})},V(l.value.isEnable?"\u5DF2\u542F\u7528":"\u5DF2\u7981\u7528"),5)]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])],64)}}}),Ne=le(he,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/systemManage/unitManage/unitConfiguration/components/flowList.vue"]]);export{Ne as default};