巡检计划修改+删除

master
wws 11 months ago
parent 9ba845c490
commit 911336944e

@ -229,7 +229,7 @@
>删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-col v-if="false" :span="1.5">
<el-button
type="warning"
plain
@ -586,6 +586,7 @@ import {
formatEquItem,
getPersonList, getWorkCenter, initUpdatePlanInfo
} from "@/api/device/plan";
import plan from "@/views/plan/plan/index.vue";
export default {
name: "Plan",
@ -594,17 +595,15 @@ export default {
return {
//
changeCenter() {
console.log("改变了工作中心")
console.log(this.form.planWorkshop)
},
// list
workCenterList:[],
workCenterList: [],
// 穿
personList: [],
selectPersonList: [],
// list
itemDetailList:[],
itemDetailList: [],
// loading
detailLoading: false,
//
@ -713,11 +712,11 @@ export default {
planName: null,
planStatus: '0',
planPerson: null,
planLoop:null,
planLoop: null,
planTimeArray: [],
equipmentItem: [],
personList: [],
planWorkshop:null,
planWorkshop: null,
planType: "inspection",
},
//
@ -750,8 +749,6 @@ export default {
},
//
standardBtn() {
console.log("这里是你要确定的数据");
console.log(this.form.equipmentItem)
this.editorItem = false;
},
//
@ -760,25 +757,19 @@ export default {
for (let i = 0; i < this.itemDetailList.length; i++) {
if (this.itemDetailList[i].detailCode == e.detailCode) {
this.itemDetailList[i].showFlag = false;
this.itemDetailList.splice(i,1);
this.itemDetailList.splice(i, 1);
}
}
},
// -
editorTheItem(e) {
console.log(e)
//
this.itemDetailList = [];
console.log("12312312")
console.log(e.equCheckItemList)
//
if (e.equCheckItemList == null) {
// -
console.log("出现了")
console.log(e.equPlanDetailList)
for (let i = 0; i < e.equPlanDetailList.length; i++) {
for (let j = 0; j < e.equPlanDetailList[i].equPlanStandardList.length; j++) {
@ -789,7 +780,7 @@ export default {
//
if (e.equPlanDetailList[i].equPlanStandardList[j].standardType == "qualitative") {
e.equPlanDetailList[i].equPlanStandardList[j].standardTypeName = "定性";
}else {
} else {
e.equPlanDetailList[i].equPlanStandardList[j].standardTypeName = "定量";
}
@ -797,7 +788,7 @@ export default {
}
}
}else {
} else {
// -
for (let i = 0; i < e.equCheckItemList.length; i++) {
for (let j = 0; j < e.equCheckItemList[i].equCheckItemDetailList.length; j++) {
@ -805,13 +796,13 @@ export default {
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);
e.equCheckItemList[i].equCheckItemDetailList.splice(j, 1);
}
//
if (e.equCheckItemList[i].equCheckItemDetailList[j].standardType == "qualitative") {
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定性";
}else {
} else {
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定量";
}
@ -825,9 +816,6 @@ export default {
},
// -
delTheEquItem(e) {
console.log("删除")
console.log(e)
console.log(this.form.equipmentItem)
this.form.equipmentItem.splice(e.equipmentCode, 1)
},
//
@ -847,8 +835,6 @@ export default {
//
formatEquItem(this.selectEquList).then(response => {
console.log("开始格式化设备信息")
console.log(response)
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
@ -860,8 +846,6 @@ export default {
},
//
selectChangeEqu(e) {
console.log("这里!!!!!")
console.log(e)
this.selectEquList = e;
},
//
@ -988,10 +972,9 @@ export default {
this.title = "添加计划";
},
//
setWorkCenter(){
setWorkCenter() {
getWorkCenter().then(response => {
console.log("这里是工作中心")
console.log(response.data)
this.workCenterList = response.data;
})
},
@ -1008,9 +991,6 @@ export default {
this.setWorkCenter();
initUpdatePlanInfo(row).then(response => {
console.log(row)
console.log("返回数据如下")
console.log(response.data)
this.form = response.data;
this.selectPersonList = response.data.personListVO;
@ -1020,7 +1000,7 @@ export default {
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 +","
this.form.equipmentItem[i].itemTempName = this.form.equipmentItem[i].itemTempName + this.form.equipmentItem[i].equPlanDetailList[j].itemName + ","
}
}
@ -1080,8 +1060,6 @@ export default {
});
} else {
this.form.personList = this.selectPersonList;
console.log("这里是人员信息")
console.log(this.form.personList)
addPlan(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
@ -1094,7 +1072,26 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const planIds = row.planId || this.ids;
this.$modal.confirm('是否确认删除计划编号为"' + planIds + '"的数据项?').then(function () {
var planCodes = '';
//
for (let i = 0; i < this.planList.length; i++) {
for (let j = 0; j < planIds.length; j++) {
if (planIds[j] == this.planList[i].planId) {
planCodes = planCodes + this.planList[i].planCode + ',';
}
}
}
if (planCodes == '') {
for (let i = 0; i < this.planList.length; i++) {
if (planIds == this.planList[i].planId) {
planCodes = this.planList[i].planCode;
}
}
}
this.$modal.confirm('是否确认删除计划编号为"' + planCodes + '"的数据项?').then(function () {
return delPlan(planIds);
}).then(() => {
this.getList();
@ -1120,6 +1117,7 @@ export default {
.my-step-body {
margin-top: 15px;
}
.el-transfer-panel {
width: 300px;
}

Loading…
Cancel
Save