Compare commits
2 Commits
1f20c6f589
...
9b4274b254
| Author | SHA1 | Date |
|---|---|---|
|
|
9b4274b254 | |
|
|
a79a3dfa14 |
|
|
@ -3,7 +3,9 @@ import { getArticlePage, report, cateFileList, newDataList } from '@/api/daikin/
|
||||||
import { message } from '@/utils/message'
|
import { message } from '@/utils/message'
|
||||||
import { Swiper, SwiperSlide } from 'swiper/vue'
|
import { Swiper, SwiperSlide } from 'swiper/vue'
|
||||||
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
||||||
|
import { isNotOneWeekAgo } from '@/utils'
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
|
import { NPopover } from 'naive-ui'
|
||||||
// import { NCarousel } from 'naive-ui'
|
// import { NCarousel } from 'naive-ui'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
@ -63,6 +65,45 @@ onMounted(getPageList)
|
||||||
// message.info("您没有权限查看!")
|
// message.info("您没有权限查看!")
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
const codePath: any = {
|
||||||
|
App_Article: {
|
||||||
|
path: '/intelligence/outside/',
|
||||||
|
modulePath: '/Home/intelligence'
|
||||||
|
},
|
||||||
|
App_Market: {
|
||||||
|
path: '/Home/market/',
|
||||||
|
modulePath: '/Home/market'
|
||||||
|
},
|
||||||
|
App_data_platform: {
|
||||||
|
path: '/Home/cd/',
|
||||||
|
modulePath: '/Home/cd'
|
||||||
|
},
|
||||||
|
App_BCP: {
|
||||||
|
path: '/Home/bcp/',
|
||||||
|
modulePath: '/Home/bcp/'
|
||||||
|
},
|
||||||
|
// '碳中和模块',
|
||||||
|
App_CSR: {
|
||||||
|
path: '/Home/csr/',
|
||||||
|
modulePath: '/Home/csr/'
|
||||||
|
},
|
||||||
|
// '品质模块',
|
||||||
|
App_Quality: {
|
||||||
|
path: '/Home/quality/',
|
||||||
|
modulePath: '/Home/quality/'
|
||||||
|
},
|
||||||
|
// 'Lab模块',
|
||||||
|
App_Lab: {
|
||||||
|
path: '/Home/diffspace/',
|
||||||
|
modulePath: '/Home/diffspace'
|
||||||
|
},
|
||||||
|
// 'DatabBase模块'
|
||||||
|
App_Database: {
|
||||||
|
path: '/DataBase?id=',
|
||||||
|
modulePath: '/DataBase'
|
||||||
|
}
|
||||||
|
}
|
||||||
const toDetail2 = (n: any) => {
|
const toDetail2 = (n: any) => {
|
||||||
console.log(n)
|
console.log(n)
|
||||||
if (n.id === 0) return
|
if (n.id === 0) return
|
||||||
|
|
@ -71,11 +112,15 @@ const toDetail2 = (n: any) => {
|
||||||
return push('/DataBase?id=' + n.cateId)
|
return push('/DataBase?id=' + n.cateId)
|
||||||
}
|
}
|
||||||
if (n.moduleCode === 'App_Article') {
|
if (n.moduleCode === 'App_Article') {
|
||||||
return push('/Home/intelligence/' + n.id)
|
return push('/Home/intelligence/')
|
||||||
}
|
}
|
||||||
push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id)
|
const { moduleCode, id, cateId } = n
|
||||||
|
const { modulePath, path } = codePath[moduleCode]
|
||||||
|
push(modulePath)
|
||||||
|
|
||||||
|
// push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id)
|
||||||
} else {
|
} else {
|
||||||
message.error('没有访问权限')
|
message.info('您没有权限查看!')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -208,6 +253,14 @@ fetchNewDataList()
|
||||||
>
|
>
|
||||||
<swiper-slide v-for="(i, index) of newsData" :key="index"> -->
|
<swiper-slide v-for="(i, index) of newsData" :key="index"> -->
|
||||||
<div height="310px" class="h-310px overflow-hidden">
|
<div height="310px" class="h-310px overflow-hidden">
|
||||||
|
<!-- <div
|
||||||
|
class="absolute flex flex-col w-full h-full z-200 top-0 left-0 text-center bg-red justify-center items-center"
|
||||||
|
style="background-color: rgba(255, 255, 255, 0.8)"
|
||||||
|
>
|
||||||
|
<img src="@/assets/images/chah.png" />
|
||||||
|
<br />
|
||||||
|
<div class="text-#5683DB text-36px">【做成中,敬请期待】</div>
|
||||||
|
</div> -->
|
||||||
<!-- <div class="text-black mb-10px" v-for="(item, index) of newsData" :key="index"> -->
|
<!-- <div class="text-black mb-10px" v-for="(item, index) of newsData" :key="index"> -->
|
||||||
<div class="text-black mb-10px" v-for="(i, index) in newsData" :key="index">
|
<div class="text-black mb-10px" v-for="(i, index) in newsData" :key="index">
|
||||||
<div class="flex justify-between items-center mb4px" v-if="index === 0">
|
<div class="flex justify-between items-center mb4px" v-if="index === 0">
|
||||||
|
|
@ -220,11 +273,30 @@ fetchNewDataList()
|
||||||
</div>
|
</div>
|
||||||
<!-- <template v-for="(i, k) in item" :key="k"> -->
|
<!-- <template v-for="(i, k) in item" :key="k"> -->
|
||||||
<div class="flex items-baseline flex-1">
|
<div class="flex items-baseline flex-1">
|
||||||
|
<n-popover v-if="i.title?.length > 14" trigger="hover" placement="top-start">
|
||||||
|
<template #trigger>
|
||||||
|
<div
|
||||||
|
@click="toDetail2(i)"
|
||||||
|
class="text-#142142 truncate text-18px font-bold w-95% no-underline text-#142142 cursor-pointer hover:underline h-16px leading-16px"
|
||||||
|
>
|
||||||
|
<span>{{ i.title || '' }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div class="text-#142142 text-18px font-bold no-underline h-16px leading-16px">
|
||||||
|
<img
|
||||||
|
v-if="isNotOneWeekAgo(i.createTime)"
|
||||||
|
class="h-20px"
|
||||||
|
src="@/assets/images/NEW.gif"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<span>{{ i.title || '' }}</span>
|
||||||
|
</div>
|
||||||
|
</n-popover>
|
||||||
<div
|
<div
|
||||||
|
v-else
|
||||||
@click="toDetail2(i)"
|
@click="toDetail2(i)"
|
||||||
class="text-#142142 truncate text-18px font-bold w-95% no-underline text-#142142 cursor-pointer hover:underline h-16px leading-16px"
|
class="text-#142142 truncate text-18px font-bold w-95% no-underline text-#142142 cursor-pointer hover:underline h-16px leading-16px"
|
||||||
>
|
>
|
||||||
<!-- <img class="h-20px" src="@/assets/images/NEW.gif" alt="" /> -->
|
|
||||||
<span>{{ i.title || '' }}</span>
|
<span>{{ i.title || '' }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-#808696 ml20px text-14px flex items-center justify-between mb-10px">
|
<div class="text-#808696 ml20px text-14px flex items-center justify-between mb-10px">
|
||||||
|
|
|
||||||
|
|
@ -143,14 +143,16 @@ const goModule = (item, type) => {
|
||||||
}
|
}
|
||||||
const clickItem = (item: any) => {
|
const clickItem = (item: any) => {
|
||||||
const { id, filePath, isSelect, moduleCode, fileCommon = {} } = item
|
const { id, filePath, isSelect, moduleCode, fileCommon = {} } = item
|
||||||
if (isSelect == 1) {
|
const { modulePath, path } = codePath[moduleCode]
|
||||||
|
if (isSelect === 1) {
|
||||||
if (item.moduleCode === 'App_Article') {
|
if (item.moduleCode === 'App_Article') {
|
||||||
return push('/Home/intelligence/' + item.id)
|
return push('/Home/intelligence/' + item.id)
|
||||||
}
|
}
|
||||||
if (['App_Database'].includes(moduleCode)) {
|
if (['App_Database'].includes(moduleCode)) {
|
||||||
goModule(item, 'path')
|
goModule(item, 'path')
|
||||||
} else {
|
} else {
|
||||||
downloads({ fileCommon, filePath })
|
// downloads({ fileCommon, filePath })
|
||||||
|
push(modulePath)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.info('您没有权限查看!')
|
message.info('您没有权限查看!')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue