4.11
This commit is contained in:
@@ -66,7 +66,7 @@
|
||||
placeholder="请选择"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in getDictDatas(DICT_TYPE.TABLE_NAME)"
|
||||
v-for="item in tableNameList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
@@ -154,6 +154,7 @@ import {
|
||||
createEnergyLimit,
|
||||
getEnergyParamList,
|
||||
} from '@/api/monitoring/energyLimit';
|
||||
import { energyTableGet } from '@/api/base/energyQuantityManual';
|
||||
export default {
|
||||
name: 'energyLimitAdd',
|
||||
props: {
|
||||
@@ -203,6 +204,7 @@ export default {
|
||||
{ required: true, message: '指标类型不能为空', trigger: 'change' },
|
||||
],
|
||||
},
|
||||
tableNameList: [],
|
||||
detailList: [],
|
||||
};
|
||||
},
|
||||
@@ -267,11 +269,22 @@ export default {
|
||||
}
|
||||
},
|
||||
toggleType() {
|
||||
if (this.form.energyTypeId && this.form.type) {
|
||||
this.getDetailList();
|
||||
this.form.plcParamId = '';
|
||||
if (this.form.energyTypeId && this.form.method == 2) {
|
||||
this.form.tableName = '';
|
||||
this.getTableNameList(this.form.energyTypeId);
|
||||
}
|
||||
},
|
||||
// 获取能源表名list
|
||||
getTableNameList(id) {
|
||||
energyTableGet({ energyTypeId: id }).then((res) => {
|
||||
this.tableNameList = res.data.tableObjs || [];
|
||||
if (this.tableNameList.length === 0) {
|
||||
this.$modal.msgWarning(
|
||||
'当前能源类型暂无配置表名,请先到《表名配置》页面配置'
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 递归处理分类回显问题
|
||||
changeDetSelect(key, treeData) {
|
||||
let arr = []; // 递归时操作的数组
|
||||
|
||||
Reference in New Issue
Block a user