|
|
@@ -103,9 +103,16 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="dispatchStatus && addForm.type == 1">
|
|
|
- <el-form-item label="场站" prop="productLineId">
|
|
|
- <el-select
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="场站" prop="postName">
|
|
|
+ <el-input
|
|
|
+ v-model="addForm.postName"
|
|
|
+ size="small"
|
|
|
+ placeholder="自动带出"
|
|
|
+ disabled
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ <!-- <el-select
|
|
|
v-model="addForm.productLineId"
|
|
|
placeholder="请选择场站"
|
|
|
filterable
|
|
|
@@ -119,7 +126,7 @@
|
|
|
@click.native="addForm.productLineName = item.name"
|
|
|
>
|
|
|
</el-option>
|
|
|
- </el-select>
|
|
|
+ </el-select> -->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8" v-if="dispatchStatus && addForm.type == 0">
|
|
|
@@ -666,6 +673,8 @@
|
|
|
import MaterialAdd from '@/components/common/MaterialAdd.vue';
|
|
|
import { getteampage } from '@/api/main/index.js';
|
|
|
import bindSubstanceList from './bindSubstanceList.vue';
|
|
|
+ import { getAssetInfo} from '@/api/main/index.js';
|
|
|
+
|
|
|
//设备初始化字段
|
|
|
const substanceKey = [
|
|
|
'substanceCode',
|
|
|
@@ -1060,6 +1069,8 @@
|
|
|
this.addForm.areaName = '';
|
|
|
this.addForm.factoryId = '';
|
|
|
this.addForm.factoryName = '';
|
|
|
+ this.addForm.postName ='' ;
|
|
|
+ this.addForm.postId = '';
|
|
|
},
|
|
|
// 关闭时清理表单
|
|
|
handleClose() {
|
|
|
@@ -1129,8 +1140,8 @@
|
|
|
this.addForm.teamId = '';
|
|
|
this.addForm.teamName = '';
|
|
|
this.addForm.executeIdList = [];
|
|
|
- this.addForm.productLineName = '';
|
|
|
- this.addForm.productLineId = '';
|
|
|
+ // this.addForm.productLineName = '';
|
|
|
+ // this.addForm.productLineId = '';
|
|
|
this.productLineList = [];
|
|
|
},
|
|
|
//选择部门(搜索)
|
|
|
@@ -1206,6 +1217,9 @@
|
|
|
this.addForm.deviceId = data.deviceId;
|
|
|
this.addForm.deviceName = data.deviceName;
|
|
|
this.addForm.deviceCode = data.deviceCode;
|
|
|
+ const deviceData= await getAssetInfo(data.deviceId)
|
|
|
+ this.addForm.postId=deviceData.postId
|
|
|
+ this.addForm.postName=deviceData.postName
|
|
|
this.addForm.associatedObject = 2;
|
|
|
}
|
|
|
|
|
|
@@ -1240,7 +1254,9 @@
|
|
|
this.addForm.deviceId = info.id;
|
|
|
this.addForm.deviceCode = info.code;
|
|
|
this.addForm.deviceName = info.name;
|
|
|
- this.addForm.detailList=[]
|
|
|
+ this.addForm.postId = info.postId;
|
|
|
+ this.addForm.postName = info.postName;
|
|
|
+ this.addForm.detailList = [];
|
|
|
}
|
|
|
},
|
|
|
// 添加
|
|
|
@@ -1301,14 +1317,13 @@
|
|
|
// );
|
|
|
// },
|
|
|
|
|
|
-
|
|
|
- handleAdd(row, index,type) {
|
|
|
+ handleAdd(row, index, type) {
|
|
|
this.currentRow = row;
|
|
|
this.currentIndex = index;
|
|
|
- if (type=='substanceName') {
|
|
|
- if( !this.addForm.deviceId){
|
|
|
- this.$message.error('请选择主设备!')
|
|
|
- return
|
|
|
+ if (type == 'substanceName') {
|
|
|
+ if (!this.addForm.deviceId) {
|
|
|
+ this.$message.error('请选择主设备!');
|
|
|
+ return;
|
|
|
}
|
|
|
this.$refs.bindSubstanceRef.open(
|
|
|
this.addForm.deviceId,
|
|
|
@@ -1377,7 +1392,7 @@
|
|
|
},
|
|
|
// 清空工具
|
|
|
clearTool(row, index) {
|
|
|
- if (type=='substanceName') {
|
|
|
+ if (type == 'substanceName') {
|
|
|
substanceKey.forEach((key) => {
|
|
|
this.$set(this.addForm.details[index], key, '');
|
|
|
});
|
|
|
@@ -1526,21 +1541,21 @@
|
|
|
(item) => item.id === this.addForm.teamId
|
|
|
);
|
|
|
this.addForm.teamName = currentTeam.name;
|
|
|
- if (!init) {
|
|
|
- this.addForm.productLineName = '';
|
|
|
- this.addForm.productLineId = '';
|
|
|
- }
|
|
|
- this.productLineList = [];
|
|
|
- currentTeam.factoryWorkstationVOList.forEach((item) => {
|
|
|
- if (
|
|
|
- !this.productLineList.find((p) => p.id === item.productionLineId)
|
|
|
- ) {
|
|
|
- this.productLineList.push({
|
|
|
- name: item.productionLineName,
|
|
|
- id: item.productionLineId
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
+ // if (!init) {
|
|
|
+ // this.addForm.productLineName = '';
|
|
|
+ // this.addForm.productLineId = '';
|
|
|
+ // }
|
|
|
+ // this.productLineList = [];
|
|
|
+ // currentTeam.factoryWorkstationVOList.forEach((item) => {
|
|
|
+ // if (
|
|
|
+ // !this.productLineList.find((p) => p.id === item.productionLineId)
|
|
|
+ // ) {
|
|
|
+ // this.productLineList.push({
|
|
|
+ // name: item.productionLineName,
|
|
|
+ // id: item.productionLineId
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
|
|
|
// if (currentTeam) {
|
|
|
// // 同步执行人
|