Compare commits

..

No commits in common. "17fb41850da55fbcd1921ecbb1d6ebb3f085438a" and "135a2b60aa3c938738f77c6b47e20966cc10c5fb" have entirely different histories.

1 changed files with 55 additions and 75 deletions

View File

@ -39,7 +39,6 @@
<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"
> >
@ -47,14 +46,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>
@ -95,11 +94,6 @@ export default {
data: 0, data: 0,
total: 0, total: 0,
}, },
{
name: "劳资预警",
data: 0,
total: 0,
},
], ],
}; };
}, },
@ -134,71 +128,57 @@ export default {
if (this.type == "detail") { if (this.type == "detail") {
prjId = this.prjInfo.id; prjId = this.prjInfo.id;
} }
this.$api.problemmodify this.$api.problemmodify.getMonitAndWarning(this.deptInfo.id||0, prjId).then((d) => {
.getMonitAndWarning(this.deptInfo.id || 0, prjId) let tmps = d.data?.today || [];
.then((d) => { let sum = 0;
let tmps = d.data?.today || []; tmps.forEach((it) => {
let sum = 0; sum += it.total;
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++;
});
}, },
}, },
}; };