1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["subPackages-equipment-single"],{"1ac0":function(t,a,e){"use strict";var n=e("70c3"),i=e.n(n);i.a},3778:function(t,a,e){"use strict";e.r(a);var n=e("3d9b"),i=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(a,t,(function(){return n[t]}))}(s);a["default"]=i.a},"3d9b":function(t,a,e){"use strict";e("7a82"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,e("14d9"),e("4e82"),e("d81d");a.default={data:function(){return{productStatus:"",equipmentName:"",equipmentCode:"",chartData:{},opts:{color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],padding:[15,10,10,15],legend:{position:"top"},xAxis:{disableGrid:!0,rotateLabel:!0,rotateAngle:20},yAxis:{gridType:"dash",dashLength:2,data:[{tofix:2}]},extra:{line:{type:"curve",width:2}},dataLabel:!1},chartDataMix:{},optsMix:{color:["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],padding:[15,10,10,15],enableScroll:!1,legend:{position:"top"},xAxis:{disableGrid:!0,rotateLabel:!0,rotateAngle:20,labelCount:7},yAxis:{gridType:"dash",dashLength:2,data:[{tofix:2}]},extra:{line:{type:"curve",width:2}},dataLabel:!1}}},onLoad:function(t){this.productStatus=t.productStatus,this.equipmentName=t.equipmentName,this.equipmentCode=t.equipmentCode,this.listDayCropRate(),this.listTagDifferenceHours()},methods:{listDayCropRate:function(){var t=this,a={tag:"Product_Status",start:this.dayjs().subtract(6,"day").format("YYYY-MM-DD"),end:this.dayjs().format("YYYY-MM-DD"),equipmentCode:this.equipmentCode};this.$api.listDayCropRate(a).then((function(a){var e=[];for(var n in a.data){var i=0,s=0,r=0,o=0;for(var d in a.data[n])r+=a.data[n][d].day["0"],o+=a.data[n][d].day["1"],i+=a.data[n][d].night["0"],s+=a.data[n][d].night["1"];e.push({day:n,day0:r,day1:o,night0:i,night1:s})}e.sort((function(t,a){return t.day<a.day?-1:1}));for(var u=[],c=[],p=[],l=0;l<e.length;l++)u.push(t.dayjs(e[l]["day"]).format("MM-DD")),c.push((100*e[l]["day1"]/(e[l]["day0"]+e[l]["day1"])).toFixed(2)),p.push((100*e[l]["night1"]/(e[l]["night0"]+e[l]["night1"])).toFixed(2));t.chartData={categories:u,series:[{name:"白班",data:c,pointShape:"none"},{name:"夜班",data:p,pointShape:"none"}]}})).catch((function(t){}))},listTagDifferenceHours:function(){var t=this,a={tag:"TotalPower",rq:this.dayjs().format("YYYY-MM-DD"),equipmentCode:this.equipmentCode};this.$api.listTagDifferenceHours(a).then((function(a){var e=a.data.hours.number,n=[],i=[],s=[];for(var r in e)n.push({time:t.dayjs(r).format("MM-DD HH"),val:e[r]});n.map((function(t){i.push(t.time),s.push(t.val)})),t.chartDataMix={categories:i,series:[{name:"用电量(度)",data:s,pointShape:"none"}]}})).catch((function(t){}))}}}},"4db8":function(t,a,e){var n=e("24fb");a=n(!1),a.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.single-page .title[data-v-69b94000]{margin:%?24?%;font-size:%?30?%}.single-page .chart-box[data-v-69b94000]{background-color:#fff;margin:%?24?%;padding:%?20?%;border-radius:%?12?%}',""]),t.exports=a},5251:function(t,a,e){"use strict";e.r(a);var n=e("79ab"),i=e("3778");for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(a,t,(function(){return i[t]}))}(s);e("1ac0");var r=e("f0c5"),o=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"69b94000",null,!1,n["a"],void 0);a["default"]=o.exports},"70c3":function(t,a,e){var n=e("4db8");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=e("4f06").default;i("31fe6326",n,!0,{sourceMap:!1,shadowMode:!1})},"79ab":function(t,a,e){"use strict";e.d(a,"b",(function(){return i})),e.d(a,"c",(function(){return s})),e.d(a,"a",(function(){return n}));var n={qiunDataCharts:e("b2ca").default},i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{staticClass:"single-page"},[e("navigation",{attrs:{title:"单一设备"}}),e("v-uni-view",{staticClass:"title",style:{color:1==t.productStatus?"#2fc25b":"red"}},[t._v(t._s(t.equipmentName))]),e("v-uni-view",{staticClass:"chart-box"},[e("qiun-data-charts",{attrs:{type:"line",opts:t.opts,chartData:t.chartData}})],1),e("v-uni-view",{staticClass:"chart-box"},[e("qiun-data-charts",{attrs:{type:"line",opts:t.optsMix,chartData:t.chartDataMix}})],1)],1)},s=[]}}]);
|