prv
姜玉琦 2024-05-05 21:43:56 +08:00
parent 7d231e5500
commit b3a2fad886
1 changed files with 75 additions and 55 deletions

View File

@ -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"
> >
@ -50,10 +51,10 @@
<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,7 +134,9 @@ 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
.getMonitAndWarning(this.deptInfo.id || 0, prjId)
.then((d) => {
let tmps = d.data?.today || []; let tmps = d.data?.today || [];
let sum = 0; let sum = 0;
tmps.forEach((it) => { tmps.forEach((it) => {
@ -177,6 +185,18 @@ export default {
}); });
this.warningType[0].data = data; this.warningType[0].data = data;
this.warningType[0].total = sum; 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.elKey++;
}); });
}, },