fix:修改大屏加载图片问题,点击详情加载地图打点问题,
This commit is contained in:
parent
91a43f8ba1
commit
566f074b8c
@ -2,13 +2,17 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-22 15:30:25
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-25 16:53:29
|
||||
* @LastEditTime: 2025-01-08 15:43:05
|
||||
* @FilePath: \znxjxt-ui\src\views\big-screen\components\img-dialog.vue
|
||||
* @Description: 大屏查看图片弹窗
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="app">
|
||||
<div
|
||||
class="app"
|
||||
v-loading="loading"
|
||||
element-loading-background="rgba(0, 0, 0, 0.8)"
|
||||
>
|
||||
<div class="left-list">
|
||||
<div class="img-top">
|
||||
<div
|
||||
@ -284,6 +288,11 @@ export default {
|
||||
this.getDefectType();
|
||||
},
|
||||
},
|
||||
currentIndex: {
|
||||
handler(val) {
|
||||
console.log(val, "dsfdsad");
|
||||
},
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getSegmentList();
|
||||
@ -324,6 +333,7 @@ export default {
|
||||
* @return {*}
|
||||
*/
|
||||
getMediaBySnapshotid() {
|
||||
this.loading = true;
|
||||
getMediaIndex({
|
||||
classType: this.bottomTipClick,
|
||||
id: this.imageItem.snapshotId,
|
||||
@ -409,7 +419,8 @@ export default {
|
||||
const data = {
|
||||
classType: this.bottomTipClick,
|
||||
...this.imgForm,
|
||||
...this.params,
|
||||
page: this.pageTip,
|
||||
size: this.params.size,
|
||||
};
|
||||
defeaseList(data)
|
||||
.then(({ code, data }) => {
|
||||
@ -506,9 +517,6 @@ export default {
|
||||
* @return {*}
|
||||
*/
|
||||
showImage(index) {
|
||||
// if (this.currentIndex === this.defectData.length - 1) {
|
||||
// this.loadMoreBottomImages();
|
||||
// }
|
||||
this.currentIndex = index;
|
||||
const indexInfo = this.defectData[this.currentIndex]?.items.length - 1;
|
||||
this.selectedThumbnail = indexInfo; // Reset to the first thumbnail when changing the main item
|
||||
@ -544,14 +552,20 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
}, 200),
|
||||
}, 100),
|
||||
/**
|
||||
* @description: 滚动触发事件
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
handleScroll() {
|
||||
handleScroll: debounce(function () {
|
||||
const sidebar = this.$refs.sidebar;
|
||||
console.log(
|
||||
sidebar.scrollTop + sidebar.clientHeight,
|
||||
sidebar.scrollHeight,
|
||||
"sdfsdf"
|
||||
);
|
||||
|
||||
// 滚动到顶加载数据
|
||||
if (sidebar.scrollTop < 2 && this.pageTip > 1 && !this.loading) {
|
||||
this.loadMoreTopImages();
|
||||
@ -567,8 +581,10 @@ export default {
|
||||
}
|
||||
// if (this.currentIndex === this.defectData.length - 1) {
|
||||
// this.loadMoreBottomImages();
|
||||
// } else if (this.currentIndex === 0) {
|
||||
// this.loadMoreTopImages();
|
||||
// }
|
||||
},
|
||||
}, 100),
|
||||
|
||||
/**
|
||||
* @description: 向下加载更多图片方法
|
||||
@ -587,7 +603,7 @@ export default {
|
||||
*/
|
||||
loadMoreTopImages() {
|
||||
this.pageTip -= 1;
|
||||
this.params.page -= 1;
|
||||
// this.params.page -= 1;
|
||||
this.currentIndex += this.params.size;
|
||||
this.getListTop();
|
||||
},
|
||||
@ -616,8 +632,8 @@ export default {
|
||||
* @param {*}
|
||||
* @return {*}
|
||||
*/
|
||||
handleKeydown(event) {
|
||||
if (event.key === "ArrowUp") {
|
||||
handleKeydown: throttle(function (event) {
|
||||
if (event.key === "ArrowUp" && !this.loading) {
|
||||
event.preventDefault();
|
||||
if (this.currentIndex > 0) {
|
||||
this.currentIndex--;
|
||||
@ -626,7 +642,7 @@ export default {
|
||||
this.scrollToCurrentImage();
|
||||
this.updateRects();
|
||||
}
|
||||
} else if (event.key === "ArrowDown") {
|
||||
} else if (event.key === "ArrowDown" && !this.loading) {
|
||||
event.preventDefault();
|
||||
if (this.currentIndex < this.defectData.length - 1) {
|
||||
this.currentIndex === this.defectData.length - 1
|
||||
@ -640,7 +656,7 @@ export default {
|
||||
this.loadMoreBottomImages();
|
||||
}
|
||||
}
|
||||
},
|
||||
}, 100),
|
||||
|
||||
/**
|
||||
* @description: 选择框修改事件
|
||||
@ -714,7 +730,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("keydown", throttle(this.handleKeydown, 100));
|
||||
window.addEventListener("keydown", this.handleKeydown);
|
||||
window.addEventListener("resize", this.updateRects);
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-17 11:34:00
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2025-01-08 09:11:29
|
||||
* @LastEditTime: 2025-01-08 14:31:54
|
||||
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
|
||||
* @Description: 大屏首页
|
||||
-->
|
||||
@ -955,6 +955,7 @@ export default {
|
||||
mapPointList({
|
||||
type: this.elementDiv,
|
||||
classType: this.bottomTipClick,
|
||||
...this.imageItem,
|
||||
...this.defectMapPiont,
|
||||
}).then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-18 10:19:56
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-12-26 16:44:24
|
||||
* @LastEditTime: 2025-01-08 13:50:00
|
||||
* @FilePath: \znxjxt-ui\src\views\big-screen\overview-components\disease-current.vue
|
||||
* @Description: 总览大屏-病害三维饼图
|
||||
-->
|
||||
@ -335,7 +335,7 @@ export default {
|
||||
false,
|
||||
k,
|
||||
// 设置饼图高度
|
||||
series[i].pieData.value / 2500
|
||||
series[i].pieData.value / 5000
|
||||
);
|
||||
|
||||
startValue = endValue;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user