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