|
|
@@ -166,10 +166,19 @@
|
|
|
<span>{{ networkStatusOptions[ywInfo.networkStatus] }}</span>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
+
|
|
|
<el-descriptions-item>
|
|
|
- <template slot="label">设备状态 </template>
|
|
|
+ <template slot="label">所属工厂 </template>
|
|
|
<el-form-item label-width="0">
|
|
|
- <span>{{ statusOptions[ywInfo.status] }}</span>
|
|
|
+ <el-select v-model="ywInfo.factoryId" placeholder="请选择" style="width: 100%;" :disabled="ywInfo.workstation">
|
|
|
+ <el-option
|
|
|
+ v-for="item in factoryListOptions"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item :span="3">
|
|
|
@@ -185,7 +194,7 @@
|
|
|
<el-option
|
|
|
v-for="item in factoryOptions"
|
|
|
:key="item.id"
|
|
|
- :label="item.pathName"
|
|
|
+ :label="item.name"
|
|
|
:value="item.id"
|
|
|
>
|
|
|
</el-option>
|
|
|
@@ -261,6 +270,12 @@
|
|
|
></el-input> -->
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
+ <el-descriptions-item>
|
|
|
+ <template slot="label">设备状态 </template>
|
|
|
+ <el-form-item label-width="0">
|
|
|
+ <span>{{ statusOptions[ywInfo.status] }}</span>
|
|
|
+ </el-form-item>
|
|
|
+ </el-descriptions-item>
|
|
|
<el-descriptions-item>
|
|
|
<template slot="label"> 所属区域 </template>
|
|
|
<el-form-item label-width="0">
|
|
|
@@ -372,12 +387,14 @@
|
|
|
getFactoryarea,
|
|
|
listWorkshopByParentId,
|
|
|
listByProductionLineId,
|
|
|
- listFactoryLine,basicAreaPageAPI
|
|
|
+ listFactoryLine,
|
|
|
+ basicAreaPageAPI
|
|
|
} from '@/api/factoryModel';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
factoryOptions: [],
|
|
|
+ factoryListOptions: [],
|
|
|
areaTreeList: [],
|
|
|
productionLineOptions: [],
|
|
|
stationOptions: [],
|
|
|
@@ -407,7 +424,8 @@
|
|
|
this.getDeliveryCycleOptions();
|
|
|
this.initStatusMapping();
|
|
|
this.initNetworkMapping();
|
|
|
- this.getBasicAreaList()
|
|
|
+ this.getBasicAreaList();
|
|
|
+ this.getFactoryList()
|
|
|
this.getwhbm(1);
|
|
|
this.getwhbm(2);
|
|
|
if (this.form.networkStatus < 0) {
|
|
|
@@ -435,8 +453,7 @@
|
|
|
});
|
|
|
},
|
|
|
getAreaInfo(nodeInfo) {
|
|
|
- this.ywInfo.areaName =nodeInfo.name
|
|
|
-
|
|
|
+ this.ywInfo.areaName = nodeInfo.name;
|
|
|
},
|
|
|
// 维护部门
|
|
|
async getwhbm(type) {
|
|
|
@@ -465,9 +482,16 @@
|
|
|
// this.options.repairUserId = data.list;
|
|
|
// },
|
|
|
// 获取工厂数据
|
|
|
+ getFactoryList() {
|
|
|
+ getFactoryarea({
|
|
|
+ size: 9999,
|
|
|
+ type: 1
|
|
|
+ }).then((res) => {
|
|
|
+ this.factoryListOptions = res.list;
|
|
|
+ });
|
|
|
+ },
|
|
|
getFactoryareaList() {
|
|
|
getFactoryarea({
|
|
|
- type: 1,
|
|
|
size: 9999,
|
|
|
type: 2
|
|
|
}).then((res) => {
|
|
|
@@ -507,7 +531,7 @@
|
|
|
this.ywInfo.factoryRoomId = id;
|
|
|
this.ywInfo.factoryRoomName = this.factoryOptions.filter(
|
|
|
(item) => item.id === id
|
|
|
- )[0].pathName;
|
|
|
+ )[0].name;
|
|
|
this.getListWorkshopByParentId(id);
|
|
|
},
|
|
|
change_productionLineId(id) {
|