内网部署
This commit is contained in:
7
hd-glasses-app/.env.company
Normal file
7
hd-glasses-app/.env.company
Normal file
@@ -0,0 +1,7 @@
|
||||
VUE_APP_MAP_URL='https://192.168.2.181/geoserver'
|
||||
VUE_APP_MAP_AUTHKEY='30efbafe-d218-4d77-8200-0207246924be'
|
||||
VUE_APP_API="https://192.168.2.181/znzq"
|
||||
VUE_APP_STATIC_FILE_Prefix='//192.168.2.181/static_file'
|
||||
VUE_APP_SRS_URL='webrtc://192.168.2.181/'
|
||||
VUE_APP_IM_API_URL='https://192.168.2.181/im_api/v1'
|
||||
VUE_APP_MAP_ROUTE='https://192.168.2.181/route'
|
||||
@@ -1,7 +1,8 @@
|
||||
VUE_APP_MAP_URL='http://82.157.23.170:8600/geoserver'
|
||||
VUE_APP_MAP_AUTHKEY='9b488ac6-5309-4ef4-ab99-2180d2da161d'
|
||||
VUE_APP_API="http://work.ii999.live:19002/znzq"
|
||||
VUE_APP_STATIC_FILE_Prefix='//119.45.242.222/static_file'
|
||||
VUE_APP_SRS_URL='webrtc://119.45.242.222/'
|
||||
VUE_APP_STATIC_FILE_Prefix='//192.168.2.181/static_file'
|
||||
VUE_APP_SRS_URL='webrtc://192.168.2.181/'
|
||||
|
||||
VUE_APP_IM_API_URL='https://dev.shudong.xyz/im_api/v1'
|
||||
VUE_APP_IM_API_URL='https://192.168.2.181/im_api/v1'
|
||||
VUE_APP_MAP_ROUTE='https://172.16.3.18/geoserver'
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
VUE_APP_MAP_URL='https://172.16.3.18/geoserver'
|
||||
|
||||
VUE_APP_MAP_AUTHKEY='30efbafe-d218-4d77-8200-0207246924be'
|
||||
VUE_APP_API="https://172.16.3.18/znzq"
|
||||
VUE_APP_STATIC_FILE_Prefix='//172.16.3.18/static_file'
|
||||
VUE_APP_SRS_URL='webrtc://172.16.3.18/'
|
||||
VUE_APP_IM_API_URL='https://172.16.3.18/im_api/v1'
|
||||
VUE_APP_MAP_ROUTE='https://172.16.3.18/route'
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"serve": "vue-cli-service serve --mode dev",
|
||||
"prod-serve": "vue-cli-service serve --mode hd",
|
||||
"build:hd": "vue-cli-service build --mode hd && node deployHD.js",
|
||||
"build:company": "vue-cli-service build --mode company",
|
||||
"build:online": "vue-cli-service build --mode dev",
|
||||
"lint": "vue-cli-service lint"
|
||||
},
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="">
|
||||
<head>
|
||||
<script type="text/javascript" src="https://172.16.3.18/static_file/vconsole.min.js"></script>
|
||||
<!-- <script type="text/javascript" src="https://192.168.2.181/static_file/vconsole.min.js"></script>-->
|
||||
<script>
|
||||
var vConsole = new VConsole();
|
||||
// var vConsole = new VConsole();
|
||||
console.log('Hello world');
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
|
||||
@@ -36,7 +36,7 @@ function SrsRtcPublisherAsync() {
|
||||
|
||||
self.turn = {
|
||||
iceServers: [{
|
||||
urls: 'turns:172.16.3.18:3478', 'credential': 'huashiai',
|
||||
urls: 'turn:120.79.18.123:3478', 'credential': 'mars23600800',
|
||||
'username': 'huashiai'
|
||||
}]
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import utils from './utils/publicFun';
|
||||
// import utils from './utils/publicFun';
|
||||
import router from './router'
|
||||
|
||||
import axios from 'axios'
|
||||
@@ -15,7 +15,7 @@ import 'amfe-flexible';
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
Vue.prototype.$utils = utils;
|
||||
// Vue.prototype.$utils = utils;
|
||||
|
||||
new Vue({
|
||||
render: h => h(App),
|
||||
|
||||
@@ -289,12 +289,12 @@ export default {
|
||||
this.beginPublish()
|
||||
},
|
||||
switchCamera() {
|
||||
if(this.client="app"){
|
||||
/* if(this.client="app"){
|
||||
location.href = "uniwebview://action?function=callRoomFuns¶ms1=switchCamara"
|
||||
console.log("发送切换摄像头通知")
|
||||
return false;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
let self = this;
|
||||
self.cameraIndex = self.cameraIndex + 1 == self.cameraDevices.length ? 0 : self.cameraIndex + 1
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
|
||||
navigator.mediaDevices.enumerateDevices().then(this.gotDevices).catch(this.handleError);
|
||||
|
||||
if(this.client=="app"){
|
||||
/* if(this.client=="app"){
|
||||
if(this.constraints.video==false){
|
||||
console.log("发送关闭摄像头通知")
|
||||
location.href = "uniwebview://action?function=callRoomFuns¶ms1=closeCamara"
|
||||
@@ -360,7 +360,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
if (_this.publishSdk) {
|
||||
_this.publishSdk.close();
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ export default {
|
||||
isCanDraw: true,
|
||||
from: "",
|
||||
routeType: "car",
|
||||
longpress: false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -180,7 +181,6 @@ export default {
|
||||
case "pcPlanningPath":
|
||||
this.pcDrawType = "LineString";
|
||||
window.addEventListener('message', (event) => {
|
||||
|
||||
this.isCanDraw = false
|
||||
console.log(event.data)
|
||||
if (this.parentPostMessageData.length == 0) {
|
||||
@@ -205,7 +205,7 @@ export default {
|
||||
if (event.data instanceof Array) {
|
||||
this.map.removeLayer(this.drawPlanningPathLayer);
|
||||
this.parentPostMessageData = event.data;
|
||||
this.drawPcPostMessageDataLayer()
|
||||
this.drawPcPostMessageDataLayer();
|
||||
} else {
|
||||
this.isCanDraw = true;
|
||||
}
|
||||
@@ -360,22 +360,68 @@ export default {
|
||||
zoom: 16,
|
||||
}),
|
||||
});
|
||||
this.map.on('singleclick', e => {
|
||||
this.map.forEachFeatureAtPixel(
|
||||
e.pixel,
|
||||
(feature) => {
|
||||
console.log("Feature被点击了")
|
||||
console.log(feature)
|
||||
if (feature.values_.type == 'alarm') {
|
||||
this.alarmDetailsData = feature.values_.data;
|
||||
this.alarmDetailsOverlay = true;
|
||||
|
||||
if (this.pageType == "mini") {
|
||||
|
||||
var _this = this;
|
||||
this.map.on("click", function (e) {
|
||||
(_this.longpress) ? console.log("Long Press") : console.log("Short Press")
|
||||
|
||||
if (_this.longpress) {
|
||||
|
||||
console.log(e)
|
||||
console.log(e.coordinate)
|
||||
|
||||
const startPoint = ol.proj.transform(e.coordinate, 'EPSG:3857', 'EPSG:4326');
|
||||
location.href = "uniwebview://action?function=homeAddAlarmPoint¶ms1=" + JSON.stringify(startPoint);
|
||||
|
||||
} else {
|
||||
_this.map.forEachFeatureAtPixel(
|
||||
e.pixel,
|
||||
(feature) => {
|
||||
console.log("Feature被点击了")
|
||||
console.log(feature)
|
||||
if (feature.values_.type == 'alarm') {
|
||||
_this.alarmDetailsData = feature.values_.data;
|
||||
_this.alarmDetailsOverlay = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
hitTolerance: 30
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
});
|
||||
var startTime, endTime;
|
||||
this.map.on('pointerdown', function () {
|
||||
|
||||
startTime = new Date().getTime();
|
||||
});
|
||||
this.map.on('pointerup', function () {
|
||||
endTime = new Date().getTime();
|
||||
console.log(endTime - startTime);
|
||||
_this.longpress = (endTime - startTime < 500) ? false : true;
|
||||
});
|
||||
|
||||
} else {
|
||||
this.map.on('singleclick', e => {
|
||||
this.map.forEachFeatureAtPixel(
|
||||
e.pixel,
|
||||
(feature) => {
|
||||
console.log("Feature被点击了")
|
||||
console.log(feature)
|
||||
if (feature.values_.type == 'alarm') {
|
||||
this.alarmDetailsData = feature.values_.data;
|
||||
this.alarmDetailsOverlay = true;
|
||||
}
|
||||
},
|
||||
{
|
||||
hitTolerance: 30
|
||||
}
|
||||
},
|
||||
{
|
||||
hitTolerance: 30
|
||||
}
|
||||
);
|
||||
});
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
@@ -392,7 +438,7 @@ export default {
|
||||
planningPathCar() {
|
||||
const startPoint = ol.proj.transform(this.navigationStartPoint, 'EPSG:4326', 'EPSG:3857');
|
||||
const endPoint = ol.proj.transform(this.navigationEndPoint, 'EPSG:4326', 'EPSG:3857');
|
||||
let _url = "https://172.16.3.18/route/v0/driving/"
|
||||
let _url = process.env.VUE_APP_MAP_ROUTE +"/v0/driving/"
|
||||
_url = _url + this.navigationStartPoint[0] + ","
|
||||
_url = _url + this.navigationStartPoint[1] + ";"
|
||||
_url = _url + this.navigationEndPoint[0] + ","
|
||||
@@ -479,7 +525,8 @@ export default {
|
||||
planningPathFoot() {
|
||||
const startPoint = ol.proj.transform(this.navigationStartPoint, 'EPSG:4326', 'EPSG:3857');
|
||||
const endPoint = ol.proj.transform(this.navigationEndPoint, 'EPSG:4326', 'EPSG:3857');
|
||||
let _url = "https://172.16.3.18/route/v1/driving/"
|
||||
// let _url = "https://192.168.2.181/route/v1/driving/"
|
||||
let _url = process.env.VUE_APP_MAP_ROUTE +"/v1/driving/"
|
||||
_url = _url + this.navigationStartPoint[0] + ","
|
||||
_url = _url + this.navigationStartPoint[1] + ";"
|
||||
_url = _url + this.navigationEndPoint[0] + ","
|
||||
@@ -928,10 +975,12 @@ export default {
|
||||
// 图层添加到地图上
|
||||
this.map.addLayer(this.alarmLayer);
|
||||
var flag = true
|
||||
this.alarmAnimation = setInterval(() => {
|
||||
flag = !flag
|
||||
this.alarmLayer.setVisible(flag)
|
||||
}, 1500);
|
||||
/*
|
||||
this.alarmAnimation = setInterval(() => {
|
||||
flag = !flag
|
||||
this.alarmLayer.setVisible(flag)
|
||||
}, 1500);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -944,6 +993,7 @@ export default {
|
||||
//临时智慧所,小红旗
|
||||
if (record.alarmCategory == "1706273001850601474") {
|
||||
// 设置要素的图标
|
||||
|
||||
feature.setStyle(
|
||||
new Style({
|
||||
// 设置图片效果
|
||||
@@ -1092,13 +1142,13 @@ export default {
|
||||
if (index == 2) {
|
||||
location.href = "uniwebview://action?function=alarmPlanningAction¶ms1=" + this.alarmDetailsData.id + "¶ms2=" + this.alarmDetailsData.location;
|
||||
}
|
||||
}catch (e) {
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
|
||||
setTimeout(()=>{
|
||||
this.alarmDetailsOverlay=false
|
||||
},1000)
|
||||
setTimeout(() => {
|
||||
this.alarmDetailsOverlay = false
|
||||
}, 1000)
|
||||
|
||||
|
||||
},
|
||||
|
||||
@@ -541,7 +541,6 @@ export default {
|
||||
vectorSource.addFeature(polygonFeature);
|
||||
}
|
||||
|
||||
|
||||
// 矢量地图
|
||||
this.drawPlanningPathLayer = new VectorLayer({
|
||||
source: vectorSource,
|
||||
|
||||
Reference in New Issue
Block a user