fix bug
parent
8c43a7bde1
commit
345e57e504
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 104 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
1048
src/router/index.ts
1048
src/router/index.ts
File diff suppressed because it is too large
Load Diff
|
|
@ -46,6 +46,7 @@ const array = ref<any[]>([
|
|||
])
|
||||
|
||||
const fileItem = ref<any>({})
|
||||
const fileItemTwo = ref<any>({})
|
||||
const message = useMessage()
|
||||
const getFile = async () => {
|
||||
const { rows }: any = await cateFileList({
|
||||
|
|
@ -54,12 +55,18 @@ const getFile = async () => {
|
|||
pageSize: 100
|
||||
})
|
||||
fileItem.value = rows.find((item: any) => item.id == 1693) || {}
|
||||
const { rows: rowsTow }: any = await cateFileList({
|
||||
cateId: 265,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
fileItemTwo.value = rowsTow.find((item: any) => item.id == 1854) || {}
|
||||
}
|
||||
const goFile = () => {
|
||||
const { isSelect, filePath } = fileItem.value
|
||||
const goFile = (row: any) => {
|
||||
const { isSelect, filePath } = row
|
||||
if (!isSelect || isSelect === 2) {
|
||||
message.info('没有访问权限!')
|
||||
return
|
||||
return
|
||||
}
|
||||
if (!filePath) {
|
||||
message.info('暂无文件')
|
||||
|
|
@ -109,11 +116,18 @@ getFile()
|
|||
<img src="../../assets/images/2024fz.jpg" class="w100%" />
|
||||
<div
|
||||
class="absolute py10px left-880px top-250px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer"
|
||||
@click="goFile"
|
||||
@click="goFile(fileItem)"
|
||||
>
|
||||
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
||||
2024年グループ年頭方针
|
||||
</div>
|
||||
<div
|
||||
class="absolute py10px left-920px top-645px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer"
|
||||
@click="goFile(fileItemTwo)"
|
||||
>
|
||||
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
||||
2024年调达方针说明会
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ onMounted(async () => {
|
|||
push({ name: 'modifys' })
|
||||
})
|
||||
}
|
||||
report({ moduleCode: 'App_Home' })
|
||||
} catch (error) {}
|
||||
})
|
||||
const { push } = useRouter()
|
||||
|
|
|
|||
|
|
@ -3,15 +3,17 @@ import { getArticlePage, report, cateFileList, newDataList } from '@/api/daikin/
|
|||
import { message } from '@/utils/message'
|
||||
import { Swiper, SwiperSlide } from 'swiper/vue'
|
||||
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
||||
import type { Dayjs } from 'dayjs'
|
||||
import dayjs from 'dayjs'
|
||||
// import { NCarousel } from 'naive-ui'
|
||||
|
||||
const route = useRoute()
|
||||
const { push } = useRouter()
|
||||
const listData = ref<any[]>([])
|
||||
const curTab = ref(0)
|
||||
const firstItem = ref<any>('')
|
||||
const newsData = ref<any>({})
|
||||
async function getPageList() {
|
||||
const { code } = report({ moduleCode: 'App_Article' })
|
||||
// const { code } = report({ moduleCode: 'App_Article' })
|
||||
const { rows } = await getArticlePage({
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
|
@ -27,22 +29,19 @@ async function getPageList() {
|
|||
|
||||
const fetchNewDataList = async () => {
|
||||
const res = await newDataList({ pageNum: 1, pageSize: 10 })
|
||||
console.log('🚀 ~ file: New.vue:28 ~ res:', res)
|
||||
const data = groupDatesByWeek(res.rows || [])
|
||||
console.log('🚀 ~ file: New.vue:32 ~ data:', data)
|
||||
newsData.value = data
|
||||
firstItem.value = Object.keys(data)[0]
|
||||
}
|
||||
|
||||
// 将日期按照周分组
|
||||
function groupDatesByWeek(dates = [], weekStartDay = 6) {
|
||||
function groupDatesByWeek(dates = [], weekStartDay = 1) {
|
||||
return dates.reduce((acc: any, item: any) => {
|
||||
const weekStart = dayjs(item.createTime)
|
||||
.startOf('week')
|
||||
.subtract(weekStartDay, 'day')
|
||||
.format('MM月DD日')
|
||||
const weekEnd = dayjs(item.createTime)
|
||||
.endOf('week')
|
||||
.subtract(weekStartDay, 'day')
|
||||
.add(weekStartDay, 'day')
|
||||
.format('MM月DD日')
|
||||
const weekEnd = dayjs(item.createTime).endOf('week').add(weekStartDay, 'day').format('MM月DD日')
|
||||
const key = `${weekStart} - ${weekEnd}`
|
||||
acc[key] = acc[key] || []
|
||||
acc[key].push(item)
|
||||
|
|
@ -65,7 +64,7 @@ onMounted(getPageList)
|
|||
// }
|
||||
// }
|
||||
const toDetail2 = (n: any) => {
|
||||
// console.log(n)
|
||||
console.log(n)
|
||||
if (n.id === 0) return
|
||||
if (n.isSelect === 1) {
|
||||
push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id)
|
||||
|
|
@ -88,7 +87,8 @@ const getFile = async () => {
|
|||
const t = files.value.createTime
|
||||
if (t) {
|
||||
const arr = t.split('-')
|
||||
files.value.time = arr[0] + '年' + (+arr[1] - 1) + '月'
|
||||
// files.value.time = arr[0] + '年' + (+arr[1] - 1) + '月'
|
||||
files.value.time = arr[1] - 1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -97,18 +97,45 @@ fetchNewDataList()
|
|||
</script>
|
||||
<template>
|
||||
<div class="card news relative">
|
||||
<div class="flex justify-between items-center">
|
||||
<div>
|
||||
<div
|
||||
class="card_title cursor-pointer hover:underline"
|
||||
@click="push({ name: 'Intelligence' })"
|
||||
>
|
||||
外部情报
|
||||
</div>
|
||||
<!-- <div class="card_sub-title">责任者:调达研究院 研究企画T</div> -->
|
||||
<div class="card_sub-title">责任者:开发调达部 研究企画T</div>
|
||||
</div>
|
||||
<div class="news-left absolute z-10 transition-all" v-show="curTab == 1"></div>
|
||||
<div class="news-right absolute z-10 transition-all" v-show="curTab == 0"></div>
|
||||
<div class="absolute top-0 left-0 right-0 flex items-center z-11">
|
||||
<div
|
||||
class="text-black p-20px text-28px w-1/3 transition-all"
|
||||
:class="[{ 'text-#fff': curTab == 1 }]"
|
||||
@click="curTab = 0"
|
||||
>
|
||||
最新更新
|
||||
</div>
|
||||
<div class="card_title !pt-10px !pl-30px flex-1 !pb-10px" @click="curTab = 1">
|
||||
<div class="flex justify-between items-center">
|
||||
<p
|
||||
class="text-22px cursor-pointer hover:underline transition-all"
|
||||
:class="[{ 'text-#fff': curTab == 0 }]"
|
||||
@click.stop="push({ name: 'Intelligence' })"
|
||||
>
|
||||
外部情报
|
||||
</p>
|
||||
<div
|
||||
class="flex text-#fff tetx-16px items-end txt-bg px-8px py-6px rounded-10px text-#fff mr-10px"
|
||||
>
|
||||
<div
|
||||
@click.stop="push({ name: 'DataBase', query: { id: cateId } })"
|
||||
class="text-16px text-#fff flex align-middle items-center cursor-pointer hover:underline transition-all"
|
||||
>
|
||||
<div>{{ files.time || `1` }}月月报</div>
|
||||
<img class="h-14px pl-4px" src="@/assets/images/yjtt@2x.png" alt="" />
|
||||
</div>
|
||||
<!-- <span class="text-14px mt2px"> 作成日:{{ files.time || `2024年1月` }} </span> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="!px-0 !text-12px mt-4px" :class="[{ 'text-#fff': curTab == 0 }]">
|
||||
责任者:开发调达部 研究企画T
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="card_sub-title">责任者:调达研究院 研究企画T</div> -->
|
||||
</div>
|
||||
<!-- <div
|
||||
class="flex text-#fff tetx-16px items-end txt-bg px-10px py-8px rounded-10px text-#fff mt-[10px] mr-16px"
|
||||
>
|
||||
<p
|
||||
|
|
@ -121,9 +148,62 @@ fetchNewDataList()
|
|||
</span>
|
||||
<span class="text-14px mt2px"> 作成日:{{ files.time || `2024年1月` }} </span>
|
||||
</p>
|
||||
</div> -->
|
||||
<div
|
||||
class="card_content px-20px pb-0 mt-0px absolute left-0 right-0 z-100 top-70px"
|
||||
v-if="curTab == 0"
|
||||
>
|
||||
<!-- <div class="font-16px !h-310px overflow-y-scroll"> -->
|
||||
<!-- <swiper
|
||||
id="swiperList2"
|
||||
v-if="listData"
|
||||
:slides-per-view="4"
|
||||
:autoplay="false && { delay: 1000, disableOnInteraction: false }"
|
||||
:speed="500"
|
||||
:space-between="10"
|
||||
:direction="'vertical'"
|
||||
:scrollbar="{ draggable: false }"
|
||||
:loop="true"
|
||||
:modules="modules"
|
||||
style="height: 280px"
|
||||
>
|
||||
<swiper-slide v-for="(i, index) of newsData" :key="index"> -->
|
||||
<div height="310px" class="h-310px overflow-y-auto">
|
||||
<div class="text-black mb-10px" v-for="(item, index) of newsData" :key="index">
|
||||
<div class="flex justify-between items-center">
|
||||
<span class="text-18px mb-10px mt-20px">{{ index }}</span>
|
||||
<span
|
||||
class="text-16px text-#4D7EE8 cursor-pointer hover:underline"
|
||||
v-if="firstItem == index"
|
||||
@click="push({ name: 'Latest' })"
|
||||
>更多</span
|
||||
>
|
||||
</div>
|
||||
<template v-for="(i, k) in item" :key="k">
|
||||
<div class="text-#142142 truncate text-16px mt8px">
|
||||
<div
|
||||
@click="toDetail2(i)"
|
||||
class="no-underline text-#142142 cursor-pointer hover:underline h-16px leading-16px"
|
||||
>
|
||||
{{ i.title || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-#808696 mt-8px text-14px flex items-center justify-between mb-10px">
|
||||
<span class="flex-1">发布科室: {{ i.departName }}</span>
|
||||
<span class="w-[36%]">发布人: {{ i.userName }}</span>
|
||||
<span class="w-[20%]"> {{ i.createTime?.slice(0, 10) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </swiper-slide>
|
||||
</swiper> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
<div class="card_content px-20px pt-30px pb-0">
|
||||
<div
|
||||
class="card_content px-20px pt-20px pb-0 mt-0px absolute left-0 right-0 top-70px z-[-1]"
|
||||
:class="[{ 'z-100': curTab == 1 }]"
|
||||
>
|
||||
<div
|
||||
v-if="false"
|
||||
class="news_card w-437px flex items-end gap-12px text-#fff/80 !absolute right--20% top--38% scale-50"
|
||||
|
|
@ -163,7 +243,7 @@ fetchNewDataList()
|
|||
>
|
||||
最新News
|
||||
</div>
|
||||
<div class="font-16px !h-230px overflow-y-auto mt10px">
|
||||
<div class="font-16px !h-240px overflow-y-auto mt10px">
|
||||
<!-- <n-carousel direction="vertical" dot-placement="right" style="width: 100%; height: 100px" autoplay :interval="1200"
|
||||
:slides-per-view="2" :space-between="0" :loop="false" mousewheel>
|
||||
<div class="mt-10px" v-if="listData && Array.isArray(listData) && listData.length > 0" v-for="i in listData"
|
||||
|
|
@ -211,6 +291,20 @@ fetchNewDataList()
|
|||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.news-left {
|
||||
background: url('@/assets/images/news-left.jpg') no-repeat;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: -2px;
|
||||
left: 0px;
|
||||
}
|
||||
.news-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: -2px;
|
||||
right: 0px;
|
||||
background: url('@/assets/images/news-right.jpg') no-repeat;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import AppBlock from '@/components/AppBlock.vue'
|
|||
import AppNewsBox from '@/components/AppNewsBox.vue'
|
||||
import Layout from './components/Layout.vue'
|
||||
import DetailNews from './DetailNews.vue'
|
||||
import { getArticleDetail, getArticlePage, getManagerDetail } from '@/api/daikin/base'
|
||||
import { getArticleDetail, getArticlePage, getManagerDetail, report } from '@/api/daikin/base'
|
||||
import { message } from '@/utils/message'
|
||||
|
||||
const { push } = useRouter()
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import AppPagination from '@/components/AppPagination.vue'
|
|||
import { Navs, useData } from './ListPageData'
|
||||
import { NEmpty } from 'naive-ui'
|
||||
import { message } from '@/utils/message'
|
||||
import { report } from '@/api/daikin/base'
|
||||
|
||||
const { push } = useRouter()
|
||||
const route = useRoute()
|
||||
|
|
@ -18,12 +19,12 @@ const { state, list } = useData()
|
|||
const Type1 = [
|
||||
{ key: '1', name: '外部环境', route: 'IntelligenceOutside', icon: getImg('icon-1.svg') },
|
||||
{ key: '2', name: '竞争对手', route: 'IntelligenceOutside', icon: getImg('icon-2.svg') },
|
||||
{ key: '3', name: '供方动向', route: 'IntelligenceOutside', icon: getImg('icon-3.svg') },
|
||||
{ key: '3', name: '供方动向', route: 'IntelligenceOutside', icon: getImg('icon-3.svg') }
|
||||
]
|
||||
const Type2 = [
|
||||
{ key: '4', name: '大金集团', route: 'IntelligenceWithin', icon: getImg('icon-4.svg') },
|
||||
{ key: '5', name: '中国据点', route: 'IntelligenceWithin', icon: getImg('icon-5.svg') },
|
||||
{ key: '6', name: '调达本部', route: 'IntelligenceWithin', icon: getImg('icon-6.svg') },
|
||||
{ key: '6', name: '调达本部', route: 'IntelligenceWithin', icon: getImg('icon-6.svg') }
|
||||
]
|
||||
|
||||
const firstNew = ref<any>({})
|
||||
|
|
@ -39,19 +40,16 @@ watchEffect(() => {
|
|||
// push(`${route.path.replace('/Home','')}/${firstNew.id}`)
|
||||
// // push({name:route.name,params:{id:firstNew.id}})
|
||||
// }
|
||||
const toDetail2 =(item: { id: any })=>{
|
||||
console.log(route,route.path,item.id)
|
||||
const toDetail2 = (item: { id: any }) => {
|
||||
console.log(route, route.path, item.id)
|
||||
// push(`${route.path}/${item.id}`)
|
||||
if(item.isSelect===1){
|
||||
push(`${route.path.replace('/Home','')}/${item.id}`)
|
||||
if (item.isSelect === 1) {
|
||||
push(`${route.path.replace('/Home', '')}/${item.id}`)
|
||||
} else {
|
||||
message.error('没有访问权限')
|
||||
}
|
||||
else{
|
||||
message.error("没有访问权限")
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
report({ moduleCode: 'App_Article' })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -93,8 +91,17 @@ const toDetail2 =(item: { id: any })=>{
|
|||
<section class="px44px mt44px">
|
||||
<!-- <AppAlert v-if="firstNew?.title" @click="push(`${route.path.replace('/Home','')}/${firstNew.id}`)">{{ firstNew.title }}</AppAlert> -->
|
||||
<div class="mt12px news-wrap max-h-467px mb32px overflow-y-auto">
|
||||
<div class="news-item" v-for="item in restNews" :key="item.id" @click="toDetail2(item)">
|
||||
<AppNewsBox class="!lh-2em" :isRead="item.isRead" :top="item.isTop" :labelText="item.tag" labelColor="#2cba06" :size="item.tag==='New'?'h20px':'h30px'" :text="item.title" :date="item.publishTime" />
|
||||
<div class="news-item" v-for="item in restNews" :key="item.id" @click="toDetail2(item)">
|
||||
<AppNewsBox
|
||||
class="!lh-2em"
|
||||
:isRead="item.isRead"
|
||||
:top="item.isTop"
|
||||
:labelText="item.tag"
|
||||
labelColor="#2cba06"
|
||||
:size="item.tag === 'New' ? 'h20px' : 'h30px'"
|
||||
:text="item.title"
|
||||
:date="item.publishTime"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center mt32px" v-if="state.total">
|
||||
|
|
|
|||
|
|
@ -1,103 +1,103 @@
|
|||
<!-- 外部情报 -->
|
||||
<script setup lang="tsx">
|
||||
import AppBlock from "@/components/AppBlock.vue";
|
||||
import Layout from "./components/Layout.vue";
|
||||
import OverviewBlock from "./OverviewBlock.vue";
|
||||
import { getImg } from "./images";
|
||||
import { useData } from "./OverviewData";
|
||||
import { getBannerList } from "@/api/daikin/base";
|
||||
const { data1,data2,data3,data4,data5,data6,data7 } = useData();
|
||||
import AppBlock from '@/components/AppBlock.vue'
|
||||
import Layout from './components/Layout.vue'
|
||||
import OverviewBlock from './OverviewBlock.vue'
|
||||
import { getImg } from './images'
|
||||
import { useData } from './OverviewData'
|
||||
import { getBannerList, report } from '@/api/daikin/base'
|
||||
const { data1, data2, data3, data4, data5, data6, data7 } = useData()
|
||||
|
||||
// console.log(data.value)
|
||||
const swipeActiveIndex = ref(0);
|
||||
const swipeActiveIndex = ref(0)
|
||||
function handleIndex(x: any) {
|
||||
swipeActiveIndex.value = x.realIndex;
|
||||
swipeActiveIndex.value = x.realIndex
|
||||
}
|
||||
|
||||
async function getBanner() {
|
||||
// 类型 1-社外 2-社内
|
||||
const {data} =await getBannerList({type:1})
|
||||
const {data:da} =await getBannerList({type:2})
|
||||
if(data&&data!='null'&&data.length>0){
|
||||
const { data } = await getBannerList({ type: 1 })
|
||||
const { data: da } = await getBannerList({ type: 2 })
|
||||
if (data && data != 'null' && data.length > 0) {
|
||||
imageList1.value = data
|
||||
}
|
||||
if(da&&da!='null'&&da.length>0){
|
||||
if (da && da != 'null' && da.length > 0) {
|
||||
imageList2.value = da
|
||||
}
|
||||
}
|
||||
getBanner()
|
||||
const imageList1 =ref([
|
||||
{ title: "三菱电机FY22年度方针说明会", bannerImg: getImg("swipe-1.svg") ,id:0},
|
||||
{ title: "23年度供应商大会热烈筹备中", bannerImg: getImg("swipe-2.svg") ,id:0},
|
||||
getBanner()
|
||||
report({ moduleCode: 'App_Article' })
|
||||
const imageList1 = ref([
|
||||
{ title: '三菱电机FY22年度方针说明会', bannerImg: getImg('swipe-1.svg'), id: 0 },
|
||||
{ title: '23年度供应商大会热烈筹备中', bannerImg: getImg('swipe-2.svg'), id: 0 }
|
||||
])
|
||||
const imageList2 =ref([
|
||||
{ title: "三菱电机FY22年度方针说明会", bannerImg: getImg("swipe-1.svg") ,id:0},
|
||||
{ title: "23年度供应商大会热烈筹备中", bannerImg: getImg("swipe-2.svg") ,id:0},
|
||||
const imageList2 = ref([
|
||||
{ title: '三菱电机FY22年度方针说明会', bannerImg: getImg('swipe-1.svg'), id: 0 },
|
||||
{ title: '23年度供应商大会热烈筹备中', bannerImg: getImg('swipe-2.svg'), id: 0 }
|
||||
])
|
||||
|
||||
const swipeImages = [
|
||||
{ title: "三菱电机FY22年度方针说明会", bannerImg: getImg("swipe-1.svg") },
|
||||
{ title: "23年度供应商大会热烈筹备中", bannerImg: getImg("swipe-2.svg") },
|
||||
];
|
||||
{ title: '三菱电机FY22年度方针说明会', bannerImg: getImg('swipe-1.svg') },
|
||||
{ title: '23年度供应商大会热烈筹备中', bannerImg: getImg('swipe-2.svg') }
|
||||
]
|
||||
const items1 = computed(() => [
|
||||
{
|
||||
key: "1",
|
||||
name: "外部环境",
|
||||
color: "#63BFB2",
|
||||
title: "全年原材料供应状况紧张",
|
||||
icon: getImg("icon-1.svg"),
|
||||
news:unref(data1), //.splice(0, 3),
|
||||
list:unref(data7)[1]?? [],
|
||||
key: '1',
|
||||
name: '外部环境',
|
||||
color: '#63BFB2',
|
||||
title: '全年原材料供应状况紧张',
|
||||
icon: getImg('icon-1.svg'),
|
||||
news: unref(data1), //.splice(0, 3),
|
||||
list: unref(data7)[1] ?? []
|
||||
},
|
||||
{
|
||||
key: "2",
|
||||
name: "竞争对手",
|
||||
color: "#F57E6E",
|
||||
title: "三菱召开年度方针说明会",
|
||||
icon: getImg("icon-2.svg"),
|
||||
key: '2',
|
||||
name: '竞争对手',
|
||||
color: '#F57E6E',
|
||||
title: '三菱召开年度方针说明会',
|
||||
icon: getImg('icon-2.svg'),
|
||||
news: unref(data2), //.splice(0, 3),
|
||||
list:unref(data7)[2]?? [],
|
||||
list: unref(data7)[2] ?? []
|
||||
},
|
||||
{
|
||||
key: "3",
|
||||
name: "供方动向",
|
||||
color: "#537DEB",
|
||||
title: "全年原材料供应状况紧张",
|
||||
icon: getImg("icon-3.svg"),
|
||||
news:unref(data3), //.splice(0, 3),
|
||||
list:unref(data7)[3]?? [],
|
||||
},
|
||||
]);
|
||||
key: '3',
|
||||
name: '供方动向',
|
||||
color: '#537DEB',
|
||||
title: '全年原材料供应状况紧张',
|
||||
icon: getImg('icon-3.svg'),
|
||||
news: unref(data3), //.splice(0, 3),
|
||||
list: unref(data7)[3] ?? []
|
||||
}
|
||||
])
|
||||
const items2 = computed(() => [
|
||||
{
|
||||
key: "4",
|
||||
name: "大金集团",
|
||||
color: "#5DCCFA",
|
||||
title: "23年度集团方针正式发行",
|
||||
icon: getImg("icon-4.svg"),
|
||||
key: '4',
|
||||
name: '大金集团',
|
||||
color: '#5DCCFA',
|
||||
title: '23年度集团方针正式发行',
|
||||
icon: getImg('icon-4.svg'),
|
||||
news: unref(data4), //.splice(0, 3),
|
||||
list:unref(data7)[4]?? [],
|
||||
list: unref(data7)[4] ?? []
|
||||
},
|
||||
{
|
||||
key: "5",
|
||||
name: "中国据点",
|
||||
color: "#E8A743",
|
||||
title: "惠州工厂稼动正式开始",
|
||||
icon: getImg("icon-6.svg"),
|
||||
key: '5',
|
||||
name: '中国据点',
|
||||
color: '#E8A743',
|
||||
title: '惠州工厂稼动正式开始',
|
||||
icon: getImg('icon-6.svg'),
|
||||
news: unref(data5), //.splice(0, 3),
|
||||
list:unref(data7)[5]?? [],
|
||||
list: unref(data7)[5] ?? []
|
||||
},
|
||||
{
|
||||
key: "6",
|
||||
name: "调达本部",
|
||||
color: "#926CE1",
|
||||
title: "23年度供应商大会热烈筹备中",
|
||||
icon: getImg("icon-5.svg"),
|
||||
news:unref(data6), //.splice(0, 3),
|
||||
list:unref(data7)[6]?? [],
|
||||
},
|
||||
]);
|
||||
|
||||
key: '6',
|
||||
name: '调达本部',
|
||||
color: '#926CE1',
|
||||
title: '23年度供应商大会热烈筹备中',
|
||||
icon: getImg('icon-5.svg'),
|
||||
news: unref(data6), //.splice(0, 3),
|
||||
list: unref(data7)[6] ?? []
|
||||
}
|
||||
])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -134,7 +134,7 @@ const items2 = computed(() => [
|
|||
position: relative;
|
||||
padding-left: 24px;
|
||||
&::before {
|
||||
content: " ";
|
||||
content: ' ';
|
||||
display: block;
|
||||
width: 8px;
|
||||
height: 30px;
|
||||
|
|
|
|||
|
|
@ -7,16 +7,24 @@ import { useDate } from '@/views/home/hooks/useDate'
|
|||
import type { FormInst } from 'naive-ui'
|
||||
import { useMessage } from 'naive-ui'
|
||||
import { ref } from 'vue'
|
||||
import { NModal, NCard, NForm, NButton, NFormItem, NInput, NRadio, NSelect, NSpace, NRadioGroup } from 'naive-ui'
|
||||
import {
|
||||
NModal,
|
||||
NCard,
|
||||
NForm,
|
||||
NButton,
|
||||
NFormItem,
|
||||
NInput,
|
||||
NRadio,
|
||||
NSelect,
|
||||
NSpace,
|
||||
NRadioGroup
|
||||
} from 'naive-ui'
|
||||
import { saveArticle } from '@/api/daikin/base'
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
|
||||
const store =useUserStore()
|
||||
console.log("🚀 ~ file: Layout.vue:15 ~ store:", store.user)
|
||||
const store = useUserStore()
|
||||
const { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -30,14 +38,35 @@ const { push } = useRouter()
|
|||
<div class="text-36px">外部情报</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px flex-1">{{ week }}</div>
|
||||
<div style="margin-right: 8px" v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'">
|
||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({ path: '/Home/Process' })">情报流程</div>
|
||||
<div
|
||||
style="margin-right: 8px"
|
||||
v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'"
|
||||
>
|
||||
<div
|
||||
class="add text-18px px13px py11px cursor-pointer"
|
||||
@click="push({ path: '/Home/Process' })"
|
||||
>
|
||||
情报流程
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-right: 8px" v-if="store.user.isPublish ===1 || store.user.roleCode === 'zhuxi'">
|
||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'messageSelect'})">留言板</div>
|
||||
<div
|
||||
style="margin-right: 8px"
|
||||
v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'"
|
||||
>
|
||||
<div
|
||||
class="add text-18px px13px py11px cursor-pointer"
|
||||
@click="push({ name: 'messageSelect' })"
|
||||
>
|
||||
留言板
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="store.user.isPublish ===1">
|
||||
<div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'InfosEdit'})">+ 新增</div>
|
||||
<div v-if="store.user.isPublish === 1">
|
||||
<div
|
||||
class="add text-18px px13px py11px cursor-pointer"
|
||||
@click="push({ name: 'InfosEdit' })"
|
||||
>
|
||||
+ 新增
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1 mt30px text-#142142">
|
||||
|
|
@ -131,7 +160,7 @@ const { push } = useRouter()
|
|||
}
|
||||
|
||||
.add {
|
||||
border: 1px solid #FFFFFF;
|
||||
border: 1px solid #ffffff;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
|
|
@ -139,10 +168,10 @@ const { push } = useRouter()
|
|||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 20px;
|
||||
background-color: #C2C2C2;
|
||||
background-color: #c2c2c2;
|
||||
}
|
||||
|
||||
.img.yes {
|
||||
background-color: #63BFB2;
|
||||
background-color: #63bfb2;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,287 @@
|
|||
<script setup lang="ts">
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||
import { useDate } from '@/views/home/hooks/useDate'
|
||||
import { getArticlePage, getSearchGlobal, newDataList } from '@/api/daikin/base'
|
||||
import { noticeld } from '@/stores/modules/noticeId'
|
||||
import { searchStore } from '@/stores/modules/search'
|
||||
import { message } from '@/utils/message'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
const searchS = searchStore()
|
||||
const { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
const listData = ref()
|
||||
const flg = ref()
|
||||
let keywords = ref()
|
||||
const pageInfo = reactive({
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
})
|
||||
// App_Article 外部情报模块,App_Market 市况汇率,App_data_platform 数据平台, App_BCP BCP模块, App_CSR 碳中和模块,App_Quality 品质模块,App_Lab Lab模块,App_Database DatabBase模块
|
||||
const codeType = {
|
||||
App_Article: '外部情报', //分内部情报 和 外部情报
|
||||
App_Market: '市况汇率', //返回下文件大小 fileCommon.fileSize
|
||||
App_data_platform: '数据平台', //返回文件大小 fileCommon.fileSize
|
||||
App_BCP: 'BCP模块', //返回文件大小 fileCommon.fileSize
|
||||
App_CSR: '碳中和模块', //返回文件大小 fileCommon.fileSize
|
||||
App_Quality: '品质模块', //返回文件大小 fileCommon.fileSize
|
||||
App_Lab: 'Lab模块', //返回文件大小 fileCommon.fileSize
|
||||
App_Database: 'DatabBase模块', //返回文件大小 fileCommon.fileSize
|
||||
App_News: '新闻模块'
|
||||
}
|
||||
const loading = ref(true)
|
||||
async function getSearchList() {
|
||||
loading.value = true
|
||||
const keyword = searchS.search.content
|
||||
// const { rows } = await getArticlePage({ pageNum: 1, pageSize: 100, type: 2, position: 'search', keyword } as any);
|
||||
const { rows, total } = await getSearchGlobal({
|
||||
pageNum: pageInfo.currentPage,
|
||||
pageSize: pageInfo.pageSize,
|
||||
keyword
|
||||
} as any).catch((e) => {
|
||||
loading.value = false
|
||||
listData.value = []
|
||||
})
|
||||
listData.value = rows
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 300)
|
||||
pageInfo.total = total
|
||||
}
|
||||
|
||||
const newsData = ref<any>()
|
||||
const fetchNewDataList = async () => {
|
||||
const res = await newDataList({ pageNum: pageInfo.currentPage, pageSize: pageInfo.pageSize })
|
||||
pageInfo.total = res.total
|
||||
const data = groupDatesByWeek(res.rows || [])
|
||||
newsData.value = data
|
||||
}
|
||||
fetchNewDataList()
|
||||
|
||||
// 将日期按照周分组
|
||||
function groupDatesByWeek(dates = [], weekStartDay = 1) {
|
||||
return dates.reduce((acc: any, item: any) => {
|
||||
const weekStart = dayjs(item.createTime)
|
||||
.startOf('week')
|
||||
.add(weekStartDay, 'day')
|
||||
.format('MM月DD日')
|
||||
item.date = dayjs(item.createTime).format('YYYY-MM-DD')
|
||||
const weekEnd = dayjs(item.createTime).endOf('week').add(weekStartDay, 'day').format('MM月DD日')
|
||||
const key = `${weekStart} - ${weekEnd}`
|
||||
acc[key] = acc[key] || []
|
||||
acc[key].push(item)
|
||||
return acc
|
||||
}, {})
|
||||
}
|
||||
// watchEffect(() => {
|
||||
// searchS.search.time
|
||||
// getSearchList(searchS.search.content)
|
||||
// })
|
||||
|
||||
const codePath = {
|
||||
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',
|
||||
modulePath: '/DataBase'
|
||||
}
|
||||
}
|
||||
|
||||
const goModule = (item, type) => {
|
||||
const { moduleCode, id } = item
|
||||
const { modulePath, path } = codePath[moduleCode]
|
||||
if (modulePath) {
|
||||
if (type === 'module') {
|
||||
push(modulePath)
|
||||
} else {
|
||||
push(path + id)
|
||||
}
|
||||
}
|
||||
}
|
||||
const clickItem = (item: any) => {
|
||||
const { id, filePath, isSelect, moduleCode, fileCommon = {} } = item
|
||||
if (moduleCode === 'App_Article') {
|
||||
goModule(item, 'path')
|
||||
}
|
||||
if (isSelect === 1) {
|
||||
downloads({ fileCommon, filePath })
|
||||
} else {
|
||||
message.info('您没有权限查看!')
|
||||
}
|
||||
}
|
||||
|
||||
const downloads = (data: any = {}) => {
|
||||
const { fileCommon, filePath } = data
|
||||
if ((fileCommon?.fileSize || 0) > 25 * 1024 * 1024) {
|
||||
message.info('正在下载中,请稍等~')
|
||||
downloadFile(filePath)
|
||||
return
|
||||
}
|
||||
if (filePath) {
|
||||
window.open(filePath, '_blank')
|
||||
} else {
|
||||
message.info('没有可预览文件!')
|
||||
}
|
||||
}
|
||||
function downloadFile(url: any) {
|
||||
fetch(url)
|
||||
.then((response) => response.blob())
|
||||
.then((blob) => {
|
||||
const downloadUrl = URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = downloadUrl
|
||||
link.download = getFileNameFromUrl(url)
|
||||
link.click()
|
||||
})
|
||||
}
|
||||
function getFileNameFromUrl(url: string) {
|
||||
console.log(
|
||||
'🚀 ~ file: index.vue:107 ~ getFileNameFromUrl ~ getFileNameFromUrl:',
|
||||
getFileNameFromUrl
|
||||
)
|
||||
const lastSlashIndex = url.lastIndexOf('/')
|
||||
if (lastSlashIndex !== -1) {
|
||||
return url.substring(lastSlashIndex + 1)
|
||||
} else {
|
||||
return 'Invalid URL'
|
||||
}
|
||||
}
|
||||
|
||||
const handleSizeChange = (e) => {
|
||||
pageInfo.pageSize = e
|
||||
pageInfo.currentPage = 1
|
||||
// getSearchList()
|
||||
fetchNewDataList()
|
||||
}
|
||||
|
||||
// const handleCurrentChange = (e) => {
|
||||
// pageInfo.currentPage = e
|
||||
// getSearchList()
|
||||
// }
|
||||
const fileSize = 24 * 1024 * 1024
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt30px">
|
||||
<div class="text-36px">最新更新列表</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</div>
|
||||
</div>
|
||||
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px">
|
||||
<div class="h-800px mt-30px relative" v-if="newsData">
|
||||
<div class="h-710px overflow-y-scroll">
|
||||
<div v-for="(val, key) of newsData" :key="key" class="w-70% mb-20px flex-1">
|
||||
<div class="text-#142142 text-20px font-600 mb20px">
|
||||
{{ key }}
|
||||
</div>
|
||||
<div v-for="(i, k) in val" :key="k" class="mb-10px">
|
||||
<div class="text-#142142 truncate text-18px mt8px">
|
||||
<div
|
||||
@click="clickItem(i)"
|
||||
class="no-underline text-#142142 cursor-pointer hover:underline h-16px leading-16px"
|
||||
>
|
||||
{{ i.title || '' }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-#808696 mt-10px text-16px flex items-center justify-between mb-14px">
|
||||
<span class="flex-1">发布科室: {{ i.departName }}</span>
|
||||
<span class="w-[36%]">发布人: {{ i.userName }}</span>
|
||||
<span class="w-[20%]"> {{ i.createTime?.slice(0, 10) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="absolute bottom-0px left-50% translate-x-[-50%] z-11">
|
||||
<el-pagination
|
||||
background
|
||||
v-model:current-page="pageInfo.currentPage"
|
||||
v-model:page-size="pageInfo.pageSize"
|
||||
layout="prev, pager, next, total,jumper,->"
|
||||
:total="pageInfo.total"
|
||||
@current-change="fetchNewDataList"
|
||||
/>
|
||||
<!-- @size-change="handleSizeChange" -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
:deep(.el-empty__description) {
|
||||
p {
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
.q-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
&::after {
|
||||
content: ' ';
|
||||
background-image: url('@/assets/images/bg-card.svg');
|
||||
pointer-events: none;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 127px;
|
||||
background-repeat: no-repeat; /* 阻止图片平铺 */
|
||||
background-position: right top;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -228,7 +228,7 @@ const fileSize = 24 * 1024 * 1024
|
|||
<el-button
|
||||
v-if="row.moduleCode === 'App_Article'"
|
||||
style="color: #000"
|
||||
@click="goModule(row, path)"
|
||||
@click="goModule(row, 'path')"
|
||||
>详情
|
||||
</el-button>
|
||||
<template v-else>
|
||||
|
|
|
|||
Loading…
Reference in New Issue