|
@@ -1,66 +1,69 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="leftcon">
|
|
<div class="leftcon">
|
|
|
- <el-form ref="form" :model="form" label-width="100px" :inline="true">
|
|
|
|
|
- <el-form-item label="车间">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="form.workShop"
|
|
|
|
|
- placeholder="请选择车间"
|
|
|
|
|
- @change="handleselect"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in this.workShopOptions"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
|
|
+ <!-- <img src="../../assets/images/workshop.png" alt="" /> -->
|
|
|
|
|
+ <div class="leftsize">
|
|
|
|
|
+ <el-form ref="form" :model="form" label-width="100px" :inline="true">
|
|
|
|
|
+ <el-form-item label="车间">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.workShop"
|
|
|
|
|
+ placeholder="请选择车间"
|
|
|
|
|
+ @change="handleselect"
|
|
|
>
|
|
>
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- <!-- <el-select-->
|
|
|
|
|
- <!-- v-model="form.workShop"-->
|
|
|
|
|
- <!-- v-bind="$attrs"-->
|
|
|
|
|
- <!-- multiple-->
|
|
|
|
|
- <!-- style="width: 100%"-->
|
|
|
|
|
- <!-- placeholder="请选择线路"-->
|
|
|
|
|
- <!-- @change="handleSelect"-->
|
|
|
|
|
- <!-- >-->
|
|
|
|
|
- <!-- <div style="padding: 0 20px; line-height: 34px">-->
|
|
|
|
|
- <!-- <el-checkbox-->
|
|
|
|
|
- <!-- v-model="checkAll"-->
|
|
|
|
|
- <!-- :indeterminate="isIndeterminate"-->
|
|
|
|
|
- <!-- @change="handleCheckAllChange"-->
|
|
|
|
|
- <!-- >全选</el-checkbox-->
|
|
|
|
|
- <!-- >-->
|
|
|
|
|
- <!-- </div>-->
|
|
|
|
|
- <!-- <el-checkbox-group v-model="form.workShop">-->
|
|
|
|
|
- <!-- <el-option-->
|
|
|
|
|
- <!-- v-for="item in this.workShopOptions"-->
|
|
|
|
|
- <!-- :key="item.value"-->
|
|
|
|
|
- <!-- :label="item.label"-->
|
|
|
|
|
- <!-- :value="item.value"-->
|
|
|
|
|
- <!-- >-->
|
|
|
|
|
- <!-- <el-checkbox style="pointer-events: none" :label="item.value">-->
|
|
|
|
|
- <!-- {{ item.label }}-->
|
|
|
|
|
- <!-- </el-checkbox>-->
|
|
|
|
|
- <!-- </el-option>-->
|
|
|
|
|
- <!-- </el-checkbox-group>-->
|
|
|
|
|
- <!-- </el-select>-->
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- <el-form-item label="生产线">
|
|
|
|
|
- <el-select
|
|
|
|
|
- v-model="form.producLine"
|
|
|
|
|
- placeholder="请选择生产线"
|
|
|
|
|
- @change="handleselectProductLine"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in this.producLineOptions"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value"
|
|
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in this.workShopOptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <!-- <el-select-->
|
|
|
|
|
+ <!-- v-model="form.workShop"-->
|
|
|
|
|
+ <!-- v-bind="$attrs"-->
|
|
|
|
|
+ <!-- multiple-->
|
|
|
|
|
+ <!-- style="width: 100%"-->
|
|
|
|
|
+ <!-- placeholder="请选择线路"-->
|
|
|
|
|
+ <!-- @change="handleSelect"-->
|
|
|
|
|
+ <!-- >-->
|
|
|
|
|
+ <!-- <div style="padding: 0 20px; line-height: 34px">-->
|
|
|
|
|
+ <!-- <el-checkbox-->
|
|
|
|
|
+ <!-- v-model="checkAll"-->
|
|
|
|
|
+ <!-- :indeterminate="isIndeterminate"-->
|
|
|
|
|
+ <!-- @change="handleCheckAllChange"-->
|
|
|
|
|
+ <!-- >全选</el-checkbox-->
|
|
|
|
|
+ <!-- >-->
|
|
|
|
|
+ <!-- </div>-->
|
|
|
|
|
+ <!-- <el-checkbox-group v-model="form.workShop">-->
|
|
|
|
|
+ <!-- <el-option-->
|
|
|
|
|
+ <!-- v-for="item in this.workShopOptions"-->
|
|
|
|
|
+ <!-- :key="item.value"-->
|
|
|
|
|
+ <!-- :label="item.label"-->
|
|
|
|
|
+ <!-- :value="item.value"-->
|
|
|
|
|
+ <!-- >-->
|
|
|
|
|
+ <!-- <el-checkbox style="pointer-events: none" :label="item.value">-->
|
|
|
|
|
+ <!-- {{ item.label }}-->
|
|
|
|
|
+ <!-- </el-checkbox>-->
|
|
|
|
|
+ <!-- </el-option>-->
|
|
|
|
|
+ <!-- </el-checkbox-group>-->
|
|
|
|
|
+ <!-- </el-select>-->
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="生产线">
|
|
|
|
|
+ <el-select
|
|
|
|
|
+ v-model="form.producLine"
|
|
|
|
|
+ placeholder="请选择生产线"
|
|
|
|
|
+ @change="handleselectProductLine"
|
|
|
>
|
|
>
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-form>
|
|
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in this.producLineOptions"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -80,7 +83,6 @@ export default {
|
|
|
type: Array,
|
|
type: Array,
|
|
|
default: () => [],
|
|
default: () => [],
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -109,7 +111,7 @@ export default {
|
|
|
.catch((error) => {
|
|
.catch((error) => {
|
|
|
console.error("处理车间下拉失败", error);
|
|
console.error("处理车间下拉失败", error);
|
|
|
});
|
|
});
|
|
|
- // 这里是为了拿到sop模板里默认的隔离点选中的数据
|
|
|
|
|
|
|
+ // 这里是为了拿到sop模板里默认的隔离点选中的数据
|
|
|
selectIsSopById(newVal[0].sopId).then((res) => {
|
|
selectIsSopById(newVal[0].sopId).then((res) => {
|
|
|
console.log(res, "sop");
|
|
console.log(res, "sop");
|
|
|
const selectSopPoints = res.data.pointDetailVOList.map((item) => {
|
|
const selectSopPoints = res.data.pointDetailVOList.map((item) => {
|
|
@@ -117,7 +119,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
// 调用 Vuex action 来存储 selectSopPoints
|
|
// 调用 Vuex action 来存储 selectSopPoints
|
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
|
- this.setSopEdit(true)
|
|
|
|
|
|
|
+ this.setSopEdit(true);
|
|
|
console.log(selectSopPoints, "sop_selectePoints");
|
|
console.log(selectSopPoints, "sop_selectePoints");
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -139,7 +141,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
// 这里是为了拿到sop模板里默认的隔离点选中的数据a
|
|
// 这里是为了拿到sop模板里默认的隔离点选中的数据a
|
|
|
- if(!newVal[0].EditBool){
|
|
|
|
|
|
|
+ if (!newVal[0].EditBool) {
|
|
|
selectIsSopById(newVal[0].sopId).then((res) => {
|
|
selectIsSopById(newVal[0].sopId).then((res) => {
|
|
|
console.log(res, "sop");
|
|
console.log(res, "sop");
|
|
|
const selectSopPoints = res.data.pointDetailVOList.map((item) => {
|
|
const selectSopPoints = res.data.pointDetailVOList.map((item) => {
|
|
@@ -148,32 +150,31 @@ export default {
|
|
|
|
|
|
|
|
// 调用 Vuex action 来存储 selectSopPoints
|
|
// 调用 Vuex action 来存储 selectSopPoints
|
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
|
- this.setPointTableData(res.data)
|
|
|
|
|
- this.setSopEdit(false)
|
|
|
|
|
|
|
+ this.setPointTableData(res.data);
|
|
|
|
|
+ this.setSopEdit(false);
|
|
|
console.log(selectSopPoints, "sop_selectePoints");
|
|
console.log(selectSopPoints, "sop_selectePoints");
|
|
|
});
|
|
});
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
const selectSopPoints = newVal[0].spoint.map((item) => {
|
|
const selectSopPoints = newVal[0].spoint.map((item) => {
|
|
|
return item.pointId;
|
|
return item.pointId;
|
|
|
});
|
|
});
|
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
this.setSelectSopPoints(selectSopPoints);
|
|
|
- this.setPointTableData(newVal[0].spoint)
|
|
|
|
|
- this.setSopEdit(true)
|
|
|
|
|
|
|
+ this.setPointTableData(newVal[0].spoint);
|
|
|
|
|
+ this.setSopEdit(true);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
immediate: true, // 立即执行一次,确保在组件初始化时也能捕获到 jobProps 的值
|
|
immediate: true, // 立即执行一次,确保在组件初始化时也能捕获到 jobProps 的值
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.getworkshopList();
|
|
this.getworkshopList();
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- ...mapActions('sopSelectPoints', [
|
|
|
|
|
- 'setSelectSopPoints','setPointTableData','setSopEdit'
|
|
|
|
|
|
|
+ ...mapActions("sopSelectPoints", [
|
|
|
|
|
+ "setSelectSopPoints",
|
|
|
|
|
+ "setPointTableData",
|
|
|
|
|
+ "setSopEdit",
|
|
|
]),
|
|
]),
|
|
|
|
|
|
|
|
// 获取车间列表
|
|
// 获取车间列表
|
|
@@ -259,10 +260,23 @@ export default {
|
|
|
.leftcon {
|
|
.leftcon {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- // background-color: rgba(229, 229, 229, 1);
|
|
|
|
|
- background: url("../../assets/images/sopbgimg.png") no-repeat;
|
|
|
|
|
|
|
+ // background-color: rgba(229, 229, 229, 1);
|
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
|
// box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
|
|
// box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4);
|
|
|
- padding: 3% 4%;
|
|
|
|
|
|
|
+ // padding: 3% 4%;
|
|
|
|
|
+ .leftsize {
|
|
|
|
|
+ width: 1100px;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ background: #000;
|
|
|
|
|
+ background: url("../../assets/images/workshop.png") no-repeat center;
|
|
|
|
|
+ background-size: 100% 100%;
|
|
|
|
|
+ padding: 3% 4%;
|
|
|
|
|
+ margin: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ // img {
|
|
|
|
|
+ // width: 1000px;
|
|
|
|
|
+ // height: 830px;
|
|
|
|
|
+ // margin-left: 80px;
|
|
|
|
|
+ // }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|