Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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