diff --git a/main.js b/main.js index f7188fc..90df911 100644 --- a/main.js +++ b/main.js @@ -9,7 +9,8 @@ import { Vue.config.productionTip = false uni.$http = $http // $http.baseUrl = 'http://223.75.53.141:83' -$http.baseUrl = 'http://local.gunshiiot.com:18083' +// $http.baseUrl = 'http://local.gunshiiot.com:18083' +$http.baseUrl = 'http://192.168.66.27:24105' // 请求拦截器 $http.beforeRequest = function (options) { if (options.url.indexOf('/doLogin') == -1) { diff --git a/pages.json b/pages.json index dc160d1..866e480 100644 --- a/pages.json +++ b/pages.json @@ -56,6 +56,12 @@ "style": { "navigationBarTitleText": "" } + }, + { + "path": "pages/newAqjc/index", + "style": { + "navigationBarTitleText": "" + } }, { "path": "pages/homeIndex/index", diff --git a/pages/aqjc/index.vue b/pages/aqjc/index.vue index e95f175..b145c06 100644 --- a/pages/aqjc/index.vue +++ b/pages/aqjc/index.vue @@ -1,11 +1,11 @@ @@ -49,11 +53,13 @@ import SlTable from "./slTable.vue"; import ZwyTable from "./zwyTable.vue"; import ZsyTable from "./zsyTable.vue"; +import ByTable from "./byTable.vue"; export default { components: { SlTable, ZwyTable, ZsyTable, + ByTable }, data() { return { @@ -62,7 +68,9 @@ export default { zsyData: [], //主坝渗压监测 sdData: [], //发电洞渗压监测 fbData: [], //副坝渗压监测 + byData:[], name: "", + deviceId:"" }; }, methods: { @@ -97,6 +105,19 @@ export default { uni.$showMsg(); } }, + + async getByData() { + try { + const { data } = await uni.$http.get( + `/gunshiApp/tsg/termite/survey/listNewData?deviceId=${this.deviceId}` + ); + if (data.code == 200) { + this.byData = data.data; + } + } catch (error) { + uni.$showMsg(); + } + }, async getZwyData() { try { const { data } = await uni.$http.get( @@ -171,9 +192,11 @@ export default { this.getSlData(); this.getZwyData(); this.getzsyData(); + this.getByData(); }, onLoad(options) { this.name = options.name; + this.deviceId = options.deviceId || ''; }, }; diff --git a/pages/zhjs/subnvue/index.nvue b/pages/zhjs/subnvue/index.nvue index 3c3bab4..98cdea9 100644 --- a/pages/zhjs/subnvue/index.nvue +++ b/pages/zhjs/subnvue/index.nvue @@ -37,9 +37,9 @@ 监视对象 - + + style="display: flex; align-items: center; margin-right: 5px; margin-top:5px"> {{item.name}} @@ -114,6 +114,10 @@ 1: '/static/tabs/zweiyi1.png', 2: "/static/tabs/zweiyi2.png" }, + "白蚁监测": { + 1: '/static/tabs/baiyi1.png', + 2: "/static/tabs/baiyi2.png" + }, } export default { data() { @@ -261,7 +265,8 @@ map: null, windowHeight: 0, windowHeight: 0, - watchObj: [{ + watchObj: [ + { icon1: "/static/tabs/shuiku1.png", icon2: "/static/tabs/shuiku2.png", name: "水库工程", @@ -287,7 +292,6 @@ showIcon: "/static/tabs/shuiyu2.png", textColor: "#02a7f0", isSelected3: true, - }, { icon1: "/static/tabs/sxt1.png", @@ -297,6 +301,15 @@ showIcon: "/static/tabs/sxt2.png", textColor: "#02a7f0", isSelected4: true, + }, + { + icon1: "/static/tabs/baiyi1.png", + icon2: "/static/tabs/baiyi2.png", + name: "白蚁监测", + id: 5, + showIcon: "/static/tabs/baiyi2.png", + textColor: "#02a7f0", + isSelected5: true, } ] } @@ -359,6 +372,8 @@ url='/pages/skInfo/detail/index?value=2&key=2' }else if(type == "副坝位移"){ url=`/pages/sjc/index?name=副坝位移监测` + }else if(type == "白蚁监测"){ + url=`/pages/sjc/index?name=白蚁监测&deviceId=${data.id}` } uni.navigateTo({url}) }, @@ -483,6 +498,33 @@ uni.$showMsg(); } }, + + // 获取白蚁监测点 + async getByList() { + try { + const { + data + } = await uni.$http.get("/gunshiApp/tsg/termite/survey/list/byDevice") + if (data.code == 200) { + const byList = data.data.map(item => ({ + ...item, + latitude: wgs84ToGcj02(item.lon,item.lat)[1], + longitude: wgs84ToGcj02(item.lon,item.lat)[0], + iconPath: '/static/tabs/baiyi1.png', + width: 15, + height: 15, + title: item.name, + pointType: "白蚁监测", + name: "白蚁监测", + // joinCluster:true + })) + console.log("byList",byList) + this.markers = [...this.markers, ...byList] + } + } catch (error) { + uni.$showMsg(); + } + }, }, computed: { marker() { @@ -496,6 +538,7 @@ mounted() { this.getVideoList(); this.getRainList(); + this.getByList(); } } diff --git a/static/tabs/baiyi1.png b/static/tabs/baiyi1.png new file mode 100644 index 0000000..952b6c4 Binary files /dev/null and b/static/tabs/baiyi1.png differ diff --git a/static/tabs/baiyi2.png b/static/tabs/baiyi2.png new file mode 100644 index 0000000..a969883 Binary files /dev/null and b/static/tabs/baiyi2.png differ