Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
91fad99f5b
|
@ -14,11 +14,6 @@
|
|||
<%= VUE_APP_TITLE %>
|
||||
</title>
|
||||
<link type="text/css" href="./jsmap/jsmap.css" rel="stylesheet" />
|
||||
<!-- 本地引用 -->
|
||||
<!-- <script src="/cesium/Cesium.js"></script> -->
|
||||
<!-- <script src="http://49.232.14.174:2226/pf/cesium/Cesium.js"></script> -->
|
||||
<!--引入cesium基础lib-->
|
||||
<!-- <script src="https://cesium.com/downloads/cesiumjs/releases/1.75/Build/Cesium/Cesium.js" type="text/javascript"></script> -->
|
||||
<script type="text/javascript" src="./jquery-3.7.1.min.js"></script>
|
||||
<script type="text/javascript" src="./webVideoCtrl.js"></script>
|
||||
<script type="text/javascript" src="./jsVideoPlugin-1.0.0.min.js"></script>
|
||||
|
|
|
@ -42,15 +42,16 @@ export default {
|
|||
return await http.get(this.url, data);
|
||||
},
|
||||
},
|
||||
//缺陷项
|
||||
defect:{
|
||||
list: {
|
||||
name: "质检项目",
|
||||
name: "列表",
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/defect/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "质检项目",
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/defect/${id}/`);
|
||||
},
|
||||
|
@ -58,10 +59,7 @@ export default {
|
|||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/qm/defect/${id}/`,
|
||||
data
|
||||
);
|
||||
return await http.put(`${config.API_URL}/qm/defect/${id}/`,data);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
|
@ -73,12 +71,11 @@ export default {
|
|||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/qm/defect/${id}/`
|
||||
);
|
||||
return await http.delete(`${config.API_URL}/qm/defect/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
//检验项
|
||||
testitem: {
|
||||
list: {
|
||||
name: "质检项目",
|
||||
|
@ -95,10 +92,7 @@ export default {
|
|||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/qm/testitem/${id}/`,
|
||||
data
|
||||
);
|
||||
return await http.put(`${config.API_URL}/qm/testitem/${id}/`,data);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
|
@ -110,9 +104,139 @@ export default {
|
|||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/qm/testitem/${id}/`
|
||||
);
|
||||
return await http.delete(`${config.API_URL}/qm/testitem/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
//检验表
|
||||
qct: {
|
||||
list: {
|
||||
name: "列表",
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/qct/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/qct/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(`${config.API_URL}/qm/qct/${id}/`,data);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/qct/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/qm/qct/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
//检验表检测缺陷项
|
||||
qctdefect:{
|
||||
list: {
|
||||
name: "列表",
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/qctdefect/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/qctdefect/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(`${config.API_URL}/qm/qctdefect/${id}/`,data);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/qctdefect/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/qm/qctdefect/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
//检验表检测物料
|
||||
qctmat:{
|
||||
list: {
|
||||
name: "列表",
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/qctmat/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/qctmat/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(`${config.API_URL}/qm/qctmat/${id}/`,data);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/qctmat/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/qm/qctmat/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
//检验表检测模板项
|
||||
qcttestitem:{
|
||||
list: {
|
||||
name: "列表",
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/qcttestitem/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "详情",
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/qcttestitem/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function (id, data) {
|
||||
return await http.put(`${config.API_URL}/qm/qcttestitem/${id}/`,data);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/qcttestitem/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/qm/qcttestitem/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</template>
|
||||
<template #default="scope">
|
||||
<div :class="['sc-form-table-handle', {'sc-form-table-handle-delete':!hideDelete}]">
|
||||
<span>{{scope.$index + 1}}</span>
|
||||
<span v-if="!hideIndex">{{scope.$index + 1}}</span>
|
||||
<el-button v-if="!hideDelete" type="danger" icon="el-icon-delete" size="small" plain circle @click="rowDel(scope.row, scope.$index)"></el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -44,7 +44,8 @@
|
|||
placeholder: { type: String, default: "暂无数据" },
|
||||
dragSort: { type: Boolean, default: false },
|
||||
hideAdd: { type: Boolean, default: false },
|
||||
hideDelete: { type: Boolean, default: false }
|
||||
hideDelete: { type: Boolean, default: false },
|
||||
hideIndex: { type: Boolean, default: false }
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
|
|
|
@ -70,6 +70,20 @@ export const mioTypeEnum = new EnumFactory({
|
|||
'other_in': '其他入库',
|
||||
'other_out': '其他出库'
|
||||
})
|
||||
export const fiedTypeEnum = new EnumFactory({
|
||||
'input-int': '整数',
|
||||
'input-number': '小数',
|
||||
'input-text': '文本',
|
||||
'select-text': '单选',
|
||||
'selects-text': '多选',
|
||||
})
|
||||
export const testTagsEnum = new EnumFactory({
|
||||
'purin': '入厂检验',
|
||||
'first': '首件检验',
|
||||
'prod': '成品检验',
|
||||
'process': '过程检验',
|
||||
'performance': '性能检验',
|
||||
})
|
||||
export const productTypeEnum = new EnumFactory({
|
||||
0: '电/水/气',
|
||||
10: '成品',
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">
|
||||
煤磨工段主要设备(100KW以上)单位产品电耗数据表
|
||||
煤磨工序主要设备(100KW以上)单位产品电耗数据表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备位号</th>
|
||||
<th>单位</th>
|
||||
<th>单位产品分布电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
|
@ -242,7 +242,7 @@ export default {
|
|||
tableData: [],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "煤磨工段",
|
||||
title: "煤磨工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
@ -430,7 +430,7 @@ export default {
|
|||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name);
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[3] = item.elec_consume_unit;
|
||||
|
@ -469,7 +469,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[4] = item.elec_consume_unit;
|
||||
|
@ -496,7 +496,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[5] = item.elec_consume_unit;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">煤磨工段生产报告</th>
|
||||
<th colspan="10">煤磨工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -276,7 +276,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "煤磨工段",
|
||||
title: "煤磨工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="16">煤磨工段班组月度对比分析</th>
|
||||
<th colspan="16">煤磨工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="8">
|
||||
煤磨工段车间单位产品电耗月度分析表
|
||||
煤磨工序车间单位产品电耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -235,7 +235,7 @@ export default {
|
|||
tableData: [],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "煤磨工段",
|
||||
title: "煤磨工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">煤磨工段生产报告</th>
|
||||
<th colspan="10">煤磨工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -275,7 +275,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "煤磨工段",
|
||||
title: "煤磨工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="12">煤磨工段班组月度对比分析</th>
|
||||
<th colspan="12">煤磨工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="8">
|
||||
煤磨工段车间单位产品电耗月度分析表
|
||||
煤磨工序车间单位产品电耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -404,7 +404,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "回转窑工段",
|
||||
title: "烧成工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -66,24 +66,22 @@
|
|||
border
|
||||
:height="tableHeight"
|
||||
>
|
||||
<el-table-column type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
prop="name"
|
||||
|
||||
fixed
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="对应点位"
|
||||
prop="code"
|
||||
fixed
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="日累计" prop="day" align="center" fixed>
|
||||
<el-table-column label="日累计" prop="day" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="月累计" prop="month" align="center" fixed>
|
||||
<el-table-column label="月累计" prop="month" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="年累计" prop="year" align="center" fixed>
|
||||
<el-table-column label="年累计" prop="year" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
|
@ -95,22 +93,20 @@
|
|||
:height="tableHeight"
|
||||
@cell-click="handleCellClick_range"
|
||||
>
|
||||
<el-table-column type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
prop="mpoint__name"
|
||||
fixed
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="对应点位"
|
||||
prop="mpoint__code"
|
||||
fixed
|
||||
align="center"
|
||||
></el-table-column><el-table-column
|
||||
label="统计值(kwh)"
|
||||
prop="total_val"
|
||||
fixed
|
||||
align="center"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
@ -283,6 +279,9 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
dateChange(e) {
|
||||
if (e == null) {
|
||||
return
|
||||
}
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
let arr = [];
|
||||
|
@ -301,7 +300,10 @@ export default {
|
|||
formatArry(){
|
||||
this.result = this.mpointIdList.join(","); // 将数组转换为字符串
|
||||
},
|
||||
changeDate(){
|
||||
changeDate(val){
|
||||
if (val == null){
|
||||
return
|
||||
}
|
||||
let that = this;
|
||||
let obj = {};
|
||||
obj.type = "hour";
|
||||
|
@ -334,7 +336,7 @@ export default {
|
|||
that.mpointList = res.filter((item) => {
|
||||
// 提取mpointIdList
|
||||
that.mpointIdList.push(item.id);
|
||||
return item.report_sortstr !== "";
|
||||
return true;
|
||||
});
|
||||
that.dataLoop();
|
||||
});
|
||||
|
@ -355,7 +357,9 @@ export default {
|
|||
},
|
||||
getData(id, index) {
|
||||
let that = this;
|
||||
let obj = {};
|
||||
let obj = {
|
||||
query: "{val}"
|
||||
};
|
||||
obj.type = "day";
|
||||
obj.year = that.year;
|
||||
obj.month = that.month;
|
||||
|
@ -368,7 +372,9 @@ export default {
|
|||
});
|
||||
});
|
||||
//月
|
||||
let obj_month = {};
|
||||
let obj_month = {
|
||||
query: "{val}"
|
||||
};
|
||||
obj_month.type = "month";
|
||||
obj_month.year = that.year;
|
||||
obj_month.month = that.month;
|
||||
|
@ -380,7 +386,9 @@ export default {
|
|||
});
|
||||
});
|
||||
//年
|
||||
let obj_year = {};
|
||||
let obj_year = {
|
||||
query: "{val}"
|
||||
};
|
||||
obj_year.type = "year";
|
||||
obj_year.year = that.year;
|
||||
obj_year.mpoint = id;
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">
|
||||
回转窑工段主要设备(100KW以上)单位产品电耗数据表
|
||||
烧成工序主要设备(100KW以上)单位产品电耗数据表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备位号</th>
|
||||
<th>单位</th>
|
||||
<th>单位产品分布电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
|
@ -253,7 +253,7 @@ export default {
|
|||
tableData: [],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "回转窑工段",
|
||||
title: "烧成工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
@ -548,7 +548,7 @@ export default {
|
|||
res.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name);
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[3] = item.elec_consume_unit;
|
||||
|
@ -587,7 +587,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[4] = item.elec_consume_unit;
|
||||
|
@ -614,7 +614,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[5] = item.elec_consume_unit;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">回转窑工段生产报告</th>
|
||||
<th colspan="10">烧成工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -167,7 +167,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="回转窑工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="烧成工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -452,7 +452,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "回转窑工段",
|
||||
title: "烧成工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="32">回转窑工段班组月度对比分析</th>
|
||||
<th colspan="32">烧成工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -239,7 +239,7 @@ export default {
|
|||
],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "回转窑工段",
|
||||
title: "烧成工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">回转窑工段生产报告</th>
|
||||
<th colspan="10">烧成工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -160,7 +160,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="回转窑工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="烧成工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -411,7 +411,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "回转窑工段",
|
||||
title: "烧成工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="19">回转窑工段班组月度对比分析</th>
|
||||
<th colspan="19">烧成工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">
|
||||
水泥磨工段主要设备(100KW以上)单位产品电耗数据表
|
||||
水泥粉磨工序主要设备(100KW以上)单位产品电耗数据表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备位号</th>
|
||||
<th>单位</th>
|
||||
<th>单位产品分布电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
|
@ -251,7 +251,7 @@ export default {
|
|||
tableData: [],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "水泥磨工段",
|
||||
title: "水泥粉磨工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
@ -505,7 +505,7 @@ export default {
|
|||
res.forEach((item) => {
|
||||
let index = that.mpoints.indexOf(item.mpoint_name);
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[3] = item.elec_consume_unit;
|
||||
|
@ -542,7 +542,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[4] = item.elec_consume_unit;
|
||||
|
@ -569,7 +569,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[5] = item.elec_consume_unit;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">水泥磨工段生产报告</th>
|
||||
<th colspan="10">水泥粉磨工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -156,7 +156,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥粉磨工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -414,7 +414,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "水泥磨工段",
|
||||
title: "水泥粉磨工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="19">水泥磨工段班组月度对比分析</th>
|
||||
<th colspan="19">水泥粉磨工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="9">
|
||||
水泥磨工段车间单位产品电耗月度分析表
|
||||
水泥粉磨工序车间单位产品电耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -102,7 +102,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="9">
|
||||
水泥磨工段车间单位产品综合能耗月度分析表
|
||||
水泥粉磨工序车间单位产品综合能耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="9">水泥包装工段生产报告</th>
|
||||
<th colspan="9">水泥包装工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -121,7 +121,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥包装工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥包装工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="11">
|
||||
水泥包装工段班组月度对比分析
|
||||
水泥包装工序班组月度对比分析
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="8">
|
||||
水泥包装工段车间单位产品电耗月度分析表
|
||||
水泥包装工序车间单位产品电耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -215,7 +215,17 @@ export default {
|
|||
if (materialName === "入窑生料") {
|
||||
materialName = "生料";
|
||||
}
|
||||
arr.push(materialName)
|
||||
var unit = "(吨)"
|
||||
if (materialName == "动力电") {
|
||||
unit = "(度)"
|
||||
}
|
||||
else if (materialName == "包装袋"){
|
||||
unit = "(袋)"
|
||||
}
|
||||
else if (materialName == "压缩空气" || materialName == "蒸汽") {
|
||||
unit = "(m³)"
|
||||
}
|
||||
arr.push(materialName + unit)
|
||||
arr.push('单价(元/吨)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
|
@ -223,7 +233,7 @@ export default {
|
|||
materials.forEach(item => {
|
||||
if(item.material_name == "动力电"){
|
||||
that.data2 = that.data2 + 4
|
||||
arr.push(item.material_name)
|
||||
arr.push(item.material_name + '(度)')
|
||||
arr.push('单价(元/度)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
|
@ -232,7 +242,7 @@ export default {
|
|||
materials.forEach(item => {
|
||||
if(item.material_name == "工业水"){
|
||||
that.data2 = that.data2 + 4
|
||||
arr.push(item.material_name)
|
||||
arr.push(item.material_name + '(吨)')
|
||||
arr.push('单价(元/吨)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="6">
|
||||
原料磨工段主要设备(100KW以上)单位产品电耗数据表
|
||||
生料工序主要设备(100KW以上)单位产品电耗数据表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备位号</th>
|
||||
<th>单位</th>
|
||||
<th>单位产品分布电耗</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
|
@ -246,7 +246,7 @@ export default {
|
|||
tableData: [],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "原料磨工段",
|
||||
title: "生料工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
@ -482,7 +482,7 @@ export default {
|
|||
}
|
||||
let index = that.mpoints.indexOf(item.mpoint_name);
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[3] = item.elec_consume_unit;
|
||||
|
@ -521,7 +521,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[4] = item.elec_consume_unit;
|
||||
|
@ -551,7 +551,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[5] = item.elec_consume_unit;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">原料磨工段生产报告</th>
|
||||
<th colspan="10">生料工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -155,7 +155,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="原料磨工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="生料工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -414,7 +414,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hours",
|
||||
title: "原料磨工段",
|
||||
title: "生料工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="23">原料磨工段班组月度对比分析</th>
|
||||
<th colspan="23">生料工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="8">
|
||||
原料磨工段车间单位产品电耗月度分析表
|
||||
生料工序车间单位产品电耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -230,7 +230,7 @@ export default {
|
|||
],
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "原料磨工段",
|
||||
title: "生料工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="10">原料磨工段生产报告</th>
|
||||
<th colspan="10">生料工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -153,7 +153,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<sc-dialog v-model="chartShow" draggable title="原料磨工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="生料工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -404,7 +404,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hours",
|
||||
title: "原料磨工段",
|
||||
title: "生料工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.enstat,
|
||||
showClose: true,
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="12">原料磨工段班组月度对比分析</th>
|
||||
<th colspan="12">生料工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="8">
|
||||
原料磨工段车间单位产品电耗月度分析表
|
||||
生料工序车间单位产品电耗月度分析表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
电石渣工段主要设备(100KW以上)单位产品电耗数据表
|
||||
电石渣工序主要设备(100KW以上)单位产品电耗数据表
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备位号</th>
|
||||
<th>单位</th>
|
||||
<th>单位产品分布电耗</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
|
@ -205,7 +205,7 @@ export default {
|
|||
tableData: [],
|
||||
modelValue: true,
|
||||
type: "day_s",
|
||||
title: "电石渣工段",
|
||||
title: "电石渣工序",
|
||||
cate: "",
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
showClose: true,
|
||||
|
@ -344,7 +344,7 @@ export default {
|
|||
that.tableDatas[index_d][3] = item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[3] = item.elec_consume_unit;
|
||||
|
@ -371,7 +371,7 @@ export default {
|
|||
item.elec_consume_unit;
|
||||
} else {
|
||||
let obj = [];
|
||||
obj[0] = item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;;
|
||||
obj[0] = item.ep_monitored_name?item.ep_monitored_name:item.mpoint_nickname?item.mpoint_nickname:item.mpoint_name;
|
||||
obj[1] = item.ep_monitored_number;
|
||||
obj[2] = "KW·h/t";
|
||||
obj[4] = item.elec_consume_unit;
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="9">电石渣工段生产报告</th>
|
||||
<th colspan="9">电石渣工序生产报告</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
|
@ -127,7 +127,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="电石渣工段">
|
||||
<sc-dialog v-model="chartShow" draggable title="电石渣工序">
|
||||
<div class="searchHead" v-if="type == 'hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
@ -396,7 +396,7 @@ export default {
|
|||
mgroup: "3346491835287007232",
|
||||
},
|
||||
tableDatas: [
|
||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["电石干粉产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
["能耗", "总电耗(KW·h)", 0, 0, 0, "/", "/", "/", "/", "/"],
|
||||
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
|
@ -408,7 +408,7 @@ export default {
|
|||
tableName: "生产报告",
|
||||
modelValue: true,
|
||||
type: "hour_s",
|
||||
title: "电石渣工段",
|
||||
title: "电石渣工序",
|
||||
showClose: true,
|
||||
echartType: "line",
|
||||
asynDialog: false,
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
>
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="12">电石渣工段班组月度对比分析</th>
|
||||
<th colspan="12">电石渣工序班组月度对比分析</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
|
|
|
@ -38,9 +38,14 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="出材率" prop="out_rate">
|
||||
</el-table-column>
|
||||
<el-table-column label="切分融合数量" prop="div_number">
|
||||
</el-table-column>
|
||||
<el-table-column label="工时" prop="hour_work">
|
||||
</el-table-column>
|
||||
<el-table-column label="批次校验" prop="batch_bind">
|
||||
<el-table-column label="批次校验">
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.batch_bind" type="success">是</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-card>
|
||||
|
|
|
@ -1,195 +0,0 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="tableAdd" v-auth="'role.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="query.search" placeholder="检验表名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name" min-width="100"></el-table-column>
|
||||
<el-table-column label="标识" prop="code" min-width="100"></el-table-column>
|
||||
<el-table-column label="描述" prop="description" min-width="150"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="roleEdit(scope.row, scope.$index)" v-auth="'role.update'" type="primary">编辑</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="roleDel(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button link size="small" v-auth="'role.delete'" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible" :width="600">
|
||||
<el-form :model="addForm" :rules="rules" ref="addForm" autocomplete ="off" label-width="100px" label-position="left">
|
||||
<el-form-item label="名称" prop="name" auto>
|
||||
<el-input v-model="addForm.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="标识">
|
||||
<el-input v-model="addForm.code" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述">
|
||||
<el-input v-model="addForm.description" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验项">
|
||||
<el-input v-model="addForm.description" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="limitedVisible=false" >取 消</el-button>
|
||||
<el-button v-if="type!=='show'" type="primary" :loading="isSaving" @click="submitHandle()">保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
const defaultForm = {
|
||||
id:"",
|
||||
name: "",
|
||||
code: "",
|
||||
description: "",
|
||||
perms:[],
|
||||
};
|
||||
export default {
|
||||
name: 'dept',
|
||||
data() {
|
||||
return {
|
||||
apiObj:null,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
search: {
|
||||
keyword: null
|
||||
},
|
||||
query: {},
|
||||
isSaving: false,
|
||||
limitedVisible : false,
|
||||
checkStrictly:true,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: '新增',
|
||||
edit: '编辑',
|
||||
show: '查看'
|
||||
},
|
||||
|
||||
//表单数据
|
||||
addForm: defaultForm,
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '请输入名称'}
|
||||
],
|
||||
},
|
||||
menu: {
|
||||
list: [],
|
||||
checked: [],
|
||||
props: {
|
||||
emitPath: false,
|
||||
children: 'children',
|
||||
// label: 'name',
|
||||
/*label: (data)=>{
|
||||
return data.meta.title
|
||||
}*/
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTestItem();
|
||||
},
|
||||
methods: {
|
||||
//获取检验项
|
||||
getTestItem(){
|
||||
var res = this.$API.system.role.list.req();
|
||||
this.tableData = res.results;
|
||||
},
|
||||
//添加检验表
|
||||
tableAdd(){
|
||||
this.limitedVisible = true;
|
||||
this.type = "add";
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.menu.setCheckedKeys([])
|
||||
})
|
||||
this.addForm = Object.assign({}, defaultForm);
|
||||
},
|
||||
//提交
|
||||
submitHandle(){
|
||||
let that = this;
|
||||
this.addForm.perms = this.menu.checked;
|
||||
this.$refs.addForm.validate( (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
let res;
|
||||
if(this.type==='add'){
|
||||
this.$API.system.role.create.req(that.addForm).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.limitedVisible = false;
|
||||
this.$refs.table.refresh();
|
||||
}).catch(e=>{this.isSaveing = false;})
|
||||
}else{
|
||||
this.$API.system.role.update.req(that.addForm.id,that.addForm).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.limitedVisible = false;
|
||||
this.$refs.table.refresh();
|
||||
}).catch(e=>{this.isSaveing = false;})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//编辑检验表
|
||||
roleEdit(row){
|
||||
this.type='edit';
|
||||
this.addForm.id=row.id;
|
||||
this.addForm.name=row.name;
|
||||
this.addForm.code=row.code;
|
||||
this.addForm.description=row.description;
|
||||
this.limitedVisible = true;
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.menu.setCheckedKeys(row.perms)
|
||||
})
|
||||
},
|
||||
|
||||
//删除检验表
|
||||
async roleDel(row){
|
||||
var id = row.id;
|
||||
var res = await this.$API.system.role.delete.req(id);
|
||||
if(res.err_msg){
|
||||
this.$message.error(res.err_msg)
|
||||
}else{
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功")
|
||||
}
|
||||
},
|
||||
//表格选择后回调事件
|
||||
selectionChange(selection){
|
||||
this.selection = selection;
|
||||
},
|
||||
//搜索
|
||||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
|
||||
//本地更新数据
|
||||
handleSaveSuccess(data, type){
|
||||
if(type=='add'){
|
||||
this.$refs.table.refresh()
|
||||
}else if(type=='edit'){
|
||||
this.$refs.table.refresh()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {width: 100%;height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;}
|
||||
</style>
|
|
@ -3,17 +3,15 @@
|
|||
<el-header>
|
||||
<div class="left-panel">
|
||||
<!-- v-auth="'defect.create'" -->
|
||||
<el-button type="primary" icon="el-icon-plus" @click="defectAdd"></el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="defectAdd" v-auth="'defect.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="query.search" placeholder="名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
<el-input v-model="query.search" placeholder="名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" hidePagination>
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="标识" prop="code"></el-table-column>
|
||||
|
@ -150,8 +148,7 @@
|
|||
this.addForm.okcate=10;
|
||||
this.limitedVisible = true;
|
||||
// 清除验证状态
|
||||
this.$refs.addForm.clearValidate();
|
||||
// this.addForm = Object.assign({}, defaultForm);
|
||||
// this.$refs.addForm.clearValidate();
|
||||
},
|
||||
submitHandle(){
|
||||
let that = this;
|
||||
|
|
|
@ -0,0 +1,202 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="tableAdd" v-auth="'qct.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input v-model="query.search" placeholder="检验表名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column type="selection" width="50"></el-table-column>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="编号" prop="number"></el-table-column>
|
||||
<el-table-column label="检测类型" prop="description" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-for="(item,index) in scope.row.tags" :key="item">{{ tags_[item] }} <span v-if="index < scope.row.tags.length - 1">、</span></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="tableDetail(scope.row)" v-auth="'qct.update'" type="primary">详情</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-button link size="small" @click="tableEdit(scope.row)" v-auth="'qct.update'" type="primary">编辑</el-button>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="tableDel(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button link size="small" v-auth="'role.delete'" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-dialog :title="titleMap[type]" v-model="limitedVisible" @close="dialogClose" :width="600">
|
||||
<el-form :model="form" :rules="rules" ref="form" autocomplete ="off" label-width="100px" label-position="left">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="编号 " prop="number">
|
||||
<el-input v-model="form.number" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="检验类型">
|
||||
<el-checkbox-group v-model="form.tags">
|
||||
<el-checkbox
|
||||
v-for="item in tagsOptions"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"/>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="limitedVisible=false" >取 消</el-button>
|
||||
<el-button v-if="type!=='show'" type="primary" :loading="isSaving" @click="submitHandle()">保 存</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<record-dialog
|
||||
ref="showDrawer"
|
||||
v-if="visibleDrawer"
|
||||
:qctId="qctId"
|
||||
@closed="visibleDrawer = false"
|
||||
>
|
||||
</record-dialog>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import recordDialog from "./qctDetail.vue";
|
||||
const defaultForm = {
|
||||
id:"",
|
||||
name: "",
|
||||
number: "",
|
||||
tags:[],
|
||||
};
|
||||
export default {
|
||||
name: 'qct',
|
||||
components: {
|
||||
recordDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj:this.$API.qm.qct.list,
|
||||
query: {search:''},
|
||||
isSaving: false,
|
||||
showDrawer: false,
|
||||
limitedVisible: false,
|
||||
visibleDrawer: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: '新增',
|
||||
edit: '编辑',
|
||||
show: '查看'
|
||||
},
|
||||
qctId:'',
|
||||
//表单数据
|
||||
form: defaultForm,
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [
|
||||
{required: true, message: '请输入名称'}
|
||||
],
|
||||
number: [
|
||||
{required: true, message: '请输入编号'}
|
||||
],
|
||||
},
|
||||
tagsOptions: [
|
||||
{value:"purin",name:"入厂检验"},
|
||||
{value:"first",name:"首件检验"},
|
||||
{value:"prod",name:"成品检验"},
|
||||
{value:"process",name:"过程检验"},
|
||||
{value:"performance",name:"性能检验"},
|
||||
],
|
||||
tags_:{
|
||||
"purin":"入厂检验",
|
||||
"first":"首件检验",
|
||||
"prod":"成品检验",
|
||||
"process":"过程检验",
|
||||
"performance":"性能检验"
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
//添加检验表
|
||||
tableAdd(){
|
||||
this.limitedVisible = true;
|
||||
this.type = "add";
|
||||
this.form.id="";
|
||||
this.form.name="";
|
||||
this.form.number="";
|
||||
this.form.tags=[];
|
||||
},
|
||||
//编辑
|
||||
tableEdit(row){
|
||||
this.type='edit';
|
||||
this.form.id=row.id;
|
||||
this.form.name=row.name;
|
||||
this.form.number=row.number;
|
||||
this.form.tags=row.tags;
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
//查看
|
||||
tableDetail(row) {
|
||||
this.$TOOL.data.set('qctCurrent',row);
|
||||
this.type = row.type;
|
||||
this.qctId = row.id;
|
||||
this.visibleDrawer = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.showDrawer.open();
|
||||
});
|
||||
},
|
||||
//提交
|
||||
submitHandle(){
|
||||
let that = this;
|
||||
that.$refs.form.validate( (valid) => {
|
||||
if (valid) {
|
||||
that.isSaving = true;
|
||||
if(that.type==='add'){
|
||||
that.$API.qm.qct.create.req(that.form).then(res=>{
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
}).catch(e=>{that.isSaving = false;})
|
||||
}else{
|
||||
that.$API.qm.qct.update.req(that.form.id,that.form).then(res=>{
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
}).catch(e=>{that.isSaving = false;})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//删除检验表
|
||||
async tableDel(row){
|
||||
var id = row.id;
|
||||
var res = await this.$API.qm.qct.delete.req(id);
|
||||
if(res.err_msg){
|
||||
this.$message.error(res.err_msg)
|
||||
}else{
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功")
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
handleQuery(){
|
||||
this.$refs.table.queryData(this.query)
|
||||
},
|
||||
dialogClose(){
|
||||
this.isSaving = false;
|
||||
this.limitedVisible = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {width: 100%;height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;}
|
||||
</style>
|
|
@ -0,0 +1,353 @@
|
|||
<template>
|
||||
<el-drawer
|
||||
v-model="visible"
|
||||
title="检测表详情"
|
||||
:size="'90%'"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<div style="padding: 8px">
|
||||
<el-card style="width: 100%" header="基本信息" shadow="hover">
|
||||
<el-descriptions>
|
||||
<el-descriptions-item label="名称">{{qctItem.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="编号">{{qctItem.number}}</el-descriptions-item>
|
||||
<el-descriptions-item label="检测类型">
|
||||
<span v-for="(item,index) in qctItem.tags" :key="item">
|
||||
{{ tags_[item] }} <span v-if="index < qctItem.tags.length - 1">、</span>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="创建时间">{{qctItem.create_time}}</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
</el-card>
|
||||
<div style="height: 8px"></div>
|
||||
<div>
|
||||
<!-- 检测物料qctmat -->
|
||||
<el-card style="width: 100%" header="检测物料" shadow="hover">
|
||||
<sc-form-table
|
||||
hideDelete
|
||||
hideIndex
|
||||
v-model="qctmatlist"
|
||||
:addTemplate="mataddTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="type" label="物料">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
|
||||
<xtSelect
|
||||
v-else
|
||||
:apiObj="apiObj"
|
||||
v-model="scope.row.material"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="工序" prop="process_name"></el-table-column>
|
||||
<el-table-column label="规格" prop="specification"></el-table-column>
|
||||
</xtSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="time" label="追溯层级">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ tracing_[scope.row.tracing] }}</span>
|
||||
<el-select
|
||||
v-else
|
||||
v-model="scope.row.tracing"
|
||||
filterable
|
||||
placeholder="请选择追溯层级"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tracingOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="open" label="操作" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="scope.row.id"
|
||||
text
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="formTableDel(scope.row.id,'mat')"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="formTableAdd(scope.row,'mat')"
|
||||
>添加</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-card>
|
||||
<!-- 检测项qcttestitem -->
|
||||
<el-card style="width: 100%" header="检测项" shadow="hover">
|
||||
<sc-form-table
|
||||
hideIndex
|
||||
v-model="qcttestitemlist"
|
||||
:addTemplate="defectaddTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="val" label="排序" width="80">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.sort }}</span>
|
||||
<el-input v-else v-model="scope.row.sort" placeholder="排序"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="time" label="检测项">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{scope.row.testitem_name}}</span>
|
||||
<xtSelect
|
||||
v-else
|
||||
:apiObj="apiObj2"
|
||||
v-model="scope.row.testitem"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="描述" prop="description"></el-table-column>
|
||||
</xtSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="备注">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.note }}</span>
|
||||
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="open" label="操作" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="scope.row.id"
|
||||
text
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="formTableDel(scope.row.id,'testitem')"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="formTableAdd(scope.row,'testitem')"
|
||||
>添加</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-card>
|
||||
<!-- 检测缺陷项qctdefect -->
|
||||
<el-card style="width: 100%" header="检测缺陷项" shadow="hover">
|
||||
<sc-form-table
|
||||
hideIndex
|
||||
v-model="qctdefectlist"
|
||||
:addTemplate="testitemaddTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="val" label="排序" width="80">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.sort }}</span>
|
||||
<el-input v-else v-model="scope.row.sort" placeholder="排序"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="time" label="缺陷项">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{scope.row.defect_name}}</span>
|
||||
<xtSelect
|
||||
v-else
|
||||
:apiObj="apiObj3"
|
||||
v-model="scope.row.defect"
|
||||
style="width:100%"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="分类" prop="cate"></el-table-column>
|
||||
</xtSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val" label="判定表达式" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.rule_expression }}</span>
|
||||
<el-input v-else v-model="scope.row.rule_expression" placeholder="请输入判定表达式"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="type" label="备注">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.note }}</span>
|
||||
<el-input v-else v-model="scope.row.note" placeholder="备注"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="open" label="操作" width="80" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
v-if="scope.row.id"
|
||||
text
|
||||
type="danger"
|
||||
size="small"
|
||||
@click="formTableDel(scope.row.id,'defect')"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
v-else
|
||||
text
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="formTableAdd(scope.row,'defect')"
|
||||
>添加</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-card>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "qctDetail",
|
||||
props: {
|
||||
qctId: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: {
|
||||
check: false,
|
||||
save: false,
|
||||
},
|
||||
apiObj:this.$API.mtm.material.list,
|
||||
materials:[],
|
||||
apiObj2:this.$API.qm.testitem.list,
|
||||
testitemes:[],
|
||||
apiObj3:this.$API.qm.defect.list,
|
||||
defects:[],
|
||||
apiObjMat: null,
|
||||
apiObjDefect: null,
|
||||
apiObjTestItem: null,
|
||||
params: {},
|
||||
qctItem: {},
|
||||
qctmatlist:[], //物料
|
||||
qctdefectlist:[],
|
||||
qcttestitemlist:[],
|
||||
visible: false,
|
||||
tags_:{
|
||||
"purin":"入厂检验",
|
||||
"first":"首件检验",
|
||||
"prod":"成品检验",
|
||||
"process":"过程检验",
|
||||
"performance":"性能检验"
|
||||
},
|
||||
tracing_:{
|
||||
"test":"检测项",
|
||||
"defect":"缺陷项",
|
||||
},
|
||||
tracingOptions:[
|
||||
{value:'test',label:'检测项'},
|
||||
{value:'defect',label:'缺陷项'},
|
||||
],
|
||||
mataddTemplate:{
|
||||
tracing: "",
|
||||
qct: this.qctId,
|
||||
material: "",
|
||||
},
|
||||
defectaddTemplate:{
|
||||
qct: this.qctId,
|
||||
defect: "",
|
||||
note:'',
|
||||
sort:'',
|
||||
rule_expression:'',
|
||||
},
|
||||
testitemaddTemplate:{
|
||||
qct: this.qctId,
|
||||
note:'',
|
||||
sort:'',
|
||||
testitem:'',
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.apiObjMat = this.$API.inm.mioitem.list;
|
||||
this.apiObjDefect = this.$API.inm.mioitem.list;
|
||||
this.apiObjTestItem = this.$API.inm.mioitem.list;
|
||||
this.qctItem =this.$TOOL.data.get("qctCurrent");
|
||||
this.getLists();
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
this.visible = true;
|
||||
},
|
||||
getLists(){
|
||||
let that = this;
|
||||
that.$API.qm.qctmat.list.req({qct:that.qctItem.id,page:0}).then(res=>{
|
||||
that.qctmatlist = res;
|
||||
});
|
||||
that.$API.qm.qctdefect.list.req({qct:that.qctItem.id,page:0}).then(res=>{
|
||||
that.qctdefectlist = res;
|
||||
});
|
||||
that.$API.qm.qcttestitem.list.req({qct:that.qctItem.id,page:0}).then(res=>{
|
||||
that.qcttestitemlist = res;
|
||||
});
|
||||
},
|
||||
//添加
|
||||
formTableAdd(row,type) {
|
||||
let that = this,api = '';
|
||||
if(type=='defect'){
|
||||
api = that.$API.qm.qctdefect.create;
|
||||
}else if(type=='mat'){
|
||||
api = that.$API.qm.qctmat.create;
|
||||
}else if(type=='testitem'){
|
||||
api = that.$API.qm.qcttestitem.create;
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
api.req(row).then((res) => {
|
||||
that.$message.success("添加成功");
|
||||
that.getLists();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
})
|
||||
},
|
||||
//删除
|
||||
formTableDel(id,type) {
|
||||
let that = this,api = '';
|
||||
if(type=='defect'){
|
||||
api = that.$API.qm.qctdefect.delete;
|
||||
}else if(type=='mat'){
|
||||
api = that.$API.qm.qctmat.delete;
|
||||
}else if(type=='testitem'){
|
||||
api = that.$API.qm.qcttestitem.delete;
|
||||
}
|
||||
that.$confirm(`确定删除吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
api.req(id).then((res) => {
|
||||
that.$message.success("删除成功");
|
||||
that.getLists();
|
||||
return res;
|
||||
}).catch((err) => {
|
||||
return err;
|
||||
});
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
//编辑
|
||||
check_edit(row) {
|
||||
this.mioitemId = row.id;
|
||||
this.objitem = row;
|
||||
this.dialog.check = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.checkDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -5,14 +5,12 @@
|
|||
<el-button type="primary" icon="el-icon-plus" @click="testitemAdd" v-auth="'role.create'"></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<div class="right-panel-search">
|
||||
<el-input v-model="query.search" placeholder="名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
<el-input v-model="query.search" placeholder="名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" hidePagination>
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="检验类型" prop="field_type">
|
||||
|
@ -29,9 +27,9 @@
|
|||
<span v-for="item in scope.row.mcate_tags" :key="item">{{ item }}、</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="选项" prop="options">
|
||||
<el-table-column label="选项" prop="choices">
|
||||
<template #default="scope">
|
||||
<div v-for="item in scope.row.options" :key="item">{{ item }}</div>
|
||||
<div v-for="item in scope.row.choices" :key="item">{{ item }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
|
@ -79,12 +77,14 @@
|
|||
"input-int":"整数",
|
||||
"input-number":"小数",
|
||||
"input-text":"文本",
|
||||
"select":"单选",
|
||||
"selects":"多选",
|
||||
"select-text":"单选",
|
||||
"selects-text":"多选",
|
||||
},
|
||||
tags_:{
|
||||
"purin":"入厂检验",
|
||||
"first":"首件检验",
|
||||
"prod":"成品检验",
|
||||
"process":"过程检验",
|
||||
"performance":"性能检验"
|
||||
},
|
||||
}
|
||||
|
|
|
@ -25,6 +25,14 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="编号">
|
||||
<el-input
|
||||
v-model="form.number"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="字段类型">
|
||||
<el-select
|
||||
|
@ -43,16 +51,22 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="编号">
|
||||
<el-input
|
||||
v-model="form.number"
|
||||
clearable
|
||||
></el-input>
|
||||
<el-form-item label="关联检测项">
|
||||
<xtSelect
|
||||
:apiObj="apiObj"
|
||||
:options="itemOptions"
|
||||
v-model="form.affects"
|
||||
v-model:label="form.affects_name"
|
||||
style="width:100%"
|
||||
:multiple="true"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
<el-table-column label="描述" prop="description"></el-table-column>
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="描述">
|
||||
<el-input
|
||||
|
@ -61,17 +75,6 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检验类型">
|
||||
<el-checkbox-group v-model="form.tags">
|
||||
<el-checkbox
|
||||
v-for="item in tagsOptions"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"/>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="排序">
|
||||
<el-input-number
|
||||
|
@ -80,6 +83,32 @@
|
|||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="检验类型">
|
||||
<el-checkbox-group v-model="form.tags">
|
||||
<el-checkbox
|
||||
v-for="item in tagsOptions"
|
||||
:key="item.value"
|
||||
:label="item.name"
|
||||
:value="item.value"/>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="是否只读">
|
||||
<el-switch v-model="form.readonly"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col v-if="form.readonly">
|
||||
<el-form-item label="计算公式">
|
||||
<el-input
|
||||
v-model="form.formula"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="24" v-if="mcateTagsOptions.length>0">
|
||||
<el-form-item label="物料系列标签">
|
||||
<el-checkbox-group v-model="form.mcate_tags">
|
||||
|
@ -92,10 +121,10 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="form.field_type == 'select'||form.field_type == 'selects'">
|
||||
<el-row v-if="form.field_type == 'select-text'||form.field_type == 'selects-text'">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="选项">
|
||||
<el-button icon="el-icon-circle-plus" text @click="addComponent('choices')">
|
||||
<el-button icon="el-icon-circle-plus" text @click="addComponent">
|
||||
添加
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
|
@ -114,7 +143,7 @@
|
|||
</el-col>
|
||||
<el-col :md="1" :sm="2">
|
||||
<div style="text-align: center">
|
||||
<el-button type="danger" icon="el-icon-remove" text @click="delComponent($index,'choices')"></el-button>
|
||||
<el-button type="danger" icon="el-icon-remove" text @click="delComponent($index)"></el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</template>
|
||||
|
@ -137,6 +166,9 @@ const defaultForm = {
|
|||
description: "",
|
||||
sort: 1,
|
||||
tags: [],
|
||||
formula:"",
|
||||
readonly:false,
|
||||
affects:[],
|
||||
mcate_tags: [],
|
||||
choices: [""],
|
||||
};
|
||||
|
@ -144,6 +176,7 @@ export default {
|
|||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.qm.testitem.list,
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
|
@ -152,23 +185,26 @@ export default {
|
|||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
form: defaultForm,
|
||||
form: Object.assign(defaultForm),
|
||||
//验证规则
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "请输入名称", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
// itemOptions:null,
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
options: [
|
||||
{value:"input-int",name:"整数"},
|
||||
{value:"input-number",name:"小数"},
|
||||
{value:"input-text",name:"文本"},
|
||||
{value:"select",name:"单选"},
|
||||
{value:"selects",name:"多选"},
|
||||
{value:"select-text",name:"单选"},
|
||||
{value:"selects-text",name:"多选"},
|
||||
],
|
||||
tagsOptions: [
|
||||
{value:"purin",name:"入厂检验"},
|
||||
{value:"process",name:"过程检验"},
|
||||
{value:"first",name:"首件检验"},
|
||||
{value:"prod",name:"成品检验"},
|
||||
{value:"performance",name:"性能检验"},
|
||||
|
@ -179,29 +215,37 @@ export default {
|
|||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getmcateTagsOptions();
|
||||
// this.getmcateTagsOptions();
|
||||
},
|
||||
methods: {
|
||||
getmcateTagsOptions() {
|
||||
this.$API.mtm.material.cates.req().then((res) => {
|
||||
this.mcateTagsOptions = res;
|
||||
async getmcateTagsOptions() {
|
||||
let that = this;
|
||||
await that.$API.mtm.material.cates.req().then((res) => {
|
||||
if(res&&res.length>0){
|
||||
that.mcateTagsOptions = res;
|
||||
}
|
||||
});
|
||||
},
|
||||
addComponent(type) {
|
||||
this.form[type].push("");
|
||||
addComponent() {
|
||||
this.form.choices.push("");
|
||||
},
|
||||
delComponent(index,type) {
|
||||
this.form[type].splice(index, 1);
|
||||
delComponent(index) {
|
||||
this.form.choices.splice(index, 1);
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
this.form = {};
|
||||
Object.assign(this.form, defaultForm);
|
||||
return this;
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form, data);
|
||||
// if(data.affects.length>0){
|
||||
// this.itemOptions
|
||||
// }
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
|
@ -214,8 +258,8 @@ export default {
|
|||
.req(that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
})
|
||||
.catch((res) => {
|
||||
that.isSaveing = false;
|
||||
|
@ -225,8 +269,8 @@ export default {
|
|||
.req(that.form.id, that.form)
|
||||
.then((res) => {
|
||||
that.isSaveing = false;
|
||||
that.$emit("success");
|
||||
that.visible = false;
|
||||
that.$emit("success");
|
||||
})
|
||||
.catch((res) => {
|
||||
that.isSaveing = false;
|
||||
|
|
|
@ -0,0 +1,108 @@
|
|||
<!-- 最新版生产执行页面 -->
|
||||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-segmented
|
||||
v-model="values"
|
||||
:options="options"
|
||||
size="default"
|
||||
></el-segmented>
|
||||
</el-header>
|
||||
<el-main id="elMain" class="nopadding">
|
||||
<!-- 日志 -->
|
||||
<mlogs
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 60%"
|
||||
></mlogs>
|
||||
<mtask
|
||||
v-if="values == '日志'"
|
||||
:mgroupName="mgroupName"
|
||||
style="height: 40%"
|
||||
></mtask>
|
||||
<!-- 交接记录 -->
|
||||
<handover
|
||||
v-else-if="values == '交接记录'"
|
||||
:mgroupName="mgroupName"
|
||||
></handover>
|
||||
<!-- 库存 -->
|
||||
<inm v-else-if="values == '库存'" :mgroupName="mgroupName"></inm>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
import inm from "./inm.vue";
|
||||
import mlogs from "./mlogs.vue";
|
||||
import mtask from "./mtask.vue";
|
||||
import handover from "./handover.vue";
|
||||
export default {
|
||||
name: "bx",
|
||||
components: { inm, mlogs, mtask, handover },
|
||||
data() {
|
||||
return {
|
||||
mgroups:[],
|
||||
tableHieght: 200,
|
||||
options: ["日志", "交接记录", "库存"],
|
||||
values: "日志",
|
||||
mgroupName: "",
|
||||
mgroupId: "",
|
||||
selectedIndex:0,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
let that = this;
|
||||
let height = document.getElementById("elMain").clintHeight / 2;
|
||||
that.tableHieght = height;
|
||||
let paths = this.$route.path;
|
||||
let arr = paths.split("/");
|
||||
let mgroup_code = arr[2];
|
||||
that.getMgroups(mgroup_code);
|
||||
console.log("arr",arr);
|
||||
console.log("mgroup_code",mgroup_code);
|
||||
},
|
||||
methods: {
|
||||
handleChange(value) {
|
||||
this.value = value;
|
||||
console.log("Selected value:", value);
|
||||
},
|
||||
getMgroups(code){
|
||||
let that = this;
|
||||
that.$API.mtm.mgroup.list.req({page:0,code}).then((res) => {
|
||||
that.mgroups = res;
|
||||
that.mgroupName = res[0].name;
|
||||
that.mgroupId = res[0].id;
|
||||
that.mgroupProcess = res[0].process;
|
||||
that.mgroupDept = res[0].belong_dept;
|
||||
console.log("mgroups",that.mgroups);
|
||||
});
|
||||
},
|
||||
changeMgroup(id,index){
|
||||
let that = this;
|
||||
that.selectedIndex = index;
|
||||
console.log(that.selectedIndex);
|
||||
that.mgroupId = id;
|
||||
that.mgroupName = that.mgroups[index].name;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.countBlock {
|
||||
width: 80px;
|
||||
color: #ffffff;
|
||||
text-align: center;
|
||||
}
|
||||
.mgroupItem{
|
||||
height: 35px;
|
||||
width: 80px;
|
||||
line-height: 35px;
|
||||
margin: 5px 0;
|
||||
text-align: center;
|
||||
color: #6e80ff;
|
||||
}
|
||||
.mgroupItem:hover,.mgroupItemActive{
|
||||
color: #6e80ff;
|
||||
background: rgba(83, 109, 254, 0.2);
|
||||
}
|
||||
</style>
|
|
@ -1,3 +1,4 @@
|
|||
<!-- 左侧工段列表的 生产执行页面 -->
|
||||
<template>
|
||||
<el-container>
|
||||
<el-aside style="width: 100px;background: #ffffff;">
|
||||
|
|
Loading…
Reference in New Issue