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
5.2KB

  1. import{d as J,C as M,B as W,y as z,r,b as G,Z as b,o as Z,c as n,e as m,f,h as l,i as s,g as _,j as y,k as v,t as T,R as K,q as Q}from"./index.a2494fc2.js";import{a as X,e as Y,f as ee,g as te}from"./flowConfiguration.5f822768.js";import{d as oe,p as ae}from"./flowPathConfiguration.d53d54f0.js";const le={class:"flex justify-between items-center"},se=["onClick"],ne=["onClick"],re=["onClick"],de=["onClick"],ie=J({name:"flowPathConfiguration"}),we=Object.assign(ie,{setup(pe){const{proxy:d}=Q(),g=M(W.userStore).userInfo||{},V=z(),w=r(),R=G([{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:t=>b("span",t.type==="DEFAULT"?"\u9ED8\u8BA4\u6D41\u7A0B":t.type==="SEAL"?"\u76D6\u7AE0\u6D41\u7A0B":t.type==="JOINT_REVIEW"?"\u91CD\u5927\u9879\u76EE\u8054\u5BA1\u6D41\u7A0B":"\u5176\u4ED6\u6D41\u7A0B")},{label:"\u72B6\u6001",key:"isStop",width:"80",render:t=>[b("span",{class:["dot mr-4",`${t.isStop?"bg-danger":"bg-success"}`]}),b("span",{class:t.isStop?"text-danger":"text-success"},t.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"}]),k=r([]),C=r(0),i=async(t=w.value.pageParams)=>{const e=await X({...t,orgCode:g.value.empPosUnitCode});C.value=e.data.total,k.value=e.data.records},S=t=>{V.push({name:"unitConfigEdit",query:{processDefId:t.processDefId}})},B=t=>{d.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u6D41\u7A0B?","\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await oe({processDefId:t.processDefId}),d.$message.success("\u5220\u9664\u6210\u529F\uFF01"),i()})},N=t=>{const e=t.isStop?"\u542F\u7528":"\u7981\u7528";d.$messageBox.confirm(`\u662F\u5426${e}\u8BE5\u6D41\u7A0B?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{e==="\u542F\u7528"?await Y({processDefId:t.processDefId}):await ee({processDefId:t.processDefId}),d.$message.success(`${e}\u6210\u529F\uFF01`),i()})},u=r(!1),E=r(),D=async t=>{if(u.value=!0,E.value=t?"\u7F16\u8F91\u4FE1\u606F":"\u65B0\u589E\u6D41\u7A0B",t&&t.processDefId){const e=await ae({processDefId:t.processDefId});a.value={...e.data,isEnable:!e.data.isStop}}else a.value={isEnable:!0,type:"OTHER"}},x=r(),ue=r({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"}),F={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"}]},a=r({type:"OTHER"}),$=async t=>{!t||await t.validate(async e=>{if(e){const p={...a.value,process:a.value.process?JSON.parse(a.value.process):void 0,orgCode:g.value.empPosUnitCode,isStop:!a.value.isEnable};await te(p),d.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),i(),u.value=!1,a.value={type:"OTHER"}}})},h=()=>{u.value=!1};return Z(()=>{i()}),(t,e)=>{const p=n("el-button"),O=n("table-list"),H=n("el-card"),L=n("el-input"),I=n("el-form-item"),U=n("el-col"),ce=n("el-radio"),me=n("el-radio-group"),j=n("el-row"),P=n("el-switch"),q=n("el-form"),A=n("el-dialog");return m(),f("div",null,[l(H,{shadow:"never"},{header:s(()=>[_("div",le,[e[6]||(e[6]=_("span",null,"\u6D41\u7A0B\u5217\u8868",-1)),l(p,{type:"primary",icon:"Plus",size:"small",onClick:e[0]||(e[0]=()=>D())},{default:s(()=>e[5]||(e[5]=[y("\u589E\u52A0\u6D41\u7A0B")])),_:1})])]),default:s(()=>[l(O,{ref_key:"tableListRef",ref:w,column:R,data:k.value,total:C.value,onGetTableData:i},{action:s(({scope:o})=>[o.row.type==="OTHER"?(m(),f("a",{key:0,onClick:c=>D(o.row)},"\u7F16\u8F91\u4FE1\u606F",8,se)):v("",!0),_("a",{onClick:c=>S(o.row)},"\u7F16\u8F91\u6D41\u7A0B",8,ne),o.row.type==="OTHER"?(m(),f("a",{key:1,onClick:c=>N(o.row)},T(o.row.isStop?"\u542F\u7528":"\u7981\u7528"),9,re)):v("",!0),o.row.type==="OTHER"?(m(),f("a",{key:2,class:"text-danger",onClick:c=>B(o.row)},"\u5220\u9664",8,de)):v("",!0)]),_:1},8,["column","data","total"])]),_:1}),l(A,{"model-value":u.value,title:E.value,width:"600px",onClose:h},{footer:s(()=>[l(p,{type:"primary",onClick:e[4]||(e[4]=o=>$(x.value))},{default:s(()=>e[8]||(e[8]=[y(" \u63D0\u4EA4 ")])),_:1}),l(p,{onClick:h},{default:s(()=>e[9]||(e[9]=[y(" \u5173\u95ED ")])),_:1})]),default:s(()=>[l(q,{ref_key:"addFormRef",ref:x,model:a.value,rules:F,"label-width":"90px","label-suffix":":"},{default:s(()=>[l(j,null,{default:s(()=>[l(U,{span:24},{default:s(()=>[l(I,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"processDefName"},{default:s(()=>[l(L,{modelValue:a.value.processDefName,"onUpdate:modelValue":e[1]||(e[1]=o=>a.value.processDefName=o),placeholder:"\u8BF7\u586B\u5199 "},null,8,["modelValue"])]),_:1})]),_:1}),v("",!0)]),_:1}),l(I,{label:"\u72B6\u6001",prop:"isEnable"},{default:s(()=>[l(P,{modelValue:a.value.isEnable,"onUpdate:modelValue":e[3]||(e[3]=o=>a.value.isEnable=o),style:{"--el-switch-on-color":"#4ecb74","--el-switch-off-color":"#ff3b30"}},null,8,["modelValue"]),e[7]||(e[7]=y("\xA0 ")),_("span",{style:K({color:a.value.isEnable?"#4ECB74":"#FF3B30"})},T(a.value.isEnable?"\u5DF2\u542F\u7528":"\u5DF2\u7981\u7528"),5)]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])])}}});export{we as default};