沙钢智慧能源系统前端代码
houzhongjian
2024-10-09 314507f8ddadd9c66e98d260c3b2a5dad1a04015
1
import{d as U,as as p,a8 as q,ad as w,bM as G,bT as J,r as K,o as s,c as y,n as f,a as t,C as g,O as m,D as b,g as k,B as r,k as u,h as _,P as L,m as $,bA as N,F as Q,i as R,j as d,b4 as S,ae as V,ac as W,U as X,bs as Y,dO as Z,H as ee}from"./index-CHTXMeh8.js";import{E as ae,a as te}from"./el-descriptions-item-XOb4a1bP.js";import{_ as le}from"./DictTag.vue_vue_type_script_lang-DPOZRs0A.js";const se={class:"flex items-center"},re=ee(U({name:"Descriptions",__name:"Descriptions",props:{title:p.string.def(""),message:p.string.def(""),collapse:p.bool.def(!0),columns:p.number.def(1),schema:{type:Array,default:()=>[]},data:{type:Object,default:()=>({})}},setup(a){const F=q(),O=w(()=>F.getMobile),C=G(),j=J(),v=a,{getPrefixCls:B}=W(),i=B("descriptions"),D=w(()=>{const l=["title","message","collapse","schema","data","class"],c={...C,...v};for(const o in c)l.indexOf(o)!==-1&&delete c[o];return c}),n=K(!0),T=()=>{v.collapse&&(n.value=!t(n))};return(l,c)=>{const o=X,A=Y,M=le,P=ae,z=te,E=Z;return s(),y("div",{class:f([t(i),"bg-[var(--el-color-white)] dark:bg-[var(--el-bg-color)] dark:border-[var(--el-border-color)] dark:border-1px"])},[a.title?(s(),y("div",{key:0,class:f([`${t(i)}-header`,"h-50px flex justify-between items-center b-b-1 border-solid border-[var(--el-border-color)] px-10px cursor-pointer dark:border-[var(--el-border-color)]"]),onClick:T},[g("div",{class:f([`${t(i)}-header__title`,"relative font-18px font-bold ml-10px"])},[g("div",se,[m(b(a.title)+" ",1),a.message?(s(),k(A,{key:0,content:a.message,placement:"right"},{default:r(()=>[u(o,{class:"ml-5px",icon:"ep:warning"})]),_:1},8,["content"])):_("",!0)])],2),a.collapse?(s(),k(o,{key:0,icon:t(n)?"ep:arrow-down":"ep:arrow-up"},null,8,["icon"])):_("",!0)],2)):_("",!0),u(E,null,{default:r(()=>[L(g("div",{class:f([`${t(i)}-content`,"p-10px"])},[u(z,$({column:v.columns,direction:t(O)?"vertical":"horizontal",border:""},t(D)),N({default:r(()=>[(s(!0),y(Q,null,R(a.schema,e=>(s(),k(P,$({key:e.field,"min-width":"80"},(H=>{const I=["field"],x={...H};for(const h in x)I.indexOf(h)!==-1&&delete x[h];return x})(e)),{label:r(()=>[d(l.$slots,`${e.field}-label`,{row:{label:e.label}},()=>[m(b(e.label),1)],!0)]),default:r(()=>[e.dateFormat?d(l.$slots,"default",{key:0},()=>[m(b(a.data[e.field]!==null?t(S)(a.data[e.field]).format(e.dateFormat):""),1)],!0):e.dictType?d(l.$slots,"default",{key:1},()=>[u(M,{type:e.dictType,value:a.data[e.field]+""},null,8,["type","value"])],!0):d(l.$slots,e.field,{key:2,row:a.data},()=>[m(b(e.mappedField?a.data[e.mappedField]:a.data[e.field]),1)],!0)]),_:2},1040))),128))]),_:2},[t(j).extra?{name:"extra",fn:r(()=>[d(l.$slots,"extra",{},void 0,!0)]),key:"0"}:void 0]),1040,["column","direction"])],2),[[V,t(n)]])]),_:3})],2)}}}),[["__scopeId","data-v-74d4336e"]]);export{re as _};