/*! * 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-e9e88bd2","chunk-b162de44"],{"198a":function(e,t,a){"use strict";a.r(t);var o=a("f2bf");const r={class:"manage-container"},n={class:"manage-wrap"},c={class:"manage-input"},i={class:"manage-button"};function d(e,t,a,d,l,u){const s=Object(o["resolveComponent"])("el-input"),m=Object(o["resolveComponent"])("el-form-item"),p=Object(o["resolveComponent"])("el-date-picker"),h=Object(o["resolveComponent"])("vab-query-form"),f=Object(o["resolveComponent"])("el-form"),b=Object(o["resolveComponent"])("el-button"),j=Object(o["resolveComponent"])("el-table-column"),v=Object(o["resolveComponent"])("el-table"),g=Object(o["resolveComponent"])("el-pagination"),y=Object(o["resolveComponent"])("water-graph"),O=Object(o["resolveDirective"])("loading");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",r,[Object(o["createElementVNode"])("div",n,[Object(o["createElementVNode"])("div",c,[Object(o["createVNode"])(f,{ref:"queryForm",model:l.queryForm,"label-width":"80px"},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(h,null,{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(m,{width:"150",prop:"deviceName",label:e.$t("dataEnquiry.zdmc")},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(s,{modelValue:l.queryForm.deviceName,"onUpdate:modelValue":t[0]||(t[0]=e=>l.queryForm.deviceName=e),size:"small",placeholder:e.$t("dataEnquiry.qsrzdmc")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),Object(o["createVNode"])(m,{width:"100",prop:"month",label:e.$t("defalult.sj")},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(p,{modelValue:l.queryForm.month,"onUpdate:modelValue":t[1]||(t[1]=e=>l.queryForm.month=e),size:"small",type:"month",placeholder:e.$t("dfunction.xzsj"),onChange:u.standardToTime},null,8,["modelValue","placeholder","onChange"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])]),Object(o["createElementVNode"])("div",i,[Object(o["createVNode"])(b,{size:"small",onClick:t[2]||(t[2]=e=>u.resetForm())},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.chongz")),1)]),_:1}),Object(o["createVNode"])(b,{type:"primary",size:"small",onClick:u.search},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.cx")),1)]),_:1},8,["onClick"]),Object(o["createVNode"])(b,{type:"primary",size:"small",onClick:u.exportData},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("defalult.dc")),1)]),_:1},8,["onClick"])])]),Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createBlock"])(v,{ref:"multipleTable",data:l.reportData,border:"","tooltip-effect":"light",style:{width:"100%"}},{default:Object(o["withCtx"])(()=>[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(l.headerData,(e,t)=>(Object(o["openBlock"])(),Object(o["createBlock"])(j,{key:t,label:e,prop:e,fixed:"站点名称"==e,align:"center",width:"150"},null,8,["label","prop","fixed"]))),128)),Object(o["createVNode"])(j,{fixed:"right",label:e.$t("defalult.cz"),align:"center"},{default:Object(o["withCtx"])(({row:t})=>[Object(o["createVNode"])(b,{type:"text",onClick:e=>u.graph(t)},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.$t("dfunction.qxt")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[O,l.listLoading]]),Object(o["createVNode"])(g,{background:l.background,"current-page":l.queryForm.page,layout:l.layout,"page-size":l.queryForm.size,total:l.total,style:{"text-align":"right"},onCurrentChange:u.handleCurrentChange,onSizeChange:u.handleSizeChange},null,8,["background","current-page","layout","page-size","total","onCurrentChange","onSizeChange"]),Object(o["createVNode"])(y,{ref:"water"},null,512)])}a("14d9");var l=a("94b0"),u=a("3038"),s=a("4b95"),m={name:"Index",components:{waterGraph:s["default"]},data(){return{reportData:[],headerData:{},lazy:!0,activeName:"first",layout:"total, sizes, prev, pager, next, jumper",total:0,input:"",textarea:"",background:!0,listLoading:!0,elementLoadingText:"正在加载...",queryForm:{page:1,size:20,month:"",projectId:"",deviceName:""}}},computed:{height(){return 500}},created(){this.setDefaultTime(),this.queryForm.projectId=sessionStorage.getItem("projectId"),setTimeout(()=>{this.fetchData()},1e3)},methods:{graph(e){this.$refs["water"].showData(e,"waterChar")},getDate(e=""){var t=new Date;""!=e&&(t=new Date(e));const a=t.getFullYear();let o=t.getMonth();return o+=1,o=o.toString().padStart(2,"0"),`${a}-${o}`},standardToTime(){this.queryForm.month=this.getDate(this.queryForm.month)},setDefaultTime(){this.queryForm.month=this.getDate()},async exportData(){const e=await Object(l["exportDevice"])(this.queryForm);u["default"].downloadFile(e,{fileName:"水量日报.xls"})},async fetchData(){this.listLoading=!0;const{data:e}=await Object(l["monthlyReport"])(this.queryForm),t=e.items;for(var a=[],o=0;o{this.listLoading=!1},500)},showData(){this.setDefaultTime(),this.queryForm.projectId=sessionStorage.getItem("projectId"),setTimeout(()=>{this.fetchData()},1e3)},search(){this.fetchData()},resetForm(){this.$refs.queryForm.resetFields()},handleAdd(){this.$refs["edit"].showEdit()},handleEdit(e){this.$refs["edit"].showEdit(e)},handleQuery(){this.queryForm.page=1,this.fetchData()},handleSizeChange(e){this.queryForm.size=e,this.fetchData()},handleCurrentChange(e){this.queryForm.page=e,this.fetchData()}}},p=(a("3318"),a("d959")),h=a.n(p);const f=h()(m,[["render",d],["__scopeId","data-v-6cd72396"]]);t["default"]=f},3038:function(e,t,a){"use strict";a.r(t);a("88a7"),a("271a"),a("5494");var o=a("bc3a"),r=a.n(o),n=a("4360");const c=r.a.create({baseURL:Object({NODE_ENV:"production",VUE_APP_AUTHOR:"Cc",VUE_APP_TITLE:"力鼎环保",VUE_APP_UPDATE_TIME:"2024-10-10 11:14:28",VUE_APP_VERSION:"1.0.0",BASE_URL:""}).VUE_APP_BASE_API,timeout:1e5}),i=n["default"].getters["user/token"];c.interceptors.request.use(e=>(e.headers={token:i},e),e=>Promise.reject(e));const d=async(e,t)=>{await c.get(e,{responseType:"arraybuffer"}).then(e=>s(e,t))},l=async(e,t)=>{await c.post(e,{responseType:"arraybuffer"}).then(e=>s(e,t))},u=async(e,t)=>{await c.get(e,{responseType:"blob"}).then(e=>s(e,t))},s=(e,t)=>{const a=new Blob([e.data],{type:t.fileType?t.fileType:"application/octet-binary"}),o=window.URL.createObjectURL(a);m(o,t.fileName)},m=(e,t,a)=>{const o=document.createElement("a");o.href=e,o.download=t,document.body.appendChild(o),o.click(),document.body.removeChild(o),(null==a||a)&&window.URL.revokeObjectURL(e)},p=async(e,t)=>{let a;return await c.get(e,{responseType:"blob"}).then(e=>{a=new Blob([e.data],{type:t||"application/octet-binary"})}),window.URL.createObjectURL(a)},h=async(e,t,a)=>{let o;return await c.post(e,t,{responseType:"blob"}).then(e=>{o=new Blob([e.data],{type:a||"application/octet-binary"})}),window.URL.createObjectURL(o)},f=async(e,t)=>{let a;return await c.get(e,{responseType:"blob"}).then(e=>{a=new Blob([e.data],{type:t||"application/octet-binary"})}),a};t["default"]={ajax:c,downloadFile:d,getFile:u,getDownloadFileUrl:p,downloadPostFile:l,getDownloadFileUrlByPost:h,getDownloadFileBlob:f,downloadBlob:m}},3318:function(e,t,a){"use strict";a("82ae")},"4b95":function(e,t,a){"use strict";a.r(t);var o=a("f2bf");const r=["id"];function n(e,t,a,n,c,i){const d=Object(o["resolveComponent"])("el-card"),l=Object(o["resolveComponent"])("el-dialog"),u=Object(o["resolveDirective"])("loading");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createVNode"])(l,{modelValue:c.dialogFormVisible,"onUpdate:modelValue":t[0]||(t[0]=e=>c.dialogFormVisible=e),title:c.title,width:"1500px",height:"400px",onClose:e.close},{default:Object(o["withCtx"])(()=>[Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createBlock"])(d,{style:{height:"400px"}},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("div",{id:c.divId,ref:"echarts",style:{height:"380px"}},null,8,r)]),_:1})),[[u,c.loading]])]),_:1},8,["modelValue","title","onClose"])])}a("14d9");var c=a("313e"),i=a("aa98"),d={name:"Watergraph",data(){return{title:"曲线图",dialogFormVisible:!1,chartData:[],loading:!0,divId:"waterChar"}},created(){},methods:{showData(e,t){this.divId=t,this.loading=!0,this.dialogFormVisible=!0,this.chartData=[],this.chartData=JSON.stringify(e),this.title=e["站点名称"]+" - 曲线图",setTimeout(()=>{this.chartIni(),this.loading=!1},3e3)},chartIni(){var e,t=c["a"](document.getElementById(""+this.divId)),a=JSON.parse(this.chartData),o=[],r=[];for(const c in a)"站点名称"!==c&&(o.push(a[c]),r.push([c,a[c]]));var n=Math.min.apply(null,o),i=Math.max.apply(null,o);e={tooltip:{trigger:"axis",position:function(e){return[e[0],"10%"]}},title:{left:"center",text:"折线图"},toolbox:{feature:{dataZoom:{yAxisIndex:"none"},restore:{},saveAsImage:{}}},xAxis:{type:"time",boundaryGap:!1},yAxis:{type:"value",boundaryGap:[0,"100%"],min:n,max:i},dataZoom:[{type:"inside",start:0,end:20},{start:0,end:20}],series:[{name:"数据",type:"line",smooth:!0,symbol:"none",areaStyle:{},data:r}]},e&&t.setOption(e)},async getReportHistory(){var e,t=c["a"](document.getElementById("main4"));const{data:a}=await Object(i["getReportHistoryData"])(this.queryForm);var o=[];for(let c=0;c