选煤厂安全管理系统前端代码
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 H,F as J,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-BP6bNRoi.js";import{_ as Fe}from"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import{_ as Pe}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{E as qe}from"./el-image-CQbvaLia.js";import{_ as Be}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as Ie,f as Re}from"./formatTime-DwR9f7DP.js";import{j as ze}from"./bpmn-embedded-DgbZ9dtA.js";import{a as Ee,d as Ke,b as je,e as Ae,g as Me}from"./index-D1RxyxVK.js";import{g as We}from"./index-CeFKtjBg.js";import{_ as Xe}from"./ModelForm.vue_vue_type_script_setup_true_lang-DSoQinCM.js";import{_ as Ye}from"./ModelImportForm.vue_vue_type_script_setup_true_lang-CpKJC_-x.js";import{b as Ge}from"./formCreate-4fM2e5HN.js";import{C as He}from"./index-qIioACxn.js";import"./index-BZESAUPP.js";import"./el-card-bU92WWV4.js";import"./XTextButton-B6L8upsJ.js";import"./XButton-BfzTlH8o.js";import"./el-tree-select-pYALMRc9.js";import"./tree-BBZY150N.js";import"./index-NsInNyZ_.js";import"./index-BdNokKwC.js";import"./index-DkNlrmPs.js";import"./index-vFgEqmZu.js";import"./index-Y1ylnZaQ.js";import"./constants-CuOBQ73z.js";import"./index-ox_WxZBR.js";import"./el-drawer-CuGR_O5R.js";import"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import"./color-DXkOL5Tu.js";import"./index-BRcqC2Y4.js";const Je={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 Ee(p);I.value=f.list,B.value=f.total}finally{T.value=!1}},h=()=>{p.pageNo=1,w()},O=()=>{R.value.resetFields(),h()},E=m(),K=(f,t)=>{E.value.open(f,t)},j=m(),Q=()=>{j.value.open()},V=m(!1),N=m({rule:[],option:{}}),A=async f=>{if(f.formType==10){const t=await We(f.formId);Ge(N,t.conf,t.fields),V.value=!0}else await C({path:f.formCustomCreatePath})},x=m(!1),g=m(null),M=m({prefix:"flowable"});return fe(async()=>{await w(),z.value=await He.getCategorySimpleList()}),(f,t)=>{const W=ge,D=be,Z=ve,$=Ce,S=he,s=Ve,ee=xe,X=Be,u=De,ae=qe,Y=Se,le=Ue,oe=Te,te=Pe,ie=ye("form-create"),G=Fe,k=we("hasPermi"),re=Ne;return r(),U(J,null,[a(X,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(W,{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:H(h,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),a(D,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"name"},{default:l(()=>[a(W,{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:H(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(J,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=>K("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(X,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 Me(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=>A(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=>A(e.row)},{default:l(()=>[F("span",null,v(e.row.formCustomCreatePath),1)]),_:2},1032,["onClick"])):(r(),U("label",Je,"\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(Y,{key:0},{default:l(()=>[d(" v"+v(e.row.processDefinition.version),1)]),_:2},1024)):(r(),n(Y,{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 je(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=>K("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 Ae(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 Ke(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(Xe,{ref_key:"formRef",ref:E,onSuccess:w},null,512),a(Ye,{ref_key:"importFormRef",ref:j,onSuccess:w},null,512),a(G,{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(G,{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(M),{prefix:o(M).prefix}),null,16,["modelValue","value","prefix"])]),_:1},8,["modelValue"])],64)}}});export{Oe as default};