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