选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{d as K,Q,J as X,u as Y,r as p,A as Z,w as j,b as D,aA as G,a1 as H,o as m,c as L,k as a,B as e,a as l,a2 as $,O as u,P as c,g as f,N as aa,I as ea,F as la,a7 as ta,S as oa,U as ra,V as na,W as sa,X as ia,Y as pa,Z as ma}from"./index-BP6bNRoi.js";import{_ as ua}from"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";import{_ as da}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as ca}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as fa}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as _a}from"./formatTime-DwR9f7DP.js";import{b as ga,d as ya,g as ba}from"./index-CeFKtjBg.js";import{b as ka}from"./formCreate-4fM2e5HN.js";import"./index-BZESAUPP.js";import"./color-DXkOL5Tu.js";import"./el-card-bU92WWV4.js";const wa=K({name:"BpmForm",__name:"index",setup(Ca){const v=Q(),{t:q}=X(),{currentRoute:z,push:B}=Y(),y=p(!0),h=p(0),x=p([]),r=Z({pageNo:1,pageSize:10,name:null}),S=p(),d=async()=>{y.value=!0;try{const n=await ga(r);x.value=n.list,h.value=n.total}finally{y.value=!1}},b=()=>{r.pageNo=1,d()},M=()=>{S.value.resetFields(),b()},V=n=>{const o={name:"BpmFormEditor"};typeof n=="number"&&(o.query={id:n}),B(o)},_=p(!1),k=p({rule:[],option:{}});return j(()=>z.value,()=>{d()},{immediate:!0}),D(()=>{d()}),(n,o)=>{const O=ta,N=oa,w=ra,s=na,P=sa,U=fa,i=ia,T=ca,E=pa,R=da,W=G("form-create"),I=ua,g=H("hasPermi"),J=ma;return m(),L(la,null,[a(U,null,{default:e(()=>[a(P,{ref_key:"queryFormRef",ref:S,inline:!0,model:l(r),class:"-mb-15px","label-width":"68px"},{default:e(()=>[a(N,{label:"\u8868\u5355\u540D",prop:"name"},{default:e(()=>[a(O,{modelValue:l(r).name,"onUpdate:modelValue":o[0]||(o[0]=t=>l(r).name=t),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8868\u5355\u540D",onKeyup:$(b,["enter"])},null,8,["modelValue"])]),_:1}),a(N,null,{default:e(()=>[a(s,{onClick:b},{default:e(()=>[a(w,{class:"mr-5px",icon:"ep:search"}),u(" \u641C\u7D22 ")]),_:1}),a(s,{onClick:M},{default:e(()=>[a(w,{class:"mr-5px",icon:"ep:refresh"}),u(" \u91CD\u7F6E ")]),_:1}),c((m(),f(s,{plain:"",type:"primary",onClick:V},{default:e(()=>[a(w,{class:"mr-5px",icon:"ep:plus"}),u(" \u65B0\u589E ")]),_:1})),[[g,["bpm:form:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),a(U,null,{default:e(()=>[c((m(),f(E,{data:l(x)},{default:e(()=>[a(i,{align:"center",label:"\u7F16\u53F7",prop:"id"}),a(i,{align:"center",label:"\u8868\u5355\u540D",prop:"name"}),a(i,{align:"center",label:"\u72B6\u6001",prop:"status"},{default:e(t=>[a(T,{type:l(aa).COMMON_STATUS,value:t.row.status},null,8,["type","value"])]),_:1}),a(i,{align:"center",label:"\u5907\u6CE8",prop:"remark"}),a(i,{formatter:l(_a),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},null,8,["formatter"]),a(i,{align:"center",label:"\u64CD\u4F5C"},{default:e(t=>[c((m(),f(s,{link:"",type:"primary",onClick:F=>V(t.row.id)},{default:e(()=>[u(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[g,["bpm:form:update"]]]),c((m(),f(s,{link:"",onClick:F=>(async C=>{const A=await ba(C);ka(k,A.conf,A.fields),_.value=!0})(t.row.id)},{default:e(()=>[u(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[g,["bpm:form:query"]]]),c((m(),f(s,{link:"",type:"danger",onClick:F=>(async C=>{try{await v.delConfirm(),await ya(C),v.success(q("common.delSuccess")),await d()}catch{}})(t.row.id)},{default:e(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[g,["bpm:form:delete"]]])]),_:1})]),_:1},8,["data"])),[[J,l(y)]]),a(R,{limit:l(r).pageSize,"onUpdate:limit":o[1]||(o[1]=t=>l(r).pageSize=t),page:l(r).pageNo,"onUpdate:page":o[2]||(o[2]=t=>l(r).pageNo=t),total:l(h),onPagination:d},null,8,["limit","page","total"])]),_:1}),a(I,{modelValue:l(_),"onUpdate:modelValue":o[3]||(o[3]=t=>ea(_)?_.value=t:null),title:"\u8868\u5355\u8BE6\u60C5",width:"800"},{default:e(()=>[a(W,{option:l(k).option,rule:l(k).rule},null,8,["option","rule"])]),_:1},8,["modelValue"])],64)}}});export{wa as default};