This commit is contained in:
朱菊兰 2024-04-11 11:18:08 +08:00
父節點 7f504e5cdd
當前提交 5ccb9297e1
共有 6 個文件被更改,包括 32 次插入12 次删除

查看文件

@ -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 = []; //