2 lines
16 KiB
JavaScript
2 lines
16 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-03aa0638"],{2183:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container priceDifference"},[a("div",{staticClass:"decorate"}),a("div",{staticClass:"priceBox"},[a("div",{staticClass:"filter-container"},[e._m(0),a("div",{staticClass:"box"},[a("div",{staticClass:"tab left",class:{clicked:1==e.listQuery.timeType},on:{click:function(t){e.listQuery.timeType=1}}},[e._v(" "+e._s(e.$t("electrovalence.day"))+" ")]),a("div",{staticClass:"tab right",class:{clicked:2==e.listQuery.timeType},on:{click:function(t){e.listQuery.timeType=2}}},[e._v(" "+e._s(e.$t("electrovalence.month"))+" ")]),a("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:1==e.listQuery.timeType,expression:"listQuery.timeType == 1"}],staticClass:"long",attrs:{type:"daterange","value-format":"yyyy-MM-dd","range-separator":"-","start-placeholder":e.$t("startTime"),"end-placeholder":e.$t("endTime")},on:{change:e.getList},model:{value:e.arrayTime,callback:function(t){e.arrayTime=t},expression:"arrayTime"}}),a("el-date-picker",{directives:[{name:"show",rawName:"v-show",value:2==e.listQuery.timeType,expression:"listQuery.timeType == 2"}],staticClass:"long",staticStyle:{width:"350px"},attrs:{type:"monthrange","value-format":"yyyy-MM","range-separator":"-","start-placeholder":e.$t("startTime"),"end-placeholder":e.$t("endTime")},on:{change:e.getList},model:{value:e.arrayTime,callback:function(t){e.arrayTime=t},expression:"arrayTime"}}),a("el-cascader",{staticClass:"filter-item",staticStyle:{margin:"0","margin-left":"10px"},attrs:{"collapse-tags":"",options:e.areaIdList,placeholder:e.$t("listQuery.areaId"),props:{checkStrictly:!0,emitPath:!1},clearable:""},on:{change:e.getList},model:{value:e.listQuery.areaId,callback:function(t){e.$set(e.listQuery,"areaId",t)},expression:"listQuery.areaId"}})],1)]),a("div",{staticClass:"cost"},e._l(e.costList,(function(t){return a("div",{key:t.name,staticClass:"costItem"},[a("div",{staticClass:"save"},[a("div",[e._v(e._s(t.name))]),a("div",[e._v(" 节省电费"),a("span",[e._v(e._s(e.list[t.value+"SaveCost"]))]),e._v("元 ")])]),a("div",{staticClass:"rate"},[a("div",{staticClass:"item"},[a("div",[e._v("电费(元)")]),a("div",[e._v(e._s(e.list[t.value+"Cost"]))])]),a("div",{staticClass:"item"},[a("div",[e._v("市电用量(kWh)")]),a("div",[e._v(e._s(e.list[t.value+"SupplyEnergy"]))])]),a("div",{staticClass:"item"},[a("div",[e._v("储蓄电用量(kWh)")]),a("div",[e._v(e._s(e.list[t.value+"SaveEnergy"]))])])])])})),0),a("div",{attrs:{id:"energyEchart"}})]),a("div",{staticClass:"changeBox"},[a("div",{staticClass:"filter-container"},[e._m(1),a("div",{staticClass:"box"},[a("el-cascader",{staticClass:"filter-item",attrs:{"collapse-tags":"",options:e.areaIdLists,placeholder:e.$t("listQuery.areaId"),props:{checkStrictly:!0,emitPath:!1},clearable:""},on:{change:e.getEleTrendPic},model:{value:e.listQuerys.areaId,callback:function(t){e.$set(e.listQuerys,"areaId",t)},expression:"listQuerys.areaId"}}),a("el-select",{staticClass:"filter-item",attrs:{placeholder:"用电分类"},on:{change:e.getEleTrendPic},model:{value:e.listQuerys.eleTypeId,callback:function(t){e.$set(e.listQuerys,"eleTypeId",t)},expression:"listQuerys.eleTypeId"}},e._l(e.typesList,(function(e){return a("el-option",{key:e.eleTypeId,attrs:{label:e.eleTypeName,value:e.eleTypeId}})})),1),a("el-select",{staticClass:"filter-item",attrs:{placeholder:e.$t("electrovalence.level")},on:{change:e.getEleTrendPic},model:{value:e.listQuerys.volLevelId,callback:function(t){e.$set(e.listQuerys,"volLevelId",t)},expression:"listQuerys.volLevelId"}},e._l(e.levelsList,(function(e){return a("el-option",{key:e.volLevelId,attrs:{label:e.volLevelName,value:e.volLevelId}})})),1),a("el-date-picker",{staticClass:"filter-item",attrs:{type:"month",placeholder:"选择月","value-format":"yyyy-MM"},on:{change:e.getEleTrendPic},model:{value:e.listQuerys.startTime,callback:function(t){e.$set(e.listQuerys,"startTime",t)},expression:"listQuerys.startTime"}})],1)]),e._m(2)])])},i=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[e._v(" 峰谷价差统计")])])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"name"},[a("i",{staticClass:"iconfont icon-biaoti"}),a("span",[e._v(" 价差变化图")])])},function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"echart"},[a("div",{attrs:{id:"maxEchart"}}),a("div",{attrs:{id:"changeEchart"}})])}],n=a("1da1"),s=(a("96cf"),a("99af"),a("b680"),a("d81d"),a("b0c0"),a("4de4"),a("d3b7"),a("599c")),l=a("d216"),o=a("4381"),c=a("61f7"),u=a("313e"),d={directives:{permission:o["a"]},filters:{switchTimeFormat:function(e){var t=Object(c["b"])(e);return t}},data:function(){return{listQuerys:{areaId:null,deptId:null,startTime:null,chargeType:null,eleTypeId:null,volLevelId:null},listQuery:{areaId:null,deptId:null,endTime:null,startTime:null,dayEndTime:null,dayStartTime:null,timeType:1},type:"day",list:{energyList:{},flatCost:0,flatSaveCost:0,flatSaveEnergy:0,flatSupplyEnergy:0,lowCost:0,lowSaveCost:0,lowSaveEnergy:0,lowSupplyEnergy:0,peakCost:0,flatPrice:.4,lowPrice:.3,peakPrice:.5,spikePrice:.8,peakSaveCost:0,peakSaveEnergy:0,peakSupplyEnergy:0,spikeCost:0,spikeSaveCost:0,spikeSaveEnergy:0,spikeSupplyEnergy:0},areaIdList:[],areaIdLists:[],levelsList:[],typesList:[],arrayTime:[],costList:[{name:"尖时段",value:"spike"},{name:"峰时段",value:"peak"},{name:"平时段",value:"flat"},{name:"谷时段",value:"low"}]}},watch:{arrayTime:function(e){console.log(e,"HH:mm:ss"),1==this.listQuery.timeType?(this.listQuery.dayStartTime=e&&e&&e[0],this.listQuery.dayEndTime=e&&e&&e[1],this.listQuery.startTime=null,this.listQuery.endTime=null):2==this.listQuery.timeType&&(this.listQuery.dayStartTime=null,this.listQuery.dayEndTime=null,this.listQuery.startTime=e&&e&&e[0],this.listQuery.endTime=e&&e&&e[1])}},created:function(){this.getBaseList()},methods:{padZero:function(e){return e>9?e:"0".concat(e)},getBaseList:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=new Date,a.setMonth(a.getMonth()-1),console.log(a),e.arrayTime=["".concat(a.getFullYear(),"-").concat(e.padZero(a.getMonth()+1)),"".concat((new Date).getFullYear(),"-").concat(e.padZero((new Date).getMonth()+1))],t.next=6,Object(s["a"])().then((function(t){e.areaIdList=t.data&&e.getAreaIdList(t.data),e.areaIdLists=t.data&&e.getAreaIdLists(t.data),e.listQuery.areaId=e.areaIdList[0].value}));case 6:return t.next=8,Object(l["g"])().then((function(t){e.levelsList=t.data}));case 8:return t.next=10,Object(l["j"])().then((function(t){e.typesList=t.data}));case 10:case"end":return t.stop()}}),t)})))()},getList:function(){var e=this;console.log(this.listQuery,"this.listQuery"),Object(l["e"])(this.listQuery).then((function(t){console.log(t),e.list=t.data,e.list.flatPrice=e.list.flatPrice.toFixed(2)-0,e.list.lowPrice=e.list.lowPrice.toFixed(2)-0,e.list.peakPrice=e.list.peakPrice.toFixed(2)-0,e.list.spikePrice=e.list.spikePrice.toFixed(2)-0;var a=[],r=e.list.energyList;for(var i in r)a.push({name:i,data:r[i]});console.log(a,"1111111");var n=a.map((function(e){return e.name})),s=[{name:e.$t("electrovalence.sharp"),type:"bar",stack:"machine",barWidth:30,itemStyle:{color:"#EC6941"},data:a.map((function(e){return e.data[0]&&e.data[0].spikeEnergy}))},{name:e.$t("electrovalence.peak"),type:"bar",stack:"machine",barWidth:30,itemStyle:{color:"#FF9100"},data:a.map((function(e){return e.data[0]&&e.data[0].peakEnergy}))},{name:e.$t("electrovalence.shoulder"),type:"bar",stack:"machine",barWidth:30,itemStyle:{color:"#FDF879"},data:a.map((function(e){return e.data[0]&&e.data[0].lowEnergy}))},{name:e.$t("electrovalence.offPeak"),type:"bar",stack:"machine",barWidth:30,itemStyle:{color:"#01FFE9"},data:a.map((function(e){return e.data[0]&&e.data[0].flatEnergy}))}];e.getBChert(n,s)}))},getEleTrendPic:function(){var e=this;this.listQuerys.areaId&&this.listQuerys.startTime&&this.listQuerys.eleTypeId&&this.listQuerys.volLevelId&&Object(l["f"])(this.listQuerys).then((function(t){t=t.data;var a=t["chargeType1-cur"].map((function(e){return e.areaName})),r=t["chargeType2-cur"].map((function(e){return e.areaName})),i=[{name:e.$t("electrovalence.current"),type:"bar",barWidth:30,itemStyle:{color:"#01FFE9"},data:t["chargeType1-cur"].map((function(e){return e.relativeVal}))},{name:e.$t("electrovalence.last"),type:"bar",barWidth:30,itemStyle:{color:"#FDF879"},data:t["chargeType1-pre"].map((function(e){return e.relativeVal}))}],n=[{name:e.$t("electrovalence.current"),type:"bar",barWidth:30,itemStyle:{color:"#01FFE9"},data:t["chargeType2-cur"].map((function(e){return e.relativeVal}))},{name:e.$t("electrovalence.last"),type:"bar",barWidth:30,itemStyle:{color:"#FDF879"},data:t["chargeType2-pre"].map((function(e){return e.relativeVal}))}];e.getMaxChert(a,i),e.getEChert(r,n)}))},getAreaIdList:function(e){var t=this;e.length||(e=[e]);var a=e.map((function(e){var a={};return e.subList?(a.children=t.getAreaIdList(e.subList),a.label=e.areaName,a.value=e.areaId,a):(a.label=e.areaName,a.value=e.areaId,a)}));return a},getAreaIdLists:function(e){var t=this;e.length||(e=[e]);var a=e.map((function(e){var a={};return console.log(e.subList,"res.subList"),e.subList?(a.children=t.getAreaIdLists(e.subList),a.label=e.areaName,a.value=e.areaId,a):a}));return a=a.filter((function(e){return e.label})),0==a.length&&(a=null),a},clearListQuery:function(){this.listQuery={userId:null,curPage:1,pageSize:10}},handleFilter:function(){this.listQuery.curPage=1},getBChert:function(e,t){var a=u["a"](document.getElementById("energyEchart")),r={title:{textStyle:{color:"#222"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},color:["#EC6941","#FF9100","#FDF879"],legend:{show:!0,top:"10%",left:"5%",icon:"rect",itemWidth:15,itemHeight:15,textStyle:{color:"#00BFAD",fontSize:14,padding:[0,8,0,8]}},grid:{top:"25%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:[{type:"category",axisLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)"}},axisLabel:{textStyle:{color:"#00BFAD",fontSize:12}},axisTick:{show:!1},data:e}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)",type:"soiled"}},axisLabel:{show:!0,textStyle:{color:"#00BFAD",fontSize:14}},axisTick:{show:!1}}],series:t};a.setOption(r,!0)},getMaxChert:function(e,t){var a=u["a"](document.getElementById("maxEchart")),r={title:{text:this.$t("electrovalence.single"),top:10,left:"40%",textStyle:{color:"#BEFFFF",fontStyle:"normal",fontWeight:"normal",fontSize:"14"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},color:["#EC6941","#FF9100","#FDF879"],legend:{show:!0,top:"10%",left:"5%",icon:"rect",itemWidth:15,itemHeight:15,textStyle:{color:"#00BFAD",fontSize:14,padding:[0,8,0,8]}},grid:{top:"25%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:[{type:"category",axisLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)"}},axisLabel:{textStyle:{color:"#00BFAD",fontSize:12}},axisTick:{show:!1},data:e}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)",type:"soiled"}},axisLabel:{show:!0,textStyle:{color:"#00BFAD",fontSize:14}},axisTick:{show:!1}}],series:t};a.setOption(r,!0)},getEChert:function(e,t){var a=u["a"](document.getElementById("changeEchart")),r={title:{text:this.$t("electrovalence.twopart"),top:10,left:"40%",right:0,textStyle:{color:"#BEFFFF",fontStyle:"normal",fontWeight:"normal",fontSize:"14"}},textStyle:{color:"#222"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},color:["#EC6941","#FF9100","#FDF879"],legend:{show:!0,top:"10%",left:"5%",icon:"rect",itemWidth:15,itemHeight:15,textStyle:{color:"#00BFAD",fontSize:14,padding:[0,8,0,8]}},grid:{top:"25%",left:"5%",right:"5%",bottom:"10%",containLabel:!0},xAxis:[{type:"category",axisLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)"}},axisLabel:{textStyle:{color:"#00BFAD",fontSize:12}},axisTick:{show:!1},data:e}],yAxis:[{type:"value",splitLine:{show:!0,lineStyle:{color:"rgba(1, 255, 233, 0.2)",type:"soiled"}},axisLabel:{show:!0,textStyle:{color:"#00BFAD",fontSize:14}},axisTick:{show:!1}}],series:t};a.setOption(r,!0)}}},y=d,p=(a("78f9"),a("2877")),m=Object(p["a"])(y,r,i,!1,null,"2ba4def2",null);t["default"]=m.exports},4381:function(e,t,a){"use strict";a("d3b7"),a("caad"),a("2532"),a("d9e2");var r=a("4360"),i={inserted:function(e,t){var a=t.value,i=r["a"].getters&&r["a"].getters.butPermission;if(console.log(i,"roles"),!(a&&a instanceof Array&&a.length>0))throw new Error("need roles! Like v-permission=\"['admin','editor']\"");var n=a,s=i.some((function(e){return n.includes(e)}));if(console.log(s,"hasPermission"),s)r["a"].state.user.permissionFlag[n]=!1;else{r["a"].state.user.permissionFlag[n]=!0,console.log(r["a"].state.user.permissionFlag[n],"permissionRoles");var l=document.createElement("div");l.style.cursor="not-allowed",l.style.display="inline-block",e.style.pointerEvents="none",e.parentNode.insertBefore(l,e),e.parentNode&&e.parentNode.removeChild(e),l.appendChild(e),console.log(e,"permissionRoles")}}},n=function(e){e.directive("permission",i)};window.Vue&&(window["permission"]=i,Vue.use(n)),i.install=n;t["a"]=i},"599c":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return n})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return l})),a.d(t,"e",(function(){return o}));var r=a("b775");function i(e){return Object(r["a"])({url:"user-service/area/getAreaTreeList",method:"get",params:e})}function n(e){return Object(r["a"])({url:"user-service/area/getAreaSubByAreaId",method:"get",params:e})}function s(e){return Object(r["a"])({url:"user-service/area/removeArea",method:"get",params:e})}function l(e){return Object(r["a"])({url:"user-service/area/saveArea",method:"post",data:e})}function o(e){return Object(r["a"])({url:"user-service/area/updateArea",method:"post",data:e})}},"61f7":function(e,t,a){"use strict";a.d(t,"c",(function(){return r})),a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return n}));a("ac1f"),a("00b4"),a("d9e2"),a("a9e3"),a("5319");function r(e,t,a){""===t?a(new Error("请输入手机号码")):/^[0-9-]+$/.test(t)?a():a(new Error("手机号码格式不对"))}function i(e){if(e||0===e){if(e.length>0){var t=e.replace(/(^\s*)|(\s*$)/g,"");return t||"--"}return e}return"--"}function n(e){if(!e)return"";var t=new Date(e),a=t.getFullYear(),r=t.getMonth()+1,i=t.getDate(),n=t.getHours(),l=t.getMinutes(),o=t.getSeconds();return a+"-"+s(r)+"-"+s(i)+"\n"+s(n)+":"+s(l)+":"+s(o)}function s(e){return e<10?"0"+e:e}},"78f9":function(e,t,a){"use strict";a("d0a7")},d0a7:function(e,t,a){},d216:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"i",(function(){return n})),a.d(t,"b",(function(){return s})),a.d(t,"c",(function(){return l})),a.d(t,"h",(function(){return o})),a.d(t,"g",(function(){return c})),a.d(t,"j",(function(){return u})),a.d(t,"k",(function(){return d})),a.d(t,"d",(function(){return y})),a.d(t,"e",(function(){return p})),a.d(t,"f",(function(){return m}));var r=a("b775");function i(e){return Object(r["a"])({url:"device-service/ele/addElectricityPloy",method:"post",data:e})}function n(e){return Object(r["a"])({url:"device-service/ele/getElectricityPloyList",method:"get",params:e})}function s(e){return Object(r["a"])({url:"device-service/ele/deleteElectricityPloy",method:"delete",params:e})}function l(e){return Object(r["a"])({url:"device-service/ele/deleteListElectricityPloy",method:"delete",params:e})}function o(e){return Object(r["a"])({url:"device-service/ele/getElectricityPloyByPloyId",method:"get",params:e})}function c(e){return Object(r["a"])({url:"device-service/ele/getElectricityLevels",method:"get",params:e})}function u(e){return Object(r["a"])({url:"device-service//ele/getElectricityTypes",method:"get",params:e})}function d(e){return Object(r["a"])({url:"device-service/ele/updateElectricityPloy",method:"put",data:e})}function y(e){return Object(r["a"])({url:"device-service/stat/getEleDifference",method:"get",params:e})}function p(e){return Object(r["a"])({url:"device-service/stat/getEleTrendChart",method:"get",params:e})}function m(e){return Object(r["a"])({url:"device-service/stat/getEleTrendPic",method:"get",params:e})}}}]);
|
|
//# sourceMappingURL=chunk-03aa0638.e87f4f36.js.map
|