fix: BUG修改

This commit is contained in:
kun 2024-02-21 18:52:31 +08:00
parent e02242e068
commit 0dace7ad08
12 changed files with 104 additions and 61 deletions

View File

@ -66,11 +66,13 @@
</div>
</div>
<div class="subMenuList" v-if="itemList != null && itemList.length >= 1">
<div class="subMenuItem">
<div class="subItem" v-for="(data, i) in itemList" :key="i" :index="data.companyPath" @click="navigateTo(data, 2)">
<span style="white-space: nowrap" :class="{ active2: activeTab2 === data.companyPath }">{{ data.menuName }}</span>
<el-scrollbar class="scrollItem">
<div class="subMenuItem">
<div class="subItem" v-for="(data, i) in itemList" :key="i" :index="data.companyPath" @click="navigateTo(data, 2)">
<span style="white-space: nowrap" :class="{ active2: activeTab2 === data.companyPath }">{{ data.menuName }}</span>
</div>
</div>
</div>
</el-scrollbar>
</div>
</div>
<div class="contentDate" v-if="itemList != null && itemList.length >= 1">
@ -568,7 +570,7 @@ function jumpBgd() {
line-height: 55px;
margin: -4% auto 0 2%;
font-family: pmzd;
div {
> div {
position: relative;
margin-top: 1%;
height: 60%;
@ -601,15 +603,22 @@ function jumpBgd() {
font-family: none;
background: url("@/assets/images/subTabImg.gif") no-repeat;
background-size: 100% 100%;
.subMenuItem {
width: 75%;
margin-top: -2.5%;
.scrollItem {
width: 73%;
height: max-content;
margin-top: -2%;
margin-left: 2%;
display: flex;
}
.subItem {
width: 100px;
text-align: center;
.subMenuItem {
width: 100%;
display: flex;
.subItem {
width: 100px;
text-align: center;
}
.subItem:not(:last-child) {
margin-right: 0.3%;
}
}
}
// :nth-child(1) {
// margin-left: 2%;

View File

@ -16,7 +16,12 @@
/>
</div>
<el-select v-model="measurePointNumber" style="width: 15%; margin-right: 5%" size="small">
<el-option v-for="(item, index) in pointList" :key="index" :label="item.measurePointName" :value="item.measurePointNumber" />
<el-option
v-for="(item, index) in pointList"
:key="index"
:label="item.measurePointName"
:value="item.measurePointNumber"
/>
</el-select>
<el-select v-model="sensorSn" style="width: 15%" size="small">
<el-option v-for="(item, index) in timeList" :key="index" :label="item.sensorName" :value="item.sensorSn" />
@ -38,8 +43,11 @@ import symbolIcon2 from "@/assets/images/toxicGasMonitor/lineIcon2.png";
import { onMounted, reactive, ref, onBeforeUnmount } from "vue";
import * as echarts from "echarts";
import { selectDeepExcavationCurrentDataList, selectDeepExcavationAllMeasurePointList, getSensorListByMeasurePointNumber } from "@/api/modules/securityManagement";
import {
selectDeepExcavationCurrentDataList,
selectDeepExcavationAllMeasurePointList,
getSensorListByMeasurePointNumber
} from "@/api/modules/securityManagement";
// import { getSelectDataListApi } from "@/api/modules/distribution";
// import Card from "@/components/card.vue";
@ -163,13 +171,23 @@ function initOption() {
// console.log("tooltip", params);
// let currentMarker = "";
let currentState = "";
if (params[0].value[1] > positiveAlarmValue.value || params[0].value[1] < negativeAlarmValue.value) {
currentState = "超出报警值";
// currentMarker = `<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#f00;"> </span>`;
} else {
// currentMarker = params[0].marker;
currentState = "正常";
}
// if (params[0].value[1] > positiveAlarmValue.value || params[0].value[1] < negativeAlarmValue.value) {
// currentState = "";
// // currentMarker = `<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#f00;"> </span>`;
// } else {
// // currentMarker = params[0].marker;
// currentState = "";
// }
currentState =
params[0].value[2] == 1
? "正常"
: params[0].value[2] == 2
? "超报警"
: params[0].value[2] == 3
? "超控制"
: params[0].value[2] == 4
? "变化速率报警"
: "";
return (
params[0].axisValueLabel +
params[0].name +
@ -303,7 +321,7 @@ function initOption() {
// { type: 'average', name: '' }, // 线
{ yAxis: positiveAlarmValue.value, name: "报警值", lineStyle: { color: "red" } }, // 线
// { yAxis: 150, name: "", lineStyle: { color: "#EEA959" } }, // 线
{ yAxis: negativeAlarmValue.value, name: "报警值", lineStyle: { color: "red" } }, // 线
{ yAxis: negativeAlarmValue.value, name: "报警值", lineStyle: { color: "red" } } // 线
// { yAxis: -150, name: "", lineStyle: { color: "#EEA959" } } // 线
],
label: {
@ -390,7 +408,7 @@ const getTestPointList = async () => {
};
//
const getDevList = async () => {
const res: any = await getSensorListByMeasurePointNumber({ projectSn: store.sn, measurePointNumber: measurePointNumber.value});
const res: any = await getSensorListByMeasurePointNumber({ projectSn: store.sn, measurePointNumber: measurePointNumber.value });
timeList.value = res.result;
sensorSn.value = res.result[0].sensorSn;
console.log("查传感器列表", res);
@ -402,14 +420,20 @@ let positiveAlarmValue = ref(0) as any; //正报警值
//
const getEdgeAlarmTrend = async () => {
const res: any = await selectDeepExcavationCurrentDataList({ projectSn: store.sn, sensorSn: sensorSn.value, measurePointNumber: measurePointNumber.value, pageNo: 1, pageSize: 10 });
const res: any = await selectDeepExcavationCurrentDataList({
projectSn: store.sn,
sensorSn: sensorSn.value,
measurePointNumber: measurePointNumber.value,
pageNo: 1,
pageSize: 10
});
if (res.result) {
// option.value.xAxis.data = res.result.data.records.map((item: any) => item.x);
// option.value.series[0].data = res.result.map((item: any) => Number(item.y));
const twoDimensionalArray = res.result.data.records.map(item => [item.receiveTime, item.data]);
yData1.value = twoDimensionalArray
positiveAlarmValue.value = res.result.positiveAlarmValue
negativeAlarmValue.value = res.result.negativeAlarmValue
const twoDimensionalArray = res.result.data.records.map(item => [item.receiveTime, item.data, item.alarmState]);
yData1.value = twoDimensionalArray;
positiveAlarmValue.value = res.result.positiveAlarmValue;
negativeAlarmValue.value = res.result.negativeAlarmValue;
}
// twenty_four_time.value = res.result.map((item: any) => item.x);
// yData.value = res.result.map((item: any) => Number(item.y));

View File

@ -383,7 +383,7 @@ function drawChart() {
// getSensorListByMeasurePointNumber
//
const getTestPointList = async () => {
const res: any = await selectDeepExcavationAllMeasurePointList({ projectSn: store.sn, monitorTypeId: 1 });
const res: any = await selectDeepExcavationAllMeasurePointList({ projectSn: store.sn, monitorTypeId: 13 });
pointList.value = res.result;
measurePointNumber.value = res.result[0].measurePointNumber;
getDevList();

View File

@ -35,8 +35,8 @@
: ''
"
:style="{
left: item.mapX - 130 + 'px',
top: item.mapY - 80 + 'px'
left: (+item.mapX*100/706.276) + '%',
top: (+item.mapY*100/519) + '%'
}"
@click="openDialog(item)"
></div>

View File

@ -157,8 +157,8 @@ const getAlarmRecord = async (type: any) => {
pageSize: pageSize.value
};
if (rangeTime.value) {
requestData.startTime = rangeTime.value[0];
requestData.endTime = rangeTime.value[0];
requestData.createTime_begin = rangeTime.value[0];
requestData.createTime_end = rangeTime.value[1];
}
const res: any = await alarmRecordList(requestData);
// console.log("", res);
@ -253,7 +253,7 @@ onMounted(async () => {
}
}
.list-box {
height: 80%;
height: 85%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
@ -276,9 +276,9 @@ onMounted(async () => {
}
}
.not-data {
top: 19%;
width: 35%;
left: 33%;
top: 21%;
width: 40%;
left: 31%;
position: absolute;
img {
width: 40%;

View File

@ -49,7 +49,7 @@ let selectPoint = ref("");
//
// let nowType = ref("");
let pointList = ref([] as any);
const pointList = ref([] as any);
let typeList = ref([
{
@ -326,7 +326,7 @@ function drawChart() {
const getCountTransform = async () => {
const res: any = await countTransform({ projectSn: store.sn, measurePointNumber: selectPoint.value });
console.log("获取高支模累计变形量", res);
option.value.series = []; //
for (let i = 0; i < typeList.value.length; i++) {
// (,,,)
let responseData = res.result;

View File

@ -266,7 +266,7 @@ onMounted(async () => {
}
}
.list-box {
height: 80%;
height: 85%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
@ -289,9 +289,9 @@ onMounted(async () => {
}
}
.not-data {
top: 73%;
width: 12%;
left: 44%;
top: 21%;
width: 40%;
left: 31%;
position: absolute;
img {
width: 40%;
@ -301,6 +301,7 @@ onMounted(async () => {
color: #fff;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
text-align: center;
}
}
</style>

View File

@ -288,7 +288,7 @@ onMounted(async () => {
}
p {
color: #fff;
font-size: 14px;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
text-align: center;
}

View File

@ -37,16 +37,16 @@
: ''
"
:style="{
left: item.mapX + 'px',
top: item.mapY + 'px'
left: (+item.mapX*100/331) + '%',
top: (+item.mapY*100/403) + '%'
}"
@click="openDialog(item)"
></div>
<div
class="item-dialog"
:style="{
left: +item.mapX - 50 + 'px',
top: +item.mapY - 50 + 'px'
left: (+item.mapX*100/331) - 50 + 'px',
top: (+item.mapY*100/403) - 50 + 'px'
}"
v-if="item.id === currentIndex && showDialog"
@click="closeDialog"
@ -312,6 +312,14 @@ onMounted(async () => {
width: 100%;
height: 100%;
}
.history-list {
width: 100%;
height: 100%;
}
.alarm-list {
width: 100%;
height: 100%;
}
}
.list-tab {
display: flex;

View File

@ -117,8 +117,8 @@ const getAlarmRecord = async (type: any) => {
pageSize: pageSize.value
};
if (rangeTime.value) {
requestData.startTime = rangeTime.value[0];
requestData.endTime = rangeTime.value[0];
requestData.createTime_begin = rangeTime.value[0];
requestData.createTime_end = rangeTime.value[1];
}
const res: any = await highSlopeRealMonitorList(requestData);
// console.log("", res);

View File

@ -295,6 +295,7 @@ function drawChart() {
const getCountTransform = async () => {
const res: any = await countTransform({ projectSn: store.sn, highSlopeEngineeringId: selectSlope.value });
console.log("获取高支模累计变形量", res);
option.value.series = []; //
let responseData = res.result;
for (let i = 0; i < responseData.length; i++) {
let data = [] as any;

View File

@ -34,28 +34,28 @@
item.alarmState == 1
? 'changeColor1'
: item.alarmState == 2
? 'changeColor2'
: item.alarmState == 3
? 'changeColor3'
: item.alarmState == 3
? 'changeColor2'
: ''
"
:style="{
left: item.xMap + 'px',
top: item.yMap + 'px'
left: item.mapX + 'px',
top: item.mapY + 'px'
}"
@click="openDialog(item)"
></div>
<div
class="item-dialog"
:style="{
left: +item.xMap - 50 + 'px',
top: +item.yMap - 50 + 'px'
left: +item.mapX - 50 + 'px',
top: +item.mapY - 50 + 'px'
}"
v-if="item.id === currentIndex && showDialog"
@click="closeDialog"
>
<div class="triangle"></div>
<div class="dialog-title">{{ item.pointName }}</div>
<div class="dialog-title">{{ item.measurePointName }}</div>
</div>
</div>
</div>
@ -131,7 +131,7 @@ watch(
);
//
const getMonitorType = async () => {
const res: any = await highSlopeMonitorType({ planeFigureId: selectView.value });
const res: any = await highSlopeMonitorType({ highSlopePlaneFigureId: selectView.value });
console.log("获取监测类型", res);
pointList.value = res.result;
if (res.result && res.result.length > 0) {
@ -145,7 +145,7 @@ const slopeListChange = async (e: any) => {
};
//
const getMonitorViewPoint = async () => {
const res: any = await selectPlanViewPoint({ planeFigureId: selectView.value });
const res: any = await selectPlanViewPoint({ highSlopeEngineeringId: selectSlope.value, highSlopePlaneFigureId: selectView.value });
console.log("获取监测点数据", res);
list.value = res.result;
};