|
@@ -1,199 +1,208 @@
|
|
|
<template>
|
|
|
<div class="dashboard-editor-container home">
|
|
|
- <div
|
|
|
- style="width:100%;position:absolute;background:url(public/titleBackground.png) no-repeat center;background-size: 1500px 80px;">
|
|
|
- <el-row :gutter="10" justify="center"
|
|
|
- style="width: 360px;margin-top: 10px;margin-bottom: 60px; left: 50%;margin-left: -180px; ">
|
|
|
- <el-col :span="10">
|
|
|
- <img style="height:60px;" :src="logoL" />
|
|
|
- </el-col>
|
|
|
+ <el-card class="row-space">
|
|
|
+ <template #header>
|
|
|
+ <span>今日统计</span>
|
|
|
+ </template>
|
|
|
+ <el-row :gutter="20" justify="space-evenly" align="middle">
|
|
|
<el-col :span="14">
|
|
|
- <span style="font-weight: bold; font-size:30px;height: 60px; line-height: 70px;">监控指挥平台</span>
|
|
|
+ <el-row :gutter="5" class="row-space" justify="space-evenly">
|
|
|
+ <el-col :span="intStatColWidth0"></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ strStatQATitle }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ strStatInstoreTitle }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ strStatOutstoreTitle }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ strStatAssembleTitle }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ strStatWorkTitle }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="5" class="row-space" justify="space-evenly">
|
|
|
+ <el-col :span="intStatColWidth0">
|
|
|
+ <span>今日</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.qa_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2">
|
|
|
+ <span class="than-yesterday" :class="ThanYesterday.qa < 100 ? '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></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.in_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2">
|
|
|
+ <span class="than-yesterday" :class="ThanYesterday.in < 100 ? '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></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.out_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2">
|
|
|
+ <span class="than-yesterday" :class="ThanYesterday.out < 100 ? '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></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell statistic-row-data">{{ DailyStatistics.ass_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2">
|
|
|
+ <span class="than-yesterday" :class="ThanYesterday.ass < 100 ? '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></el-col>
|
|
|
+
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell statistic-row-data">{{ totalUnkey }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2">
|
|
|
+ <span class="than-yesterday " :class="ThanYesterday.totalUnkey < 100 ? '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></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="5" class="row-space" justify="space-evenly">
|
|
|
+ <el-col :span="intStatColWidth0">
|
|
|
+ <span class=" statistic-row-cell">昨日</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ YesterdayStatistics.qa_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ YesterdayStatistics.in_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ YesterdayStatistics.out_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ YesterdayStatistics.ass_key }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+ <el-col :span="intStatColWidth1">
|
|
|
+ <span class=" statistic-row-cell">{{ yesterdayTotalUnkey }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="intStatColWidth2"></el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <bar-chart height="250px" />
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </div>
|
|
|
- <!-- 每日作业/统计信息/关键件占比 -->
|
|
|
- <el-row :gutter="10" class="row-space" style="margin-top:55px">
|
|
|
- <el-col :md="24" :lg="8" :xl="8">
|
|
|
- <el-card shadow="hover" class="card">
|
|
|
- <template #header>
|
|
|
- <span>每日作业</span>
|
|
|
- </template>
|
|
|
- <bar-chart />
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :md="24" :lg="8" :xl="8">
|
|
|
- <el-row style="margin-top:80px;" justify="center">
|
|
|
- <el-col :span="22">
|
|
|
- <el-row class="row-space row-space-span" justify="center">
|
|
|
- <el-col :span=intStatColWidth0>
|
|
|
- <span class="statistics-span">{{ strStatQA }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span=intStatColWidth1>
|
|
|
- <div class="statistic-card">
|
|
|
- <el-statistic :value="DailyStatistics.qa_key">
|
|
|
- <template #suffix>
|
|
|
- <span class="than-yesterday-label">相比昨天</span>
|
|
|
- <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>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row-space row-space-span" justify="center">
|
|
|
- <el-col :span=intStatColWidth0>
|
|
|
- <span class="statistics-span">{{ strStatInstore }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span=intStatColWidth1>
|
|
|
- <div class="statistic-card">
|
|
|
- <el-statistic :value="DailyStatistics.in_key">
|
|
|
- <template #suffix>
|
|
|
- <span class="than-yesterday-label">相比昨天</span>
|
|
|
- <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>
|
|
|
- </template>
|
|
|
- </el-statistic>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row-space row-space-span" justify="center">
|
|
|
- <el-col :span=intStatColWidth0>
|
|
|
- <span class="statistics-span">{{ strStatOutstore }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span=intStatColWidth1>
|
|
|
- <div class="statistic-card">
|
|
|
- <el-statistic :value="DailyStatistics.out_key">
|
|
|
- <template #suffix>
|
|
|
- <span class="than-yesterday-label">相比昨天</span>
|
|
|
- <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>
|
|
|
- </template>
|
|
|
- </el-statistic>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row-space row-space-span" justify="center">
|
|
|
- <el-col :span=intStatColWidth0>
|
|
|
- <span class="statistics-span">{{ strStatAssemble }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span=intStatColWidth1>
|
|
|
- <div class="statistic-card">
|
|
|
- <el-statistic :value="DailyStatistics.ass_key">
|
|
|
- <template #suffix>
|
|
|
- <span class="than-yesterday-label">相比昨天</span>
|
|
|
- <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>
|
|
|
- </template>
|
|
|
- </el-statistic>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row class="row-space row-space-span" justify="center">
|
|
|
- <el-col :span=intStatColWidth0>
|
|
|
- <span class="statistics-span">{{ strStatWork }}</span>
|
|
|
- </el-col>
|
|
|
- <el-col :span=intStatColWidth1>
|
|
|
- <div class="statistic-card">
|
|
|
- <el-statistic :value="totalUnkey">
|
|
|
- <template #suffix>
|
|
|
- <span class="than-yesterday-label">相比昨天</span>
|
|
|
- <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>
|
|
|
- </template>
|
|
|
- </el-statistic>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </el-col>
|
|
|
- <el-col :md="24" :lg="8" :xl="8">
|
|
|
- <el-card shadow="hover" class="card">
|
|
|
- <template #header>
|
|
|
- <span>关键件占比</span>
|
|
|
- </template>
|
|
|
- <Pie-chart-key />
|
|
|
- </el-card>
|
|
|
-
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <!-- 物料类别占比/操作日志/时间段作业效率 -->
|
|
|
- <el-row :gutter="10" class="row-space">
|
|
|
- <el-col :md="24" :lg="8" :xl="8">
|
|
|
- <el-card shadow="hover" class="card">
|
|
|
- <template #header>
|
|
|
- <span>物料类别占比</span>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="row-space">
|
|
|
+ <template #header>
|
|
|
+ <span>合格率</span>
|
|
|
+ <el-radio-group class="card-button" v-model="statisticQaScope" :change="GetAllPercentOfPass()">
|
|
|
+ <el-radio-button label="当日"></el-radio-button>
|
|
|
+ <el-radio-button label="当月"></el-radio-button>
|
|
|
+ <el-radio-button label="当年"></el-radio-button>
|
|
|
+ </el-radio-group>
|
|
|
+ </template>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="8">
|
|
|
+ <Piechart2Data Title="外协关键件合格率" Label1="合格" Label2="不合格" :Data="POPData0" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <Piechart2Data Title="外购关键件合格率" Label1="合格" Label2="不合格" :Data="POPData1" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <Piechart2Data Title="所有来料合格率" Label1="合格" Label2="不合格" :Data="POPData2" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="row-space">
|
|
|
+ <template #header>
|
|
|
+ <span>物料类别</span>
|
|
|
+ </template>
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="12">
|
|
|
+ <Piechart2Data Title="物料类别占比" Label1="外协件" Label2="外购件" :Data="groupByCategory" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <Piechart2Data Title="关键件占比" Label1="关键件" Label2="非关键件" :Data="groupByKey" />
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-card>
|
|
|
+ <el-card class="row-space" style="max-height: 400px;">
|
|
|
+ <template #header>
|
|
|
+ <span>日志</span>
|
|
|
+ <el-button text class="card-button-ico">
|
|
|
+ <router-link to="/system/log/operlog">
|
|
|
+ <el-icon>
|
|
|
+ <MoreFilled />
|
|
|
+ </el-icon>
|
|
|
+ </router-link>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <el-table v-loading="loading" border :data="list">
|
|
|
+ <el-table-column type="index" label="序号" align="center" />
|
|
|
+ <el-table-column label="用户" align="center" prop="operName" />
|
|
|
+ <el-table-column label="IP地址" align="center" prop="operIp" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="操作状态" align="center" prop="status">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <dict-tag :options="statusOptions" :value="row.status"></dict-tag>
|
|
|
</template>
|
|
|
- <Pie-chart-category />
|
|
|
- </el-card>
|
|
|
- </el-col>
|
|
|
- <el-col :md="24" :lg="8" :xl="8">
|
|
|
- <el-card shadow="hover" class="card">
|
|
|
- <template #header>
|
|
|
- <span>系统操作日志</span>
|
|
|
- <el-button text class="card-button">
|
|
|
- <router-link to="/system/log/operlog">
|
|
|
- <el-icon>
|
|
|
- <MoreFilled />
|
|
|
- </el-icon>
|
|
|
- </router-link>
|
|
|
- </el-button>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作日期" align="center" prop="operTime">
|
|
|
+ <template #default="scope">
|
|
|
+ <span>{{ scope.row.operTime }}</span>
|
|
|
</template>
|
|
|
- <el-table v-loading="loading" border :data="list">
|
|
|
- <el-table-column type="index" label="序号" align="center" />
|
|
|
- <el-table-column label="用户" align="center" prop="operName" />
|
|
|
- <el-table-column label="IP地址" align="center" prop="operIp" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="操作状态" align="center" prop="status">
|
|
|
- <template #default="{ row }">
|
|
|
- <dict-tag :options="statusOptions" :value="row.status"></dict-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="操作日期" align="center" prop="operTime">
|
|
|
- <template #default="scope">
|
|
|
- <span>{{ scope.row.operTime }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </el-card>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-card>
|
|
|
|
|
|
- </el-col>
|
|
|
+ <!-- <el-row :gutter="10" class="row-space">
|
|
|
<el-col :md="24" :lg="8" :xl="8">
|
|
|
<el-card shadow="hover" class="card">
|
|
|
<template #header>
|
|
@@ -203,13 +212,14 @@
|
|
|
</el-card>
|
|
|
|
|
|
</el-col>
|
|
|
- </el-row>
|
|
|
+ </el-row> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="index">
|
|
|
import { provide, computed } from 'vue'
|
|
|
import LineChart from './dashboard/LineChart'
|
|
|
+import Piechart2Data from './dashboard/PieChart_2Data'
|
|
|
import PieChartKey from './dashboard/PieChart_key'
|
|
|
import PieChartCategory from './dashboard/PieChart_category'
|
|
|
import BarChart from './dashboard/BarChart'
|
|
@@ -228,91 +238,26 @@ import {
|
|
|
GetAssCount, YGetAssCount,
|
|
|
GetKeyProportion, GetCategoryProportion
|
|
|
} from '@/api/business/index.js'
|
|
|
+import { GetPercentOfPass } from '@/api/business/qainspectrecord.js'
|
|
|
|
|
|
const strStatQA = '关键件质检数统计:'
|
|
|
const strStatInstore = '关键件入库数统计:'
|
|
|
const strStatOutstore = '关键件出库数统计:'
|
|
|
const strStatAssemble = '关键件装配数统计:'
|
|
|
const strStatWork = '非关键件作业数统计:'
|
|
|
-const strStatQATitle = '关键件质检数统计'
|
|
|
-const strStatInstoreTitle = '关键件入库数统计'
|
|
|
-const strStatOutstoreTitle = '关键件出库数统计'
|
|
|
-const strStatAssembleTitle = '关键件装配数统计'
|
|
|
-const strStatWorkTitle = '非关键件作业数统计'
|
|
|
-
|
|
|
-const intStatColWidth0 = 8
|
|
|
-const intStatColWidth1 = 12
|
|
|
-const intStatColWidth2 = 10
|
|
|
-
|
|
|
-const data = {
|
|
|
- newVisitis: {
|
|
|
- expectedData: [100, 120, 161, 134, 105, 160, 165],
|
|
|
- actualData: [120, 82, 91, 154, 162, 140, 145]
|
|
|
- },
|
|
|
- messages: {
|
|
|
- expectedData: [200, 192, 120, 144, 160, 130, 140],
|
|
|
- actualData: [180, 160, 151, 106, 145, 150, 130]
|
|
|
- },
|
|
|
- purchases: {
|
|
|
- expectedData: [80, 100, 121, 104, 105, 90, 100],
|
|
|
- actualData: [120, 90, 100, 138, 142, 130, 130]
|
|
|
- },
|
|
|
- shoppings: {
|
|
|
- expectedData: [130, 140, 141, 142, 145, 150, 160],
|
|
|
- actualData: [120, 82, 91, 154, 162, 140, 130]
|
|
|
- },
|
|
|
- wordCloud: [
|
|
|
- {
|
|
|
- name: 'Vue3',
|
|
|
- value: 144
|
|
|
- },
|
|
|
- {
|
|
|
- name: '.net6',
|
|
|
- value: 928
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'Sqlsugar',
|
|
|
- value: 906
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'Redis',
|
|
|
- value: 825
|
|
|
- },
|
|
|
- {
|
|
|
- name: '代码生成',
|
|
|
- value: 514
|
|
|
- },
|
|
|
- {
|
|
|
- name: '开源免费',
|
|
|
- value: 486
|
|
|
- },
|
|
|
- {
|
|
|
- name: '代码简单',
|
|
|
- value: 53
|
|
|
- },
|
|
|
- {
|
|
|
- name: '打赏',
|
|
|
- value: 163
|
|
|
- },
|
|
|
- {
|
|
|
- name: '国际化',
|
|
|
- value: 163
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'Composition api',
|
|
|
- value: 1163
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'Quartz.Net',
|
|
|
- value: 190
|
|
|
- },
|
|
|
- {
|
|
|
- name: 'Element UI',
|
|
|
- value: 190
|
|
|
- }
|
|
|
- ]
|
|
|
-}
|
|
|
+
|
|
|
+const strStatQATitle = '关键件质检'
|
|
|
+const strStatInstoreTitle = '关键件入库'
|
|
|
+const strStatOutstoreTitle = '关键件出库'
|
|
|
+const strStatAssembleTitle = '关键件装配'
|
|
|
+const strStatWorkTitle = '非关键件作业'
|
|
|
+
|
|
|
+const intStatColWidth0 = 1
|
|
|
+const intStatColWidth1 = 3
|
|
|
+const intStatColWidth2 = 1
|
|
|
+
|
|
|
const { proxy } = getCurrentInstance()
|
|
|
+
|
|
|
// 每日作业数
|
|
|
const DailyStatistics = reactive({
|
|
|
qa: 0,
|
|
@@ -325,7 +270,7 @@ const DailyStatistics = reactive({
|
|
|
ass_key: 0,
|
|
|
})
|
|
|
provide('DailyStatistics', DailyStatistics)
|
|
|
-//昨日作业数
|
|
|
+// 昨日作业数
|
|
|
const YesterdayStatistics = reactive({
|
|
|
qa: 0,
|
|
|
qa_key: 0,
|
|
@@ -347,16 +292,21 @@ const ThanYesterday = reactive({
|
|
|
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 statisticQaScope = ref('当月')
|
|
|
+// 合格率 d0合格,d1不合格
|
|
|
+const POPData0 = reactive({ d0: 0, d1: 0 })
|
|
|
+const POPData1 = reactive({ d0: 0, d1: 0 })
|
|
|
+const POPData2 = reactive({ d0: 0, d1: 0 })
|
|
|
+// 关键件占比
|
|
|
const groupByKey = reactive({
|
|
|
- unkey: 0,
|
|
|
- key: 0,
|
|
|
+ d0: 0,//关键件
|
|
|
+ d1: 0,//非关键件
|
|
|
})
|
|
|
provide('groupByKey', groupByKey)
|
|
|
//物料类别占比
|
|
|
const groupByCategory = reactive({
|
|
|
- category0: 0,
|
|
|
- category1: 0,
|
|
|
+ d0: 0,//外协件
|
|
|
+ d1: 0,//外购件
|
|
|
})
|
|
|
provide('groupByCategory', groupByCategory)
|
|
|
|
|
@@ -369,7 +319,12 @@ const queryParams = ref({
|
|
|
status: undefined,
|
|
|
operParam: undefined
|
|
|
})
|
|
|
-
|
|
|
+const POPParams = ref({
|
|
|
+ category: undefined,
|
|
|
+ keyFlag: undefined,
|
|
|
+ beginTime: undefined,
|
|
|
+ endTime: undefined
|
|
|
+})
|
|
|
// 遮罩层
|
|
|
const loading = ref(true)
|
|
|
// 操作日志数据
|
|
@@ -498,10 +453,10 @@ function getStatistics() {
|
|
|
// console.log(response.data)
|
|
|
for (var i = 0; i < response.data.length; i++) {
|
|
|
if (response.data[i].keyFlag) {
|
|
|
- groupByKey.key = response.data[i]["sumQty"]
|
|
|
+ groupByKey.d0 = response.data[i]["sumQty"]
|
|
|
}
|
|
|
else {
|
|
|
- groupByKey.unkey = response.data[i]["sumQty"]
|
|
|
+ groupByKey.d1 = response.data[i]["sumQty"]
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -511,23 +466,102 @@ function getStatistics() {
|
|
|
// console.log(response.data)
|
|
|
for (var i = 0; i < response.data.length; i++) {
|
|
|
if (response.data[i].category == "外协件") {
|
|
|
- groupByCategory.category0 = response.data[i]["sumQty"]
|
|
|
+ groupByCategory.d0 = response.data[i]["sumQty"]
|
|
|
}
|
|
|
else if (response.data[i].category == "外购件") {
|
|
|
- groupByCategory.category1 = response.data[i]["sumQty"]
|
|
|
+ groupByCategory.d1 = response.data[i]["sumQty"]
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
-getStatistics()
|
|
|
-let lineChartData = reactive([])
|
|
|
-const dataType = ref(null)
|
|
|
-function handleSetLineChartData(type) {
|
|
|
- dataType.value = type
|
|
|
- lineChartData = data[type]
|
|
|
+function GetAllPercentOfPass() {
|
|
|
+ const timeScope = reactive({
|
|
|
+ beginTime: undefined,
|
|
|
+ endTime: undefined
|
|
|
+ })
|
|
|
+ let date = new Date
|
|
|
+ var thisYear = date.getFullYear()
|
|
|
+ var thisMonth = date.getMonth() + 1
|
|
|
+ var today = date.getDay()
|
|
|
+
|
|
|
+ if (statisticQaScope.value == "当日") {
|
|
|
+ timeScope.beginTime = new Date(thisYear, thisMonth, today, 0, 0, 0)
|
|
|
+ timeScope.endTime = new Date(thisYear, thisMonth, today, 23, 59, 59)
|
|
|
+ // console.log('当日')
|
|
|
+ // console.log(timeScope)
|
|
|
+ }
|
|
|
+ if (statisticQaScope.value == "当月") {
|
|
|
+ var firstDay = new Date(thisYear, thisMonth, 1) // 取当年当月中的第一天
|
|
|
+ var lastDay = new Date(thisYear, thisMonth, new Date(firstDay.getTime() - 1000 * 60 * 60 * 24).getDate(), 23, 59, 59) // 获取当月最后一天日期
|
|
|
+ timeScope.beginTime = firstDay
|
|
|
+ timeScope.endTime = lastDay
|
|
|
+ // console.log('当月')
|
|
|
+ // console.log(timeScope)
|
|
|
+ }
|
|
|
+ if (statisticQaScope.value == "当年") {
|
|
|
+ timeScope.beginTime = new Date(thisYear, 1, 1, 0, 0, 0)
|
|
|
+ timeScope.endTime = new Date(thisYear, 12, 31, 23, 59, 59)
|
|
|
+ // console.log('当年')
|
|
|
+ // console.log(timeScope)
|
|
|
+ }
|
|
|
+ GetPercentOfPass({ category: '外协件', keyFlag: true, beginTime: timeScope.beginTime, endTime: timeScope.endTime }).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].checkResult == "OK") {
|
|
|
+ POPData0.d0 = response.data[i]["qty"]
|
|
|
+ }
|
|
|
+ else if (response.data[i].checkResult == "NG") {
|
|
|
+ POPData0.d1 = response.data[i]["qty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (response.data.length < 1) {
|
|
|
+ POPData0.d0 = 0
|
|
|
+ POPData0.d1 = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ GetPercentOfPass({ category: '外购件', keyFlag: true, beginTime: timeScope.beginTime, endTime: timeScope.endTime }).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].checkResult == "OK") {
|
|
|
+ POPData1.d0 = response.data[i]["qty"]
|
|
|
+ }
|
|
|
+ else if (response.data[i].checkResult == "NG") {
|
|
|
+ POPData1.d1 = response.data[i]["qty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (response.data.length < 1) {
|
|
|
+ POPData1.d0 = 0
|
|
|
+ POPData1.d1 = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ GetPercentOfPass({ keyFlag: true, beginTime: timeScope.beginTime, endTime: timeScope.endTime }).then((response) => {
|
|
|
+ if (response.code == 200) {
|
|
|
+ // console.log(response.data)
|
|
|
+ for (var i = 0; i < response.data.length; i++) {
|
|
|
+ if (response.data[i].checkResult == "OK") {
|
|
|
+ POPData2.d0 = response.data[i]["qty"]
|
|
|
+ }
|
|
|
+ else if (response.data[i].checkResult == "NG") {
|
|
|
+ POPData2.d1 = response.data[i]["qty"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (response.data.length < 1) {
|
|
|
+ POPData2.d0 = 0
|
|
|
+ POPData2.d1 = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
-handleSetLineChartData('newVisitis')
|
|
|
+getStatistics()
|
|
|
+GetAllPercentOfPass()
|
|
|
+
|
|
|
// 系统状态字典
|
|
|
const statusOptions = ref([])
|
|
|
proxy.getDicts('sys_common_status').then((response) => {
|
|
@@ -554,17 +588,13 @@ getList()
|
|
|
.statistics-span {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: center;
|
|
|
+ justify-content: right;
|
|
|
font-size: 16px;
|
|
|
margin: 5px 0px;
|
|
|
}
|
|
|
|
|
|
.row-space {
|
|
|
- margin-bottom: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .row-space-span {
|
|
|
- line-height: 35px;
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
// .card{
|
|
@@ -671,6 +701,15 @@ getList()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.statistic-row-cell {
|
|
|
+ float: right;
|
|
|
+}
|
|
|
+
|
|
|
+.statistic-row-data {
|
|
|
+ font-size: 30px;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+
|
|
|
.el-statistic {
|
|
|
--el-statistic-content-font-size: 32px;
|
|
|
}
|
|
@@ -711,8 +750,8 @@ getList()
|
|
|
}
|
|
|
|
|
|
.than-yesterday {
|
|
|
- font-size: 18px;
|
|
|
- margin-left: 10px;
|
|
|
+ font-size: 15px;
|
|
|
+ line-height: 30px;
|
|
|
}
|
|
|
|
|
|
.than-yesterday-label {
|
|
@@ -732,9 +771,14 @@ getList()
|
|
|
height: 400px;
|
|
|
}
|
|
|
|
|
|
-.card-button {
|
|
|
+.card-button-ico {
|
|
|
float: right;
|
|
|
width: 25px;
|
|
|
height: 25px;
|
|
|
}
|
|
|
+
|
|
|
+.card-button {
|
|
|
+ margin-left: 10px;
|
|
|
+ float: right;
|
|
|
+}
|
|
|
</style>
|