沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{d as Z,Q as $,J as j,r as d,A as E,b as G,aA as I,a1 as L,o as r,c as N,k as e,B as t,a as l,a2 as M,F as D,i as ee,a3 as ae,N as O,g as m,O as u,P as y,a7 as le,S as te,$ as oe,R as se,T as re,U as pe,V as ne,W as ie,X as ue,Y as de,Z as me}from"./index-CHTXMeh8.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang-Cenk7Bi3.js";import{_ as fe}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";import{_ as ye}from"./ContentWrap.vue_vue_type_script_setup_true_lang-BjvrLlUT.js";import{d as _e}from"./formatTime-DG99nHw2.js";import{b as ge,d as we,e as be}from"./dict.type-DwbQoim0.js";import{_ as ke}from"./DictTypeForm.vue_vue_type_script_setup_true_lang-D7LiiHou.js";import{d as ve}from"./download-e0EdwhTv.js";import"./index-DVe591HI.js";import"./color-DXkOL5Tu.js";import"./el-card-Bdk9qx7q.js";import"./Dialog.vue_vue_type_style_index_0_lang-DH0TiLYN.js";import"./constants-CuOBQ73z.js";const xe=Z({name:"SystemDictType",__name:"index",setup(he){const b=$(),{t:Y}=j(),k=d(!0),x=d(0),h=d([]),o=E({pageNo:1,pageSize:10,name:"",type:"",status:void 0,createTime:[]}),C=d(),v=d(!1),c=async()=>{k.value=!0;try{const p=await ge(o);h.value=p.list,x.value=p.total}finally{k.value=!1}},_=()=>{o.pageNo=1,c()},A=()=>{C.value.resetFields(),_()},V=d(),S=(p,s)=>{V.value.open(p,s)},F=async()=>{try{await b.exportConfirm(),v.value=!0;const p=await be(o);ve.excel(p,"\u5B57\u5178\u7C7B\u578B.xls")}catch{}finally{v.value=!1}};return G(()=>{c()}),(p,s)=>{const T=le,f=te,P=oe,z=se,H=re,g=pe,n=ne,R=ie,U=ye,i=ue,J=fe,K=I("router-link"),q=de,B=ce,w=L("hasPermi"),Q=me;return r(),N(D,null,[e(U,null,{default:t(()=>[e(R,{ref_key:"queryFormRef",ref:C,inline:!0,model:l(o),class:"-mb-15px","label-width":"68px"},{default:t(()=>[e(f,{label:"\u5B57\u5178\u540D\u79F0",prop:"name"},{default:t(()=>[e(T,{modelValue:l(o).name,"onUpdate:modelValue":s[0]||(s[0]=a=>l(o).name=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u540D\u79F0",onKeyup:M(_,["enter"])},null,8,["modelValue"])]),_:1}),e(f,{label:"\u5B57\u5178\u7C7B\u578B",prop:"type"},{default:t(()=>[e(T,{modelValue:l(o).type,"onUpdate:modelValue":s[1]||(s[1]=a=>l(o).type=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5B57\u5178\u7C7B\u578B",onKeyup:M(_,["enter"])},null,8,["modelValue"])]),_:1}),e(f,{label:"\u72B6\u6001",prop:"status"},{default:t(()=>[e(z,{modelValue:l(o).status,"onUpdate:modelValue":s[2]||(s[2]=a=>l(o).status=a),class:"!w-240px",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5B57\u5178\u72B6\u6001"},{default:t(()=>[(r(!0),N(D,null,ee(l(ae)(l(O).COMMON_STATUS),a=>(r(),m(P,{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(H,{modelValue:l(o).createTime,"onUpdate:modelValue":s[3]||(s[3]=a=>l(o).createTime=a),"default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],class:"!w-240px","end-placeholder":"\u7ED3\u675F\u65E5\u671F","start-placeholder":"\u5F00\u59CB\u65E5\u671F",type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","default-time"])]),_:1}),e(f,null,{default:t(()=>[e(n,{onClick:_},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:search"}),u(" \u641C\u7D22 ")]),_:1}),e(n,{onClick:A},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:refresh"}),u(" \u91CD\u7F6E ")]),_:1}),y((r(),m(n,{plain:"",type:"primary",onClick:s[4]||(s[4]=a=>S("create"))},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:plus"}),u(" \u65B0\u589E ")]),_:1})),[[w,["system:dict:create"]]]),y((r(),m(n,{loading:l(v),plain:"",type:"success",onClick:F},{default:t(()=>[e(g,{class:"mr-5px",icon:"ep:download"}),u(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[w,["system:dict:export"]]])]),_:1})]),_:1},8,["model"])]),_:1}),e(U,null,{default:t(()=>[y((r(),m(q,{data:l(h)},{default:t(()=>[e(i,{align:"center",label:"\u5B57\u5178\u7F16\u53F7",prop:"id"}),e(i,{align:"center",label:"\u5B57\u5178\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{align:"center",label:"\u5B57\u5178\u7C7B\u578B",prop:"type",width:"300"}),e(i,{align:"center",label:"\u72B6\u6001",prop:"status"},{default:t(a=>[e(J,{type:l(O).COMMON_STATUS,value:a.row.status},null,8,["type","value"])]),_:1}),e(i,{align:"center",label:"\u5907\u6CE8",prop:"remark"}),e(i,{formatter:l(_e),align:"center",label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime",width:"180"},null,8,["formatter"]),e(i,{align:"center",label:"\u64CD\u4F5C"},{default:t(a=>[y((r(),m(n,{link:"",type:"primary",onClick:W=>S("update",a.row.id)},{default:t(()=>[u(" \u4FEE\u6539 ")]),_:2},1032,["onClick"])),[[w,["system:dict:update"]]]),e(K,{to:"/dict/type/data/"+a.row.type},{default:t(()=>[e(n,{link:"",type:"primary"},{default:t(()=>[u("\u6570\u636E")]),_:1})]),_:2},1032,["to"]),y((r(),m(n,{link:"",type:"danger",onClick:W=>(async X=>{try{await b.delConfirm(),await we(X),b.success(Y("common.delSuccess")),await c()}catch{}})(a.row.id)},{default:t(()=>[u(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["system:dict:delete"]]])]),_:1})]),_:1},8,["data"])),[[Q,l(k)]]),e(B,{limit:l(o).pageSize,"onUpdate:limit":s[5]||(s[5]=a=>l(o).pageSize=a),page:l(o).pageNo,"onUpdate:page":s[6]||(s[6]=a=>l(o).pageNo=a),total:l(x),onPagination:c},null,8,["limit","page","total"])]),_:1}),e(ke,{ref_key:"formRef",ref:V,onSuccess:c},null,512)],64)}}});export{xe as default};