|
|
@ -212,7 +212,7 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-hasPermi="['device:upkeepPlan:add']"
|
|
|
|
v-hasPermi="['device:upkeepPlan:add']"
|
|
|
|
>新增
|
|
|
|
>添加计划
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
@ -221,10 +221,9 @@
|
|
|
|
plain
|
|
|
|
plain
|
|
|
|
icon="el-icon-edit"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
:disabled="single"
|
|
|
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
@click="handleUpdate"
|
|
|
|
v-hasPermi="['device:upkeepPlan:edit']"
|
|
|
|
v-hasPermi="['device:upkeepPlan:add']"
|
|
|
|
>修改
|
|
|
|
>委外计划
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
@ -239,7 +238,7 @@
|
|
|
|
>删除
|
|
|
|
>删除
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col v-if="false" :span="1.5">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
type="warning"
|
|
|
|
type="warning"
|
|
|
|
plain
|
|
|
|
plain
|
|
|
@ -306,7 +305,7 @@
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
@ -822,7 +821,7 @@ import {
|
|
|
|
updateUpkeepPlan,
|
|
|
|
updateUpkeepPlan,
|
|
|
|
formatEquItem, setSpareList, querySpareList
|
|
|
|
formatEquItem, setSpareList, querySpareList
|
|
|
|
} from "@/api/device/upkeepPlan";
|
|
|
|
} from "@/api/device/upkeepPlan";
|
|
|
|
import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan";
|
|
|
|
import {getEquList, getPersonList, getWorkCenter, initUpdatePlanInfo} from "@/api/device/plan";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "UpkeepPlan",
|
|
|
|
name: "UpkeepPlan",
|
|
|
@ -1182,49 +1181,22 @@ export default {
|
|
|
|
// 清除缓存
|
|
|
|
// 清除缓存
|
|
|
|
this.itemDetailList = [];
|
|
|
|
this.itemDetailList = [];
|
|
|
|
|
|
|
|
|
|
|
|
// 处理信息
|
|
|
|
for (let i = 0; i < this.form.equipmentItem.length; i++) {
|
|
|
|
if (e.equCheckItemList == null) {
|
|
|
|
if (e.code == this.form.equipmentItem[i].code) {
|
|
|
|
// 编辑-返回信息
|
|
|
|
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
|
|
|
|
|
|
|
|
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
|
|
|
|
for (let i = 0; i < e.equPlanDetailList.length; i++) {
|
|
|
|
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
|
|
|
|
for (let j = 0; j < e.equPlanDetailList[i].equPlanStandardList.length; j++) {
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
|
|
|
|
|
|
|
|
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
|
|
|
|
// 批量处理
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].itemName = e.equPlanDetailList[i].itemName;
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
|
|
|
|
// 前端信息显示
|
|
|
|
}
|
|
|
|
if (e.equPlanDetailList[i].equPlanStandardList[j].standardType == "qualitative") {
|
|
|
|
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].standardTypeName = "定性";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].standardTypeName = "定量";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.itemDetailList.push(e.equPlanDetailList[i].equPlanStandardList[j]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 新增-信息
|
|
|
|
|
|
|
|
for (let i = 0; i < e.equCheckItemList.length; i++) {
|
|
|
|
|
|
|
|
for (let j = 0; j < e.equCheckItemList[i].equCheckItemDetailList.length; j++) {
|
|
|
|
|
|
|
|
// 批量处理
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].itemName = e.equCheckItemList[i].itemName;
|
|
|
|
|
|
|
|
// false不显示
|
|
|
|
|
|
|
|
if (e.equCheckItemList[i].equCheckItemDetailList[j].showFlag == false) {
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList.splice(j, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 前端信息显示
|
|
|
|
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
|
|
|
|
if (e.equCheckItemList[i].equCheckItemDetailList[j].standardType == "qualitative") {
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定性";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定量";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.itemDetailList.push(e.equCheckItemList[i].equCheckItemDetailList[j]);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.editorItem = true;
|
|
|
|
this.editorItem = true;
|
|
|
@ -1384,12 +1356,37 @@ export default {
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
const planId = row.planId || this.ids
|
|
|
|
// 清除缓存
|
|
|
|
getUpkeepPlan(planId).then(response => {
|
|
|
|
this.queryEquipment = [];
|
|
|
|
|
|
|
|
this.upkeepSteps = 0;
|
|
|
|
|
|
|
|
this.selectPersonList = [];
|
|
|
|
|
|
|
|
this.personList = [];
|
|
|
|
|
|
|
|
this.setPerson();
|
|
|
|
|
|
|
|
this.setWorkCenter();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initUpdatePlanInfo(row).then(response => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data;
|
|
|
|
|
|
|
|
console.log("这里!!!!")
|
|
|
|
|
|
|
|
console.log(response.data)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selectPersonList = response.data.personListVO;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.form.equipmentItem.length; i++) {
|
|
|
|
|
|
|
|
if (this.form.equipmentItem[i].itemTempName == null) {
|
|
|
|
|
|
|
|
this.form.equipmentItem[i].itemTempName = '';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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 + ","
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log("这里时修改前")
|
|
|
|
|
|
|
|
console.log(this.form)
|
|
|
|
|
|
|
|
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "修改保养计划";
|
|
|
|
this.title = "修改计划";
|
|
|
|
});
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
@ -1397,6 +1394,8 @@ export default {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
|
|
|
|
console.log("这里时修改后")
|
|
|
|
|
|
|
|
console.log(this.form)
|
|
|
|
updateUpkeepPlan(this.form).then(response => {
|
|
|
|
updateUpkeepPlan(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|