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