|
@@ -356,21 +356,8 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
|
|
|
|
+ <el-col :span="11">
|
|
|
<el-form-item label="作业区域" prop="workareaId">
|
|
<el-form-item label="作业区域" prop="workareaId">
|
|
|
- <!-- <el-select-->
|
|
|
|
|
- <!-- style="width: 300px"-->
|
|
|
|
|
- <!-- v-model="form.workareaId"-->
|
|
|
|
|
- <!-- placeholder="请选择作业区域"-->
|
|
|
|
|
- <!-- >-->
|
|
|
|
|
- <!-- <el-option-->
|
|
|
|
|
- <!-- v-for="dict in this.workareaList"-->
|
|
|
|
|
- <!-- :key="dict.value"-->
|
|
|
|
|
- <!-- :label="dict.label"-->
|
|
|
|
|
- <!-- :value="dict.value"-->
|
|
|
|
|
- <!-- />-->
|
|
|
|
|
- <!-- </el-select>-->
|
|
|
|
|
-
|
|
|
|
|
<treeselect
|
|
<treeselect
|
|
|
style="width: 300px"
|
|
style="width: 300px"
|
|
|
v-model="form.workareaId"
|
|
v-model="form.workareaId"
|
|
@@ -380,7 +367,31 @@
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="锁具类型" prop="locksetTypeId">
|
|
|
|
|
+ <treeselect
|
|
|
|
|
+ style="width: 300px"
|
|
|
|
|
+ v-model="form.locksetTypeId"
|
|
|
|
|
+ :options="LockTypeOptions"
|
|
|
|
|
+ :normalizer="normalizerLockset"
|
|
|
|
|
+ placeholder="选择作业区域"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="12">
|
|
|
|
|
+ <el-form-item label="挂锁类型" prop="lockTypeId">
|
|
|
|
|
+ <treeselect
|
|
|
|
|
+ style="width: 300px"
|
|
|
|
|
+ v-model="form.lockTypeId"
|
|
|
|
|
+ :options="padLockTypeOptions"
|
|
|
|
|
+ :normalizer="normalizerpadLock"
|
|
|
|
|
+ placeholder="选择作业区域"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="隔离点图标" prop="pointIcon">
|
|
<el-form-item label="隔离点图标" prop="pointIcon">
|
|
@@ -406,21 +417,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
- <!-- <el-form-item label="所属车间" prop="workshopId">-->
|
|
|
|
|
- <!-- <el-select-->
|
|
|
|
|
- <!-- style="width: 318px"-->
|
|
|
|
|
- <!-- v-model="form.workshopId"-->
|
|
|
|
|
- <!-- placeholder="请选择所属车间"-->
|
|
|
|
|
- <!-- @change="workShopChange"-->
|
|
|
|
|
- <!-- >-->
|
|
|
|
|
- <!-- <el-option-->
|
|
|
|
|
- <!-- v-for="item in this.workshopList"-->
|
|
|
|
|
- <!-- :key="item.key"-->
|
|
|
|
|
- <!-- :label="item.label"-->
|
|
|
|
|
- <!-- :value="item.value"-->
|
|
|
|
|
- <!-- />-->
|
|
|
|
|
- <!-- </el-select>-->
|
|
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
|
|
+
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -447,6 +444,8 @@ import { genCode } from "@/api/system/autocode/rule";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { listWorkarea } from "@/api/mes/wa/workarea";
|
|
import { listWorkarea } from "@/api/mes/wa/workarea";
|
|
|
|
|
+import { listLockType } from '@/api/mes/locktype/locktype'
|
|
|
|
|
+import { listPadLockTypeAPI } from '@/api/mes/padLockType/padLockType'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Team",
|
|
name: "Team",
|
|
@@ -530,6 +529,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 表单参数
|
|
// 表单参数
|
|
|
form: {},
|
|
form: {},
|
|
|
|
|
+ LockTypeOptions:[],//锁具类型下拉
|
|
|
|
|
+ padLockTypeOptions:[],//挂锁类型下拉
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
|
pointCode: [
|
|
pointCode: [
|
|
@@ -594,6 +595,14 @@ export default {
|
|
|
"children"
|
|
"children"
|
|
|
);
|
|
);
|
|
|
});
|
|
});
|
|
|
|
|
+ // 锁具类型
|
|
|
|
|
+ listLockType(data).then((response)=>{
|
|
|
|
|
+ this.LockTypeOptions=this.handleTree(response.data.records,'locksetTypeId')
|
|
|
|
|
+ })
|
|
|
|
|
+ // 挂锁类型
|
|
|
|
|
+ listPadLockTypeAPI(data).then((response)=>{
|
|
|
|
|
+ this.padLockTypeOptions=this.handleTree(response.data.records,'lockTypeId')
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
/** 转换部门数据结构 */
|
|
/** 转换部门数据结构 */
|
|
|
normalizer(node) {
|
|
normalizer(node) {
|
|
@@ -606,6 +615,26 @@ export default {
|
|
|
children: node.children,
|
|
children: node.children,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ normalizerLockset(node){
|
|
|
|
|
+ if (node.children && !node.children.length) {
|
|
|
|
|
+ delete node.children;
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: node.locksetTypeId,
|
|
|
|
|
+ label: node.locksetTypeName,
|
|
|
|
|
+ children: node.children,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
|
|
+ normalizerpadLock(node){
|
|
|
|
|
+ if (node.children && !node.children.length) {
|
|
|
|
|
+ delete node.children;
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ id: node.lockTypeId,
|
|
|
|
|
+ label: node.lockTypeName,
|
|
|
|
|
+ children: node.children,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
//图片上传成功
|
|
//图片上传成功
|
|
|
handleImgUplaoded(imgUrl) {
|
|
handleImgUplaoded(imgUrl) {
|
|
|
this.form.pointPicture = imgUrl[0].url;
|
|
this.form.pointPicture = imgUrl[0].url;
|
|
@@ -756,7 +785,7 @@ export default {
|
|
|
// 获取车间数据
|
|
// 获取车间数据
|
|
|
getworkShop() {
|
|
getworkShop() {
|
|
|
workshoplistAll().then((response) => {
|
|
workshoplistAll().then((response) => {
|
|
|
- console.log(response, "获取车间数据");
|
|
|
|
|
|
|
+ // console.log(response, "获取车间数据");
|
|
|
this.workshopList = response.data.map((item) => {
|
|
this.workshopList = response.data.map((item) => {
|
|
|
return {
|
|
return {
|
|
|
label: item.workshopName,
|
|
label: item.workshopName,
|