webpackJsonp([91],{
|
|
|
|
/***/ "GXWG":
|
|
/***/ (function(module, exports) {
|
|
|
|
// removed by extract-text-webpack-plugin
|
|
|
|
/***/ }),
|
|
|
|
/***/ "VPE/":
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
|
|
// EXTERNAL MODULE: ./src/api/allFun.js
|
|
var allFun = __webpack_require__("mprh");
|
|
|
|
// EXTERNAL MODULE: ./src/common/echart/index.vue + 4 modules
|
|
var echart = __webpack_require__("C3+4");
|
|
|
|
// EXTERNAL MODULE: ./src/components/scrolllist/index.vue + 2 modules
|
|
var scrolllist = __webpack_require__("Lbay");
|
|
|
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/presentationPage/homePageDistributionCabinetIsEmpty.vue
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
//
|
|
|
|
// import Schart from "vue-schart";
|
|
// import scrollvue from "../components/scrollvue"
|
|
|
|
|
|
|
|
/* harmony default export */ var homePageDistributionCabinetIsEmpty = ({
|
|
name: "dashboard",
|
|
data: function data() {
|
|
return {
|
|
statisticalParameters: [{
|
|
title: '设备总数',
|
|
num: '0',
|
|
company: '个'
|
|
}, {
|
|
title: '在线设备',
|
|
num: '0',
|
|
company: '个'
|
|
}, {
|
|
title: '离线设备',
|
|
num: '0',
|
|
company: '个'
|
|
}, {
|
|
title: '今日报警数',
|
|
num: '0',
|
|
company: '个'
|
|
}, {
|
|
title: '本月报警数',
|
|
num: '0',
|
|
company: '个'
|
|
}],
|
|
animate: false,
|
|
name: localStorage.getItem("ms_username"),
|
|
options3: {
|
|
title: {
|
|
text: '报警预警趋势'
|
|
},
|
|
tooltip: {
|
|
trigger: 'axis'
|
|
},
|
|
color: ['#91cc75', '#ee6666'],
|
|
legend: {
|
|
data: ['预警', '报警'],
|
|
type: 'scroll',
|
|
orient: 'horizontal',
|
|
textStyle: "#333"
|
|
},
|
|
textStyle: {
|
|
color: "#333"
|
|
},
|
|
grid: {
|
|
left: '3%',
|
|
right: '4%',
|
|
bottom: '3%',
|
|
containLabel: true
|
|
},
|
|
xAxis: {
|
|
type: 'category',
|
|
boundaryGap: false,
|
|
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
|
axisLabel: {
|
|
textStyle: {
|
|
color: "#666",
|
|
margin: 15
|
|
}
|
|
}
|
|
},
|
|
yAxis: {
|
|
type: 'value',
|
|
axisLabel: {
|
|
textStyle: {
|
|
color: "#666",
|
|
margin: 15
|
|
}
|
|
}
|
|
},
|
|
series: [{
|
|
name: '预警',
|
|
type: 'line',
|
|
// stack: 'center',
|
|
data: [0, 0, 0, 0, 0, 0, 0]
|
|
}, {
|
|
name: '报警',
|
|
type: 'line',
|
|
// stack: 'Total',
|
|
data: [0, 0, 0, 0, 0, 0, 0]
|
|
}]
|
|
},
|
|
options2: {
|
|
title: {
|
|
text: '报警类型分布'
|
|
},
|
|
tooltip: {
|
|
trigger: 'item'
|
|
},
|
|
legend: {
|
|
orient: 'vertical',
|
|
top: '10%',
|
|
left: 'left',
|
|
type: 'scroll',
|
|
textStyle: {
|
|
color: "#666"
|
|
}
|
|
},
|
|
series: [{
|
|
name: '报警类型分布',
|
|
type: 'pie',
|
|
radius: ['40%', '70%'],
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
borderRadius: 10,
|
|
borderColor: '#fff',
|
|
borderWidth: 2
|
|
},
|
|
label: {
|
|
show: false,
|
|
position: 'center',
|
|
color: "#666"
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: '20',
|
|
fontWeight: 'bold'
|
|
}
|
|
},
|
|
labelLine: {
|
|
// show: false,
|
|
normal: {
|
|
length: 15, // 指示线长度
|
|
lineStyle: {
|
|
color: "#595959" // 指示线颜色
|
|
}
|
|
}
|
|
},
|
|
data: [{
|
|
value: 0,
|
|
name: '短路报警'
|
|
}, {
|
|
value: 0,
|
|
name: '漏电报警'
|
|
}, {
|
|
value: 0,
|
|
name: '过载报警'
|
|
}, {
|
|
value: 0,
|
|
name: '过流报警'
|
|
}, {
|
|
value: 0,
|
|
name: '过压报警'
|
|
}, {
|
|
value: 0,
|
|
name: '欠压报警'
|
|
}, {
|
|
value: 0,
|
|
name: '温度报警'
|
|
}, {
|
|
value: 0,
|
|
name: '浪涌报警'
|
|
}, {
|
|
value: 0,
|
|
name: '电弧报警'
|
|
}, {
|
|
value: 0,
|
|
name: '缺相报警'
|
|
}, {
|
|
value: 0,
|
|
name: '三相负载不平衡报警'
|
|
}, {
|
|
value: 0,
|
|
name: '三相序报警'
|
|
}, {
|
|
value: 0,
|
|
name: '掉电报警'
|
|
}, {
|
|
value: 0,
|
|
name: '开箱报警'
|
|
}, {
|
|
value: 0,
|
|
name: '湿度报警'
|
|
}, {
|
|
value: 0,
|
|
name: '输入报警'
|
|
}, {
|
|
value: 0,
|
|
name: '恶性负载报警'
|
|
}, {
|
|
value: 0,
|
|
name: '光照报警'
|
|
}, {
|
|
value: 0,
|
|
name: '组态报警'
|
|
}, {
|
|
value: 0,
|
|
name: '离线报警'
|
|
}, {
|
|
value: 0,
|
|
name: '异常分闸'
|
|
}, {
|
|
value: 0,
|
|
name: '过压报警(A级)'
|
|
}, {
|
|
value: 0,
|
|
name: '过流报警(A级)'
|
|
}, {
|
|
value: 0,
|
|
name: '反流报警'
|
|
}, {
|
|
value: 0,
|
|
name: '烟雾报警'
|
|
}, {
|
|
value: 0,
|
|
name: '压强报警'
|
|
}, {
|
|
value: 0,
|
|
name: '液位报警'
|
|
}, {
|
|
value: 0,
|
|
name: '燃气报警'
|
|
}, {
|
|
value: 0,
|
|
name: '设备故障报警'
|
|
}, {
|
|
value: 0,
|
|
name: '通讯故障报警'
|
|
}]
|
|
}]
|
|
},
|
|
options: {
|
|
title: {
|
|
text: '报警类型分布'
|
|
},
|
|
tooltip: {
|
|
trigger: 'item'
|
|
},
|
|
legend: {
|
|
orient: 'vertical',
|
|
top: '10%',
|
|
left: 'left',
|
|
type: 'scroll',
|
|
textStyle: {
|
|
color: "#666"
|
|
}
|
|
},
|
|
series: [{
|
|
name: '报警类型分布',
|
|
type: 'pie',
|
|
radius: ['40%', '70%'],
|
|
avoidLabelOverlap: false,
|
|
itemStyle: {
|
|
borderRadius: 10,
|
|
borderColor: '#fff',
|
|
borderWidth: 2
|
|
},
|
|
label: {
|
|
show: false,
|
|
position: 'center',
|
|
color: "#666"
|
|
},
|
|
emphasis: {
|
|
label: {
|
|
show: true,
|
|
fontSize: '20',
|
|
fontWeight: 'bold'
|
|
}
|
|
},
|
|
labelLine: {
|
|
// show: false,
|
|
normal: {
|
|
length: 15, // 指示线长度
|
|
lineStyle: {
|
|
color: "#595959" // 指示线颜色
|
|
}
|
|
}
|
|
},
|
|
data: []
|
|
}]
|
|
},
|
|
items: [],
|
|
timerhome: null
|
|
};
|
|
},
|
|
|
|
components: {
|
|
Echart: echart["a" /* default */],
|
|
scrolllist: scrolllist["a" /* default */]
|
|
// Schart,
|
|
// scrollvue
|
|
},
|
|
beforeDestroy: function beforeDestroy() {
|
|
window.clearInterval(this.timerhome);
|
|
this.timerhome = null;
|
|
},
|
|
created: function created() {
|
|
this.alertTypeList = this.$MANUFACTURER.alertType.emptyLog;
|
|
},
|
|
mounted: function mounted() {
|
|
var _this = this;
|
|
|
|
this.getAnalysis();
|
|
this.timerhome = window.setInterval(function () {
|
|
setTimeout(_this.getlog, 0);
|
|
}, 4000);
|
|
},
|
|
|
|
methods: {
|
|
getlog: function getlog() {
|
|
var _this2 = this;
|
|
|
|
this.getAnalysis();
|
|
var data = {
|
|
deviceType: 3
|
|
};
|
|
allFun["a" /* default */].getWarningLog(data, function (callback) {
|
|
if (callback.success) {
|
|
callback.data.list.map(function (li, index) {
|
|
li['alertTypeDesc'] = '';
|
|
var alertTypeDesc = _this2.alertTypeList.filter(function (item) {
|
|
return item.code == li.alertType;
|
|
})[0];
|
|
if (alertTypeDesc) {
|
|
li['alertTypeDesc'] = alertTypeDesc.desc;
|
|
} else {
|
|
li['alertTypeDesc'] = '';
|
|
}
|
|
var resultStatus = allFun["a" /* default */].judgmentTimestamp(li.alertTime);
|
|
if (resultStatus) {
|
|
setTimeout(function () {
|
|
_this2.$notify({
|
|
title: li.alertTypeDesc,
|
|
offset: 200,
|
|
duration: 2000,
|
|
message: li.alertTypeDesc,
|
|
type: 'warning'
|
|
});
|
|
}, 3000);
|
|
} else {}
|
|
});
|
|
}
|
|
});
|
|
},
|
|
getAnalysis: function getAnalysis() {
|
|
var _this3 = this;
|
|
|
|
allFun["a" /* default */].getAnalysis("", 3, function (callback) {
|
|
_this3.statisticalParameters[0].num = callback.total || 0;
|
|
_this3.statisticalParameters[1].num = callback.onlineTotal || 0;
|
|
_this3.statisticalParameters[2].num = callback.offlineTotal || 0;
|
|
_this3.setOptionsData(callback);
|
|
});
|
|
allFun["a" /* default */].getAlertTypeOrder('', 3, function (callback) {
|
|
if (callback.success) {
|
|
_this3.statisticalParameters[3].num = callback.data.length || 0;
|
|
_this3.statisticalParameters[4].num = callback.data.length || 0;
|
|
if (callback.data.length > 0) {
|
|
var days = allFun["a" /* default */].classification();
|
|
var array = allFun["a" /* default */].groupBy(callback.data, ["code", "order"], function (cul, data) {
|
|
return cul + 1;
|
|
});
|
|
var array1 = allFun["a" /* default */].groupBy(callback.data, ["code"], function (cul, data) {
|
|
return cul + 1;
|
|
});
|
|
var loopObjectData = allFun["a" /* default */].loopObject(array, _this3.alertTypeList);
|
|
var loopObjectData1 = allFun["a" /* default */].loopObjectSum(array1, _this3.alertTypeList);
|
|
var legendData = [];
|
|
loopObjectData.map(function (li) {
|
|
legendData.push(li.name);
|
|
});
|
|
_this3.options3.series = loopObjectData;
|
|
_this3.options3.legend.data = legendData;
|
|
_this3.options3.xAxis.data = days;
|
|
_this3.options.series[0].data = loopObjectData1;
|
|
}
|
|
} else {
|
|
_this3.$message.error(callback.message);
|
|
}
|
|
});
|
|
},
|
|
setOptionsData: function setOptionsData(data) {
|
|
var options2 = this.options2;
|
|
options2.series[0].data[0].value = data.batteryLevel1;
|
|
options2.series[0].data[1].value = data.batteryLevel2;
|
|
options2.series[0].data[2].value = data.batteryLevel3;
|
|
options2.series[0].data[3].value = data.batteryLevel4;
|
|
options2.series[0].data[4].value = data.batteryLevel5;
|
|
},
|
|
tgces: function tgces() {
|
|
this.$router.push({
|
|
path: "/test"
|
|
});
|
|
},
|
|
scroll: function scroll() {
|
|
var _this4 = this;
|
|
|
|
this.animate = true; // 因为在消息向上滚动的时候需要添加css3过渡动画,所以这里需要设置true
|
|
setTimeout(function () {
|
|
// 这里直接使用了es6的箭头函数,省去了处理this指向偏移问题,代码也比之前简化了很多
|
|
_this4.tableData.push(_this4.tableData[0]); // 将数组的第一个元素添加到数组的
|
|
_this4.tableData.shift(); //删除数组的第一个元素
|
|
_this4.animate = false; // margin-top 为0 的时候取消过渡动画,实现无缝滚动
|
|
}, 500);
|
|
},
|
|
changeDate: function changeDate() {
|
|
var now = new Date().getTime();
|
|
this.data.forEach(function (item, index) {
|
|
var date = new Date(now - (6 - index) * 86400000);
|
|
item.name = date.getFullYear() + "/" + (date.getMonth() + 1) + "/" + date.getDate();
|
|
});
|
|
}
|
|
}
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/template-compiler?{"id":"data-v-0716ff7e","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/views/presentationPage/homePageDistributionCabinetIsEmpty.vue
|
|
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"content1"},[_c('el-row',{staticClass:"elrow",attrs:{"gutter":20}},_vm._l((_vm.statisticalParameters),function(item,index){return _c('el-col',{key:index,staticClass:"mrBottom20",attrs:{"span":4}},[_c('el-card',{staticClass:"caredradious",attrs:{"shadow":"always","body-style":{padding:'0px'}}},[_c('div',{staticClass:"grid-content grid-con-1"},[_c('div',{staticClass:"colposition"},[_c('div',{staticClass:"grid-cont-right"},[_c('div',[_vm._v(_vm._s(item.title))]),_vm._v(" "),_c('div',{staticClass:"grid-num"},[_vm._v(_vm._s(item.num)+" "),_c('span',[_vm._v(_vm._s(item.company))])])])])])])],1)}),1),_vm._v(" "),_c('el-row',{staticClass:"elrow",attrs:{"gutter":20}},[_c('el-col',{attrs:{"span":12}},[_c('el-card',{attrs:{"shadow":"hover"}},[_c('Echart',{staticClass:"schart",attrs:{"options":_vm.options,"width":"100%","height":"15vw"}})],1)],1),_vm._v(" "),_c('el-col',{attrs:{"span":12}},[_c('el-card',{attrs:{"shadow":"hover"}},[_c('Echart',{staticClass:"schart",attrs:{"options":_vm.options3,"width":"100%","height":"15vw"}})],1)],1)],1)],1)}
|
|
var staticRenderFns = []
|
|
var esExports = { render: render, staticRenderFns: staticRenderFns }
|
|
/* harmony default export */ var presentationPage_homePageDistributionCabinetIsEmpty = (esExports);
|
|
// CONCATENATED MODULE: ./src/views/presentationPage/homePageDistributionCabinetIsEmpty.vue
|
|
function injectStyle (ssrContext) {
|
|
__webpack_require__("GXWG")
|
|
}
|
|
var normalizeComponent = __webpack_require__("VU/8")
|
|
/* script */
|
|
|
|
|
|
/* template */
|
|
|
|
/* template functional */
|
|
var __vue_template_functional__ = false
|
|
/* styles */
|
|
var __vue_styles__ = injectStyle
|
|
/* scopeId */
|
|
var __vue_scopeId__ = "data-v-0716ff7e"
|
|
/* moduleIdentifier (server only) */
|
|
var __vue_module_identifier__ = null
|
|
var Component = normalizeComponent(
|
|
homePageDistributionCabinetIsEmpty,
|
|
presentationPage_homePageDistributionCabinetIsEmpty,
|
|
__vue_template_functional__,
|
|
__vue_styles__,
|
|
__vue_scopeId__,
|
|
__vue_module_identifier__
|
|
)
|
|
|
|
/* harmony default export */ var views_presentationPage_homePageDistributionCabinetIsEmpty = __webpack_exports__["default"] = (Component.exports);
|
|
|
|
|
|
/***/ })
|
|
|
|
});
|