bug --
This commit is contained in:
@@ -379,7 +379,7 @@ export default {
|
||||
});
|
||||
this.searchBarFormConfig[1].selectOptions = plcList.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
name: item.code,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
@@ -463,7 +463,8 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = '添加设备与实时采集关系表(一对多)';
|
||||
this.title = '添加设备采集配置';
|
||||
this.$refs.addOrUpdate.init()
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@@ -472,7 +473,7 @@ export default {
|
||||
getEquipmentPlcConnect(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = '修改设备与实时采集关系表(一对多)';
|
||||
this.title = '修改设备采集配置';
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2024-02-22 10:08:13
|
||||
* @LastEditTime: 2024-03-13 16:47:02
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@@ -39,9 +39,9 @@
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../../../core/mixins/basic-add';
|
||||
import { createCorePL, updateCorePL, getCorePL, getCode, getCorePLList } from "@/api/base/coreProductionLine";
|
||||
import { createCorePL, updateCorePL, getCorePL, getCode } from "@/api/base/coreProductionLine";
|
||||
import { createEquipmentPlcConnect, updateEquipmentPlcConnect } from '@/api/base/equipmentPlcConnect';
|
||||
import { getplcAllList, listByParentId } from "@/api/equipment/base/config/config";
|
||||
import { getplcAllList, getTree } from "@/api/equipment/base/config/config";
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
@@ -95,22 +95,29 @@ export default {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
},
|
||||
async getDict() {
|
||||
// 关联表名列表
|
||||
const res = await getplcAllList();
|
||||
this.plcList = res.data;
|
||||
// 产线列表
|
||||
const res1 = await getCorePLList();
|
||||
// 树形结构
|
||||
const res1 = await getTree();
|
||||
this.plLineList = res1.data;
|
||||
this.plLineList.forEach(item => {
|
||||
listByParentId({ id: item.id }).then(resp => {
|
||||
if (resp.data.length > 0) {
|
||||
// item.children = resp.data
|
||||
this.$set(item, 'children', resp.data)
|
||||
// this.$forceUpdate()
|
||||
}
|
||||
})
|
||||
})
|
||||
// const res1 = await getCorePLList();
|
||||
// this.plLineList = res1.data;
|
||||
// this.plLineList.forEach(item => {
|
||||
// listByParentId({ id: item.id }).then(resp => {
|
||||
// if (resp.data.length > 0) {
|
||||
// // item.children = resp.data
|
||||
// this.$set(item, 'children', resp.data)
|
||||
// // this.$forceUpdate()
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
|
||||
Reference in New Issue
Block a user