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