BUG修改 首页知识库跳转 、 能力统计 添加tooltip

This commit is contained in:
a0049873 2022-07-26 09:51:47 +08:00
parent 32997c5f73
commit b8e4c36223
2 changed files with 32 additions and 3 deletions

View File

@ -65,7 +65,10 @@
<div class="itemList" v-else-if="navSelect.indexOf('应用领域') > 0">
<div class="item" v-for="item in dataList" :key="item.deptId">
<div class="top" :class="item.show ? 'showBottom' : ''">
<div class="name">{{ item.deptName }}</div>
<a-tooltip>
<template #title>{{ item.deptName }}</template>
<div class="name">{{ item.deptName }}</div>
</a-tooltip>
<a-progress
:percent="((item.provide.length / 15) * 100).toFixed(2)"
:showInfo="false"
@ -596,7 +599,7 @@
align-items: center;
padding: 0.08rem 0.1rem;
.name {
width: 3rem;
width: 3.2rem;
text-align: right;
margin-right: 0.1rem;
overflow: hidden;

View File

@ -65,7 +65,7 @@
v-for="(item, index) in zsList"
:key="item.id"
:class="index == 4 ? 'name-last' : ''"
@click="selectOne(item.id)"
@click="openHref(item)"
>
{{ index + 1 }}-{{ item.name }}
</div>
@ -84,6 +84,7 @@
import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router'
import { useStore } from 'vuex'
import { updateVisits, browsingInsert } from '@/api/home'
import mybus from '@/myplugins/mybus'
const store = useStore()
const router = useRouter()
@ -193,6 +194,31 @@
}
}
}
const openHref = (item) => {
console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo')
browsingInsert({ resourceId: item.id }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.id) === -1) {
arrList.value.push(item.id)
updateVisits({
id: item.id,
visits: item.visits || '0',
}).then(() => {
window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
})
}
window.open(item.link)
// window.open(
// window.SITE_CONFIG.previewUrl +
// 'hisense_office/onlinePreview?url=' +
// btoa(encodeURI(item.fileHref))
// )
}
const assignmentMethod = (type, res) => {
object[type] = res.data.data.total
// interfaceSuccess.value++