fix: BUG修改

This commit is contained in:
kun 2024-02-23 16:07:24 +08:00
parent 69404eb005
commit 02e16ad534
6 changed files with 105 additions and 116 deletions

View File

@ -55,8 +55,8 @@
<div class="not-data" v-if="list.length == 0">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div></el-scrollbar
>
</div>
</el-scrollbar>
</div>
</div>
</template>

View File

@ -37,16 +37,16 @@
: ''
"
:style="{
left: (+item.mapX*100/331) + '%',
top: (+item.mapY*100/403) + '%'
left: (+item.mapX*100/721) + '%',
top: (+item.mapY*100/545) + '%'
}"
@click="openDialog(item)"
></div>
<div
class="item-dialog"
:style="{
left: (+item.mapX*100/331) - 50 + 'px',
top: (+item.mapY*100/403) - 50 + 'px'
left: ((+item.mapX - 65)*100/721) + '%',
top: ((+item.mapY - 90)*100/545) + '%'
}"
v-if="item.id === currentIndex && showDialog"
@click="closeDialog"
@ -64,19 +64,19 @@
</div>
</div>
<div class="select-project">
<el-select v-model="selectProject" style="width: 90%; margin-right: 5%" size="small">
<el-select v-model="selectPoint" style="width: 90%; margin-right: 5%" size="small">
<el-option v-for="(item, index) in pointList" :key="index" :label="item.measurePointName" :value="item.measurePointNumber" />
</el-select>
</div>
<div class="monitor-list">
<div class="realTime-list" v-if="tabIndex == 1">
<real-time-list :selectPoint="selectProject"></real-time-list>
<real-time-list :selectPoint="selectPoint"></real-time-list>
</div>
<div class="history-list" v-if="tabIndex == 2">
<history-list :selectPoint="selectProject"></history-list>
<history-list :selectPoint="selectPoint"></history-list>
</div>
<div class="alarm-list" v-if="tabIndex == 3">
<alarm-list :selectPoint="selectProject"></alarm-list>
<alarm-list :selectPoint="selectPoint"></alarm-list>
</div>
</div>
</div>
@ -97,7 +97,7 @@ const selectView = ref("");
const viewList = ref([] as any);
const monitorTimeText = ref("");
const planViewData = ref<any>();
const selectProject = ref("" as any);
const selectPoint = ref("" as any);
const pointList = ref([] as any);
let tabIndex = ref(1 as any);
let topText = ref([
@ -170,7 +170,7 @@ const getMonitorViewPoint = async () => {
list.value = res.result
pointList.value = res.result
if(res.result && res.result.length > 0){
selectProject.value = res.result[0].measurePointNumber
selectPoint.value = res.result[0].measurePointNumber
}
};
onMounted(async () => {
@ -308,15 +308,7 @@ onMounted(async () => {
.monitor-list {
width: 100%;
height: 90%;
.realTime-list {
width: 100%;
height: 100%;
}
.history-list {
width: 100%;
height: 100%;
}
.alarm-list {
.realTime-list,.history-list,.alarm-list {
width: 100%;
height: 100%;
}

View File

@ -16,7 +16,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD"
:clearable="false"
:clearable="true"
size="small"
@change="timeChange"
/>
@ -27,18 +27,21 @@
<div>序号</div>
<div>监测点名称</div>
<div>告警创建时间</div>
<!-- <div>告警等级</div> -->
<div>告警等级</div>
<div>告警类型</div>
<div>告警值</div>
<div>恢复值</div>
</div>
<el-scrollbar class="list-box" ref="refScrollbar">
<div v-for="(item, index) in list" class="list-style" :key="item.id">
<div>{{ index + 1 }}</div>
<div>{{ item.measurePointName }}</div>
<div>{{ item.createTime }}</div>
<div>{{ item.receiveTime }}</div>
<!-- <div>{{ item.warnGrade }}</div> -->
<div>{{ item.alarmType == 1?'报警':'预警' }}</div>
<div>{{ item.sensorTypeName }}</div>
<div>{{ item.alarmValue }}</div>
<div>{{ item.dataThis }}</div>
<!-- <div :style="{ width: '21%', color: formworkOption[item.formworkState].color }">
{{ formworkOption[item.formworkState].label }}
</div> -->
@ -58,7 +61,7 @@ import { watch, ref, onMounted } from "vue";
import { highSlopeRealMonitorList } from "@/api/modules/highSlope";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const props = defineProps(["selectType"]);
const props = defineProps(["selectPoint"]);
const pageNo = ref(1 as any);
const pageSize = ref(15 as any);
const refScrollbar = ref(null as any); //
@ -112,7 +115,7 @@ const timeChange = () => {
const getAlarmRecord = async (type: any) => {
let requestData: any = {
projectSn: store.sn,
measurePointNumber: props.selectType,
measurePointNumber: props.selectPoint,
pageNo: pageNo.value,
pageSize: pageSize.value
};
@ -123,10 +126,10 @@ const getAlarmRecord = async (type: any) => {
const res: any = await highSlopeRealMonitorList(requestData);
// console.log("", res);
if (type == "search") {
list.value = res.result.records;
list.value = res.result.data.records;
} else {
list.value = list.value.concat(res.result.records);
if (res.result.pages == pageNo.value) {
list.value = list.value.concat(res.result.data.records);
if (res.result.data.pages == pageNo.value) {
moreScroll.value = false;
} else {
pageNo.value = pageNo.value + 1;
@ -134,7 +137,7 @@ const getAlarmRecord = async (type: any) => {
}
};
watch(
() => props.selectType,
() => props.selectPoint,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
@ -211,11 +214,11 @@ onMounted(async () => {
div {
text-align: center;
white-space: nowrap;
width: 20%;
width: 14%;
}
}
.list-box {
height: 80%;
height: 85%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
@ -224,11 +227,11 @@ onMounted(async () => {
align-items: center;
color: #fff;
padding: 0.5% 0;
font-size: 12px;
font-size: calc(100vw * 12 / 1920);
div {
text-align: center;
white-space: nowrap;
width: 10%;
width: 14%;
}
}
.list-style:hover {
@ -238,9 +241,9 @@ onMounted(async () => {
}
}
.not-data {
top: 73%;
width: 12%;
left: 44%;
top: 21%;
width: 40%;
left: 31%;
position: absolute;
img {
width: 40%;
@ -248,8 +251,9 @@ onMounted(async () => {
}
p {
color: #fff;
font-size: 14px;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
text-align: center;
}
}
</style>

View File

@ -19,7 +19,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD"
:clearable="false"
:clearable="true"
size="small"
@change="timeChange"
/>
@ -28,28 +28,20 @@
<div class="list-content">
<div class="tab-list">
<div>序号</div>
<div>时间</div>
<div>测量点名称</div>
<div>测量点编号</div>
<div>电量</div>
<div>立杆轴力</div>
<div>水平位移</div>
<div>横板沉降</div>
<div>立杆倾斜</div>
<div>地基沉降</div>
<div>监测点名称</div>
<div>类型</div>
<div>预警值</div>
<div>报警值</div>
<div>实时变化值</div>
</div>
<el-scrollbar class="list-box" ref="refScrollbar">
<div v-for="(item, index) in list" class="list-style" :key="item.id">
<div>{{ index + 1 }}</div>
<div>{{ item.collectTime?.substring(0, 10) }}</div>
<div>{{ item.measurePointName }}</div>
<div>{{ item.measurePointNumber }}</div>
<div>{{ item.electricPower }}</div>
<div>{{ item.poleAxialForce }}</div>
<div>{{ item.horizontalDisplacement }}</div>
<div>{{ item.formworkSettlement }}</div>
<div>{{ item.poleTilt }}</div>
<div>{{ item.foundationSettlement }}</div>
<div>{{ item.sensorTypeName }}</div>
<div>{{ item.alarmValue }}</div>
<div>{{ item.data }}</div>
<div>{{ item.dataThis }}</div>
<!-- <div :style="{ width: '21%', color: formworkOption[item.formworkState].color }">
{{ formworkOption[item.formworkState].label }}
@ -70,7 +62,7 @@ import { watch, ref, onMounted } from "vue";
import { highSlopeRealMonitorList } from "@/api/modules/highSlope";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const props = defineProps(["selectType"]);
const props = defineProps(["selectPoint"]);
const pageNo = ref(1 as any);
const pageSize = ref(15 as any);
const refScrollbar = ref(null as any); //
@ -164,21 +156,21 @@ const timeChange = () => {
const getMonitorViewPoint = async (type: any) => {
let requestData: any = {
projectSn: store.sn,
measurePointNumber: props.selectType,
measurePointNumber: props.selectPoint,
pageNo: pageNo.value,
pageSize: pageSize.value
};
if (rangeTime.value) {
requestData.startTime = rangeTime.value[0];
requestData.endTime = rangeTime.value[0];
requestData.endTime = rangeTime.value[1];
}
const res: any = await highSlopeRealMonitorList(requestData);
// console.log("", res);
if (type == "search") {
list.value = res.result.records;
list.value = res.result.data.records;
} else {
list.value = list.value.concat(res.result.records);
if (res.result.pages == pageNo.value) {
list.value = list.value.concat(res.result.data.records);
if (res.result.data.pages == pageNo.value) {
moreScroll.value = false;
} else {
pageNo.value = pageNo.value + 1;
@ -186,7 +178,7 @@ const getMonitorViewPoint = async (type: any) => {
}
};
watch(
() => props.selectType,
() => props.selectPoint,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
@ -263,11 +255,11 @@ onMounted(async () => {
div {
text-align: center;
white-space: nowrap;
width: 11.5%;
width: 16%;
}
}
.list-box {
height: 80%;
height: 85%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
@ -280,7 +272,7 @@ onMounted(async () => {
div {
text-align: center;
white-space: nowrap;
width: 11.5%;
width: 16%;
}
}
.list-style:hover {
@ -290,9 +282,9 @@ onMounted(async () => {
}
}
.not-data {
top: 73%;
width: 12%;
left: 44%;
top: 21%;
width: 40%;
left: 31%;
position: absolute;
img {
width: 40%;
@ -300,8 +292,9 @@ onMounted(async () => {
}
p {
color: #fff;
font-size: 14px;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
text-align: center;
}
}
</style>

View File

@ -27,26 +27,20 @@
<div class="list-content">
<div class="tab-list">
<div>序号</div>
<div>测量点名称</div>
<div>测量点编号</div>
<div>电量</div>
<div>立杆轴力</div>
<div>水平位移</div>
<div>横板沉降</div>
<div>立杆倾斜</div>
<div>地基沉降</div>
<div>监测点名称</div>
<div>类型</div>
<div>预警值</div>
<div>报警值</div>
<div>实时变化值</div>
</div>
<el-scrollbar class="list-box" ref="refScrollbar">
<div v-for="(item, index) in list" class="list-style" :key="item.id">
<div>{{ index + 1 }}</div>
<div>{{ item.measurePointName }}</div>
<div>{{ item.measurePointNumber }}</div>
<div>{{ item.electricPower }}</div>
<div>{{ item.poleAxialForce }}</div>
<div>{{ item.horizontalDisplacement }}</div>
<div>{{ item.formworkSettlement }}</div>
<div>{{ item.poleTilt }}</div>
<div>{{ item.foundationSettlement }}</div>
<div>{{ item.sensorTypeName }}</div>
<div>{{ item.alarmValue }}</div>
<div>{{ item.data }}</div>
<div>{{ item.dataThis }}</div>
<!-- <div :style="{ width: '21%', color: formworkOption[item.formworkState].color }">
{{ formworkOption[item.formworkState].label }}
@ -55,8 +49,8 @@
<div class="not-data" v-if="list.length == 0">
<img src="@/assets/images/noData.png" alt="" />
<p>暂无数据</p>
</div></el-scrollbar
>
</div>
</el-scrollbar>
</div>
</div>
</template>
@ -67,7 +61,7 @@ import { reactive, ref, onMounted, watch } from "vue";
import { highSlopeRealMonitorList } from "@/api/modules/highSlope";
import { GlobalStore } from "@/stores";
const store = GlobalStore();
const props = defineProps(["selectType"]);
const props = defineProps(["selectPoint"]);
const pageNo = ref(1 as any);
const pageSize = ref(15 as any);
const refScrollbar = ref(null as any); //
@ -157,7 +151,7 @@ const list = ref([] as any);
const getMonitorViewPoint = async (type: any) => {
const res: any = await highSlopeRealMonitorList({
projectSn: store.sn,
highSlopeMonitorTypeId: props.selectType,
measurePointNumber: props.selectPoint,
pageNo: pageNo.value,
pageSize: pageSize.value
});
@ -174,7 +168,7 @@ const getMonitorViewPoint = async (type: any) => {
}
};
watch(
() => props.selectType,
() => props.selectPoint,
newVal => {
// console.log(newVal, "newVal");
if (newVal) {
@ -255,7 +249,7 @@ onMounted(async () => {
}
}
.list-box {
height: 82%;
height: 85%;
.list-style:nth-child(even) {
background: rgba(39, 88, 192, 0.06);
}
@ -263,7 +257,7 @@ onMounted(async () => {
display: flex;
align-items: center;
color: #fff;
padding: 0.5% 0;
line-height: 24px;
font-size: 12px;
div {
text-align: center;
@ -278,9 +272,9 @@ onMounted(async () => {
}
}
.not-data {
top: 73%;
width: 12%;
left: 44%;
top: 21%;
width: 40%;
left: 31%;
position: absolute;
img {
width: 40%;
@ -288,8 +282,9 @@ onMounted(async () => {
}
p {
color: #fff;
font-size: 14px;
font-size: calc(100vw * 14 / 1920);
margin: -6% 37%;
text-align: center;
}
}
</style>

View File

@ -40,16 +40,16 @@
: ''
"
:style="{
left: item.mapX + 'px',
top: item.mapY + 'px'
left: (+item.mapX*100/721) + '%',
top: (+item.mapY*100/545) + '%'
}"
@click="openDialog(item)"
></div>
<div
class="item-dialog"
:style="{
left: +item.mapX - 50 + 'px',
top: +item.mapY - 50 + 'px'
left: ((+item.mapX - 65)*100/721) + '%',
top: ((+item.mapY - 90)*100/545) + '%'
}"
v-if="item.id === currentIndex && showDialog"
@click="closeDialog"
@ -67,19 +67,19 @@
</div>
</div>
<div class="select-project">
<el-select v-model="selectType" style="width: 90%; margin-right: 5%" size="small">
<el-option v-for="(item, index) in pointList" :key="index" :label="item.monitorTypeName" :value="item.id" />
<el-select v-model="selectPoint" style="width: 90%; margin-right: 5%" size="small">
<el-option v-for="(item, index) in pointList" :key="index" :label="item.measurePointName" :value="item.measurePointNumber" />
</el-select>
</div>
<div class="monitor-list">
<div class="realTime-list" v-if="tabIndex == 1">
<real-time-list :selectType="selectType"></real-time-list>
<real-time-list :selectPoint="selectPoint"></real-time-list>
</div>
<div class="history-list" v-if="tabIndex == 2">
<history-list :selectType="selectType"></history-list>
<history-list :selectPoint="selectPoint"></history-list>
</div>
<div class="alarm-list" v-if="tabIndex == 3">
<alarm-list :selectType="selectType"></alarm-list>
<alarm-list :selectPoint="selectPoint"></alarm-list>
</div>
</div>
</div>
@ -104,7 +104,7 @@ const viewList = ref([] as any);
const selectSlope = ref("");
const selectView = ref("");
const monitorTimeText = ref("");
const selectType = ref("" as any);
const selectPoint = ref("" as any);
const pointList = ref([] as any);
let tabIndex = ref(1 as any);
let topText = ref([
@ -126,18 +126,19 @@ let topText = ref([
watch(
() => selectView.value,
newVal => {
planViewData.value = viewList.value.find((item: any) => item.id === newVal);
getMonitorViewPoint();
}
);
//
const getMonitorType = async () => {
const res: any = await highSlopeMonitorType({ highSlopePlaneFigureId: selectView.value });
console.log("获取监测类型", res);
pointList.value = res.result;
if (res.result && res.result.length > 0) {
selectType.value = res.result[0].id;
}
};
// const getMonitorType = async () => {
// const res: any = await highSlopeMonitorType({ highSlopePlaneFigureId: selectView.value });
// console.log("", res);
// pointList.value = res.result;
// if (res.result && res.result.length > 0) {
// selectPoint.value = res.result[0].id;
// }
// };
//
const slopeListChange = async (e: any) => {
console.log(e, "选中");
@ -148,6 +149,10 @@ const getMonitorViewPoint = async () => {
const res: any = await selectPlanViewPoint({ highSlopeEngineeringId: selectSlope.value, highSlopePlaneFigureId: selectView.value });
console.log("获取监测点数据", res);
list.value = res.result;
pointList.value = res.result
if(res.result && res.result.length > 0){
selectPoint.value = res.result[0].measurePointNumber
}
};
//
const getMonitorView = async () => {
@ -212,7 +217,7 @@ onMounted(async () => {
await getSlopeList();
await getMonitorView();
await getMonitorViewPoint();
await getMonitorType();
// await getMonitorType();
});
</script>
@ -344,7 +349,7 @@ onMounted(async () => {
.monitor-list {
width: 100%;
height: 90%;
.realTime-list {
.realTime-list,.history-list,.alarm-list {
width: 100%;
height: 100%;
}