feat : 隧道模拟
This commit is contained in:
@@ -36,10 +36,10 @@
|
||||
<div class="export-btn" @click="handleExport">
|
||||
导出
|
||||
</div>
|
||||
<choose-day v-if="selectTimeButton===2" ref="chooseDayRef" @select="daySelect"/>
|
||||
<choose-day v-if="isSimulate?selectTimeButton === 0:selectTimeButton===2" ref="chooseDayRef" @select="daySelect"/>
|
||||
<choose-month v-if="selectTimeButton===1" ref="chooseMonthRef" @select="monthSelect"/>
|
||||
<time-range-btn
|
||||
:buttonList="timeList"
|
||||
:buttonList="isSimulate?timeSimulateList:timeList"
|
||||
v-model="selectTimeButton"
|
||||
@select="timeSelect"
|
||||
/>
|
||||
@@ -62,7 +62,7 @@
|
||||
import ItemInfo from "./childComps/ItemInfo.vue";
|
||||
import TimeRangeBtn from "@/components/timeRangeBtn/index.vue"
|
||||
import * as echarts from 'echarts';
|
||||
import {getEchartsInfo} from "@/api/largeScreen";
|
||||
import {getEchartsInfo, getSimulationEchartsInfo} from "@/api/largeScreen";
|
||||
import ChooseDay from "@/components/chooseDates/index.vue"
|
||||
import ChooseMonth from "@/components/chooseMonth/index.vue"
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
@@ -74,7 +74,8 @@ let myEcharts = reactive({});
|
||||
const props = defineProps({
|
||||
list: Array,
|
||||
windSpeed: Array,
|
||||
airData: Array
|
||||
airData: Array,
|
||||
isSimulate: Boolean,
|
||||
});
|
||||
const isFullScreen = ref(false);
|
||||
let dataZoomTop = reactive('87%')
|
||||
@@ -94,11 +95,12 @@ const dialogTitle = ref('风速')
|
||||
const openDialogId = ref(0)
|
||||
const airList = ref([])
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(2);
|
||||
const timeSimulateList = ref(["日"]);
|
||||
const isWindSpeedVisited = ref(false);
|
||||
const showSpeedLoading = ref(false)
|
||||
const clickMonth = ref('')
|
||||
const clickDay = ref('')
|
||||
const selectTimeButton = ref(props.isSimulate?0:2);
|
||||
watch(() => props.windSpeed, (now) => {
|
||||
now.forEach(newItem => {
|
||||
windSpeed.value =newItem.value
|
||||
@@ -248,29 +250,56 @@ const getChartInfo = (equipmentId, type = 'day', time = '', flag, startTime, end
|
||||
}
|
||||
}
|
||||
})
|
||||
getEchartsInfo(equipmentId, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showSpeedLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('containerWind')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('airDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data.values, dataZoomTop)
|
||||
if(props.isSimulate){
|
||||
|
||||
getSimulationEchartsInfo(equipmentId, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showSpeedLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('containerWind')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('airDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data.values, dataZoomTop)
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
loadingText.value = res.msg
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
loadingText.value = res.msg
|
||||
}
|
||||
})
|
||||
}else{
|
||||
getEchartsInfo(equipmentId, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showSpeedLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('containerWind')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('airDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data.values, dataZoomTop)
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
loadingText.value = res.msg
|
||||
}
|
||||
})
|
||||
}
|
||||
nextTick(() => {
|
||||
loadingText.value = '加载中...'
|
||||
})
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
<div class="export-btn" @click="handleExport">
|
||||
导出
|
||||
</div>
|
||||
<choose-dates v-if="selectTimeButton === 2" ref="chooseDayRef" @select="daySelect" />
|
||||
<choose-dates v-if="isSimulate?selectTimeButton === 0:selectTimeButton===2" ref="chooseDayRef" @select="daySelect" />
|
||||
<choose-month v-if="selectTimeButton === 1" ref="chooseMonthRef" @select="monthSelect" />
|
||||
<time-range-btn :buttonList="timeList" v-model="selectTimeButton" @select="timeSelect" />
|
||||
<time-range-btn :buttonList="isSimulate?timeSimulateList:timeList" v-model="selectTimeButton" @select="timeSelect" />
|
||||
</div>
|
||||
<div class="change-screen">
|
||||
<el-icon size="55" color="#05feff" class="full-icon" title="放大" @click.stop="handleFullScreen"
|
||||
@@ -47,7 +47,7 @@
|
||||
import GasInfoItem from "./childComps/GasInfoItem.vue";
|
||||
import * as echarts from "echarts";
|
||||
import TimeRangeBtn from "@/components/timeRangeBtn/index.vue";
|
||||
import { getBadGasEchartsInfo } from "@/api/largeScreen";
|
||||
import {getBadGasEchartsInfo, getSimulationBadGasEchartsInfo} from "@/api/largeScreen";
|
||||
import ChooseDates from "@/components/chooseDates/index.vue"
|
||||
import ChooseMonth from "@/components/chooseMonth/index.vue"
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
@@ -60,11 +60,13 @@ const props = defineProps({
|
||||
badGasData: Array,
|
||||
tunnelId: Number,
|
||||
loading: Number,
|
||||
isSimulate: Boolean,
|
||||
});
|
||||
const chooseDayRef = ref();
|
||||
const chooseMonthRef = ref();
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(2);
|
||||
const timeSimulateList = ref(["日"]);
|
||||
const selectTimeButton = ref(props.isSimulate?0:2);
|
||||
const isBadGasVisited = ref(false);
|
||||
const showLoading = ref(false)
|
||||
const isFullScreen = ref(false);
|
||||
@@ -75,6 +77,7 @@ let myEcharts = reactive({});
|
||||
const clickMonth = ref('')
|
||||
const clickDay = ref('')
|
||||
const bgImage = computed(() => (isBadGasVisited.value ? "sp_active.png" : "bg.png"));
|
||||
|
||||
watch(
|
||||
() => props.list,
|
||||
(now) => {
|
||||
@@ -288,27 +291,52 @@ const getBadGasChartInfo = (type, time = '', flag, startTime, endTime) => {
|
||||
}
|
||||
}
|
||||
})
|
||||
getBadGasEchartsInfo(id, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('containerBad')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('badDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data, dataZoomTop)
|
||||
if(props.isSimulate){
|
||||
getSimulationBadGasEchartsInfo(id, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('containerBad')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('badDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data, dataZoomTop)
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
getBadGasEchartsInfo(id, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('containerBad')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('badDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data, dataZoomTop)
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
const handleOpenChart = () => {
|
||||
clickMonth.value = ''
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<div class="echart"></div>
|
||||
<div class="fan-name">{{ changeNum(item) }}号风机</div>
|
||||
<div class="option-nav">
|
||||
<div class="state">
|
||||
<div class="state" v-if="!isSimulate">
|
||||
<!-- :class="{ stopColor:changeStopColor(item.breakdown,item.running)}"-->
|
||||
<div class="blue-state" :style="{backgroundColor:changeStopColor(item.breakdown,item.running)}">
|
||||
<div class="state-icon"></div>
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="power">
|
||||
<div class="check-box">
|
||||
<div class="check-box" v-if="!isSimulate">
|
||||
<!-- <div style="display: flex;">-->
|
||||
<!-- <el-radio :label="true" @click="changeModel(item)">自动</el-radio>-->
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<el-radio :label="false" @click.prevent ="changeModel(item,false)">手动</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="edit-power" title="输入完成后, 请回车进行修改">
|
||||
<div class="edit-power" title="输入完成后, 请回车进行修改" v-if="!isSimulate">
|
||||
<span style="color: white">给定频率</span>
|
||||
<!-- <span class="units"-->
|
||||
<!-- ><input-->
|
||||
@@ -68,7 +68,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="current" @click="handleOpenChart(item)">
|
||||
<div class="current" @click="handleOpenChart(item)" v-if="!isSimulate">
|
||||
<fan-info-item :wp="transducerData[index]"/>
|
||||
</div>
|
||||
<div class="line" v-if="index!=socketData.length-1"></div>
|
||||
@@ -152,6 +152,7 @@ const props = defineProps({
|
||||
fanData: Array,
|
||||
transducerData: Array,
|
||||
loading: Number,
|
||||
isSimulate: Boolean,
|
||||
});
|
||||
const chooseDayRef = ref();
|
||||
const chooseMonthRef = ref();
|
||||
|
||||
408
src/components/content/tunnelScene/TunnelSceneSimulate.vue
Normal file
408
src/components/content/tunnelScene/TunnelSceneSimulate.vue
Normal file
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<div id="scene">
|
||||
<div id="cvs" ref="content"></div>
|
||||
<dev-info ref="info" :devInfo="devInfo"/>
|
||||
<!-- 这里的预览模式需要做成不能修改的模式 -->
|
||||
<edit-dialog
|
||||
ref="edit"
|
||||
@addEquipment="handleAddEqu"
|
||||
@removeEquipment="handleRemoveEqu"
|
||||
@cancel="handleCancel"
|
||||
:hasDev="hasDevice"
|
||||
:pointNum="pointNum"
|
||||
:tunnelId="params.tunnelId"
|
||||
:position="targetP?.name"
|
||||
:hasEquipment="hasDevice"
|
||||
:pointGap="pointGap"
|
||||
:form="params.form"
|
||||
/>
|
||||
<el-dialog
|
||||
v-model="centerDialogVisible"
|
||||
width="30%"
|
||||
destroy-on-close
|
||||
center
|
||||
:show-close="false"
|
||||
style="
|
||||
margin: 20% auto;
|
||||
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>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import * as three from "three";
|
||||
import ThreeDScene from "./sceneClass/demo.js";
|
||||
import DevInfo from "./displayInfoComp/DevInfo.vue";
|
||||
import EditDialog from "./editEquComp/editDialog.vue";
|
||||
|
||||
// 导入模模型加载器
|
||||
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 * as TWEEN from "three/examples/jsm/libs/tween.module";
|
||||
import {
|
||||
CSS3DRenderer,
|
||||
CSS3DObject,
|
||||
CSS3DSprite,
|
||||
} from "three/addons/renderers/CSS3DRenderer.js";
|
||||
// 引入CSS2渲染器CSS2DRenderer和CSS2模型对象CSS2DObject
|
||||
import {
|
||||
CSS2DRenderer,
|
||||
CSS2DObject,
|
||||
} from "three/addons/renderers/CSS2DRenderer.js";
|
||||
|
||||
import {OBJLoader} from "three/examples/jsm/loaders/OBJLoader";
|
||||
import {RGBELoader} from "three/examples/jsm/loaders/RGBELoader";
|
||||
import {onMounted, reactive, ref, toRaw, watch} from "vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import {useModelSceneStore} from "@/store/modelSceneStore";
|
||||
import {LOD} from "three";
|
||||
// 获取html标签跟随组件dom
|
||||
const content = ref(null);
|
||||
const info = ref(null);
|
||||
const edit = ref(null);
|
||||
let modelList = ref(null);
|
||||
let demo; //定义demo对象
|
||||
const loader = new OBJLoader();
|
||||
let hdrLoader = new RGBELoader();
|
||||
let backColorSet = three.sRGBEncoding;
|
||||
const modelStore = useModelSceneStore();
|
||||
const params = defineProps([
|
||||
"isedit",
|
||||
"tunnelId",
|
||||
"tunnelLength",
|
||||
"form",
|
||||
"deviceData",
|
||||
"devRealtimeData",
|
||||
]); //接收参数看是不是编辑模式,如果是编辑模式,则需要做一些处理
|
||||
|
||||
let isedit = ref(params.isedit);
|
||||
let tunnelId = reactive(params.tunnelId);
|
||||
|
||||
watch(
|
||||
() => params.tunnelLength,
|
||||
(now) => {
|
||||
params.tunnelLength = now;
|
||||
// console.log(params.tunnelLength);
|
||||
pointGap = now / 20;
|
||||
// console.log(params.form.tunnelName);
|
||||
},
|
||||
{deep: true}
|
||||
);
|
||||
|
||||
let pointGap = reactive(params.tunnelLength);
|
||||
|
||||
onMounted(handleMounted);
|
||||
|
||||
// 挂载后回调
|
||||
async function handleMounted() {
|
||||
const doms = [info.value.$el, edit.value.$el];
|
||||
demo = new ThreeDScene(three, content.value);
|
||||
//看是不是预览模式,然后继续相关的操作(会在demo中的初始化中进行)
|
||||
demo.isedit = params.isedit;
|
||||
// "../../../../public/tunnelModel/chanel-have-wall-now-use.gltf"
|
||||
const loaded = await demo.loadModel(
|
||||
GLTFLoader,
|
||||
"/tunnelModel/chanel-have-wall-now-use.gltf",
|
||||
true
|
||||
);
|
||||
demo.addOrbitControls(OrbitControls, true);
|
||||
demo.addTween(TWEEN);
|
||||
demo.addCSS3Renderer(CSS3DRenderer, CSS3DSprite, doms);
|
||||
demo.setDistance(10);
|
||||
lClickCallback(demo); //绑定左键回调
|
||||
rClickCallback(demo); //绑定右键回调
|
||||
|
||||
//加载HDR背景图片
|
||||
demo.loadBackground(hdrLoader, backColorSet);
|
||||
|
||||
// 初始化设备模型
|
||||
try {
|
||||
const map = new Map();
|
||||
map.set("equ_fan", await loadModel("/devicesModel/model2.obj"));
|
||||
map.set("equ_sensors", await loadModel("/devicesModel/sensors.obj"));
|
||||
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 = [
|
||||
{
|
||||
"typeKey": "frequency",
|
||||
"position": "point_001_tr",
|
||||
"threshold": "",
|
||||
"equipmentId": 3048,
|
||||
"equipmentName": "温度传感器",
|
||||
"equipmentType": "sensor"
|
||||
}, {
|
||||
"typeKey": "temperature",
|
||||
"position": "point_020_tr",
|
||||
"threshold": "",
|
||||
"equipmentId": 10,
|
||||
"equipmentName": "1度传感器",
|
||||
"equipmentType": "sensor"
|
||||
}
|
||||
]
|
||||
// modelList.value = await initData(params.tunnelId, params.form);
|
||||
// console.log("test", modelList.value);
|
||||
demo.editTunnelInit(toRaw(modelList.value));
|
||||
demo.SignsInf(params.form.tunnelAlias, String(params.tunnelLength));
|
||||
} catch (err) {
|
||||
}
|
||||
}
|
||||
|
||||
// 每个模型加载回调
|
||||
function loadModel(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
loader.load(
|
||||
path,
|
||||
(obj) => {
|
||||
resolve(obj);
|
||||
},
|
||||
(xhr) => {
|
||||
},
|
||||
(err) => {
|
||||
reject(err);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
let hasDevice = ref(true);
|
||||
let devInfo = reactive({
|
||||
meshId: null,
|
||||
name: "无",
|
||||
state: "无",
|
||||
position: "无",
|
||||
});
|
||||
|
||||
// 对象建构赋值功能
|
||||
function editDevInfo(
|
||||
value = {
|
||||
meshId: null,
|
||||
name: "无",
|
||||
state: "无",
|
||||
position: "无",
|
||||
}
|
||||
) {
|
||||
devInfo.meshId = value.meshId;
|
||||
devInfo.name = value.name;
|
||||
devInfo.state = value.state;
|
||||
devInfo.position = value.position;
|
||||
}
|
||||
|
||||
//左键/双击左键回调函数
|
||||
function lClickCallback(demo) {
|
||||
// console.log('左键点击查看信息');
|
||||
|
||||
//demo动态添加函数,为操作组件内部
|
||||
function displayDevInfo(targetPoint = null) {
|
||||
hasDevice.value = targetPoint.hasDevice;
|
||||
if (!targetPoint.info) {
|
||||
editDevInfo();
|
||||
return;
|
||||
}
|
||||
editDevInfo(targetPoint.info);
|
||||
}
|
||||
|
||||
// 传给内部使用
|
||||
demo.addFunction("displayDevInfo", displayDevInfo);
|
||||
}
|
||||
|
||||
let pointNum = ref(0);
|
||||
let targetP = ref({});
|
||||
|
||||
// 右键点击附着点后调函数
|
||||
function rClickCallback(demo) {
|
||||
function editDev(targetPoint = null) {
|
||||
hasDevice.value = targetPoint.hasDevice;
|
||||
targetP.value = targetPoint;
|
||||
pointNum.value = Number(
|
||||
targetPoint.name.substring(
|
||||
targetPoint.name.indexOf("_") + 1,
|
||||
targetPoint.name.lastIndexOf("_")
|
||||
) - 1
|
||||
);
|
||||
if (!targetPoint.info) return;
|
||||
editDevInfo(targetPoint.info);
|
||||
}
|
||||
|
||||
demo.addFunction("editDev", editDev);
|
||||
}
|
||||
|
||||
// function streetSigns(){
|
||||
|
||||
// }
|
||||
|
||||
// 场景添加设备
|
||||
function handleAddEqu(formInfo) {
|
||||
demo.addEquipment(targetP.value, formInfo);
|
||||
// //将墙壁设置为可以穿透点击
|
||||
// for (let line = 1; line <= 20; line++) {
|
||||
// if (line < 10) {
|
||||
// let wall = 'wall_' + '0' + line
|
||||
// this.scene.getObjectByName(wall).layers.set(0)
|
||||
// } else if (line >= 10) {
|
||||
// let wall = 'wall_' + line
|
||||
// this.scene.getObjectByName(wall).layers.set(0)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
const centerDialogVisible = ref(false);
|
||||
|
||||
// 删除设备
|
||||
function handleRemoveEqu() {
|
||||
if (!targetP.value.hasDevice) {
|
||||
ElMessage({
|
||||
message: "该点位不存在设备!",
|
||||
type: "warning",
|
||||
});
|
||||
return;
|
||||
}
|
||||
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() {
|
||||
if (!demo) return;
|
||||
// 关闭标签
|
||||
demo.isControlOrbit(true);
|
||||
demo._resetState();
|
||||
demo.clearTagsObj();
|
||||
}
|
||||
|
||||
//现在首先有二种方案,是写在TunnelScene.vue中还是demo.js中呢?
|
||||
//我认为可能看数据在哪获取?到时候看在哪里导入,首先我们放在TunnelScene里面吧
|
||||
//因为没获取到接口,我们先写死!!!
|
||||
//需要参考接口的数据结构!!!,主要是传入函数的参数应该是什么结构???
|
||||
const ThreeConfig = {
|
||||
code: 0,
|
||||
data: {
|
||||
tunnelThreeConfig: [
|
||||
{
|
||||
equipmentId: "fan_01", //传感器id
|
||||
equipmentName: "01", //设备名称
|
||||
pointName: "point_005_tl", //附着点名称(定位)
|
||||
equipmentType: "fan", //设备类型(类型可根据后端
|
||||
equipmentValue: 23, //设备存的值
|
||||
},
|
||||
{
|
||||
equipmentId: "sensors_01", //传感器id
|
||||
equipmentName: "01", //设备名称
|
||||
pointName: "point_009_bl", //附着点名称(定位)
|
||||
equipmentType: "sensors", //设备类型(类型可根据后端
|
||||
equipmentValue: 67, //设备存的值
|
||||
},
|
||||
],
|
||||
},
|
||||
msg: "dda",
|
||||
};
|
||||
|
||||
//=================实时更新数据
|
||||
watch(params.devRealtimeData, () => {
|
||||
// console.log("devRealtimeData:", params.devRealtimeData);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#scene {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
#cvs {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
#remove-title {
|
||||
height: 42px;
|
||||
font-size: 32px;
|
||||
font-family: MicrosoftYaHei, MicrosoftYaHei;
|
||||
font-weight: bold;
|
||||
color: #08b7b8;
|
||||
line-height: 42px;
|
||||
letter-spacing: 3px;
|
||||
text-align: center;
|
||||
margin: 65px 0px 70px 0px;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 80px;
|
||||
|
||||
:nth-child(1) {
|
||||
width: 190px;
|
||||
height: 60px;
|
||||
border-radius: 11px;
|
||||
border: 2px solid #0f82af;
|
||||
font-size: 28px;
|
||||
font-family: MicrosoftYaHei;
|
||||
color: #08b7b8;
|
||||
line-height: 37px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
:nth-child(2) {
|
||||
width: 190px;
|
||||
height: 60px;
|
||||
background: #08b7b8;
|
||||
border-radius: 11px;
|
||||
font-size: 28px;
|
||||
font-family: MicrosoftYaHei, MicrosoftYaHei;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
line-height: 37px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -247,6 +247,7 @@ const setValueB = () => {
|
||||
valueB.value.style.height = `${width}px`;
|
||||
}
|
||||
const getBasicData = (data) => {
|
||||
if(!data)return;
|
||||
electricityConsumptionMonthly.value = data.electricityConsumptionCount
|
||||
monthlySavings.value = data.conserveElectricityCount
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
<div class="export-btn" @click="handleExport">
|
||||
导出
|
||||
</div>
|
||||
<choose-day v-if="selectTimeButton===2" ref="chooseDayRef" @select="daySelect"/>
|
||||
<choose-day v-if="isSimulate?selectTimeButton === 0:selectTimeButton===2" ref="chooseDayRef" @select="daySelect"/>
|
||||
<choose-month v-if="selectTimeButton===1" ref="chooseMonthRef" @select="monthSelect"/>
|
||||
<time-range-btn
|
||||
:buttonList="timeList"
|
||||
:buttonList="isSimulate?timeSimulateList:timeList"
|
||||
v-model="selectTimeButton"
|
||||
@select="timeSelect"
|
||||
/>
|
||||
@@ -52,7 +52,7 @@
|
||||
import WindPressureItem from "./childComps/WindPressureItem.vue";
|
||||
import TimeRangeBtn from "@/components/timeRangeBtn/index.vue"
|
||||
import * as echarts from 'echarts';
|
||||
import {getEchartsInfo} from "@/api/largeScreen";
|
||||
import {getEchartsInfo, getSimulationEchartsInfo} from "@/api/largeScreen";
|
||||
import ChooseDay from "@/components/chooseDates/index.vue"
|
||||
import ChooseMonth from "@/components/chooseMonth/index.vue"
|
||||
import elementResizeDetectorMaker from "element-resize-detector";
|
||||
@@ -63,6 +63,7 @@ const props = defineProps({
|
||||
list: Array,
|
||||
winData: Array,
|
||||
loading: Number,
|
||||
isSimulate: Boolean,
|
||||
});
|
||||
const loadingText = ref('加载中...')
|
||||
const chooseDayRef = ref();
|
||||
@@ -70,7 +71,7 @@ const chooseMonthRef = ref();
|
||||
const windSort = ref(1)
|
||||
const windSortId = ref(1)
|
||||
const timeList = ref(["年", "月", "日"]);
|
||||
const selectTimeButton = ref(2);
|
||||
const timeSimulateList = ref(["日"]);
|
||||
const isVisited = ref(false);
|
||||
const isFullScreen = ref(false);
|
||||
let chartData = reactive([])
|
||||
@@ -80,6 +81,7 @@ let myEcharts = reactive({});
|
||||
const wpList = ref([]);
|
||||
const clickMonth = ref('')
|
||||
const clickDay = ref('')
|
||||
const selectTimeButton = ref(props.isSimulate?0:2);
|
||||
watch(() => props.list, (now) => {
|
||||
wpList.value.forEach(item => {
|
||||
now.forEach(newItem => {
|
||||
@@ -201,29 +203,57 @@ const getWindInfo = (equipmentId, type = 'day', time = '', flag, startTime, endT
|
||||
}
|
||||
}
|
||||
})
|
||||
getEchartsInfo(equipmentId, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('container')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('windDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data.values, dataZoomTop)
|
||||
if(props.isSimulate) {
|
||||
getSimulationEchartsInfo(equipmentId, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('container')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('windDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data.values, dataZoomTop)
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
loadingText.value = res.msg
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
loadingText.value = res.msg
|
||||
}
|
||||
})
|
||||
|
||||
}else{
|
||||
getEchartsInfo(equipmentId, time, type, startTime, endTime).then(res => {
|
||||
if (res?.code === 1000) {
|
||||
showLoading.value = false
|
||||
chartData = res.data
|
||||
nextTick(() => {
|
||||
if (flag) {
|
||||
const fanChart = document.getElementById('container')
|
||||
const erd = elementResizeDetectorMaker();
|
||||
erd.listenTo(document.getElementById('windDialog'), (element) => {
|
||||
fanChart.style.height = element.offsetHeight - 140 + 'px'
|
||||
myEcharts.resize();
|
||||
});
|
||||
if (isFullScreen.value) {
|
||||
initChart(res.data.dates, res.data.values, dataZoomTop)
|
||||
}
|
||||
} else {
|
||||
shrinkScreen()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
loadingText.value = res.msg
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
nextTick(() => {
|
||||
loadingText.value = '加载中...'
|
||||
})
|
||||
|
||||
@@ -39,47 +39,33 @@
|
||||
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
|
||||
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="fanData">
|
||||
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
||||
<el-table-column prop="ratedPower" label="额定功率" align="center">
|
||||
<template #default="scope">
|
||||
<el-input placeholder="额定功率" v-model="scope.row.ratedPower"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phaseCurrentAOffset" label="A电流偏移量" align="center"/>
|
||||
<el-table-column prop="acurrentValue" label="A电流阈值" align="center">
|
||||
<template #default="scope">
|
||||
<el-input placeholder="A电流" v-model="scope.row.acurrentValue"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phaseCurrentBOffset" label="B电流偏移量" align="center"/>
|
||||
<el-table-column prop="bcurrentValue" label="B电流阈值" align="center">
|
||||
<template #default="scope">
|
||||
<el-input placeholder="B电流" v-model="scope.row.bcurrentValue"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="phaseCurrentCOffset" label="C电流偏移量" align="center"/>
|
||||
<el-table-column prop="ccurrentValue" label="C电流阈值" align="center">
|
||||
<template #default="scope">
|
||||
<el-input placeholder="C电流" v-model="scope.row.ccurrentValue"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center">
|
||||
<template #default="scope">
|
||||
<!-- {{scope.row.serialNumberOption.filter(item => item.value == scope.row.serialNumber).map(item => item.label)[0]}}?-->
|
||||
<!-- <el-select placeholder="请选择" v-model="scope.row.serialNumber" popper-class="serialNumber-select"-->
|
||||
<!-- clearable class="serialNumber">-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="item in scope.row.serialNumberOption"-->
|
||||
<!-- :key="item.value"-->
|
||||
<!-- :label="item.label"-->
|
||||
<!-- :value="item.value"-->
|
||||
<!-- />-->
|
||||
<!-- </el-select>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="ratedPower" label="额定功率" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input placeholder="额定功率" v-model="scope.row.ratedPower"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="phaseCurrentAOffset" label="A电流偏移量" align="center"/>-->
|
||||
<!-- <el-table-column prop="acurrentValue" label="A电流阈值" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input placeholder="A电流" v-model="scope.row.acurrentValue"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="phaseCurrentBOffset" label="B电流偏移量" align="center"/>-->
|
||||
<!-- <el-table-column prop="bcurrentValue" label="B电流阈值" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input placeholder="B电流" v-model="scope.row.bcurrentValue"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="phaseCurrentCOffset" label="C电流偏移量" align="center"/>-->
|
||||
<!-- <el-table-column prop="ccurrentValue" label="C电流阈值" align="center">-->
|
||||
<!-- <template #default="scope">-->
|
||||
<!-- <el-input placeholder="C电流" v-model="scope.row.ccurrentValue"-->
|
||||
<!-- ></el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="state" label="状态" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<div class="switch">
|
||||
@@ -127,7 +113,7 @@
|
||||
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
|
||||
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="winData">
|
||||
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
||||
<el-table-column prop="offset" label="偏移量" align="center"/>
|
||||
<!-- <el-table-column prop="offset" label="偏移量" align="center"/>-->
|
||||
<el-table-column prop="unit" label="单位" align="center">
|
||||
<template #default="scope">
|
||||
<el-input placeholder="单位" v-model="scope.row.unit"></el-input>
|
||||
@@ -151,22 +137,6 @@
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" width="500">
|
||||
<template #default="scope">
|
||||
<el-select placeholder="请选择" v-model="scope.row.serialNumber" popper-class="serialNumber-select"
|
||||
clearable class="serialNumber" @clear="clearWinDataSelectedOption"
|
||||
@change="changeWindDataSerialNumber($event,scope.row.serialNumberOption)">
|
||||
<el-option
|
||||
v-for="item in scope.row.serialNumberOption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:disabled="serialNumberOptionDisabled(item)"
|
||||
:title="serialNumberOptionDisabled(item)?'该序列号已选择!':''"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="状态" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<div class="switch wind-switch">
|
||||
@@ -214,7 +184,7 @@
|
||||
:header-cell-style="{backgroundColor: '#064B66',color: '#fff',fontSize: '40px',borderBottom: 'none' }"
|
||||
:cell-style="{textAlign: 'center',borderBottom: 'none'}" :data="otherData">
|
||||
<el-table-column prop="equipmentName" label="设备名称" align="center"/>
|
||||
<el-table-column prop="offset" label="偏移量" align="center"/>
|
||||
<!-- <el-table-column prop="offset" label="偏移量" align="center"/>-->
|
||||
<el-table-column prop="unit" label="单位" align="center">
|
||||
<template #default="scope">
|
||||
<el-input placeholder="单位" v-model="scope.row.unit"></el-input>
|
||||
@@ -238,19 +208,6 @@
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="serialNumber" label="序列号" align="center" width="500">
|
||||
<template #default="scope">
|
||||
<el-select placeholder="请选择" v-model="scope.row.serialNumber" popper-class="serialNumber-select"
|
||||
clearable class="serialNumber">
|
||||
<el-option
|
||||
v-for="item in otherSensorSerialNumberOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="state" label="状态" align="center" width="200">
|
||||
<template #default="scope">
|
||||
<div class="switch wind-switch">
|
||||
@@ -291,11 +248,12 @@ import {
|
||||
editEquipment,
|
||||
getTunnelDetail,
|
||||
getOtherSensorSerialNumberOptions,
|
||||
getWindPressureSerialNumberOptions
|
||||
getWindPressureSerialNumberOptions, getSimulateTunnelDetail, editSimulateEquipment
|
||||
} from "@/api/tunnelManage";
|
||||
import TunnelTitle from "@/components/tunnelTitle/index.vue";
|
||||
import {debounce} from 'lodash'
|
||||
import {defineEmits} from "vue";
|
||||
import {startSimulation} from "@/api/largeScreen.js";
|
||||
|
||||
const router = useRouter()
|
||||
const tunnelId = reactive(router.currentRoute.value.params.tunnelId)
|
||||
@@ -316,44 +274,7 @@ const siteId = ref(0)
|
||||
const emit = defineEmits([
|
||||
"cancel"
|
||||
]);
|
||||
const getWindPressureOptions = async () => {
|
||||
let {data, code, msg} = await getWindPressureSerialNumberOptions(tunnelId)
|
||||
if (code === 1000) {
|
||||
// windPressureDataSerialNumberOptions.value= data
|
||||
return data
|
||||
} else {
|
||||
ElMessage.error(msg)
|
||||
}
|
||||
}
|
||||
|
||||
const getOtherSensorOptions = async () => {
|
||||
let {data, code, msg} = await getOtherSensorSerialNumberOptions(tunnelId)
|
||||
if (code === 1000) {
|
||||
otherSensorSerialNumberOptions.value = data
|
||||
} else {
|
||||
ElMessage.error(msg)
|
||||
}
|
||||
}
|
||||
getOtherSensorOptions()
|
||||
const clearWinDataSelectedOption = () => {
|
||||
winDataSelectedOption.value = []
|
||||
}
|
||||
const changeWindDataSerialNumber = (value, options) => {
|
||||
// console.info("🚀 ~method:changeWindDataSerialNumber -----", value,options)
|
||||
options?.forEach(item => {
|
||||
if (item.value == value) {
|
||||
// console.info("🚀 ~method:item.label -----", item.label)
|
||||
if (item.label.indexOf('PLC') >= 0) {
|
||||
winDataSelectedOption.value = []
|
||||
} else {
|
||||
winDataSelectedOption.value.push(value)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const serialNumberOptionDisabled = (item) => {
|
||||
return winDataSelectedOption.value.indexOf(item.value) >= 0;
|
||||
}
|
||||
const changeData = (item) => {
|
||||
return {
|
||||
equipmentId: item.equipmentId,
|
||||
@@ -368,7 +289,7 @@ const changeData = (item) => {
|
||||
const editEquip = debounce(() => {
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '修改中...',
|
||||
text: '开始模拟中',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass: 'allLoading'
|
||||
})
|
||||
@@ -407,23 +328,23 @@ const editEquip = debounce(() => {
|
||||
newSensor.push(changeData(item))
|
||||
})
|
||||
const basicData = {
|
||||
tunnelId: tunnelId,
|
||||
projectId: tunnelId,
|
||||
acquisitionList: newFrequency,
|
||||
frequencyChangerList: newFan,
|
||||
windPressureSensorList: newWind,
|
||||
sensorList: newSensor,
|
||||
// shuntList: editFenLiuData.value,
|
||||
}
|
||||
// console.info("🚀 ~ file:index method: line:478 -----",basicData)
|
||||
editEquipment(basicData).then(res => {
|
||||
console.info("🚀 ~ file:index method: line:478 -----",basicData)
|
||||
editSimulateEquipment(basicData).then(async res => {
|
||||
if (res.code === 1000) {
|
||||
loading.close()
|
||||
ElMessage.success('修改成功')
|
||||
router.push('/tunnel/' + siteId.value + '/' + type + '/' + userId)
|
||||
// ElMessage.success('开始模拟')
|
||||
let res= await startSimulation(tunnelId)
|
||||
console.log('res',res)
|
||||
emit('submit')
|
||||
} else {
|
||||
ElMessage.error(res.msg)
|
||||
loading.close()
|
||||
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
@@ -433,32 +354,24 @@ const handleChangeMenu = (e) => {
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
const windPressureOption = await getWindPressureOptions()
|
||||
const loading = ElLoading.service({
|
||||
lock: true,
|
||||
text: '正在加载系统资源...',
|
||||
background: 'rgba(0, 0, 0, 0.7)',
|
||||
customClass: 'allLoading'
|
||||
})
|
||||
await getEquipmentList(tunnelId).then(res => {
|
||||
await getSimulateTunnelDetail(tunnelId).then(res => {
|
||||
if (res.code === 1000) {
|
||||
fanData.value = res.data.frequencyChangerList
|
||||
res.data.windPressureSensorList?.forEach(item => {
|
||||
fanData.value = res.data.equipmentList.frequencyChangerList
|
||||
res.data.equipmentList.windPressureSensorList?.forEach(item => {
|
||||
item.offset = item.offset + 4000
|
||||
})
|
||||
winData.value = res.data.windPressureSensorList
|
||||
winData.value?.forEach(item => {
|
||||
for (const equipmentId in windPressureOption) {
|
||||
if (item.equipmentId == equipmentId) {
|
||||
item.serialNumberOption = windPressureOption[equipmentId]
|
||||
}
|
||||
}
|
||||
})
|
||||
res.data.sensorList?.forEach(item => {
|
||||
winData.value = res.data.equipmentList.windPressureSensorList
|
||||
res.data.equipmentList.sensorList?.forEach(item => {
|
||||
item.offset = item.offset + 4000
|
||||
})
|
||||
otherData.value = res.data.sensorList
|
||||
res.data.acquisitionList.map(item => {
|
||||
otherData.value = res.data.equipmentList.sensorList
|
||||
res.data.equipmentList.acquisitionList?.map(item => {
|
||||
item.acquisitionPeriod = item.acquisitionPeriod / 1000
|
||||
if (item.typeKey === 'frequency') {
|
||||
fanFrequency.value = item.acquisitionPeriod
|
||||
@@ -472,14 +385,6 @@ const getList = async () => {
|
||||
loading.close()
|
||||
})
|
||||
}
|
||||
const getTunnel = () => {
|
||||
getTunnelDetail(tunnelId).then((res) => {
|
||||
if (res?.code === 1000) {
|
||||
siteId.value = res.data.siteId
|
||||
}
|
||||
});
|
||||
}
|
||||
getTunnel()
|
||||
getList()
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@@ -628,7 +533,7 @@ getList()
|
||||
.device-box {
|
||||
z-index: 9999;
|
||||
display: flex;
|
||||
width: 3500px;
|
||||
width: 2500px;
|
||||
height: 1600px;
|
||||
background: #064B66;
|
||||
border-radius: 20px;
|
||||
|
||||
Reference in New Issue
Block a user