Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
659226e6ad
|
@ -16,14 +16,17 @@ VUE_APP_PJ = ''
|
|||
# VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||
|
||||
#测试环境
|
||||
VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
# VUE_APP_API_BASEURL = http://10.50.211.228:2250/api
|
||||
#VUE_APP_API_BASEURL = http://127.0.0.1:2226/api
|
||||
|
||||
VUE_APP_BASEURL = http://10.50.211.228:2250/
|
||||
|
||||
# VUE_APP_BASEURL = http://10.50.211.228:2250
|
||||
#VUE_APP_BASEURL = http://127.0.0.1:2226
|
||||
|
||||
# #光子
|
||||
# VUE_APP_API_BASEURL = http://49.232.14.174:2250/api
|
||||
# VUE_APP_BASEURL = http://49.232.14.174:2250
|
||||
VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
|
||||
VUE_APP_BASEURL = http://49.232.14.174:2226
|
||||
|
||||
# 本地端口
|
||||
VUE_APP_PORT = 2800
|
||||
|
|
|
@ -417,4 +417,18 @@ export default {
|
|||
return await http.post("http://localhost:8080/prints/", data);
|
||||
},
|
||||
},
|
||||
ana:{
|
||||
equipLastMlog:{
|
||||
name: "设备状态列表",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/wpm/ana/equip_last_mlog/`, data);
|
||||
},
|
||||
},
|
||||
put_prod:{
|
||||
name: "统计值",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/wpm/ana/put_prod/`, data);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -94,6 +94,14 @@
|
|||
width="150px"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="table_edit(scope.row)"
|
||||
v-if="scope.row.state == 10&&(scope.row.type == 'other_in' ||scope.row.type == 'other_out')"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
|
@ -106,11 +114,7 @@
|
|||
type="primary"
|
||||
@click="table_submit(scope.row)"
|
||||
v-auth="'mio.submit'"
|
||||
v-if="
|
||||
scope.row.state == 10 &&
|
||||
(scope.row.type == 'other_in' ||
|
||||
scope.row.type == 'other_out')
|
||||
"
|
||||
v-if="scope.row.state == 10 &&(scope.row.type == 'other_in' ||scope.row.type == 'other_out')"
|
||||
>
|
||||
提交
|
||||
</el-button>
|
||||
|
@ -211,9 +215,10 @@ export default {
|
|||
table_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit", type).setData(row);
|
||||
this.$refs.saveDialog.open("edit", row.type).setData(row);
|
||||
});
|
||||
},
|
||||
|
||||
//查看
|
||||
table_detail(row) {
|
||||
this.type = row.type;
|
||||
|
|
|
@ -106,6 +106,25 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班次">
|
||||
<el-select
|
||||
v-model="form.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in shiftOtions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-divider style="margin-top:0"></el-divider>
|
||||
<el-row v-if="mode=='sizeAdd'||mode=='sizeEdit'||mode=='sizeShow'">
|
||||
|
@ -458,12 +477,14 @@ export default {
|
|||
isSaveing: false,
|
||||
options: [],
|
||||
userList:[],
|
||||
shiftOtions:[],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getUsers();
|
||||
this.getShift();
|
||||
},
|
||||
methods: {
|
||||
//显示
|
||||
|
@ -473,6 +494,12 @@ export default {
|
|||
this.getMaterialBatch();
|
||||
return this;
|
||||
},
|
||||
getShift(){
|
||||
let that = this;
|
||||
that.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
|
||||
that.shiftOtions = res;
|
||||
});
|
||||
},
|
||||
getUsers(){
|
||||
let that = this;
|
||||
let userList = [];
|
||||
|
|
|
@ -31,12 +31,12 @@
|
|||
<!-- 0 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart0"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(0)"
|
||||
|
@ -52,6 +52,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -63,11 +65,22 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="前道不良" prop="加工前不良">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -78,12 +91,12 @@
|
|||
<!-- 1 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart1"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(1)"
|
||||
|
@ -99,6 +112,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -110,11 +125,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -125,12 +149,12 @@
|
|||
<!-- 2 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart2"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(2)"
|
||||
|
@ -146,6 +170,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -157,11 +183,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -172,12 +207,12 @@
|
|||
<!-- 3 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart3"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(3)"
|
||||
|
@ -193,6 +228,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -204,11 +241,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -219,12 +265,12 @@
|
|||
<!-- 4 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart4"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(4)"
|
||||
|
@ -240,6 +286,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -251,11 +299,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -266,12 +323,12 @@
|
|||
<!-- 5 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart5"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(5)"
|
||||
|
@ -287,6 +344,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -298,11 +357,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -313,12 +381,12 @@
|
|||
<!-- 6 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart6"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(6)"
|
||||
|
@ -334,6 +402,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -345,11 +415,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -360,12 +439,12 @@
|
|||
<!-- 7 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart7"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(7)"
|
||||
|
@ -381,6 +460,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -392,11 +473,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -407,12 +497,12 @@
|
|||
<!-- 8 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart8"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(8)"
|
||||
|
@ -428,6 +518,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -439,11 +531,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -454,12 +555,12 @@
|
|||
<!-- 9 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart9"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(9)"
|
||||
|
@ -475,6 +576,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -486,11 +589,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -501,12 +613,12 @@
|
|||
<!-- 10 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart10"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(10)"
|
||||
|
@ -522,6 +634,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -533,11 +647,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -548,12 +671,12 @@
|
|||
<!-- 11 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart11"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(11)"
|
||||
|
@ -569,6 +692,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -580,11 +705,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -595,12 +729,12 @@
|
|||
<!-- 12 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart12"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(12)"
|
||||
|
@ -616,6 +750,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -627,11 +763,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -642,12 +787,12 @@
|
|||
<!-- 13 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart13"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(13)"
|
||||
|
@ -663,6 +808,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -674,11 +821,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -689,12 +845,12 @@
|
|||
<!-- 14 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart14"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(14)"
|
||||
|
@ -710,6 +866,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -721,11 +879,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -736,12 +903,12 @@
|
|||
<!-- 15 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<div id="bachart15"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(15)"
|
||||
|
@ -757,6 +924,8 @@
|
|||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="物料名" prop="物料名" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="设备名称" prop="设备名称" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="日期">
|
||||
<template #default="scope">
|
||||
{{ scope.row.年 }}-{{ scope.row.月 }}-{{ scope.row.日 }}
|
||||
|
@ -768,11 +937,20 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="合格数" prop="合格数">
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" prop="不合格数">
|
||||
<el-table-column label="不合格数" align="center">
|
||||
<el-table-column label="线痕" prop="线痕"></el-table-column>
|
||||
<el-table-column label="破损" prop="破损"></el-table-column>
|
||||
<el-table-column label="麻点" prop="麻点"></el-table-column>
|
||||
<el-table-column label="气泡" prop="气泡"></el-table-column>
|
||||
<el-table-column label="水纹" prop="水纹"></el-table-column>
|
||||
<el-table-column label="崩边" prop="崩边"></el-table-column>
|
||||
<el-table-column label="划伤" prop="划伤"></el-table-column>
|
||||
<el-table-column label="其他" prop="其他"></el-table-column>
|
||||
<el-table-column label="合计" prop="不合格数"></el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格率" prop="合格率">
|
||||
<template #default="scope">
|
||||
{{ Math.round(scope.row.合格率) }}%
|
||||
{{ (scope.row.合格率).toFixed(2) }}%
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -780,7 +958,6 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
|
@ -923,6 +1100,7 @@ export default {
|
|||
let option = deepCopy(that.basicOption);
|
||||
let query = deepCopy(that.query);
|
||||
query.mgroup_name = mgroup_name;
|
||||
option.title.text = mgroup_name+"合格数统计";
|
||||
let obj = {};
|
||||
obj.query = query;
|
||||
that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => {
|
||||
|
@ -934,7 +1112,6 @@ export default {
|
|||
tableData.forEach((ite) => {
|
||||
if (nameList.indexOf(ite.物料名) > -1) {} else {
|
||||
nameList.push(ite.物料名);
|
||||
|
||||
dataList.push([])
|
||||
datas.push([0,0,0,0,0,0,0]);
|
||||
let obj = {
|
||||
|
@ -947,24 +1124,20 @@ export default {
|
|||
option.series.push(obj)
|
||||
}
|
||||
});
|
||||
console.log('nameList',nameList);
|
||||
that.nameList = nameList;
|
||||
tableData.forEach((item) => {
|
||||
let indexX = nameList.indexOf(item.物料名);
|
||||
dataList[indexX].push(item);
|
||||
});
|
||||
console.log('dataList',dataList)
|
||||
for(let i = 0;i<dataList.length;i++){
|
||||
for(let j = 0;j<dataList[i].length;j++){
|
||||
let index = that.weekDateList.indexOf(dataList[i][j].日);
|
||||
datas[i][index] = dataList[i][j].合格数; //将当前日期对应的合格数添加到datas中
|
||||
}
|
||||
}
|
||||
console.log('datas',datas);
|
||||
for(let n=0;n<nameList.length;n++){
|
||||
option.series[n].data = datas[n];
|
||||
}
|
||||
console.log('option',option);
|
||||
let chartId = 'bachart'+mgroup_index;
|
||||
that.setChart(chartId, option);
|
||||
} else {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="right-panel">
|
||||
<el-select v-model="mgroupId"
|
||||
<!-- <el-select v-model="mgroupId"
|
||||
placeholder="请选择工段"
|
||||
@change="mgroupChange">
|
||||
<el-option
|
||||
|
@ -12,7 +12,7 @@
|
|||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<el-date-picker
|
||||
v-model="searchDate"
|
||||
type="month"
|
||||
|
@ -29,31 +29,25 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-main id="elMain">
|
||||
<el-row :gutter="10" id="elCol">
|
||||
<el-col :lg="10">
|
||||
<el-card shadow="never">
|
||||
<scEcharts height="500px" :option="option"></scEcharts>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="14">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<!-- 0 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart0"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport('7')"
|
||||
@click="handleExport(0)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
id="exportDiv7"
|
||||
height="500px"
|
||||
>
|
||||
<el-table :data="tableData0" id="exportDiv0" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column
|
||||
label="任务编号"
|
||||
prop="number"
|
||||
min-width="100px"
|
||||
>
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
|
@ -63,13 +57,490 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 1 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart1"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(1)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table
|
||||
:data="tableData1"
|
||||
id="exportDiv1"
|
||||
:height="300"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 2 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart2"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(2)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData2" id="exportDiv2" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 3 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart3"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(3)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData3" id="exportDiv3" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 4 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart4"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(4)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData4" id="exportDiv4" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 5 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart5"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(5)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData5" id="exportDiv5" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 6 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart6"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(6)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData6" id="exportDiv6" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 7 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart7"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(7)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData7" id="exportDiv7" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 8 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart8"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(8)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData8" id="exportDiv8" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 9 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart9"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(9)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData9" id="exportDiv9" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 10 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart10"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(10)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData10" id="exportDiv10" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 11 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart11"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(11)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData11" id="exportDiv11" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 12 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart12"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(12)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData12" id="exportDiv12" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 13 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart13"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(13)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData13" id="exportDiv13" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 14 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart14"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(14)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData14" id="exportDiv14" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<!-- 15 -->
|
||||
<el-card shadow="never" style="margin-bottom: 8px">
|
||||
<el-row :gutter="10">
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never">
|
||||
<div id="linechart15"></div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="12">
|
||||
<el-card shadow="never" style="position: relative">
|
||||
<el-button
|
||||
@click="handleExport(15)"
|
||||
class="tables"
|
||||
type="primary"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-table :data="tableData15" id="exportDiv15" :height="300">
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column label="任务编号" prop="number" min-width="100px">
|
||||
</el-table-column>
|
||||
<el-table-column label="计划数" prop="count">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成数" prop="count_ok">
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率" prop="rate">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
import T from "@/components/scEcharts/echarts-theme-T.js";
|
||||
echarts.registerTheme("T", T);
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
function deepCopy(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
const ondDayTime = 86400000;
|
||||
export default {
|
||||
name: "chart",
|
||||
components: {
|
||||
|
@ -90,8 +561,7 @@ export default {
|
|||
currentDate: "",
|
||||
searchDate:'',
|
||||
options:[],
|
||||
tableData1: [],
|
||||
option: {
|
||||
basicOption: {
|
||||
title: {
|
||||
text: "",
|
||||
},
|
||||
|
@ -104,7 +574,7 @@ export default {
|
|||
},
|
||||
color: ["rgb(64,158,255)", "orange"],
|
||||
series: {
|
||||
name: "7车间完成率",
|
||||
name: "任务进度",
|
||||
type: "pie",
|
||||
radius: ["40%", "70%"],
|
||||
center: ["50%", "60%"],
|
||||
|
@ -114,68 +584,121 @@ export default {
|
|||
formatter: "{b} : {c} ({d}%)",
|
||||
},
|
||||
data: [
|
||||
{ value: 0, name: "已完成" },
|
||||
{ value: 0, name: "合格数" },
|
||||
{ value: 0, name: "未完成" },
|
||||
],
|
||||
},
|
||||
},
|
||||
tableData0: [],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
tableData3: [],
|
||||
tableData4: [],
|
||||
tableData5: [],
|
||||
tableData6: [],
|
||||
tableData7: [],
|
||||
tableData8: [],
|
||||
tableData9: [],
|
||||
tableData10: [],
|
||||
tableData11: [],
|
||||
tableData12: [],
|
||||
tableData13: [],
|
||||
tableData14: [],
|
||||
tableData15: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let date = new Date();
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
month = month < 10 ? "0" + month : month;
|
||||
that.currentDate = that.searchDate = year + "-" + month;
|
||||
let days = new Date(year, month, 0).getDate();
|
||||
let start_date = year + "-" + month + "-01";
|
||||
let end_date = year + "-" + month + "-"+days;
|
||||
that.start_date = that.query.querys[0][0].value = start_date;
|
||||
that.end_date = that.query.querys[1][0].value = end_date;
|
||||
let height = document.getElementById("elCol").clientHeight;
|
||||
let chartheight = height+'px';
|
||||
that.tableHeight = height-20;
|
||||
let nowDate = new Date();
|
||||
that.getMgroup();
|
||||
},
|
||||
methods: {
|
||||
getWeekDate(dates){
|
||||
let that = this;
|
||||
dates = new Date(dates);
|
||||
let week =dates.getDay(); //当前时间的week数
|
||||
let weekFirst = 0, weekLast = 0;
|
||||
if (week == 0) {
|
||||
weekFirst = 6;
|
||||
weekLast = 0; //周日特殊处理
|
||||
} else {
|
||||
weekFirst = week - 1;
|
||||
weekLast = 7 - week;
|
||||
}
|
||||
let first = new Date(dates.getTime() - weekFirst * ondDayTime); //本周周一
|
||||
let last = new Date(new Date(dates.getTime() + weekLast * ondDayTime)); //本周周日
|
||||
let dateArr = [];
|
||||
for (let i = 0; i < 7; i++) {
|
||||
let itemDate = new Date(first.getTime() + i * ondDayTime);
|
||||
let item = itemDate.getDate();
|
||||
dateArr.push(item);
|
||||
}
|
||||
that.weekDateList = dateArr;
|
||||
that.query.start_date = that.query.querys[0][0].value = first.toISOString().split('T')[0];
|
||||
that.query.end_date = that.query.querys[1][0].value = last.toISOString().split('T')[0];
|
||||
that.options.forEach((item,index)=>{
|
||||
that.getData(item.id,item.name,index);
|
||||
})
|
||||
|
||||
},
|
||||
getMgroup(){
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => {
|
||||
that.options = res;
|
||||
let nowDate = new Date();
|
||||
that.getWeekDate(nowDate);
|
||||
});
|
||||
},
|
||||
getData() {
|
||||
setChart(name, option = null) {
|
||||
// 根据name 渲染数据, option需填写,否则option为模拟数据
|
||||
var myChart = echarts.getInstanceByDom(
|
||||
document.getElementById(name)
|
||||
);
|
||||
if (myChart == undefined) {
|
||||
myChart = echarts.init(document.getElementById(name), "T");
|
||||
}
|
||||
if (option == null) {
|
||||
option = Object.assign({}, this.basicOption);
|
||||
}
|
||||
setTimeout(() => {
|
||||
try {
|
||||
myChart.setOption(option);
|
||||
} catch (error) {}
|
||||
}, 500);
|
||||
},
|
||||
getData(mgroup_id,mgroup_name,mgroup_index) {
|
||||
let that = this;
|
||||
that.tableData1 = [];
|
||||
that.option.series.data[0].value = 0;
|
||||
that.option.series.data[1].value = 0;
|
||||
let option = deepCopy(that.basicOption);
|
||||
option.title.text = mgroup_name+"任务进度";
|
||||
option.series.data[0].value = 0;
|
||||
option.series.data[1].value = 0;
|
||||
|
||||
that.query.querys[0][1].value = mgroup_id;
|
||||
that.query.querys[1][1].value = mgroup_id;
|
||||
that.$API.pm.mtask.cquery.req(that.query).then((res) => {
|
||||
let data = [];
|
||||
let count_ok1 = 0;
|
||||
let count_notok1 = 0;
|
||||
let names = 'tableData'+mgroup_index;
|
||||
that[names] = res;
|
||||
console.log('names',names);
|
||||
console.log('that[names]',that[names]);
|
||||
let count_jh = 0,count_ok = 0,count_diff = 0;
|
||||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
let obj = item;
|
||||
obj.rate = Math.round((item.count_ok / item.count) * 100).toFixed(2) + "%";
|
||||
if (item.count_ok >= item.count) {
|
||||
count_ok1++;
|
||||
} else {
|
||||
count_notok1++;
|
||||
}
|
||||
data.push(obj);
|
||||
count_jh+=item.count;
|
||||
count_ok+=item.count_ok;
|
||||
});
|
||||
that.tableData1 = data;
|
||||
count_diff = count_jh - count_ok;
|
||||
option.series.data[0].value = count_ok;
|
||||
option.series.data[1].value = count_diff;
|
||||
let chartId = 'linechart'+mgroup_index;
|
||||
that.setChart(chartId, option);
|
||||
}else{
|
||||
let chartId = 'linechart'+mgroup_index;
|
||||
that.setChart(chartId, option);
|
||||
}
|
||||
that.option.series.data[0].value = count_ok1;
|
||||
that.option.series.data[1].value = count_notok1;
|
||||
|
||||
});
|
||||
},
|
||||
mgroupChange(){
|
||||
let that = this;
|
||||
that.query.querys[0][1].value = that.mgroupId;
|
||||
that.query.querys[1][1].value = that.mgroupId;
|
||||
},
|
||||
handleQuery(){
|
||||
let that = this;
|
||||
if(this.searchDate!==''&&this.searchDate!==null){
|
||||
|
@ -191,7 +714,9 @@ export default {
|
|||
that.query.querys[0][0].value = that.start_date;
|
||||
that.query.querys[1][0].value = that.end_date;
|
||||
}
|
||||
that.getData();
|
||||
that.options.forEach((item,index)=>{
|
||||
that.getData(item.id,item.name,index);
|
||||
})
|
||||
},
|
||||
handleExport(val) {
|
||||
this.exportLoading = true;
|
||||
|
@ -205,8 +730,12 @@ export default {
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
#elCol{
|
||||
height:100%;
|
||||
#linechart1,#linechart2,#linechart3,#linechart4,
|
||||
#linechart5,#linechart6,#linechart7,#linechart8,
|
||||
#linechart9,#linechart10,#linechart11,#linechart12,
|
||||
#linechart13,#linechart14,#linechart15,#linechart0{
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
.tables {
|
||||
position: absolute;
|
||||
|
|
|
@ -75,21 +75,19 @@
|
|||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<div style="padding-left: 50px">
|
||||
<el-descriptions :column="2">
|
||||
<template v-for="item in props.row.handoverb" :key="item.id">
|
||||
<el-descriptions :column="3">
|
||||
<el-descriptions-item label="批次">
|
||||
{{props.row.batch}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">
|
||||
{{props.row.count}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格标记" v-if="props.row.notok_sign_name!==null">
|
||||
{{props.row.notok_sign_name}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</el-descriptions>
|
||||
<template v-for="item in props.row.handoverb" :key="item.id">
|
||||
<el-descriptions :column="3">
|
||||
<el-descriptions-item label="批次">
|
||||
{{item.batch}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">
|
||||
{{item.count}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="不合格标记" v-if="item.notok_sign_name!==null">
|
||||
{{item.notok_sign_name}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
@ -105,18 +103,13 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="数量" prop="count" width="80"></el-table-column>
|
||||
<el-table-column label="交接类型" prop="type" width="100">
|
||||
<template #default="scope">
|
||||
<el-text
|
||||
v-if="scope.row.send_mgroup == mgroupId"
|
||||
type="primary"
|
||||
>交送</el-text
|
||||
>
|
||||
<span style="width: 4px;"></span>
|
||||
<el-text
|
||||
v-if="scope.row.recive_mgroup == mgroupId"
|
||||
type="success"
|
||||
>接收</el-text
|
||||
>
|
||||
<template #default="scope" v-if="mgroupName=='size'||mgroupName=='facade'">
|
||||
<el-text v-if="scope.row.send_dept == deptId" type="primary">交送</el-text>
|
||||
<el-text v-if="scope.row.recive_dept == deptId" type="success">接收</el-text>
|
||||
</template>
|
||||
<template #default="scope" v-else>
|
||||
<el-text v-if="scope.row.send_mgroup == mgroupId" type="primary">交送</el-text>
|
||||
<el-text v-if="scope.row.recive_mgroup == mgroupId" type="success">接收</el-text>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交接类别" prop="type" width="80">
|
||||
|
@ -127,9 +120,12 @@
|
|||
<el-tag v-if="scope.row.type == 20" type="warning"
|
||||
>返工</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 30" type="warning"
|
||||
<el-tag v-if="scope.row.type == 30" type="primary"
|
||||
>检验</el-tag
|
||||
>
|
||||
<el-tag v-if="scope.row.type == 40" type="danger"
|
||||
>报废</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -167,20 +163,14 @@
|
|||
size="small"
|
||||
@click="table_receive(scope.row)"
|
||||
type="success"
|
||||
v-if="
|
||||
scope.row.recive_mgroup == mgroupId &&
|
||||
scope.row.submit_time == null
|
||||
"
|
||||
>接收</el-button
|
||||
>
|
||||
v-if="(scope.row.recive_mgroup == mgroupId||scope.row.recive_dept == deptId)&&scope.row.submit_time == null"
|
||||
>接收</el-button>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
@click="table_show(scope.row)"
|
||||
type="success"
|
||||
v-if="scope.row.recive_mgroup == mgroupId &&scope.row.submit_time == null"
|
||||
>查看</el-button
|
||||
>
|
||||
>查看</el-button>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
|
@ -275,8 +265,10 @@ export default {
|
|||
selection: [],
|
||||
handoverItem: {},
|
||||
values: "交送",
|
||||
deptId:'',
|
||||
mtask: "",
|
||||
mlogId: "",
|
||||
mgroupId: "",
|
||||
processId: "",
|
||||
processCate: "",
|
||||
printer_name: "",
|
||||
|
@ -285,12 +277,27 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
console.log('that.mgroupName',that.mgroupName);
|
||||
if(that.mgroupName=="size"){//尺寸检验
|
||||
that.params.material__process__name="一次超洗";
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
// that.params.material__process__name="一次超洗";
|
||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.deptId = res[0].id;
|
||||
that.params.dept=res[0].id;
|
||||
console.log('that.deptId',that.deptId);
|
||||
}
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
})
|
||||
}else if(that.mgroupName=="facade"){//外观检验
|
||||
that.params.material__process__name="二次超洗";
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
// that.params.material__process__name="二次超洗";
|
||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.deptId = res[0].id;
|
||||
that.params.dept=res[0].id;
|
||||
console.log('that.deptId',that.deptId);
|
||||
}
|
||||
that.apiObj = that.$API.wpm.handover.list;
|
||||
})
|
||||
}else{//工段交接
|
||||
that.printer_name = localStorage.getItem("printer_name");
|
||||
that.$API.mtm.mgroup.list
|
||||
|
@ -393,14 +400,26 @@ export default {
|
|||
searchTypeQuery() {
|
||||
let that = this;
|
||||
if (that.searchType == "send") {
|
||||
that.query.send_mgroup = that.mgroupId;
|
||||
that.query.recive_mgroup = "";
|
||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){
|
||||
that.query.send_dept = that.deptId;
|
||||
that.query.recive_dept = "";
|
||||
}else{
|
||||
that.query.send_mgroup = that.mgroupId;
|
||||
that.query.recive_mgroup = "";
|
||||
}
|
||||
} else if (that.searchType == "recive") {
|
||||
that.query.recive_mgroup = that.mgroupId;
|
||||
that.query.send_mgroup = "";
|
||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){
|
||||
that.query.send_dept = "";
|
||||
that.query.recive_dept =that.deptId;
|
||||
}else{
|
||||
that.query.recive_mgroup = that.mgroupId;
|
||||
that.query.send_mgroup = "";
|
||||
}
|
||||
} else {
|
||||
that.query.send_mgroup = "";
|
||||
that.query.recive_mgroup = "";
|
||||
that.query.recive_dept = "";
|
||||
that.query.send_dept = "";
|
||||
}
|
||||
console.log(that.query);
|
||||
this.$refs.table.queryData(that.query);
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
<el-form-item label="接收部门" prop="recive_dept">
|
||||
<el-select
|
||||
v-model="form.recive_dept"
|
||||
placeholder="接收工段"
|
||||
placeholder="接收部门"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="getUserList3"
|
||||
|
@ -281,7 +281,6 @@ export default {
|
|||
let day = date.getDate();
|
||||
that.form.handle_date = year + "-" + month + "-" + day;
|
||||
that.form.send_mgroup = that.mgroupId;
|
||||
console.log('mgroupName',that.mgroupName)
|
||||
if(that.mgroupName=="size"||that.mgroupName=="facade"){//检验部交接
|
||||
that.$API.system.user.list
|
||||
.req({ page: 0, posts__code__contains: "check" })
|
||||
|
@ -292,7 +291,7 @@ export default {
|
|||
that.deptID = that.$TOOL.data.get('gx_deptID');
|
||||
that.getUserList();
|
||||
}
|
||||
if(that.type==40){
|
||||
if(that.type==20||that.type==40){
|
||||
that.getMaterialNotok();
|
||||
}else{
|
||||
that.getMaterial();
|
||||
|
@ -321,18 +320,45 @@ export default {
|
|||
getMaterial() {
|
||||
let that = this;
|
||||
var req = {
|
||||
mgroupx: that.mgroupId,
|
||||
page: 0,
|
||||
notok_sign__isnull : 1,
|
||||
count_xtest__isnull:1
|
||||
};
|
||||
if(that.mgroupName=="size"){
|
||||
req.material__process__name="一次超洗";
|
||||
}else if(that.mgroupName=="facade"){
|
||||
req.material__process__name="二次超洗";
|
||||
}
|
||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
req.belong_dept=res[0].id;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
let arr = [];
|
||||
res.forEach(item=>{
|
||||
let obj = {};
|
||||
Object.assign(obj,item);
|
||||
obj.label = item.batch;
|
||||
arr.push(obj);
|
||||
})
|
||||
that.materialOptions = arr;
|
||||
});
|
||||
}
|
||||
})
|
||||
}else if(that.mgroupName=="facade"){
|
||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
req.belong_dept=res[0].id;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
let arr = [];
|
||||
res.forEach(item=>{
|
||||
let obj = {};
|
||||
Object.assign(obj,item);
|
||||
obj.label = item.batch;
|
||||
arr.push(obj);
|
||||
})
|
||||
that.materialOptions = arr;
|
||||
});
|
||||
}
|
||||
})
|
||||
}else{
|
||||
req.mgroupx = that.mgroupId;
|
||||
this.$API.wpm.wmaterial.list.req(req).then((res) => {
|
||||
// that.materialOptions = res;
|
||||
let arr = [];
|
||||
res.forEach(item=>{
|
||||
let obj = {};
|
||||
|
@ -342,6 +368,8 @@ export default {
|
|||
})
|
||||
that.materialOptions = arr;
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
//获取车间不合格物料
|
||||
getMaterialNotok() {
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
hidePagination
|
||||
:params="params"
|
||||
:query="query"
|
||||
>
|
||||
|
@ -182,6 +181,7 @@ export default {
|
|||
apiObj: null,
|
||||
params: {
|
||||
mgroupx: "",
|
||||
belong_dept:''
|
||||
},
|
||||
query: {},
|
||||
dialog: {
|
||||
|
@ -202,11 +202,21 @@ export default {
|
|||
mounted() {
|
||||
let that = this;
|
||||
if(that.mgroupName=="size"){
|
||||
that.params.material__process__name = "一次超洗";
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
// that.params.material__process__name = "一次超洗";
|
||||
that.$API.system.dept.list.req({name__contains:'尺寸',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.params.belong_dept=res[0].id;
|
||||
}
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
})
|
||||
}else if(that.mgroupName=="facade"){
|
||||
that.params.material__process__name = "二次超洗";
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
// that.params.material__process__name = "二次超洗";
|
||||
that.$API.system.dept.list.req({name__contains:'外观',page:0}).then((res) => {
|
||||
if(res.length>0){
|
||||
that.params.belong_dept=res[0].id;
|
||||
}
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
})
|
||||
}else{
|
||||
that.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: that.mgroupName })
|
||||
|
@ -218,6 +228,7 @@ export default {
|
|||
that.mgroupId = res[0].id;
|
||||
that.$TOOL.data.set('gx_deptID',res[0].belong_dept)
|
||||
that.params.mgroupx = res[0].id;
|
||||
that.params.belong_dept = res[0].belong_dept;
|
||||
that.apiObj = that.$API.wpm.wmaterial.list;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -137,7 +137,6 @@
|
|||
<el-input-number
|
||||
v-model="form.reminder_interval_list[0]"
|
||||
:min="0"
|
||||
:disabled="mode == 'edit'"
|
||||
controls-position="right"
|
||||
/>(min)
|
||||
</el-form-item>
|
||||
|
@ -147,7 +146,6 @@
|
|||
<el-input-number
|
||||
v-model="form.reminder_interval_list[1]"
|
||||
:min="0"
|
||||
:disabled="mode == 'edit'"
|
||||
controls-position="right"
|
||||
/>(min)
|
||||
</el-form-item>
|
||||
|
|
Loading…
Reference in New Issue