/*! * build: vue-admin-beautiful * vue-admin-beautiful author: chuzhixin 1204505056@qq.com * vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756 * time: 2024-10-10 11:14:28 */ (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a3a05cbc","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10","chunk-bb7ffe10"],{"271a":function(e,t,o){"use strict";var a=o("cb2d"),n=o("e330"),r=o("577e"),d=o("d6d6"),c=URLSearchParams,i=c.prototype,u=n(i.getAll),s=n(i.has),l=new c("a=1");!l.has("a",2)&&l.has("a",void 0)||a(i,"has",(function(e){var t=arguments.length,o=t<2?void 0:arguments[1];if(t&&void 0===o)return s(this,e);var a=u(this,e);d(t,1);var n=r(o),c=0;while(c(e.headers={token:c},e),e=>Promise.reject(e));const i=async(e,t)=>{await d.get(e,{responseType:"arraybuffer"}).then(e=>l(e,t))},u=async(e,t)=>{await d.post(e,{responseType:"arraybuffer"}).then(e=>l(e,t))},s=async(e,t)=>{await d.get(e,{responseType:"blob"}).then(e=>l(e,t))},l=(e,t)=>{const o=new Blob([e.data],{type:t.fileType?t.fileType:"application/octet-binary"}),a=window.URL.createObjectURL(o);f(a,t.fileName)},f=(e,t,o)=>{const a=document.createElement("a");a.href=e,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),(null==o||o)&&window.URL.revokeObjectURL(e)},b=async(e,t)=>{let o;return await d.get(e,{responseType:"blob"}).then(e=>{o=new Blob([e.data],{type:t||"application/octet-binary"})}),window.URL.createObjectURL(o)},p=async(e,t,o)=>{let a;return await d.post(e,t,{responseType:"blob"}).then(e=>{a=new Blob([e.data],{type:o||"application/octet-binary"})}),window.URL.createObjectURL(a)},h=async(e,t)=>{let o;return await d.get(e,{responseType:"blob"}).then(e=>{o=new Blob([e.data],{type:t||"application/octet-binary"})}),o};t["default"]={ajax:d,downloadFile:i,getFile:s,getDownloadFileUrl:b,downloadPostFile:u,getDownloadFileUrlByPost:p,getDownloadFileBlob:h,downloadBlob:f}},"4e55":function(e,t,o){},5494:function(e,t,o){"use strict";var a=o("83ab"),n=o("e330"),r=o("edd0"),d=URLSearchParams.prototype,c=n(d.forEach);a&&!("size"in d)&&r(d,"size",{get:function(){var e=0;return c(this,(function(){e++})),e},configurable:!0,enumerable:!0})},"59a3":function(e,t,o){e.exports={"menu-color":"hsla(0,0%,27%,.95)","menu-color-active":"hsla(208,100%,55%,.95)","menu-background":"#fff","gallery-second-menu-background":"#fff"}},"88a7":function(e,t,o){"use strict";var a=o("cb2d"),n=o("e330"),r=o("577e"),d=o("d6d6"),c=URLSearchParams,i=c.prototype,u=n(i.append),s=n(i["delete"]),l=n(i.forEach),f=n([].push),b=new c("a=1&a=2&b=3");b["delete"]("a",1),b["delete"]("b",void 0),b+""!=="a=2"&&a(i,"delete",(function(e){var t=arguments.length,o=t<2?void 0:arguments[1];if(t&&void 0===o)return s(this,e);var a=[];l(this,(function(e,t){f(a,{key:t,value:e})})),d(t,1);var n,c=r(e),i=r(o),b=0,p=0,h=!1,m=a.length;while(b[Object(a["createVNode"])(i,{prop:"name",label:e.$t("sensor.cgqmc"),width:"120",align:"center"},null,8,["label"]),Object(a["createVNode"])(i,{prop:"type",label:"传感器类型",width:"120",align:"center"}),Object(a["createVNode"])(i,{prop:"dataKey",label:"传输ID",width:"200",align:"center"}),Object(a["createVNode"])(i,{prop:"dataValue",label:"传感器数值",width:"200",align:"center"}),Object(a["createVNode"])(i,{prop:"unit",label:e.$t("sensor.dw"),width:"120",align:"center"},null,8,["label"]),Object(a["createVNode"])(i,{fixed:"right",label:e.$t("defalult.cz"),align:"center"},{default:Object(a["withCtx"])(({row:e})=>[Object(a["createVNode"])(u,{type:"text",onClick:t=>c.historical(e)},{default:Object(a["withCtx"])(()=>t[0]||(t[0]=[Object(a["createTextVNode"])("历史数据")])),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[f,d.listLoading]]),Object(a["createVNode"])(l,{ref:"edit"},null,512)])}o("14d9");var d=o("aa98"),c=o("3038"),i=o("7a86"),u={components:{sensorAdd:i["default"]},data(){return{sensorData:[],data:[],deviceCode:"",projectId:"",lazy:!0,layout:"total, sizes, prev, pager, next, jumper",total:0,background:!0,listLoading:!0,elementLoadingText:"正在加载...",deviceId:"",historyData:[],queryForm:{sensorName:"",deviceCode:""}}},computed:{height(){return 500}},created(){this.queryForm.deviceCode=this.$route.query.deviceCode,this.fetchData()},methods:{async fetchData(){this.listLoading=!0;const{data:e}=await Object(d["getLatestDataByDevice"])(this.queryForm);this.data=e,setTimeout(()=>{this.listLoading=!1},500)},async exportData(){const e=await Object(d["exportData"])(this.queryForm);c["default"].downloadFile(e,{fileName:"站点最新数据.xls"})},historical(e){this.$router.push({path:"/showIotData",name:"站点历史数据",query:{dataKey:e.dataKey,deviceCode:this.queryForm.deviceCode}})},handleAdd(){this.$refs["edit"].showEdit(this.queryForm.deviceId,0)},handleEdit(e){e.deviceId=this.queryForm.deviceId,this.$refs["edit"].showEdit(e,1)},search(){this.fetchData()},resetForm(){this.$refs.queryForm.resetFields()},handleQuery(){this.queryForm.page=1,this.fetchData()},handleSizeChange(e){this.queryForm.size=e,this.fetchData()},handleCurrentChange(e){this.queryForm.page=e,this.fetchData()}}},s=(o("ee33"),o("e9a0"),o("d959")),l=o.n(s);const f=l()(u,[["render",r],["__scopeId","data-v-41bceef6"]]);t["default"]=f},d6d6:function(e,t,o){"use strict";var a=TypeError;e.exports=function(e,t){if(e