diff --git a/src/api/iot/project_new.js b/src/api/iot/project_new.js index 09393d91..59a60780 100644 --- a/src/api/iot/project_new.js +++ b/src/api/iot/project_new.js @@ -145,3 +145,21 @@ export function projectElectricityTable(query) { params: query }); } + +// 查询 漏电流 图表 +export function projectLeakageChart(query) { + return request({ + url: "/iot/project/monitor/leakageTable", + method: "get", + params: query + }); +} + +// 查询 漏电流 列表 +export function projectLeakageTable(query) { + return request({ + url: "/iot/project/monitor/leakageList", + method: "get", + params: query + }); +} diff --git a/src/api/iot/site.js b/src/api/iot/site.js new file mode 100644 index 00000000..02d017f2 --- /dev/null +++ b/src/api/iot/site.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' +import { preventRepeatFu } from "@/utils/hciot"; + +// 查询站点监控列表 +export function listSite(query) { + return request({ + url: '/monitor/site/list', + method: 'get', + params: query + }) +} + +// 查询站点监控详细 +export function getSite(siteId) { + return request({ + url: '/monitor/site/' + siteId, + method: 'get' + }) +} + +// 新增站点监控 +export function addSite(data) { + preventRepeatFu(true) + return request({ + url: '/monitor/site', + method: 'post', + data: data + }) +} + +// 修改站点监控 +export function updateSite(data) { + preventRepeatFu(true) + return request({ + url: '/monitor/site', + method: 'put', + data: data + }) +} + +// 删除站点监控 +export function delSite(siteId) { + return request({ + url: '/monitor/site/' + siteId, + method: 'delete' + }) +} + +// 实时监控树形 +export function siteTree(data) { + return request({ + url: '/monitor/site/tree', + method: 'get', + params: data + }) +} diff --git a/src/components/Echarts/EEchartsBar.vue b/src/components/Echarts/EEchartsBar.vue index ecd4bbc4..12d7b6a5 100644 --- a/src/components/Echarts/EEchartsBar.vue +++ b/src/components/Echarts/EEchartsBar.vue @@ -37,6 +37,7 @@ export default { methods: { updateEchart() { if (this.chart) { + this.chart.dispose(); this.chart = null; } this.drawBar(); @@ -46,6 +47,7 @@ export default { this.chart = echarts.init(document.getElementById(this.eId)); } this.chart.setOption(this.option); + this.chart.resize(); } }, watch: { diff --git a/src/components/Echarts/EEchartsLine.vue b/src/components/Echarts/EEchartsLine.vue index 65c5fb46..755471bf 100644 --- a/src/components/Echarts/EEchartsLine.vue +++ b/src/components/Echarts/EEchartsLine.vue @@ -37,6 +37,7 @@ export default { methods: { updateEchart() { if (this.chart) { + this.chart.dispose(); this.chart = null; } this.drawLine(); @@ -46,6 +47,7 @@ export default { this.chart = echarts.init(document.getElementById(this.eId)); } this.chart.setOption(this.option); + this.chart.resize(); } }, watch: { diff --git a/src/config/dvr.config.js b/src/config/dvr.config.js new file mode 100644 index 00000000..f8658196 --- /dev/null +++ b/src/config/dvr.config.js @@ -0,0 +1,10 @@ + +export const serviceApi = { + v3: '/api/gb28181/', + v4: '/gb28181/api/' +} + +export const serviceApiDesc = { + v3: 'V3', + v4: 'V4' +} diff --git a/src/utils/latlngFromAddress.js b/src/utils/latlngFromAddress.js index 2eba4b47..95224594 100644 --- a/src/utils/latlngFromAddress.js +++ b/src/utils/latlngFromAddress.js @@ -11,7 +11,7 @@ var initMap = (address) => { var gjzCode = (address, _this, type) => { // AMap.service(["AMap.PlaceSearch"], function() { // //构造地点查询类 - // var placeSearch = new AMap.PlaceSearch({ + // var placeSearch = new AMap.PlaceSearch({ // pageSize: 1, // 单页显示结果条数 // pageIndex: 1, // 页码 // panel: "panel", // 结果列表将在此容器中进行展示。 @@ -20,7 +20,7 @@ var gjzCode = (address, _this, type) => { // //关键字查询 // placeSearch.search('address'); // }); - AMap.plugin('AMap.PlaceSearch', function(){ + AMap.plugin('AMap.PlaceSearch', function(){ var autoOptions = { city: '0591' } @@ -36,7 +36,7 @@ var gjzCode = (address, _this, type) => { }) }) - + } // 根据地址返回高德地图经纬度 var geoCode = (address, _this, type) => { @@ -70,4 +70,4 @@ export { geoCode, regeoCode, gjzCode -} \ No newline at end of file +} diff --git a/src/views/iot/project/profileV2/AlarmManage/index.vue b/src/views/iot/project/profileV2/AlarmManage/index.vue index 00cf412f..4e9dd8ac 100644 --- a/src/views/iot/project/profileV2/AlarmManage/index.vue +++ b/src/views/iot/project/profileV2/AlarmManage/index.vue @@ -118,7 +118,7 @@ width="150" prop="recordId" > -