选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{_ as D}from"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import{d as F,u as M,a0 as T,r as d,A as z,b as I,o as _,c as y,k as e,B as s,a as l,at as J,O as i,F as g,i as L,a3 as Q,N as W,I as j,J as G,Q as H,U as K,V as P,a7 as X,S as Y,au as Z,W as $,g as aa,D as ea,av as la}from"./index-CHTXMeh8.js";import{_ as sa}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{C as ra}from"./constants-CuOBQ73z.js";import{g as ta,c as ua,u as oa}from"./index-CQckL2qL.js";import{s as ma,e as da,a as ia}from"./formCreate-Cdf7i8Tu.js";import{u as na}from"./tagsView-C8yDzF3Q.js";import{u as pa}from"./useFormCreateDesigner-DjCKROXR.js";import"./el-card-Bdk9qx7q.js";import"./dict.type-DwbQoim0.js";const fa=F({name:"BpmFormEditor",__name:"index",setup(ca){const{t:V}=G(),b=H(),{push:k,currentRoute:h}=M(),{query:w}=T(),{delView:x}=na(),m=d();pa(m);const o=d(!1),n=d(!1),t=d({name:"",status:ra.ENABLE,remark:""}),U=z({name:[{required:!0,message:"\u8868\u5355\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u5F00\u542F\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),p=d(),C=()=>{o.value=!0},S=async()=>{if(p&&await p.value.validate()){n.value=!0;try{const u=t.value;u.conf=da(m),u.fields=ia(m),u.id?(await oa(u),b.success(V("common.updateSuccess"))):(await ua(u),b.success(V("common.createSuccess"))),o.value=!1,A()}finally{n.value=!1}}},A=()=>{x(l(h)),k("/bpm/manager/form")};return I(async()=>{const u=w.id;if(!u)return;const a=await ta(u);t.value=a,ma(m,a.conf,a.fields)}),(u,a)=>{const B=K,f=P,q=sa,v=X,c=Y,E=la,N=Z,O=$,R=D;return _(),y(g,null,[e(q,null,{default:s(()=>[e(l(J),{ref_key:"designer",ref:m,height:"780px"},{handle:s(()=>[e(f,{round:"",size:"small",type:"primary",onClick:C},{default:s(()=>[e(B,{class:"mr-5px",icon:"ep:plus"}),i(" \u4FDD\u5B58 ")]),_:1})]),_:1},512)]),_:1}),e(R,{modelValue:l(o),"onUpdate:modelValue":a[4]||(a[4]=r=>j(o)?o.value=r:null),title:"\u4FDD\u5B58\u8868\u5355",width:"600"},{footer:s(()=>[e(f,{disabled:l(n),type:"primary",onClick:S},{default:s(()=>[i("\u786E \u5B9A")]),_:1},8,["disabled"]),e(f,{onClick:a[3]||(a[3]=r=>o.value=!1)},{default:s(()=>[i("\u53D6 \u6D88")]),_:1})]),default:s(()=>[e(O,{ref_key:"formRef",ref:p,model:l(t),rules:l(U),"label-width":"80px"},{default:s(()=>[e(c,{label:"\u8868\u5355\u540D",prop:"name"},{default:s(()=>[e(v,{modelValue:l(t).name,"onUpdate:modelValue":a[0]||(a[0]=r=>l(t).name=r),placeholder:"\u8BF7\u8F93\u5165\u8868\u5355\u540D"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u72B6\u6001",prop:"status"},{default:s(()=>[e(N,{modelValue:l(t).status,"onUpdate:modelValue":a[1]||(a[1]=r=>l(t).status=r)},{default:s(()=>[(_(!0),y(g,null,L(l(Q)(l(W).COMMON_STATUS),r=>(_(),aa(E,{key:r.value,label:r.value},{default:s(()=>[i(ea(r.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(c,{label:"\u5907\u6CE8",prop:"remark"},{default:s(()=>[e(v,{modelValue:l(t).remark,"onUpdate:modelValue":a[2]||(a[2]=r=>l(t).remark=r),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])],64)}}});export{fa as default};