Files
wysite/hc-pos.sqygj.cn/static/js/chunk-47b4cce5.4595a608.js

1 line
14 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-47b4cce5"],{"0748":function(e,t,a){"use strict";a.d(t,"e",(function(){return r})),a.d(t,"b",(function(){return i})),a.d(t,"d",(function(){return o})),a.d(t,"j",(function(){return s})),a.d(t,"h",(function(){return c})),a.d(t,"a",(function(){return l})),a.d(t,"i",(function(){return u})),a.d(t,"c",(function(){return d})),a.d(t,"f",(function(){return h})),a.d(t,"g",(function(){return p}));var n=a("b775");function r(e){return Object(n["a"])({url:"/appproject/MetersNode/findMetersNodetree",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/appproject/MetersNode/create",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/appproject/MetersNode/delete",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/appproject/MetersNode/update",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/appproject/MetersDevice/pageList",method:"post",data:e})}function l(e){return Object(n["a"])({url:"/appproject/MetersDevice/createBatch",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/appproject/MetersDevice/update",method:"post",data:e})}function d(e){return Object(n["a"])({url:"/appproject/MetersDevice/delete",method:"post",data:e})}function h(e){return Object(n["a"])({url:"/appproject/meters/metersDataCount",method:"post",data:e})}function p(e){return Object(n["a"])({url:"/appproject/MetersNode/metersNodeDataList",method:"post",data:e})}},"1f55":function(e,t,a){},"61ac":function(e,t,a){"use strict";a("1f55")},a76b:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"manageNetwork"},[a("div",{staticClass:"elcard"},[a("el-row",{attrs:{gutter:12}},[a("el-col",{attrs:{span:6}},[a("el-card",{staticClass:"box-card",attrs:{shadow:"hover"}},[a("div",{staticClass:"planLst",attrs:{slot:"header"},slot:"header"},[a("span",{staticClass:"planTitle"},[e._v("节点管理")]),e._v(" "),a("span",{on:{click:function(t){e.isShow=!e.isShow}}},[a("i",{class:{icons:!0,"el-icon-arrow-down":!e.isShow,"el-icon-arrow-up":e.isShow}})])]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}]},[a("el-input",{attrs:{clearable:"",placeholder:"输入关键字进行过滤"},model:{value:e.filterText,callback:function(t){e.filterText=t},expression:"filterText"}}),e._v(" "),a("el-tree",{directives:[{name:"loading",rawName:"v-loading",value:e.treeLoading,expression:"treeLoading"}],ref:"tree",staticClass:"filter-tree",staticStyle:{padding:"15px 0px"},attrs:{data:e.tableTree,"show-checkbox":"","default-expand-all":"","node-key":"id","check-strictly":!0,"default-checked-keys":e.expandDefault,"highlight-current":"","filter-node-method":e.filterNode,props:e.defaultProps},on:{check:e.checkInfo}})],1)])],1),e._v(" "),a("el-col",{attrs:{span:18}},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-card",{attrs:{shadow:"hover"}},[a("div",{staticClass:"planLst",attrs:{slot:"header"},slot:"header"},[a("span",{staticClass:"planTitle"},[e._v("查询选项")]),e._v(" "),a("span",{on:{click:function(t){e.iFshow=!e.iFshow}}},[a("i",{class:{icon:!0,"el-icon-arrow-down":!e.iFshow,"el-icon-arrow-up":e.iFshow}})])]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.iFshow,expression:"iFshow"}]},[a("span",{staticClass:"energySub",staticStyle:{"font-size":"14px"}},[e._v("能源分项:\n "),a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.electric,callback:function(t){e.electric=t},expression:"electric"}},e._l(e.options,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("span",{staticClass:"energySub",staticStyle:{"font-size":"14px"}},[e._v("时间类型:\n "),a("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){return e.handleChange(e.timeType)}},model:{value:e.timeType,callback:function(t){e.timeType=t},expression:"timeType"}},e._l(e.timeTypeArr,(function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),a("span",{staticStyle:{"font-size":"14px"}},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd",type:e.timeDate,"picker-options":e.pickerOptions,placeholder:"选择日期"},model:{value:e.timevalue,callback:function(t){e.timevalue=t},expression:"timevalue"}})],1),e._v(" "),a("span",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary"},on:{click:e.queryButt}},[e._v("查询")])],1),e._v(" "),a("span",[a("el-button",{directives:[{name:"points",rawName:"v-points",value:500,expression:"500"}],attrs:{type:"primary",disabled:""}},[e._v("导出")])],1)])])],1),e._v(" "),a("el-col",{staticStyle:{"margin-top":"15px"},attrs:{span:24}},[a("el-card",{attrs:{shadow:"hover"}},[a("div",{staticClass:"planLst",attrs:{slot:"header"},slot:"header"},[a("span",{staticClass:"planTitle"},[e._v("能源趋势图")]),e._v(" "),a("span",{on:{click:function(t){e.trendShow=!e.trendShow}}},[a("i",{class:{icon:!0,"el-icon-arrow-down":!e.trendShow,"el-icon-arrow-up":e.trendShow}})])]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.trendShow,expression:"trendShow"}]},[0===e.checkedNodes.length?a("div",{staticClass:"noData"},[e._v("暂无数据")]):e._e(),e._v(" "),e.checkedNodes.length>0?a("div",{ref:"chartEl",staticStyle:{height:"350px",width:"100%"}}):e._e()])])],1),e._v(" "),a("el-col",{staticStyle:{"margin-top":"15px"},attrs:{span:24}},[a("el-card",{attrs:{shadow:"hover"}},[a("div",{staticClass:"planLst",attrs:{slot:"header"},slot:"header"},[a("span",{staticClass:"planTitle"},[e._v("数据显示(单位kWh)")]),e._v(" "),a("span",{on:{click:function(t){e.dataDisplay=!e.dataDisplay}}},[a("i",{class:{icon:!0,"el-icon-arrow-down":!e.dataDisplay,"el-icon-arrow-up":e.dataDisplay}})])]),e._v(" "),a("div",{directives:[{name:"show",rawName:"v-show",value:e.dataDisplay,expression:"dataDisplay"}]},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.isLoad,expression:"isLoad"}],staticStyle:{width:"100%"},attrs:{border:"","header-cell-style":e.headClass,data:e.tableData.slice((e.currentPage-1)*e.pageSize,e.currentPage*e.pageSize),"tooltip-effect":"dark"}},e._l(e.tableColumn,(function(e){return a("el-table-column",{key:e.nodeId,attrs:{prop:e.prop,align:"center",label:e.label}})})),1),e._v(" "),a("div",{staticClass:"paginations"},[a("el-pagination",{attrs:{layout:"total, sizes, prev, pager, next, jumper","current-page":e.currentPage,"page-sizes":[10,30,50,100,200],"page-size":e.pageSize,total:e.tableData.length},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)])],1)],1)],1)],1)],1)])},r=[],i=a("ed08"),o=a("0748");function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,a="function"==typeof Symbol?Symbol:{},n=a.iterator||"@@iterator",r=a.toStringTag||"@@toStringTag";function i(a,n,r,i){var c=n&&n.prototype instanceof s?n:s,u=Object.create(c.prototype);return l(u,"_invoke",function(a,n,r){var i,s,c,l=0,u=r||[],d=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,a){return i=t,s=0,c=e,h.n=a,o}};function p(a,n){for(s=a,c=n,t=0;!d&&l&&!r&&t<u.length;t++){var r,i=u[t],p=h.p,f=i[2];a>3?(r=f===n)&&(c=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((r=a<2&&p<i[1])?(s=0,h.v=n,h.n=i[1]):p<f&&(r=a<3||i[0]>n||n>f)&&(i[4]=a,i[5]=n,h.n=f,s=0))}if(r||a>1)return o;throw d=!0,n}return function(r,u,f){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,f),s=u,c=f;(t=s<2?e:c)||!d;){i||(s?s<3?(s>1&&(h.n=-1),p(s,c)):h.n=c:h.v=c);try{if(l=2,i){if(s||(r="next"),t=i[r]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),s=1);i=e}else if((t=(d=h.n<0)?c:a.call(n,h))!==o)break}catch(t){i=e,s=1,c=t}finally{l=1}}return{value:t,done:d}}}(a,r,i),!0),u}var o={};function s(){}function u(){}function d(){}t=Object.getPrototypeOf;var h=[][n]?t(t([][n]())):(l(t={},n,(function(){return this})),t),p=d.prototype=s.prototype=Object.create(h);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,l(e,r,"GeneratorFunction")),e.prototype=Object.create(p),e}return u.prototype=d,l(p,"constructor",d),l(d,"constructor",u),u.displayName="GeneratorFunction",l(d,r,"GeneratorFunction"),l(p),l(p,r,"Generator"),l(p,n,(function(){return this})),l(p,"toString",(function(){return"[object Generator]"})),(c=function(){return{w:i,m:f}})()}function l(e,t,a,n){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}l=function(e,t,a,n){function i(t,a){l(e,t,(function(e){return this._invoke(t,a,e)}))}t?r?r(e,t,{value:a,enumerable:!n,configurable:!n,writable:!n}):e[t]=a:(i("next",0),i("throw",1),i("return",2))},l(e,t,a,n)}function u(e,t,a,n,r,i,o){try{var s=e[i](o),c=s.value}catch(e){return void a(e)}s.done?t(c):Promise.resolve(c).then(n,r)}function d(e){return function(){var t=this,a=arguments;return new Promise((function(n,r){var i=e.apply(t,a);function o(e){u(i,n,r,o,s,"next",e)}function s(e){u(i,n,r,o,s,"throw",e)}o(void 0)}))}}function h(e,t,a){return(t=p(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function p(e){var t=f(e,"string");return"symbol"==s(t)?t:t+""}function f(e,t){if("object"!=s(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var v={watch:{filterText:function(e){this.$refs.tree.filter(e)},checkDefault:function(e,t){e&&this.$nextTick((function(){document.querySelector(".el-tree-node__content").click()}))}},data:function(){return h(h({chart:"",total:0,currentPage:1,pageSize:10,isLoad:!1,treeLoading:!1,dataDisplay:!0,activeName:"1",trendShow:!0,isShow:!0,iFshow:!0,electric:1,filterText:"",timeType:2,timevalue:"",expandDefault:[],checkedNodes:[],tableTree:[],defaultProps:{children:"childrenList",label:"name"},tableData:[],tableColumn:[],options:[{value:1,label:"电"}],timeTypeArr:[{value:1,label:"年"},{value:2,label:"月"},{value:3,label:"日"}],timeDate:"month",metersData:[]},"chart",null),"pickerOptions",{disabledDate:function(e){return e.getTime()>Date.now()}})},mounted:function(){var e=this,t=new Date,a=Object(i["c"])(t,"yyyy-MM-dd");this.timevalue=a,this.headClass(),this.getTableTree().then((function(){e.getMetersData()}))},beforeDestroy:function(){this.chart&&(this.chart.dispose(),this.chart=null)},methods:{initChart:function(){this.chart||(this.chart=this.$echarts.init(this.$refs.chartEl));var e=this.getChartData();this.chart.setOption(e)},initTable:function(){var e=this;if(this.tableColumn.push({prop:"countDate",label:"时间",tabId:"countDate__0000001"}),this.metersData.length){this.metersData.forEach((function(t){e.tableColumn.push({label:t.nodeName,prop:"countValue__".concat(t.nodeId),nodeId:t.nodeId})}));var t=this.metersData[0].countDateList;t.forEach((function(t,a){var n={countDate:t};e.metersData.forEach((function(r){var i=r.countValueList,o=r.nodeId;n.tabId="".concat(t,"__").concat(o),e.tableColumn.forEach((function(e){var t=e.prop;t==="countValue__".concat(o)&&(n[t]=i[a])}))})),e.tableData.push(n)}))}},getXaxisData:function(){if(1===this.timeType)return Array.from({length:12},(function(e,t){return t+1>9?t+1:"0"+(t+1)}));if(2===this.timeType){var e=new Date(this.timevalue);return e.setMonth(e.getMonth()+1),e.setDate(0),Array.from({length:e.getDate()},(function(e,t){return t+1>9?t+1:"0"+(t+1)}))}return Array.from({length:24},(function(e,t){return t+1>9?t+1:"0"+(t+1)}))},getChartData:function(){this.chart.clear();var e=this.metersData,t=[],a=[];e.forEach((function(e){var n=e.nodeName,r=e.countValueList;t.push(n),a.push({name:n,symbol:"circle",type:"line",data:r})}));var n={tooltip:{trigger:"axis"},legend:{data:t,orient:"vertical",y:"center",x:"right"},grid:{left:"3%",right:"12%",bottom:"3%",containLabel:!0},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!1,data:this.getXaxisData()},yAxis:{type:"value"},series:a};return n},handleChange:function(e){1===e?this.timeDate="year":2===e?this.timeDate="month":3===e&&(this.timeDate="date")},getMetersData:function(){var e=this;if(0!==this.checkedNodes.length){this.currentPage=1,this.pageSize=10,this.isLoad=!0,this.tableData=[],this.metersData=[],this.tableColumn=[];var t=[];this.checkedNodes.length>0&&this.checkedNodes.forEach((function(e){t.push({id:e.id,name:e.name})}));var a={nodeList:t,queryDate:this.timevalue,queryType:this.timeType};Object(o["f"])(a).then((function(t){0===t.code&&(e.metersData=t.data,e.initChart(),e.initTable(),e.isLoad=!1)})).catch((function(){e.isLoad=!1}))}},checkInfo:function(e,t){this.checkedNodes=t.checkedNodes},queryButt:function(){0!=this.checkedNodes.length?this.getMetersData():this.$message({message:"请勾选左侧节点数据!",type:"error"})},filterNode:function(e,t){return!e||-1!==t.name.indexOf(e)},getTableTree:function(){var e=d(c().m((function e(){var t;return c().w((function(e){while(1)switch(e.n){case 0:return this.treeLoading=!0,e.n=1,Object(o["e"])({projectCode:this.$store.state.community_uuid});case 1:t=e.v,t&&(this.tableTree=t.data,this.tableTree.length>0&&(this.expandDefault.push(this.tableTree[0].id),this.$nextTick((function(){this.checkedNodes=this.$refs.tree.getCheckedNodes()}))),this.treeLoading=!1);case 2:return e.a(2)}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleSizeChange:function(e){this.currentPage=1,this.pageSize=e},handleCurrentChange:function(e){this.currentPage=e},headClass:function(){return"text-align:center;background:#FAFAFA;"}}},m=v,b=(a("61ac"),a("829d")),y=Object(b["a"])(m,n,r,!1,null,"26dbfe28",null);t["default"]=y.exports}}]);