修复水平位移沉降监测bug
This commit is contained in:
parent
bd499046e8
commit
f6ce55acbc
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Card title="锚杆内力监测">
|
||||
<Card title="水平位移沉降监测">
|
||||
<div class="pit-right-first">
|
||||
<div class="pit-content">
|
||||
<div class="select-right">
|
||||
@ -16,7 +16,7 @@
|
||||
@change="selectRangeTime"
|
||||
/>
|
||||
</div>
|
||||
<el-select v-model="measurePointNumber" style="width: 15%" size="small" @change="measurePointChange">
|
||||
<el-select v-model="measurePointNumber" style="width: 15%; margin-right: 5%" size="small" @change="measurePointChange">
|
||||
<el-option
|
||||
v-for="(item, index) in pointList"
|
||||
:key="index"
|
||||
@ -24,9 +24,9 @@
|
||||
:value="item.measurePointNumber"
|
||||
/>
|
||||
</el-select>
|
||||
<!-- <el-select v-model="sensorSn" style="width: 15%" size="small">
|
||||
<el-select v-model="sensorSn" style="width: 15%" size="small" @change="getEdgeAlarmTrend">
|
||||
<el-option v-for="(item, index) in timeList" :key="index" :label="item.sensorName" :value="item.sensorSn" />
|
||||
</el-select> -->
|
||||
</el-select>
|
||||
</div>
|
||||
<div id="pitRightFirst" ref="pitRightFirst" style="width: 100%; height: 100%"></div>
|
||||
<div class="notoDta" v-if="yData1.length == 0">
|
||||
@ -39,6 +39,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import dayjs from "dayjs";
|
||||
import Card from "@/components/card.vue";
|
||||
import symbolIcon2 from "@/assets/images/toxicGasMonitor/lineIcon2.png";
|
||||
|
||||
@ -58,7 +59,7 @@ const store = GlobalStore();
|
||||
// x轴
|
||||
let twenty_four_time = ref([] as any);
|
||||
// Y轴单位
|
||||
let unit = ref("内力(kN)" as any);
|
||||
let unit = ref("位移(mm)" as any);
|
||||
// Y轴数据
|
||||
let yData1 = ref([] as any);
|
||||
|
||||
@ -109,10 +110,11 @@ let timeList = ref([
|
||||
]);
|
||||
|
||||
// 时间轴起止时间
|
||||
let startValue = ref("2023-9-19 05:15:00" as any);
|
||||
let endValue = ref("2023-9-21 05:15:00" as any);
|
||||
let startValue = ref(dayjs().subtract(7, "day").format("YYYY-MM-DD HH:mm:ss") as any);
|
||||
let endValue = ref(dayjs().format("YYYY-MM-DD HH:mm:ss") as any);
|
||||
const measurePointChange = () => {
|
||||
drawChart();
|
||||
getDevList();
|
||||
// drawChart();
|
||||
};
|
||||
function selectRangeTime(e: any) {
|
||||
// console.log("选择时间", e);
|
||||
@ -120,7 +122,8 @@ function selectRangeTime(e: any) {
|
||||
// option.value.series[0].markLine = null;
|
||||
startValue.value = e[0];
|
||||
endValue.value = e[1];
|
||||
drawChart();
|
||||
getEdgeAlarmTrend();
|
||||
// drawChart();
|
||||
}
|
||||
|
||||
function initOption() {
|
||||
@ -402,9 +405,9 @@ function drawChart() {
|
||||
// getSensorListByMeasurePointNumber
|
||||
// 查测点列表
|
||||
const getTestPointList = async () => {
|
||||
const res: any = await selectDeepExcavationAllMeasurePointList({ projectSn: store.sn, monitorTypeId: 13 });
|
||||
pointList.value = res.result;
|
||||
measurePointNumber.value = res.result[0].measurePointNumber;
|
||||
const res: any = await selectDeepExcavationAllMeasurePointList({ projectSn: store.sn, monitorTypeId: 28 });
|
||||
pointList.value = res.result || [];
|
||||
measurePointNumber.value = pointList.value[0]?.measurePointNumber;
|
||||
getDevList();
|
||||
console.log("查测点列表", res);
|
||||
};
|
||||
@ -412,7 +415,7 @@ const getTestPointList = async () => {
|
||||
const getDevList = async () => {
|
||||
const res: any = await getSensorListByMeasurePointNumber({ projectSn: store.sn, measurePointNumber: measurePointNumber.value });
|
||||
timeList.value = res.result;
|
||||
sensorSn.value = res.result[0].sensorSn;
|
||||
sensorSn.value = res.result[0]?.sensorSn;
|
||||
console.log("查传感器列表", res);
|
||||
getEdgeAlarmTrend();
|
||||
};
|
||||
@ -420,7 +423,7 @@ const getDevList = async () => {
|
||||
let negativeAlarmValue = ref(0) as any; //负报警值
|
||||
let positiveAlarmValue = ref(0) as any; //正报警值
|
||||
|
||||
// 锚杆内力监测
|
||||
// 水平位移沉降监测
|
||||
const getEdgeAlarmTrend = async () => {
|
||||
const res: any = await selectDeepExcavationCurrentDataList({
|
||||
projectSn: store.sn,
|
||||
@ -441,7 +444,7 @@ const getEdgeAlarmTrend = async () => {
|
||||
}
|
||||
// twenty_four_time.value = res.result.map((item: any) => item.x);
|
||||
// yData.value = res.result.map((item: any) => Number(item.y));
|
||||
console.log("锚杆内力监测", res);
|
||||
console.log("水平位移沉降监测", res);
|
||||
if(yData1.value.length > 0){
|
||||
let chartDom:any = document.getElementById("pitRightFirst");
|
||||
chartDom.style.display = "block";
|
||||
@ -485,7 +488,7 @@ onMounted(async () => {
|
||||
.select-right {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: -45%;
|
||||
right: -25%;
|
||||
width: 100%;
|
||||
top: 5%;
|
||||
z-index: 9;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user