|
@@ -17,6 +17,7 @@ window.benchListInterval = null;
|
|
window.otherInterval = null;
|
|
window.otherInterval = null;
|
|
var fbxLoader1Loaded = false;
|
|
var fbxLoader1Loaded = false;
|
|
var fbxLoader2Loaded = false;
|
|
var fbxLoader2Loaded = false;
|
|
|
|
+var oldStatus = '';
|
|
|
|
|
|
let textureLoader = new THREE.TextureLoader();
|
|
let textureLoader = new THREE.TextureLoader();
|
|
let textureReady = textureLoader.load('../images/location_ready.png');
|
|
let textureReady = textureLoader.load('../images/location_ready.png');
|
|
@@ -135,6 +136,12 @@ function getsqlData(sdkInstance, uwbInstance, bAddModel) {
|
|
let show_remote_button = item.show_remote_button;
|
|
let show_remote_button = item.show_remote_button;
|
|
// 添加水滴
|
|
// 添加水滴
|
|
let benchList = window.store ? window.store.getters['benchList/getBenchList'] : [];
|
|
let benchList = window.store ? window.store.getters['benchList/getBenchList'] : [];
|
|
|
|
+
|
|
|
|
+ let statusList = benchList.map(b => b.status).join();
|
|
|
|
+ if (statusList == oldStatus) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
let benchIdList = window.store.getters['benchList/getBenchList'].map(m => m.id);
|
|
let benchIdList = window.store.getters['benchList/getBenchList'].map(m => m.id);
|
|
let currentBench = benchList.find(b => b.id == bench_id);
|
|
let currentBench = benchList.find(b => b.id == bench_id);
|
|
let texture = null;
|
|
let texture = null;
|
|
@@ -332,7 +339,7 @@ function getsqlData(sdkInstance, uwbInstance, bAddModel) {
|
|
|
|
|
|
console.log('添加模型和水滴1111')
|
|
console.log('添加模型和水滴1111')
|
|
if (benchIdList.indexOf(Number(bench_id)) > 0) {
|
|
if (benchIdList.indexOf(Number(bench_id)) > 0) {
|
|
- if (window.benchMeshMap[bench_id]) {
|
|
|
|
|
|
+ if (!window.benchMeshMap[bench_id]) {
|
|
window.benchMeshMap[bench_id] = childMeshTmp;
|
|
window.benchMeshMap[bench_id] = childMeshTmp;
|
|
sdkInstance.sceneRenderer.scene.add(childMeshTmp)
|
|
sdkInstance.sceneRenderer.scene.add(childMeshTmp)
|
|
}
|
|
}
|
|
@@ -459,7 +466,7 @@ function getsqlData(sdkInstance, uwbInstance, bAddModel) {
|
|
};
|
|
};
|
|
childMeshTmp.userData = customData;
|
|
childMeshTmp.userData = customData;
|
|
|
|
|
|
- if (window.benchMeshMap[bench_id]) {
|
|
|
|
|
|
+ if (!window.benchMeshMap[bench_id]) {
|
|
window.benchMeshMap[bench_id] = childMeshTmp;
|
|
window.benchMeshMap[bench_id] = childMeshTmp;
|
|
sdkInstance.sceneRenderer.scene.add(childMeshTmp)
|
|
sdkInstance.sceneRenderer.scene.add(childMeshTmp)
|
|
}
|
|
}
|
|
@@ -793,6 +800,11 @@ export function uwbMain(domId, modelWidth, modelHeight, finalMode, callback) {
|
|
let benchIdList = window.store.getters['benchList/getBenchList'].map(m => m.id);
|
|
let benchIdList = window.store.getters['benchList/getBenchList'].map(m => m.id);
|
|
if (benchIdList.length > 0) {
|
|
if (benchIdList.length > 0) {
|
|
// clearInterval(benchListInterval)
|
|
// clearInterval(benchListInterval)
|
|
|
|
+ let statusList = benchIdList.map(b => b.status).join();
|
|
|
|
+ if (statusList == oldStatus) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ oldStatus = statusList;
|
|
getsqlData(sdkInstance, uwbInstance, false)
|
|
getsqlData(sdkInstance, uwbInstance, false)
|
|
}
|
|
}
|
|
}, 6 * 1000);
|
|
}, 6 * 1000);
|