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

View File

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

View File

@ -383,7 +383,7 @@ function drawChart() {
// getSensorListByMeasurePointNumber // getSensorListByMeasurePointNumber
// //
const getTestPointList = async () => { 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; pointList.value = res.result;
measurePointNumber.value = res.result[0].measurePointNumber; measurePointNumber.value = res.result[0].measurePointNumber;
getDevList(); getDevList();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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