From f0910016ae9aa02fcc1a57a2aac564e0df6cf986 Mon Sep 17 00:00:00 2001 From: Esacpe <1113279529@qq.com> Date: Fri, 19 Dec 2025 11:41:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/GdMap/mapUtil.js | 12 ++- src/components/aboutTable/DarkTable.vue | 61 ++++++++++--- .../identityWarning/components/addFrom.vue | 1 - src/views/home/echarts/3DbarEcharts.vue | 16 ++-- src/views/home/index.vue | 26 +++++- src/views/home/model/bkWarning.vue | 85 +++++++++++++++++++ src/views/home/model/keyPpersonneltypes.vue | 3 +- src/views/home/model/mesgSwitch/timeData.vue | 3 +- src/views/home/model/qingBaowbTable.vue | 29 ++++--- src/views/home/model/textType.vue | 21 +++-- src/views/home/model/warningLevels.vue | 19 ++++- src/views/home/model/warningPoints.vue | 7 +- 12 files changed, 226 insertions(+), 57 deletions(-) create mode 100644 src/views/home/model/bkWarning.vue diff --git a/src/components/GdMap/mapUtil.js b/src/components/GdMap/mapUtil.js index 1a9b63f..f073670 100644 --- a/src/components/GdMap/mapUtil.js +++ b/src/components/GdMap/mapUtil.js @@ -146,9 +146,12 @@ export function MapUtil(map) { // 展示气泡框 MapUtil.prototype.makerPopup = (item,flag,style = 'Dark')=>{ // Dark Light Custom + let marker; + let flagPop = flag+'_pop' + if(!_that._self[flagPop]) _that._self[flagPop] = []; if(style == 'Dark' || style == 'Light') { let list = zdyContent(flag,item);// 默认的样式 - map.createPopup([item.jd,item.wd],{ + marker = map.createPopup([item.jd,item.wd],{ style:style, // 气泡框样式: data:list, title:item.ssbm, @@ -157,7 +160,7 @@ export function MapUtil(map) { pixelOffset:[0,-50] }) }else { - map.createPopup([item.jd,item.wd],{ + marker = map.createPopup([item.jd,item.wd],{ style:'Custom', // // 自定义样式 attrs:{ class:'popupCustom' @@ -168,13 +171,14 @@ export function MapUtil(map) { pixelOffset:[0,-30] }) } + _that._self[flagPop].push(marker) } // 弹窗自定义默认内容 function zdyContent(flag,item){ switch (flag) { case 'hm': return [ - { label:'临安码线索数量',value:item.lamsx }, + { label:'林安码线索数量',value:item.lamsx }, { label:'布控预警数量',value:item.bkyj }, { label:'红色预警数量',value:item.hsyj }, { label:'信息采集数量',value:item.xxcjsl }, @@ -189,7 +193,7 @@ export function MapUtil(map) { html = `
${item.ssbm}
-
临安码线索数量:${item.lamsx}
+
林安码线索数量:${item.lamsx}
布控预警数量:${item.bkyj}
红色预警数量:${item.hsyj}
信息采集数量:${item.xxcjsl}
diff --git a/src/components/aboutTable/DarkTable.vue b/src/components/aboutTable/DarkTable.vue index 9fb3e08..1a2c51b 100644 --- a/src/components/aboutTable/DarkTable.vue +++ b/src/components/aboutTable/DarkTable.vue @@ -287,27 +287,56 @@ const rowcontextmenuHland = (row, column, e) => { }; const timer = ref(null); +const isCloned = ref(false); +const originalBodyHeight = ref(0); // 鼠标进入 const clearnScroll = () => { clearInterval(timer.value); timer.value = null; }; + +watch(() => props.tableData, () => { + nextTick(() => { + if (props.isScroll) createScroll(); + }) +},{deep:true}); + // 鼠标离开 const createScroll = () => { clearnScroll(); - // 拿到table - const tabel = multipleTableRef.value.layout.table.refs; - // 拿到可以滚动的元素 - const tableWrapper = tabel.bodyWrapper.firstElementChild.firstElementChild; - if (props.isScroll) { - timer.value = setInterval(() => { - tableWrapper.scrollTop += 1; - //判断滚动到底部,设置为0(可视高度+距离顶部 = 整个高度) - if ( tableWrapper.clientHeight + tableWrapper.scrollTop == tableWrapper.scrollHeight) { - tableWrapper.scrollTop = 0; + nextTick(() => { + const refsPath = multipleTableRef.value?.$refs || multipleTableRef.value?.layout?.table?.refs; + const scrollEl = refsPath?.bodyWrapper || multipleTableRef.value?.$el?.querySelector('.el-table__body-wrapper'); + const tableEl = scrollEl?.querySelector('table') || multipleTableRef.value?.$el?.querySelector('.el-table__body-wrapper table'); + const bodyEl = tableEl?.tBodies?.[0]; + if (!props.isScroll || !scrollEl || !tableEl || !bodyEl) return; + if (!props.tableHeight) { + const fixedH = scrollEl.clientHeight || multipleTableRef.value?.$el?.clientHeight || 0; + if (fixedH > 0) { + scrollEl.style.height = fixedH + 'px'; + scrollEl.style.overflowY = 'auto'; } - }, 100); - } + } + originalBodyHeight.value = bodyEl.offsetHeight; + const oldClone = tableEl.querySelector('tbody[data-clone="true"]'); + if (oldClone) { + tableEl.removeChild(oldClone); + isCloned.value = false; + } + if (!isCloned.value) { + const clone = bodyEl.cloneNode(true); + clone.setAttribute('data-clone', 'true'); + tableEl.appendChild(clone); + isCloned.value = true; + } + const target = scrollEl.firstElementChild?.firstElementChild || scrollEl; + timer.value = setInterval(() => { + target.scrollTop += 1; + if (target.scrollTop >= originalBodyHeight.value) { + target.scrollTop -= originalBodyHeight.value; + } + }, 20); + }); }; // 滚动-触底加载 @@ -370,4 +399,10 @@ onUnmounted(() => { .header-icon { white-space: nowrap; } - \ No newline at end of file + +watch(() => props.isScroll, (val) => { + nextTick(() => { + if (val) createScroll(); + else clearnScroll(); + }); +},{immediate:true}); diff --git a/src/views/backOfficeSystem/fourColorManage/warningControl/identityWarning/components/addFrom.vue b/src/views/backOfficeSystem/fourColorManage/warningControl/identityWarning/components/addFrom.vue index c314be9..0421a7d 100644 --- a/src/views/backOfficeSystem/fourColorManage/warningControl/identityWarning/components/addFrom.vue +++ b/src/views/backOfficeSystem/fourColorManage/warningControl/identityWarning/components/addFrom.vue @@ -47,7 +47,6 @@ watch(() => props.dict, (res) => { { label: "所属县局", prop: "ssxgaj", type: "input" }, { label: "所属市局", prop: "sssgaj", type: "input" }, { label: "接警员姓名", prop: "jjyxm", type: "input" }, - // { label: "预警内容", prop: "yjNr", type: "textarea", width: "100%" }, ] } diff --git a/src/views/home/echarts/3DbarEcharts.vue b/src/views/home/echarts/3DbarEcharts.vue index 9ff44e7..5beee0a 100644 --- a/src/views/home/echarts/3DbarEcharts.vue +++ b/src/views/home/echarts/3DbarEcharts.vue @@ -3,8 +3,7 @@ + + + + diff --git a/src/views/home/model/keyPpersonneltypes.vue b/src/views/home/model/keyPpersonneltypes.vue index 4a6777b..a867422 100644 --- a/src/views/home/model/keyPpersonneltypes.vue +++ b/src/views/home/model/keyPpersonneltypes.vue @@ -1,7 +1,6 @@