功能优化
							parent
							
								
									8c42512b59
								
							
						
					
					
						commit
						d89b8a218a
					
				| 
						 | 
					@ -67,7 +67,7 @@ const openDialog = () => {
 | 
				
			||||||
<style lang='scss' scoped>
 | 
					<style lang='scss' scoped>
 | 
				
			||||||
.deviceDiv {
 | 
					.deviceDiv {
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    top: 380px;
 | 
					    bottom:20px;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    right: 10px;
 | 
					    right: 10px;
 | 
				
			||||||
    width: 360px;
 | 
					    width: 360px;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +46,6 @@ watch(() => bimStore().activateDevice.info, value => deviceInfo.value = value);
 | 
				
			||||||
    top: 10px;
 | 
					    top: 10px;
 | 
				
			||||||
    right: 10px;
 | 
					    right: 10px;
 | 
				
			||||||
    width: 360px;
 | 
					    width: 360px;
 | 
				
			||||||
    height: 340px;
 | 
					 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
    flex-direction: column;
 | 
					    flex-direction: column;
 | 
				
			||||||
    align-items: center;
 | 
					    align-items: center;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,7 +54,6 @@ const { equipmentInfo } = toRefs(data);
 | 
				
			||||||
    top: 10px;
 | 
					    top: 10px;
 | 
				
			||||||
    right: 10px;
 | 
					    right: 10px;
 | 
				
			||||||
    width: 360px;
 | 
					    width: 360px;
 | 
				
			||||||
    height: 340px;
 | 
					 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
    flex-direction: column;
 | 
					    flex-direction: column;
 | 
				
			||||||
    align-items: center;
 | 
					    align-items: center;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,7 +61,7 @@ const openDialog = () => {
 | 
				
			||||||
<style lang='scss' scoped>
 | 
					<style lang='scss' scoped>
 | 
				
			||||||
.deviceDiv {
 | 
					.deviceDiv {
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    top: 380px; 
 | 
					    bottom: 20px; 
 | 
				
			||||||
    right: 10px;
 | 
					    right: 10px;
 | 
				
			||||||
    width: 360px;
 | 
					    width: 360px;
 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -299,6 +299,7 @@ const onMouseDownRight = (event) => {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 鼠标点击效果
 | 
					// 鼠标点击效果
 | 
				
			||||||
const onMouseDown = (event) => {
 | 
					const onMouseDown = (event) => {
 | 
				
			||||||
 | 
					    removeLabel();
 | 
				
			||||||
    var raycaster = new THREE.Raycaster()
 | 
					    var raycaster = new THREE.Raycaster()
 | 
				
			||||||
    // 将鼠标点击位置的屏幕坐标转换成threejs中的标准坐标
 | 
					    // 将鼠标点击位置的屏幕坐标转换成threejs中的标准坐标
 | 
				
			||||||
    mouse.x = ((event.clientX - marginLeft) / window.innerWidth) * 2 - 1;
 | 
					    mouse.x = ((event.clientX - marginLeft) / window.innerWidth) * 2 - 1;
 | 
				
			||||||
| 
						 | 
					@ -364,6 +365,7 @@ const cleanColor = () => {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 预警
 | 
					// 预警
 | 
				
			||||||
const warn = () => {
 | 
					const warn = () => {
 | 
				
			||||||
 | 
					    removeLabel();
 | 
				
			||||||
    ['T7'].forEach(item => {
 | 
					    ['T7'].forEach(item => {
 | 
				
			||||||
        warnSets.push(scene.getObjectByName(item));
 | 
					        warnSets.push(scene.getObjectByName(item));
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
| 
						 | 
					@ -489,6 +491,8 @@ const createLableObj = (text, t) => {
 | 
				
			||||||
        laberDiv.addEventListener('click', function (event) {
 | 
					        laberDiv.addEventListener('click', function (event) {
 | 
				
			||||||
            emit('handleRightClick', selectedObject);
 | 
					            emit('handleRightClick', selectedObject);
 | 
				
			||||||
            console.log(labelRenderer.domElement);
 | 
					            console.log(labelRenderer.domElement);
 | 
				
			||||||
 | 
					            // 清除标签
 | 
				
			||||||
 | 
					            removeLabel();
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        // 巡检逻辑
 | 
					        // 巡检逻辑
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
| 
						 | 
					@ -543,6 +547,7 @@ const removeLabel = () => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 设置地板
 | 
					// 设置地板
 | 
				
			||||||
const setBottom = () => {
 | 
					const setBottom = () => {
 | 
				
			||||||
 | 
					    removeLabel();
 | 
				
			||||||
    var target = scene.getObjectByName('tanghua_2F');
 | 
					    var target = scene.getObjectByName('tanghua_2F');
 | 
				
			||||||
    centerSelectedGroup(target);
 | 
					    centerSelectedGroup(target);
 | 
				
			||||||
    console.log(target);
 | 
					    console.log(target);
 | 
				
			||||||
| 
						 | 
					@ -603,6 +608,7 @@ const removexf = () => {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 更换纹理贴图方法
 | 
					// 更换纹理贴图方法
 | 
				
			||||||
const changeMap = (img) => {
 | 
					const changeMap = (img) => {
 | 
				
			||||||
 | 
					    removeLabel();
 | 
				
			||||||
    isShowWall.value = true;
 | 
					    isShowWall.value = true;
 | 
				
			||||||
    // 获取墙体
 | 
					    // 获取墙体
 | 
				
			||||||
    model.traverse(e => {
 | 
					    model.traverse(e => {
 | 
				
			||||||
| 
						 | 
					@ -636,6 +642,7 @@ const changeMap = (img) => {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
// 巡检
 | 
					// 巡检
 | 
				
			||||||
const check = () => {
 | 
					const check = () => {
 | 
				
			||||||
 | 
					    removeLabel();
 | 
				
			||||||
    let yn = 8, duration = 0;
 | 
					    let yn = 8, duration = 0;
 | 
				
			||||||
    if (checkindex < checkArr.length ) {  
 | 
					    if (checkindex < checkArr.length ) {  
 | 
				
			||||||
         // 1,提前把下一个目标找到,转动镜头
 | 
					         // 1,提前把下一个目标找到,转动镜头
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,7 +21,10 @@ const getCharts = () => {
 | 
				
			||||||
        var myChart = echarts.init(dom);
 | 
					        var myChart = echarts.init(dom);
 | 
				
			||||||
        let option = {
 | 
					        let option = {
 | 
				
			||||||
            title: {
 | 
					            title: {
 | 
				
			||||||
                text: ''
 | 
					                text: '资产统计分析图',
 | 
				
			||||||
 | 
					                textStyle: {
 | 
				
			||||||
 | 
					                    color: "#fff",
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            tooltip: {
 | 
					            tooltip: {
 | 
				
			||||||
                trigger: 'axis',
 | 
					                trigger: 'axis',
 | 
				
			||||||
| 
						 | 
					@ -30,6 +33,7 @@ const getCharts = () => {
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            legend: {
 | 
					            legend: {
 | 
				
			||||||
 | 
					                bottom: 0,
 | 
				
			||||||
                textStyle: {
 | 
					                textStyle: {
 | 
				
			||||||
                    color: "#ffff",
 | 
					                    color: "#ffff",
 | 
				
			||||||
                    fontFamily: "Alibaba PuHuiTi",
 | 
					                    fontFamily: "Alibaba PuHuiTi",
 | 
				
			||||||
| 
						 | 
					@ -40,7 +44,7 @@ const getCharts = () => {
 | 
				
			||||||
            grid: {
 | 
					            grid: {
 | 
				
			||||||
                left: '12%',
 | 
					                left: '12%',
 | 
				
			||||||
                right: '4%',
 | 
					                right: '4%',
 | 
				
			||||||
                bottom: '5%'
 | 
					                bottom: '10%'
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            xAxis: [
 | 
					            xAxis: [
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -81,7 +81,7 @@ const gotoPage = (item) => {
 | 
				
			||||||
    .pie-div {
 | 
					    .pie-div {
 | 
				
			||||||
      position: absolute;
 | 
					      position: absolute;
 | 
				
			||||||
      width: 400px;
 | 
					      width: 400px;
 | 
				
			||||||
      height: 360px;
 | 
					      height: 45%;
 | 
				
			||||||
      top: 10px;
 | 
					      top: 10px;
 | 
				
			||||||
      left: 10px;
 | 
					      left: 10px;
 | 
				
			||||||
      padding: 15px;
 | 
					      padding: 15px;
 | 
				
			||||||
| 
						 | 
					@ -90,7 +90,7 @@ const gotoPage = (item) => {
 | 
				
			||||||
    .bar-div {
 | 
					    .bar-div {
 | 
				
			||||||
      position: absolute;
 | 
					      position: absolute;
 | 
				
			||||||
      width: 400px;
 | 
					      width: 400px;
 | 
				
			||||||
      height: 818px;
 | 
					      height: 98.4%;
 | 
				
			||||||
      top: 10px;
 | 
					      top: 10px;
 | 
				
			||||||
      right: 10px;
 | 
					      right: 10px;
 | 
				
			||||||
      padding: 15px;
 | 
					      padding: 15px;
 | 
				
			||||||
| 
						 | 
					@ -99,7 +99,7 @@ const gotoPage = (item) => {
 | 
				
			||||||
    .xt-bar-div {
 | 
					    .xt-bar-div {
 | 
				
			||||||
      position: absolute;
 | 
					      position: absolute;
 | 
				
			||||||
      width: 400px;
 | 
					      width: 400px;
 | 
				
			||||||
      height: 460px;
 | 
					      height: 52%;
 | 
				
			||||||
      bottom: 5px;
 | 
					      bottom: 5px;
 | 
				
			||||||
      left: 10px;
 | 
					      left: 10px;
 | 
				
			||||||
      padding: 15px;
 | 
					      padding: 15px;
 | 
				
			||||||
| 
						 | 
					@ -110,7 +110,7 @@ const gotoPage = (item) => {
 | 
				
			||||||
      top: 10px;
 | 
					      top: 10px;
 | 
				
			||||||
      left: 420px;
 | 
					      left: 420px;
 | 
				
			||||||
      width: calc(100% - 840px);
 | 
					      width: calc(100% - 840px);
 | 
				
			||||||
      height: 200px;
 | 
					      height: 25%;
 | 
				
			||||||
      padding: 15px;
 | 
					      padding: 15px;
 | 
				
			||||||
      background-image: linear-gradient(to bottom,rgba(30,45,123,.7),rgba(174,179,249,.1));
 | 
					      background-image: linear-gradient(to bottom,rgba(30,45,123,.7),rgba(174,179,249,.1));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					@ -119,7 +119,7 @@ const gotoPage = (item) => {
 | 
				
			||||||
      bottom: 5px;
 | 
					      bottom: 5px;
 | 
				
			||||||
      left: 420px;
 | 
					      left: 420px;
 | 
				
			||||||
      width: calc(100% - 840px);
 | 
					      width: calc(100% - 840px);
 | 
				
			||||||
      height: 200px;
 | 
					      height: 25%;
 | 
				
			||||||
      padding: 15px;
 | 
					      padding: 15px;
 | 
				
			||||||
      // background: #b2cae0;
 | 
					      // background: #b2cae0;
 | 
				
			||||||
      background-image: linear-gradient(to top,rgba(30,45,123,.7),rgba(174,179,249,.1));
 | 
					      background-image: linear-gradient(to top,rgba(30,45,123,.7),rgba(174,179,249,.1));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue