保养点检巡检计划变更

yangwl
wws 1 year ago
parent e5af12a443
commit 118d1b9b08

@ -453,6 +453,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
border
:data="form.equipmentItem" :data="form.equipmentItem"
stripe stripe
style="width: 100%"> style="width: 100%">
@ -469,15 +470,18 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemTempName" prop="itemTempName"
label="巡检项" label="部位"
width="300"> width="300">
<template slot-scope="scope">
<div v-html="scope.row.equPlanDetailList.filter(detail => detail.equPlanStandardList.filter(standard => standard.showFlag == false).length == 0).map(item => item.itemName).join(',')"></div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="editorTheItem(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="editorTheItem(scope.row)" type="text" size="small">检查项</el-button>
<el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button> <el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -491,17 +495,26 @@
> >
<!-- 编辑检查标准 --> <!-- 编辑检查标准 -->
<el-table <el-table
border
:data="itemDetailList" :data="itemDetailList"
v-loading="detailLoading" v-loading="detailLoading"
stripe stripe
@selection-change="selectChangeEqu" @selection-change="selectChangeEqu"
style="width: 100%"> style="width: 100%">
<el-table-column width="55" align="center"/>
<el-table-column <el-table-column
prop="itemName" prop="itemName"
label="检查项"> label="部位">
</el-table-column>
<el-table-column
prop="itemMethod"
label="方法">
</el-table-column>
<el-table-column
prop="itemTools"
label="工具">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
width="200"
prop="standardName" prop="standardName"
label="检查标准"> label="检查标准">
</el-table-column> </el-table-column>
@ -921,23 +934,36 @@ export default {
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
// //
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName; var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
//
var itemMethod = this.form.equipmentItem[i].equPlanDetailList[j].itemMethod;
//
var itemTools = this.form.equipmentItem[i].equPlanDetailList[j].itemTools;
// //
// var itemLoop = this.form.equipmentItem[i].equPlanDetailList[j].itemLoop;
// var itemLoopType = this.form.equipmentItem[i].equPlanDetailList[j].itemLoopType;
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){ for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++) {
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) { if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemMethod = itemMethod;
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemTools = itemTools;
// this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoop = itemLoop;
// this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoopType = itemLoopType;
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") { if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性"; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
}else { } else {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量"; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
} }
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]); this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
} }
} }
} }
} }
@ -969,6 +995,12 @@ export default {
} }
} }
//
for (let i = 0; i < this.selectEquList.length; i++) {
this.selectEquList[i].itemLoop = this.form.planLoop;
this.selectEquList[i].itemLoopType = this.form.planLoopType;
}
// //
formatEquItem(this.selectEquList).then(response => { formatEquItem(this.selectEquList).then(response => {
@ -1171,14 +1203,14 @@ export default {
this.selectPersonList = response.data.personListVO; this.selectPersonList = response.data.personListVO;
for (let i = 0; i < this.form.equipmentItem.length; i++) { // for (let i = 0; i < this.form.equipmentItem.length; i++) {
if (this.form.equipmentItem[i].itemTempName == null) { // if (this.form.equipmentItem[i].itemTempName == null) {
this.form.equipmentItem[i].itemTempName = ''; // this.form.equipmentItem[i].itemTempName = '';
} // }
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { // for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName + "," // this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName + ","
} // }
} // }
this.loading = false; this.loading = false;
this.open = true; this.open = true;
@ -1270,6 +1302,6 @@ export default {
} }
.el-transfer-panel { .el-transfer-panel {
width: 260px; width: 260px !important;
} }
</style> </style>

@ -438,7 +438,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8" offset="2" > <el-col :span="8" :offset="2" >
<el-form-item label="车间" prop="planWorkshop"> <el-form-item label="车间" prop="planWorkshop">
<el-select @change="changeCenter" v-model="form.planWorkshop" placeholder="请选择车间"> <el-select @change="changeCenter" v-model="form.planWorkshop" placeholder="请选择车间">
<el-option <el-option
@ -472,6 +472,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
border
:data="form.equipmentItem" :data="form.equipmentItem"
stripe stripe
style="width: 100%"> style="width: 100%">
@ -488,15 +489,18 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemTempName" prop="itemTempName"
label="点检项" label="部位"
width="300"> width="300">
<template slot-scope="scope">
<div v-html="scope.row.equPlanDetailList.filter(detail => detail.equPlanStandardList.filter(standard => standard.showFlag == false).length == 0).map(item => item.itemName).join(',')"></div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
fixed="right" fixed="right"
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="editorTheItem(scope.row)" type="text" size="small">编辑</el-button> <el-button @click="editorTheItem(scope.row)" type="text" size="small">检查项</el-button>
<el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button> <el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -505,22 +509,39 @@
<el-dialog <el-dialog
title="编辑检查项" title="编辑检查项"
:visible.sync="editorItem" :visible.sync="editorItem"
width="50%" width="900px"
append-to-body append-to-body
> >
<!-- 编辑检查标准 --> <!-- 编辑检查标准 -->
<el-table <el-table
border
:data="itemDetailList" :data="itemDetailList"
v-loading="detailLoading" v-loading="detailLoading"
stripe stripe
@selection-change="selectChangeEqu" @selection-change="selectChangeEqu"
style="width: 100%"> style="width: 100%">
<el-table-column width="55" align="center"/>
<el-table-column <el-table-column
prop="itemName" prop="itemName"
label="检查项"> label="部位">
</el-table-column> </el-table-column>
<!-- <el-table-column-->
<!-- prop="itemLoop"-->
<!-- label="周期">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="itemLoopType"-->
<!-- label="周期类型">-->
<!-- </el-table-column>-->
<el-table-column <el-table-column
prop="itemMethod"
label="方法">
</el-table-column>
<el-table-column
prop="itemTools"
label="工具">
</el-table-column>
<el-table-column
width="200"
prop="standardName" prop="standardName"
label="检查标准"> label="检查标准">
</el-table-column> </el-table-column>
@ -543,6 +564,7 @@
</el-dialog> </el-dialog>
<!-- 选择设备弹窗 --> <!-- 选择设备弹窗 -->
<el-dialog <el-dialog
border
title="选择设备" title="选择设备"
:visible.sync="selectEqu" :visible.sync="selectEqu"
width="50%" width="50%"
@ -957,13 +979,27 @@ export default {
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
// //
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName; var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
//
var itemMethod = this.form.equipmentItem[i].equPlanDetailList[j].itemMethod;
//
var itemTools = this.form.equipmentItem[i].equPlanDetailList[j].itemTools;
// //
// var itemLoop = this.form.equipmentItem[i].equPlanDetailList[j].itemLoop;
// var itemLoopType = this.form.equipmentItem[i].equPlanDetailList[j].itemLoopType;
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++) { for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++) {
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) { if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemMethod = itemMethod;
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemTools = itemTools;
// this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoop = itemLoop;
// this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoopType = itemLoopType;
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") { if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性"; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
} else { } else {
@ -973,7 +1009,6 @@ export default {
} }
} }
} }
} }
@ -1005,6 +1040,12 @@ export default {
} }
} }
//
for (let i = 0; i < this.selectEquList.length; i++) {
this.selectEquList[i].itemLoop = this.form.planLoop;
this.selectEquList[i].itemLoopType = this.form.planLoopType;
}
// //
formatEquItem(this.selectEquList).then(response => { formatEquItem(this.selectEquList).then(response => {
@ -1197,14 +1238,14 @@ export default {
this.selectPersonList = response.data.personListVO; this.selectPersonList = response.data.personListVO;
for (let i = 0; i < this.form.equipmentItem.length; i++) { // for (let i = 0; i < this.form.equipmentItem.length; i++) {
if (this.form.equipmentItem[i].itemTempName == null) { // if (this.form.equipmentItem[i].itemTempName == null) {
this.form.equipmentItem[i].itemTempName = ''; // this.form.equipmentItem[i].itemTempName = '';
} // }
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { // for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName + "," // this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName + ","
} // }
} // }
this.loading = false; this.loading = false;
this.open = true; this.open = true;
@ -1295,6 +1336,6 @@ export default {
} }
.el-transfer-panel { .el-transfer-panel {
width: 260px; width: 260px !important;
} }
</style> </style>

@ -503,6 +503,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-table <el-table
border
:data="form.equipmentItem" :data="form.equipmentItem"
stripe stripe
style="width: 100%"> style="width: 100%">
@ -519,8 +520,11 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemTempName" prop="itemTempName"
label="保养项" label="部位"
width="300"> width="300">
<template slot-scope="scope">
<div v-html="scope.row.equPlanDetailList.filter(detail => detail.equPlanStandardList.filter(standard => standard.showFlag == false).length == 0).map(item => item.itemName).join(',')"></div>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
v-if="false" v-if="false"
@ -534,7 +538,7 @@
label="操作" label="操作"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button @click="editorTheItem(scope.row)" type="text" size="small">标准</el-button> <el-button @click="editorTheItem(scope.row)" type="text" size="small">检查项</el-button>
<el-button @click="selectSpareBtn(scope.row)" type="text" size="small">备件</el-button> <el-button @click="selectSpareBtn(scope.row)" type="text" size="small">备件</el-button>
<el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button> <el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button>
</template> </template>
@ -549,17 +553,26 @@
> >
<!-- 编辑检查标准 --> <!-- 编辑检查标准 -->
<el-table <el-table
border
:data="itemDetailList" :data="itemDetailList"
v-loading="detailLoading" v-loading="detailLoading"
stripe stripe
@selection-change="selectChangeEqu" @selection-change="selectChangeEqu"
style="width: 100%"> style="width: 100%">
<el-table-column width="55" align="center"/>
<el-table-column <el-table-column
prop="itemName" prop="itemName"
label="检查项"> label="部位">
</el-table-column>
<el-table-column
prop="itemMethod"
label="方法">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="itemTools"
label="工具">
</el-table-column>
<el-table-column
width="200"
prop="standardName" prop="standardName"
label="检查标准"> label="检查标准">
</el-table-column> </el-table-column>
@ -1288,23 +1301,36 @@ export default {
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) { for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
// //
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName; var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
//
var itemMethod = this.form.equipmentItem[i].equPlanDetailList[j].itemMethod;
//
var itemTools = this.form.equipmentItem[i].equPlanDetailList[j].itemTools;
// //
// var itemLoop = this.form.equipmentItem[i].equPlanDetailList[j].itemLoop;
// var itemLoopType = this.form.equipmentItem[i].equPlanDetailList[j].itemLoopType;
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){ for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++) {
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) { if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].showFlag == true) {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemMethod = itemMethod;
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemTools = itemTools;
// this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoop = itemLoop;
// this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemLoopType = itemLoopType;
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") { if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性"; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
}else { } else {
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量"; this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
} }
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]); this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
} }
} }
} }
} }
@ -1336,6 +1362,12 @@ export default {
} }
} }
//
for (let i = 0; i < this.selectEquList.length; i++) {
this.selectEquList[i].itemLoop = this.form.planLoop;
this.selectEquList[i].itemLoopType = this.form.planLoopType;
}
// //
formatEquItem(this.selectEquList).then(response => { formatEquItem(this.selectEquList).then(response => {
@ -1667,6 +1699,6 @@ export default {
} }
.el-transfer-panel { .el-transfer-panel {
width: 250px; width: 250px !important;
} }
</style> </style>

Loading…
Cancel
Save