Commit e16ac3a2 authored by 李苏's avatar 李苏 💬

首页调整

parent b323f37d
......@@ -2,7 +2,7 @@
* @Description:
* @Author: lisu lisu@gavelinfo.com
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2024-09-11 11:19:18
* @LastEditTime: 2024-09-11 16:54:41
* @FilePath: /zghywpc-vue/src/views/yhlywsytst/yhlywsytst/index.vue
-->
<template>
......@@ -56,11 +56,11 @@
</div>
</div>
</div>
<div class="toolButton3">
<!-- <div class="toolButton3">
<div class="flex1 text-center">
<el-checkbox v-model="xzjj">选中时近景</el-checkbox>
</div>
</div>
</div> -->
<div v-show="selectedModel.name" class="leftOpt" style="padding-top: 30px;">
<div class="sbxxTitle" style="position: absolute;top: 5px;font-weight: 800;">
{{'设备:'+selectedModel.name}}
......@@ -221,6 +221,60 @@
</div>
</div>
</div>
<!-- 标高信息-->
<div class="flex1" style="height: 33%;overflow: hidden;">
<!-- 设备检修-->
<div class="full">
<div class="mktitle">
<span>零部件数据</span>
<img :src="ksh33" alt="">
</div>
<div v-show="!selectedModel.name" class="mkbody data-box1 flex-center nosbxxTitle">
请选中设备进行查询
</div>
<div v-show="selectedModel.name" class="mkbody data-box1">
<!-- <div class="sbxxTitle">
{{'设备:'+selectedModel.name}}
</div> -->
<div class="com-count-body" style=" height:calc(100% - 0px);overflow: hidden;">
<!-- 标题-->
<div class="lbbt" style="font-size: 13px;">
<div class="flex1 text-center ">
编码
</div>
<div class="flex1 text-center ">
名称
</div>
<div class="flex1 text-center ">
机组
</div>
<div class="flex1 text-center ">
规格
</div>
<div class="flex1 text-center ">
管径
</div>
</div>
<ScrollSeamless :class-option="optionSingleHeight" :data="lbjlistData" class="lbbody"
style="overflow: hidden;">
<div class="full lbtit">
<div style="line-height: 25px;display: flex;font-size: 12px;text-align: center"
v-for="item in lbjlistData">
<div class="flex1" style="color: #68D8FE ;" v-text="item.code"></div>
<div class="flex1" style="color: #68D8FE ;" v-text="item.name"></div>ss
<div class="flex1" style="color: #68D8FE ;" v-text="item.jzbm"></div>
<div class="flex1" style="color: #68D8FE ;" v-text="item.gg"></div>
<div class="flex1" style="color: #68D8FE ;" v-text="item.gj"></div>
</div>
</div>
</ScrollSeamless>
</div>
</div>
</div>
</div>
</div>
<!-- 溯源排查-->
......@@ -326,8 +380,24 @@
<span>设备流向</span>
<b class="data-title-right">]</b>
</div>
<div class="full flex " style="height: calc(100% - 14px);padding-top: 12px;">
<div class="full flex " style="height: calc(50% - 0px);padding-top: 12px;">
<el-row :gutter="20" class="search-row-1" style="width: 100%;">
<el-col :span="12" class="search-col">
<div class="search-item">
<span class="search-span">设备编码:</span>
<el-input placeholder="" v-model="sblxCode"></el-input>
</div>
</el-col>
<el-col :span="12" class="search-col flex-center">
<el-button style="background-color: rgba(7,32,96,0.0);border: 1px solid #68D8FE; color: #68D8FE;"
size="mini" @click="sblxcx()" type="primary">设备查询</el-button>
<!-- 暂无信息-->
<span v-if="sblxcxwcxdxx"
style="color: red;font-size: 12px;padding-left: 10px;">{{sblxcxwcxdxxText}}</span>
</el-col>
</el-row>
</div>
<div class="full flex " style="height: calc(50% - 0px);padding-top: 12px;">
<el-row :gutter="20" class="search-row-1" style="width: 100%;">
<el-col :span="12" class="search-col">
<div class="search-item">
......@@ -350,6 +420,7 @@
</el-row>
</div>
</div>
</div>
<!-- 右侧操作边框-->
......@@ -364,7 +435,6 @@
</template>
<script>
import ywDialog from './ywDialog.vue'
import * as THREE from 'three'
import gsap from 'gsap'
......@@ -377,6 +447,7 @@
this.init()
this.loadAll()
this.tdClick()
this.tdblClick()
this.getData()
})
......@@ -398,13 +469,17 @@
},
data() {
return {
sblxCode: '',
sblxcxwcxdxx: false,
sblxcxwcxdxxText: '',
/* 弹框控制参数*/
showDialog: false,
DialogTitle: '异物信息',
DialogWidth: '65vw',
ywlistData: [],
jxlistData: [],
bglistData:[],
bglistData: [],
lbjlistData: [],
ksh33: ksh33,
queryParams: {
jzbm: '',
......@@ -456,6 +531,7 @@
this.apiGetJxxx()
this.apiGetYwxx()
this.apiGetBgxx()
this.apiGetLbjxx()
} else {
this.fileList = [];
return [];
......@@ -473,6 +549,13 @@
sypc() {
this.showDialog = true
},
apiGetLbjxx() {
this.$post('sbgl/usbxx/query', {
sbxxCode: this.selectedModel.name,
}).then(res => {
this.lbjlistData = res.data.records || []
})
},
apiGetYwxx() {
this.$post('ywxxgl/uywxx/query', {
sbxxCode: this.selectedModel.name,
......@@ -494,7 +577,7 @@
this.jxlistData = res.data.records || []
})
},
/**
/**
* @description:选中标签后操作
* @param {String} code
* @return {*}
......@@ -559,6 +642,42 @@
}
}
},
/**
* @description:查询流向信息,没有查询所有
* @return {*}
* @author: lisu
*/
sblxcx() {
if (true) {
this.sblxCode = this.sblxCode.replace(/\s+/g, '');
/* 查询*/
this.$post('sbgl/usblxgx/zbInfo', {
sbxxCode: this.sblxCode
}).then(res => {
if (res.success) {
let data = res.data.records || []
if (res.data.records.length == 0) {
this.sblxcxwcxdxx = true
this.sblxcxwcxdxxText = '未查询到流向!'
setTimeout(() => {
this.sblxcxwcxdxx = false
}, 2000)
}else{
}
this.allPieData = data.filter((item) => {
return item.children.some((child) => child.data.length >= 2);
});
if(res.data.records.length!=0){
this.$success(`共查询到${res.data.records.length }条数据!共绘制${this.allPieData.length}条流向!`)
}
}
})
}
},
sbcx() {
if (!this.sbxxQueryParams.code) {
this.sbcxwcxdxx = true
......@@ -826,7 +945,8 @@
},
viewCenter() {
this.cameraTo(this.viewer.camera.position.x, this.viewer.camera.position.y, this.viewer.camera.position.z, 0, 0,
this.cameraTo(this.viewer.camera.position.x, this.viewer.camera.position.y, this.viewer.camera.position.z,
0, 0,
0)
},
reView() {
......@@ -994,14 +1114,71 @@
wireframe: false,
})
/* */
if (this.xzjj) {
// if (this.xzjj) {
// const object = model;
// if (object) {
// this.viewer.cameraControl.fitTo(object);
// }
// }
}
})
},
tdblClick() {
this.viewer.renderer.domElement.addEventListener('dblclick', (e) => {
const rayCaster = new THREE.Raycaster()
const mouse = new THREE.Vector2()
mouse.x = (e.offsetX / this.viewer.renderer.domElement.clientWidth) * 2 - 1
mouse.y = -(e.offsetY / this.viewer.renderer.domElement.clientHeight) * 2 + 1
rayCaster.setFromCamera(mouse, this.viewer.camera)
const intersects = rayCaster.intersectObject(this.viewer.scene, true) // 计算物体和射线的焦点
if (intersects[0]) {
if (intersects[0].object.name == '地面') {
return
}
let model
if (intersects[0].object.name == '') {
model = intersects[1].object
} else {
model = intersects[0].object
}
this.selectedModel = model
/* 执行并情况材料队列 */
this.reMaterialQue.forEach(item => {
item.revert()
})
this.reMaterialQue.splice(0, this.reMaterialQue.length)
/* 添加材质模型队列*/
let reMaterialQueItem = {
model,
material: model.material.clone(),
revert: function() {
this.model.material = this.material
}
}
this.reMaterialQue.push(reMaterialQueItem)
model.material = new THREE.MeshPhongMaterial({
color: new THREE.Color('rgba(255, 255, 0, 0.8)'),
transparent: true,
opacity: 0.8,
wireframe: false,
})
/* */
const object = model;
if (object) {
this.viewer.cameraControl.fitTo(object);
}
}
}
......@@ -1066,10 +1243,12 @@
ease: "power1.inOut", // 缓动函数
onUpdate: function() {
let progress = this.progress(); // 获取当前进度(0到1之间)
_camera.position.set(oldx + (x - oldx) * progress, oldy + (y - oldy) * progress, oldz + (z - oldz) *
_camera.position.set(oldx + (x - oldx) * progress, oldy + (y - oldy) * progress, oldz + (z -
oldz) *
progress);
viewer.controls.target.set(coldx + (px - coldx) * progress, coldy + (py - coldy) * progress, coldz + (
viewer.controls.target.set(coldx + (px - coldx) * progress, coldy + (py - coldy) * progress,
coldz + (
pz - coldz) * progress)
......@@ -1292,7 +1471,7 @@
right: 15px;
/* 使元素居中 */
position: absolute;
height: 90px;
height: 180px;
width: 28%;
z-index: 12;
background-color: rgba(0, 0, 0, 0.6);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment