综合查询相关接口不再使用中文categoryName统一使用deviceCategory

This commit is contained in:
白菜
2025-10-16 16:10:29 +08:00
parent fb0eda4565
commit f4e6821484
14 changed files with 130 additions and 141 deletions

View File

@ -75,9 +75,7 @@
class="pointer"
@click="
showChart(
scope.row.pointName,
scope.row.deviceName,
scope.row.deviceId
scope.row
)
"
>{{ scope.row.pointValue }}</span
@ -118,7 +116,7 @@ export default {
if (!val) {
this.tableData = [];
this.deviceId = "";
this.deviceName = "";
this.parentId='';
this.siteId = "";
this.pageSize = 10;
this.pageNum = 1;
@ -135,6 +133,11 @@ export default {
}
},
},
computed:{
isDtdc(){
return this.deviceCategory === 'BATTERY'
}
},
data() {
return {
// 默认排序
@ -150,8 +153,8 @@ export default {
upper: "", //
},
deviceCategory: "",
deviceName: "",
deviceId: "",
parentId:'',
siteId: "",
tableData: [],
pageSize: 10, //分页栏当前每个数据总数
@ -160,10 +163,12 @@ export default {
};
},
methods: {
showChart(pointName, deviceName, deviceId) {
console.log("点击查询图表", pointName, deviceName, deviceId);
pointName &&
this.$refs.pointChart.showChart({ pointName, deviceName, deviceId });
showChart({pointName}) {
if(pointName){
const {deviceCategory,deviceId}=this
if(this.isDtdc) this.$refs.pointChart.showChart({ pointName, deviceCategory, deviceId:this.parentId,child:[deviceId] });
else this.$refs.pointChart.showChart({ pointName, deviceCategory, deviceId });
}
},
handleSortChange(column) {
this.form.sortData = column.prop
@ -175,11 +180,11 @@ export default {
this.pageNum = 1;
this.getData();
},
showTable({ deviceCategory, siteId, deviceId, deviceName }) {
showTable({ deviceCategory, siteId, deviceId ,parentId=''}) {
this.deviceCategory = deviceCategory;
this.siteId = siteId;
this.deviceId = deviceId;
this.deviceName = deviceName;
this.parentId=deviceCategory === 'BATTERY' ? parentId : ''//只有单体电池需要这个值
this.show = true;
this.getData();
},
@ -189,6 +194,7 @@ export default {
siteId,
deviceId,
deviceCategory,
parentId,
pageNum,
pageSize,
form: {
@ -204,6 +210,7 @@ export default {
siteId,
deviceId,
deviceCategory,
parentDeviceId: parentId,
pageNum,
pageSize,
sortData,