main
wwl 2024-04-07 17:56:55 +08:00
parent 4a98654782
commit 8c43a7bde1
4 changed files with 643 additions and 675 deletions

File diff suppressed because it is too large Load Diff

View File

@ -686,7 +686,7 @@ function formatNumber(num = 0) {
> >
<div class="item !h-188px cursor-pointer" @click="setModule('App_Quality', 'Quality')"> <div class="item !h-188px cursor-pointer" @click="setModule('App_Quality', 'Quality')">
<div class="item_title hover:underline">品质</div> <div class="item_title hover:underline">品质</div>
<div class="item_sub-title">责任者调达部 加工品变革T</div> <div class="item_sub-title">责任者调达部 企画管理T</div>
<!-- <img src="@/assets/images/img-45.svg" class="item_img pb13px pr20px" /> --> <!-- <img src="@/assets/images/img-45.svg" class="item_img pb13px pr20px" /> -->
<img src="@/assets/images/img-41.png" class="item_img b !bottom--20px" /> <img src="@/assets/images/img-41.png" class="item_img b !bottom--20px" />
</div> </div>

View File

@ -1,9 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { getArticlePage, report, cateFileList } from '@/api/daikin/base' import { getArticlePage, report, cateFileList, newDataList } from '@/api/daikin/base'
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 { NCarousel } from 'naive-ui' import type { Dayjs } from 'dayjs'
import dayjs from 'dayjs'
// import { NCarousel } from 'naive-ui'
const route = useRoute() const route = useRoute()
const { push } = useRouter() const { push } = useRouter()
@ -22,6 +24,32 @@ async function getPageList() {
// } // }
console.log(listData.value.length) console.log(listData.value.length)
} }
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)
}
//
function groupDatesByWeek(dates = [], weekStartDay = 6) {
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')
.format('MM月DD日')
const key = `${weekStart} - ${weekEnd}`
acc[key] = acc[key] || []
acc[key].push(item)
return acc
}, {})
}
onMounted(getPageList) onMounted(getPageList)
// console.log(listData) // console.log(listData)
@ -65,6 +93,7 @@ const getFile = async () => {
} }
getFile() getFile()
fetchNewDataList()
</script> </script>
<template> <template>
<div class="card news relative"> <div class="card news relative">

View File

@ -15,435 +15,394 @@ const { toggle } = inject<any>('fullscreen')
const activeMenuKey = ref('Home') const activeMenuKey = ref('Home')
let idx = ref(0) let idx = ref(0)
const Menus = ref([ const Menus = ref([
// //
{ {
key: 'Home', key: 'Home',
name: '首页', name: '首页',
icon: getImg('home.png'), icon: getImg('home.png'),
icon1: getImg('home1.png'), icon1: getImg('home1.png'),
link: '', link: '',
path: '/Home', path: '/Home',
other: 'Top Page' other: 'Top Page'
}, },
{ {
key: 'Group', key: 'Group',
name: '集团部门方针', name: '集团部门方针',
icon: getImg('company.png'), icon: getImg('company.png'),
icon1: getImg('company1.png'), icon1: getImg('company1.png'),
link: '', link: '',
path: '/Home/group' path: '/Home/group'
// children: [ // children: [
// { key: 'Group', name: '-' }, // { key: 'Group', name: '-' },
// { key: 'Company', name: '-' }, // { key: 'Company', name: '-' },
// { key: 'HeadQuarters', name: '-' } // { key: 'HeadQuarters', name: '-' }
// ] // ]
}, },
// { key: 'company', name: '', icon: getImg('icon-company.svg') }, // { key: 'company', name: '', icon: getImg('icon-company.svg') },
{ {
key: 'User', key: 'User',
name: '年度活动日程表', name: '年度活动日程表',
icon: getImg('book.png'), icon: getImg('book.png'),
icon1: getImg('book1.png'), icon1: getImg('book1.png'),
link: '', link: '',
path: '/Home/User' path: '/Home/User'
// children: [ // children: [
// { key: '', name: 'Database' }, // { key: '', name: 'Database' },
// ] // ]
}, },
// { key: 'database', name: 'Database', icon: getImg('shuju.png'),icon1: getImg('shuju1.png'),link:'https://procurement.daikin.net.cn/scripts/cbgrn/grn.exe/' }, // { key: 'database', name: 'Database', icon: getImg('shuju.png'),icon1: getImg('shuju1.png'),link:'https://procurement.daikin.net.cn/scripts/cbgrn/grn.exe/' },
{ {
key: 'DataBase', key: 'DataBase',
name: '调达Database', name: '调达Database',
icon: getImg('shuju.png'), icon: getImg('shuju.png'),
icon1: getImg('shuju1.png'), icon1: getImg('shuju1.png'),
link: '' link: ''
}, },
{ {
key: 'link', key: 'link',
name: '其他链接', name: '其他链接',
icon: getImg('link.png'), icon: getImg('link.png'),
icon1: getImg('link1.png'), icon1: getImg('link1.png'),
link: '', link: '',
other: 'Other Links', other: 'Other Links',
children: [ children: [
{ {
key: 'YCWZ', key: 'YCWZ',
name: '调达本部才望子', name: '调达本部才望子',
link: 'http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index' link: 'http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index'
}, },
{ {
key: 'GCDB', key: 'GCDB',
name: 'GCDB全球比价系统', name: 'GCDB全球比价系统',
link: 'http://10.219.11.13/gcdb/' link: 'http://10.219.11.13/gcdb/'
}, },
{ {
key: 'DJ', key: 'DJ',
name: '大金空调官方网站', name: '大金空调官方网站',
link: 'https://www.daikin-china.com.cn' link: 'https://www.daikin-china.com.cn'
}, },
{ key: 'CODE', name: '大金空调中国相关' } { key: 'CODE', name: '大金空调中国相关' }
] ]
}, },
{ {
key: 'phone', key: 'phone',
name: '紧急联络体制表', name: '紧急联络体制表',
icon: getImg('phone.png'), icon: getImg('phone.png'),
icon1: getImg('phone1.png'), icon1: getImg('phone1.png'),
link: '', link: '',
path: '/Home/phone' path: '/Home/phone',
// children: [ // children: [
// { key: 'inv', name: '' }, // { key: 'inv', name: '' },
// { key: 'visit', name: '访' }, // { key: 'visit', name: '访' },
// ] // ]
} children: [{ key: 'DataBase', name: '公司内线', params: { id: 267 } }]
}
]) ])
async function getDbTree() { async function getDbTree() {
const { data = [] } = await treeDbList({}) const { data = [] } = await treeDbList({})
Menus.value[3].children = data.map((item: any) => { Menus.value[3].children = data.map((item: any) => {
return { return {
key: 'DataBase', key: 'DataBase',
name: item.name, name: item.name,
params: { id: item.id } params: { id: item.id }
} }
}) })
} }
getDbTree() getDbTree()
let flag = false let flag = false
function menuHandler(menu: any, index: number) { function menuHandler(menu: any, index: number) {
activeMenuKey.value = menu.key activeMenuKey.value = menu.key
console.log(menu, index) console.log(menu, index)
if (menu.key === 'DataBase' && idx.value === index) { if (menu.key === 'DataBase' && idx.value === index) {
report({ moduleCode: 'App_Database' }) report({ moduleCode: 'App_Database' })
push({ name: menu.key }) push({ name: menu.key })
return return
} }
idx.value = index if (menu.key === 'phone' && idx.value === index) {
console.log(menu.key, 'key') push(menu.path)
if (!menu.key) return return
// if (menu.key === 'DataBase') { }
// if (flag) { idx.value = index
// push({ name: menu.key }) if (!menu.key) return
// flag = false // if (menu.key === 'DataBase') {
// return // if (flag) {
// } // push({ name: menu.key })
// flag = true // flag = false
// setTimeout(() => { // return
// flag = false // }
// }, 300) // flag = true
// } // setTimeout(() => {
if (menu.children) return // flag = false
if (menu.key === 'DataBase') { // }, 300)
report({ moduleCode: 'App_Database' }) // }
} if (menu.children) return
push({ name: menu.key }) if (menu.key === 'DataBase') {
report({ moduleCode: 'App_Database' })
}
push({ name: menu.key })
} }
const shorm = ref(false) const shorm = ref(false)
const { path } = useRoute() const { path } = useRoute()
watchEffect(() => { watchEffect(() => {
setTimeout(() => { setTimeout(() => {
const index = Menus.value.findIndex((item: any) => item.path === path) const index = Menus.value.findIndex((item: any) => item.path === path)
if (index > -1 && idx.value !== index) { if (index > -1 && idx.value !== index) {
const menu = Menus.value[index] const menu = Menus.value[index]
menuHandler(menu, index) menuHandler(menu, index)
} }
}, 0) }, 0)
}) })
function goChild(menu: any) { function goChild(menu: any) {
activeItem = menu.key activeItem = menu.key
if (menu.key === 'CODE') { if (menu.key === 'CODE') {
shorm.value = true shorm.value = true
return return
} }
if (menu.link) { if (menu.link) {
} else { } else {
push({ name: menu.key, query: menu.params || {} }) push({ name: menu.key, query: menu.params || {} })
} }
} }
var activeItem = 0 var activeItem = 0
</script> </script>
<template> <template>
<div class="page w-1920px h-1080px p30px flex"> <div class="page w-1920px h-1080px p30px flex">
<div class="w300px -mr-1px flex flex-col shrink-0 overflow-auto"> <div class="w300px -mr-1px flex flex-col shrink-0 overflow-auto">
<!-- @dblclick="toggle" --> <!-- @dblclick="toggle" -->
<img src="@/assets/images/logo.png" class="w197px h44px mt14px" /> <img src="@/assets/images/logo.png" class="w197px h44px mt14px" />
<div class="text-20px text-#fff font-600 mt6px"> <div class="text-20px text-#fff font-600 mt6px">大金中国调达本部 HOMEPAGE</div>
大金中国调达本部 HOMEPAGE
</div>
<div <div
class="mt34px w270px min-h80px rd-35px b-4px bg-#fff/16 b-4px b-solid b-#fff/23 overflow-hidden relative" class="mt34px w270px min-h80px rd-35px b-4px bg-#fff/16 b-4px b-solid b-#fff/23 overflow-hidden relative"
> >
<Searchs></Searchs> <Searchs></Searchs>
</div> </div>
<div class="pt10px pb10px flex-1 max-h-636px"> <!-- max-h-636px -->
<div <div class="pt10px pb10px flex-1 max-h-836px">
class="nav pl36px pr16px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#fff cursor-pointer hover:underline" <div
v-for="(m, index) in Menus" class="nav pl36px pr16px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#fff cursor-pointer hover:underline"
:key="m.key" v-for="(m, index) in Menus"
:class=" :key="m.key"
activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : '' :class="activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''"
" @click="() => menuHandler(m, index)"
@click="() => menuHandler(m, index)" >
> <div :class="activeMenuKey === m.key && 'onActive'">
<div :class="activeMenuKey === m.key && 'onActive'"> <img v-if="activeMenuKey === m.key" :src="m.icon1" class="w22px h22px mr16px mt--5px" />
<img <img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" />
v-if="activeMenuKey === m.key" <span
:src="m.icon1" class="text-22px font-900 leading-22px"
class="w22px h22px mr16px mt--5px" :class="
/> (m.key === 'link' || m.key === 'DataBase') &&
<img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" /> 'underline border-b-0px border-b-solid'
<span "
class="text-22px font-900 leading-22px" >
:class=" <a v-if="m.link" class="no-underline text-#fff" :href="m.link"> {{ m.name }}</a>
(m.key === 'link' || m.key === 'DataBase') && <span v-else>
'underline border-b-0px border-b-solid' <a v-if="m.key === 'link' || m.key === 'DataBase'" class="text-#fff">
" {{ m.name }}</a
> >
<a v-if="m.link" class="no-underline text-#fff" :href="m.link"> <span v-else>{{ m.name }}</span>
{{ m.name }}</a </span>
> <span class="text-18px italic font-500" v-if="m.other">{{ m.other }}</span>
<span v-else> </span>
<a </div>
v-if="m.key === 'link' || m.key === 'DataBase'"
class="text-#fff"
>
{{ m.name }}</a
>
<span v-else>{{ m.name }}</span>
</span>
<span class="text-18px italic font-500" v-if="m.other">{{
m.other
}}</span>
</span>
</div>
<div v-if="m.children && idx == index" class="pl40px"> <div v-if="m.children && idx == index" class="pl40px">
<div <div
class="my16px pl30px text-#fff activeChildren text-20px" class="my16px pl30px text-#fff activeChildren text-20px"
v-for="(item, ind) in m.children" v-for="(item, ind) in m.children"
:key="item.key" :key="item.key"
@click.stop="goChild(item)" @click.stop="goChild(item)"
@click="activeItem = ind" @click="activeItem = ind"
> >
<a <a v-if="item.link" class="no-underline !text-#fff flex" :href="item.link"
v-if="item.link" ><span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"></span>{{ item.name }}</a
class="no-underline !text-#fff flex" >
:href="item.link" <span v-else class="flex"
><span ><span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"></span
class="w7px h7px rd-7px bg-#fff block mr-8px mt4px" >{{ item.name }}</span
></span >
>{{ item.name }}</a </div>
> </div>
<span v-else class="flex" </div>
><span </div>
class="w7px h7px rd-7px bg-#fff block mr-8px mt4px" <div
></span v-if="false"
>{{ item.name }}</span class="w270px py14px my20px px24px flex rd-20px bg-#003cb7 hover:underline hover:cursor-pointer"
> style="box-shadow: 0 2rpx 14rpx 0 #00000069"
</div> >
</div> <div
</div> class="flex items-center text-18px"
</div> @click="push({ name: 'DataBase', query: { id: 267 } })"
<div >
class="w270px py14px my20px px24px flex rd-20px bg-#003cb7 hover:underline hover:cursor-pointer" <img src="@/assets/images/dianhhh@2x.png" class="w22px h22px mr10px" />
style="box-shadow: 0 2rpx 14rpx 0 #00000069" 公司内线
> </div>
<div </div>
class="flex items-center text-18px" <n-popover
@click="push({ name: 'DataBase', query: { id: 267 } })" v-if="false"
> trigger="hover"
<img placement="top"
src="@/assets/images/dianhhh@2x.png" :style="{ '--n-border-radius': '8px' }"
class="w22px h22px mr10px" >
/> <template #trigger> </template>
公司内线 <div class="text-14px text-#285FE9 flex items-center hover:underline cursor-pointer">
</div> <img src="@/assets/images/wjqq@2x.png" class="w14px h18px mr4px object-contain" />
</div> <span>{{ '公司内线公司内线公司内线' }}</span>
<n-popover </div>
v-if="false" </n-popover>
trigger="hover" <div class="p20px w270px rd-20px b-4px bg-#fff/4 b-4px b-solid b-#fff/23 text-14px relative">
placement="top" <a
:style="{ '--n-border-radius': '8px' }" href="http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index"
> target="_blank"
<template #trigger> </template> class="no-underline text-#fff"
<div >
class="text-14px text-#285FE9 flex items-center hover:underline cursor-pointer" <div class="flex items-center text-18px hover:underline">
> <img src="@/assets/images/icon-book.svg" class="w22px h22px mr10px" />
<img 个人日程
src="@/assets/images/wjqq@2x.png" </div>
class="w14px h18px mr4px object-contain" <!-- <div class="mt18px">9:00-10:00</div>
/>
<span>{{ '公司内线公司内线公司内线' }}</span>
</div>
</n-popover>
<div
class="p20px w270px rd-20px b-4px bg-#fff/4 b-4px b-solid b-#fff/23 text-14px relative"
>
<a
href="http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index"
target="_blank"
class="no-underline text-#fff"
>
<div class="flex items-center text-18px hover:underline">
<img
src="@/assets/images/icon-book.svg"
class="w22px h22px mr10px"
/>
个人日程
</div>
<!-- <div class="mt18px">9:00-10:00</div>
<div class="mt8px">召集部门成员召开项目启动会</div> <div class="mt8px">召集部门成员召开项目启动会</div>
<div class="mt16px">10:01-11:00</div> <div class="mt16px">10:01-11:00</div>
<div class="mt8px">召集部门成员召开项目启动会</div> --> <div class="mt8px">召集部门成员召开项目启动会</div> -->
<img <img
src="@/assets/images/zhulj@2x.png" src="@/assets/images/zhulj@2x.png"
class="absolute w22px h22px mr10px top--15px right--20px" class="absolute w22px h22px mr10px top--15px right--20px"
/> />
</a> </a>
<div <div class="mt10px ml-30px opacity-70" @click="(e) => e.stopPropagation()">
class="mt10px ml-30px opacity-70" 请点击上方链接登录cybouzu
@click="(e) => e.stopPropagation()" </div>
> </div>
请点击上方链接登录cybouzu
</div>
</div>
<!-- <div class="p20px w270px rd-20px b-4px bg-#fff/16 b-4px b-solid b-#fff/23 text-14px mt22px"> <!-- <div class="p20px w270px rd-20px b-4px bg-#fff/16 b-4px b-solid b-#fff/23 text-14px mt22px">
<div class="flex items-center text-18px"> <div class="flex items-center text-18px">
<img src="@/assets/images/icon-memo.svg" class="w22px h22px mr10px" /> <img src="@/assets/images/icon-memo.svg" class="w22px h22px mr10px" />
memo memo
</div> </div>
<div class="mt18px lh-24px">新年方针:领先时代的变化开创崭新的 未来</div> <div class="mt18px lh-24px">新年方针:领先时代的变化开创崭新的 未来</div>
</div> --> </div> -->
</div> </div>
<div class="main flex-1 rd-32px p30px pb15px pt0px mt62px relative"> <div class="main flex-1 rd-32px p30px pb15px pt0px mt62px relative">
<!-- <Home /> --> <!-- <Home /> -->
<RouterView /> <RouterView />
</div> </div>
</div> </div>
<div <div
class="fixed bottom-4px text-#fff text-12px ml38px" class="fixed bottom-4px text-#fff text-12px ml38px"
style="margin: 0; width: 100%; text-align: center" style="margin: 0; width: 100%; text-align: center"
> >
今日访问人数{{ 今日访问人数{{ store.user.appLoginToDayCount }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;累计访问人数{{
store.user.appLoginToDayCount store.user.appLoginCount
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;累计访问人数{{ store.user.appLoginCount }} }}
</div> </div>
<NModal v-model:show="shorm" :mask-closable="false"> <NModal v-model:show="shorm" :mask-closable="false">
<div class="w700px h430px bg-#fff rd-15px"> <div class="w700px h430px bg-#fff rd-15px">
<div <div
class="py5px px15px" class="py5px px15px"
style=" style="border-bottom: 1px solid #dadada; font-weight: bold; color: #494a63"
border-bottom: 1px solid #dadada; >
font-weight: bold; 大金空调中国相关
color: #494a63; <img
" @click="shorm = false"
> src="@/assets/images/chac@2x.png"
大金空调中国相关 class="w15px float-right mt5px mr5px"
<img />
@click="shorm = false" </div>
src="@/assets/images/chac@2x.png" <div class="flex mt70px text-center">
class="w15px float-right mt5px mr5px" <div class="w-full text-center">
/> <img src="@/assets/images/ewm1@2x.png" class="w200px" />
</div> <div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
<div class="flex mt70px text-center"> 大金空调中国视频号
<div class="w-full text-center"> </div>
<img src="@/assets/images/ewm1@2x.png" class="w200px" /> </div>
<div <div class="w-full">
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto" <img src="@/assets/images/ewm2@2x.png" class="w200px" />
> <div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
大金空调中国视频号 大金空调抖音号
</div> </div>
</div> </div>
<div class="w-full"> </div>
<img src="@/assets/images/ewm2@2x.png" class="w200px" /> </div>
<div </NModal>
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
>
大金空调抖音号
</div>
</div>
</div>
</div>
</NModal>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.page { .page {
font-family: 'PingFang SC'; font-family: 'PingFang SC';
user-select: none; user-select: none;
// background-image: url('@/assets/images/bg.jpg'); // background-image: url('@/assets/images/bg.jpg');
// background-color: #000; // background-color: #000;
background-position: 0 0; background-position: 0 0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
color: #fff; color: #fff;
line-height: 1; line-height: 1;
} }
.nav { .nav {
position: relative; position: relative;
&::before { &::before {
top: -48px; top: -48px;
} }
.activeChildren:hover { .activeChildren:hover {
a, a,
span { span {
text-decoration: underline; text-decoration: underline;
} }
} }
&::after { &::after {
bottom: -49px; bottom: -49px;
transform: rotate(-90deg); transform: rotate(-90deg);
} }
&.active { &.active {
color: #002fa7; color: #002fa7;
background-color: #fff; background-color: #fff;
a { a {
color: #002fa7; color: #002fa7;
} }
&::before, &::before,
&::after { &::after {
opacity: 1; opacity: 1;
} }
} }
&.actives { &.actives {
padding: 0px !important; padding: 0px !important;
color: #002fa7; color: #002fa7;
background-color: rgba(255, 255, 255, 0.3); background-color: rgba(255, 255, 255, 0.3);
a { a {
color: #002fa7; color: #002fa7;
} }
&::before, &::before,
&::after { &::after {
opacity: 1; opacity: 1;
} }
.onActive { .onActive {
background-color: #fff; background-color: #fff;
border-radius: 32px 0 0 32px; border-radius: 32px 0 0 32px;
padding: 24px 16px 24px 36px; padding: 24px 16px 24px 36px;
} }
} }
} }
.main { .main {
background-image: url('@/assets/images/bg-rs-main.svg'); background-image: url('@/assets/images/bg-rs-main.svg');
background-position: 0 0; background-position: 0 0;
background-repeat: repeat-x; background-repeat: repeat-x;
background-size: auto; background-size: auto;
} }
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
scrollbar-width: none; scrollbar-width: none;
} }
</style> </style>