Commit 067509eb authored by 张伯涛's avatar 张伯涛

AR模块修改

parent 3db2e857
...@@ -36,6 +36,7 @@ axios.interceptors.response.use((res) => { ...@@ -36,6 +36,7 @@ axios.interceptors.response.use((res) => {
return Promise.resolve(res); return Promise.resolve(res);
}, (error) => { }, (error) => {
closeLoading(); closeLoading();
alert(error)
let httpMessage = ''; let httpMessage = '';
if (error.response) { if (error.response) {
if (error.response.status == '401') { if (error.response.status == '401') {
...@@ -327,4 +328,4 @@ ajax.post = function (url, param, success, errror) { ...@@ -327,4 +328,4 @@ ajax.post = function (url, param, success, errror) {
ajax.get = function (url, param, success, errror) { ajax.get = function (url, param, success, errror) {
ajax({ url: url, param: param, success: success, error: errror, type: 'get' }) ajax({ url: url, param: param, success: success, error: errror, type: 'get' })
} }
export default { post, get, download, ajax, ipAddress, changeIP } export default { post, get, download, ajax, ipAddress, changeIP }
\ No newline at end of file
...@@ -5,10 +5,10 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -5,10 +5,10 @@ import AMapLoader from "@amap/amap-jsapi-loader";
</script> </script>
<template> <template>
<div <div
class="gis_content" class="gis_content"
id="gis_content" id="gis_content"
v-loading.fullscreen.lock="fullscreenLoading" v-loading.fullscreen.lock="fullscreenLoading"
element-loading-background="rgba(122, 122, 122, 0.6)" element-loading-background="rgba(122, 122, 122, 0.6)"
> >
<div class="topTitleBlock"><img src="/imgs/Gis/mapTitle.png" /></div> <div class="topTitleBlock"><img src="/imgs/Gis/mapTitle.png" /></div>
<div class="btnGroup" style="margin-top: 30px"> <div class="btnGroup" style="margin-top: 30px">
...@@ -18,310 +18,310 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -18,310 +18,310 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div class="btn btn4" @click="heatBtnClick(4)"><p>返回上一级</p></div> <div class="btn btn4" @click="heatBtnClick(4)"><p>返回上一级</p></div>
</div> </div>
<div v-show="mapLevel === 1"> <div v-show="mapLevel === 1">
<div class="leftLayer" id="leftLayer"> <div class="leftLayer" id="leftLayer">
<div class="blockStyle" style="height: 16%"> <div class="blockStyle" style="height: 16%">
<div class="titleStyle"><p>室外温度</p></div> <div class="titleStyle"><p>室外温度</p></div>
<div class="leftLayer1" id="leftLayer1"></div> <div class="leftLayer1" id="leftLayer1"></div>
</div> </div>
<div class="blockStyle" style="margin-top: 3%"> <div class="blockStyle" style="margin-top: 3%">
<div class="titleStyle"><p>智慧调控</p></div> <div class="titleStyle"><p>智慧调控</p></div>
<ul class="ulList"> <ul class="ulList">
<li> <li>
<div class="left"> <div class="left">
<div class="title"> <div class="title">
<p>热电联产供热面积</p> <p>热电联产供热面积</p>
</div>
<div class="subTitle">(万㎡)</div>
</div> </div>
<div class="subTitle">(万㎡)</div> <div class="right sa-digital-number">
</div> {{ (areaList.heArea / 10000).toFixed(2) }}
<div class="right sa-digital-number">
{{ (areaList.heArea / 10000).toFixed(2) }}
</div>
</li>
<li>
<div class="left">
<div class="title">
<p>燃气锅炉供热面积</p>
</div> </div>
<div class="subTitle">(万㎡)</div> </li>
</div> <li>
<div class="right sa-digital-number"> <div class="left">
{{ (areaList.gasArea / 10000).toFixed(2) }} <div class="title">
</div> <p>燃气锅炉供热面积</p>
</li> </div>
<li> <div class="subTitle">(万㎡)</div>
<div class="left">
<div class="title">
<p>风电机组供热面积</p>
</div> </div>
<div class="subTitle">(万㎡)</div> <div class="right sa-digital-number">
</div> {{ (areaList.gasArea / 10000).toFixed(2) }}
<div class="right sa-digital-number">
{{ (areaList.fanArea / 10000).toFixed(2) }}
</div>
</li>
<li>
<div class="left">
<div class="title">
<p>空气源热泵供热面积</p>
</div> </div>
<div class="subTitle">(万㎡)</div> </li>
</div> <li>
<div class="right sa-digital-number"> <div class="left">
{{ (areaList.airArea / 10000).toFixed(2) }} <div class="title">
</div> <p>风电机组供热面积</p>
</li> </div>
<li> <div class="subTitle">(万㎡)</div>
<div class="left"> </div>
<div class="title">计划热量</div> <div class="right sa-digital-number">
<div class="subTitle">(GJ)</div> {{ (areaList.fanArea / 10000).toFixed(2) }}
</div> </div>
<div class="right sa-digital-number"> </li>
{{ areaList.plannedHeat }} <li>
</div> <div class="left">
</li> <div class="title">
<li> <p>空气源热泵供热面积</p>
<div class="left"> </div>
<div class="title">实际热量</div> <div class="subTitle">(万㎡)</div>
<div class="subTitle">(GJ)</div> </div>
</div> <div class="right sa-digital-number">
<div class="right sa-digital-number">{{ areaList.realHeat }}</div> {{ (areaList.airArea / 10000).toFixed(2) }}
</li> </div>
<li> </li>
<div class="left"> <li>
<div class="title">机组数量</div> <div class="left">
<div class="subTitle">(座)</div> <div class="title">计划热量</div>
</div> <div class="subTitle">(GJ)</div>
<div class="right sa-digital-number"> </div>
{{ areaList.transferCount }} <div class="right sa-digital-number">
</div> {{ areaList.plannedHeat }}
</li> </div>
<li class="last"> </li>
<div class="left"> <li>
<div class="title">热用户数量</div> <div class="left">
<div class="subTitle">(户)</div> <div class="title">实际热量</div>
</div> <div class="subTitle">(GJ)</div>
<div class="right sa-digital-number">{{ areaList.userCount }}</div> </div>
</li> <div class="right sa-digital-number">{{ areaList.realHeat }}</div>
</ul> </li>
</div> <li>
<div class="blockStyle rightLayer2Block"> <div class="left">
<div class="titleStyle" style="margin-top: 0.3%"> <div class="title">机组数量</div>
<p>一次补水量曲线</p> <div class="subTitle">(座)</div>
</div>
<div class="right sa-digital-number">
{{ areaList.transferCount }}
</div>
</li>
<li class="last">
<div class="left">
<div class="title">热用户数量</div>
<div class="subTitle">(户)</div>
</div>
<div class="right sa-digital-number">{{ areaList.userCount }}</div>
</li>
</ul>
</div>
<div class="blockStyle rightLayer2Block">
<div class="titleStyle" style="margin-top: 0.3%">
<p>一次补水量曲线</p>
</div>
<div
class="rightLayer2"
id="rightLayer2"
v-if="rightLayer2Nodata"
></div>
<div class="rightLayer2 nodata" v-else>暂无数据</div>
</div> </div>
<div
class="rightLayer2"
id="rightLayer2"
v-if="rightLayer2Nodata"
></div>
<div class="rightLayer2 nodata" v-else>暂无数据</div>
</div> </div>
</div> <div class="rightLayer">
<div class="rightLayer"> <div class="blockStyle" style="top: 1%">
<div class="blockStyle" style="top: 1%"> <div class="titleStyle"><p>实时数据</p></div>
<div class="titleStyle"><p>实时数据</p></div> <div class="rightLayer1" style="margin-top: 0.5%">
<div class="rightLayer1" style="margin-top: 0.5%"> <table>
<table> <tr>
<tr> <th>名称</th>
<th>名称</th> <th v-for="item in gYPipeReal" :key="item.supplyId">
<th v-for="item in gYPipeReal" :key="item.supplyId"> {{ item.supplyName }}
{{ item.supplyName }} </th>
</th> </tr>
</tr> <tr>
<tr> <td>一次供温℃</td>
<td>一次供温℃</td> <td v-for="item in gYPipeReal" :key="item.supplyId">
<td v-for="item in gYPipeReal" :key="item.supplyId">
<span v-if="item.supplyPipeTemp != 0">{{ <span v-if="item.supplyPipeTemp != 0">{{
parseFloat(item.supplyPipeTemp).toFixed(1) parseFloat(item.supplyPipeTemp).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>一次回温℃</td> <td>一次回温℃</td>
<td v-for="item in gYPipeReal" :key="item.supplyId"> <td v-for="item in gYPipeReal" :key="item.supplyId">
<span v-if="item.returnPipeTemp != 0">{{ <span v-if="item.returnPipeTemp != 0">{{
parseFloat(item.returnPipeTemp).toFixed(1) parseFloat(item.returnPipeTemp).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>一次供压MPa</td> <td>一次供压MPa</td>
<td v-for="item in gYPipeReal" :key="item.supplyId"> <td v-for="item in gYPipeReal" :key="item.supplyId">
<span v-if="item.supplyPipePressure != 0">{{ <span v-if="item.supplyPipePressure != 0">{{
parseFloat(item.supplyPipePressure).toFixed(2) parseFloat(item.supplyPipePressure).toFixed(2)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>一次回压MPa</td> <td>一次回压MPa</td>
<td v-for="item in gYPipeReal" :key="item.supplyId"> <td v-for="item in gYPipeReal" :key="item.supplyId">
<span v-if="item.returnPipePressure != 0">{{ <span v-if="item.returnPipePressure != 0">{{
parseFloat(item.returnPipePressure).toFixed(2) parseFloat(item.returnPipePressure).toFixed(2)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>流量m³/h</td> <td>流量m³/h</td>
<td v-for="item in gYPipeReal" :key="item.supplyId"> <td v-for="item in gYPipeReal" :key="item.supplyId">
<span v-if="item.supplyFlow != 0">{{ <span v-if="item.supplyFlow != 0">{{
parseFloat(item.supplyFlow).toFixed(2) parseFloat(item.supplyFlow).toFixed(2)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>一次补水量万m³/h</td> <td>一次补水量万m³/h</td>
<td v-for="item in gYPipeReal" :key="item.supplyId"> <td v-for="item in gYPipeReal" :key="item.supplyId">
<span v-if="item.supplyFlowSum != 0">{{ <span v-if="item.supplyFlowSum != 0">{{
parseInt(item.supplyFlowSum) / 10000 parseInt(item.supplyFlowSum) / 10000
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</div>
<div
class="blockStyle rightLayer2Block rightLayer3Block"
style="margin-top: 2%"
>
<div class="titleStyle">
<p>换热站工况</p>
</div> </div>
<div class="btnGroup"> <div
<ul> class="blockStyle rightLayer2Block rightLayer3Block"
<li style="margin-top: 2%"
:class="{ ac: menuGYTransfer == 0 }" >
@click="menuGYTransferClick(0)" <div class="titleStyle">
> <p>换热站工况</p>
阀门开度 </div>
</li> <div class="btnGroup">
<li <ul>
:class="{ ac: menuGYTransfer == 1 }" <li
@click="menuGYTransferClick(1)" :class="{ ac: menuGYTransfer == 0 }"
@click="menuGYTransferClick(0)"
>
阀门开度
</li>
<li
:class="{ ac: menuGYTransfer == 1 }"
@click="menuGYTransferClick(1)"
>
热单耗
</li>
</ul>
</div>
<div class="selectBlock">
<select
v-model="selectHour"
v-show="selectShow"
@change="selectHourFun"
> >
热单耗 <option value="6" selected>6小时</option>
</li> <option value="12">12小时</option>
</ul> <option value="24">24小时</option>
</div> </select>
<div class="selectBlock"> </div>
<select <div class="rightLayer1 rightLayer3" style="margin-top: 7%">
v-model="selectHour" <table v-show="menuGYTransfer == 0" style="white-space:nowrap; text-overflow:ellipsis;" >
v-show="selectShow" <tr>
@change="selectHourFun" <th style="width: 20%">名称</th>
> <!-- <th v-for="item in gYTransferValue" :key="item.transferId">
<option value="6" selected>6小时</option> {{ item.transferName }}
<option value="12">12小时</option> </th> -->
<option value="24">24小时</option> <th style="width: 16%">一供℃</th>
</select> <th style="width: 16%">一回℃</th>
</div> <th style="width: 16%">1#阀%</th>
<div class="rightLayer1 rightLayer3" style="margin-top: 7%"> <th style="width: 16%">2#阀%</th>
<table v-show="menuGYTransfer == 0"> <th style="width: 16%">3#阀%</th>
<tr> <th>4#阀%</th>
<th style="width: 20%">名称</th> </tr>
<!-- <th v-for="item in gYTransferValue" :key="item.transferId"> <tr v-for="item in gYTransferValue" :key="item.transferId">
{{ item.transferName }} <td>{{ item.transferName }}</td>
</th> --> <td>
<th style="width: 13%">一次供温℃</th>
<th style="width: 13%">一次回温℃</th>
<th style="width: 13%">1#阀门开度%</th>
<th style="width: 13%">2#阀门开度%</th>
<th style="width: 13%">3阀门开度%</th>
<th>4阀门开度%</th>
</tr>
<tr v-for="item in gYTransferValue" :key="item.transferId">
<td>{{ item.transferName }}</td>
<td>
<span v-if="item.firstInTemp != 0">{{ <span v-if="item.firstInTemp != 0">{{
parseFloat(item.firstInTemp).toFixed(1) parseFloat(item.firstInTemp).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
<td> <td>
<span v-if="item.firstOutTemp != 0">{{ <span v-if="item.firstOutTemp != 0">{{
parseFloat(item.firstOutTemp).toFixed(1) parseFloat(item.firstOutTemp).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
<td> <td>
<span v-if="item.firstOutTemp != 0">{{ <span v-if="item.firstOutTemp != 0">{{
parseFloat(item.firstOutTemp).toFixed(1) parseFloat(item.firstOutTemp).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
<td> <td>
<span v-if="item.secondEcvFeedback != 0">{{ <span v-if="item.secondEcvFeedback != 0">{{
parseFloat(item.secondEcvFeedback).toFixed(1) parseFloat(item.secondEcvFeedback).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
<td> <td>
<span v-if="item.thirdEcvFeedback != 0">{{ <span v-if="item.thirdEcvFeedback != 0">{{
parseFloat(item.thirdEcvFeedback).toFixed(1) parseFloat(item.thirdEcvFeedback).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
<td> <td>
<span v-if="item.forthEcvFeedback != 0">{{ <span v-if="item.forthEcvFeedback != 0">{{
parseFloat(item.forthEcvFeedback).toFixed(1) parseFloat(item.forthEcvFeedback).toFixed(1)
}}</span> }}</span>
<span v-else>-</span> <span v-else>-</span>
</td> </td>
</tr> </tr>
</table> </table>
<table v-show="menuGYTransfer == 1"> <table v-show="menuGYTransfer == 1">
<tr> <tr>
<th>名称</th> <th>名称</th>
<th>平均温度℃</th> <th>平均温度℃</th>
<th>热单耗W/㎡</th> <th>热单耗W/㎡</th>
</tr> </tr>
<tr v-for="item in gYTransferHeatUC" :key="item.transferId"> <tr v-for="item in gYTransferHeatUC" :key="item.transferId">
<td>{{ item.transferName }}</td> <td>{{ item.transferName }}</td>
<td>{{ item.temperature }}</td> <td>{{ item.temperature }}</td>
<td>{{ item.uc }}</td> <td>{{ item.uc }}</td>
</tr> </tr>
<!-- <tr> <!-- <tr>
<td>热单耗W/㎡</td> <td>热单耗W/㎡</td>
<td v-for="item in gYTransferHeatUC" :key="item.transferId"> <td v-for="item in gYTransferHeatUC" :key="item.transferId">
{{ item.uc }} {{ item.uc }}
</td> </td>
</tr> --> </tr> -->
</table> </table>
</div>
</div>
<div class="blockStyle rightLayer4Block">
<div class="titleStyle"><p>机组一网电调阀开度分布</p></div>
<div
class="rightLayer4"
id="rightLayer4"
v-if="rightLayer4Nodata"
></div>
<div class="rightLayer4 nodata" v-else>暂无数据</div>
</div> </div>
</div> </div>
<div class="blockStyle rightLayer4Block"> <div class="bottomLayer">
<div class="titleStyle"><p>机组一网电调阀开度分布</p></div> <ul class="bottomList">
<div <li
class="rightLayer4" v-for="(item, index) in gYSupplyHeatUCDeviationSupplyName"
id="rightLayer4" :key="item.supplyId"
v-if="rightLayer4Nodata" >
></div> <div class="titleList">
<div class="rightLayer4 nodata" v-else>暂无数据</div> <div class="title">{{ item.split("供热站")[0] }}</div>
<div class="subTitle">度日数热耗偏离值</div>
</div>
<div class="bottomCharts1" :id="'bottomCharts' + (index + 1)"></div>
</li>
</ul>
</div> </div>
</div> </div>
<div class="bottomLayer">
<ul class="bottomList">
<li
v-for="(item, index) in gYSupplyHeatUCDeviationSupplyName"
:key="item.supplyId"
>
<div class="titleList">
<div class="title">{{ item.split("供热站")[0] }}</div>
<div class="subTitle">度日数热耗偏离值</div>
</div>
<div class="bottomCharts1" :id="'bottomCharts' + (index + 1)"></div>
</li>
</ul>
</div>
</div>
<div v-show="mapLevel === 2"> <div v-show="mapLevel === 2">
<div class="secondLeftLayer"> <div class="secondLeftLayer">
<div class="secondLeftLayer_one"> <div class="secondLeftLayer_one">
<div style="width: 100%"> <div style="width: 100%">
<!-- <div class="secondLeftLayer_title"><p>热源趋势曲线</p></div>--> <!-- <div class="secondLeftLayer_title"><p>热源趋势曲线</p></div>-->
<div class="titleStyleTwo"><p>热源趋势曲线</p></div> <div class="titleStyleTwo"><p>热源趋势曲线</p></div>
<div style="display: flex;align-items: center;justify-content: left; padding: 0 2% 0"> <div style="display: flex;align-items: center;justify-content: left; padding: 0 2% 0">
<ul v-for="(item,index) in heatSourceBtnList" :key="index"> <ul v-for="(item,index) in heatSourceBtnList" :key="index">
...@@ -337,10 +337,10 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -337,10 +337,10 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div v-show="firstCardLoading===true" class="loading-overlay"> <div v-show="firstCardLoading===true" class="loading-overlay">
<div class="loader"></div> <div class="loader"></div>
</div> </div>
<div class="secondLeftLayer1" id="secondLeftLayer1"></div> <div class="secondLeftLayer1" id="secondLeftLayer1"></div>
</div> </div>
<div class="secondLeftLayer_two"> <div class="secondLeftLayer_two">
<!-- <div class="secondLeftLayer_title"><p>一次侧补水量曲线</p></div>--> <!-- <div class="secondLeftLayer_title"><p>一次侧补水量曲线</p></div>-->
<div class="titleStyleTwo"><p>一次侧补水量曲线</p></div> <div class="titleStyleTwo"><p>一次侧补水量曲线</p></div>
<div v-show="secondCardLoading===true" class="loading-overlay2"> <div v-show="secondCardLoading===true" class="loading-overlay2">
<div class="loader"></div> <div class="loader"></div>
...@@ -348,7 +348,7 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -348,7 +348,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div class="secondLeftLayer2" id="secondLeftLayer2"></div> <div class="secondLeftLayer2" id="secondLeftLayer2"></div>
</div> </div>
<div class="secondLeftLayer_three"> <div class="secondLeftLayer_three">
<!-- <div class="secondLeftLayer_title"><p>二次侧机组补水量排名</p></div>--> <!-- <div class="secondLeftLayer_title"><p>二次侧机组补水量排名</p></div>-->
<div class="titleStyleTwo"><p>二次侧机组补水量排名</p></div> <div class="titleStyleTwo"><p>二次侧机组补水量排名</p></div>
<div v-show="thirdCardLoading===true" class="loading-overlay3"> <div v-show="thirdCardLoading===true" class="loading-overlay3">
<div class="loader"></div> <div class="loader"></div>
...@@ -363,7 +363,7 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -363,7 +363,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
</div> </div>
<div class="secondRightLayer"> <div class="secondRightLayer">
<div class="secondLeftLayer_four"> <div class="secondLeftLayer_four">
<!-- <div class="secondLeftLayer_title"><p>当日实时能耗数据</p></div>--> <!-- <div class="secondLeftLayer_title"><p>当日实时能耗数据</p></div>-->
<div class="titleStyleTwo"><p>当日实时能耗数据</p></div> <div class="titleStyleTwo"><p>当日实时能耗数据</p></div>
<div v-show="fourthCardLoading===true" class="loading-overlay4"> <div v-show="fourthCardLoading===true" class="loading-overlay4">
<div class="loader"></div> <div class="loader"></div>
...@@ -389,7 +389,7 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -389,7 +389,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
</div> </div>
<div class="secondLeftLayer_fifth"> <div class="secondLeftLayer_fifth">
<div > <div >
<!-- <div class="secondLeftLayer_title"><p>机组排名</p></div>--> <!-- <div class="secondLeftLayer_title"><p>机组排名</p></div>-->
<div class="titleStyleTwo"><p>机组排名</p></div> <div class="titleStyleTwo"><p>机组排名</p></div>
<div style="display: flex;align-items: center;justify-content: left;padding: 0 2%"> <div style="display: flex;align-items: center;justify-content: left;padding: 0 2%">
<ul v-for="(item,index) in rankTypeBtnList" :key="index"> <ul v-for="(item,index) in rankTypeBtnList" :key="index">
...@@ -422,19 +422,19 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -422,19 +422,19 @@ import AMapLoader from "@amap/amap-jsapi-loader";
</div> </div>
<div class="bottomLayerTwo"> <div class="bottomLayerTwo">
<div class="title_row"> <div class="title_row">
<!-- <div class="secondLeftLayer_title"><p>报警信息轮播</p></div>--> <!-- <div class="secondLeftLayer_title"><p>报警信息轮播</p></div>-->
<div class="titleStyleTwo"><p>报警信息轮播</p></div> <div class="titleStyleTwo"><p>报警信息轮播</p></div>
<div class="moreInfo" @click="handleShowMore('1')">更多》</div> <div class="moreInfo" @click="handleShowMore('1')">更多》</div>
</div> </div>
<div v-show="sixthCardLoading===true" class="loading-overlay6"> <div v-show="sixthCardLoading===true" class="loading-overlay6">
<div class="loader"></div> <div class="loader"></div>
</div> </div>
<vue3ScrollSeamless class="scroll-wrap border text-color" :classOptions="classOptions" :dataList="alarmDataList"> <vue3ScrollSeamless class="scroll-wrap border text-color" :classOptions="classOptions" :dataList="alarmDataList">
<el-row v-for="(item, i) of alarmDataList" :key="i"> <el-row v-for="(item, i) of alarmDataList" :key="i">
<el-col :span="24" class="seamlessCol"> <el-col :span="24" class="seamlessCol">
<div style="color: white">{{ item.msg }}</div> <div style="color: white">{{ item.msg }}</div>
</el-col> </el-col>
</el-row> </el-row>
</vue3ScrollSeamless> </vue3ScrollSeamless>
</div> </div>
</div> </div>
...@@ -443,9 +443,9 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -443,9 +443,9 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div class="thirdLeftLayer_one" ref="myContainer"> <div class="thirdLeftLayer_one" ref="myContainer">
<div class="title_row"> <div class="title_row">
<div class="titleStyleTwoVideo"><p>换热站监控</p></div> <div class="titleStyleTwoVideo"><p>换热站监控</p></div>
<div class="moreInfo" @click="PreviousVideo()">上一个</div> <div class="moreInfo" v-show="hasVideo" @click="PreviousVideo()">上一个</div>
<div class="moreInfo" @click="nextVideo()">下一个</div> <div class="moreInfo" v-show="hasVideo" @click="nextVideo()">下一个</div>
<div class="moreInfo" @click="moreVideo()">更多》</div> <div class="moreInfo" v-show="hasVideo" @click="moreVideo()">更多》</div>
</div> </div>
<div v-if="videoLoading" class="videoLoading-overlay"> <div v-if="videoLoading" class="videoLoading-overlay">
<div class="videoLoading-spinner"></div> <div class="videoLoading-spinner"></div>
...@@ -522,7 +522,7 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -522,7 +522,7 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div class="videoLoading-spinner"></div> <div class="videoLoading-spinner"></div>
<p> 视频加载中,请稍后......</p> <p> 视频加载中,请稍后......</p>
</div> </div>
<video-components-two @initSuccessAll="handleInitSuccessAll" :divWidth="divDialogWidth" :divHeight="divDialogHeight" :queryParams="queryParamsAll" :stopParams="stopParamsAll"/> <video-components-two @initSuccessAll="handleInitSuccessAll" :videoShow="videoOpen" :divWidth="divDialogWidth" :divHeight="divDialogHeight" :queryParams="queryParamsAll" :stopParams="stopParamsAll"/>
</div> </div>
</div> </div>
</div> </div>
...@@ -547,12 +547,12 @@ import AMapLoader from "@amap/amap-jsapi-loader"; ...@@ -547,12 +547,12 @@ import AMapLoader from "@amap/amap-jsapi-loader";
<div class="videoBlock" v-show="voideShow"> <div class="videoBlock" v-show="voideShow">
<div class="closeBtn" @click="closeVoide">X</div> <div class="closeBtn" @click="closeVoide">X</div>
<video <video
id="video" id="video"
type="video/mp4" type="video/mp4"
src="/video/GYBoiler3D.mp4" src="/video/GYBoiler3D.mp4"
width="1280" width="1280"
controls controls
muted muted
></video> ></video>
</div> </div>
</div> </div>
...@@ -637,6 +637,7 @@ export default defineComponent({ ...@@ -637,6 +637,7 @@ export default defineComponent({
videoList: [], videoList: [],
playVideoList: [] playVideoList: []
}, },
hasVideo:false,
open: false, open: false,
videoOpen: false, videoOpen: false,
items: ['Item 1', 'Item 2', 'Item 3', 'Item 4'], items: ['Item 1', 'Item 2', 'Item 3', 'Item 4'],
...@@ -777,7 +778,7 @@ export default defineComponent({ ...@@ -777,7 +778,7 @@ export default defineComponent({
const parts = num.toString().split('.'); const parts = num.toString().split('.');
if (parts.length > 1) { if (parts.length > 1) {
// 如果有小数部分,保留最多六位小数 // 如果有小数部分,保留最多六位小数
return `${parts[0]}.${parts[1].slice(0, 6)}`; // 仅保留前六位小数 return `${parts[0]}.${parts[1].slice(0, 3)}`; // 仅保留前六位小数
} }
return parts[0]; // 没有小数部分,返回整数部分 return parts[0]; // 没有小数部分,返回整数部分
} }
...@@ -786,7 +787,7 @@ export default defineComponent({ ...@@ -786,7 +787,7 @@ export default defineComponent({
handleToDetail() { handleToDetail() {
this.$router.push("/Alarm") this.$router.push("/Alarm")
localStorage.setItem("activeTab", "/Alarm"); localStorage.setItem("activeTab", "/Alarm");
this.addTab() this.addTab()
}, },
addTab() { addTab() {
const editableTabs = [ const editableTabs = [
...@@ -805,7 +806,7 @@ export default defineComponent({ ...@@ -805,7 +806,7 @@ export default defineComponent({
JSON.stringify(editableTabs) JSON.stringify(editableTabs)
); );
window.sessionStorage.setItem('activePath','/Alarm') window.sessionStorage.setItem('activePath','/Alarm')
}, },
handleShowMore(type) { handleShowMore(type) {
if(type === '1') { if(type === '1') {
this.alarmList = this.alarmDataList this.alarmList = this.alarmDataList
...@@ -847,66 +848,66 @@ export default defineComponent({ ...@@ -847,66 +848,66 @@ export default defineComponent({
version: "2.0", version: "2.0",
plugins: ["AMap.Scale"], plugins: ["AMap.Scale"],
}) })
.then((AMap) => { .then((AMap) => {
map = new AMap.Map("container", { map = new AMap.Map("container", {
pitch: 50, pitch: 50,
viewMode: "3D", viewMode: "3D",
mapStyle: "amap://styles/blue", mapStyle: "amap://styles/blue",
rotateEnable: true, rotateEnable: true,
pitchEnable: true, pitchEnable: true,
// scrollWheel: false, // scrollWheel: false,
zoom: 12, zoom: 12,
rotation: 140, rotation: 140,
zooms: [12, 20], zooms: [12, 20],
center: [117.490182, 38.885596], center: [117.490182, 38.885596],
}); });
// map.on("click", function (e) { // map.on("click", function (e) {
// alert( // alert(
// "您在[ " + // "您在[ " +
// e.lnglat.getLng() + // e.lnglat.getLng() +
// "," + // "," +
// e.lnglat.getLat() + // e.lnglat.getLat() +
// " ]的位置点击了地图!" // " ]的位置点击了地图!"
// ); // );
// }); // });
this.servicCenterList.forEach((element, index) => { this.servicCenterList.forEach((element, index) => {
const amapGps = this.bd_decrypt( const amapGps = this.bd_decrypt(
element.longitude, element.longitude,
element.latitude element.latitude
); );
this.markerFun( this.markerFun(
map, map,
element.centerId, element.centerId,
amapGps.lng, amapGps.lng,
amapGps.lat, amapGps.lat,
element.centerName, element.centerName,
element.realHeat, element.realHeat,
element.area, element.area,
element.markerId, element.markerId,
index index
); );
}); });
var contextMenu = new AMap.ContextMenu(); var contextMenu = new AMap.ContextMenu();
}) })
.catch((e) => { .catch((e) => {
console.log(e); console.log(e);
}); });
}, },
markerFun: function ( markerFun: function (
map, map,
centerId, centerId,
longitude, longitude,
latitude, latitude,
markerContent, markerContent,
realHeat, realHeat,
area, area,
markerId, markerId,
index, index,
transferList, transferList,
stationId stationId
) { ) {
let _this = this; let _this = this;
var position = new AMap.LngLat(longitude, latitude); var position = new AMap.LngLat(longitude, latitude);
...@@ -914,30 +915,30 @@ export default defineComponent({ ...@@ -914,30 +915,30 @@ export default defineComponent({
switch (_this.mapLevel) { switch (_this.mapLevel) {
case 1: case 1:
markerContentP = markerContentP =
"" + "" +
'<div class="custom-content-marker markerPoints" id="' + '<div class="custom-content-marker markerPoints" id="' +
markerId + markerId +
'">' + '">' +
' <img src="/imgs/Gis/points1.png">' + ' <img src="/imgs/Gis/points1.png">' +
"</div>"; "</div>";
break; break;
case 2: case 2:
markerContentP = markerContentP =
"" + "" +
'<div class="custom-content-marker markerPoints" id="' + '<div class="custom-content-marker markerPoints" id="' +
markerId + markerId +
'">' + '">' +
' <img src="/imgs/Gis/points2.png">' + ' <img src="/imgs/Gis/points2.png">' +
"</div>"; "</div>";
break; break;
case 3: case 3:
markerContentP = markerContentP =
"" + "" +
'<div class="custom-content-marker markerPoints" id="' + '<div class="custom-content-marker markerPoints" id="' +
markerId + markerId +
'">' + '">' +
' <img src="/imgs/Gis/points3.png">' + ' <img src="/imgs/Gis/points3.png">' +
"</div>"; "</div>";
break; break;
} }
var marker = new AMap.Marker({ var marker = new AMap.Marker({
...@@ -957,39 +958,39 @@ export default defineComponent({ ...@@ -957,39 +958,39 @@ export default defineComponent({
contentInfo = "<div class='mypopup mypopup1 mypopup3'>"; contentInfo = "<div class='mypopup mypopup1 mypopup3'>";
transferList.forEach((element) => { transferList.forEach((element) => {
contentInfo += contentInfo +=
"<div style='line-height:120%;'>" + "<div style='line-height:120%;'>" +
element.transferName + element.transferName +
" 实时热耗:" + " 实时热耗:" +
element.realHeat + element.realHeat +
"(GJ)</div>"; "(GJ)</div>";
}); });
contentInfo += "</div>"; contentInfo += "</div>";
} else { } else {
transferList.forEach((element) => { transferList.forEach((element) => {
contentInfo = contentInfo =
"<div class='mypopup mypopup2 mypopup3'><div>" + "<div class='mypopup mypopup2 mypopup3'><div>" +
element.transferName + element.transferName +
" " + " " +
"</div><div style='text-align:center; margin-top:5px;'> 供热面积:" + "</div><div style='text-align:center; margin-top:5px;'> 供热面积:" +
(element.area / 10000).toFixed(2) + (element.area / 10000).toFixed(2) +
"(万㎡)</div>"; "(万㎡)</div>";
}); });
} }
} else { } else {
if (_this.heatBtnF == 1) { if (_this.heatBtnF == 1) {
contentInfo = contentInfo =
"<div class='mypopup mypopup1'><div>" + "<div class='mypopup mypopup1'><div>" +
markerContent + markerContent +
"</div><div style='text-align:center; margin-top:5px;'>实时热耗:" + "</div><div style='text-align:center; margin-top:5px;'>实时热耗:" +
realHeat + realHeat +
"(GJ)</div>"; "(GJ)</div>";
} else { } else {
contentInfo = contentInfo =
"<div class='mypopup mypopup2'><div>" + "<div class='mypopup mypopup2'><div>" +
markerContent + markerContent +
"</div><div style='text-align:center; margin-top:5px;'>供热面积:" + "</div><div style='text-align:center; margin-top:5px;'>供热面积:" +
(area / 10000).toFixed(2) + (area / 10000).toFixed(2) +
"(万㎡)</div>"; "(万㎡)</div>";
} }
} }
setTimeout(function () { setTimeout(function () {
...@@ -1009,12 +1010,12 @@ export default defineComponent({ ...@@ -1009,12 +1010,12 @@ export default defineComponent({
_this.voideShow = true; _this.voideShow = true;
}); });
}); });
popupButtons2.addEventListener("dblclick", function (event) { popupButtons2.addEventListener("dblclick", function (event) {
if (markerId.includes("marker3")) { if (markerId.includes("marker3")) {
window.open('/GisAr', '_blank'); window.open('/GisAr', '_blank');
console.log('ggggggggggggggggggggggggggggggggggggggggggggggggggggggg') console.log('ggggggggggggggggggggggggggggggggggggggggggggggggggggggg')
} }
}) })
popupButtons2.addEventListener("click", function (event) { popupButtons2.addEventListener("click", function (event) {
if (markerId.includes("marker1")) { if (markerId.includes("marker1")) {
console.log('1111111111111111111111111111111111111111111111111111111111111',centerId) console.log('1111111111111111111111111111111111111111111111111111111111111',centerId)
...@@ -1095,9 +1096,9 @@ export default defineComponent({ ...@@ -1095,9 +1096,9 @@ export default defineComponent({
}); });
_this.postSupplylist( _this.postSupplylist(
map, map,
_this.mapBack.centerId, _this.mapBack.centerId,
_this.mapBack.index _this.mapBack.index
); );
}); });
return false; return false;
...@@ -1175,21 +1176,21 @@ export default defineComponent({ ...@@ -1175,21 +1176,21 @@ export default defineComponent({
if (!element.openF) { if (!element.openF) {
this.mapLevel = 2; this.mapLevel = 2;
const amapGps = this.bd_decrypt( const amapGps = this.bd_decrypt(
element.longitude, element.longitude,
element.latitude element.latitude
); );
this.markerFun( this.markerFun(
map, map,
element.supplyId, element.supplyId,
// element.longitude, // element.longitude,
// element.latitude, // element.latitude,
amapGps.lng, amapGps.lng,
amapGps.lat, amapGps.lat,
element.supplyName, element.supplyName,
element.realHeat, element.realHeat,
element.area, element.area,
element.markerId, element.markerId,
index index
); );
} }
}); });
...@@ -1210,8 +1211,8 @@ export default defineComponent({ ...@@ -1210,8 +1211,8 @@ export default defineComponent({
let popupButtons = document.querySelector("#marker1_" + n); let popupButtons = document.querySelector("#marker1_" + n);
if (popupButtons != null) { if (popupButtons != null) {
popupButtons.removeEventListener( popupButtons.removeEventListener(
"click", "click",
function (event) {} function (event) {}
); );
map.remove(element); map.remove(element);
} }
...@@ -1249,8 +1250,8 @@ export default defineComponent({ ...@@ -1249,8 +1250,8 @@ export default defineComponent({
if (!element.openF) { if (!element.openF) {
this.mapLevel = 3; this.mapLevel = 3;
const amapGps = this.bd_decrypt( const amapGps = this.bd_decrypt(
element.longitude, element.longitude,
element.latitude element.latitude
); );
if (amapGps.lng == NaN) { if (amapGps.lng == NaN) {
amapGps.lng = element.longitude; amapGps.lng = element.longitude;
...@@ -1259,19 +1260,19 @@ export default defineComponent({ ...@@ -1259,19 +1260,19 @@ export default defineComponent({
amapGps.lat = element.latitude; amapGps.lat = element.latitude;
} }
this.markerFun( this.markerFun(
map, map,
element.supplyId, element.supplyId,
amapGps.lng, amapGps.lng,
amapGps.lat, amapGps.lat,
// element.longitude, // element.longitude,
// element.latitude, // element.latitude,
element.transferName, element.transferName,
element.realHeat, element.realHeat,
element.area, element.area,
element.markerId, element.markerId,
index, index,
element.transferList, element.transferList,
element.stationId element.stationId
); );
} }
}); });
...@@ -2277,73 +2278,73 @@ export default defineComponent({ ...@@ -2277,73 +2278,73 @@ export default defineComponent({
getGYSupplyWaterTrend(params).then(res => { getGYSupplyWaterTrend(params).then(res => {
if(res.data && res.data.length > 0) { if(res.data && res.data.length > 0) {
this.trendList = res.data this.trendList = res.data
const params = [ const params = [
[ [
{ {
supplyName: "数据1", supplyName: "数据1",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 1:00:00" gatherTime: "2024/9/25 1:00:00"
}, },
{ {
supplyName: "数据1", supplyName: "数据1",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 2:00:00" gatherTime: "2024/9/25 2:00:00"
}, },
{ {
supplyName: "数据1", supplyName: "数据1",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 3:00:00" gatherTime: "2024/9/25 3:00:00"
}, },
{ {
supplyName: "数据1", supplyName: "数据1",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 4:00:00" gatherTime: "2024/9/25 4:00:00"
}, },
{ {
supplyName: "数据1", supplyName: "数据1",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 5:00:00" gatherTime: "2024/9/25 5:00:00"
}, },
{ {
supplyName: "数据1", supplyName: "数据1",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 6:00:00" gatherTime: "2024/9/25 6:00:00"
}, },
], ],
[ [
{ {
supplyName: "数据2", supplyName: "数据2",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 1:00:00" gatherTime: "2024/9/25 1:00:00"
}, },
{ {
supplyName: "数据2", supplyName: "数据2",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 2:00:00" gatherTime: "2024/9/25 2:00:00"
}, },
{ {
supplyName: "数据2", supplyName: "数据2",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 3:00:00" gatherTime: "2024/9/25 3:00:00"
}, },
{ {
supplyName: "数据2", supplyName: "数据2",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 4:00:00" gatherTime: "2024/9/25 4:00:00"
}, },
{ {
supplyName: "数据2", supplyName: "数据2",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 5:00:00" gatherTime: "2024/9/25 5:00:00"
}, },
{ {
supplyName: "数据2", supplyName: "数据2",
waterRecord: 0, waterRecord: 0,
gatherTime: "2024/9/25 6:00:00" gatherTime: "2024/9/25 6:00:00"
}, },
] ]
] ]
this.trendList = params this.trendList = params
this.trendY = [] this.trendY = []
for (let i = 0; i < this.trendList.length; i++) { for (let i = 0; i < this.trendList.length; i++) {
const name = this.trendList[i][0].supplyName const name = this.trendList[i][0].supplyName
...@@ -3076,22 +3077,22 @@ export default defineComponent({ ...@@ -3076,22 +3077,22 @@ export default defineComponent({
this.videoLoading = true this.videoLoading = true
this.stationName = this.transferList[num].stationName this.stationName = this.transferList[num].stationName
} }
this.showVideo = true this.showVideo = true
const list = res.data const list = res.data
this.VideoInfo.playVideoList = [] this.VideoInfo.playVideoList = []
// 检查 list 是否为数组 // 检查 list 是否为数组
if (Array.isArray(list)) { if (Array.isArray(list)) {
this.VideoInfo.playVideoList = []; this.VideoInfo.playVideoList = [];
list.forEach(video => { list.forEach(video => {
var videoId = video.videoId.replaceAll('-', ''); var videoId = video.videoId.replaceAll('-', '');
this.VideoInfo.playVideoList.push(videoId); this.VideoInfo.playVideoList.push(videoId);
}); });
} }
const videoList = [] const videoList = []
videoList.push(this.VideoInfo.playVideoList[this.videoNum]) videoList.push(this.VideoInfo.playVideoList[this.videoNum])
this.getDivWidth() this.getDivWidth()
this.queryParams = JSON.stringify(videoList) this.queryParams = JSON.stringify(videoList)
}) })
}, },
...@@ -3109,7 +3110,7 @@ export default defineComponent({ ...@@ -3109,7 +3110,7 @@ export default defineComponent({
}, },
handleInitSuccessAll() { handleInitSuccessAll() {
this.videoAllLoading = false this.videoAllLoading = false
this.showVideoClose = true this.showVideoClose = true
}, },
getGYTransferVideo2() { getGYTransferVideo2() {
this.videoNum = 0 this.videoNum = 0
...@@ -3126,8 +3127,10 @@ export default defineComponent({ ...@@ -3126,8 +3127,10 @@ export default defineComponent({
message: res.data, message: res.data,
type: 'warning' type: 'warning'
}); });
this.hasVideo=false;
}else { }else {
this.videoLoading = true this.videoLoading = true
this.hasVideo=true;
} }
this.showVideo = true this.showVideo = true
...@@ -3248,13 +3251,13 @@ export default defineComponent({ ...@@ -3248,13 +3251,13 @@ export default defineComponent({
}, },
// 获取港益服务中心报警数据 // 获取港益服务中心报警数据
async handleGetGYSupplyAlarmData() { async handleGetGYSupplyAlarmData() {
const params = { const params = {
id: this.mapBack.centerId id: this.mapBack.centerId
} }
getGYSupplyAlarmData(params).then(res => { getGYSupplyAlarmData(params).then(res => {
this.sixthCardLoading = false this.sixthCardLoading = false
this.alarmDataList = res.data this.alarmDataList = res.data
}) })
}, },
// 二次侧机组补水量排名 // 二次侧机组补水量排名
async handleGetGISRankWaterUC() { async handleGetGISRankWaterUC() {
...@@ -3350,10 +3353,10 @@ export default defineComponent({ ...@@ -3350,10 +3353,10 @@ export default defineComponent({
setTimeout(function () { setTimeout(function () {
if (document.querySelector("#bottomCharts1")) { if (document.querySelector("#bottomCharts1")) {
_this.bottomEchartInit1( _this.bottomEchartInit1(
"bottomCharts" + (index + 1), "bottomCharts" + (index + 1),
element.deviation.toFixed(2), element.deviation.toFixed(2),
element.predictionHeat.toFixed(2), element.predictionHeat.toFixed(2),
element.realHeat.toFixed(2) element.realHeat.toFixed(2)
); );
} }
}, 500); }, 500);
...@@ -3399,7 +3402,7 @@ export default defineComponent({ ...@@ -3399,7 +3402,7 @@ export default defineComponent({
} else { } else {
waterRecordList.push(element.waterRecord); waterRecordList.push(element.waterRecord);
this.gYSupplyWaterName.push( this.gYSupplyWaterName.push(
element.supplyName.split("供热站")[0] element.supplyName.split("供热站")[0]
); );
//this.gYSupplyWaterY2.push(element.temperature); //this.gYSupplyWaterY2.push(element.temperature);
this.gYSupplyWaterSeries.push({ this.gYSupplyWaterSeries.push({
...@@ -3442,7 +3445,7 @@ export default defineComponent({ ...@@ -3442,7 +3445,7 @@ export default defineComponent({
var arr4 = []; var arr4 = [];
this.transferOpenValue.forEach((element) => { this.transferOpenValue.forEach((element) => {
this.transferOpenValueLegend.push( this.transferOpenValueLegend.push(
element.supplyName.split("供热站")[0] element.supplyName.split("供热站")[0]
); );
arr1.push(element.percentage75); arr1.push(element.percentage75);
arr2.push(element.percentage50); arr2.push(element.percentage50);
...@@ -3740,15 +3743,15 @@ export default defineComponent({ ...@@ -3740,15 +3743,15 @@ export default defineComponent({
barWidth: "40%", barWidth: "40%",
itemStyle: { itemStyle: {
color: new echarts.graphic.LinearGradient( color: new echarts.graphic.LinearGradient(
0, 0,
0, 0,
0, 0,
1, // 表示渐变方向,从上到下 1, // 表示渐变方向,从上到下
[ [
{ offset: 0, color: "#fe9b1a" }, { offset: 0, color: "#fe9b1a" },
{ offset: 0.2, color: "#fe9b1a" }, { offset: 0.2, color: "#fe9b1a" },
{ offset: 1, color: "#fe411b" }, { offset: 1, color: "#fe411b" },
] ]
), ),
}, },
label: { label: {
...@@ -3871,10 +3874,10 @@ export default defineComponent({ ...@@ -3871,10 +3874,10 @@ export default defineComponent({
// 自定义标题 // 自定义标题
var title = _this.gYSupplyWaterTimeAll[params[0].dataIndex]; var title = _this.gYSupplyWaterTimeAll[params[0].dataIndex];
var content = params var content = params
.map(function (item) { .map(function (item) {
return item.seriesName + ":" + item.value; return item.seriesName + ":" + item.value;
}) })
.join("<br/>"); .join("<br/>");
// 返回包含标题和内容的字符串 // 返回包含标题和内容的字符串
return title + "<br/>" + content; return title + "<br/>" + content;
}, },
......
...@@ -2,25 +2,25 @@ ...@@ -2,25 +2,25 @@
<div id="panel"> <div id="panel">
<div id="ar-div" class="panel-child"></div> <div id="ar-div" class="panel-child"></div>
<div v-if="outTime" class="errorContent"> <div v-if="outTime" class="errorContent">
<h-empty> <!-- <h-empty>-->
<template #img> <!-- <template #img>-->
<h-empty-error-control /> <!-- <h-empty-error-control />-->
</template> <!-- </template>-->
<template #description> <!-- <template #description>-->
<p v-if="!connectError && outTime"> <!-- <p v-if="!connectError && outTime">-->
正在尝试第 {{ outTime }}次建立连接 <!-- 正在尝试第 {{ outTime }}次建立连接-->
</p> <!-- </p>-->
<p v-else-if="connectError&&loginFailure"> <!-- <p v-else-if="connectError&&loginFailure">-->
{{ loginFailedText }} <!-- {{ loginFailedText }}-->
</p> <!-- </p>-->
<p v-else-if="connectError"> <!-- <p v-else-if="connectError">-->
连接失败! 请检查客户端是否安装并开启 <!-- 连接失败! 请检查客户端是否安装并开启-->
<el-button type="link" @click="jumpTo"> <!-- <el-button type="link" @click="jumpTo">-->
去下载 <!-- 去下载-->
</el-button> <!-- </el-button>-->
</p> <!-- </p>-->
</template> <!-- </template>-->
</h-empty> <!-- </h-empty>-->
<p></p> <p></p>
</div> </div>
</div> </div>
...@@ -36,6 +36,7 @@ export default { ...@@ -36,6 +36,7 @@ export default {
props: {}, props: {},
data() { data() {
return { return {
raData: {},
control: null, control: null,
ip: "", ip: "",
port: "", port: "",
...@@ -80,34 +81,34 @@ export default { ...@@ -80,34 +81,34 @@ export default {
this.control = null; this.control = null;
} }
const loginType = 3; const loginType = 3;
const ip = this.ip; const ip = '111.160.132.74';
const port = this.port; const port = this.raData.port;
const userName = this.userInfo.userId; const userName = this.raData.username;
const credential = this.userInfo.tgc; const loginKey = this.raData.tgc;
const indexCode = ""; const left = '10';
const wsPort = "7789"; const top = '100';
const domainId = this.domainId; const width = '1900';
const protocolType = this.protocolType const height = '953';
// const protocolType = this.protocolType
const protocolType = 'https'
const domainId = 103
const title = 'AR车间'
this.control = new ARWebControl( this.control = new ARWebControl(
"ar-div", "ar-div",
loginType, loginType,
ip, ip,
port, port,
userName, userName,
credential, loginKey,
indexCode, left,
wsPort, top,
width,
height,
protocolType,
domainId, domainId,
protocolType title,
); );
console.log("params--", { console.log('this.control',this.control)
loginType,
ip,
port,
userName,
credential,
domainId
});
window.addEventListener("ar_loaded", event => { window.addEventListener("ar_loaded", event => {
if (event.detail.loadingStatus) { if (event.detail.loadingStatus) {
this.outTime = 0; this.outTime = 0;
...@@ -141,10 +142,13 @@ export default { ...@@ -141,10 +142,13 @@ export default {
}, },
async getClientInfo() { async getClientInfo() {
try { try {
const { code, data } = await getLoginTgc(); const { status, data } = await getLoginTgc();
if (code === "0") { console.log('data',JSON.parse(data))
this.userInfo = data.currentUser || {}; if (status === 0) {
this.domainId = data.domainId; // this.userInfo = data.currentUser || {};
// this.domainId = data.domainId;
this.raData = JSON.parse(data).data
console.log('this.raData',this.raData)
this.init(); this.init();
} }
} catch (error) { } catch (error) {
......
...@@ -509,7 +509,11 @@ import store from "@/store/index.js"; ...@@ -509,7 +509,11 @@ import store from "@/store/index.js";
* @param ip{String} 平台ip * @param ip{String} 平台ip
* @param port{String} 平台端口 * @param port{String} 平台端口
* @param userName{String} 用户名 * @param userName{String} 用户名
* @param credentials{String} 登录凭据(密码/SG/TGT) * @param loginKey
* @param left
* @param top
* @param width
* @param height
* @param arIndexCode{String} 默认显示场景IndexCode * @param arIndexCode{String} 默认显示场景IndexCode
* @param webSocketPort{String} 默认显示场景IndexCode * @param webSocketPort{String} 默认显示场景IndexCode
* @param domainId{String} 默认显示场景IndexCode * @param domainId{String} 默认显示场景IndexCode
...@@ -523,11 +527,15 @@ import store from "@/store/index.js"; ...@@ -523,11 +527,15 @@ import store from "@/store/index.js";
ip, ip,
port, port,
userName, userName,
credentials, loginKey,
left,
top,
width,
height,
protocolType,
domainId,
arIndexCode, arIndexCode,
webSocketPort, webSocketPort,
domainId,
protocolType
) { ) {
// var arIndexCode = // var arIndexCode =
// arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '' // arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : ''
...@@ -549,11 +557,11 @@ import store from "@/store/index.js"; ...@@ -549,11 +557,11 @@ import store from "@/store/index.js";
this.arControlVisibility = false this.arControlVisibility = false
this.arDivVisibility = true this.arDivVisibility = true
var _this$_getDomPosition = this._getDomPosition(), // var _this$_getDomPosition = this._getDomPosition(),
left = _this$_getDomPosition.left, // left = _this$_getDomPosition.left,
top = _this$_getDomPosition.top, // top = _this$_getDomPosition.top,
width = _this$_getDomPosition.width, // width = _this$_getDomPosition.width,
height = _this$_getDomPosition.height // height = _this$_getDomPosition.height
this.controlSetupDom = document.createElement('a') this.controlSetupDom = document.createElement('a')
var title = window.top.document.title var title = window.top.document.title
...@@ -567,15 +575,17 @@ import store from "@/store/index.js"; ...@@ -567,15 +575,17 @@ import store from "@/store/index.js";
// } // }
if (loginType == 0 || loginType == 1) { if (loginType == 0 || loginType == 1) {
this.controlSetupDom.href = `PCCloudVideoLabel://UP --ip ${ip} --port ${port} --user-name ${userName} --login-key ${credentials} --start-plan-id ${arIndexCode} --left ${left} --top ${top} --width ${width} --height ${height} --login-method password --domain-id ${domainId} --protocolType ${protocolType} --title ${title}` this.controlSetupDom.href = `PCCloudVideoLabel://UP --ip ${ip} --port ${port} --user-name ${userName} --login-key ${loginKey} --start-plan-id ${arIndexCode} --left ${left} --top ${top} --width ${width} --height ${height} --login-method password --domain-id ${domainId} --protocolType ${protocolType} --title ${title}`
} else if (loginType == 2) { } else if (loginType == 2) {
this.controlSetupDom.href = `PCCloudVideoLabel://UP --ip ${ip} --port ${port} --user-name ${userName} --login-key ${credentials} --start-plan-id ${arIndexCode} --left ${left} --top ${top} --width ${width} --height ${height} --login-method sg --domain-id ${domainId} --protocolType ${protocolType} --title ${title}` this.controlSetupDom.href = `PCCloudVideoLabel://UP --ip ${ip} --port ${port} --user-name ${userName} --login-key ${loginKey} --start-plan-id ${arIndexCode} --left ${left} --top ${top} --width ${width} --height ${height} --login-method sg --domain-id ${domainId} --protocolType ${protocolType} --title ${title}`
} else if (loginType == 3) { } else if (loginType == 3) {
this.controlSetupDom.href = `PCCloudVideoLabel://UP --ip ${ip} --port ${port} --user-name ${userName} --login-key ${credentials} --start-plan-id ${arIndexCode} --left ${left} --top ${top} --width ${width} --height ${height} --login-method tgc --domain-id ${domainId} --protocolType ${protocolType} --title ${title}` const href = `PCCloudVideoLabel://UP --ip ${ip} --port ${port} --user-name ${userName} --login-key ${loginKey} --left ${left} --top ${top} --width ${width} --height ${height} --login-method tgc --domain-id ${domainId} --protocolType ${protocolType} --title ${title}`
console.log('hrefaaaaaaaaaaaaaaaaaaaaaa',href)
this.controlSetupDom.href = encodeURI(href)
} }
console.log('href------', this.controlSetupDom.href) console.log('href------', this.controlSetupDom.href)
this.webSocketPort = webSocketPort this.webSocketPort = '7789'
this.lastPosition = { this.lastPosition = {
x: left, x: left,
y: top, y: top,
...@@ -612,10 +622,10 @@ import store from "@/store/index.js"; ...@@ -612,10 +622,10 @@ import store from "@/store/index.js";
canRun = false canRun = false
setTimeout(function() { setTimeout(function() {
var _this$_getDomPosition2 = _this._getDomPosition(), var _this$_getDomPosition2 = _this._getDomPosition(),
left = _this$_getDomPosition2.left, left = '103',
top = _this$_getDomPosition2.top, top = '103',
width = _this$_getDomPosition2.width, width = '1919',
height = _this$_getDomPosition2.height height = '937'
_this.setPosition(left, top, width, height) _this.setPosition(left, top, width, height)
...@@ -728,10 +738,10 @@ import store from "@/store/index.js"; ...@@ -728,10 +738,10 @@ import store from "@/store/index.js";
this.timer = setInterval(function() { this.timer = setInterval(function() {
var _this$_getDomPosition3 = _this._getDomPosition(), var _this$_getDomPosition3 = _this._getDomPosition(),
left = _this$_getDomPosition3.left, left = '103',
top = _this$_getDomPosition3.top, top = '103',
width = _this$_getDomPosition3.width, width = '1919',
height = _this$_getDomPosition3.height height = '937'
if ( if (
_this.lastPosition.x != left || _this.lastPosition.x != left ||
...@@ -798,6 +808,7 @@ import store from "@/store/index.js"; ...@@ -798,6 +808,7 @@ import store from "@/store/index.js";
if (this.arStartedFlag) { if (this.arStartedFlag) {
console.warn('已启动AR实例,请勿重复启动实例') console.warn('已启动AR实例,请勿重复启动实例')
} else { } else {
console.log('11111111111111111111111111111111')
this.controlSetupDom.click() this.controlSetupDom.click()
this._initWebSocket() this._initWebSocket()
...@@ -861,7 +872,6 @@ import store from "@/store/index.js"; ...@@ -861,7 +872,6 @@ import store from "@/store/index.js";
key: '_initWebSocket', key: '_initWebSocket',
value: function _initWebSocket() { value: function _initWebSocket() {
var _this2 = this var _this2 = this
this.ws = new WebSocket(ConstantConfig.WEBSOCKET_URL + ':' + this.webSocketPort) this.ws = new WebSocket(ConstantConfig.WEBSOCKET_URL + ':' + this.webSocketPort)
this.ws.onopen = function() { this.ws.onopen = function() {
......
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