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 line
5.9KB

  1. var K=Object.defineProperty,Q=Object.defineProperties;var Y=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var Z=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable;var O=(d,t,a)=>t in d?K(d,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):d[t]=a,w=(d,t)=>{for(var a in t||(t={}))Z.call(t,a)&&O(d,a,t[a]);if($)for(var a of $(t))ee.call(t,a)&&O(d,a,t[a]);return d},k=(d,t)=>Q(d,Y(t));var m=(d,t,a)=>new Promise((I,f)=>{var T=n=>{try{_(a.next(n))}catch(v){f(v)}},y=n=>{try{_(a.throw(n))}catch(v){f(v)}},_=n=>n.done?I(n.value):Promise.resolve(n.value).then(T,y);_((a=a.apply(d,t)).next())});import{d as te,G as ae,D as oe,A as le,r as u,b as se,a3 as V,o as ne,c as i,e as h,f as C,h as r,i as c,g as x,j as D,k as E,t as L,X as re,x as ce}from"./index.3fb2f955.js";import{a as de,e as ie,f as pe,g as ue}from"./flowConfiguration.65ccb757.js";import{d as me,p as _e}from"./flowPathConfiguration.5f31c0fc.js";const fe={class:"flex justify-between items-center"},ve=x("span",null,"\u6D41\u7A0B\u5217\u8868",-1),ye=["onClick"],be=["onClick"],ge=["onClick"],we=["onClick"],ke=te({name:"flowPathConfiguration"}),Re=Object.assign(ke,{setup(d){const{proxy:t}=ce(),a=ae(oe.userStore).userInfo||{},I=le(),f=u(),T=se([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u6D41\u7A0B\u540D\u79F0",key:"processDefName",prop:"processDefName",minWidth:"200"},{label:"\u6D41\u7A0B\u7C7B\u578B",key:"type",width:"140",render:e=>V("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=>[V("span",{class:["dot mr-4",`${e.isStop?"bg-danger":"bg-success"}`]}),V("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:"270"}]),y=u([]),_=u(0),n=(...o)=>m(this,[...o],function*(e=f.value.pageParams){const p=yield de(k(w({},e),{orgCode:a.value.empPosUnitCode}));_.value=p.data.total,y.value=p.data.records}),v=e=>{I.push({name:"unitConfigEdit",query:{processDefId:e.processDefId}})},U=e=>{t.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u6D41\u7A0B?","\u63D0\u793A\uFF01",{type:"warning"}).then(()=>m(this,null,function*(){yield me({processDefId:e.processDefId}),t.$message.success("\u5220\u9664\u6210\u529F\uFF01"),n()}))},H=e=>{const o=e.isStop?"\u542F\u7528":"\u7981\u7528";t.$messageBox.confirm(`\u662F\u5426${o}\u8BE5\u6D41\u7A0B?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>m(this,null,function*(){o==="\u542F\u7528"?yield ie({processDefId:e.processDefId}):yield pe({processDefId:e.processDefId}),t.$message.success(`${o}\u6210\u529F\uFF01`),n()}))},b=u(!1),S=u(),N=e=>m(this,null,function*(){if(b.value=!0,S.value=e?"\u7F16\u8F91\u4FE1\u606F":"\u65B0\u589E\u6D41\u7A0B",e&&e.processDefId){const o=yield _e({processDefId:e.processDefId});s.value=k(w({},o.data),{isEnable:!o.data.isStop})}else s.value={isEnable:!0,type:"OTHER"}}),R=u(),he=u({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"}]},s=u({type:"OTHER"}),A=e=>m(this,null,function*(){!e||(yield e.validate(o=>m(this,null,function*(){if(o){const p=k(w({},s.value),{process:s.value.process?JSON.parse(s.value.process):void 0,orgCode:a.value.empPosUnitCode,isStop:!s.value.isEnable});yield ue(p),t.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),n(),b.value=!1,s.value={type:"OTHER"}}})))}),B=()=>{b.value=!1};return ne(()=>{n()}),(e,o)=>{const p=i("el-button"),P=i("table-list"),J=i("el-card"),q=i("el-input"),F=i("el-form-item"),M=i("el-col"),Ce=i("el-radio"),De=i("el-radio-group"),W=i("el-row"),z=i("el-switch"),G=i("el-form"),X=i("el-dialog");return h(),C("div",null,[r(J,{shadow:"never"},{header:c(()=>[x("div",fe,[ve,r(p,{type:"primary",icon:"Plus",size:"small",onClick:o[0]||(o[0]=()=>N())},{default:c(()=>[D("\u589E\u52A0\u6D41\u7A0B")]),_:1})])]),default:c(()=>[r(P,{ref_key:"tableListRef",ref:f,column:T,data:y.value,total:_.value,onGetTableData:n},{action:c(({scope:l})=>[l.row.type==="OTHER"?(h(),C("a",{key:0,onClick:g=>N(l.row)},"\u7F16\u8F91\u4FE1\u606F",8,ye)):E("",!0),x("a",{onClick:g=>v(l.row)},"\u7F16\u8F91\u6D41\u7A0B",8,be),l.row.type==="OTHER"?(h(),C("a",{key:1,onClick:g=>H(l.row)},L(l.row.isStop?"\u542F\u7528":"\u7981\u7528"),9,ge)):E("",!0),l.row.type==="OTHER"?(h(),C("a",{key:2,class:"text-danger",onClick:g=>U(l.row)},"\u5220\u9664",8,we)):E("",!0)]),_:1},8,["column","data","total"])]),_:1}),r(X,{"model-value":b.value,title:S.value,width:"600px",onClose:B},{footer:c(()=>[r(p,{type:"primary",onClick:o[4]||(o[4]=l=>A(R.value))},{default:c(()=>[D(" \u63D0\u4EA4 ")]),_:1}),r(p,{onClick:B},{default:c(()=>[D(" \u5173\u95ED ")]),_:1})]),default:c(()=>[r(G,{ref_key:"addFormRef",ref:R,model:s.value,rules:j,"label-width":"90px","label-suffix":":"},{default:c(()=>[r(W,null,{default:c(()=>[r(M,{span:24},{default:c(()=>[r(F,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"processDefName"},{default:c(()=>[r(q,{modelValue:s.value.processDefName,"onUpdate:modelValue":o[1]||(o[1]=l=>s.value.processDefName=l),placeholder:"\u8BF7\u586B\u5199 "},null,8,["modelValue"])]),_:1})]),_:1}),E("",!0)]),_:1}),r(F,{label:"\u72B6\u6001",prop:"isEnable"},{default:c(()=>[r(z,{modelValue:s.value.isEnable,"onUpdate:modelValue":o[3]||(o[3]=l=>s.value.isEnable=l),style:{"--el-switch-on-color":"#4ecb74","--el-switch-off-color":"#ff3b30"}},null,8,["modelValue"]),D("\xA0 "),x("span",{style:re({color:s.value.isEnable?"#4ECB74":"#FF3B30"})},L(s.value.isEnable?"\u5DF2\u542F\u7528":"\u5DF2\u7981\u7528"),5)]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])])}}});export{Re as default};