import{aL as z,aT as H,a0 as $,ax as Q,M as T}from"./index.17037962789732.js";import"./index.1703796278973300.js";import"./index.170379627897315.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import"./index.170379627897336.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import"./index.170379627897318.js";import"./index.170379627897319.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./index.170379627897322.js";import"./index.170379627897323.js";import"./index.170379627897324.js";import"./index.170379627897325.js";import"./index.170379627897326.js";import"./index.170379627897327.js";import"./index.170379627897328.js";import"./Item.1703796278973.js";import{q as X,d as Y}from"./mjg.17037962789732.js";import{d as S,k as e,v as Z,V as w,a3 as ee,r as u,o as i,c as P,a as l,b as r,z as p,x as y,A,F as R,t as te,u as _,h as oe,G as ae,H as se}from"./vue.1703796278973.js";import{_ as ne}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./permission.1703796278973.js";import"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const le=d=>(ae("data-v-469d131a"),d=d(),se(),d),re={class:"monitor-report"},ie={class:"tree-nav"},de={key:0,style:{color:"#1890ff"}},pe={class:"content"},ce=le(()=>p("span",{class:"table-title"},"空气净化器设备2022-03-10报表",-1)),me=S({name:"DeviceMonitor"}),ue=S({...me,setup(d){const c=e({}),k=e();let B=e(0);const J=e(0),v=e({}),x=e(""),f=e(0);let h=e();const L=e(!1),m=e([]),M=e("object"),j=[{title:"全部",key:"0-0",children:[{title:"环境监测",key:"0-0-0",disabled:!0,children:[{title:"二级类目",key:"0-0-0-0",disableCheckbox:!0},{title:"二级类目",key:"0-0-0-1"}]},{title:"库房监测",key:"0-0-1",children:[{key:"0-0-1-0",title:"二级类目"}]}]}],g=e(["0-0-0","0-0-1"]),b=e(["0-0-0","0-0-1"]),I=e(["0-0-0","0-0-1"]),F=e([{title:"采集刻度",dataIndex:"type",search:{type:"select",options:[{label:"分钟",value:1},{label:"小时",value:2},{label:"天",value:3},{label:"月",value:4}],componentProps:{placeholder:"请选择类型"}}},{title:"开始时间",dataIndex:"time",search:{type:"date",componentProps:{placeholder:"请选择开始时间"}}},{title:"结束时间",dataIndex:"time",search:{type:"date",componentProps:{placeholder:"请选择结束时间"}}}]),V=s=>{let t=[];for(let n in s)t.push(n+"="+s[n]);h.value={where:t.join(" and ")},m.value=[]},q=(s,t)=>{if(!s)return[];const n=[{key:"update",text:"编辑",tooltip:{title:"编辑"},icon:"EditOutlined",onClick:async()=>{x.value="编辑单位信息",f.value=2,v.value=s,w(()=>{k.value.show(s)})}},{key:"delete",text:"删除",tooltip:{title:"删除"},icon:"DeleteOutlined",popConfirm:{title:"确认删除?",okText:" 确定",cancelText:"取消",onConfirm:async()=>{(await Y(s.id)).status===200?(T.success("操作成功!"),c.value.reload()):T.error("操作失败!")}}}];return B.value=n.length,n},C=Z({columns:[{title:"日期",dataIndex:"code",key:"code"},{title:"温度",dataIndex:"name",key:"name"},{title:"湿度",dataIndex:"warehouseId",key:"warehouseId"},{title:"PM2.5",dataIndex:"storageType",key:"storageType"},{title:"TVOC级",dataIndex:"linkAddress",key:"linkAddress"},{title:"风速值",dataIndex:"cols",key:"cols"},{title:"报警状态",dataIndex:"groups",key:"groups"},{title:"开关状态",dataIndex:"layers",key:"layers"},{title:"备注",dataIndex:"memo",key:"memo"}],add:async()=>{x.value="新增密集柜",f.value=0,J.value=3,w(()=>{k.value.show(v.value)})},refresh:()=>{c.value.reload()}});return ee(C),(s,t)=>{const n=z,K=H,D=u("AIcon"),U=W,E=$,G=Q,N=u("FullPage"),O=u("page-container");return i(),P(O,null,{default:l(()=>[r(N,null,{default:l(()=>[p("div",re,[p("div",ie,[r(n,{expandedKeys:g.value,"onUpdate:expandedKeys":t[0]||(t[0]=o=>g.value=o),selectedKeys:b.value,"onUpdate:selectedKeys":t[1]||(t[1]=o=>b.value=o),checkedKeys:I.value,"onUpdate:checkedKeys":t[2]||(t[2]=o=>I.value=o),checkable:"","tree-data":j},{title:l(({title:o,key:a})=>[a==="0-0-1-0"?(i(),y("span",de,A(o),1)):(i(),y(R,{key:1},[te(A(o),1)],64))]),_:1},8,["expandedKeys","selectedKeys","checkedKeys"])]),p("div",pe,[r(K,{columns:F.value,onSearch:V,type:M.value},null,8,["columns","type"]),r(G,{ref_key:"tableRef",ref:c,columns:_(C).columns,request:_(X),model:"TABLE",expandedRowKeys:m.value,"onUpdate:expandedRowKeys":t[3]||(t[3]=o=>m.value=o),scroll:{y:550},defaultParams:{paging:!1,sorts:[{name:"sortIndex",order:"asc"},{name:"createTime",order:"desc"}]},params:_(h),loading:L.value},{headerTitle:l(()=>[ce]),action:l(o=>[r(E,null,{default:l(()=>[(i(!0),y(R,null,oe(q(o,"table"),(a,ye)=>(i(),P(U,{key:a.key,disabled:a.disabled,popConfirm:a.popConfirm,hasPermission:"device/Category:"+a.key,tooltip:{...a.tooltip},onClick:a.onClick,type:"link",style:{padding:"0px"},danger:a.key==="delete"},{icon:l(()=>[r(D,{type:a.icon},null,8,["type"])]),_:2},1032,["disabled","popConfirm","hasPermission","tooltip","onClick","danger"]))),128))]),_:2},1024)]),_:1},8,["columns","request","expandedRowKeys","params","loading"])])])]),_:1})]),_:1})}}});const lt=ne(ue,[["__scopeId","data-v-469d131a"]]);export{lt as default};