From 2b00dd9130ad0d9132ea451964a626e5ef5c0dde Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Thu, 8 Dec 2022 11:48:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BB=84=E7=BB=87=E6=A0=91tootip=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/home/detailsPageconetentTree.vue | 83 ++++++++++--------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/front/src/views/home/detailsPageconetentTree.vue b/front/src/views/home/detailsPageconetentTree.vue index d3bd2e2f..8cfdc6db 100644 --- a/front/src/views/home/detailsPageconetentTree.vue +++ b/front/src/views/home/detailsPageconetentTree.vue @@ -39,7 +39,7 @@ fill="#0058e1" > - + {{ val.title }} @@ -88,7 +88,7 @@ fill="#0058e1" > - + {{ child.title }} @@ -128,11 +128,11 @@ title: 'name', } const store = useStore() - // 用户信息 - const user = ref({ - deptName: store.getters['user/deptName'], - deptId: store.getters['user/deptId'], - }) + // 用户信息 + const user = ref({ + deptName: store.getters['user/deptName'], + deptId: store.getters['user/deptId'], + }) const showKey = ref(0) const treeData = ref([]) const init = () => { @@ -145,7 +145,7 @@ if (select === '123') { select = '' } - + console.log( '获取url中的select=====================>', router.currentRoute.value.query.select @@ -186,33 +186,33 @@ return sortArr.indexOf(a.key) - sortArr.indexOf(b.key) }) //根据不同的权限展示不同的能力超市左侧树 - // let deptId=user.value.deptId - // treeData.value.forEach((child) => { - // let childern=child.children - // childern.forEach((childs) => {//第一层:市级 - // if(childs.key==deptId ){ - // childs.show=true - // child.show=true - // mybus.emit('paramsGetResources', [childs.key]) - // selectId.value =childs.key - // } - // if(childs.children && childs.children.length>0){//第二层 区级 - // let qu=childs.children - // qu.forEach((qu) => { - // if(qu.key==deptId ){ - // qu.show=true - // childs.show=true - // child.show=true - // mybus.emit('paramsGetResources', [qu.key]) - // selectId.value = qu.key - // } - // }) - // } - // }) - - // }) + // let deptId=user.value.deptId + // treeData.value.forEach((child) => { + // let childern=child.children + // childern.forEach((childs) => {//第一层:市级 + // if(childs.key==deptId ){ + // childs.show=true + // child.show=true + // mybus.emit('paramsGetResources', [childs.key]) + // selectId.value =childs.key + // } + // if(childs.children && childs.children.length>0){//第二层 区级 + // let qu=childs.children + // qu.forEach((qu) => { + // if(qu.key==deptId ){ + // qu.show=true + // childs.show=true + // child.show=true + // mybus.emit('paramsGetResources', [qu.key]) + // selectId.value = qu.key + // } + // }) + // } + // }) + + // }) console.log('左侧树结构数据======================>', treeData.value) - + showKey.value++ }) } @@ -222,7 +222,6 @@ }) // 生成children const generateChildren = (val, obj) => { - if (val.dataList.length > 0) { val.dataList.forEach((child) => { let children = { @@ -232,14 +231,20 @@ total: child.deptCount, key: child.deptId, } - + obj.children.push(children) }) } } + const showToolTip = (e) => { + console.log('鼠标移入', e, e.target.clientWidth, e.target.scrollWidth) + debugger + if (e.target.clientWidth < 200) { + e.target.style.pointerEvents = 'none' // 阻止鼠标事件 + } + } // 区级特殊处理 const generateChildren2 = (val, obj) => { - if (val.dataList.length > 0) { val.dataList.forEach((dis) => { let children = { @@ -259,7 +264,7 @@ select: false, key: child.deptId, } - + children.children.push(children2) }) } @@ -382,6 +387,7 @@ showBottom, showDown, selectId, + showToolTip, } }, beforeUnmount() { @@ -498,6 +504,7 @@ -webkit-line-clamp: 1; -webkit-box-orient: vertical; word-break: break-all; + max-width: 200px; } } .up:hover { From ebaec6bda1f4bb823babbb07c6897253a290c901 Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Thu, 8 Dec 2022 14:53:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=BD=E5=BA=A6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/src/views/modules/notice/PortalAnnouncement.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/back/src/views/modules/notice/PortalAnnouncement.vue b/back/src/views/modules/notice/PortalAnnouncement.vue index 166e2dcc..1fe26f22 100644 --- a/back/src/views/modules/notice/PortalAnnouncement.vue +++ b/back/src/views/modules/notice/PortalAnnouncement.vue @@ -17,11 +17,11 @@ - + - +