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

View File

@ -176,10 +176,7 @@ export async function externalWithdraw(id: string) {
return http.get('/article/external/withdraw?id=' + id)
}
// news/重要通知-流程列表
export async function getExternalManagerList(params: {
pageNum: any
pageSize: any
}) {
export async function getExternalManagerList(params: { pageNum: any; pageSize: any }) {
return http.get('/article/external/getManagerList', { params })
}
// -------------------------------------列表end
@ -311,10 +308,7 @@ export async function trendsDetail(params: any) {
/**--
* http://127.0.0.1:8811/openApi/supplier/trendsPage?pageNum=1&pageSize=20
*/
export async function trendsPage(params: {
pageNum: number
pageSize: number
}) {
export async function trendsPage(params: { pageNum: number; pageSize: number }) {
return http.get('/supplier/trendsPage', { params })
}
@ -336,10 +330,7 @@ export async function demandDetail(params: any) {
* --
* http://127.0.0.1:8811/openApi/supplier/demandPage?pageNum=1&pageSize=20
*/
export async function demandPage(params: {
pageNum: number
pageSize: number
}) {
export async function demandPage(params: { pageNum: number; pageSize: number }) {
return http.get('/supplier/demandPage', { params })
}
/***
@ -545,10 +536,7 @@ http://127.0.0.1:8811/openApi/common/upload
multipart/form-data
*/
export async function upload(
params: any,
Headers: AxiosRequestConfig<any> | undefined
) {
export async function upload(params: any, Headers: AxiosRequestConfig<any> | undefined) {
return http.post('/common/upload', params, Headers)
}
@ -577,10 +565,7 @@ POST
http://127.0.0.1:8811/openApi/group/add
*
*/
export async function addGroup(
params: getNotice,
Headers: AxiosRequestConfig<any> | undefined
) {
export async function addGroup(params: getNotice, Headers: AxiosRequestConfig<any> | undefined) {
return http.post('/group/add', params, Headers)
}
@ -607,10 +592,7 @@ export interface newPwd {
http://127.0.0.1:8811/openApi/auth/updatePwd
*
*/
export async function updatePwd(
params: newPwd,
Headers: AxiosRequestConfig<any> | undefined
) {
export async function updatePwd(params: newPwd, Headers: AxiosRequestConfig<any> | undefined) {
return http.post('/auth/updatePwd', params, Headers)
}
@ -679,10 +661,7 @@ export interface pupid {
POST
http://127.0.0.1:8811/openApi/inv/add
*/
export async function addPageInv(
params: pupid,
Headers: AxiosRequestConfig<any> | undefined
) {
export async function addPageInv(params: pupid, Headers: AxiosRequestConfig<any> | undefined) {
return http.post('/inv/add', params, Headers)
}
@ -694,10 +673,7 @@ export async function addPageInv(
POST
http://127.0.0.1:8811/openApi/visit/add
*/
export async function addPageVisit(
params: pupid,
Headers: AxiosRequestConfig<any> | undefined
) {
export async function addPageVisit(params: pupid, Headers: AxiosRequestConfig<any> | undefined) {
return http.post('/visit/add', params, Headers)
}
@ -1213,6 +1189,10 @@ export async function cateFileDel(params: any) {
export async function cateFileList(params: any) {
return http.get(`/db/cateFileList`, { params })
}
// 首页最新更新列表
export async function newDataList(params: any) {
return http.get(`/app/newDataList`, { params })
}
/***
*

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_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-41.png" class="item_img b !bottom--20px" />
</div>

View File

@ -1,9 +1,11 @@
<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 { Swiper, SwiperSlide } from 'swiper/vue'
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 { push } = useRouter()
@ -22,6 +24,32 @@ async function getPageList() {
// }
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)
// console.log(listData)
@ -65,6 +93,7 @@ const getFile = async () => {
}
getFile()
fetchNewDataList()
</script>
<template>
<div class="card news relative">

View File

@ -90,11 +90,12 @@ const Menus = ref([
icon: getImg('phone.png'),
icon1: getImg('phone1.png'),
link: '',
path: '/Home/phone'
path: '/Home/phone',
// children: [
// { key: 'inv', name: '' },
// { key: 'visit', name: '访' },
// ]
children: [{ key: 'DataBase', name: '公司内线', params: { id: 267 } }]
}
])
@ -119,8 +120,11 @@ function menuHandler(menu: any, index: number) {
push({ name: menu.key })
return
}
if (menu.key === 'phone' && idx.value === index) {
push(menu.path)
return
}
idx.value = index
console.log(menu.key, 'key')
if (!menu.key) return
// if (menu.key === 'DataBase') {
// if (flag) {
@ -170,31 +174,24 @@ var activeItem = 0
<div class="w300px -mr-1px flex flex-col shrink-0 overflow-auto">
<!-- @dblclick="toggle" -->
<img src="@/assets/images/logo.png" class="w197px h44px mt14px" />
<div class="text-20px text-#fff font-600 mt6px">
大金中国调达本部 HOMEPAGE
</div>
<div class="text-20px text-#fff font-600 mt6px">大金中国调达本部 HOMEPAGE</div>
<div
class="mt34px w270px min-h80px rd-35px b-4px bg-#fff/16 b-4px b-solid b-#fff/23 overflow-hidden relative"
>
<Searchs></Searchs>
</div>
<div class="pt10px pb10px flex-1 max-h-636px">
<!-- max-h-636px -->
<div class="pt10px pb10px flex-1 max-h-836px">
<div
class="nav pl36px pr16px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#fff cursor-pointer hover:underline"
v-for="(m, index) in Menus"
:key="m.key"
:class="
activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''
"
:class="activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''"
@click="() => menuHandler(m, index)"
>
<div :class="activeMenuKey === m.key && 'onActive'">
<img
v-if="activeMenuKey === m.key"
:src="m.icon1"
class="w22px h22px mr16px mt--5px"
/>
<img v-if="activeMenuKey === m.key" :src="m.icon1" class="w22px h22px mr16px mt--5px" />
<img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" />
<span
class="text-22px font-900 leading-22px"
@ -203,21 +200,14 @@ var activeItem = 0
'underline border-b-0px border-b-solid'
"
>
<a v-if="m.link" class="no-underline text-#fff" :href="m.link">
{{ m.name }}</a
>
<a v-if="m.link" class="no-underline text-#fff" :href="m.link"> {{ m.name }}</a>
<span v-else>
<a
v-if="m.key === 'link' || m.key === 'DataBase'"
class="text-#fff"
>
<a 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 class="text-18px italic font-500" v-if="m.other">{{ m.other }}</span>
</span>
</div>
@ -229,19 +219,11 @@ var activeItem = 0
@click.stop="goChild(item)"
@click="activeItem = ind"
>
<a
v-if="item.link"
class="no-underline !text-#fff flex"
:href="item.link"
><span
class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"
></span
>{{ item.name }}</a
<a v-if="item.link" class="no-underline !text-#fff flex" :href="item.link"
><span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"></span>{{ item.name }}</a
>
<span v-else class="flex"
><span
class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"
></span
><span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"></span
>{{ item.name }}</span
>
</div>
@ -249,6 +231,7 @@ var activeItem = 0
</div>
</div>
<div
v-if="false"
class="w270px py14px my20px px24px flex rd-20px bg-#003cb7 hover:underline hover:cursor-pointer"
style="box-shadow: 0 2rpx 14rpx 0 #00000069"
>
@ -256,10 +239,7 @@ var activeItem = 0
class="flex items-center text-18px"
@click="push({ name: 'DataBase', query: { id: 267 } })"
>
<img
src="@/assets/images/dianhhh@2x.png"
class="w22px h22px mr10px"
/>
<img src="@/assets/images/dianhhh@2x.png" class="w22px h22px mr10px" />
公司内线
</div>
</div>
@ -270,29 +250,19 @@ var activeItem = 0
:style="{ '--n-border-radius': '8px' }"
>
<template #trigger> </template>
<div
class="text-14px text-#285FE9 flex items-center hover:underline cursor-pointer"
>
<img
src="@/assets/images/wjqq@2x.png"
class="w14px h18px mr4px object-contain"
/>
<div class="text-14px text-#285FE9 flex items-center hover:underline cursor-pointer">
<img src="@/assets/images/wjqq@2x.png" class="w14px h18px mr4px object-contain" />
<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"
>
<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"
/>
<img src="@/assets/images/icon-book.svg" class="w22px h22px mr10px" />
个人日程
</div>
<!-- <div class="mt18px">9:00-10:00</div>
@ -304,10 +274,7 @@ var activeItem = 0
class="absolute w22px h22px mr10px top--15px right--20px"
/>
</a>
<div
class="mt10px ml-30px opacity-70"
@click="(e) => e.stopPropagation()"
>
<div class="mt10px ml-30px opacity-70" @click="(e) => e.stopPropagation()">
请点击上方链接登录cybouzu
</div>
</div>
@ -330,19 +297,15 @@ var activeItem = 0
class="fixed bottom-4px text-#fff text-12px ml38px"
style="margin: 0; width: 100%; text-align: center"
>
今日访问人数{{
store.user.appLoginToDayCount
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;累计访问人数{{ store.user.appLoginCount }}
今日访问人数{{ store.user.appLoginToDayCount }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;累计访问人数{{
store.user.appLoginCount
}}
</div>
<NModal v-model:show="shorm" :mask-closable="false">
<div class="w700px h430px bg-#fff rd-15px">
<div
class="py5px px15px"
style="
border-bottom: 1px solid #dadada;
font-weight: bold;
color: #494a63;
"
style="border-bottom: 1px solid #dadada; font-weight: bold; color: #494a63"
>
大金空调中国相关
<img
@ -354,17 +317,13 @@ var activeItem = 0
<div class="flex mt70px text-center">
<div class="w-full text-center">
<img src="@/assets/images/ewm1@2x.png" class="w200px" />
<div
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
>
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
大金空调中国视频号
</div>
</div>
<div class="w-full">
<img src="@/assets/images/ewm2@2x.png" class="w200px" />
<div
class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"
>
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto">
大金空调抖音号
</div>
</div>