EMS2.0-Documents/7.部署文档/Window安装/项目前端文件/IEMS/js/chunk-24d25099.a181f82b.js

2 lines
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-24d25099"],{"2b63":function(e,t,a){},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 s=a,n=i.some((function(e){return s.includes(e)}));if(console.log(n,"hasPermission"),n)r["a"].state.user.permissionFlag[s]=!1;else{r["a"].state.user.permissionFlag[s]=!0,console.log(r["a"].state.user.permissionFlag[s],"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")}}},s=function(e){e.directive("permission",i)};window.Vue&&(window["permission"]=i,Vue.use(s)),i.install=s;t["a"]=i},"599c":function(e,t,a){"use strict";a.d(t,"b",(function(){return i})),a.d(t,"a",(function(){return s})),a.d(t,"c",(function(){return n})),a.d(t,"d",(function(){return l})),a.d(t,"e",(function(){return c}));var r=a("b775");function i(e){return Object(r["a"])({url:"user-service/area/getAreaTreeList",method:"get",params:e})}function s(e){return Object(r["a"])({url:"user-service/area/getAreaSubByAreaId",method:"get",params:e})}function n(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 c(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 s}));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 s(e){if(!e)return"";var t=new Date(e),a=t.getFullYear(),r=t.getMonth()+1,i=t.getDate(),s=t.getHours(),l=t.getMinutes(),c=t.getSeconds();return a+"-"+n(r)+"-"+n(i)+"\n"+n(s)+":"+n(l)+":"+n(c)}function n(e){return e<10?"0"+e:e}},aa68:function(e,t,a){"use strict";a("2b63")},d216:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"i",(function(){return s})),a.d(t,"b",(function(){return n})),a.d(t,"c",(function(){return l})),a.d(t,"h",(function(){return c})),a.d(t,"g",(function(){return o})),a.d(t,"j",(function(){return u})),a.d(t,"k",(function(){return d})),a.d(t,"d",(function(){return v})),a.d(t,"e",(function(){return f})),a.d(t,"f",(function(){return p}));var r=a("b775");function i(e){return Object(r["a"])({url:"device-service/ele/addElectricityPloy",method:"post",data:e})}function s(e){return Object(r["a"])({url:"device-service/ele/getElectricityPloyList",method:"get",params:e})}function n(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 c(e){return Object(r["a"])({url:"device-service/ele/getElectricityPloyByPloyId",method:"get",params:e})}function o(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 v(e){return Object(r["a"])({url:"device-service/stat/getEleDifference",method:"get",params:e})}function f(e){return Object(r["a"])({url:"device-service/stat/getEleTrendChart",method:"get",params:e})}function p(e){return Object(r["a"])({url:"device-service/stat/getEleTrendPic",method:"get",params:e})}},ef12: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("el-cascader",{staticClass:"filter-item",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"}}),a("el-select",{staticClass:"filter-item",attrs:{placeholder:e.$t("electrovalence.method")},on:{change:e.getList},model:{value:e.listQuery.eleTypeId,callback:function(t){e.$set(e.listQuery,"eleTypeId",t)},expression:"listQuery.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.method")},on:{change:e.getList},model:{value:e.listQuery.volLevelId,callback:function(t){e.$set(e.listQuery,"volLevelId",t)},expression:"listQuery.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:"long",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"}})],1)]),a("div",{staticClass:"filter-container tabList"},[a("div",{staticClass:"tab left",class:{clicked:1==e.listQuery.chargeType},on:{click:function(t){e.listQuery.chargeType=1,e.getList()}}},[e._v(" "+e._s(e.$t("electrovalence.unitary"))+" ")]),a("div",{staticClass:"tab right",class:{clicked:2==e.listQuery.chargeType},on:{click:function(t){e.listQuery.chargeType=2,e.getList()}}},[e._v(" "+e._s(e.$t("electrovalence.bipartite"))+" ")])]),a("div",{attrs:{id:"monthEchart"}})]),a("div",{staticClass:"table-container"},[a("div",{staticClass:"row"},[a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[e._v("地区")]),a("div",{staticClass:"value"},[e._v(e._s(e.list[0]&&e.list[0].areaName))])]),a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[e._v("用电分类")]),a("div",{staticClass:"value"},[e._v(e._s(e.list[0]&&e.list[0].eleTypeName))])]),a("div",{staticClass:"item"},[a("div",{staticClass:"name"},[e._v("电压等级")]),a("div",{staticClass:"value"},[e._v(e._s(e.list[0]&&e.list[0].volLevelName))])]),a("div",{staticClass:"table"},[a("el-row",[a("el-col",{staticClass:"name",attrs:{span:6}},[e._v(" 时间 ")]),a("el-col",{staticClass:"name",attrs:{span:6}},[e._v(" 峰谷价差相对值 ")]),a("el-col",{staticClass:"name",attrs:{span:6}},[e._v(" 峰谷价差同比 ")]),a("el-col",{staticClass:"name none",attrs:{span:6}},[e._v(" 峰谷价差环比 ")])],1),a("div",{staticClass:"overFlow"},e._l(e.list,(function(t){return a("el-row",{key:t},[a("el-col",{staticClass:"value",attrs:{span:6}},[e._v(e._s(t.time))]),a("el-col",{staticClass:"value",attrs:{span:6}},[e._v(" "+e._s(t.relativeVal)+" ")]),a("el-col",{staticClass:"value",attrs:{span:6}},[e._v(" "+e._s(t.yoyVal)+" ")]),a("el-col",{staticClass:"value none",attrs:{span:6}},[e._v(" "+e._s(t.qoqVal)+" ")])],1)})),1)],1)])])])},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(" 峰谷价差统计")])])}],s=a("1da1"),n=(a("96cf"),a("99af"),a("d81d"),a("599c")),l=a("d216"),c=a("4381"),o=a("61f7"),u=a("313e"),d={directives:{permission:c["a"]},filters:{switchTimeFormat:function(e){var t=Object(o["b"])(e);return t}},data:function(){return{listQuery:{areaId:null,chargeType:1,deptId:null,eleTypeId:null,endTime:null,startTime:null,volLevelId:null},list:[],areaIdList:[],levelsList:[],typesList:[],arrayTime:[]}},watch:{arrayTime:function(e){console.log(e,"HH:mm:ss"),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(s["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(n["a"])().then((function(t){e.areaIdList=t.data&&e.getAreaIdList(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,e.listQuery.volLevelId=e.levelsList[0].volLevelId}));case 8:return t.next=10,Object(l["j"])().then((function(t){e.typesList=t.data,e.listQuery.eleTypeId=e.typesList[0].eleTypeId}));case 10:e.getList();case 11:case"end":return t.stop()}}),t)})))()},getList:function(){var e=this;Object(l["d"])(this.listQuery).then((function(t){console.log(t),e.list=t.data;var a=[{name:e.list[0]&&e.list[0].volLevelName,type:"line",stack:"machine",data:e.list.map((function(e){return e.relativeVal}))}];e.getBChert(e.list.map((function(e){return e.volLevelName})),a)}))},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},clearListQuery:function(){this.listQuery={userId:null,curPage:1,pageSize:10},this.getList()},handleFilter:function(){this.listQuery.curPage=1,this.getList()},getBChert:function(e,t){var a=u["a"](document.getElementById("monthEchart")),r={title:{textStyle:{color:"#222"}},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},color:["#EC6941","#FF9100","#FDF879"],legend:{show:!0,top:"10%",right:"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)}}},v=d,f=(a("aa68"),a("2877")),p=Object(f["a"])(v,r,i,!1,null,"694ef53c",null);t["default"]=p.exports}}]);
//# sourceMappingURL=chunk-24d25099.a181f82b.js.map