var h=(S,r,s)=>new Promise((u,i)=>{var c=o=>{try{t(s.next(o))}catch(n){i(n)}},l=o=>{try{t(s.throw(o))}catch(n){i(n)}},t=o=>o.done?u(o.value):Promise.resolve(o.value).then(c,l);t((s=s.apply(S,r)).next())});import{_ as b,d as A,C as M,r as N,b as G,a5 as I,o as B,f as p,g as y,K as E,m as a,k as f,l as _,j as k,i as m,q as T}from"./index.9fabe127.js";import{E as $}from"./index.36bc1d2a.js";import{p as P,d as j}from"./flowConfiguration.82148ce2.js";import{g as w,a as O}from"./getIsShowRegionTree.465969ff.js";const U=m("div",{class:"flex justify-between items-center"},[m("span",null,"\u6D41\u7A0B\u5217\u8868")],-1),L=["onClick"];const V=A({name:"flowConfiguration"}),q=Object.assign(V,{setup(S){const{proxy:r}=T(),s=M(),u=N(),i=G([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u6D41\u7A0B\u540D\u79F0",key:"formName",prop:"formName"},{label:"\u72B6\u6001",key:"isStop",prop:"isStop",width:"80",render:e=>[I("span",{class:["dot mr-4",`bg-${e.isStop?"danger":"success"}`]}),I("span",{class:e.isStop?"text-danger":"text-success"},e.isStop?"\u7981\u7528":"\u542F\u7528")]},{label:"\u64CD\u4F5C",slot:"action",width:"120",fixed:"right"}]),c=N([]),l=N(),t=()=>h(this,null,function*(){const e=yield P({regionCode:l.value*1});c.value=e.data.records}),o=e=>{const g=e.isStop?"\u542F\u7528":"\u7981\u7528";r.$messageBox.confirm(`\u662F\u5426${g}\u8BE5\u6D41\u7A0B?`,"\u63D0\u793A\uFF01",{type:"warning"}).then(()=>h(this,null,function*(){yield j({formId:e.formId,processDefId:e.processDefId,state:e.isStop}),r.$message.success(`${g}\u6210\u529F\uFF01`),t()}))},n=e=>{l.value=e.regionLevel===3?e.regionCode:void 0,t()};return B(()=>{w(["SUPER_ADMIN","REGION_MANAGER"])||t()}),(e,g)=>{const C=p("el-col"),x=p("table-list"),D=p("el-card"),R=p("el-row");return y(),E(R,null,{default:a(()=>[f(w)(["SUPER_ADMIN","REGION_MANAGER"])?(y(),E(C,{key:0,style:{"padding-right":"16px"},span:4},{default:a(()=>[_($,{params:f(O)({SUPER_ADMIN:!1,REGION_MANAGER:!1}),onGetTree:n},null,8,["params"])]),_:1})):k("v-if",!0),_(C,{span:f(w)(["SUPER_ADMIN","REGION_MANAGER"])?20:24},{default:a(()=>[m("div",null,[_(D,{shadow:"never"},{header:a(()=>[U]),default:a(()=>[_(x,{ref_key:"tableListRef",ref:u,column:i,data:c.value,pagination:!1,onGetTableData:t},{action:a(({scope:d})=>[m("a",{onClick:v=>f(s).push({name:"configEdit",query:{formId:d.row.formId,formName:d.row.formName,regionCode:d.row.regionCode,processDefId:d.row.processDefId}})},"\u7F16\u8F91",8,L),k("v-if",!0)]),_:1},8,["column","data"])]),_:1})])]),_:1},8,["span"])]),_:1})}}}),X=b(q,[["__file","/Users/chenlixin/Documents/work/NDKJ/MyProject/ls-project-v2.0/src/pages/systemManage/flowConfiguration/index.vue"]]);export{X as default};
