main
wangqiujuan0808 2023-12-09 00:53:55 +08:00
commit 13c5c1a86f
7 changed files with 69 additions and 30 deletions

View File

@ -1,8 +1,8 @@
# 页面标题
VITE_APP_TITLE = 若依管理系统
VITE_APP_TITLE = 百威管理系统
# 开发环境配置
VITE_APP_ENV = 'development'
# 若依管理系统/开发环境
# 百威管理系统/开发环境
VITE_APP_BASE_API = '/dev-api'

View File

@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE = 若依管理系统
VITE_APP_TITLE = 百威管理系统
# 生产环境配置
VITE_APP_ENV = 'production'
# 若依管理系统/生产环境
# 百威管理系统/生产环境
VITE_APP_BASE_API = '/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE = 若依管理系统
VITE_APP_TITLE = 百威管理系统
# 生产环境配置
VITE_APP_ENV = 'staging'
# 若依管理系统/生产环境
# 百威管理系统/生产环境
VITE_APP_BASE_API = '/stage-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="icon" href="/favicon.ico">
<title>若依管理系统</title>
<title>百威管理系统</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,

View File

@ -1,7 +1,7 @@
{
"name": "ruoyi",
"version": "3.8.6",
"description": "若依管理系统",
"description": "百威管理系统",
"author": "若依",
"license": "MIT",
"scripts": {

View File

@ -4,7 +4,7 @@
<div class="left">
<img src="@/assets/logo/logo.png" alt="dark" />
<span>
若依管理系统
百威管理系统
</span>
</div>
<div class="middle">

View File

@ -21,6 +21,7 @@ import {
import homeIcon from '@/assets/image/bg7.jpg'
import TWEEN from "@tweenjs/tween.js";
import Bus from '@/utils/bus.js'
import bimStore from '@/store/modules/bim';
let scene = ref(null);
let renderer = ref(null);
@ -50,9 +51,9 @@ const props = defineProps({
}
})
const data = reactive({
reductionMaterial: null
gltfObj: null
});
const { reductionMaterial } = toRefs(data);
const { gltfObj } = toRefs(data);
watch(() => props.sceneUrl, val => {
init();
@ -62,6 +63,30 @@ watch(() => props.sceneUrl, val => {
Bus.on('clickBuild', (isParent) => {
// Todo
console.log('clickBuild', isParent);
if (!isParent) {//
var clickName = bimStore().activateTree.clickName;
console.log(123, clickName);
//
if (selectedObject && selectedMaterial) {
selectedObject.material = selectedMaterial;
selectedObject = null;
selectedMaterial = null;
}
var Floor = gltfObj.value.scene.getObjectByName(clickName);
if (Floor.length > 0) {
//
selectedObject = Floor;
selectedMaterial = selectedObject.material;
}
console.log(1, Floor);
Floor.traverse(e => {
e.material = new THREE.MeshLambertMaterial({
color: 0x00ff00,
});
nearCamera(e);
})
}
})
//
Bus.on('clickDevice', e => {
@ -102,7 +127,11 @@ const init = () => {
//
camera.position.set(-192.936, 180.990, -28.179);
camera.lookAt(scene.position);
<<<<<<< HEAD
=======
>>>>>>> c61eb163e061fb935e88a57641d1dc70e363d7b5
//
orbit = new OrbitControls(camera, renderer.domElement);
orbit.autoRotate = true;
@ -121,6 +150,8 @@ const init = () => {
const loadSence = () => {
const gltfLoader = new GLTFLoader();
gltfLoader.load(props.sceneUrl, (gltf) => {
// model.value = gltf.scene;
gltfObj.value = gltf;
var model = gltf.scene;
scene.add(model);
});
@ -199,13 +230,17 @@ const onMouseDown = (event) => {
selectedMaterial = clickedObject.material;
// 绿
selectedObject.material = new THREE.MeshBasicMaterial({ color: 0x00ff00 });
nearCamera(intersects);
}
}
const nearCamera = (intersects) => {
//
if (!intersects[0]) {
return;
} else {
if (intersects[0].object.name.indexOf('box') > -1) {
if (intersects[0].object.name) {
selectedObjects = [];
selectedObjects.push(intersects[0].object);
positionObj = {
@ -217,13 +252,17 @@ const onMouseDown = (event) => {
initTween(
positionObj.x,
positionObj.y,
positionObj.z
positionObj.z+10
);
}
}
}
//
const toHomeView = () => {
camera.position.set(-192.936, 180.990, -28.179);
camera.lookAt(scene.position);
}
//
const toHomeView1 = () => {
let initPosition = {
x: camera.position.x,
y: camera.position.y,