|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产线" prop="planProdLine">
|
|
|
|
|
<el-form-item v-if="false" label="产线" prop="planProdLine">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.planProdLine"
|
|
|
|
|
placeholder="请输入产线"
|
|
|
|
@ -33,7 +33,7 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备名称" prop="equipmentName">
|
|
|
|
|
<el-form-item v-if="false" label="设备名称" prop="equipmentName">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.equipmentName"
|
|
|
|
|
placeholder="请输入设备名称"
|
|
|
|
@ -41,7 +41,7 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode">
|
|
|
|
|
<el-form-item v-if="false" label="设备编码" prop="equipmentCode">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.equipmentCode"
|
|
|
|
|
placeholder="请输入设备编码"
|
|
|
|
@ -73,7 +73,7 @@
|
|
|
|
|
placeholder="请选择循环执行时间结束">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="巡检人员" prop="planPerson">
|
|
|
|
|
<el-form-item v-if="false" label="巡检人员" prop="planPerson">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.planPerson"
|
|
|
|
|
placeholder="请输入巡检人员"
|
|
|
|
@ -250,9 +250,9 @@
|
|
|
|
|
<el-table-column label="计划编码" align="center" prop="planCode"/>
|
|
|
|
|
<el-table-column label="计划名称" align="center" prop="planName"/>
|
|
|
|
|
<el-table-column label="车间" align="center" prop="planWorkshop"/>
|
|
|
|
|
<el-table-column label="产线" align="center" prop="planProdLine"/>
|
|
|
|
|
<el-table-column label="设备名称" align="center" prop="equipmentName"/>
|
|
|
|
|
<el-table-column label="设备编码" align="center" prop="equipmentCode"/>
|
|
|
|
|
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/>
|
|
|
|
|
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName"/>
|
|
|
|
|
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode"/>
|
|
|
|
|
<el-table-column label="循环周期" align="center" prop="planLoop"/>
|
|
|
|
|
<el-table-column label="循环周期类型" align="center" prop="planLoopType"/>
|
|
|
|
|
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
|
|
|
|
@ -265,7 +265,7 @@
|
|
|
|
|
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="巡检人员" align="center" prop="planPerson"/>
|
|
|
|
|
<el-table-column v-if="false" label="巡检人员" align="center" prop="planPerson"/>
|
|
|
|
|
<el-table-column label="计划状态" align="center" prop="planStatus"/>
|
|
|
|
|
<el-table-column v-if="false" label="是否可生产-限制" align="center" prop="planRestrict"/>
|
|
|
|
|
<el-table-column v-if="false" label="维护类型" align="center" prop="planType"/>
|
|
|
|
@ -376,10 +376,16 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row v-if="false">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="巡检人员">
|
|
|
|
|
<el-select v-model="form.planPerson" placeholder="请选择巡检人员" clearable>
|
|
|
|
|
<el-form-item label="车间">
|
|
|
|
|
<el-select @change="changeCenter" v-model="form.planWorkshop" placeholder="请选择车间" clearable>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in workCenterList"
|
|
|
|
|
:key="item.factoryCode"
|
|
|
|
|
:label="item.factoryName"
|
|
|
|
|
:value="item.factoryCode">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
@ -523,6 +529,10 @@
|
|
|
|
|
prop="equipmentTypeName"
|
|
|
|
|
label="设备类型">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="workshopName"
|
|
|
|
|
label="工作中心">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
@ -574,7 +584,7 @@ import {
|
|
|
|
|
updatePlan,
|
|
|
|
|
getEquList,
|
|
|
|
|
formatEquItem,
|
|
|
|
|
getPersonList
|
|
|
|
|
getPersonList, getWorkCenter, initUpdatePlanInfo
|
|
|
|
|
} from "@/api/device/plan";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
@ -582,6 +592,14 @@ export default {
|
|
|
|
|
dicts: ['device_loop_type', 'sys_normal_disable'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 选择工作中心
|
|
|
|
|
changeCenter() {
|
|
|
|
|
console.log("改变了工作中心")
|
|
|
|
|
console.log(this.form.planWorkshop)
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 工作中心list
|
|
|
|
|
workCenterList:[],
|
|
|
|
|
// 巡检人员选择穿梭框
|
|
|
|
|
personList: [],
|
|
|
|
|
selectPersonList: [],
|
|
|
|
@ -601,6 +619,7 @@ export default {
|
|
|
|
|
equipmentQuery: {
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
equipmentName: null,
|
|
|
|
|
workshopCode: null,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
@ -698,6 +717,7 @@ export default {
|
|
|
|
|
planTimeArray: [],
|
|
|
|
|
equipmentItem: [],
|
|
|
|
|
personList: [],
|
|
|
|
|
planWorkshop:null,
|
|
|
|
|
planType: "inspection",
|
|
|
|
|
},
|
|
|
|
|
// 表单校验
|
|
|
|
@ -725,7 +745,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 点击选择设备按钮
|
|
|
|
|
selectEquBtn() {
|
|
|
|
|
|
|
|
|
|
this.getEquList();
|
|
|
|
|
this.selectEqu = true;
|
|
|
|
|
},
|
|
|
|
|
// 编辑标准确认按钮
|
|
|
|
@ -751,25 +771,54 @@ export default {
|
|
|
|
|
// 清除缓存
|
|
|
|
|
this.itemDetailList = [];
|
|
|
|
|
|
|
|
|
|
console.log("12312312")
|
|
|
|
|
console.log(e.equCheckItemList)
|
|
|
|
|
|
|
|
|
|
// 处理信息
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
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++) {
|
|
|
|
|
|
|
|
|
|
// 前端信息显示
|
|
|
|
|
if (e.equCheckItemList[i].equCheckItemDetailList[j].standardType == "qualitative") {
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定性";
|
|
|
|
|
}else {
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定量";
|
|
|
|
|
// 批量处理
|
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].itemName = e.equPlanDetailList[i].itemName;
|
|
|
|
|
|
|
|
|
|
// 前端信息显示
|
|
|
|
|
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]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.itemDetailList.push(e.equCheckItemList[i].equCheckItemDetailList[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);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 前端信息显示
|
|
|
|
|
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;
|
|
|
|
@ -818,6 +867,7 @@ export default {
|
|
|
|
|
// 获取设备信息
|
|
|
|
|
getEquList() {
|
|
|
|
|
this.equLoading = true;
|
|
|
|
|
this.equipmentQuery.workshopCode = this.form.planWorkshop;
|
|
|
|
|
getEquList(this.equipmentQuery).then(response => {
|
|
|
|
|
this.equTotal = response.total;
|
|
|
|
|
this.queryEquipment = response.rows;
|
|
|
|
@ -829,6 +879,7 @@ export default {
|
|
|
|
|
this.equipmentQuery = {
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
equipmentName: null,
|
|
|
|
|
workshopCode: null,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
};
|
|
|
|
@ -838,8 +889,15 @@ export default {
|
|
|
|
|
stepLast() {
|
|
|
|
|
this.inspectionPlanStep--;
|
|
|
|
|
},
|
|
|
|
|
// 步骤-下一步
|
|
|
|
|
// 步骤-下一步-检验工作中心
|
|
|
|
|
stepNext() {
|
|
|
|
|
if (this.form.planWorkshop == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择工作中心!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.inspectionPlanStep++;
|
|
|
|
|
},
|
|
|
|
|
/** 查询计划列表 */
|
|
|
|
@ -914,27 +972,62 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
|
|
|
|
|
this.reset();
|
|
|
|
|
// 清除缓存
|
|
|
|
|
this.resetQuery();
|
|
|
|
|
this.queryEquipment = [];
|
|
|
|
|
this.inspectionPlanStep = 0;
|
|
|
|
|
this.selectPersonList = [];
|
|
|
|
|
this.personList = [];
|
|
|
|
|
|
|
|
|
|
this.getEquList();
|
|
|
|
|
this.setPerson();
|
|
|
|
|
this.setWorkCenter();
|
|
|
|
|
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加计划";
|
|
|
|
|
},
|
|
|
|
|
// 获取工作中心
|
|
|
|
|
setWorkCenter(){
|
|
|
|
|
getWorkCenter().then(response => {
|
|
|
|
|
console.log("这里是工作中心")
|
|
|
|
|
console.log(response.data)
|
|
|
|
|
this.workCenterList = response.data;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const planId = row.planId || this.ids
|
|
|
|
|
getPlan(planId).then(response => {
|
|
|
|
|
// 清除缓存
|
|
|
|
|
this.resetQuery();
|
|
|
|
|
this.queryEquipment = [];
|
|
|
|
|
this.inspectionPlanStep = 0;
|
|
|
|
|
this.selectPersonList = [];
|
|
|
|
|
this.personList = [];
|
|
|
|
|
this.setPerson();
|
|
|
|
|
this.setWorkCenter();
|
|
|
|
|
|
|
|
|
|
initUpdatePlanInfo(row).then(response => {
|
|
|
|
|
console.log(row)
|
|
|
|
|
console.log("返回数据如下")
|
|
|
|
|
console.log(response.data)
|
|
|
|
|
this.form = 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 +","
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改计划";
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
@ -987,6 +1080,8 @@ 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;
|
|
|
|
|