|
@@ -34,10 +34,14 @@
|
|
|
<el-statistic :value="DailyStatistics.qa_key">
|
|
|
<template #suffix>
|
|
|
<span class="than-yesterday-label">相比昨天</span>
|
|
|
- <span class="than-yesterday green">
|
|
|
- 24%<el-icon>
|
|
|
+ <span class="than-yesterday" :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
|
|
|
+ {{ ThanYesterday.qa > 100 ? ThanYesterday.qa - 100 : ThanYesterday.qa }}%
|
|
|
+ <el-icon v-if="ThanYesterday.qa < 100">
|
|
|
<CaretBottom />
|
|
|
</el-icon>
|
|
|
+ <el-icon v-if="ThanYesterday.qa > 100">
|
|
|
+ <CaretTop />
|
|
|
+ </el-icon>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-statistic>
|
|
@@ -53,8 +57,12 @@
|
|
|
<el-statistic :value="DailyStatistics.in_key">
|
|
|
<template #suffix>
|
|
|
<span class="than-yesterday-label">相比昨天</span>
|
|
|
- <span class="than-yesterday red">
|
|
|
- 24%<el-icon>
|
|
|
+ <span class="than-yesterday" :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
|
|
|
+ {{ ThanYesterday.in > 100 ? ThanYesterday.in - 100 : ThanYesterday.in }}%
|
|
|
+ <el-icon v-if="ThanYesterday.in < 100">
|
|
|
+ <CaretBottom />
|
|
|
+ </el-icon>
|
|
|
+ <el-icon v-if="ThanYesterday.in > 100">
|
|
|
<CaretTop />
|
|
|
</el-icon>
|
|
|
</span>
|
|
@@ -72,8 +80,12 @@
|
|
|
<el-statistic :value="DailyStatistics.out_key">
|
|
|
<template #suffix>
|
|
|
<span class="than-yesterday-label">相比昨天</span>
|
|
|
- <span class="than-yesterday red">
|
|
|
- 24%<el-icon>
|
|
|
+ <span class="than-yesterday " :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
|
|
|
+ {{ ThanYesterday.out > 100 ? ThanYesterday.out - 100 : ThanYesterday.out }}%
|
|
|
+ <el-icon v-if="ThanYesterday.out < 100">
|
|
|
+ <CaretBottom />
|
|
|
+ </el-icon>
|
|
|
+ <el-icon v-if="ThanYesterday.out > 100">
|
|
|
<CaretTop />
|
|
|
</el-icon>
|
|
|
</span>
|
|
@@ -91,8 +103,12 @@
|
|
|
<el-statistic :value="DailyStatistics.ass_key">
|
|
|
<template #suffix>
|
|
|
<span class="than-yesterday-label">相比昨天</span>
|
|
|
- <span class="than-yesterday red">
|
|
|
- 24%<el-icon>
|
|
|
+ <span class="than-yesterday " :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
|
|
|
+ {{ ThanYesterday.ass > 100 ? ThanYesterday.ass - 100 : ThanYesterday.ass }}%
|
|
|
+ <el-icon v-if="ThanYesterday.ass < 100">
|
|
|
+ <CaretBottom />
|
|
|
+ </el-icon>
|
|
|
+ <el-icon v-if="ThanYesterday.ass > 100">
|
|
|
<CaretTop />
|
|
|
</el-icon>
|
|
|
</span>
|
|
@@ -110,8 +126,12 @@
|
|
|
<el-statistic :value="totalUnkey">
|
|
|
<template #suffix>
|
|
|
<span class="than-yesterday-label">相比昨天</span>
|
|
|
- <span class="than-yesterday red">
|
|
|
- 24%<el-icon>
|
|
|
+ <span class="than-yesterday " :class="ThanYesterday.qa < 1 ? 'green' : 'red'">
|
|
|
+ {{ ThanYesterday.totalUnkey > 100 ? ThanYesterday.totalUnkey - 100 : ThanYesterday.totalUnkey }}%
|
|
|
+ <el-icon v-if="ThanYesterday.totalUnkey < 100">
|
|
|
+ <CaretBottom />
|
|
|
+ </el-icon>
|
|
|
+ <el-icon v-if="ThanYesterday.totalUnkey > 100">
|
|
|
<CaretTop />
|
|
|
</el-icon>
|
|
|
</span>
|
|
@@ -201,7 +221,13 @@ import logoL from '@/assets/logo/logo-L.png'
|
|
|
|
|
|
import { list as listOperLog } from '@/api/monitor/operlog'
|
|
|
|
|
|
-import { GetQaCount, GetInCount, GetOutCount, GetAssCount, GetKeyProportion, GetCategoryProportion } from '@/api/business/index.js'
|
|
|
+import {
|
|
|
+ GetQaCount, YGetQaCount,
|
|
|
+ GetInCount, YGetInCount,
|
|
|
+ GetOutCount, YGetOutCount,
|
|
|
+ GetAssCount, YGetAssCount,
|
|
|
+ GetKeyProportion, GetCategoryProportion
|
|
|
+} from '@/api/business/index.js'
|
|
|
|
|
|
const strStatQA = '关键件质检数统计:'
|
|
|
const strStatInstore = '关键件入库数统计:'
|
|
@@ -310,8 +336,17 @@ const YesterdayStatistics = reactive({
|
|
|
ass: 0,
|
|
|
ass_key: 0,
|
|
|
})
|
|
|
+const ThanYesterday = reactive({
|
|
|
+ qa: computed(() => { return DailyStatistics.qa / YesterdayStatistics.qa * 100 }),
|
|
|
+ in: computed(() => { return DailyStatistics.in / YesterdayStatistics.in * 100 }),
|
|
|
+ out: computed(() => { return DailyStatistics.out / YesterdayStatistics.out * 100 }),
|
|
|
+ ass: computed(() => { return DailyStatistics.ass / YesterdayStatistics.ass * 100 }),
|
|
|
+ totalUnkey: computed(() => { return totalUnkey / yesterdayTotalUnkey * 100 }),
|
|
|
+})
|
|
|
// 非关键件一共作业数
|
|
|
-var totalUnkey = computed(() => { return DailyStatistics.qa + DailyStatistics.in + DailyStatistics.out + DailyStatistics.ass })
|
|
|
+const totalUnkey = computed(() => { return DailyStatistics.qa + DailyStatistics.in + DailyStatistics.out + DailyStatistics.ass })
|
|
|
+const yesterdayTotalUnkey = computed(() => { return YesterdayStatistics.qa + YesterdayStatistics.in + YesterdayStatistics.out + YesterdayStatistics.ass })
|
|
|
+
|
|
|
//关键件占比
|
|
|
const groupByKey = reactive({
|
|
|
unkey: 0,
|
|
@@ -406,6 +441,58 @@ function getStatistics() {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ YGetQaCount().then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].keyFlag) {
|
|
|
+ YesterdayStatistics.qa_key = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ YesterdayStatistics.qa = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ YGetInCount().then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].keyFlag) {
|
|
|
+ YesterdayStatistics.in_key = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ YesterdayStatistics.in = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ YGetOutCount().then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].keyFlag) {
|
|
|
+ YesterdayStatistics.out_key = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ YesterdayStatistics.out = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ YGetAssCount().then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].keyFlag) {
|
|
|
+ YesterdayStatistics.ass_key = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ YesterdayStatistics.ass = response.data[i]["sumQty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
GetKeyProportion().then((response) => {
|
|
|
if (response.code == 200) {
|
|
|
// console.log(response.data)
|
|
@@ -421,7 +508,7 @@ function getStatistics() {
|
|
|
})
|
|
|
GetCategoryProportion().then((response) => {
|
|
|
if (response.code == 200) {
|
|
|
- console.log(response.data)
|
|
|
+ // console.log(response.data)
|
|
|
for (var i = 0; i < response.data.length; i++) {
|
|
|
if (response.data[i].category == "外协件") {
|
|
|
groupByCategory.category0 = response.data[i]["sumQty"]
|