选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{d as W,Q as X,J as Z,r as n,A as $,b as j,a1 as E,o as p,c as U,k as e,B as t,a as l,a2 as N,F as M,i as G,a3 as I,N as O,g as c,O as f,P as _,a7 as L,S as ee,$ as ae,R as le,T as te,U as oe,V as re,W as se,X as pe,Y as ne,Z as ie}from"./index-BP6bNRoi.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as de}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as ce}from"./formatTime-DwR9f7DP.js";import{C as Y}from"./index-qIioACxn.js";import{_ as fe}from"./CategoryForm.vue_vue_type_script_setup_true_lang-9i_j7Xpr.js";import"./index-BZESAUPP.js";import"./color-DXkOL5Tu.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";const ge=W({name:"BpmCategory",__name:"index",setup(_e){const w=X(),{t:z}=Z(),y=n(!0),C=n([]),k=n(0),r=$({pageNo:1,pageSize:10,name:void 0,code:void 0,status:void 0,createTime:[]}),V=n();n(!1);const i=async()=>{y.value=!0;try{const u=await Y.getCategoryPage(r);C.value=u.list,k.value=u.total}finally{y.value=!1}},g=()=>{r.pageNo=1,i()},D=()=>{V.value.resetFields(),g()},h=n(),x=(u,o)=>{h.value.open(u,o)};return j(()=>{i()}),(u,o)=>{const S=L,d=ee,P=ae,A=le,F=te,b=oe,m=re,R=se,T=me,s=pe,B=de,H=ne,K=ue,v=E("hasPermi"),q=ie;return p(),U(M,null,[e(T,null,{default:t(()=>[e(R,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:V,inline:!0,"label-width":"68px"},{default:t(()=>[e(d,{label:"\u5206\u7C7B\u540D",prop:"name"},{default:t(()=>[e(S,{modelValue:l(r).name,"onUpdate:modelValue":o[0]||(o[0]=a=>l(r).name=a),placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D",clearable:"",onKeyup:N(g,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5206\u7C7B\u6807\u5FD7",prop:"code"},{default:t(()=>[e(S,{modelValue:l(r).code,"onUpdate:modelValue":o[1]||(o[1]=a=>l(r).code=a),placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u6807\u5FD7",clearable:"",onKeyup:N(g,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5206\u7C7B\u72B6\u6001",prop:"status"},{default:t(()=>[e(A,{modelValue:l(r).status,"onUpdate:modelValue":o[2]||(o[2]=a=>l(r).status=a),placeholder:"\u8BF7\u9009\u62E9\u5206\u7C7B\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(p(!0),U(M,null,G(l(I)(l(O).COMMON_STATUS),a=>(p(),c(P,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(F,{modelValue:l(r).createTime,"onUpdate:modelValue":o[3]||(o[3]=a=>l(r).createTime=a),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px"},null,8,["modelValue","default-time"])]),_:1}),e(d,null,{default:t(()=>[e(m,{onClick:g},{default:t(()=>[e(b,{icon:"ep:search",class:"mr-5px"}),f(" \u641C\u7D22")]),_:1}),e(m,{onClick:D},{default:t(()=>[e(b,{icon:"ep:refresh",class:"mr-5px"}),f(" \u91CD\u7F6E")]),_:1}),_((p(),c(m,{type:"primary",plain:"",onClick:o[4]||(o[4]=a=>x("create"))},{default:t(()=>[e(b,{icon:"ep:plus",class:"mr-5px"}),f(" \u65B0\u589E ")]),_:1})),[[v,["bpm:category:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(T,null,{default:t(()=>[_((p(),c(H,{data:l(C),stripe:!0,"show-overflow-tooltip":!0},{default:t(()=>[e(s,{label:"\u5206\u7C7B\u7F16\u53F7",align:"center",prop:"id"}),e(s,{label:"\u5206\u7C7B\u540D",align:"center",prop:"name"}),e(s,{label:"\u5206\u7C7B\u6807\u5FD7",align:"center",prop:"code"}),e(s,{label:"\u5206\u7C7B\u63CF\u8FF0",align:"center",prop:"description"}),e(s,{label:"\u5206\u7C7B\u72B6\u6001",align:"center",prop:"status"},{default:t(a=>[e(B,{type:l(O).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(s,{label:"\u5206\u7C7B\u6392\u5E8F",align:"center",prop:"sort"}),e(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",formatter:l(ce),width:"180px"},null,8,["formatter"]),e(s,{label:"\u64CD\u4F5C",align:"center"},{default:t(a=>[_((p(),c(m,{link:"",type:"primary",onClick:J=>x("update",a.row.id)},{default:t(()=>[f(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["bpm:category:update"]]]),_((p(),c(m,{link:"",type:"danger",onClick:J=>(async Q=>{try{await w.delConfirm(),await Y.deleteCategory(Q),w.success(z("common.delSuccess")),await i()}catch{}})(a.row.id)},{default:t(()=>[f(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["bpm:category:delete"]]])]),_:1})]),_:1},8,["data"])),[[q,l(y)]]),e(K,{total:l(k),page:l(r).pageNo,"onUpdate:page":o[5]||(o[5]=a=>l(r).pageNo=a),limit:l(r).pageSize,"onUpdate:limit":o[6]||(o[6]=a=>l(r).pageSize=a),onPagination:i},null,8,["total","page","limit"])]),_:1}),e(fe,{ref_key:"formRef",ref:h,onSuccess:i},null,512)],64)}}});export{ge as default};