This commit is contained in:
2026-02-15 16:24:29 +08:00
parent 50c72d6989
commit 41a3ab45b3
36 changed files with 4896 additions and 2089 deletions

View File

@ -110,6 +110,11 @@
sortable="custom"
>
</el-table-column>
<el-table-column v-if="selectable" label="操作" width="90" align="center">
<template slot-scope="scope">
<el-button type="text" size="mini" @click="selectPoint(scope.row)">选择</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
v-show="tableData.length > 0"
@ -147,6 +152,7 @@ export default {
this.pageNum = 1;
this.totalSize = 0;
this.dataType = '';
this.selectable = false;
this.form = {
sortMethod: "desc", //升序不传或者asc、降序desc
sortData: this.defaultSort.prop,
@ -191,9 +197,14 @@ export default {
pageSize: 10, //分页栏当前每个数据总数
pageNum: 1, //分页栏当前页数
totalSize: 0, //table表格数据总数
selectable: false
};
},
methods: {
selectPoint(row) {
this.$emit('select-point', row || {})
this.show = false
},
showChart({pointName}) {
if (pointName) {
const {deviceCategory, deviceId} = this;
@ -235,12 +246,13 @@ export default {
this.getData()
});
},
showTable({deviceCategory, siteId, deviceId, parentId = ""}, dataType) {
showTable({deviceCategory, siteId, deviceId, parentId = ""}, dataType, options = {}) {
this.dataType = dataType;
this.deviceCategory = deviceCategory;
this.siteId = siteId;
this.deviceId = deviceId;
this.parentId = deviceCategory === "BATTERY" ? parentId : ""; //只有单体电池需要这个值
this.selectable = !!options.selectable
this.show = true;
this.getData()
},