选煤厂安全管理系统前端代码
houzhongjian
2024-11-25 37b2044f04a09e89f82f8484279b5f06b7194481
1
import{d as M,Q as q,J,r as _,A as K,b as Q,a1 as W,o as i,c as I,k as e,B as l,a as t,a2 as X,F as U,i as Z,a3 as $,N as C,g as d,O as p,P as g,a7 as j,S as ee,$ as ae,R as le,T as te,U as re,V as oe,W as ie,X as ne,Y as se,Z as pe}from"./index-BP6bNRoi.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang-sJUY8qtC.js";import{_ as ue}from"./DictTag.vue_vue_type_script_lang-DwXPHgid.js";import{_ as de}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{_ as me,g as fe,d as _e,u as ge,t as ye}from"./FileConfigForm.vue_vue_type_script_setup_true_lang-CT5fzbrG.js";import{d as we}from"./formatTime-DwR9f7DP.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 be=M({name:"InfraFileConfig",__name:"index",setup(ke){const m=q(),{t:x}=J(),b=_(!0),N=_(0),S=_([]),o=K({pageNo:1,pageSize:10,name:void 0,storage:void 0,createTime:[]}),V=_(),c=async()=>{b.value=!0;try{const f=await fe(o);S.value=f.list,N.value=f.total}finally{b.value=!1}},k=()=>{o.pageNo=1,c()},E=()=>{V.value.resetFields(),k()},F=_(),R=(f,r)=>{F.value.open(f,r)};return Q(()=>{c()}),(f,r)=>{const O=j,y=ee,Y=ae,D=le,L=te,v=re,n=oe,z=ie,T=de,s=ne,A=ue,G=se,P=ce,w=W("hasPermi"),B=pe;return i(),I(U,null,[e(T,null,{default:l(()=>[e(z,{class:"-mb-15px",model:t(o),ref_key:"queryFormRef",ref:V,inline:!0,"label-width":"68px"},{default:l(()=>[e(y,{label:"\u914D\u7F6E\u540D",prop:"name"},{default:l(()=>[e(O,{modelValue:t(o).name,"onUpdate:modelValue":r[0]||(r[0]=a=>t(o).name=a),placeholder:"\u8BF7\u8F93\u5165\u914D\u7F6E\u540D",clearable:"",onKeyup:X(k,["enter"]),class:"!w-240px"},null,8,["modelValue"])]),_:1}),e(y,{label:"\u5B58\u50A8\u5668",prop:"storage"},{default:l(()=>[e(D,{modelValue:t(o).storage,"onUpdate:modelValue":r[1]||(r[1]=a=>t(o).storage=a),placeholder:"\u8BF7\u9009\u62E9\u5B58\u50A8\u5668",clearable:"",class:"!w-240px"},{default:l(()=>[(i(!0),I(U,null,Z(t($)(t(C).INFRA_FILE_STORAGE),a=>(i(),d(Y,{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(y,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:l(()=>[e(L,{modelValue:t(o).createTime,"onUpdate:modelValue":r[2]||(r[2]=a=>t(o).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(y,null,{default:l(()=>[e(n,{onClick:k},{default:l(()=>[e(v,{icon:"ep:search",class:"mr-5px"}),p(" \u641C\u7D22")]),_:1}),e(n,{onClick:E},{default:l(()=>[e(v,{icon:"ep:refresh",class:"mr-5px"}),p(" \u91CD\u7F6E")]),_:1}),g((i(),d(n,{type:"primary",plain:"",onClick:r[3]||(r[3]=a=>R("create"))},{default:l(()=>[e(v,{icon:"ep:plus",class:"mr-5px"}),p(" \u65B0\u589E ")]),_:1})),[[w,["infra:file-config:create"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(T,null,{default:l(()=>[g((i(),d(G,{data:t(S)},{default:l(()=>[e(s,{label:"\u7F16\u53F7",align:"center",prop:"id"}),e(s,{label:"\u914D\u7F6E\u540D",align:"center",prop:"name"}),e(s,{label:"\u5B58\u50A8\u5668",align:"center",prop:"storage"},{default:l(a=>[e(A,{type:t(C).INFRA_FILE_STORAGE,value:a.row.storage},null,8,["type","value"])]),_:1}),e(s,{label:"\u5907\u6CE8",align:"center",prop:"remark"}),e(s,{label:"\u4E3B\u914D\u7F6E",align:"center",prop:"primary"},{default:l(a=>[e(A,{type:t(C).INFRA_BOOLEAN_STRING,value:a.row.master},null,8,["type","value"])]),_:1}),e(s,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:t(we)},null,8,["formatter"]),e(s,{label:"\u64CD\u4F5C",align:"center",width:"240px"},{default:l(a=>[g((i(),d(n,{link:"",type:"primary",onClick:h=>R("update",a.row.id)},{default:l(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["infra:file-config:update"]]]),g((i(),d(n,{link:"",type:"primary",disabled:a.row.master,onClick:h=>(async u=>{try{await m.confirm('\u662F\u5426\u786E\u8BA4\u4FEE\u6539\u914D\u7F6E\u7F16\u53F7\u4E3A"'+u+'"\u7684\u6570\u636E\u9879\u4E3A\u4E3B\u914D\u7F6E?'),await ge(u),m.success(x("common.updateSuccess")),await c()}catch{}})(a.row.id)},{default:l(()=>[p(" \u4E3B\u914D\u7F6E ")]),_:2},1032,["disabled","onClick"])),[[w,["infra:file-config:update"]]]),e(n,{link:"",type:"primary",onClick:h=>(async u=>{try{const H=await ye(u);await m.confirm("\u662F\u5426\u8981\u8BBF\u95EE\u8BE5\u6587\u4EF6\uFF1F","\u6D4B\u8BD5\u4E0A\u4F20\u6210\u529F"),window.open(H,"_blank")}catch{}})(a.row.id)},{default:l(()=>[p(" \u6D4B\u8BD5 ")]),_:2},1032,["onClick"]),g((i(),d(n,{link:"",type:"danger",onClick:h=>(async u=>{try{await m.delConfirm(),await _e(u),m.success(x("common.delSuccess")),await c()}catch{}})(a.row.id)},{default:l(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["infra:file-config:delete"]]])]),_:1})]),_:1},8,["data"])),[[B,t(b)]]),e(P,{total:t(N),page:t(o).pageNo,"onUpdate:page":r[4]||(r[4]=a=>t(o).pageNo=a),limit:t(o).pageSize,"onUpdate:limit":r[5]||(r[5]=a=>t(o).pageSize=a),onPagination:c},null,8,["total","page","limit"])]),_:1}),e(me,{ref_key:"formRef",ref:F,onSuccess:c},null,512)],64)}}});export{be as default};