选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{d as se,Q as me,J as de,u as ue,r as m,A as ce,b as fe,aA as ye,a1 as we,o as r,c as U,k as a,B as l,a as o,a2 as G,F as H,i as ke,g as n,O as d,P as y,C as F,D as v,h as L,I as P,m as _e,a7 as ge,S as be,$ as ve,R as Ce,U as he,V as Ve,W as xe,X as De,aD as Se,cF as Ue,Y as Te,Z as Ne}from"./index-CHTXMeh8.js";import{_ as Fe}from"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import{_ as Pe}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{E as qe}from"./el-image-B_ZoGYtG.js";import{_ as Be}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as Ie,f as Re}from"./formatTime-DG99nHw2.js";import{j as ze}from"./bpmn-embedded-BQWcRx7_.js";import{a as je,d as Ae,b as Ee,e as Je,g as Ke}from"./index-B0RH4T-v.js";import{g as Me}from"./index-CQckL2qL.js";import{_ as We}from"./ModelForm.vue_vue_type_script_setup_true_lang-C_DiFIeZ.js";import{_ as Xe}from"./ModelImportForm.vue_vue_type_script_setup_true_lang-CZ6_uPhr.js";import{b as Ye}from"./formCreate-Cdf7i8Tu.js";import{C as Ge}from"./index-Dppb265m.js";import"./index-DVe591HI.js";import"./el-card-Bdk9qx7q.js";import"./XTextButton-DNeufsj_.js";import"./XButton-C1WkVWZR.js";import"./el-tree-select-DhIHMmfG.js";import"./tree-BBZY150N.js";import"./index-VglbY8ty.js";import"./index-BFn6KXm4.js";import"./index-63VBDaUm.js";import"./index-DYclHsjD.js";import"./index-eJzt9aew.js";import"./constants-CuOBQ73z.js";import"./index-BbWSenFL.js";import"./el-drawer-DCGXHIlf.js";import"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import"./color-DXkOL5Tu.js";import"./index-CO7BRHFB.js";const He={key:2},Le={key:0},Oe=se({name:"BpmModel",__name:"index",setup(Qe){const _=me(),{t:q}=de(),{push:C}=ue(),T=m(!0),B=m(0),I=m([]),p=ce({pageNo:1,pageSize:10,key:void 0,name:void 0,category:void 0}),R=m(),z=m([]),w=async()=>{T.value=!0;try{const f=await je(p);I.value=f.list,B.value=f.total}finally{T.value=!1}},h=()=>{p.pageNo=1,w()},O=()=>{R.value.resetFields(),h()},j=m(),A=(f,t)=>{j.value.open(f,t)},E=m(),Q=()=>{E.value.open()},V=m(!1),N=m({rule:[],option:{}}),J=async f=>{if(f.formType==10){const t=await Me(f.formId);Ye(N,t.conf,t.fields),V.value=!0}else await C({path:f.formCustomCreatePath})},x=m(!1),g=m(null),K=m({prefix:"flowable"});return fe(async()=>{await w(),z.value=await Ge.getCategorySimpleList()}),(f,t)=>{const M=ge,D=be,Z=ve,$=Ce,S=he,s=Ve,ee=xe,W=Be,u=De,ae=qe,X=Se,le=Ue,oe=Te,te=Pe,ie=ye("form-create"),Y=Fe,k=we("hasPermi"),re=Ne;return r(),U(H,null,[a(W,null,{default:l(()=>[a(ee,{class:"-mb-15px",model:o(p),ref_key:"queryFormRef",ref:R,inline:!0,"label-width":"68px"},{default:l(()=>[a(D,{label:"\u6D41\u7A0B\u6807\u8BC6",prop:"key"},{default:l(()=>[a(M,{modelValue:o(p).key,"onUpdate:modelValue":t[0]||(t[0]=e=>o(p).key=e),placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u6807\u8BC6",clearable:"",onKeyup:G(h,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(D,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"name"},{default:l(()=>[a(M,{modelValue:o(p).name,"onUpdate:modelValue":t[1]||(t[1]=e=>o(p).name=e),placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0",clearable:"",onKeyup:G(h,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(D,{label:"\u6D41\u7A0B\u5206\u7C7B",prop:"category"},{default:l(()=>[a($,{modelValue:o(p).category,"onUpdate:modelValue":t[2]||(t[2]=e=>o(p).category=e),placeholder:"\u8BF7\u9009\u62E9\u6D41\u7A0B\u5206\u7C7B",clearable:"",class:"!w-240px"},{default:l(()=>[(r(!0),U(H,null,ke(o(z),e=>(r(),n(Z,{key:e.code,label:e.name,value:e.code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(D,null,{default:l(()=>[a(s,{onClick:h},{default:l(()=>[a(S,{icon:"ep:search",class:"mr-5px"}),d(" \u641C\u7D22")]),_:1}),a(s,{onClick:O},{default:l(()=>[a(S,{icon:"ep:refresh",class:"mr-5px"}),d(" \u91CD\u7F6E")]),_:1}),y((r(),n(s,{type:"primary",plain:"",onClick:t[3]||(t[3]=e=>A("create"))},{default:l(()=>[a(S,{icon:"ep:plus",class:"mr-5px"}),d(" \u65B0\u5EFA\u6D41\u7A0B ")]),_:1})),[[k,["bpm:model:create"]]]),y((r(),n(s,{type:"success",plain:"",onClick:Q},{default:l(()=>[a(S,{icon:"ep:upload",class:"mr-5px"}),d(" \u5BFC\u5165\u6D41\u7A0B ")]),_:1})),[[k,["bpm:model:import"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(W,null,{default:l(()=>[y((r(),n(oe,{data:o(I)},{default:l(()=>[a(u,{label:"\u6D41\u7A0B\u6807\u8BC6",align:"center",prop:"key",width:"200"}),a(u,{label:"\u6D41\u7A0B\u540D\u79F0",align:"center",prop:"name",width:"200"},{default:l(e=>[a(s,{type:"primary",link:"",onClick:c=>(async i=>{const b=await Ke(i.id);g.value=b.bpmnXml||"",x.value=!0})(e.row)},{default:l(()=>[F("span",null,v(e.row.name),1)]),_:2},1032,["onClick"])]),_:1}),a(u,{label:"\u6D41\u7A0B\u56FE\u6807",align:"center",prop:"icon",width:"100"},{default:l(e=>[a(ae,{src:e.row.icon,class:"w-32px h-32px"},null,8,["src"])]),_:1}),a(u,{label:"\u6D41\u7A0B\u5206\u7C7B",align:"center",prop:"categoryName",width:"100"}),a(u,{label:"\u8868\u5355\u4FE1\u606F",align:"center",prop:"formType",width:"200"},{default:l(e=>[e.row.formType===10?(r(),n(s,{key:0,type:"primary",link:"",onClick:c=>J(e.row)},{default:l(()=>[F("span",null,v(e.row.formName),1)]),_:2},1032,["onClick"])):e.row.formType===20?(r(),n(s,{key:1,type:"primary",link:"",onClick:c=>J(e.row)},{default:l(()=>[F("span",null,v(e.row.formCustomCreatePath),1)]),_:2},1032,["onClick"])):(r(),U("label",He,"\u6682\u65E0\u8868\u5355"))]),_:1}),a(u,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:o(Ie)},null,8,["formatter"]),a(u,{label:"\u6700\u65B0\u90E8\u7F72\u7684\u6D41\u7A0B\u5B9A\u4E49",align:"center"},{default:l(()=>[a(u,{label:"\u6D41\u7A0B\u7248\u672C",align:"center",prop:"processDefinition.version",width:"100"},{default:l(e=>[e.row.processDefinition?(r(),n(X,{key:0},{default:l(()=>[d(" v"+v(e.row.processDefinition.version),1)]),_:2},1024)):(r(),n(X,{key:1,type:"warning"},{default:l(()=>[d("\u672A\u90E8\u7F72")]),_:1}))]),_:1}),a(u,{label:"\u6FC0\u6D3B\u72B6\u6001",align:"center",prop:"processDefinition.version",width:"85"},{default:l(e=>[e.row.processDefinition?(r(),n(le,{key:0,modelValue:e.row.processDefinition.suspensionState,"onUpdate:modelValue":c=>e.row.processDefinition.suspensionState=c,"active-value":1,"inactive-value":2,onChange:c=>(async i=>{const b=i.processDefinition.suspensionState;try{const ne=i.id,pe="\u662F\u5426\u786E\u8BA4"+(b===1?"\u6FC0\u6D3B":"\u6302\u8D77")+'\u6D41\u7A0B\u540D\u5B57\u4E3A"'+i.name+'"\u7684\u6570\u636E\u9879?';await _.confirm(pe),await Ee(ne,b),await w()}catch{i.processDefinition.suspensionState=b===1?2:1}})(e.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])):L("",!0)]),_:1}),a(u,{label:"\u90E8\u7F72\u65F6\u95F4",align:"center",prop:"deploymentTime",width:"180"},{default:l(e=>[e.row.processDefinition?(r(),U("span",Le,v(o(Re)(e.row.processDefinition.deploymentTime)),1)):L("",!0)]),_:1})]),_:1}),a(u,{label:"\u64CD\u4F5C",align:"center",width:"240",fixed:"right"},{default:l(e=>[y((r(),n(s,{link:"",type:"primary",onClick:c=>A("update",e.row.id)},{default:l(()=>[d(" \u4FEE\u6539\u6D41\u7A0B ")]),_:2},1032,["onClick"])),[[k,["bpm:model:update"]]]),y((r(),n(s,{link:"",type:"primary",onClick:c=>{return i=e.row,void C({name:"BpmModelEditor",query:{modelId:i.id}});var i}},{default:l(()=>[d(" \u8BBE\u8BA1\u6D41\u7A0B ")]),_:2},1032,["onClick"])),[[k,["bpm:model:update"]]]),y((r(),n(s,{link:"",type:"primary",onClick:c=>{return i=e.row.id,void C({name:"SimpleWorkflowDesignEditor",query:{modelId:i.id}});var i}},{default:l(()=>[d(" \u4EFF\u9489\u9489\u8BBE\u8BA1\u6D41\u7A0B ")]),_:2},1032,["onClick"])),[[k,["bpm:model:update"]]]),y((r(),n(s,{link:"",type:"primary",onClick:c=>(async i=>{try{await _.confirm("\u662F\u5426\u90E8\u7F72\u8BE5\u6D41\u7A0B\uFF01\uFF01"),await Je(i.id),_.success(q("\u90E8\u7F72\u6210\u529F")),await w()}catch{}})(e.row)},{default:l(()=>[d(" \u53D1\u5E03\u6D41\u7A0B ")]),_:2},1032,["onClick"])),[[k,["bpm:model:deploy"]]]),y((r(),n(s,{link:"",type:"primary",onClick:c=>{return i=e.row,void C({name:"BpmProcessDefinition",query:{key:i.key}});var i}},{default:l(()=>[d(" \u6D41\u7A0B\u5B9A\u4E49 ")]),_:2},1032,["onClick"])),[[k,["bpm:process-definition:query"]]]),y((r(),n(s,{link:"",type:"danger",onClick:c=>(async i=>{try{await _.delConfirm(),await Ae(i),_.success(q("common.delSuccess")),await w()}catch{}})(e.row.id)},{default:l(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["bpm:model:delete"]]])]),_:1})]),_:1},8,["data"])),[[re,o(T)]]),a(te,{total:o(B),page:o(p).pageNo,"onUpdate:page":t[4]||(t[4]=e=>o(p).pageNo=e),limit:o(p).pageSize,"onUpdate:limit":t[5]||(t[5]=e=>o(p).pageSize=e),onPagination:w},null,8,["total","page","limit"])]),_:1}),a(We,{ref_key:"formRef",ref:j,onSuccess:w},null,512),a(Xe,{ref_key:"importFormRef",ref:E,onSuccess:w},null,512),a(Y,{title:"\u8868\u5355\u8BE6\u60C5",modelValue:o(V),"onUpdate:modelValue":t[6]||(t[6]=e=>P(V)?V.value=e:null),width:"800"},{default:l(()=>[a(ie,{rule:o(N).rule,option:o(N).option},null,8,["rule","option"])]),_:1},8,["modelValue"]),a(Y,{title:"\u6D41\u7A0B\u56FE",modelValue:o(x),"onUpdate:modelValue":t[8]||(t[8]=e=>P(x)?x.value=e:null),width:"800"},{default:l(()=>[a(o(ze),_e({key:"designer",modelValue:o(g),"onUpdate:modelValue":t[7]||(t[7]=e=>P(g)?g.value=e:null),value:o(g)},o(K),{prefix:o(K).prefix}),null,16,["modelValue","value","prefix"])]),_:1},8,["modelValue"])],64)}}});export{Oe as default};