diff --git a/src/api/system/tanchuang.js b/src/api/system/tanchuang.js
index 39ba563..577f8ef 100644
--- a/src/api/system/tanchuang.js
+++ b/src/api/system/tanchuang.js
@@ -89,3 +89,12 @@
});business
}
+
+// 模型点位 /pointGetData/list
+export function pointGetDataList(query) {
+ return request({
+ url: '/business/pointGetData/list',
+ method: 'get',
+ params: query,
+ });
+}
diff --git a/src/api/system/tanchuang.js b/src/api/system/tanchuang.js
index 39ba563..577f8ef 100644
--- a/src/api/system/tanchuang.js
+++ b/src/api/system/tanchuang.js
@@ -89,3 +89,12 @@
});business
}
+
+// 模型点位 /pointGetData/list
+export function pointGetDataList(query) {
+ return request({
+ url: '/business/pointGetData/list',
+ method: 'get',
+ params: query,
+ });
+}
diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue
index 74482c8..d7e316e 100644
--- a/src/views/oneMap/BIM/Tunnel.vue
+++ b/src/views/oneMap/BIM/Tunnel.vue
@@ -5,9 +5,13 @@
{{ item.name }}
-
-
{{ val.name + ':' }}
-
{{ val.value + ' ' + val.unit }}
+
+
{{ val.phy + ':' }}
+
{{ val.data + ' ' + val.unit }}
+
+
+
{{ '检测时间:' }}
+
{{ item.dataTime }}
@@ -30,6 +34,8 @@
import { CSSRulePlugin } from 'gsap/CSSRulePlugin';
import bus from '@/bus';
+import { pointGetDataList } from '@/api/system/tanchuang';
+
const show = ref('');
const width = ref(null);
const height = ref(null);
@@ -51,19 +57,10 @@
z: -140,
},
icon: '/Three/icon/wyj_mx.png',
- data: [
- {
- name: '应变量',
- value: '17',
- unit: 'με',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
show: false,
+ pointCode: 'kohqORm',
+ dataTime: '',
},
{
name: '激光位移计',
@@ -75,19 +72,10 @@
z: -85,
},
icon: '/Three/icon/wyj_mx.png',
- data: [
- {
- name: '应变量',
- value: '17',
- unit: 'με',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
show: false,
+ pointCode: 'LtfAqBh',
+ dataTime: '',
},
{
name: '静力水准仪',
@@ -98,18 +86,10 @@
z: -90,
},
icon: '/Three/icon/jlszy_icon.png',
- data: [
- {
- name: '挠度变化值',
- value: '-0.01',
- unit: 'mm',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
+ show: false,
+ pointCode: 'xr8JcRb',
+ dataTime: '',
},
{
name: '静力水准仪',
@@ -120,18 +100,10 @@
z: -90,
},
icon: '/Three/icon/jlszy_icon.png',
- data: [
- {
- name: '挠度变化值',
- value: '-0.01',
- unit: 'mm',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
+ show: false,
+ pointCode: 'zkbTwJW',
+ dataTime: '',
},
{
name: '应变计',
@@ -142,40 +114,24 @@
z: 0,
},
icon: '/Three/icon/ybj_icon.png',
- data: [
- {
- name: '应变量',
- value: '17',
- unit: 'με',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
+ show: false,
+ pointCode: '13G1Hnc',
+ dataTime: '',
},
{
- name: "裂缝计",
+ name: '裂缝计',
id: `YuanDian6`,
position: {
x: -900,
y: 80,
z: -210,
},
- icon: "/Three/icon/lfj_mx.png",
- data: [
- {
- name: "绝对沉降",
- value: "2.67",
- unit: "mm",
- },
- {
- name: "相对沉降",
- value: "2.96",
- unit: "mm",
- },
- ],
+ icon: '/Three/icon/lfj_mx.png',
+ data: [],
+ show: false,
+ pointCode: 'WAB89Dk',
+ dataTime: '',
},
]);
const deviceCode = ref(null);
@@ -190,9 +146,6 @@
const clock = new THREE.Clock();
const threeDom = ref(null);
const cameraPosition = {
- // x: 457.66301930145875,
- // y: 397.5473109836439,
- // z: 943.8703438418463,
x: -2200.221584999469584,
y: 200.590211176632594,
z: 600.665579736149148,
@@ -415,8 +368,8 @@
LabelRenderer.value.render(Scene, Camera.value);
const delta = clock.getDelta();
// 如需调试请打开这个获取Camera,Controls 的值
- console.log('Camera.value', Camera.value);
- console.log('Controls.value', Controls.value);
+ // console.log('Camera.value', Camera.value);
+ // console.log('Controls.value', Controls.value);
};
// 创建气泡窗
@@ -505,7 +458,7 @@
duration: 3,
ease: 'power4.out',
});
- }else if (data.name.includes('裂缝计')) {
+ } else if (data.name.includes('裂缝计')) {
gsap.to(Camera.value.position, {
x: -1530.357885036637,
y: 356.99171737793193,
@@ -533,6 +486,29 @@
});
};
+// 获取点位信息
+const getPonintInfo = () => {
+ const promises = labelData.value.map(item => {
+ return pointGetDataList({ pointCode: item.pointCode }).then(res => {
+ // 检测时间
+ const timeWithDate = res.data.find(time => time.dataTime);
+ if (timeWithDate) {
+ item.dataTime = timeWithDate.dataTime;
+ }
+ return { ...item, data: res.data };
+ });
+ });
+
+ Promise.all(promises)
+ .then(updatedItems => {
+ labelData.value = updatedItems;
+ console.log("🚀 ~ getPonintInfo ~ updatedItems:", updatedItems)
+ })
+ .catch(error => {
+ console.error('请求出错:labelData.value', error);
+ });
+};
+
onBeforeMount(() => {
// initGltfFloor();
// initModal('ChangJing', '/Gltf/ChuWangCheng.gltf');
@@ -544,6 +520,7 @@
});
});
onMounted(() => {
+ getPonintInfo();
nextTick(() => {
if (document.readyState === 'complete') {
createLable();
@@ -621,7 +598,7 @@
position: absolute;
left: calc(50% + 19px);
bottom: 12px;
- width: 45px;
+ width: 60px;
// height: 26px;
background: linear-gradient(0deg, rgba(12, 54, 92, 0.6) 0%, rgba(12, 54, 92, 0.6) 100%);
border-radius: 2px;
diff --git a/src/api/system/tanchuang.js b/src/api/system/tanchuang.js
index 39ba563..577f8ef 100644
--- a/src/api/system/tanchuang.js
+++ b/src/api/system/tanchuang.js
@@ -89,3 +89,12 @@
});business
}
+
+// 模型点位 /pointGetData/list
+export function pointGetDataList(query) {
+ return request({
+ url: '/business/pointGetData/list',
+ method: 'get',
+ params: query,
+ });
+}
diff --git a/src/views/oneMap/BIM/Tunnel.vue b/src/views/oneMap/BIM/Tunnel.vue
index 74482c8..d7e316e 100644
--- a/src/views/oneMap/BIM/Tunnel.vue
+++ b/src/views/oneMap/BIM/Tunnel.vue
@@ -5,9 +5,13 @@
{{ item.name }}
-
-
{{ val.name + ':' }}
-
{{ val.value + ' ' + val.unit }}
+
+
{{ val.phy + ':' }}
+
{{ val.data + ' ' + val.unit }}
+
+
+
{{ '检测时间:' }}
+
{{ item.dataTime }}
@@ -30,6 +34,8 @@
import { CSSRulePlugin } from 'gsap/CSSRulePlugin';
import bus from '@/bus';
+import { pointGetDataList } from '@/api/system/tanchuang';
+
const show = ref('');
const width = ref(null);
const height = ref(null);
@@ -51,19 +57,10 @@
z: -140,
},
icon: '/Three/icon/wyj_mx.png',
- data: [
- {
- name: '应变量',
- value: '17',
- unit: 'με',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
show: false,
+ pointCode: 'kohqORm',
+ dataTime: '',
},
{
name: '激光位移计',
@@ -75,19 +72,10 @@
z: -85,
},
icon: '/Three/icon/wyj_mx.png',
- data: [
- {
- name: '应变量',
- value: '17',
- unit: 'με',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
show: false,
+ pointCode: 'LtfAqBh',
+ dataTime: '',
},
{
name: '静力水准仪',
@@ -98,18 +86,10 @@
z: -90,
},
icon: '/Three/icon/jlszy_icon.png',
- data: [
- {
- name: '挠度变化值',
- value: '-0.01',
- unit: 'mm',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
+ show: false,
+ pointCode: 'xr8JcRb',
+ dataTime: '',
},
{
name: '静力水准仪',
@@ -120,18 +100,10 @@
z: -90,
},
icon: '/Three/icon/jlszy_icon.png',
- data: [
- {
- name: '挠度变化值',
- value: '-0.01',
- unit: 'mm',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
+ show: false,
+ pointCode: 'zkbTwJW',
+ dataTime: '',
},
{
name: '应变计',
@@ -142,40 +114,24 @@
z: 0,
},
icon: '/Three/icon/ybj_icon.png',
- data: [
- {
- name: '应变量',
- value: '17',
- unit: 'με',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
+ show: false,
+ pointCode: '13G1Hnc',
+ dataTime: '',
},
{
- name: "裂缝计",
+ name: '裂缝计',
id: `YuanDian6`,
position: {
x: -900,
y: 80,
z: -210,
},
- icon: "/Three/icon/lfj_mx.png",
- data: [
- {
- name: "绝对沉降",
- value: "2.67",
- unit: "mm",
- },
- {
- name: "相对沉降",
- value: "2.96",
- unit: "mm",
- },
- ],
+ icon: '/Three/icon/lfj_mx.png',
+ data: [],
+ show: false,
+ pointCode: 'WAB89Dk',
+ dataTime: '',
},
]);
const deviceCode = ref(null);
@@ -190,9 +146,6 @@
const clock = new THREE.Clock();
const threeDom = ref(null);
const cameraPosition = {
- // x: 457.66301930145875,
- // y: 397.5473109836439,
- // z: 943.8703438418463,
x: -2200.221584999469584,
y: 200.590211176632594,
z: 600.665579736149148,
@@ -415,8 +368,8 @@
LabelRenderer.value.render(Scene, Camera.value);
const delta = clock.getDelta();
// 如需调试请打开这个获取Camera,Controls 的值
- console.log('Camera.value', Camera.value);
- console.log('Controls.value', Controls.value);
+ // console.log('Camera.value', Camera.value);
+ // console.log('Controls.value', Controls.value);
};
// 创建气泡窗
@@ -505,7 +458,7 @@
duration: 3,
ease: 'power4.out',
});
- }else if (data.name.includes('裂缝计')) {
+ } else if (data.name.includes('裂缝计')) {
gsap.to(Camera.value.position, {
x: -1530.357885036637,
y: 356.99171737793193,
@@ -533,6 +486,29 @@
});
};
+// 获取点位信息
+const getPonintInfo = () => {
+ const promises = labelData.value.map(item => {
+ return pointGetDataList({ pointCode: item.pointCode }).then(res => {
+ // 检测时间
+ const timeWithDate = res.data.find(time => time.dataTime);
+ if (timeWithDate) {
+ item.dataTime = timeWithDate.dataTime;
+ }
+ return { ...item, data: res.data };
+ });
+ });
+
+ Promise.all(promises)
+ .then(updatedItems => {
+ labelData.value = updatedItems;
+ console.log("🚀 ~ getPonintInfo ~ updatedItems:", updatedItems)
+ })
+ .catch(error => {
+ console.error('请求出错:labelData.value', error);
+ });
+};
+
onBeforeMount(() => {
// initGltfFloor();
// initModal('ChangJing', '/Gltf/ChuWangCheng.gltf');
@@ -544,6 +520,7 @@
});
});
onMounted(() => {
+ getPonintInfo();
nextTick(() => {
if (document.readyState === 'complete') {
createLable();
@@ -621,7 +598,7 @@
position: absolute;
left: calc(50% + 19px);
bottom: 12px;
- width: 45px;
+ width: 60px;
// height: 26px;
background: linear-gradient(0deg, rgba(12, 54, 92, 0.6) 0%, rgba(12, 54, 92, 0.6) 100%);
border-radius: 2px;
diff --git a/src/views/oneMap/BIM/WangJiaPIng.vue b/src/views/oneMap/BIM/WangJiaPIng.vue
index cd56446..48d8f39 100644
--- a/src/views/oneMap/BIM/WangJiaPIng.vue
+++ b/src/views/oneMap/BIM/WangJiaPIng.vue
@@ -5,9 +5,13 @@
{{ item.name }}
-
-
{{ val.name + ':' }}
-
{{ val.value + ' ' + val.unit }}
+
+
{{ val.phy + ':' }}
+
{{ val.data + ' ' + val.unit }}
+
+
+
{{ '检测时间:' }}
+
{{ item.dataTime }}
@@ -29,6 +33,9 @@
import gsap from 'gsap';
import { CSSRulePlugin } from 'gsap/CSSRulePlugin';
import bus from '@/bus';
+
+import { pointGetDataList } from '@/api/system/tanchuang';
+
const AllData = reactive({});
const show = ref('');
@@ -51,19 +58,10 @@
z: -0.8,
},
icon: '/Three/icon/jlszy_icon.png',
- data: [
- {
- name: '挠度变化值',
- value: '-0.01',
- unit: 'mm',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
show: false,
+ pointCode: 'WL62zX5',
+ dataTime: '',
},
{
name: '静力水准仪',
@@ -74,113 +72,40 @@
z: -0.8,
},
icon: '/Three/icon/jlszy_icon.png',
- data: [
- {
- name: '挠度变化值',
- value: '-0.01',
- unit: 'mm',
- },
- {
- name: '温度',
- value: '16.3',
- unit: '℃',
- },
- ],
+ data: [],
show: false,
+ pointCode: 'qGxgnkX',
+ dataTime: '',
},
{
- name: "应变计",
+ name: '应变计',
id: `YuanDian3`,
position: {
x: -37,
y: 0,
z: -0.2,
},
- icon: "/Three/icon/ybj_icon.png",
- data: [
- {
- name: "应变量",
- value: "17",
- unit: "με",
- },
- {
- name: "温度",
- value: "16.3",
- unit: "℃",
- },
- ],
+ icon: '/Three/icon/ybj_icon.png',
+ data: [],
show: false,
+ // dsZCOmK
+ pointCode: 'dsZCOmK',
+ dataTime: '',
},
{
- name: "应变计",
+ name: '应变计',
id: `YuanDian4`,
position: {
x: 37,
y: 0,
z: -0.2,
},
- icon: "/Three/icon/ybj_icon.png",
- data: [
- {
- name: "应变量",
- value: "17",
- unit: "με",
- },
- {
- name: "温度",
- value: "16.3",
- unit: "℃",
- },
- ],
+ icon: '/Three/icon/ybj_icon.png',
+ data: [],
show: false,
+ pointCode: 'yKBFH23',
+ dataTime: '',
},
- // {
- // name: "加速度计",
- // id: `YuanDian6`,
- // position: {
- // x: 0,
- // y: 0,
- // z: -5,
- // },
- // icon: "/Three/icon/jsdj_icon.png",
- // data: [
- // {
- // name: "加速度",
- // value: "1.42",
- // unit: "mm/s²",
- // },
- // {
- // name: "风速",
- // value: "1.3",
- // unit: "m/s",
- // },
- // ],
- // show: false,
- // },
-
- // {
- // name: "风速风向仪",
- // id: `YuanDian1`,
- // position: {
- // x: 0,
- // y: 0,
- // z: 2.5,
- // },
- // icon: "/Three/icon/fsfx_icon.png",
- // data: [
- // {
- // name: "方向",
- // value: "东北风",
- // unit: "",
- // },
- // {
- // name: "风速",
- // value: "1.3",
- // unit: "m/s",
- // },
- // ],
- // show: false,
- // },
]);
const deviceCode = ref(null);
const stCode = ref(null);
@@ -467,9 +392,9 @@
} else if (data.name[0] == '应变计') {
// 摄像机位置
gsap.to(Camera.value.position, {
- x: -49.48316713595012,
- y: 7.308749802511068,
- z: 14.904389905294007,
+ x: -53.61576836842107,
+ y: 7.710859842105263,
+ z: 17.230486105263143,
duration: 3,
ease: 'power4.out',
});
@@ -513,6 +438,29 @@
// element.show = false;
// });
// };
+
+// 获取点位信息
+const getPonintInfo = () => {
+ const promises = labelData.value.map(item => {
+ return pointGetDataList({ pointCode: item.pointCode }).then(res => {
+ // 检测时间
+ const timeWithDate = res.data.find(time => time.dataTime);
+ if (timeWithDate) {
+ item.dataTime = timeWithDate.dataTime;
+ }
+ return { ...item, data: res.data };
+ });
+ });
+
+ Promise.all(promises)
+ .then(updatedItems => {
+ labelData.value = updatedItems;
+ })
+ .catch(error => {
+ console.error('请求出错:labelData.value', error);
+ });
+};
+
onBeforeMount(() => {
// initGltfFloor();
// initModal('ChangJing', '/Gltf/ChuWangCheng.gltf');
@@ -524,6 +472,7 @@
});
});
onMounted(() => {
+ getPonintInfo();
nextTick(() => {
if (document.readyState === 'complete') {
createLable();
@@ -607,7 +556,7 @@
position: absolute;
left: calc(50% + 19px);
bottom: 8px;
- width: 45px;
+ width: 60px;
// height: 26px;
background: linear-gradient(0deg, rgba(12, 54, 92, 0.6) 0%, rgba(12, 54, 92, 0.6) 100%);
border-radius: 2px;