ソースを参照

哨兵详情接口优化与参数传递

彭宇 3 週間 前
コミット
84cb02efaf
2 ファイル変更5 行追加5 行削除
  1. 2 2
      src/api/sentinel.js
  2. 3 3
      src/views/SenEquipmentCenter.vue

+ 2 - 2
src/api/sentinel.js

@@ -17,9 +17,9 @@ export function selectBrandList() {
 }
 
 // 查询哨兵设备统计详情
-export function selectDailyThreshold(id) {
+export function selectDailyThreshold(deviceCode) {
   return request({
-    url: `/center-monitor/device/selectDailyThreshold/${id}`,
+    url: `/center-monitor/device/selectDailyThreshold/${deviceCode}`,
     method: 'get'
   })
 }

+ 3 - 3
src/views/SenEquipmentCenter.vue

@@ -75,7 +75,7 @@
 					<p>设备监测指标:{{ detailInfo.threshold || '--' }}</p>
 					<p>品牌:{{ detailInfo.brand || '--' }}</p>
 					<p>所在街道:{{ detailInfo.address || '--' }}</p>
-					<p>历史数值:<a  @click="toggleDisplay(detailInfo.id)">详情</a></p>
+					<p>历史数值:<a  @click="toggleDisplay(detailInfo.deviceCode)">详情</a></p>
 				</div>
 				<div class="tk2 tk_bor"  v-if="isVisible" style="position: absolute;width: 466px;height: 455px;left: 98%;">
 					<h1>哨兵详情</h1>
@@ -270,10 +270,10 @@
 					this.$refs.supermap.removeAllviewer(mapDeptId, -1);
 				});
 			},
-			toggleDisplay(id) {
+			toggleDisplay(deviceCode) {
 				this.isVisible = !this.isVisible; // 点击按钮时切换isVisible的值
 				if(this.isVisible){
-					selectDailyThreshold(id).then(res => {
+					selectDailyThreshold(deviceCode).then(res => {
 						this.initChart(res.data)
 					})
 				}