选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{d as K,Q,J as W,r as u,A as X,b as Z,a1 as $,o as n,c as V,k as e,B as t,a as l,a2 as j,F as U,i as E,a3 as G,N,g as d,O as c,P as g,a7 as I,S as L,$ as ee,R as ae,T as le,U as te,V as se,W as re,X as oe,Y as ne,Z as pe}from"./index-BP6bNRoi.js";import{_ as ie}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as me}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as ue}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as de}from"./formatTime-DwR9f7DP.js";import{b as ce,d as fe}from"./index-ml7XefzV.js";import ge from"./TenantPackageForm-C6XNQn_6.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";import"./constants-CuOBQ73z.js";import"./tree-BBZY150N.js";import"./index-Abw9tEaW.js";const _e=K({name:"SystemTenantPackage",__name:"index",setup(ye){const b=Q(),{t:M}=W(),_=u(!0),v=u(0),w=u([]),r=X({pageNo:1,pageSize:10,name:void 0,status:void 0,remark:void 0,createTime:[]}),h=u(),p=async()=>{_.value=!0;try{const o=await ce(r);w.value=o.list,v.value=o.total}finally{_.value=!1}},x=()=>{r.pageNo=1,p()},O=()=>{var o;(o=h.value)==null||o.resetFields(),p()},S=u(),C=(o,s)=>{S.value.open(o,s)};return Z(()=>{p()}),(o,s)=>{const Y=I,f=L,A=ee,P=ae,z=le,y=te,m=se,D=re,T=ue,i=oe,F=me,R=ne,H=ie,k=$("hasPermi"),q=pe;return n(),V(U,null,[e(T,null,{default:t(()=>[e(D,{class:"-mb-15px",model:l(r),ref_key:"queryFormRef",ref:h,inline:!0,"label-width":"68px"},{default:t(()=>[e(f,{label:"\u5957\u9910\u540D",prop:"name"},{default:t(()=>[e(Y,{modelValue:l(r).name,"onUpdate:modelValue":s[0]||(s[0]=a=>l(r).name=a),placeholder:"\u8BF7\u8F93\u5165\u5957\u9910\u540D",clearable:"",onKeyup:j(x,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(P,{modelValue:l(r).status,"onUpdate:modelValue":s[1]||(s[1]=a=>l(r).status=a),placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001",clearable:"",class:"!w-240px"},{default:t(()=>[(n(!0),V(U,null,E(l(G)(l(N).COMMON_STATUS),a=>(n(),d(A,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(f,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[e(z,{modelValue:l(r).createTime,"onUpdate:modelValue":s[2]||(s[2]=a=>l(r).createTime=a),type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F",class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(f,null,{default:t(()=>[e(m,{onClick:x},{default:t(()=>[e(y,{icon:"ep:search",class:"mr-5px"}),c(" \u641C\u7D22")]),_:1}),e(m,{onClick:O},{default:t(()=>[e(y,{icon:"ep:refresh",class:"mr-5px"}),c(" \u91CD\u7F6E")]),_:1}),g((n(),d(m,{type:"primary",plain:"",onClick:s[3]||(s[3]=a=>C("create"))},{default:t(()=>[e(y,{icon:"ep:plus",class:"mr-5px"}),c(" \u65B0\u589E ")]),_:1})),[[k,["system:tenant-package:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(T,null,{default:t(()=>[g((n(),d(R,{data:l(w)},{default:t(()=>[e(i,{label:"\u5957\u9910\u7F16\u53F7",align:"center",prop:"id",width:"120"}),e(i,{label:"\u5957\u9910\u540D",align:"center",prop:"name"}),e(i,{label:"\u72B6\u6001",align:"center",prop:"status",width:"100"},{default:t(a=>[e(F,{type:l(N).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(i,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),e(i,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:l(de)},null,8,["formatter"]),e(i,{label:"\u64CD\u4F5C",align:"center","class-name":"small-padding fixed-width"},{default:t(a=>[g((n(),d(m,{link:"",type:"primary",onClick:B=>C("update",a.row.id)},{default:t(()=>[c(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[k,["system:tenant-package:update"]]]),g((n(),d(m,{link:"",type:"danger",onClick:B=>(async J=>{try{await b.delConfirm(),await fe(J),b.success(M("common.delSuccess")),await p()}catch{}})(a.row.id)},{default:t(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[k,["system:tenant-package:delete"]]])]),_:1})]),_:1},8,["data"])),[[q,l(_)]]),e(H,{total:l(v),page:l(r).pageNo,"onUpdate:page":s[4]||(s[4]=a=>l(r).pageNo=a),limit:l(r).pageSize,"onUpdate:limit":s[5]||(s[5]=a=>l(r).pageSize=a),onPagination:p},null,8,["total","page","limit"])]),_:1}),e(ge,{ref_key:"formRef",ref:S,onSuccess:p},null,512)],64)}}});export{_e as default};