|
@@ -53,7 +53,7 @@
|
|
class="gradualBg total"
|
|
class="gradualBg total"
|
|
:class="{ transparent: scope.row.totalNum == 0 }"
|
|
:class="{ transparent: scope.row.totalNum == 0 }"
|
|
:style="{
|
|
:style="{
|
|
- width: (scope.row.totalNum / this.totalNumMax) * 100 + '%',
|
|
|
|
|
|
+ width: (scope.row.totalNum / this.allMaxData.totalNumMax) * 100 + '%',
|
|
}"
|
|
}"
|
|
@click="goAlarmTotal"
|
|
@click="goAlarmTotal"
|
|
>
|
|
>
|
|
@@ -67,7 +67,7 @@
|
|
class="gradualBg"
|
|
class="gradualBg"
|
|
:class="{ transparent: scope.row.oneAlarming == 0 }"
|
|
:class="{ transparent: scope.row.oneAlarming == 0 }"
|
|
:style="{
|
|
:style="{
|
|
- width: (scope.row.oneAlarming / this.oneAlarmingMax) * 100 + '%',
|
|
|
|
|
|
+ width: (scope.row.oneAlarming / this.allMaxData.oneAlarmingMax) * 100 + '%',
|
|
}"
|
|
}"
|
|
@click="goAlarmTotal"
|
|
@click="goAlarmTotal"
|
|
>
|
|
>
|
|
@@ -81,7 +81,7 @@
|
|
class="gradualBg"
|
|
class="gradualBg"
|
|
:class="{ transparent: scope.row.twoAlarming == 0 }"
|
|
:class="{ transparent: scope.row.twoAlarming == 0 }"
|
|
:style="{
|
|
:style="{
|
|
- width: (scope.row.twoAlarming / this.twoAlarmingMax) * 100 + '%',
|
|
|
|
|
|
+ width: (scope.row.twoAlarming / this.allMaxData.twoAlarmingMax) * 100 + '%',
|
|
}"
|
|
}"
|
|
@click="goAlarmTotal"
|
|
@click="goAlarmTotal"
|
|
>
|
|
>
|
|
@@ -96,7 +96,7 @@
|
|
class="gradualBg"
|
|
class="gradualBg"
|
|
:class="{ transparent: scope.row.other == 0 }"
|
|
:class="{ transparent: scope.row.other == 0 }"
|
|
:style="{
|
|
:style="{
|
|
- width: (scope.row.other / this.otherMax) * 100 + '%',
|
|
|
|
|
|
+ width: (scope.row.other / this.allMaxData.otherMax) * 100 + '%',
|
|
}"
|
|
}"
|
|
@click="goAlarmTotal"
|
|
@click="goAlarmTotal"
|
|
>
|
|
>
|
|
@@ -214,46 +214,35 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
- // sellVendorOption() {
|
|
|
|
- // return (item) => {
|
|
|
|
- // return item.venderCode + ':' + item.venderName
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
|
|
|
|
- totalNumMax() {
|
|
|
|
- return Math.max.apply(
|
|
|
|
- Math,
|
|
|
|
- this.tableData.map(function (o) {
|
|
|
|
- return o.totalNum
|
|
|
|
- })
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
- oneAlarmingMax() {
|
|
|
|
- return Math.max.apply(
|
|
|
|
- Math,
|
|
|
|
- this.tableData.map(function (o) {
|
|
|
|
- return o.oneAlarming
|
|
|
|
- })
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
- twoAlarmingMax() {
|
|
|
|
- return Math.max.apply(
|
|
|
|
- Math,
|
|
|
|
- this.tableData.map(function (o) {
|
|
|
|
- return o.twoAlarming
|
|
|
|
- })
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
- otherMax() {
|
|
|
|
- return Math.max.apply(
|
|
|
|
- Math,
|
|
|
|
- this.tableData.map(function (o) {
|
|
|
|
- return o.other
|
|
|
|
- })
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
|
|
+ allMaxData:function(){
|
|
|
|
+
|
|
|
|
+ var allMaxData = {};
|
|
|
|
+
|
|
|
|
+ var totalNumData = [];
|
|
|
|
+ var oneAlarmingData = [];
|
|
|
|
+ var twoAlarmingData = [];
|
|
|
|
+ var otherData = [];
|
|
|
|
+
|
|
|
|
+ this.tableData.forEach((element,index) => {
|
|
|
|
+ totalNumData[index] = element.totalNum;
|
|
|
|
+ oneAlarmingData[index] = element.oneAlarming;
|
|
|
|
+ twoAlarmingData[index] = element.twoAlarming;
|
|
|
|
+ otherData[index] = element.other;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ allMaxData.totalNumMax = Math.max.apply(Math,totalNumData);
|
|
|
|
+ allMaxData.oneAlarmingMax = Math.max.apply(Math,oneAlarmingData);
|
|
|
|
+ allMaxData.twoAlarmingMax = Math.max.apply(Math,twoAlarmingData);
|
|
|
|
+ allMaxData.otherMax = Math.max.apply(Math,otherData);
|
|
|
|
+
|
|
|
|
+ return allMaxData;
|
|
|
|
+
|
|
|
|
+ },
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+
|
|
|
|
+
|
|
getMsgFormSon() {
|
|
getMsgFormSon() {
|
|
this.pageShow = !this.pageShow
|
|
this.pageShow = !this.pageShow
|
|
},
|
|
},
|