|
@@ -25,8 +25,8 @@
|
|
<div class="card_center">
|
|
<div class="card_center">
|
|
<el-card class="box-card card_center1" style="padding:0 !important">
|
|
<el-card class="box-card card_center1" style="padding:0 !important">
|
|
<div class="map" style="height:45vh">
|
|
<div class="map" style="height:45vh">
|
|
- <!-- <iframe style="width:100%;height:100%;border:none;" src='https://www.thingjs.com/s/ef7ee6a73896c01bda77e679?params=105b0f77fd24654d4eebc434e9'></iframe> -->
|
|
|
|
- <!-- <iframe style="width:100%;height:100%;border:none;" src='https://www.thingjs.com/s/b11227d4fd5505106989737c?params=105b0f77fd24654d4eebc434e9'></iframe> -->
|
|
|
|
|
|
+ <!-- <iframe id="myIframe" style="width:100%;height:100%;border:none;" src='https://www.thingjs.com/s/ef7ee6a73896c01bda77e679?params=105b0f77fd24654d4eebc434e9'></iframe> -->
|
|
|
|
+ <iframe id="myIframe" style="width:100%;height:100%;border:none;" src='https://www.thingjs.com/s/b11227d4fd5505106989737c?params=105b0f77fd24654d4eebc434e9'></iframe>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</el-card>
|
|
</el-card>
|
|
@@ -278,6 +278,7 @@ import index2 from "./components/index/index2";
|
|
import index3 from "./components/index/index3";
|
|
import index3 from "./components/index/index3";
|
|
import index5 from "./components/index/index5";
|
|
import index5 from "./components/index/index5";
|
|
import axios from 'axios'
|
|
import axios from 'axios'
|
|
|
|
+axios.defaults.baseURL = "/api";
|
|
import $ from 'jquery'
|
|
import $ from 'jquery'
|
|
|
|
|
|
// import index6 from "./components/index/index6";
|
|
// import index6 from "./components/index/index6";
|
|
@@ -291,7 +292,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
title: "楼层展示",
|
|
title: "楼层展示",
|
|
- open: true,
|
|
|
|
|
|
+ open: false,
|
|
form: {},
|
|
form: {},
|
|
tableData: [{
|
|
tableData: [{
|
|
type: '火灾监控',
|
|
type: '火灾监控',
|
|
@@ -330,6 +331,8 @@ export default {
|
|
undetail: '38',
|
|
undetail: '38',
|
|
rate:'50%'
|
|
rate:'50%'
|
|
}],
|
|
}],
|
|
|
|
+ buildingStore:[],
|
|
|
|
+ top_level:'',
|
|
|
|
|
|
|
|
|
|
index1Data: [],//设备工况=>饼图
|
|
index1Data: [],//设备工况=>饼图
|
|
@@ -367,6 +370,9 @@ export default {
|
|
this.yhTable()
|
|
this.yhTable()
|
|
this.initWebSocket()
|
|
this.initWebSocket()
|
|
this.getBuild()
|
|
this.getBuild()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
|
@@ -377,44 +383,80 @@ export default {
|
|
cancel() {
|
|
cancel() {
|
|
this.open = false;
|
|
this.open = false;
|
|
},
|
|
},
|
|
|
|
+ draw_buinding(){
|
|
|
|
+ alert('运行大楼')
|
|
|
|
+ var _this=this;
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ _this.callFuncInThingJS('userListener', _this.buildingStore, _this.top_level, '10316') ;
|
|
|
|
+ },1000)
|
|
|
|
|
|
- getBuild() {
|
|
|
|
-
|
|
|
|
- // alert(1)
|
|
|
|
- const aa = { "V_LOGINNAME": "gxdmxxg", "V_PASSWORD": "gxdmxxg123", "COMPANY_CODE": "10316", "COMMSTATUS": "NO" }
|
|
|
|
- $.ajax({
|
|
|
|
- type: 'POST',
|
|
|
|
- url: 'http://47.103.74.123:8080/YtIoT/iot/frontpage/getCurrentObjectListByCompanyId',
|
|
|
|
- data: { queryJson: JSON.stringify(aa) },
|
|
|
|
- success: function (result) {
|
|
|
|
-
|
|
|
|
- console.log(result)
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- // const aa={"V_LOGINNAME":"gxdmxxg","V_PASSWORD":"gxdmxxg123","COMPANY_CODE":"10316","COMMSTATUS":"NO"}
|
|
|
|
- // alert(1)
|
|
|
|
- // axios({
|
|
|
|
- // method: "post",
|
|
|
|
- // url: `http://47.103.74.123:8080/YtIoT/iot/frontpage/getCurrentObjectListByCompanyId`,
|
|
|
|
- // params: {
|
|
|
|
- // queryJson: JSON.stringify(aa)
|
|
|
|
- // },
|
|
|
|
- // headers: {
|
|
|
|
|
|
+ },
|
|
|
|
|
|
- // },
|
|
|
|
- // }).then((res) => {
|
|
|
|
- // console.log(res)
|
|
|
|
- // })
|
|
|
|
|
|
+ getBuild() {
|
|
|
|
+ // const params = { "V_LOGINNAME": "gxdmxxg", "V_PASSWORD": "gxdmxxg123", "COMPANY_CODE": "10316", "COMMSTATUS": "NO" }
|
|
|
|
+ // $.ajax({
|
|
|
|
+ // type: 'POST',
|
|
|
|
+ // url: 'http://47.103.74.123:8080/YtIoT/iot/frontpage/getCurrentObjectListByCompanyId',
|
|
|
|
+ // data: { queryJson: JSON.stringify(params) },
|
|
|
|
+ // success: function (result) {
|
|
|
|
+
|
|
|
|
+ // console.log(result)
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+
|
|
|
|
+ const params={"V_LOGINNAME":"gxdmxxg","V_PASSWORD":"gxdmxxg123","COMPANY_CODE":"10316","COMMSTATUS":"NO"}
|
|
|
|
+ axios({
|
|
|
|
+ method: "post",
|
|
|
|
+ url: `/frontpage/getCurrentObjectListByCompanyId`,
|
|
|
|
+ params: {
|
|
|
|
+ queryJson: JSON.stringify(params)
|
|
|
|
+ },
|
|
|
|
+ headers: {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ console.log('res')
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.top_level = res.data.top_level;
|
|
|
|
+ this.buildingStore = res.data.LIST;
|
|
|
|
+ console.log( this.top_level)
|
|
|
|
+ console.log( this.buildingStore)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.draw_buinding();
|
|
|
|
+
|
|
|
|
+ // var json = eval('(' + res + ')');
|
|
|
|
+ // if (json.action == 'getCurrentObjectListByCompanyId') {
|
|
|
|
+ // if (json.check == true) {
|
|
|
|
+ // if (json.LIST != undefined) {
|
|
|
|
+
|
|
|
|
+ // this.top_level = json.top_level;
|
|
|
|
+
|
|
|
|
+ // this.buildingStore = json.LIST;
|
|
|
|
+ // }
|
|
|
|
+ // draw_buinding();
|
|
|
|
+ // } else {
|
|
|
|
+ // alert('错误信息')
|
|
|
|
+
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ })
|
|
|
|
|
|
- // axios.get("https://fire.usky.cn:8443/YtIoT/iot/frontpage/getCurrentObjectListByCompanyId?",{
|
|
|
|
- // params:{queryJson: JSON.stringify(aa) },
|
|
|
|
- // headers:{'Content-Type': 'application/x-www-form-urlencoded'}
|
|
|
|
- // }).then((res)=>{
|
|
|
|
- // console.log(res)})
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ callFuncInThingJS(funcName, data, top_level, company_code) {
|
|
|
|
+ var iframe =document.getElementById("myIframe");
|
|
|
|
+ var msg = {data, top_level, company_code}
|
|
|
|
+ var message = {
|
|
|
|
+ 'funcName': funcName,
|
|
|
|
+ 'param': msg
|
|
|
|
+ }
|
|
|
|
+ console.log('message')
|
|
|
|
+ console.log(message)
|
|
|
|
+ iframe.contentWindow.postMessage(message, '*');
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
|
|
getList() {
|
|
getList() {
|
|
|
|
|