沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{d as F,Q as I,J,r as p,b as O,a1 as Q,o as t,c as T,k as a,B as e,P as n,g as i,O as f,a as m,F as W,U as j,V as G,S as L,W as R,X as U,Y as V,Z as X}from"./index-BP6bNRoi.js";import{_ as Y}from"./ContentWrap.vue_vue_type_script_setup_true_lang-CR_2gECF.js";import{d as Z}from"./formatTime-DwR9f7DP.js";import{g as q,d as z}from"./index-BX1jjyoD.js";import{_ as A}from"./DataSourceConfigForm.vue_vue_type_script_setup_true_lang-mcacgB5r.js";import"./el-card-bU92WWV4.js";import"./Dialog.vue_vue_type_style_index_0_lang-DFckl8Er.js";const E=F({name:"InfraDataSourceConfig",__name:"index",setup(H){const _=I(),{t:C}=J(),o=p(!0),g=p([]),c=async()=>{o.value=!0;try{g.value=await q()}finally{o.value=!1}},b=p(),w=(y,s)=>{b.value.open(y,s)};return O(()=>{c()}),(y,s)=>{const v=j,d=G,x=L,h=R,k=Y,l=U,S=V,u=Q("hasPermi"),D=X;return t(),T(W,null,[a(k,null,{default:e(()=>[a(h,{class:"-mb-15px",inline:!0},{default:e(()=>[a(x,null,{default:e(()=>[n((t(),i(d,{type:"primary",plain:"",onClick:s[0]||(s[0]=r=>w("create"))},{default:e(()=>[a(v,{icon:"ep:plus",class:"mr-5px"}),f(" \u65B0\u589E ")]),_:1})),[[u,["infra:data-source-config:create"]]])]),_:1})]),_:1})]),_:1}),a(k,null,{default:e(()=>[n((t(),i(S,{data:m(g)},{default:e(()=>[a(l,{label:"\u4E3B\u952E\u7F16\u53F7",align:"center",prop:"id"}),a(l,{label:"\u6570\u636E\u6E90\u540D\u79F0",align:"center",prop:"name"}),a(l,{label:"\u6570\u636E\u6E90\u8FDE\u63A5",align:"center",prop:"url","show-overflow-tooltip":!0}),a(l,{label:"\u7528\u6237\u540D",align:"center",prop:"username"}),a(l,{label:"\u521B\u5EFA\u65F6\u95F4",align:"center",prop:"createTime",width:"180",formatter:m(Z)},null,8,["formatter"]),a(l,{label:"\u64CD\u4F5C",align:"center"},{default:e(r=>[n((t(),i(d,{link:"",type:"primary",onClick:P=>w("update",r.row.id),disabled:r.row.id===0},{default:e(()=>[f(" \u7F16\u8F91 ")]),_:2},1032,["onClick","disabled"])),[[u,["infra:data-source-config:update"]]]),n((t(),i(d,{link:"",type:"danger",onClick:P=>(async B=>{try{await _.delConfirm(),await z(B),_.success(C("common.delSuccess")),await c()}catch{}})(r.row.id),disabled:r.row.id===0},{default:e(()=>[f(" \u5220\u9664 ")]),_:2},1032,["onClick","disabled"])),[[u,["infra:data-source-config:delete"]]])]),_:1})]),_:1},8,["data"])),[[D,m(o)]])]),_:1}),a(A,{ref_key:"formRef",ref:b,onSuccess:c},null,512)],64)}}});export{E as default};