water-ldht/dist/static/js/chunk-51755b8a.658431bc.js

7 lines
16 KiB
JavaScript
Raw Normal View History

2024-11-01 16:58:10 +08:00
/*!
* build: vue-admin-beautiful
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
* vue-admin-beautiful QQ Group(QQ群): 9724353191139183756
* time: 2024-10-10 11:14:28
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-51755b8a","chunk-04801e49","chunk-48c6c59a","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10"],{1134:function(e,t,a){"use strict";a.r(t);var o=a("f2bf");const n={class:"manage-container"},r={id:"main2",ref:"echarts",style:{height:"380px"}};function i(e,t,a,i,c,d){const u=Object(o["resolveComponent"])("el-date-picker"),s=Object(o["resolveComponent"])("el-form-item"),l=Object(o["resolveComponent"])("el-button"),f=Object(o["resolveComponent"])("vab-query-form"),h=Object(o["resolveComponent"])("el-form"),m=Object(o["resolveComponent"])("el-card"),b=Object(o["resolveComponent"])("el-table-column"),p=Object(o["resolveComponent"])("el-table"),g=Object(o["resolveDirective"])("loading");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",n,[Object(o["createVNode"])(h,{ref:"queryForm",model:c.queryForm,"label-width":"80px"},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(f,null,{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(s,{width:"100",label:e.$t("defalult.sj")},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(u,{modelValue:c.startDate,"onUpdate:modelValue":t[0]||(t[0]=e=>c.startDate=e),type:"daterange","range-separator":"-","start-placeholder":"开始日期","end-placeholder":"结束日期",onChange:d.handleStartDateChange},null,8,["modelValue","onChange"])]),_:1},8,["label"]),Object(o["createVNode"])(s,{width:"100"},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(l,{onClick:t[1]||(t[1]=e=>d.resetForm())},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.chongz")),1)]),_:1}),Object(o["createVNode"])(l,{type:"primary",size:"medium",onClick:d.search},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.cx")),1)]),_:1},8,["onClick"]),Object(o["createVNode"])(l,{type:"primary",size:"medium",onClick:d.exportData},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.dc")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})]),_:1},8,["model"]),Object(o["createVNode"])(m,{style:{height:"380px"}},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("div",r,null,512)]),_:1}),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createBlock"])(p,{data:c.data,border:"",stripe:"",style:{width:"100%"}},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(b,{prop:"name",label:e.$t("sensor.cgqmc"),width:"200",align:"center"},null,8,["label"]),Object(o["createVNode"])(b,{prop:"type",label:"传感器类型",width:"120",align:"center"}),Object(o["createVNode"])(b,{prop:"dataKey",label:"传输id",width:"120",align:"center"}),Object(o["createVNode"])(b,{prop:"dataValue",label:"值",width:"120",align:"center"}),Object(o["createVNode"])(b,{prop:"unit",label:e.$t("sensor.dw"),width:"120",align:"center"},null,8,["label"])]),_:1},8,["data"])),[[g,c.listLoading]])])}var c=a("aa98"),d=a("5f99"),u=a("313e"),s=a("3038"),l={components:{},data(){return{newTableData1:[],data:[],deviceCode:"",projectId:"",lazy:!0,layout:"total, sizes, prev, pager, next, jumper",total:0,background:!0,listLoading:!0,elementLoadingText:"正在加载...",deviceId:"",historyData:[],queryForm:{sensorName:"",deviceCode:""},startDate:""}},computed:{height(){return 500}},created(){this.queryForm.end=this.queryForm.start=Object(d["getFMdate"])(-1),this.queryForm.dataKey=this.$route.query.dataKey,this.queryForm.deviceCode=this.$route.query.deviceCode,this.setDefaultTime(),this.fetchData()},methods:{async fetchData(){this.listLoading=!0;const{data:e}=await Object(c["getLatestDataByDevices"])(this.queryForm);this.data=e,this.total=e.length,this.handleCurrentChange(1),setTimeout(()=>{this.listLoading=!1,this.getHistoryData()},500)},handleStartDateChange(){if(this.startDate&&this.startDate.length>0){const e=+new Date(this.startDate[0]),t=+new Date(this.startDate[1]);t>e+2592e6?this.$alert("日期的起止时<EFBFBD>