Merge pull request 'trp:隧道场景仿真修改完成,待接口调试' (#401) from trp_dev into dengjie
Reviewed-on: http://git.feashow.cn/clay/tunnel-cloud-web/pulls/401
This commit is contained in:
@@ -44,10 +44,8 @@ import * as three from "three";
|
|||||||
import ThreeDScene from "./sceneClass/demo.js";
|
import ThreeDScene from "./sceneClass/demo.js";
|
||||||
import DevInfo from "./displayInfoComp/DevInfo.vue";
|
import DevInfo from "./displayInfoComp/DevInfo.vue";
|
||||||
import PreDialog from "./preEquComp/preDialog.vue";
|
import PreDialog from "./preEquComp/preDialog.vue";
|
||||||
|
|
||||||
// 导入模模型加载器
|
// 导入模模型加载器
|
||||||
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
||||||
// import { DRACOLoader } from "three/examples/jsm/loaders/dracoloader";
|
|
||||||
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
||||||
import * as TWEEN from "three/examples/jsm/libs/tween.module";
|
import * as TWEEN from "three/examples/jsm/libs/tween.module";
|
||||||
import {
|
import {
|
||||||
@@ -126,7 +124,6 @@ const getDevDetail = async (devId) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// console.log(load);
|
// console.log(load);
|
||||||
let isedit = ref(params.isedit);
|
|
||||||
let fanData;
|
let fanData;
|
||||||
let tunnelAlias = reactive("");
|
let tunnelAlias = reactive("");
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="scene">
|
<div id="scene">
|
||||||
<div id="cvs" ref="content"></div>
|
<div id="cvs" ref="content"></div>
|
||||||
<dev-info ref="info" :devInfo="devInfo" />
|
|
||||||
<!-- 这里的预览模式需要做成不能修改的模式 -->
|
<!-- 这里的预览模式需要做成不能修改的模式 -->
|
||||||
<edit-dialog
|
<edit-dialog
|
||||||
ref="edit"
|
ref="edit"
|
||||||
@@ -16,27 +15,15 @@
|
|||||||
:pointGap="pointGap"
|
:pointGap="pointGap"
|
||||||
:form="params.form"
|
:form="params.form"
|
||||||
/>
|
/>
|
||||||
<el-dialog
|
<pre-dialog
|
||||||
v-model="centerDialogVisible"
|
ref="info"
|
||||||
width="30%"
|
:pointNum="50"
|
||||||
destroy-on-close
|
:pointGap="50"
|
||||||
center
|
:equipmentType="equipmentType"
|
||||||
:show-close="false"
|
:equipmentName="equipmentName"
|
||||||
style="
|
:equipmentValue="50"
|
||||||
margin: 20% auto;
|
:devRealtimeDetail="devRealtimeDetail"
|
||||||
width: 569px;
|
/>
|
||||||
height: 330px;
|
|
||||||
background: rgba(7, 35, 72, 0.79);
|
|
||||||
border-radius: 20px;
|
|
||||||
border: 2px solid #0f82af;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<p id="remove-title">是否确定删除该设备</p>
|
|
||||||
<div class="btn">
|
|
||||||
<button @click="centerDialogVisible = false">取消</button>
|
|
||||||
<button @click="handleConfirmAddEqu">确定</button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -45,16 +32,16 @@ import * as three from "three";
|
|||||||
import ThreeDScene from "./sceneClass/demo.js";
|
import ThreeDScene from "./sceneClass/demo.js";
|
||||||
import DevInfo from "./displayInfoComp/DevInfo.vue";
|
import DevInfo from "./displayInfoComp/DevInfo.vue";
|
||||||
import EditDialog from "./editEquComp/editDialog.vue";
|
import EditDialog from "./editEquComp/editDialog.vue";
|
||||||
|
import PreDialog from "./preEquComp/preDialog.vue";
|
||||||
// 导入模模型加载器
|
// 导入模模型加载器
|
||||||
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
|
||||||
// import { DRACOLoader } from "three/examples/jsm/loaders/dracoloader";
|
// import { DRACOLoader } from "three/examples/jsm/loaders/dracoloader";
|
||||||
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls";
|
||||||
import * as TWEEN from "three/examples/jsm/libs/tween.module";
|
import * as TWEEN from "three/examples/jsm/libs/tween.module";
|
||||||
import {
|
import {
|
||||||
CSS3DRenderer,
|
CSS2DRenderer,
|
||||||
CSS3DSprite,
|
CSS2DObject,
|
||||||
} from "three/addons/renderers/CSS3DRenderer.js";
|
} from "three/addons/renderers/CSS2DRenderer.js";
|
||||||
// 引入CSS2渲染器CSS2DRenderer和CSS2模型对象CSS2DObject
|
// 引入CSS2渲染器CSS2DRenderer和CSS2模型对象CSS2DObject
|
||||||
|
|
||||||
import { OBJLoader } from "three/examples/jsm/loaders/OBJLoader";
|
import { OBJLoader } from "three/examples/jsm/loaders/OBJLoader";
|
||||||
@@ -63,13 +50,11 @@ import {
|
|||||||
onMounted,
|
onMounted,
|
||||||
reactive,
|
reactive,
|
||||||
ref,
|
ref,
|
||||||
toRaw,
|
|
||||||
watch,
|
watch,
|
||||||
defineProps,
|
defineProps,
|
||||||
defineExpose,
|
defineExpose,
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useModelSceneStore } from "@/store/modelSceneStore";
|
|
||||||
import { getScreenSimulateTunnel } from "@/api/tunnelManage";
|
import { getScreenSimulateTunnel } from "@/api/tunnelManage";
|
||||||
// 获取html标签跟随组件dom
|
// 获取html标签跟随组件dom
|
||||||
const content = ref(null);
|
const content = ref(null);
|
||||||
@@ -80,7 +65,6 @@ let demo; //定义demo对象
|
|||||||
const loader = new OBJLoader();
|
const loader = new OBJLoader();
|
||||||
let hdrLoader = new RGBELoader();
|
let hdrLoader = new RGBELoader();
|
||||||
let backColorSet = three.sRGBEncoding;
|
let backColorSet = three.sRGBEncoding;
|
||||||
const modelStore = useModelSceneStore();
|
|
||||||
const params = defineProps([
|
const params = defineProps([
|
||||||
"isedit",
|
"isedit",
|
||||||
"tunnelId",
|
"tunnelId",
|
||||||
@@ -89,41 +73,43 @@ const params = defineProps([
|
|||||||
"deviceData",
|
"deviceData",
|
||||||
"devRealtimeData",
|
"devRealtimeData",
|
||||||
"simulateData",
|
"simulateData",
|
||||||
]); //接收参数看是不是编辑模式,如果是编辑模式,则需要做一些处理
|
]);
|
||||||
|
|
||||||
let isedit = ref(params.isedit);
|
// hover到设备回显参数
|
||||||
let tunnelId = reactive(params.tunnelId);
|
let equipmentName = ref("");
|
||||||
|
let equipmentType = ref("");
|
||||||
|
let devRealtimeDetail = ref({
|
||||||
|
equipmentType: "",
|
||||||
|
value: "",
|
||||||
|
unit: "",
|
||||||
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => params.tunnelLength,
|
() => params.tunnelLength,
|
||||||
(now) => {
|
(now) => {
|
||||||
params.tunnelLength = now;
|
params.tunnelLength = now;
|
||||||
// console.log(params.tunnelLength);
|
|
||||||
pointGap = now / 20;
|
pointGap = now / 20;
|
||||||
// console.log(params.form.tunnelName);
|
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
);
|
);
|
||||||
|
|
||||||
let pointGap = reactive(params.tunnelLength);
|
let pointGap = reactive(params.tunnelLength);
|
||||||
|
|
||||||
onMounted(handleMounted);
|
onMounted(handleMounted);
|
||||||
|
|
||||||
// 挂载后回调
|
// 挂载后回调
|
||||||
async function handleMounted() {
|
async function handleMounted() {
|
||||||
const doms = [info.value.$el, edit.value.$el];
|
const doms = [info.value.$el, info.value.$el];
|
||||||
demo = new ThreeDScene(three, content.value);
|
demo = new ThreeDScene(three, content.value);
|
||||||
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
||||||
// "../../../../public/tunnelModel/chanel-have-wall-now-use.gltf"
|
// "../../../../public/tunnelModel/chanel-have-wall-now-use.gltf"
|
||||||
demo.isedit =false;
|
demo.isedit = false;
|
||||||
const loaded = await demo.loadModel(
|
const loaded = await demo.loadModel(
|
||||||
GLTFLoader,
|
GLTFLoader,
|
||||||
"/tunnelModel/chanel-have-wall-now-use.gltf",
|
"/tunnelModel/chanel-have-wall-now-use.gltf"
|
||||||
true,
|
|
||||||
);
|
);
|
||||||
demo.addOrbitControls(OrbitControls, true);
|
demo.addOrbitControls(OrbitControls, true);
|
||||||
demo.addTween(TWEEN);
|
demo.addTween(TWEEN);
|
||||||
demo.addCSS3Renderer(CSS3DRenderer, CSS3DSprite, doms);
|
demo.addCSS3Renderer(CSS2DRenderer, CSS2DObject, doms);
|
||||||
demo.setDistance(10);
|
demo.setDistance(10);
|
||||||
lClickCallback(demo); //绑定左键回调
|
lClickCallback(demo); //绑定左键回调
|
||||||
rClickCallback(demo); //绑定右键回调
|
rClickCallback(demo); //绑定右键回调
|
||||||
@@ -137,24 +123,7 @@ async function handleMounted() {
|
|||||||
map.set("equ_fan", await loadModel("/devicesModel/model2.obj"));
|
map.set("equ_fan", await loadModel("/devicesModel/model2.obj"));
|
||||||
map.set("equ_sensors", await loadModel("/devicesModel/sensors.obj"));
|
map.set("equ_sensors", await loadModel("/devicesModel/sensors.obj"));
|
||||||
demo.initDevicesModel(map);
|
demo.initDevicesModel(map);
|
||||||
// 初始化渲染设备
|
|
||||||
// modelList.value = await modelStore.initModelData(
|
|
||||||
// params.tunnelId,
|
|
||||||
// params.form
|
|
||||||
// );
|
|
||||||
//todo 父组件传的设备数据params.deviceData
|
|
||||||
// const newModelList=[...params.deviceData.frequencyChangerList,...params.deviceData.windPressureSensorList, ...params.deviceData.sensorList]
|
|
||||||
// newModelList.map((item,index1)=>{
|
|
||||||
// const index=index1+1
|
|
||||||
// item.threshold=""
|
|
||||||
// if(index<newModelList.length/2){
|
|
||||||
// item.position="point_0"+(index<10?"0"+index:index)+"_tr"
|
|
||||||
// }else{
|
|
||||||
// item.position="point_0"+(index<10?"0"+index:index)+"_tl"
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// console.log('parmas',newModelList)
|
|
||||||
modelList.value = [
|
modelList.value = [
|
||||||
{
|
{
|
||||||
typeKey: "frequency",
|
typeKey: "frequency",
|
||||||
@@ -180,25 +149,14 @@ async function handleMounted() {
|
|||||||
|
|
||||||
// 初始化仿真參數
|
// 初始化仿真參數
|
||||||
const { data } = await getScreenSimulateTunnel(params.tunnelId);
|
const { data } = await getScreenSimulateTunnel(params.tunnelId);
|
||||||
const modeData = randomPosition([
|
demo.enableLeftBtn = false; //关闭左键
|
||||||
...data.frequencyChangerList,
|
demo.pointsVisible(false); //隐藏附着点
|
||||||
...data.windPressureSensorList,
|
TunnelSceneSimulateRender(data);
|
||||||
...data.sensorList,
|
|
||||||
]).map((item) => ({
|
|
||||||
...item,
|
|
||||||
equipmentType: item.equipmentType.startsWith("frequency")
|
|
||||||
? "frequency"
|
|
||||||
: "sensor",
|
|
||||||
}));
|
|
||||||
demo.enableLeftBtn = false //关闭左键
|
|
||||||
demo.pointsVisible(false);
|
|
||||||
demo.editTunnelInit(modeData);
|
|
||||||
// 初始化标牌信息
|
// 初始化标牌信息
|
||||||
demo.SignsInf("dsadsa", String(params.tunnelLength));
|
renderRoadPlane({ nickname: "隧道名称", length: 10000 });
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 从新渲染数据
|
// 从新渲染数据
|
||||||
async function rerender() {
|
async function rerender() {
|
||||||
try {
|
try {
|
||||||
@@ -297,8 +255,6 @@ function editDevInfo(
|
|||||||
|
|
||||||
//左键/双击左键回调函数
|
//左键/双击左键回调函数
|
||||||
function lClickCallback(demo) {
|
function lClickCallback(demo) {
|
||||||
console.log('左键点击查看信息');
|
|
||||||
|
|
||||||
// demo动态添加函数,为操作组件内部
|
// demo动态添加函数,为操作组件内部
|
||||||
function displayDevInfo(targetPoint = null) {
|
function displayDevInfo(targetPoint = null) {
|
||||||
hasDevice.value = targetPoint.hasDevice;
|
hasDevice.value = targetPoint.hasDevice;
|
||||||
@@ -308,7 +264,6 @@ function lClickCallback(demo) {
|
|||||||
}
|
}
|
||||||
editDevInfo(targetPoint.info);
|
editDevInfo(targetPoint.info);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 传给内部使用
|
// 传给内部使用
|
||||||
demo.addFunction("displayDevInfo", displayDevInfo);
|
demo.addFunction("displayDevInfo", displayDevInfo);
|
||||||
}
|
}
|
||||||
@@ -328,27 +283,24 @@ function rClickCallback(demo) {
|
|||||||
) - 1
|
) - 1
|
||||||
);
|
);
|
||||||
if (!targetPoint.info) return;
|
if (!targetPoint.info) return;
|
||||||
|
hoverDevEquipmentCallback(targetPoint.info);
|
||||||
editDevInfo(targetPoint.info);
|
editDevInfo(targetPoint.info);
|
||||||
}
|
}
|
||||||
|
|
||||||
demo.addFunction("editDev", editDev);
|
demo.addFunction("editDev", editDev);
|
||||||
}
|
}
|
||||||
|
|
||||||
// function streetSigns(){
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 场景添加设备
|
// 场景添加设备
|
||||||
function handleAddEqu(formInfo) {
|
function handleAddEqu(formInfo) {
|
||||||
demo.addEquipment(targetP.value, formInfo);
|
demo.addEquipment(targetP.value, formInfo);
|
||||||
// //将墙壁设置为可以穿透点击
|
// //将墙壁设置为可以穿透点击
|
||||||
for (let line = 1; line <= 20; line++) {
|
for (let line = 1; line <= 20; line++) {
|
||||||
if (line < 10) {
|
if (line < 10) {
|
||||||
let wall = 'wall_' + '0' + line
|
let wall = "wall_" + "0" + line;
|
||||||
this.scene.getObjectByName(wall).layers.set(0)
|
this.scene.getObjectByName(wall).layers.set(0);
|
||||||
} else if (line >= 10) {
|
} else if (line >= 10) {
|
||||||
let wall = 'wall_' + line
|
let wall = "wall_" + line;
|
||||||
this.scene.getObjectByName(wall).layers.set(0)
|
this.scene.getObjectByName(wall).layers.set(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -367,29 +319,6 @@ function handleRemoveEqu() {
|
|||||||
centerDialogVisible.value = true;
|
centerDialogVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 对话框确认删除
|
|
||||||
function handleConfirmAddEqu() {
|
|
||||||
console.log("target:", targetP.value.info);
|
|
||||||
modelStore
|
|
||||||
.deleteEquipment(targetP.value.info.equipmentId, pointGap)
|
|
||||||
.then((res) => {
|
|
||||||
demo.removeEquipment(targetP.value);
|
|
||||||
centerDialogVisible.value = false;
|
|
||||||
handleCancel();
|
|
||||||
ElMessage({
|
|
||||||
message: "删除成功!",
|
|
||||||
type: "success",
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch((res) => {
|
|
||||||
console.log(res);
|
|
||||||
ElMessage({
|
|
||||||
message: "删除失败!",
|
|
||||||
type: "warning",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 处理取消关闭编辑框事件
|
// 处理取消关闭编辑框事件
|
||||||
function handleCancel() {
|
function handleCancel() {
|
||||||
if (!demo) return;
|
if (!demo) return;
|
||||||
@@ -425,11 +354,55 @@ const ThreeConfig = {
|
|||||||
},
|
},
|
||||||
msg: "dda",
|
msg: "dda",
|
||||||
};
|
};
|
||||||
|
//=============隧模型道数据仿真====================
|
||||||
|
/**
|
||||||
|
* @description: 隧道中的设备重新模拟渲染
|
||||||
|
* @param {Object} data 渲染数据格式 [{equipmentId,equipmentName,pointName,equipmentType,equipmentValue}]
|
||||||
|
*/
|
||||||
|
function TunnelSceneSimulateRender(data) {
|
||||||
|
if (!demo) return;
|
||||||
|
const modeData = randomPosition([
|
||||||
|
...data.frequencyChangerList,
|
||||||
|
...data.windPressureSensorList,
|
||||||
|
...data.sensorList,
|
||||||
|
]).map((item) => ({
|
||||||
|
...item,
|
||||||
|
equipmentType: item.equipmentType.startsWith("frequency")
|
||||||
|
? "frequency"
|
||||||
|
: "sensor",
|
||||||
|
}));
|
||||||
|
demo.editTunnelInit(modeData); //渲染设备数据
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 鼠标悬浮在设备上时回调函数
|
||||||
|
*/
|
||||||
|
function hoverDevEquipmentCallback(targetPointInfo) {
|
||||||
|
console.log(targetPointInfo); //当前附着点信息
|
||||||
|
const {
|
||||||
|
equipmentId,
|
||||||
|
equipmentName: eName,
|
||||||
|
equipmentType: eType,
|
||||||
|
typeKey,
|
||||||
|
unit: u,
|
||||||
|
} = targetPointInfo;
|
||||||
|
//请求到的实时数据进行渲染
|
||||||
|
//业务代码.... 获取设备实时数据(data) const value = ....
|
||||||
|
equipmentType.value = eType;
|
||||||
|
equipmentName.value = eName;
|
||||||
|
devRealtimeDetail.value.equipmentType =typeKey;
|
||||||
|
devRealtimeDetail.value.unit = u;
|
||||||
|
devRealtimeDetail.value.value = 1000; //1000替换为value
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @description: 渲染隧道入口提示板信息
|
||||||
|
* @param {Object} data 隧道信息 {nickname,length}
|
||||||
|
*/
|
||||||
|
function renderRoadPlane(data) {
|
||||||
|
if (!demo) return;
|
||||||
|
const { nickname, length } = data; //隧道名称,长度
|
||||||
|
demo.SignsInf(nickname, length + "");
|
||||||
|
}
|
||||||
|
|
||||||
//=================实时更新数据
|
|
||||||
watch(params.devRealtimeData, () => {
|
|
||||||
// console.log("devRealtimeData:", params.devRealtimeData);
|
|
||||||
});
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
rerender,
|
rerender,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import { editTunnelInit } from "./editTunnelInit";
|
|||||||
import { addEquipment, removeEquipment } from "./editEquipment";
|
import { addEquipment, removeEquipment } from "./editEquipment";
|
||||||
import previewtunnelModeInit from "./previewTunnelInit";
|
import previewtunnelModeInit from "./previewTunnelInit";
|
||||||
import { StreetSignTag } from "./utils/StreetSignTag/StreetSignTag.js";
|
import { StreetSignTag } from "./utils/StreetSignTag/StreetSignTag.js";
|
||||||
|
import { realTimeRenderData } from "./realTimeRerender";
|
||||||
// import { fa } from "element-plus/es/locale/index.js";
|
// import { fa } from "element-plus/es/locale/index.js";
|
||||||
// import { ref } from "vue";
|
// import { ref } from "vue";
|
||||||
export default class Demo {
|
export default class Demo {
|
||||||
@@ -35,6 +36,7 @@ export default class Demo {
|
|||||||
this.removeEquipment = removeEquipment;
|
this.removeEquipment = removeEquipment;
|
||||||
this.previewtunnelModeInit = previewtunnelModeInit;
|
this.previewtunnelModeInit = previewtunnelModeInit;
|
||||||
this.editTunnelInit = editTunnelInit;
|
this.editTunnelInit = editTunnelInit;
|
||||||
|
this.realTimeRenderData = realTimeRenderData;
|
||||||
|
|
||||||
// 外部可添加函数
|
// 外部可添加函数
|
||||||
this.addFunction = addFunction;
|
this.addFunction = addFunction;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import Demo from "../demo";
|
|
||||||
|
import { eq } from "lodash";
|
||||||
import EquipmentTag from "../utils/EquipmentTag";
|
import EquipmentTag from "../utils/EquipmentTag";
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -47,11 +48,13 @@ function handleOtherEqu(targetPoint, equipmentInfo) {
|
|||||||
const equMesh = this.equMap.get("equ_sensors").clone();
|
const equMesh = this.equMap.get("equ_sensors").clone();
|
||||||
const worldP = targetPoint.getWorldPosition(new this.THREE.Vector3());
|
const worldP = targetPoint.getWorldPosition(new this.THREE.Vector3());
|
||||||
equMesh.position.copy(worldP);
|
equMesh.position.copy(worldP);
|
||||||
|
|
||||||
//设备添加标签
|
//设备添加标签
|
||||||
const param = `${equipmentInfo.data || "--"} ${equipmentInfo.unit || "-"}`; //渲染设备参数(data)和单位(unit)
|
const param = `${equipmentInfo.data || "--"} ${equipmentInfo.unit || "-"}`; //渲染设备参数(data)和单位(unit)
|
||||||
const tag = EquipmentTag(equipmentInfo.equipmentName,param);
|
const tag = EquipmentTag(equipmentInfo.equipmentName,param);
|
||||||
equMesh.getObjectByName("tag").material = tag;
|
equMesh.getObjectByName("tag").material = tag;
|
||||||
|
this.deviceModels.push({'tagSpriteId':equMesh.getObjectByName("tag").id, 'equipmentId':equipmentInfo.equipmentId})
|
||||||
|
this.realTimeRenderData(231321)
|
||||||
if (/tr$/.test(targetPoint.name)) {
|
if (/tr$/.test(targetPoint.name)) {
|
||||||
equMesh.rotation.z = -Math.PI / 2;
|
equMesh.rotation.z = -Math.PI / 2;
|
||||||
equMesh.rotation.y -= Math.PI / 4;
|
equMesh.rotation.y -= Math.PI / 4;
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
export function realTimeRenderData(realTimeData) {
|
||||||
|
console.log(this.deviceModels);
|
||||||
|
this.deviceModels.forEach((deviceModel) => {
|
||||||
|
this.scene.getObjectById(deviceModel.tagSpriteId);
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -74,7 +74,7 @@ export default defineConfig({
|
|||||||
// rewrite: (path) => path.replace(/^\/api/, ''),
|
// rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
// },
|
// },
|
||||||
'/api': {
|
'/api': {
|
||||||
target: 'http://frp.toomewhy.top:38000',
|
target: 'http://tunnel.feashow.com/api',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user