Commit 8d2d798e authored by yaqizhang's avatar yaqizhang

添加单位,解决冲突

parents e2bbaee9 777f4375
......@@ -91,6 +91,22 @@ public class TDeviceReportDataController extends BaseController
return AjaxResult.success(deviceReportDataVo);
}
/**
* 地图弹窗获取设备监控数据详细信息
*/
@GetMapping(value = "getWindowData/{deviceId}")
public AjaxResult getWindowData(@PathVariable("deviceId") int deviceId) throws Exception
{
TDeviceReportData deviceReportData = null;
try {
deviceReportData = tDeviceReportDataService.selectWindowDataByDeviceId(deviceId);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("地图弹窗获取设备监控数据详细信息失败");
}
return AjaxResult.success(deviceReportData);
}
/**
* 新增设备监控
*/
......
......@@ -23,6 +23,14 @@ public interface ITDeviceReportDataService
*/
public DeviceReportDataVo selectTDeviceReportDataByDeviceId(int deviceId) throws Exception;
/**
* 地图弹窗获取实时数据
*
* @param deviceId 设备ID
* @return 设备监控
*/
public TDeviceReportData selectWindowDataByDeviceId(int deviceId) throws Exception;
/**
* 查询设备监控列表
*
......
......@@ -61,6 +61,21 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
return deviceReportDataVo;
}
/**
* 查询设备监控
*
* @param deviceId 设备ID
* @return 设备监控
*/
@Override
public TDeviceReportData selectWindowDataByDeviceId(int deviceId) throws Exception
{
TDeviceInfo tDeviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(deviceId);
TDeviceReportData tDeviceReportData = tDeviceReportDataMapper.selectTDeviceReportDataByDeviceNum(tDeviceInfo.getIotNo());
return tDeviceReportData;
}
/**
* 查询设备监控列表
*
......
......@@ -19,9 +19,17 @@ export function realtimeData(query) {
}
// 查询设备监控详细
export function getData(deviceReportDataId) {
export function getData(deviceId) {
return request({
url: '/dataMonitoring/reportData/' + deviceReportDataId,
url: '/dataMonitoring/reportData/' + deviceId,
method: 'get'
})
}
// 查询设备监控详细
export function getWindowData(deviceId) {
return request({
url: '/dataMonitoring/reportData/getWindowData/' + deviceId,
method: 'get'
})
}
......
......@@ -141,7 +141,7 @@
<script>
let closeInfoWindowTimer = null;
import { realtimeData, getData } from "@/api/dataMonitoring/reportData";
import { getWindowData } from "@/api/dataMonitoring/reportData";
import moment from "moment";
//line移入时的的infowindow
export default {
......
......@@ -157,8 +157,8 @@
</template>
<script>
let closeInfoWindowTimer;
import { realtimeData, getData } from "@/api/dataMonitoring/reportData";
let closeInfoWindowTimer = null;
import { getWindowData } from "@/api/dataMonitoring/reportData";
import moment from "moment";
//line移入时的的infowindow
export default {
......@@ -166,7 +166,6 @@
obj: { typs: Object },
title: "",
data: {},
// realtime:{},
map: null,
},
data() {
......@@ -209,7 +208,7 @@
methods: {
moment,
getDataid() {
getData(this.data.deviceId).then(response => {
getWindowData(this.data.deviceId).then(response => {
this.changeValue(response.data)
})
......@@ -479,4 +478,4 @@
display: flex;
justify-content: space-between;
}
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment