4.11
This commit is contained in:
bovenliggende
7f504e5cdd
commit
5ccb9297e1
@ -76,10 +76,6 @@ export default {
|
||||
name: this.chartData[i].objName + this.chartData[i].objCode,
|
||||
type: 'bar',
|
||||
barMaxWidth: 20,
|
||||
label: {
|
||||
show: true,
|
||||
position: 'top',
|
||||
},
|
||||
data: [],
|
||||
};
|
||||
legendData.push(this.chartData[i].objName + this.chartData[i].objCode);
|
||||
|
@ -68,9 +68,9 @@ export default {
|
||||
|
||||
var option = {
|
||||
color: ['#288AFF'],
|
||||
// tooltip: {
|
||||
// trigger: 'axis'
|
||||
// },
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
},
|
||||
grid: {
|
||||
left: '4%',
|
||||
right: '1%',
|
||||
|
@ -57,8 +57,10 @@ export default {
|
||||
let listObj = { useNum: '消耗量' }; // 数据
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
let obj = {};
|
||||
let fName = arr[i].time.slice(0, 4);
|
||||
let lName = arr[i].time.slice(4, 6);
|
||||
obj.prop = arr[i].time;
|
||||
obj.label = arr[i].time;
|
||||
obj.label = fName + ' 第 ' + lName + ' 周';
|
||||
obj.minWidth = 100;
|
||||
tempX.push(obj);
|
||||
listObj[arr[i].time] = arr[i].useNum || null;
|
||||
|
@ -45,6 +45,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button
|
||||
v-show="!isEdit"
|
||||
class="addButton"
|
||||
icon="el-icon-plus"
|
||||
@click="emitButtonClick">
|
||||
@ -70,6 +71,13 @@ export default {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
isEdit: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
default: () => {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
|
@ -42,6 +42,7 @@
|
||||
<add-table
|
||||
:table-data="tableData"
|
||||
:table-name-list="tableNameList"
|
||||
:isEdit="isEdit"
|
||||
@emitFun="inputChange"
|
||||
@emitButtonClick="emitButtonClick" />
|
||||
</el-col>
|
||||
|
@ -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 = []; // 递归时操作的数组
|
||||
|
Laden…
Verwijs in nieuw issue
Block a user