prv
parent
7d231e5500
commit
b3a2fad886
|
@ -39,6 +39,7 @@
|
||||||
<div
|
<div
|
||||||
class="glr-login-number-max analyse-num-max"
|
class="glr-login-number-max analyse-num-max"
|
||||||
v-for="(item, idx) in warningType"
|
v-for="(item, idx) in warningType"
|
||||||
|
v-if="type != 'detail' || (type == 'detail' && item.name != '劳资预警')"
|
||||||
style="height: unset"
|
style="height: unset"
|
||||||
:key="idx"
|
:key="idx"
|
||||||
>
|
>
|
||||||
|
@ -46,14 +47,14 @@
|
||||||
<div class="glr-login-number analyse-login-numbe">
|
<div class="glr-login-number analyse-login-numbe">
|
||||||
<div><img src="images/text_red_spot.png" />{{ item.name }}</div>
|
<div><img src="images/text_red_spot.png" />{{ item.name }}</div>
|
||||||
<div class="glr-rate-value glr-rate-red-value">
|
<div class="glr-rate-value glr-rate-red-value">
|
||||||
<template v-if="idx==0">
|
<template v-if="idx == 0">
|
||||||
<span style="color: #c0dafb">{{ item.total }}</span>
|
<span style="color: #c0dafb">{{ item.total }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{ item.data }}</span>/
|
<span>{{ item.data }}</span
|
||||||
<span style="color: #c0dafb">{{item.total }}</span>
|
>/
|
||||||
|
<span style="color: #c0dafb">{{ item.total }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -94,6 +95,11 @@ export default {
|
||||||
data: 0,
|
data: 0,
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "劳资预警",
|
||||||
|
data: 0,
|
||||||
|
total: 0,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -128,57 +134,71 @@ export default {
|
||||||
if (this.type == "detail") {
|
if (this.type == "detail") {
|
||||||
prjId = this.prjInfo.id;
|
prjId = this.prjInfo.id;
|
||||||
}
|
}
|
||||||
this.$api.problemmodify.getMonitAndWarning(this.deptInfo.id||0, prjId).then((d) => {
|
this.$api.problemmodify
|
||||||
let tmps = d.data?.today || [];
|
.getMonitAndWarning(this.deptInfo.id || 0, prjId)
|
||||||
let sum = 0;
|
.then((d) => {
|
||||||
tmps.forEach((it) => {
|
let tmps = d.data?.today || [];
|
||||||
sum += it.total;
|
let sum = 0;
|
||||||
|
tmps.forEach((it) => {
|
||||||
|
sum += it.total;
|
||||||
|
});
|
||||||
|
this.todayCnt = sum;
|
||||||
|
sum = 0;
|
||||||
|
tmps = d.data?.week || [];
|
||||||
|
tmps.forEach((it) => {
|
||||||
|
sum += it.total;
|
||||||
|
});
|
||||||
|
this.weekCnt = sum;
|
||||||
|
let data = 0;
|
||||||
|
sum = 0;
|
||||||
|
tmps = d.data?.group || [];
|
||||||
|
let objs = tmps.filter((it) => it.infotype == "0");
|
||||||
|
objs.forEach((it) => {
|
||||||
|
sum += it.total;
|
||||||
|
if (it.checkState != "4") {
|
||||||
|
data += it.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.warningType[1].data = data;
|
||||||
|
this.warningType[1].total = sum;
|
||||||
|
data = 0;
|
||||||
|
sum = 0;
|
||||||
|
tmps = d.data?.group || [];
|
||||||
|
objs = tmps.filter((it) => it.infotype == "1");
|
||||||
|
objs.forEach((it) => {
|
||||||
|
sum += it.total;
|
||||||
|
if (it.checkState != "4") {
|
||||||
|
data += it.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.warningType[2].data = data;
|
||||||
|
this.warningType[2].total = sum;
|
||||||
|
data = 0;
|
||||||
|
sum = 0;
|
||||||
|
tmps = d.data?.group || [];
|
||||||
|
objs = tmps.filter((it) => it.infotype == "96");
|
||||||
|
objs.forEach((it) => {
|
||||||
|
sum += it.total;
|
||||||
|
if (it.checkState != "4") {
|
||||||
|
data += it.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.warningType[0].data = data;
|
||||||
|
this.warningType[0].total = sum;
|
||||||
|
data = 0;
|
||||||
|
sum = 0;
|
||||||
|
tmps = d.data?.group || [];
|
||||||
|
objs = tmps.filter((it) => it.infotype == "97");
|
||||||
|
objs.forEach((it) => {
|
||||||
|
sum += it.total;
|
||||||
|
if (it.checkState != "100") {
|
||||||
|
data += it.total;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.warningType[3].data = data;
|
||||||
|
this.warningType[3].total = sum;
|
||||||
|
this.elKey++;
|
||||||
});
|
});
|
||||||
this.todayCnt = sum;
|
|
||||||
sum = 0;
|
|
||||||
tmps = d.data?.week || [];
|
|
||||||
tmps.forEach((it) => {
|
|
||||||
sum += it.total;
|
|
||||||
});
|
|
||||||
this.weekCnt = sum;
|
|
||||||
let data = 0;
|
|
||||||
sum = 0;
|
|
||||||
tmps = d.data?.group || [];
|
|
||||||
let objs = tmps.filter((it) => it.infotype == "0");
|
|
||||||
objs.forEach((it) => {
|
|
||||||
sum += it.total;
|
|
||||||
if (it.checkState != "4") {
|
|
||||||
data += it.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.warningType[1].data = data;
|
|
||||||
this.warningType[1].total = sum;
|
|
||||||
data = 0;
|
|
||||||
sum = 0;
|
|
||||||
tmps = d.data?.group || [];
|
|
||||||
objs = tmps.filter((it) => it.infotype == "1");
|
|
||||||
objs.forEach((it) => {
|
|
||||||
sum += it.total;
|
|
||||||
if (it.checkState != "4") {
|
|
||||||
data += it.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.warningType[2].data = data;
|
|
||||||
this.warningType[2].total = sum;
|
|
||||||
data = 0;
|
|
||||||
sum = 0;
|
|
||||||
tmps = d.data?.group || [];
|
|
||||||
objs = tmps.filter((it) => it.infotype == "96");
|
|
||||||
objs.forEach((it) => {
|
|
||||||
sum += it.total;
|
|
||||||
if (it.checkState != "4") {
|
|
||||||
data += it.total;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.warningType[0].data = data;
|
|
||||||
this.warningType[0].total = sum;
|
|
||||||
this.elKey++;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue