综合查询相关接口不再使用中文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

@ -10,7 +10,7 @@
append-to-body
width="1000px"
class="ems-dialog"
:before-close="handleColsed"
:before-close="handleClosed"
>
<el-card
shadow="always"
@ -50,14 +50,14 @@ export default {
},
computed: {
isDtdc() {
return this.categoryName === "单体电池";
return this.deviceCategory === "BATTERY";
},
},
watch: {
show(val) {
if (!val) {
this.pointName = "";
this.categoryName = "";
this.deviceCategory = "";
this.deviceId = "";
this.dataUnit = 1;
this.child = "";
@ -88,15 +88,15 @@ export default {
dataRange: [],
child: "", //单体电池需要数据
pointName: "",
categoryName: "",
deviceCategory: "",
deviceId: "",
};
},
methods: {
showChart({ pointName, categoryName, deviceId, child = "" }) {
showChart({ pointName, deviceCategory, deviceId, child = "" }) {
//初始化数据
this.pointName = pointName;
this.categoryName = categoryName;
this.deviceCategory = deviceCategory;
this.deviceId = deviceId;
child && (this.child = child);
this.show = true;
@ -123,7 +123,7 @@ export default {
dataRange: [start = "", end = ""],
child,
deviceId,
categoryName,
deviceCategory,
pointName,
} = this;
let siteDeviceMap = {};
@ -146,7 +146,7 @@ export default {
siteIds: [siteId],
deviceId,
dataUnit,
categoryName,
deviceCategory,
pointName,
startDate,
endDate,
@ -170,9 +170,9 @@ export default {
dataset.push({
name: `${
this.isDtdc
? `${inner.parentDeviceId ? inner.parentDeviceId + "-" : ""}`
: ""
}${this.isDtdc ? inner.deviceId : this.pointName}`,
? `${inner.parentDeviceId ? inner.parentDeviceId + "-" : ""}${inner.deviceId}`
: `${inner.deviceId}`
}`,
type: "line",
xdata: [],
data: [],
@ -228,7 +228,7 @@ export default {
this.dataRange = val || [];
this.getDate();
},
handleColsed(done) {
handleClosed(done) {
if (!this.chart) {
return done();
}

View File

@ -20,7 +20,7 @@
<div class="descriptions-main descriptions-main-bg-color">
<el-descriptions direction="vertical" :column="3" :colon="false">
<el-descriptions-item labelClassName="descriptions-label" contentClassName="descriptions-direction" v-for="(item,index) in infoData" :key="index+'pcsInfoData'" :span="1" :label="item.label">
<span class="pointer" @click="showChart(item.pointName || '','电池簇',baseInfo.deviceId)">
<span class="pointer" @click="showChart(item.pointName || '',baseInfo.deviceId)">
{{baseInfo[item.attr] | formatNumber}} <span v-if="item.unit" v-html="item.unit"></span>
</span>
</el-descriptions-item>
@ -30,7 +30,7 @@
<div class="process-line-bg">
<div class="process-line" :style="{height:baseInfo.currentSoc+'%'}"></div>
</div>
<div class="process pointer" @click="showChart( '当前SOC','电池簇',baseInfo.deviceId)">当前SOC : {{baseInfo.currentSoc}}%</div>
<div class="process pointer" @click="showChart( '当前SOC',baseInfo.deviceId)">当前SOC : {{baseInfo.currentSoc}}%</div>
</div>
</div>
<el-table
@ -50,14 +50,14 @@
label="单体平均值"
>
<template slot-scope="scope">
<span class="pointer" @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],'电池簇',baseInfo.deviceId)">{{scope.row.avgData}}</span>
<span class="pointer" @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],baseInfo.deviceId)">{{scope.row.avgData}}</span>
</template>
</el-table-column>
<el-table-column
prop="minData"
label="单体最小值">
<template slot-scope="scope">
<span class="pointer" @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],'电池簇',baseInfo.deviceId)">{{scope.row.minData}}</span>
<span class="pointer" @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],baseInfo.deviceId)">{{scope.row.minData}}</span>
</template>
</el-table-column>
<el-table-column
@ -68,7 +68,7 @@
prop="maxData"
label="单体最大值">
<template slot-scope="scope">
<span class="pointer " @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],'电池簇',baseInfo.deviceId)">{{scope.row.maxData}}</span>
<span class="pointer " @click="showChart( tablePointNameMap[scope.row.dataName+scope.column.label],baseInfo.deviceId)">{{scope.row.maxData}}</span>
</template>
</el-table-column>
<el-table-column
@ -127,9 +127,8 @@ export default {
}
},
methods:{
showChart(pointName,categoryName,deviceId){
console.log('点击查询图表',pointName,categoryName,deviceId)
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'CLUSTER',deviceId})
},
updateData(){
this.loading = true

View File

@ -47,26 +47,26 @@
label="簇电压"
>
<template slot-scope="scope">
<span class="pointer" @click="showChart('簇电压','电池簇',scope.row.clusterId)">{{scope.row.clusterVoltage}} V</span>
<span class="pointer" @click="showChart('簇电压',scope.row.clusterId)">{{scope.row.clusterVoltage}} V</span>
</template>
</el-table-column>
<el-table-column
label="簇电流">
<template slot-scope="scope">
<span class="pointer" @click="showChart('簇电流','电池簇',scope.row.clusterId)">{{scope.row.clusterCurrent}} A</span>
<span class="pointer" @click="showChart('簇电流',scope.row.clusterId)">{{scope.row.clusterCurrent}} A</span>
</template>
</el-table-column>
<el-table-column
label="簇SOC">
<template slot-scope="scope">
<span class="pointer" @click="showChart('当前SOC','电池簇',scope.row.clusterId)">{{scope.row.currentSoc}} %</span>
<span class="pointer" @click="showChart('当前SOC',scope.row.clusterId)">{{scope.row.currentSoc}} %</span>
</template>
</el-table-column>
<el-table-column
label="单体最高电压"
prop="maxVoltage">
<template slot-scope="scope">
<span class="pointer" @click="showChart('最高单体电压','电池簇',scope.row.clusterId)">{{scope.row.maxCellVoltage}} V</span>
<span class="pointer" @click="showChart('最高单体电压',scope.row.clusterId)">{{scope.row.maxCellVoltage}} V</span>
</template>
</el-table-column>
<el-table-column
@ -77,7 +77,7 @@
label="单体最低电压"
prop="minVoltage">
<template slot-scope="scope">
<span class="pointer" @click="showChart('最低单体电压','电池簇',scope.row.clusterId)">{{scope.row.minCellVoltage}} V</span>
<span class="pointer" @click="showChart('最低单体电压',scope.row.clusterId)">{{scope.row.minCellVoltage}} V</span>
</template>
</el-table-column>
<el-table-column
@ -87,7 +87,7 @@
<el-table-column
label="单体最高温度">
<template slot-scope="scope">
<span class="pointer" @click="showChart('最高单体温度','电池簇',scope.row.clusterId)">{{scope.row.maxCellTemp}} &#8451;</span>
<span class="pointer" @click="showChart('最高单体温度',scope.row.clusterId)">{{scope.row.maxCellTemp}} &#8451;</span>
</template>
</el-table-column>
<el-table-column
@ -98,7 +98,7 @@
label="单体最低温度"
prop="minTemperature">
<template slot-scope="scope">
<span class="pointer" @click="showChart('最低单体温度','电池簇',scope.row.clusterId)">{{scope.row.minCellTemp}} &#8451;</span>
<span class="pointer" @click="showChart('最低单体温度',scope.row.clusterId)">{{scope.row.minCellTemp}} &#8451;</span>
</template>
</el-table-column>
<el-table-column
@ -141,9 +141,8 @@ export default {
}
},
methods:{
showChart(pointName,categoryName,deviceId){
console.log('点击查询图表',pointName,categoryName,deviceId)
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'STACK',deviceId})
},
updateData(){
this.loading = true

View File

@ -25,7 +25,7 @@
</div>
<el-row>
<el-col v-for="(tempDataItem,tempDataIndex) in deviceIdTypeMsg[item.deviceId]" :key="tempDataIndex+'dbTempData'" :span="8">
<span class="pointer" @click="showChart(tempDataItem.pointName,item.deviceName,item.deviceId)">
<span class="pointer" @click="showChart(tempDataItem.pointName,item.deviceId)">
{{tempDataItem.name}}{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span>
</span>
</el-col>
@ -140,9 +140,8 @@ export default {
};
},
methods: {
showChart(pointName,categoryName,deviceId){
console.log('点击查询图表',pointName,categoryName,deviceId)
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'AMMETER',deviceId})
},
updateData(){
this.loading = true;

View File

@ -174,7 +174,7 @@ export default {
dataType &&
this.$refs.pointChart.showChart({
pointName: dataType,
categoryName: "单体电池",
deviceCategory:'BATTERY',
deviceId: clusterDeviceId,
child: [deviceId],
});

View File

@ -38,10 +38,10 @@ export default {
return this.zdDeviceCategoryOptions[this.siteId] || []
},
categoryRouter(){
const routeData =this.childrenRoute.filter(item=>this.locationSiteCategory.includes(item.meta.categoryName))
const routeData =this.childrenRoute.filter(item=>this.locationSiteCategory.includes(item.meta.deviceCategory))
if(this.siteId && routeData.length > 0 && this.locationSiteCategory && this.locationSiteCategory.length >1){
const locationPageCategoryName = this.$route.meta?.categoryName || ''
if(!routeData.some(item=> item.meta.categoryName===locationPageCategoryName)){
const locationPageDeviceCategory = this.$route.meta?.deviceCategory || ''
if(!routeData.some(item=> item.meta.deviceCategory===locationPageDeviceCategory)){
this.$router.replace({path:'/dzjk/sbjk/ssyx',query:this.$route.query})
}
}

View File

@ -100,7 +100,7 @@
<span
class="pointer"
@click="
showChart(item.pointName || '', 'PCS', pcsItem.deviceId)
showChart(item.pointName || '', pcsItem.deviceId)
"
>
{{ pcsItem[item.attr] | formatNumber }}
@ -136,7 +136,7 @@
>
<span
class="pointer"
@click="showChart('直流功率', 'PCS分支设备', item.deviceId)"
@click="showChart('直流功率', item.deviceId,true)"
>{{ item.dcPower }}kW</span
>
</el-descriptions-item>
@ -148,7 +148,7 @@
>
<span
class="pointer"
@click="showChart('直流电压', 'PCS分支设备', item.deviceId)"
@click="showChart('直流电压', item.deviceId,true)"
>{{ item.dcVoltage }}V</span
>
</el-descriptions-item>
@ -160,7 +160,7 @@
>
<span
class="pointer"
@click="showChart('直流电流', 'PCS分支设备', item.deviceId)"
@click="showChart('直流电流', item.deviceId,true)"
>{{ item.dcCurrent }}A</span
>
</el-descriptions-item>
@ -169,7 +169,6 @@
</el-card>
</div>
<el-empty v-show="pcsList.length <= 0" :image-size="200"></el-empty>
<!-- 电位图表 showChart({pointName:点位名称,categoryName:设备名称})-->
<point-chart ref="pointChart" :site-id="siteId" />
</div>
</template>
@ -270,10 +269,9 @@ export default {
};
},
methods: {
showChart(pointName, categoryName, deviceId) {
console.log("点击查询图表", pointName, categoryName, deviceId);
showChart(pointName, deviceId,isBranch=false) {
pointName &&
this.$refs.pointChart.showChart({ pointName, categoryName, deviceId });
this.$refs.pointChart.showChart({ pointName,deviceCategory:isBranch ? 'BRANCH' : 'PCS', deviceId });
},
//6个方块数据
getRunningHeadData() {

View File

@ -11,7 +11,7 @@
</div>
<el-row>
<el-col v-for="(tempDataItem,tempDataIndex) in tempData" :key="tempDataIndex+'ylTempData'" :span="8">
<span class="pointer" @click="showChart(tempDataItem.title,item.deviceName,item.deviceId)">
<span class="pointer" @click="showChart(tempDataItem.title,item.deviceId)">
{{tempDataItem.title}}{{item[tempDataItem.attr]}}<span v-html="tempDataItem.unit"></span>
</span>
</el-col>
@ -48,9 +48,8 @@ export default {
}
},
methods:{
showChart(pointName,deviceName,deviceId){
console.log('点击查询图表',pointName,deviceName,deviceId)
pointName && this.$refs.pointChart.showChart({pointName,deviceName,deviceId})
showChart(pointName,deviceId){
pointName && this.$refs.pointChart.showChart({pointName,deviceCategory:'COOLING',deviceId})
},
updateData(){
this.loading = true