Compare commits

..

No commits in common. "1f20c6f589b3fcb8edada3fd90a811f68db72645" and "d80d0988d26cb3d0b2e5bad370c161c0bdc03f16" have entirely different histories.

37 changed files with 5899 additions and 6622 deletions

View File

@ -1,11 +0,0 @@
{
"trailingComma": "none",
"semi": false,
"singleQuote": true,
"jsxSingleQuote": true,
"arrowParens": "always",
"printWidth": 100,
"tabWidth": 2,
"quoteProps": "preserve",
"endOfLine": "auto"
}

View File

@ -24,8 +24,7 @@
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"echarts": "^5.4.3", "echarts": "^5.4.3",
"echarts-liquidfill": "^3.1.0", "echarts-liquidfill": "^3.1.0",
"element-plus": "^2.6.2", "element-plus": "^2.3.7",
"lodash-es": "^4.17.21",
"lottie-web": "^5.12.2", "lottie-web": "^5.12.2",
"naive-ui": "^2.34.4", "naive-ui": "^2.34.4",
"pinia": "^2.0.32", "pinia": "^2.0.32",

View File

@ -1,7 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { RouterView } from 'vue-router' import { RouterView } from 'vue-router'
import { useFullscreen, useFavicon, useTitle } from '@vueuse/core' import { useFullscreen, useFavicon, useTitle } from '@vueuse/core'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn'
import FitScreen from '@fit-screen/vue' import FitScreen from '@fit-screen/vue'
import { NMessageProvider } from 'naive-ui' import { NMessageProvider } from 'naive-ui'
import { useUserStore } from '@/stores/modules/user' import { useUserStore } from '@/stores/modules/user'
@ -26,49 +26,55 @@ store.getUser()
const route = useRoute() // const route = useRoute() //
const pageClass = computed(() => { const pageClass = computed(() => {
// console.log(route.name) // console.log(route.name)
// if (navigator.userAgent.match(/iPad|Android Tablet/i)) { // if (navigator.userAgent.match(/iPad|Android Tablet/i)) {
// // // //
// console.log("",navigator.userAgent) // console.log("",navigator.userAgent)
// } else { // } else {
// // // //
// console.log("") // console.log("")
// } // }
// //
if (route.name === 'Entry') { if (route.name === 'Entry') {
return 'bg-#fff' // page-about return 'bg-#fff' // page-about
} else if (route.name === 'DataBase') { } else if (route.name === 'DataBase') {
return 'bg-#fff' return 'bg-#fff'
} else if (route.name === 'ExternalLogin' || route.name === 'Login') { } else if (route.name === 'ExternalLogin' || route.name === 'Login') {
return 'bg-#f3f3f3' // page-about return 'bg-#f3f3f3' // page-about
} }
return 'page' // return 'page' //
}) })
const pageStyle = computed(() => { const pageStyle = computed(() => {
// //
if (route.name === 'Entry') { if (route.name === 'Entry') {
return { 'background-color': '#fff !important' } // page-about return { 'background-color': '#fff !important' } // page-about
} else if (route.name === 'DataBase') { } else if (route.name === 'DataBase') {
return { 'background-color': '#fff !important' } return { 'background-color': '#fff !important' }
} else if (route.name === 'ExternalLogin' || route.name === 'Login') { } else if (route.name === 'ExternalLogin' || route.name === 'Login') {
return { 'background-color': '#f3f3f3 !important' } // page-about return { 'background-color': '#f3f3f3 !important' } // page-about
} }
return { return {
'background-image': `url(${img}) !important`, 'background-image': `url(${img}) !important`,
'background-position': '0 0', 'background-position': '0 0',
'background-repeat': 'no-repeat', 'background-repeat': 'no-repeat',
'background-size': 'cover' 'background-size': 'cover'
} // } //
}) })
const locale = computed(() => zhCn) const locale = computed(() => zhCn)
const scaleChange = ({ widthRatio, heightRatio }: { widthRatio: number; heightRatio: number }) => { const scaleChange = ({
console.log('scaleChange', widthRatio, heightRatio) widthRatio,
heightRatio
}: {
widthRatio: number
heightRatio: number
}) => {
console.log('scaleChange', widthRatio, heightRatio)
} }
const beforeCalculate = (scale) => { const beforeCalculate = (scale) => {
console.log('🚀 ~ scale:', scale) console.log('🚀 ~ scale:', scale)
return false return false
} }
// ref="fitscreenRef" // ref="fitscreenRef"
// :width="screenWidth" // :width="screenWidth"
@ -82,40 +88,40 @@ const beforeCalculate = (scale) => {
</script> </script>
<template> <template>
<NMessageProvider> <NMessageProvider>
<VScaleScreen <VScaleScreen
ref="fitscreenRef" ref="fitscreenRef"
:width="screenWidth" :width="screenWidth"
:height="screenHeight" :height="screenHeight"
mode="fit" mode="fit"
:box-style="pageStyle" :box-style="pageStyle"
> >
<!-- <div :class="pageClass"> --> <!-- <div :class="pageClass"> -->
<n-config-provider :locale="NZhCN" :date-locale="dateZhCN"> <n-config-provider :locale="NZhCN" :date-locale="dateZhCN">
<el-config-provider :locale="locale"> <el-config-provider :locale="locale">
<RouterView /> <RouterView />
</el-config-provider> </el-config-provider>
</n-config-provider> </n-config-provider>
<!-- </div> --> <!-- </div> -->
</VScaleScreen> </VScaleScreen>
</NMessageProvider> </NMessageProvider>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.fit-screen { .fit-screen {
text-rendering: optimizeLegibility !important; text-rendering: optimizeLegibility !important;
} }
.page, .page,
.v-screen-box { .v-screen-box {
// background-image: url('@/assets/images/bg.jpg') !important; // background-image: url('@/assets/images/bg.jpg') !important;
// background-position: 0 0; // background-position: 0 0;
// background-repeat: no-repeat; // background-repeat: no-repeat;
// background-size: cover; // background-size: cover;
} }
.pages { .pages {
background-color: #fff; background-color: #fff;
} }
.pagess { .pagess {
background-color: #f3f3f3; background-color: #f3f3f3;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -1,32 +1,27 @@
<template> <template>
<input <input type="text" placeholder="请输入搜索内容" @keydown.enter="keyDown" v-model="search"
type="text" class="h-full w-full text-#fff text-18px pl30px pr54px placeholder-#fff" />
placeholder="请输入搜索内容" <img src="@/assets/images/icon-search.svg" @click="clickThis" class="w22px h22px absolute right-24px top-50% -translate-y-50%" />
@keydown.enter="keyDown"
v-model="search"
class="h-full w-full text-#fff text-18px pl30px pr54px placeholder-#fff"
/>
<img
src="@/assets/images/icon-search.svg"
@click="clickThis"
class="w22px h22px absolute right-24px top-50% -translate-y-50%"
/>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { searchStore } from '@/stores/modules/search' import { searchStore } from '@/stores/modules/search'
const searchS = searchStore() const searchS = searchStore()
const search = ref('') const search = ref('')
const { push } = useRouter() const { push } = useRouter()
const keyDown = (e) => { const keyDown=(e)=>{
if (e.key === 'Enter' && search.value) { if(e.key ==='Enter'&&search.value)
searchS.setArticle(search.value) {
push({ name: 'Search' }) searchS.search.content = search.value
push({name:'Search'})
} }
} }
const clickThis = () => { const clickThis = ()=>{
if (search.value) { if(search.value)
searchS.setArticle(search.value) {
push({ name: 'Search' }) searchS.search.content = search.value
push({name:'Search'})
} }
} }
</script>
</script>

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,17 @@
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
export const searchStore = defineStore('search', () => { export const searchStore = defineStore('search', () => {
const search = ref({ const search = ref({
content: '', content:''
time: 0 })
})
function setArticle(data: { content: string }){
search.value = data
}
return { search,setArticle }
function setArticle(data: string) { })
search.value.content = data
search.value.time = new Date().getTime()
}
return { search, setArticle }
})

View File

@ -10,80 +10,73 @@ import { cateFileList } from '@/api/daikin/base'
const { day, week } = useDate() const { day, week } = useDate()
const { push } = useRouter() const { push } = useRouter()
const array = ref<any[]>([ const array = ref<any[]>([
{ {
content1: '将扩大的机遇转为成果 更强更大地展翅飞翔', content1: '将扩大的机遇转为成果 更强更大地展翅飞翔',
content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう', content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう',
year: '2023年' year: '2023年'
}, },
{ content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' }, { content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' },
{ {
content1: '以“重大变化”为契机 向新课题发起挑战', content1: '以“重大变化”为契机 向新课题发起挑战',
content2: '', content2: '',
year: '2021年' year: '2021年'
}, },
{ {
content1: '加速推进三个协创 决胜于变化的时代', content1: '加速推进三个协创 决胜于变化的时代',
content2: '', content2: '',
year: '2020年' year: '2020年'
}, },
{ {
content1: '以三个协创为轴心 人人迅速果断行动', content1: '以三个协创为轴心 人人迅速果断行动',
content2: '', content2: '',
year: '2016年' year: '2016年'
}, },
{ {
content1: '突破壁垒 集中优势 不断挑战新课题', content1: '突破壁垒 集中优势 不断挑战新课题',
content2: '', content2: '',
year: '2018年' year: '2018年'
}, },
{ {
content1: '坚持以人为轴心,融合新的力量', content1: '坚持以人为轴心,融合新的力量',
content2: '集团上下齐心协力提升企业价值', content2: '集团上下齐心协力提升企业价值',
year: '2017年' year: '2017年'
}, },
{ content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' }, { content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' },
{ content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' } { content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' }
]) ])
const fileItem = ref<any>({}) const fileItem = ref<any>({})
const fileItemTwo = ref<any>({})
const message = useMessage() const message = useMessage()
const getFile = async () => { const getFile = async () => {
const { rows }: any = await cateFileList({ const { rows }: any = await cateFileList({
cateId: 261, cateId: 261,
pageNum: 1, pageNum: 1,
pageSize: 100 pageSize: 100
}) })
fileItem.value = rows.find((item: any) => item.id == 1693) || {} 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 = (row: any) => { const goFile = () => {
const { isSelect, filePath } = row const { isSelect, filePath } = fileItem.value
if (!isSelect || isSelect === 2) { if (!isSelect || isSelect === 2) {
message.info('没有访问权限!') message.info('没有访问权限!')
return return
} }
if (!filePath) { if (!filePath) {
message.info('暂无文件') message.info('暂无文件')
} }
window.open(filePath) window.open(filePath)
} }
getFile() getFile()
</script> </script>
<template> <template>
<HomeHead class="top"> <HomeHead class="top">
<template #content> <template #content>
<!-- <HomeHeadSearch /> --> <!-- <HomeHeadSearch /> -->
</template> </template>
</HomeHead> </HomeHead>
<!-- <div class="h-full relative flex flex-col"> <!-- <div class="h-full relative flex flex-col">
<div class="font-600 flex items-end mt27px"> <div class="font-600 flex items-end mt27px">
<div class="text-36px">集团方针</div> <div class="text-36px">集团方针</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
@ -103,64 +96,49 @@ getFile()
</div> </div>
</div> </div>
</div> --> </div> -->
<div class="mt30px mr20px flex w100% relative"> <div class="mt30px mr20px flex w100% relative">
<!-- <img src="../../assets/images/fangz.png" class="w100%"/> --> <!-- <img src="../../assets/images/fangz.png" class="w100%"/> -->
<!-- <img src="../../assets/images/fzqiet.png" class="w100%" /> <img src="../../assets/images/fzqiet.png" class="w100%" />
<div <div
class="absolute py10px left-1160px top-270px 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" class="absolute py10px left-1160px top-270px 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"
> >
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" /> <img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
2024年グループ年頭方针 2024年グループ年頭方针
</div> --> </div>
<img src="../../assets/images/2024fz.jpg" class="w100%" /> </div>
<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(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> </template>
<style scoped lang="less"> <style scoped lang="less">
.top { .top {
position: absolute; position: absolute;
right: 30px; right: 30px;
top: -92px; top: -92px;
} }
.g-wrapper { .g-wrapper {
border-radius: 18px; border-radius: 18px;
border: 1px solid #e7ebf5; border: 1px solid #e7ebf5;
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
overflow: hidden; overflow: hidden;
.timeline { .timeline {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #142142; color: #142142;
.one { .one {
position: relative; position: relative;
.year { .year {
left: -132px; left: -132px;
top: -14px; top: -14px;
color: #003cb7; color: #003cb7;
font-size: 26px; font-size: 26px;
font-weight: normal; font-weight: normal;
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
} }
} }
} }
} }
</style> </style>

View File

@ -17,44 +17,44 @@ const newId = ref<string>()
const scale = ref(1) const scale = ref(1)
const imgW = ref('auto') const imgW = ref('auto')
const pageInfo = reactive({ const pageInfo = reactive({
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 10,
type: '1', type: '1',
total: 10 total: 10
}) })
const listData = ref([]) const listData = ref([])
async function setModule(codes: any) { async function setModule(codes: any) {
const moduleCode = codes const moduleCode = codes
await report({ moduleCode }) await report({ moduleCode })
} }
const toDetail = (n: any, item: any) => { const toDetail = (n: any, item: any) => {
// push(`${route.path}/${item.id}`) // push(`${route.path}/${item.id}`)
// if(n.isSelect===1){ // if(n.isSelect===1){
setModule(item) setModule(item)
push(`/external/info/${n.id}`) push(`/external/info/${n.id}`)
// } // }
// else{ // else{
// message.info("") // message.info("")
// } // }
} }
const toList = (nb) => { const toList = (nb) => {
if (nb === 7) { if (nb === 7) {
pages.page.cate = '7' pages.page.cate = '7'
pages.page.title = 'News' pages.page.title = 'News'
} else { } else {
pages.page.cate = '8' pages.page.cate = '8'
pages.page.title = '重要通知' pages.page.title = '重要通知'
} }
replace(`/external/info/${nb === 7 ? 'news' : 'info'}`) replace(`/external/info/${nb === 7 ? 'news' : 'info'}`)
// push({ name: 'DetailInfoList' }) // push({ name: 'DetailInfoList' })
} }
const SideNews = [ const SideNews = [
{ key: 'IntelligenceWithin', name: 'News', cate: 7, type: 0 }, { key: 'IntelligenceWithin', name: 'News', cate: 7, type: 0 },
{ key: 'IntelligenceOutside', name: '重要通知', cate: 8, type: 1 } { key: 'IntelligenceOutside', name: '重要通知', cate: 8, type: 1 }
] ]
// News getArticlePage // News getArticlePage
@ -63,15 +63,16 @@ const newsSoll = ref<HTMLElement | null>(null)
let newLength: number let newLength: number
let newPum = 1 let newPum = 1
async function getArticle(page: any) { async function getArticle(page: any) {
const pasr = { const pasr = {
pageNum: page, pageNum: page,
pageSize: '10', pageSize: '10',
type: '1', type: '1',
cate: '7' cate: '7'
} }
const { rows, total } = await externalList(pasr) const { rows, total } = await externalList(pasr)
newsList.value = rows || [] console.log('🚀 ~ file: Detail.vue:46 ~ rows:', rows)
newLength = total / 10 newsList.value = rows || []
newLength = total / 10
} }
// getArticlePage // getArticlePage
const portantList = ref<any[]>([]) const portantList = ref<any[]>([])
@ -79,379 +80,395 @@ const portant = ref<HTMLElement | null>(null)
let pLenght: number let pLenght: number
let prpum = 1 let prpum = 1
async function getArticleP(page: any) { async function getArticleP(page: any) {
const pasr = { const pasr = {
pageNum: page, pageNum: page,
pageSize: '10', pageSize: '10',
type: '1', type: '1',
cate: '8' cate: '8'
} }
const { rows, total } = await externalList(pasr) const { rows, total } = await externalList(pasr)
portantList.value = rows || [] portantList.value = rows || []
pLenght = total / 10 pLenght = total / 10
} }
const state = ref<any>({}) const state = ref<any>({})
const type = ref('') const type = ref('')
watchEffect(() => { watchEffect(() => {
const { id } = route.params as any const { id } = route.params as any
if (!id) return if (!id) return
newId.value = id as string newId.value = id as string
scale.value = id === '701' ? 2 : ['778', '840', '887'].includes(id) ? 1.5 : 1 scale.value = id === '701' ? 2 : ['778', '840', '887'].includes(id) ? 1.5 : 1
imgW.value = id !== '1241' ? '100%' : 'auto' imgW.value = id !== '1241' ? '100%' : 'auto'
getArticleP(1) getArticleP(1)
getArticle(1) getArticle(1)
getData() getData()
}) })
async function getData() { async function getData() {
const { id } = route.params const { id } = route.params
if (!id) return if (!id) return
if (id == 'news' || id == 'info') { if (id == 'news' || id == 'info') {
const { rows, total } = await externalList({ const { rows, total } = await externalList({
pageNum: pageInfo.currentPage, pageNum: pageInfo.currentPage,
pageSize: pageInfo.pageSize, pageSize: pageInfo.pageSize,
type: pageInfo.type, type: pageInfo.type,
cate: id === 'news' ? '7' : '8' cate: id === 'news' ? '7' : '8'
}) })
type.value = id == 'news' ? 'News' : '重要通知' type.value = id == 'news' ? 'News' : '重要通知'
pageInfo.total = total pageInfo.total = total
listData.value = rows listData.value = rows
return return
} }
listData.value = [] listData.value = []
type.value = '' type.value = ''
const { data } = await externalInfo(id as string) const { data } = await externalInfo(id as string)
data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06' data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
data.content = unescapeHTML(data.content) data.content = unescapeHTML(data.content)
state.value = data state.value = data
console.log(state) console.log(state)
} }
function unescapeHTML(html: string) { function unescapeHTML(html: string) {
const doc = new DOMParser().parseFromString(html, 'text/html') const doc = new DOMParser().parseFromString(html, 'text/html')
return doc.documentElement.textContent return doc.documentElement.textContent
} }
const handleSizeChange = (e) => { const handleSizeChange = (e) => {
pageInfo.pageSize = e pageInfo.pageSize = e
pageInfo.currentPage = 1 pageInfo.currentPage = 1
getData() getData()
} }
const handleCurrentChange = (e) => { const handleCurrentChange = (e) => {
pageInfo.currentPage = e pageInfo.currentPage = e
getData() getData()
} }
</script> </script>
<template> <template>
<div class="page w-1920px h-1080px p30px flex flex-col"> <div class="page w-1920px h-1080px p30px flex flex-col">
<HomeHead class="top"> <HomeHead class="top">
<!-- <template #content> <!-- <template #content>
<HomeHeadSearch /> <HomeHeadSearch />
</template> --> </template> -->
</HomeHead> </HomeHead>
<div style="width: 400px" class="flex items-end absolute"> <div style="width: 400px" class="flex items-end absolute">
<!-- <img src="../images/ͼƬ1.png" alt=""> --> <!-- <img src="../images/ͼƬ1.png" alt=""> -->
<div v-if="false"> <div v-if="false">
<span style="font-size: 20px; margin-top: -50px">大金空调调达本部HOMEPAGE</span> <span style="font-size: 20px; margin-top: -50px"
<el-button >大金空调调达本部HOMEPAGE</span
class="" >
style="font-size: 18px; margin-left: 5px" <el-button
type="primary" class=""
round style="font-size: 18px; margin-left: 5px"
@click="push({ name: 'external' })" type="primary"
> round
<!-- <img src="../images/fanhui.png" alt=""> --> @click="push({ name: 'external' })"
返回</el-button >
> <!-- <img src="../images/fanhui.png" alt=""> -->
</div> 返回</el-button
>
</div>
<div class="w300px -mr-1px flex flex-col shrink-0"> <div class="w300px -mr-1px flex flex-col shrink-0">
<div class="text-20px text-#fff font-600 mt6px">大金中国调达本部 HOMEPAGE</div> <div class="text-20px text-#fff font-600 mt6px">
<!-- @dblclick="toggle" --> 大金中国调达本部 HOMEPAGE
<img src="@/assets/images/logo.png" class="w197px h44px mt14px" /> </div>
</div> <!-- @dblclick="toggle" -->
<!-- class="p-10 bg-[#3870E5] !w-[110px] !w-[48px] rounded-[24px] flex justify-center items-center" --> <img src="@/assets/images/logo.png" class="w197px h44px mt14px" />
<el-button </div>
style="font-size: 18px; margin-left: 5px;background-color;:#3870E5;margin-bottom: 6px;" <!-- class="p-10 bg-[#3870E5] !w-[110px] !w-[48px] rounded-[24px] flex justify-center items-center" -->
type="primary" <el-button
round style="font-size: 18px; margin-left: 5px;background-color;:#3870E5;margin-bottom: 6px;"
@click="push({ name: 'external' })" type="primary"
> round
<img src="../images/fanhui.png" class="w-[27px] h-[20px] mr-2" alt="" /> @click="push({ name: 'external' })"
返回 >
</el-button> <img src="../images/fanhui.png" class="w-[27px] h-[20px] mr-2" alt="" />
</div> 返回
</el-button>
</div>
<!-- <div class="h-full flex ml30px"> <!-- <div class="h-full flex ml30px">
<div class="font-600 flex items-end mt30px"> <div class="font-600 flex items-end mt30px">
<div class="text-36px">详情</div> <div class="text-36px">详情</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
<div class="text-18px">{{ week }}</div> <div class="text-18px">{{ week }}</div>
</div> </div>
</div> --> </div> -->
<div class="main flex-1 rd-32px pt60px mt22px page-wrap"> <div class="main flex-1 rd-32px pt60px mt22px page-wrap">
<div class="absolute text-white top-18px left-30px"> <div class="absolute text-white top-18px left-30px">
<n-breadcrumb separator=">"> <n-breadcrumb separator=">">
<n-breadcrumb-item @click="push({ name: 'external' })"> 外部首页</n-breadcrumb-item> <n-breadcrumb-item @click="push({ name: 'external' })">
<n-breadcrumb-item> {{ type || state.title }}</n-breadcrumb-item> 外部首页</n-breadcrumb-item
</n-breadcrumb> >
</div> <n-breadcrumb-item> {{ type || state.title }}</n-breadcrumb-item>
<!-- <div class="page-wrap h-934px mt24px" style="grid-template-columns: 1fr"> --> </n-breadcrumb>
<div class="page-main ml-28px mb-30px"> </div>
<AppBlock class="h-full"> <!-- <div class="page-wrap h-934px mt24px" style="grid-template-columns: 1fr"> -->
<div <div class="page-main ml-28px mb-30px">
class="q-wrapper relative flex-1 text-#142142 flex flex-col bg-#fff p30px pl80px h-full" <AppBlock class="h-full">
v-if="listData.length" <div
> class="q-wrapper relative flex-1 text-#142142 flex flex-col bg-#fff p30px pl80px h-full"
<img src="../images/beijq.png" class="absolute bottom-0 left-0 right-0 z w-full" /> v-if="listData.length"
<div >
class="mt8px cursor-pointer flex flex-wrap flex-col p15px pl20px text-18px max-w-100%" <img
> src="../images/beijq.png"
<div class="absolute bottom-0 left-0 right-0 z w-full"
v-for="i in listData" />
:key="i" <div
class="w-70% mb-20px flex items-center justify-between flex-1" class="mt8px cursor-pointer flex flex-wrap flex-col p15px pl20px text-18px max-w-100%"
> >
<div <div
class="truncate flex-1 text-#142142 hover:underline" v-for="i in listData"
@click="push(`/external/info/${i.id}`)" :key="i"
> class="w-70% mb-20px flex items-center justify-between flex-1"
<img >
v-if="i.tag === 'New'" <div
src="../images/NEW@2x.png" class="truncate flex-1 text-#142142 hover:underline"
class="h24px mr5px badge-new" @click="push(`/external/info/${i.id}`)"
/> >
<span <img
v-if="i.isTop === 'Y'" v-if="i.tag === 'New'"
class="text-#fff bg-red p5px text-16px rounded-5px mr-5px badge-24" src="../images/NEW@2x.png"
>置顶</span class="h24px mr5px badge-new"
> />
<span class="no-underline" :style="i.isRead === 2 ? 'color:#0058E5' : ''"> <span
{{ i.title }} v-if="i.isTop === 'Y'"
</span> class="text-#fff bg-red p5px text-16px rounded-5px mr-5px badge-24"
</div> >置顶</span
<div class="shrink-0 ml100px w-200px text-#808696"> >
{{ i.createTime }} <span
</div> class="no-underline"
</div> :style="i.isRead === 2 ? 'color:#0058E5' : ''"
</div> >
<div class="absolute bottom-20px left-50% translate-x-[-50%] z-11"> {{ i.title }}
<el-pagination </span>
background </div>
v-model:current-page="pageInfo.currentPage" <div class="shrink-0 ml100px w-200px text-#808696">
v-model:page-size="pageInfo.pageSize" {{ i.createTime }}
layout="prev, pager, next, total,jumper,->" </div>
:total="pageInfo.total" </div>
@size-change="handleSizeChange" </div>
@current-change="handleCurrentChange" <div class="absolute bottom-20px left-50% translate-x-[-50%] z-11">
/> <el-pagination
</div> background
</div> v-model:current-page="pageInfo.currentPage"
<div v-else class="overflow-y-auto h-full"> v-model:page-size="pageInfo.pageSize"
<div class="px46px py40px"> layout="prev, pager, next, total,jumper,->"
<DetailNews :total="pageInfo.total"
:title="state.title" @size-change="handleSizeChange"
:content="state.content" @current-change="handleCurrentChange"
:publishTime="state.publishTime" />
:tag="state.tag" </div>
:tagColor="state.tagColor" </div>
:source="state.source" <div v-else class="overflow-y-auto h-full">
/> <div class="px46px py40px">
</div> <DetailNews
</div> :title="state.title"
</AppBlock> :content="state.content"
</div> :publishTime="state.publishTime"
<div class="flex-col mr-30px"> :tag="state.tag"
<div class="mb-26px" v-for="item in SideNews" :key="item.key"> :tagColor="state.tagColor"
<AppBlock class="h410px"> :source="state.source"
<div class="box h-full"> />
<div class="box-title flex items-center" @click="toList(item.cate)"> </div>
<span class="flex-1">{{ item.name }}</span> </div>
<span></span> </AppBlock>
</div> </div>
<!-- hover:bg-[#2c7af7] --> <div class="flex-col mr-30px">
<div class="box-content overflow-y-auto px22px py-4px"> <div class="mb-26px" v-for="item in SideNews" :key="item.key">
<div <AppBlock class="h410px">
class="line hover:bg-gray-100 hover:text-white hover:cursor-pointer hover:rounded-[10px]" <div class="box h-full">
v-for="i in [newsList, portantList][item.type]" <div
:key="i.id" class="box-title flex items-center"
@click="toDetail(i, 'App_E_News')" @click="toList(item.cate)"
> >
<div class="flex flex-col"> <span class="flex-1">{{ item.name }}</span>
<div class="truncate"> <span></span>
<img </div>
v-if="i.tag === 'New'" <!-- hover:bg-[#2c7af7] -->
src="../images/NEW@2x.png" <div class="box-content overflow-y-auto px22px py-4px">
class="h35px mr5px badge-new !h-20px" <div
/> class="line hover:bg-gray-100 hover:text-white hover:cursor-pointer hover:rounded-[10px]"
<!-- <span v-for="i in [newsList, portantList][item.type]"
:key="i.id"
@click="toDetail(i, 'App_E_News')"
>
<div class="flex flex-col">
<div class="truncate">
<img
v-if="i.tag === 'New'"
src="../images/NEW@2x.png"
class="h35px mr5px badge-new !h-20px"
/>
<!-- <span
v-if="i.tag === '紧急'" v-if="i.tag === '紧急'"
class="text-#fff bg-[#E60E0E] p5px text-14px rounded-5px mr-5px badge-24" class="text-#fff bg-[#E60E0E] p5px text-14px rounded-5px mr-5px badge-24"
/> --> /> -->
<span <span
v-if="i.isTop === 'Y'" v-if="i.isTop === 'Y'"
class="text-#fff bg-red p5px text-14px rounded-5px mr-5px badge-24" class="text-#fff bg-red p5px text-14px rounded-5px mr-5px badge-24"
>置顶</span >置顶</span
> >
<span <span
:style="i.isRead === 2 ? 'color:#0058E5;font-weight:bolb' : ''" :style="
:title="i.title" i.isRead === 2 ? 'color:#0058E5;font-weight:bolb' : ''
>{{ i.title }}</span "
> :title="i.title"
</div> >{{ i.title }}</span
>
</div>
<!-- <div <!-- <div
class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0 text-black" class="icons min-w-110px w110px h20px mt15px absolute right-0px top-0 text-black"
> --> > -->
<div class="min-w-110px w110px text-black mb-8px ml-auto"> <div class="min-w-110px w110px text-black mb-8px ml-auto">
{{ i.createTime?.substring(0, 10) }} {{ i.createTime?.substring(0, 10) }}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</AppBlock> </AppBlock>
</div> </div>
</div> </div>
<!-- </div> --> <!-- </div> -->
</div> </div>
</div> </div>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.back { .back {
position: absolute; position: absolute;
top: 5px; top: 5px;
left: 5px; left: 5px;
color: #fff; color: #fff;
// z-index: 500; // z-index: 500;
// font-weight: bold; // font-weight: bold;
text-align: center; text-align: center;
justify-content: center; justify-content: center;
// display: flex; // display: flex;
font-size: 14px; font-size: 14px;
} }
.top { .top {
right: 30px; right: 30px;
top: -10px; top: -10px;
} }
.page { .page {
width: 100%; width: 100%;
height: 100px; height: 100px;
font-family: 'PingFang SC'; font-family: 'PingFang SC';
user-select: none; user-select: none;
background: 0; background: 0;
// 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;
.page-wrap { .page-wrap {
display: grid; display: grid;
grid-template-columns: 1fr 414px; grid-template-columns: 1fr 414px;
grid-template-rows: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);
grid-column-gap: 30px; grid-column-gap: 30px;
grid-row-gap: 30px; grid-row-gap: 30px;
height: 936px; height: 936px;
.page-main { .page-main {
height: 850px; height: 850px;
// padding-bottom: 20px; // padding-bottom: 20px;
// grid-area: 1 / 1 / 3 / 2; // grid-area: 1 / 1 / 3 / 2;
} }
.page-side { .page-side {
margin-right: 30px; margin-right: 30px;
// height: 100%; // height: 100%;
// grid-area: 1 / 2 / 2 / 3; // grid-area: 1 / 2 / 2 / 3;
&:last-of-type { &:last-of-type {
// height: 300px; // height: 300px;
// grid-area: 2 / 2 / 3 / 3; // grid-area: 2 / 2 / 3 / 3;
} }
} }
} }
} }
.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;
} }
.box { .box {
--title-h: 58px; --title-h: 58px;
border: 0; border: 0;
.box-title { .box-title {
height: var(--title-h); height: var(--title-h);
color: #fff; color: #fff;
background-color: #537deb; background-color: #537deb;
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
padding: 0 24px; padding: 0 24px;
cursor: pointer; cursor: pointer;
} }
.box-content { .box-content {
height: 100%; height: 100%;
max-height: calc(100% - var(--title-h)); max-height: calc(100% - var(--title-h));
} }
} }
.line { .line {
border-bottom: 1px solid #eef3fb; border-bottom: 1px solid #eef3fb;
} }
.badge-24 { .badge-24 {
box-sizing: border-box; box-sizing: border-box;
height: 24px; height: 24px;
display: inline-block; display: inline-block;
line-height: 24px; line-height: 24px;
padding: 0 5px; padding: 0 5px;
} }
.truncate { .truncate {
max-width: 395px; max-width: 395px;
min-width: 100px; min-width: 100px;
overflow: hidden; overflow: hidden;
padding: 4px 0 4px 6px; padding: 4px 0 4px 6px;
line-height: 24px; line-height: 24px;
color: black; color: black;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
::v-deep(.n-breadcrumb-item__link) { ::v-deep(.n-breadcrumb-item__link) {
color: #fff !important; color: #fff !important;
font-size: 18px !important; font-size: 18px !important;
font-size: 16px !important; font-size: 16px !important;
font-weight: 600 !important; font-weight: 600 !important;
&:hover { &:hover {
color: #fff; color: #fff;
} }
} }
::v-deep { ::v-deep {
.el-pagination { .el-pagination {
--el-pagination-border-radius: 8px; --el-pagination-border-radius: 8px;
} }
.n-breadcrumb-item__separator { .n-breadcrumb-item__separator {
color: #fff !important; color: #fff !important;
font-size: 16px !important; font-size: 16px !important;
} }
span > img { span > img {
// width: v-bind(imgW); width: v-bind(imgW);
width: auto; object-fit: contain;
object-fit: contain; }
} p > img {
p > img { // width: 100%;
// width: 100%; // object-fit: contain;
// object-fit: contain; // transform: scale(1.5);
// transform: scale(1.5); // width: v-bind(imgW);
// width: v-bind(imgW); transform: scale(v-bind(scale));
transform: scale(v-bind(scale)); transform-origin: top;
transform-origin: top; }
}
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -1,54 +1,27 @@
<script setup lang="ts"> <script setup lang="ts">
import { getArticlePage, report, cateFileList, newDataList } from '@/api/daikin/base' import { getArticlePage, report, cateFileList } 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 dayjs from 'dayjs' import { NCarousel } from 'naive-ui'
// import { NCarousel } from 'naive-ui'
const route = useRoute() const route = useRoute()
const { push } = useRouter() const { push } = useRouter()
const listData = ref<any[]>([]) const listData = ref<any[]>([])
const curTab = ref(0)
const firstItem = ref<any>('')
const newsData = ref<any>({})
async function getPageList() { async function getPageList() {
// const { code } = report({ moduleCode: 'App_Article' }) const { code } = report({ moduleCode: 'App_Article' })
const { rows } = await getArticlePage({ const { rows } = await getArticlePage({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
position: 'relate' position: 'relate'
} as any) } as any)
// console.log(rows) // console.log(rows)
// for (let index = 0; index < 50; index++) { // for (let index = 0; index < 50; index++) {
listData.value = rows listData.value = rows
// }
console.log(listData.value.length)
}
const fetchNewDataList = async () => { // }
const res = await newDataList({ pageNum: 1, pageSize: 8 }) console.log(listData.value.length)
// const data = groupDatesByWeek(res.rows || [])
const data = res.rows || []
newsData.value = data
firstItem.value = Object.keys(data)[0]
} }
//
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日')
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
}, {})
}
onMounted(getPageList) onMounted(getPageList)
// console.log(listData) // console.log(listData)
@ -64,227 +37,126 @@ onMounted(getPageList)
// } // }
// } // }
const toDetail2 = (n: any) => { const toDetail2 = (n: any) => {
console.log(n) // console.log(n)
if (n.id === 0) return if (n.id === 0) return
if (n.isSelect === 1) { if (n.isSelect === 1) {
if (n.moduleCode === 'App_Database') { push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id)
return push('/DataBase?id=' + n.cateId) } else {
} message.error('没有访问权限')
if (n.moduleCode === 'App_Article') { }
return push('/Home/intelligence/' + n.id)
}
push(`/intelligence/${n.type == 2 ? 'within' : 'outside'}/` + n.id)
} else {
message.error('没有访问权限')
}
}
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) {
const lastSlashIndex = url.lastIndexOf('/')
if (lastSlashIndex !== -1) {
return url.substring(lastSlashIndex + 1)
} else {
return 'Invalid URL'
}
} }
const modules = [Autoplay, Pagination, Navigation, A11y] const modules = [Autoplay, Pagination, Navigation, A11y]
const files = ref<any>({}) const files = ref<any>({})
const cateId = 201 const cateId = 201
const getFile = async () => { const getFile = async () => {
const { rows }: any = await cateFileList({ const { rows }: any = await cateFileList({
// cateId: 201, // cateId: 201,
cateId, cateId,
pageNum: 1, pageNum: 1,
pageSize: 1 pageSize: 1
}) })
files.value = rows?.[0] || {} files.value = rows?.[0] || {}
const t = files.value.createTime const t = files.value.createTime
if (t) { if (t) {
const arr = t.split('-') 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 }
}
} }
getFile() getFile()
fetchNewDataList()
</script> </script>
<template> <template>
<div class="card news relative"> <div class="card news relative">
<div class="news-left absolute z-10 transition-all" v-show="curTab == 1"></div> <div class="flex justify-between items-center">
<div class="news-right absolute z-10 transition-all" v-show="curTab == 0"></div> <div>
<div class="absolute top-0 left-0 right-0 flex items-center z-11"> <div
<div class="card_title cursor-pointer hover:underline"
class="text-black p-20px text-28px w-1/3 transition-all" @click="push({ name: 'Intelligence' })"
:class="[{ 'text-#fff': curTab == 1 }]" >
@click="curTab = 0" 外部情报
> </div>
最近更新 <div class="card_sub-title">责任者调达研究院 研究企画T</div>
</div> </div>
<div class="card_title !pt-10px !pl-30px flex-1 !pb-10px" @click="curTab = 1"> <div
<div class="flex justify-between items-center"> class="flex text-#fff tetx-16px items-end txt-bg px-10px py-8px rounded-10px text-#fff mt-[10px] mr-16px"
<p >
class="text-22px cursor-pointer hover:underline transition-all" <p
:class="[{ 'text-#fff': curTab == 0 }]" class="text-16px text-#fff flex flex-col flex-start"
@click.stop="push({ name: 'Intelligence' })" @click="push({ name: 'DataBase', query: { id: cateId } })"
> >
外部情报 <span
</p> class="flex align-middle items-center cursor-pointer hover:underline mb-4px"
<div >调达本部月报
class="flex text-#fff tetx-16px items-end txt-bg px-8px py-6px rounded-10px text-#fff mr-10px" <img
> class="h-14px pl-4px"
<div src="@/assets/images/yjtt@2x.png"
@click.stop="push({ name: 'DataBase', query: { id: cateId } })" alt=""
class="text-16px text-#fff flex align-middle items-center cursor-pointer hover:underline transition-all" />
> </span>
<div>{{ files.time || `1` }}月月报</div> <span class="text-14px mt2px">
<img class="h-14px pl-4px" src="@/assets/images/yjtt@2x.png" alt="" /> 作成日{{ files.time || `2024年1月` }}
</div> </span>
<!-- <span class="text-14px mt2px"> 作成日{{ files.time || `2024年1月` }} </span> --> </p>
</div> </div>
</div> </div>
<div class="!px-0 !text-12px mt-4px" :class="[{ 'text-#fff': curTab == 0 }]"> <div class="card_content px-20px pt-30px pb-0">
责任者开发调达部 研究企画T <div
</div> v-if="false"
</div> class="news_card w-437px flex items-end gap-12px text-#fff/80 !absolute right--20% top--38% scale-50"
<!-- <div class="card_sub-title">责任者调达研究院 研究企画T</div> --> >
</div> <img
<!-- <div src="@/assets/images/bg-card6-text.svg"
class="flex text-#fff tetx-16px items-end txt-bg px-10px py-8px rounded-10px text-#fff mt-[10px] mr-16px" class="h26px absolute left-16px top-16px animate__animated animate__zoomIn animate__delay-2s animate__slower animate__repeat-2"
> />
<p <div
class="text-16px text-#fff flex flex-col flex-start" class="news_card_item i1 flex-1 w0 h100px p10px pt56px flex flex-col justify-around"
@click="push({ name: 'DataBase', query: { id: cateId } })" >
> <img
<span class="flex align-middle items-center cursor-pointer hover:underline mb-4px" src="@/assets/images/WATCHING@2x.png"
>调达本部月报 class="w41px h47px absolute left-40px top-25px animate__animated animate__infinite animate__heartBeat"
<img class="h-14px pl-4px" src="@/assets/images/yjtt@2x.png" alt="" /> />
</span> <img
<span class="text-14px mt2px"> 作成日{{ files.time || `2024年1月` }} </span> src="@/assets/images/WATCHING2@2x.png"
</p> class="w80px left-10px top-10px"
</div> --> />
<div <!-- <p class="truncate" v-if="listData && Array.isArray(listData) && listData.length > 0" v-for="i in listData.slice(0,2)" :key="i" @click="toDetail2(i)">{{ i.title }}</p> -->
class="card_content px-20px pb-0 mt-0px absolute left-0 right-0 z-100 top-70px" </div>
v-if="curTab == 0" <div
> class="news_card_item i2 flex-1 w0 h120px p10px pt56px flex flex-col justify-around"
<!-- <div class="font-16px !h-310px overflow-y-scroll"> --> >
<!-- <swiper <img
id="swiperList2" src="@/assets/images/ALARM@2x.png"
v-if="listData" class="w61px h63px absolute left-28px top-30px animate__animated animate__infinite animate__fadeIn"
:slides-per-view="4" />
:autoplay="false && { delay: 1000, disableOnInteraction: false }" <img
:speed="500" src="@/assets/images/ALARM2@2x.png"
:space-between="10" class="w70px left-15px top-14px"
:direction="'vertical'" />
:scrollbar="{ draggable: false }" <!-- <p class="truncate" v-if="listData && Array.isArray(listData) && listData.length > 2" v-for="i in listData.slice(2,4)" :key="i" @click="toDetail2(i)">{{ i.title }}</p> -->
:loop="true" </div>
:modules="modules" <div
style="height: 280px" class="news_card_item i3 w140px h160px p10px pt70px flex flex-col justify-around"
> >
<swiper-slide v-for="(i, index) of newsData" :key="index"> --> <img
<div height="310px" class="h-310px overflow-hidden"> src="@/assets/images/WARNING@2x.png"
<!-- <div class="text-black mb-10px" v-for="(item, index) of newsData" :key="index"> --> class="w82px h66px absolute left-30px top-45px animate__animated animate__infinite animate__flipOutY"
<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"> <img
<span class="text-18px mb-10px mt-0px opacity-0">{{ index }}</span> src="@/assets/images//WARNING2@2x.png"
<span class="w100px left-8px top-20px"
class="text-16px text-#4D7EE8 cursor-pointer hover:underline" />
@click="push({ name: 'Latest' })" <!-- <p class="truncate" v-if="listData && Array.isArray(listData) && listData.length > 4" v-for="i in listData.slice(4,7)" :key="i" @click="toDetail2(i)">{{ i.title }}</p> -->
>更多</span </div>
> </div>
</div> <div
<!-- <template v-for="(i, k) in item" :key="k"> --> class="card_title !pl0 !pt0 cursor-pointer hover:underline"
<div class="flex items-baseline flex-1"> @click="push({ name: 'News' })"
<div >
@click="toDetail2(i)" 最新News
class="text-#142142 truncate text-18px font-bold w-95% no-underline text-#142142 cursor-pointer hover:underline h-16px leading-16px" </div>
> <div class="font-16px !h-230px overflow-y-auto mt10px">
<!-- <img class="h-20px" src="@/assets/images/NEW.gif" alt="" /> --> <!-- <n-carousel direction="vertical" dot-placement="right" style="width: 100%; height: 100px" autoplay :interval="1200"
<span>{{ i.title || '' }}</span>
</div>
<div class="text-#808696 ml20px text-14px flex items-center justify-between mb-10px">
<span class="whitespace-nowrap block w-100px"> {{ i.departName }}</span>
<!-- <span class="w-[36%]"> {{ i.userName }}</span> -->
<span class="whitespace-nowrap block w86px"> {{ i.createTime?.slice(0, 10) }}</span>
</div>
</div>
<!-- </template> -->
</div>
</div>
<!-- </swiper-slide>
</swiper> -->
<!-- </div> -->
</div>
<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"
>
<img
src="@/assets/images/bg-card6-text.svg"
class="h26px absolute left-16px top-16px animate__animated animate__zoomIn animate__delay-2s animate__slower animate__repeat-2"
/>
<div class="news_card_item i1 flex-1 w0 h100px p10px pt56px flex flex-col justify-around">
<img
src="@/assets/images/WATCHING@2x.png"
class="w41px h47px absolute left-40px top-25px animate__animated animate__infinite animate__heartBeat"
/>
<img src="@/assets/images/WATCHING2@2x.png" class="w80px left-10px top-10px" />
<!-- <p class="truncate" v-if="listData && Array.isArray(listData) && listData.length > 0" v-for="i in listData.slice(0,2)" :key="i" @click="toDetail2(i)">{{ i.title }}</p> -->
</div>
<div class="news_card_item i2 flex-1 w0 h120px p10px pt56px flex flex-col justify-around">
<img
src="@/assets/images/ALARM@2x.png"
class="w61px h63px absolute left-28px top-30px animate__animated animate__infinite animate__fadeIn"
/>
<img src="@/assets/images/ALARM2@2x.png" class="w70px left-15px top-14px" />
<!-- <p class="truncate" v-if="listData && Array.isArray(listData) && listData.length > 2" v-for="i in listData.slice(2,4)" :key="i" @click="toDetail2(i)">{{ i.title }}</p> -->
</div>
<div class="news_card_item i3 w140px h160px p10px pt70px flex flex-col justify-around">
<img
src="@/assets/images/WARNING@2x.png"
class="w82px h66px absolute left-30px top-45px animate__animated animate__infinite animate__flipOutY"
/>
<img src="@/assets/images//WARNING2@2x.png" class="w100px left-8px top-20px" />
<!-- <p class="truncate" v-if="listData && Array.isArray(listData) && listData.length > 4" v-for="i in listData.slice(4,7)" :key="i" @click="toDetail2(i)">{{ i.title }}</p> -->
</div>
</div>
<div
class="card_title !pl0 !pt0 cursor-pointer hover:underline"
@click="push({ name: 'News' })"
>
最新News
</div>
<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> :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" <div class="mt-10px" v-if="listData && Array.isArray(listData) && listData.length > 0" v-for="i in listData"
:key="i"> :key="i">
@ -295,206 +167,192 @@ fetchNewDataList()
</div> </div>
</n-carousel> --> </n-carousel> -->
<swiper <swiper
id="swiperList2" id="swiperList2"
v-if="listData" v-if="listData"
:slides-per-view="4" :slides-per-view="4"
:autoplay="{ delay: 1000, disableOnInteraction: false }" :autoplay="{ delay: 1000, disableOnInteraction: false }"
:speed="500" :speed="500"
:space-between="10" :space-between="10"
:direction="'vertical'" :direction="'vertical'"
:scrollbar="{ draggable: false }" :scrollbar="{ draggable: false }"
:loop="true" :loop="true"
:modules="modules" :modules="modules"
style="height: 230px" style="height: 230px"
> >
<swiper-slide v-for="(i, index) in listData" :key="index"> <swiper-slide v-for="(i, index) in listData" :key="index">
<div class="mt-10px"> <div class="mt-10px">
<div class="text-#142142 truncate text-16px"> <div class="text-#142142 truncate text-16px">
<a <a
@click="toDetail2(i)" @click="toDetail2(i)"
:href="i.url" :href="i.url"
class="no-underline text-#142142 cursor-pointer hover:underline" class="no-underline text-#142142 cursor-pointer hover:underline"
>{{ i.title }}</a >{{ i.title }}</a
> >
</div> </div>
<div class="text-#808696 mt-8px text-14px"> <div class="text-#808696 mt-8px text-14px">
<span>来源于: {{ i.source }}</span> &nbsp;&nbsp;&nbsp;<span>{{ <span>来源于: {{ i.source }}</span> &nbsp;&nbsp;&nbsp;<span>{{
i.publishTime i.publishTime
}}</span> }}</span>
</div> </div>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style lang="less" scoped> <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 { ::-webkit-scrollbar {
width: 1px; width: 1px;
} }
.txt-bg { .txt-bg {
background: linear-gradient(to right, #4aa7d9, #60d1c7); background: linear-gradient(to right, #4aa7d9, #60d1c7);
} }
.card { .card {
// width: 480px; // width: 480px;
// height: 428px; // height: 428px;
width: 480px; width: 480px;
height: 395px; height: 395px;
border-radius: 18px; border-radius: 18px;
overflow: hidden; overflow: hidden;
background-color: #fff; background-color: #fff;
// border: 1px solid #e7ebf5; // border: 1px solid #e7ebf5;
box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32);
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
&::after { &::after {
content: ' '; content: ' ';
background-image: url('@/assets/images/bg-card.svg'); background-image: url('@/assets/images/bg-card.svg');
pointer-events: none; pointer-events: none;
display: block; display: block;
width: 100%; width: 100%;
height: 127px; height: 127px;
background-size: cover; background-size: cover;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
} }
.card_title { .card_title {
flex-shrink: 0; flex-shrink: 0;
font-size: 28px; font-size: 28px;
color: #142142; color: #142142;
padding: 20px; padding: 20px;
padding-right: 8px; padding-right: 8px;
padding-bottom: 0; padding-bottom: 0;
} }
.card_sub-title { .card_sub-title {
color: rgba(128, 134, 150, 0.8); color: rgba(128, 134, 150, 0.8);
font-size: 16px; font-size: 16px;
padding: 0 20px; padding: 0 20px;
padding-bottom: 0; padding-bottom: 0;
margin-top: 10px; margin-top: 10px;
} }
} }
.topics { .topics {
.item { .item {
border-radius: 8px; border-radius: 8px;
width: 210px; width: 210px;
height: 155px; height: 155px;
box-shadow: inset 1.4px 1.4px 0px 0px rgba(255, 255, 255, 0.004); box-shadow: inset 1.4px 1.4px 0px 0px rgba(255, 255, 255, 0.004);
overflow: hidden; overflow: hidden;
background-image: url('@/assets/images/bg-card4.svg'); background-image: url('@/assets/images/bg-card4.svg');
background-position: -2px -2px; background-position: -2px -2px;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 215px 165px; background-size: 215px 165px;
position: relative; position: relative;
.item_title { .item_title {
padding-left: 16px; padding-left: 16px;
padding-top: 22px; padding-top: 22px;
color: #002fa7; color: #002fa7;
position: relative; position: relative;
// z-index: 9; // z-index: 9;
} }
.item_sub-title { .item_sub-title {
color: rgba(128, 134, 150, 0.8); color: rgba(128, 134, 150, 0.8);
font-size: 12px; font-size: 12px;
font-weight: normal; font-weight: normal;
padding: 0 16px; padding: 0 16px;
padding-right: 8px; padding-right: 8px;
padding-bottom: 0; padding-bottom: 0;
margin-top: 10px; margin-top: 10px;
z-index: 9; z-index: 9;
} }
.item_img { .item_img {
position: absolute; position: absolute;
bottom: -10px; bottom: -10px;
right: 0; right: 0;
// z-index: 5; // z-index: 5;
transition: transform 0.3s; transition: transform 0.3s;
&:hover { &:hover {
transform: scale(1.2); transform: scale(1.2);
} }
} }
} }
} }
.news { .news {
.card_content { .card_content {
// padding: 20px; // padding: 20px;
// padding-top: 0; // padding-top: 0;
} }
.news_card { .news_card {
// width: 442px; // width: 442px;
height: 180px; height: 180px;
padding: 16px; padding: 16px;
font-size: 14px; font-size: 14px;
// background-image: url('./images/bg-card6.png'); // background-image: url('./images/bg-card6.png');
background-repeat: no-repeat; background-repeat: no-repeat;
// background-position: 0 0; // background-position: 0 0;
// background-size: cover; // background-size: cover;
background-size: 100% 100%; background-size: 100% 100%;
// border: 0px solid; // border: 0px solid;
// // padding: 0; // // padding: 0;
// border-width: 4px; // border-width: 4px;
// border-image-outset: 4px; // border-image-outset: 4px;
// // box-sizing: content-box; // // box-sizing: content-box;
// border-image-source: url('@/assets/images/bg-card6.svg'); // border-image-source: url('@/assets/images/bg-card6.svg');
// border-image-slice: 4 4 4 4; // border-image-slice: 4 4 4 4;
// border-image-repeat: round repeat; // border-image-repeat: round repeat;
position: relative; position: relative;
} }
.news_card_item { .news_card_item {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
position: relative; position: relative;
border-radius: 10px; border-radius: 10px;
background-position: 0 4px; background-position: 0 4px;
&.i1 { &.i1 {
background-image: url('@/assets/images/bg-card6-11.svg'); background-image: url('@/assets/images/bg-card6-11.svg');
} }
&.i2 { &.i2 {
background-image: url('@/assets/images/bg-card6-21.svg'); background-image: url('@/assets/images/bg-card6-21.svg');
} }
&.i3 { &.i3 {
background-image: url('@/assets/images/bg-card6-31.svg'); background-image: url('@/assets/images/bg-card6-31.svg');
background-position: 0 10px; background-position: 0 10px;
} }
} }
} }
</style> </style>

View File

@ -15,37 +15,33 @@ const store = useUserStore()
const { push } = useRouter() const { push } = useRouter()
const route = useRoute() const route = useRoute()
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(store.user.roleCode) const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(
const Navs = [ store.user.roleCode
{ name: '集团*部门方针' }, )
{ name: '年度活动日程表' }, const Navs = [{ name: '集团*部门方针' }, { name: '年度活动日程表' }, { name: '其他链接' }, { name: '紧急联络' }, { name: 'CN/JP' }]
{ name: '其他链接' },
{ name: '紧急联络' },
{ name: 'CN/JP' }
]
const Content = [ const Content = [
{ key: '1-1', component: () => <CSRContent /> }, { key: '1-1', component: () => <CSRContent /> },
{ key: '1-2', component: () => <CSRContent22 /> }, { key: '1-2', component: () => <CSRContent22/> },
{ key: '1-3', component: () => <CSRContent23 /> }, { key: '1-3', component: () => <CSRContent23 /> },
// { key: '1-4', component: () => <CSRContent2 items={Content3} /> }, // { key: '1-4', component: () => <CSRContent2 items={Content3} /> },
{ key: '1-4', component: () => <CSRContent2 /> } { key: '1-4', component: () => <CSRContent2 /> },
] ]
const activeNav = ref(route.query.key || '1-4') const activeNav = ref(route.query.key || '1-4')
const activeContent = computed(() => { const activeContent = computed(() => {
const nav = unref(activeNav) const nav = unref(activeNav)
const curContent = Content.find((i) => nav.includes(i.key)) const curContent = Content.find((i) => nav.includes(i.key))
console.log(curContent, 1111) console.log(curContent,1111)
return curContent?.component || null return curContent?.component || null
}) })
const shomks = () => { const shomks = () => {
// push('csr/modifyCsr2') // push('csr/modifyCsr2')
push({ name: 'modifyCsrCarbon' }) push({ name: 'modifyCsrCarbon' })
} }
watch(activeNav, (newVal) => { watch(activeNav, (newVal) => {
push({ path: '/Home/csr', replace: true, query: { key: newVal } }) push({ path: '/Home/csr',replace:true, query: { key: newVal } })
}) })
</script> </script>
@ -58,18 +54,14 @@ watch(activeNav, (newVal) => {
<div class="h-full relative flex flex-col"> <div class="h-full relative flex flex-col">
<div class="flex flex-end ml10px mt27px"> <div class="flex flex-end ml10px mt27px">
<div class="flex-1"></div> <div class="flex-1"></div>
<el-button <el-button class="absolute right-5 top-[-8px]" v-if="userCode && activeNav === '1-2'" type="primary" @click="shomks"
class="absolute right-5 top-[-8px]" >管理</el-button
v-if="userCode && activeNav === '1-2'" >
type="primary"
@click="shomks"
>管理</el-button
>
<!-- <div class="px16px py8px cursor-pointer text-20px" v-for="nav in Navs" :key="nav.name">{{ nav.name }}</div> --> <!-- <div class="px16px py8px cursor-pointer text-20px" v-for="nav in Navs" :key="nav.name">{{ nav.name }}</div> -->
</div> </div>
<div class="flex-1 mt30px text-#142142 flex gap-30px h-825px"> <div class="flex-1 mt30px text-#142142 flex gap-30px h-825px">
<AppBlock class="shrink-0 h-full w241px box !b-0"> <AppBlock class="shrink-0 h-full w241px box !b-0">
<div class="overflow-y-auto h-full"> <div class="overflow-y-auto h-full ">
<CSRSide v-model:activeNav="activeNav" /> <CSRSide v-model:activeNav="activeNav" />
</div> </div>
</AppBlock> </AppBlock>

View File

@ -1,15 +1,15 @@
<script setup lang="ts"> <script setup lang="ts">
// import {message} from '@/utils/message' // import {message} from '@/utils/message'
import { import {
fetchCsrSupplier, fetchCsrSupplier,
fetchCsrSupplierList, fetchCsrSupplierList,
fetchCsrSupplierTopList, fetchCsrSupplierTopList,
fetchCsrSupplierTaskInfo fetchCsrSupplierTaskInfo
} from '@/api/daikin/base' } from '@/api/daikin/base'
const query = ref<any>({ const query = ref<any>({
year: '', year: '',
supplierName: '' supplierName: ''
}) })
const year = new Date().getFullYear() const year = new Date().getFullYear()
const month = new Date().getMonth() const month = new Date().getMonth()
@ -21,75 +21,96 @@ const nowIndexMonth = calendar.indexOf(calendarShow)
const updateTime = ref('') const updateTime = ref('')
const handleChange = () => { const handleChange = () => {
getCsrSupplier() getCsrSupplier()
getCsrSupplierList() getCsrSupplierList()
} }
const isDateDisabled = (date: any) => { const isDateDisabled = (date: any) => {
return date > new Date() return date > new Date()
} }
const csrSupplier = ref<any>([]) const csrSupplier = ref<any>([])
const csrSupplierObj = ref<any>({}) const csrSupplierObj = ref<any>({})
const months = ['04', '05', '06', '07', '08', '09', '10', '11', '12', '01', '02', '03'] const months = [
'04',
'05',
'06',
'07',
'08',
'09',
'10',
'11',
'12',
'01',
'02',
'03'
]
const loading = ref(false) const loading = ref(false)
const getCsrSupplier = () => { const getCsrSupplier = () => {
loading.value = true loading.value = true
months.forEach((item: any) => { months.forEach((item: any) => {
csrSupplierObj.value[item] = { month: item } csrSupplierObj.value[item] = { month: item }
}) })
const req = { ...query.value } const req = { ...query.value }
fetchCsrSupplier(req).then(({ data = {} }) => { fetchCsrSupplier(req).then(({ data = {} }) => {
const resData = Object.keys(data) || [] const resData = Object.keys(data) || []
try { try {
csrSupplier.value = resData.length csrSupplier.value = resData.length
? resData.map((key) => { ? resData.map((key) => {
const obj = data[key] || {} const obj = data[key] || {}
const month = String(key).split('-')?.[1] || '' const month = String(key).split('-')?.[1] || ''
Object.assign(csrSupplierObj.value[month], obj) Object.assign(csrSupplierObj.value[month], obj)
return { return {
key, key,
month, month,
data: obj data: obj
} }
}) })
: [] : []
} catch (error) {} } catch (error) {}
console.log('🚀 ~ file: CSRContent23.vue:50 ~ csrSupplierObj:', csrSupplierObj) console.log(
if (!csrSupplier.value.length) { '🚀 ~ file: CSRContent23.vue:50 ~ csrSupplierObj:',
// message.warning('') csrSupplierObj
csrSupplierObj.value = {} )
} if (!csrSupplier.value.length) {
}) // message.warning('')
setTimeout(() => { csrSupplierObj.value = {}
loading.value = false }
}, 300) })
setTimeout(() => {
loading.value = false
}, 300)
} }
const csrSupplierList = ref<any>([]) const csrSupplierList = ref<any>([])
const selMonth = ref('') const selMonth = ref('')
const getCsrSupplierList = (index?: any) => { const getCsrSupplierList = (index?: any) => {
const month = index || index === 0 ? query.value.year + '-' + months[index] : '' const month =
csrSupplierList.value = [] index || index === 0 ? query.value.year + '-' + months[index] : ''
selMonth.value = '' csrSupplierList.value = []
const req = { pageNum: 1, pageSize: 10, ...query.value, month } selMonth.value = ''
req.supplierName const req = { pageNum: 1, pageSize: 10, ...query.value, month }
? fetchCsrSupplierList(req).then((res: any) => { req.supplierName
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0) ? fetchCsrSupplierList(req).then((res: any) => {
}) csrSupplierList.value = (res.rows || []).filter(
: fetchCsrSupplierTopList(req).then((res: any) => { (item: any) => item.submitunCount > 0
csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0) )
}) })
selMonth.value = month ? +months[index] + '月' : '' : fetchCsrSupplierTopList(req).then((res: any) => {
csrSupplierList.value = (res.rows || []).filter(
(item: any) => item.submitunCount > 0
)
})
selMonth.value = month ? +months[index] + '月' : ''
} }
const getCsrSupplierTaskInfo = () => { const getCsrSupplierTaskInfo = () => {
fetchCsrSupplierTaskInfo().then((res) => { fetchCsrSupplierTaskInfo().then((res) => {
updateTime.value = res.data?.updateTime updateTime.value = res.data?.updateTime
}) })
} }
const handleMonth = (index: number) => { const handleMonth = (index: number) => {
getCsrSupplierList(index) getCsrSupplierList(index)
} }
getCsrSupplier() getCsrSupplier()
@ -98,329 +119,375 @@ getCsrSupplierTaskInfo()
</script> </script>
<template> <template>
<div class="flex w-full rounded-18px"> <div class="flex w-full rounded-18px">
<!-- <AppBlock> --> <!-- <AppBlock> -->
<!-- <img src="./images/goudongxi2.png" class="w-full h-full" /> --> <!-- <img src="./images/goudongxi2.png" class="w-full h-full" /> -->
<div <div
class="relative overflow-hidden w-full bg-#f4f4f4 flex flex-wrap justify-between h-full rd-25px" class="relative overflow-hidden w-full bg-#f4f4f4 flex flex-wrap justify-between h-full rd-25px"
> >
<div class="cards"> <div class="cards">
<div class="cards_title">供方月度碳排放数据提交情况</div> <div class="cards_title">供方月度碳排放数据提交情况</div>
<div class="!text-18px right-20 pt30px text-#4E7EE8"> <div class="!text-18px right-20 pt30px text-#4E7EE8">
<a <a
href="https://procurement.daikin.net.cn/mingdao/portal/app/7abea528-f7b4-4437-84bb-6b6b169bad3d" href="https://procurement.daikin.net.cn/mingdao/portal/app/7abea528-f7b4-4437-84bb-6b6b169bad3d"
class="no-underline text-#4E7EE8" class="no-underline text-#4E7EE8"
><img src="./images/yuny@2x.png" class="w25px mr5px mt--4px" /><span>明道云</span></a ><img src="./images/yuny@2x.png" class="w25px mr5px mt--4px" /><span
> >明道云</span
</div> ></a
<div class="flex w-full h-80px p20px items-center mt10px"> >
<div> </div>
<el-date-picker <div class="flex w-full h-80px p20px items-center mt10px">
popper-class="dete-picker" <div>
v-model="query.year" <el-date-picker
type="year" v-model="query.year"
@change="handleChange" type="year"
placeholder="" @change="handleChange"
:disabled-date="isDateDisabled" placeholder=""
:clearable="false" :disabled-date="isDateDisabled"
value-format="YYYY" :clearable="false"
/> value-format="YYYY"
</div> />
<el-input </div>
v-model.trim="query.supplierName" <el-input
class="w-50 m-2" v-model.trim="query.supplierName"
placeholder="供方名" class="w-50 m-2"
prefix-icon="Search" placeholder="供方名"
width="150px" prefix-icon="Search"
/> width="150px"
<el-button type="primary" @click="handleChange"></el-button> />
</div> <el-button type="primary" @click="handleChange"></el-button>
<div class="w-full h-730px p20px" v-loading="loading"> </div>
<el-row :gutter="10" v-if="false"> <div class="w-full h-730px p20px" v-loading="loading">
<el-col :span="8" <el-row :gutter="10" v-if="false">
><div class="times"> <el-col :span="8"
<div class="text-#fff text-18px font-bold absolute left-40% top-18px"> ><div class="times">
<span class="text-30px">1</span> <div
</div> class="text-#fff text-18px font-bold absolute left-40% top-18px"
<div >
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%" <span class="text-30px">1</span>
> </div>
已提交45 <div
</div> class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
<div >
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%" 已提交45
> </div>
未提交100 <div
</div> class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
</div></el-col >
> 未提交100
<el-col :span="8" </div>
><div class="time"> </div></el-col
<div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"> >
<span class="text-60px">2</span> <el-col :span="8"
</div> ><div class="time">
</div></el-col <div
> class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
<el-col :span="8" >
><div class="time"> <span class="text-60px">2</span>
<div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"> </div>
<span class="text-60px">3</span> </div></el-col
</div> >
</div></el-col <el-col :span="8"
> ><div class="time">
</el-row> <div
<el-row :gutter="10"> class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
<el-col :span="8" v-for="(it, i) in months" :key="i"> >
<div <span class="text-60px">3</span>
v-show="!loading" </div>
:class="i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'" </div></el-col
@click="handleMonth(i)" >
> </el-row>
<div <el-row :gutter="10">
v-if="i > nowIndexMonth || query.year != jpMonth" <el-col :span="8" v-for="(it, i) in months" :key="i">
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%" <div
> v-show="!loading"
<span class="text-60px">{{ +it }}</span :class="
> i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'
</div> "
<template @click="handleMonth(i)"
v-if="i <= nowIndexMonth && (query.year == jpMonth || !!csrSupplierObj[it])" >
> <div
<div class="text-#fff text-18px font-bold absolute left-40% top-24px"> v-if="i > nowIndexMonth || query.year != jpMonth"
<span class="text-24px">{{ +it }}</span class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
> >
</div> <span class="text-60px">{{ +it }}</span
<div >
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl" </div>
> <template
已提交{{ csrSupplierObj[it]?.submitedCount || 0 }} v-if="
</div> i <= nowIndexMonth &&
<div (query.year == jpMonth || !!csrSupplierObj[it])
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl" "
> >
未提交{{ csrSupplierObj[it]?.submitunCount || 0 }} <div
</div> class="text-#fff text-18px font-bold absolute left-40% top-24px"
</template> >
</div> <span class="text-24px">{{ +it }}</span
</el-col> >
<el-col :span="8" v-if="false" </div>
><div class="time"> <div
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
<span class="text-60px">5</span> >
</div> 已提交{{ csrSupplierObj[it]?.submitedCount || 0 }}
<template v-if="false"> </div>
<div <div
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15% rounded-xl" class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
> >
已提交45 未提交{{ csrSupplierObj[it]?.submitunCount || 0 }}
</div> </div>
<div </template>
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15% rounded-xl" </div>
> </el-col>
未提交100 <el-col :span="8" v-if="false"
</div> ><div class="time">
</template> <div
</div></el-col class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
> >
<el-col :span="8" v-if="false" <span class="text-60px">5</span>
><div class="time"> </div>
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> <template v-if="false">
<span class="text-60px">6</span> <div
</div> class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15% rounded-xl"
</div></el-col >
> 已提交45
</el-row> </div>
<el-row :gutter="10" v-if="false"> <div
<el-col :span="8" class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15% rounded-xl"
><div class="time"> >
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> 未提交100
<span class="text-60px">7</span> </div>
</div> </template>
</div></el-col </div></el-col
> >
<el-col :span="8" <el-col :span="8" v-if="false"
><div class="time"> ><div class="time">
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> <div
<span class="text-60px">8</span> class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
</div> >
</div></el-col <span class="text-60px">6</span>
> </div>
<el-col :span="8" </div></el-col
><div class="times"> >
<!-- <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"><span class="text-60px">9</span></div> --> </el-row>
<div class="text-#fff text-18px font-bold absolute left-40% top-24px"> <el-row :gutter="10" v-if="false">
<span class="text-24px">9</span> <el-col :span="8"
</div> ><div class="time">
<div <div
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl" class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
> >
已提交45 <span class="text-60px">7</span>
</div> </div>
<div </div></el-col
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl" >
> <el-col :span="8"
未提交100 ><div class="time">
</div> <div
</div></el-col class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
> >
</el-row> <span class="text-60px">8</span>
<el-row :gutter="10" v-if="false"> </div>
<el-col :span="8" </div></el-col
><div class="time"> >
<div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"> <el-col :span="8"
<span class="text-60px">10</span> ><div class="times">
</div> <!-- <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"><span class="text-60px">9</span></div> -->
</div></el-col <div
> class="text-#fff text-18px font-bold absolute left-40% top-24px"
<el-col :span="8" >
><div class="time"> <span class="text-24px">9</span>
<div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"> </div>
<span class="text-60px">11</span> <div
</div> class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
</div></el-col >
> 已提交45
<el-col :span="8" </div>
><div class="time"> <div
<div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"> class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
<span class="text-60px">12</span> >
</div> 未提交100
</div></el-col </div>
> </div></el-col
</el-row> >
<el-row :gutter="10" v-if="false"> </el-row>
<el-col :span="8" <el-row :gutter="10" v-if="false">
><div class="time"> <el-col :span="8"
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> ><div class="time">
<span class="text-60px">1</span> <div
</div> class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"
<template v-if="false"> >
<div <span class="text-60px">10</span>
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%" </div>
> </div></el-col
已提交45 >
</div> <el-col :span="8"
<div ><div class="time">
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%" <div
> class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"
未提交100 >
</div> <span class="text-60px">11</span>
</template> </div>
</div></el-col </div></el-col
> >
<el-col :span="8" <el-col :span="8"
><div class="time"> ><div class="time">
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> <div
<span class="text-60px">2</span> class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"
</div> >
</div></el-col <span class="text-60px">12</span>
> </div>
<el-col :span="8" </div></el-col
><div class="time"> >
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"> </el-row>
<span class="text-60px">3</span> <el-row :gutter="10" v-if="false">
</div> <el-col :span="8"
</div></el-col ><div class="time">
> <div
</el-row> class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
</div> >
</div> <span class="text-60px">1</span>
<div class="cards"> </div>
<div class="cards_title relative">未提交供应商明细({{ query.year }}{{ selMonth }})</div> <template v-if="false">
<div class="absolute top-24px !text-18px right-20px pt30px text-#4E7EE8"> <div
<span class="text-#ababab">更新时间{{ updateTime }}</span> class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
</div> >
<div ref="msgScoll" class="px20px w-full h800px cent_box overflow-y-auto mt-12px"> 已提交45
<div </div>
v-if="csrSupplierList?.length" <div
class="text-18px text-#808696 bg-#F4F8FF items-center flex py10px rd-5px mt10px" class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
v-for="(i, key) in csrSupplierList" >
:key="key" 未提交100
> </div>
<div class="truncate2" @click=""> </template>
<span class="text-#fff bg-#407DF1 px8px rounded-1/2 mr-5px inlineFlex">{{ </div></el-col
++key >
}}</span> <el-col :span="8"
<span>{{ i.supplierName }} </span> ><div class="time">
</div> <div
<div class="min-w130px max-w130px text-#000">{{ i.submitunCount }}次未提交</div> class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
<!-- <div class="min-w150px max-w150px text-#000">{{++key}}月未提交</div> --> >
<span class="absolute right-10px top-18px"> <span class="text-60px">2</span>
<!-- 暂不开发 12-03 --> </div>
<!-- <el-button>提醒</el-button> --> </div></el-col
</span> >
</div> <el-col :span="8"
<div v-else class="py10px rd-5px mt100px"> ><div class="time">
<el-empty description="该月份下供应商全部提交" :image-size="300" /> <div
</div> class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
</div> >
</div> <span class="text-60px">3</span>
</div> </div>
</div></el-col
>
</el-row>
</div>
</div>
<div class="cards">
<div class="cards_title relative">
未提交供应商明细({{ query.year }}{{ selMonth }})
</div>
<div
class="absolute top-24px !text-18px right-20px pt30px text-#4E7EE8"
>
<span class="text-#ababab">更新时间{{ updateTime }}</span>
</div>
<div
ref="msgScoll"
class="px20px w-full h800px cent_box overflow-y-auto mt-12px"
>
<div
v-if="csrSupplierList?.length"
class="text-18px text-#808696 bg-#F4F8FF items-center flex py10px rd-5px mt10px"
v-for="(i, key) in csrSupplierList"
:key="key"
>
<div class="truncate2" @click="">
<span
class="text-#fff bg-#407DF1 px8px rounded-1/2 mr-5px inlineFlex"
>{{ ++key }}</span
>
<span>{{ i.supplierName }} </span>
</div>
<div class="min-w130px max-w130px text-#000">
{{ i.submitunCount }}次未提交
</div>
<!-- <div class="min-w150px max-w150px text-#000">{{++key}}月未提交</div> -->
<span class="absolute right-10px top-18px">
<!-- 暂不开发 12-03 -->
<!-- <el-button>提醒</el-button> -->
</span>
</div>
<div v-else class="py10px rd-5px mt100px">
<el-empty description="该月份下供应商全部提交" :image-size="300" />
</div>
</div>
</div>
</div>
<!-- </AppBlock> --> <!-- </AppBlock> -->
</div> </div>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.cards { .cards {
width: 49%; width: 49%;
height: 100%; height: 100%;
border-radius: 18px; border-radius: 18px;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32);
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: space-between; justify-content: space-between;
} }
.time { .time {
width: 175px; width: 175px;
height: 175px; height: 175px;
background: url('@/assets/images/A2@2x.png'); background: url('@/assets/images/A2@2x.png');
background-size: cover; background-size: cover;
} }
.times { .times {
width: 175px; width: 175px;
height: 175px; height: 175px;
background: url('@/assets/images/A1@2x.png'); background: url('@/assets/images/A1@2x.png');
background-size: cover; background-size: cover;
} }
.cards_title { .cards_title {
flex-shrink: 0; flex-shrink: 0;
font-size: 26px; font-size: 26px;
color: #142142; color: #142142;
padding: 20px; padding: 20px;
margin-left: 20px; margin-left: 20px;
font-weight: bold; font-weight: bold;
padding-bottom: 0; padding-bottom: 0;
&::before { &::before {
content: ' '; content: ' ';
display: block; display: block;
width: 8px; width: 8px;
height: 30px; height: 30px;
background-color: #003ab5; background-color: #003ab5;
position: absolute; position: absolute;
left: 0; left: 0;
} }
} }
.truncate2 { .truncate2 {
max-width: 360px; max-width: 360px;
min-width: 360px; min-width: 360px;
overflow: hidden; overflow: hidden;
padding: 5px 10px; padding: 5px 10px;
line-height: 30px; line-height: 30px;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: #142142; color: #142142;
cursor: pointer; cursor: pointer;
a { a {
text-decoration: none; text-decoration: none;
} }
} }
:deep { :deep {
.el-empty__description > p { .el-empty__description > p {
font-size: 28px !important; font-size: 28px !important;
} }
} }
</style> </style>

View File

@ -15,336 +15,343 @@ let idx = ref(0)
const onClic = ref(false) const onClic = ref(false)
const titles = ref() const titles = ref()
function menuHandler(menu: any, index: number) { function menuHandler(menu: any, index: number) {
console.log(menu, index) console.log(menu, index)
activeMenuKey.value = menu.id activeMenuKey.value = menu.id
titles.value = menu.name titles.value = menu.name
idx.value = index idx.value = index
activeItem.value = menu.id activeItem.value = menu.id
if (menu.childList && menu.childList.length > 0) { if (menu.childList && menu.childList.length > 0) {
activeItem.value = menu.childList[0].id activeItem.value = menu.childList[0].id
} }
if (database.database.id == activeItem.value && onClic.value) { if (database.database.id == activeItem.value && onClic.value) {
onClic.value = false onClic.value = false
} else { } else {
onClic.value = !!menu.childList?.length onClic.value = !!menu.childList?.length
// onClic.value = !onClic.value // onClic.value = !onClic.value
} }
database.database.id = activeItem.value database.database.id = activeItem.value
goListPage() goListPage()
} }
function goChild(menu: any) { function goChild(menu: any) {
activeItem.value = menu.id activeItem.value = menu.id
console.log('🚀 ~ menu:', menu.id, menu.name) console.log('🚀 ~ menu:', menu.id, menu.name)
database.database.id = menu.id database.database.id = menu.id
goListPage() goListPage()
} }
function goListPage() { function goListPage() {
const { path } = route const { path } = route
if (path === '/DataBase/review') push('/DataBase') if (path === '/DataBase/review') push('/DataBase')
} }
var activeItem = ref<any>(0) var activeItem = ref<any>(0)
const tableData = ref() const tableData = ref()
async function getTree() { async function getTree() {
const { data = [] } = await treeDbList({}) const { data = [] } = await treeDbList({})
tableData.value = data tableData.value = data
if (data && data[0]) { if (data && data[0]) {
// console.log(data[0]) // console.log(data[0])
titles.value = data[0].name titles.value = data[0].name
activeMenuKey.value = data[0].id activeMenuKey.value = data[0].id
// if(data[0].childList&&data[0].childList.length>0){ // if(data[0].childList&&data[0].childList.length>0){
// activeItem.value = data[0].childList[0].id // activeItem.value = data[0].childList[0].id
// activeMenuKey.value = data[0].childList[0].id // activeMenuKey.value = data[0].childList[0].id
// } // }
} }
const { id } = route.query const { id } = route.query
if (id) { if (id) {
activeItem.value = +id activeItem.value = +id
// const index = data.findIndex((i: any) => i.id == id) // const index = data.findIndex((i: any) => i.id == id)
// if (index > -1) { // if (index > -1) {
// const item = data[index] // const item = data[index]
// if (item) { // if (item) {
// // menuHandler(item, index) // // menuHandler(item, index)
// // onClic.value = true // // onClic.value = true
// // titles.value = item.name // // titles.value = item.name
// // activeMenuKey.value = item.id // // activeMenuKey.value = item.id
// // database.database.id = item.id // // database.database.id = item.id
// } // }
// } // }
} }
if (activeItem.value) { if (activeItem.value) {
const { topLevelItem, targetItem } = findItemById(data, activeItem.value) const { topLevelItem, targetItem } = findItemById(data, activeItem.value)
console.log('🚀 ~ topLevelItem, targetItem:', topLevelItem, targetItem) console.log('🚀 ~ topLevelItem, targetItem:', topLevelItem, targetItem)
if (topLevelItem && targetItem) { if (topLevelItem && targetItem) {
const index = data.findIndex((i: any) => i.id === topLevelItem.id) const index = data.findIndex((i: any) => i.id === topLevelItem.id)
nextTick(() => { nextTick(() => {
// onClic.value = true // onClic.value = true
menuHandler(topLevelItem, index === -1 ? 0 : index) menuHandler(topLevelItem, index === -1 ? 0 : index)
goChild(targetItem) goChild(targetItem)
}) })
} else { } else {
const index = data.findIndex((i: any) => i.id == id) const index = data.findIndex((i: any) => i.id == id)
if (index > -1) { if (index > -1) {
const item = data[index] const item = data[index]
if (item) { if (item) {
menuHandler(item, index) menuHandler(item, index)
} }
} }
} }
} else { } else {
database.database.id = data[0].id database.database.id = data[0].id
} }
} }
getTree() getTree()
function findItemById(items: any, targetId: any, topLevelItem: any = null): any { function findItemById(
for (let i = 0; i < items.length; i++) { items: any,
const item = items[i] targetId: any,
if (item.id === targetId) { topLevelItem: any = null
return { topLevelItem: topLevelItem || item, targetItem: item } ): any {
} else if (item.childList?.length > 0) { for (let i = 0; i < items.length; i++) {
const result = findItemById(item.childList, targetId, topLevelItem || item) const item = items[i]
if (result.targetItem) { if (item.id === targetId) {
return result return { topLevelItem: topLevelItem || item, targetItem: item }
} } else if (item.childList?.length > 0) {
} const result = findItemById(
} item.childList,
return { topLevelItem: null, targetItem: null } targetId,
topLevelItem || item
)
if (result.targetItem) {
return result
}
}
}
return { topLevelItem: null, targetItem: null }
} }
</script> </script>
<template> <template>
<div class="page w-1920px h-1080px flex"> <div class="page w-1920px h-1080px flex">
<div class="w350px -mr-1px flex flex-col shrink-0 overflow-auto"> <div class="w350px -mr-1px flex flex-col shrink-0 overflow-auto">
<div class="p30px bg-#000"> <div class="p30px bg-#000">
<!-- @dblclick="toggle" --> <!-- @dblclick="toggle" -->
<img src="@/assets/images/logo@2x.png" class="w197px h44px mt14px" /> <img src="@/assets/images/logo@2x.png" class="w197px h44px mt14px" />
</div> </div>
<div class="pt30px pb24px flex-1 pl20px bg-#fff"> <div class="pt30px pb24px flex-1 pl20px bg-#fff">
<div <div
class="nav px50px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#000 cursor-pointer" class="nav px50px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#000 cursor-pointer"
v-for="(m, index) in tableData" v-for="(m, index) in tableData"
:key="m.id" :key="m.id"
:class="activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''" :class="
@click="() => menuHandler(m, index)" activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''
> "
<div :class="activeMenuKey === m.id && 'onActive'" class="flex relative"> @click="() => menuHandler(m, index)"
<!-- @click="!!m.childList?.length ? (onClic = !onClic) : ''" --> >
<!-- <img v-if="activeMenuKey === m.id" :src="m.icon1" class="w22px h22px mr16px mt--5px" /> <div
:class="activeMenuKey === m.id && 'onActive'"
class="flex relative"
>
<!-- @click="!!m.childList?.length ? (onClic = !onClic) : ''" -->
<!-- <img v-if="activeMenuKey === m.id" :src="m.icon1" class="w22px h22px mr16px mt--5px" />
<img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" /> --> <img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" /> -->
<!-- lujinli --> <!-- lujinli -->
<!-- <span class="text-17px font-900 relative min-w195px block"> --> <!-- <span class="text-17px font-900 relative min-w195px block"> -->
<span class="text-18px font-900 relative min-w195px block"> <span class="text-18px font-900 relative min-w195px block">
<span class="truncate"> {{ m.name }} </span> <span class="truncate"> {{ m.name }} </span>
<span class="text-#000000 absolute right--30px top--5px" <span class="text-#000000 absolute right--30px top--5px"
><el-icon size="26"> ><el-icon size="26">
<CaretTop v-if="activeMenuKey === m.id && onClic" class="text-#4977FC" /> <CaretTop
<CaretBottom v-else /> </el-icon v-if="activeMenuKey === m.id && onClic"
></span> class="text-#4977FC"
<img />
v-if="m.isSelFlag == 1" <CaretBottom v-else /> </el-icon
src="@/assets/images/NEW.gif" ></span>
class="!h-20px !w-auto absolute left-[-46px] top-[50%] translate-y-[-50%]" <img
alt="" v-if="m.isSelFlag == 1"
/> src="@/assets/images/NEW.gif"
</span> class="!h-20px !w-auto absolute left-[-46px] top-[50%] translate-y-[-50%]"
</div> alt=""
/>
</span>
</div>
<div <div
v-if="m.childList && idx == index" v-if="m.childList && idx == index"
class="pl40px" class="pl40px"
v-show="idx === index && onClic ? true : false" v-show="idx === index && onClic ? true : false"
> >
<div <div
class="my30px pl10px text-#000 activeChildren" class="my30px pl10px text-#000 activeChildren"
v-for="(item, ind) in m.childList" v-for="(item, ind) in m.childList"
:key="item.id" :key="item.id"
@click.stop="goChild(item)" @click.stop="goChild(item)"
@click="activeItem = item.id" @click="activeItem = item.id"
> >
<!-- <el-tooltip :content="item.name" placement="top-start" effect="light"> --> <!-- <el-tooltip :content="item.name" placement="top-start" effect="light"> -->
<div class="relative"> <n-popover trigger="hover" placement="top-start">
<n-popover trigger="hover" placement="top-start"> <template #trigger>
<template #trigger> <span
<span class="text-18px flex child font-900 truncate"
class="text-18px flex child font-900 truncate" :class="activeItem === item.id ? 'text-#002fa7' : ''"
:class="activeItem === item.id ? 'text-#002fa7' : ''" >{{ item.name }}</span
>{{ item.name }}</span >
> </template>
</template> <div class="text-18px leading-40px">
<div class="text-18px leading-40px"> {{ item.name }}
{{ item.name }} </div>
</div> </n-popover>
</n-popover> <!-- </el-tooltip> -->
<img
@click="activeItem = item.id"
v-if="item.isSelFlag === 1 && !item.childList?.length"
src="@/assets/images/NEW.gif"
class="!h-20px !w-auto mr-1 absolute left-[-46px] top-[50%] translate-y-[-50%]"
alt=""
/>
</div>
<!-- </el-tooltip> -->
<div v-if="item.childList && idx == index" class="pl10px"> <div v-if="item.childList && idx == index" class="pl10px">
<div <div
class="my30px pl10px text-#000" class="my30px pl10px text-#000"
v-for="(ite, ind) in item.childList" v-for="(ite, ind) in item.childList"
:key="item.id" :key="item.id"
@click.stop="goChild(ite)" @click.stop="goChild(ite)"
@click="activeItem = ite.id" @click="activeItem = ite.id"
> >
<div class="relative"> <div class="relative">
<n-popover trigger="hover" placement="top-start"> <n-popover trigger="hover" placement="top-start">
<template #trigger> <template #trigger>
<span <span
class="text-18px flex childs font-900 truncate" class="text-18px flex childs font-900 truncate"
:class="activeItem === ite.id ? 'text-#002fa7' : ''" :class="activeItem === ite.id ? 'text-#002fa7' : ''"
>{{ ite.name }}</span >{{ ite.name }}</span
> >
</template> </template>
<div class="text-18px leading-40px"> <div class="text-18px leading-40px">
{{ ite.name }} {{ ite.name }}
</div> </div>
</n-popover> </n-popover>
<img <img
@click="activeItem = ite.id" @click="activeItem = ite.id"
v-if="ite.isSelFlag === 1 && !ite.childList?.length" v-if="ite.isSelFlag === 1 && !ite.childList?.length"
src="@/assets/images/NEW.gif" src="@/assets/images/NEW.gif"
class="!h-20px !w-auto mr-1 absolute left-[-46px] top-[50%] translate-y-[-50%]" class="!h-20px !w-auto mr-1 absolute left-[-46px] top-[50%] translate-y-[-50%]"
alt="" alt=""
/> />
</div> </div>
<div v-if="ite.childList && idx == index" class="pl10px"> <div v-if="ite.childList && idx == index" class="pl10px">
<div <div
class="my20px py-10px pl10px text-#000 relative" class="my20px py-10px pl10px text-#000 relative"
v-for="(it, ind) in ite.childList" v-for="(it, ind) in ite.childList"
:key="item.id" :key="item.id"
@click.stop="goChild(it)" @click.stop="goChild(it)"
@click="activeItem = it.id" @click="activeItem = it.id"
> >
<n-popover trigger="hover" placement="top-start"> <n-popover trigger="hover" placement="top-start">
<template #trigger> <template #trigger>
<span <span
class="text-18px flex childs font-900 truncate" class="text-18px flex childs font-900 truncate"
:class="activeItem === it.id ? 'text-#002fa7' : ''" :class="activeItem === it.id ? 'text-#002fa7' : ''"
>{{ it.name }}</span >{{ it.name }}</span
> >
</template> </template>
<div class="text-18px leading-40px"> <div class="text-18px leading-40px">
{{ it.name }} {{ it.name }}
</div> </div>
</n-popover> </n-popover>
<img <img
@click="activeItem = it.id" @click="activeItem = it.id"
v-if="it.isSelFlag == 1" v-if="it.isSelFlag == 1"
src="@/assets/images/NEW.gif" src="@/assets/images/NEW.gif"
class="!h-20px !w-auto mr-1 absolute left-[-36px] top-[50%] translate-y-[-50%]" class="!h-20px !w-auto mr-1 absolute left-[-36px] top-[50%] translate-y-[-50%]"
alt="" alt=""
/> />
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="main flex-1 pb15px pt0px relative"> <div class="main flex-1 pb15px pt0px relative">
<!-- <Home /> --> <!-- <Home /> -->
<RouterView :cateId="activeItem" :title="titles" /> <RouterView :cateId="activeItem" :title="titles" />
</div> </div>
</div> </div>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.truncate { .truncate {
display: block; display: block;
max-width: 226px; max-width: 226px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.page { .page {
font-family: 'PingFang SC'; font-family: 'PingFang SC';
user-select: none; user-select: none;
background-image: none; background-image: none;
background-color: #cacaca; background-color: #cacaca;
background-position: 0 0; background-position: 0 0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
// color: #3b3b3b; // color: #3b3b3b;
color: #000; color: #000;
line-height: 1; line-height: 1;
} }
.nav { .nav {
&::before { &::before {
top: -48px; top: -48px;
} }
.child:hover { .child:hover {
text-decoration: underline; text-decoration: underline;
} }
.childs:hover { .childs:hover {
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: #e6ecff; background-color: #e6ecff;
a { a {
color: #002fa7; color: #002fa7;
} }
&::before, &::before,
&::after { &::after {
opacity: 1; opacity: 1;
} }
} }
&.actives { &.actives {
padding: 0px !important; padding: 0px !important;
color: #4977fc; color: #4977fc;
background-color: #f5f8ff; background-color: #f5f8ff;
a { a {
color: #002fa7; color: #002fa7;
} }
&::before, &::before,
&::after { &::after {
opacity: 1; opacity: 1;
} }
.onActive { .onActive {
background-color: #e6ecff; background-color: #e6ecff;
border-radius: 32px 0 0 32px; border-radius: 32px 0 0 32px;
padding: 24px 36px 24px 50px; padding: 24px 36px 24px 50px;
} }
} }
} }
.main { .main {
width: 100%; width: 100%;
height: 95%; height: 95%;
background-color: #4877fb; background-color: #4877fb;
margin-left: 30px; margin-left: 30px;
} }
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
scrollbar-width: none; scrollbar-width: none;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -5,13 +5,19 @@ import { formatDate } from '@/utils/format'
const currentDate = new Date() const currentDate = new Date()
const currentDates = new Date() const currentDates = new Date()
const value1 = ref<[Date, Date]>([currentDate.setMonth(currentDate.getMonth()), new Date()]) const value1 = ref<[Date, Date]>([
const value2 = ref<[Date, Date]>([currentDates.setMonth(currentDates.getMonth()), new Date()]) currentDate.setMonth(currentDate.getMonth()),
new Date()
])
const value2 = ref<[Date, Date]>([
currentDates.setMonth(currentDates.getMonth()),
new Date()
])
const states = reactive<any>({ const states = reactive<any>({
startTime: formatDate(value1.value[0]).substring(0, 10), startTime: formatDate(value1.value[0]).substring(0, 10),
endTime: formatDate(value1.value[1]).substring(0, 10) endTime: formatDate(value1.value[1]).substring(0, 10)
// timeType:2, // timeType:2,
}) })
// export function Chart1() { // export function Chart1() {
@ -80,126 +86,126 @@ const states = reactive<any>({
// } // }
export function Chart1(xAxisData: any = [], color = []) { export function Chart1(xAxisData: any = [], color = []) {
const option = { const option = {
width: '100%', width: '100%',
// height: '450px', // 设置图表高度为 400 像素 // height: '450px', // 设置图表高度为 400 像素
grid: { grid: {
left: '10', left: '10',
top: 90, top: 90,
right: '10', right: '10',
bottom: '10', bottom: '10',
containLabel: true containLabel: true
}, },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
xAxis: { xAxis: {
type: 'category', type: 'category',
data: xAxisData data: xAxisData
}, },
yAxis: [ yAxis: [
{ {
type: 'value' type: 'value'
} }
], ],
series: [ series: [
{ {
data: [], data: [],
color: function (params: any) { color: function (params: any) {
return color[params.dataIndex] || '#8F97F8' return color[params.dataIndex] || '#8F97F8'
}, },
type: 'bar' type: 'bar'
} }
] ]
} }
return { ...option } return { ...option }
} }
export function pieEchart(arr: any = [], colorList: any = {}) { export function pieEchart(arr: any = [], colorList: any = {}) {
console.log('🚀 ~ colorList:', colorList) console.log('🚀 ~ colorList:', colorList)
const color: any = [] const color: any = []
const data = arr.map((item: any) => { const data = arr.map((item: any) => {
color.push(colorList[item.moduleCode]) color.push(colorList[item.moduleCode])
console.log('🚀 ~ item.moduleCode:', item.moduleCode) console.log('🚀 ~ item.moduleCode:', item.moduleCode)
return { return {
name: item.moduleName, name: item.moduleName,
value: item.visitCount, value: item.visitCount,
_code: item.moduleCode _code: item.moduleCode
} }
}) })
return { return {
// color, // color,
title: { title: {
text: '各模块登录占比', text: '各模块登录占比',
left: 'center', left: 'center',
textStyle: { textStyle: {
fontSize: 30 fontSize: 30
}, },
top: 20 top: 20
}, },
grid: { grid: {
left: '0', left: '0',
top: 0, top: 0,
right: '0', right: '0',
bottom: '2%', bottom: '2%',
containLabel: true containLabel: true
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
textStyle: { textStyle: {
fontSize: 24 fontSize: 24
}, },
formatter: function (params: any) { formatter: function (params: any) {
// const title = `<p>${params.seriesName}</p>` // const title = `<p>${params.seriesName}</p>`
const colorDot = const colorDot =
'<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:' + '<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:' +
params.color + params.color +
'"></span>' '"></span>'
return colorDot + params.name + ': ' + params.percent + '%' return colorDot + params.name + ': ' + params.percent + '%'
} }
}, },
legend: { legend: {
// orient: 'vertical', // orient: 'vertical',
// left: 'left' // left: 'left'
// type: 'warp', // type: 'warp',
bottom: '3%', bottom: '3%',
// left: '30%', // left: '30%',
width: '78%', width: '78%',
textStyle: { textStyle: {
fontSize: 24, fontSize: 24,
borderRadius: 0 borderRadius: 0
}, },
itemWidth: 24, itemWidth: 24,
itemHeight: 24 itemHeight: 24
}, },
series: [ series: [
{ {
name: '', name: '',
type: 'pie', type: 'pie',
radius: '60%', radius: '60%',
data: data, data: data,
label: { label: {
// show: false, // show: false,
position: 'inside', position: 'inside',
// formatter: '{b}-{c}%', // formatter: '{b}-{c}%',
formatter: function (params: any) { formatter: function (params: any) {
return params.percent < 10 return params.percent < 10
? params.percent + '%' ? params.percent + '%'
: params.name + ' ' + params.percent + '%' : params.name + ' ' + params.percent + '%'
}, },
fontSize: 20, fontSize: 20,
color: '#fff' color: '#fff'
}, },
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
} }
} }
} }
] ]
} }
} }
// data:{ // data:{
// '科室':['科室一','科室二','科室三'], // '科室':['科室一','科室二','科室三'],
@ -207,183 +213,151 @@ export function pieEchart(arr: any = [], colorList: any = {}) {
// '平均活跃度(人员平均访问次数)':['科室一平均活跃度','科室二平均活跃度','科室三平均活跃度'], // '平均活跃度(人员平均访问次数)':['科室一平均活跃度','科室二平均活跃度','科室三平均活跃度'],
// } // }
export function barEchart({ deptName = [], visitCount = [], avgCount = [] }) { export function barEchart({ deptName = [], visitCount = [], avgCount = [] }) {
return { return {
// width: '100%', // width: '100%',
title: { title: {
text: '调达本部各科室HP登录情况(内部足迹)', text: '调达本部各科室HP登录情况(内部足迹)',
left: 'center', left: 'center',
textStyle: { textStyle: {
fontSize: 30 fontSize: 30
}, },
top: 10 top: 10
}, },
grid: { grid: {
left: '4%', left: '4%',
top: '10%', top: '10%',
right: '4%', right: '4%',
bottom: '10%', bottom: '10%',
containLabel: true containLabel: true
}, },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
// axisPointer: { // axisPointer: {
// type: 'cross', // type: 'cross',
// crossStyle: { // crossStyle: {
// color: '#999' // color: '#999'
// } // }
// } // }
}, },
legend: { legend: {
data: [ data: [
{ {
name: 'HP访问次数', name: 'HP访问次数',
itemStyle: { itemStyle: {
// color: '#f8cbad', // color: '#f8cbad',
borderWidth: 0 borderWidth: 0
}, },
textStyle: { textStyle: {
fontSize: 18 fontSize: 18
} }
}, },
{ {
name: '平均活跃度(人员平均访问次数)', name: '平均活跃度(人员平均访问次数)',
itemStyle: { itemStyle: {
// color: '#acc1fb', // color: '#acc1fb',
borderWidth: 0 borderWidth: 0
}, },
textStyle: { textStyle: {
fontSize: 18 fontSize: 18
} }
} }
], ],
// data: ['HP访问次数', '平均活跃度(人员平均访问次数)'], // data: ['HP访问次数', '平均活跃度(人员平均访问次数)'],
bottom: '0px' bottom: '0px'
}, },
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], // data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data: deptName, data: deptName,
axisPointer: { axisPointer: {
type: 'shadow' type: 'shadow'
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
rotate: 45, rotate: 45,
fontSize: 18 fontSize: 18
} }
} }
], ],
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: 'HP访问次数', name: 'HP访问次数',
// min: 0, // min: 0,
// max: 250, // max: 250,
// interval: 50, // interval: 50,
axisLabel: { axisLabel: {
formatter: '{value}' formatter: '{value}'
}, },
nameTextStyle: { nameTextStyle: {
fontSize: 18 fontSize: 18
}, },
nameRotate: 90, nameRotate: 90,
nameGap: '60', nameGap: '60',
nameLocation: 'middle' nameLocation: 'middle'
}, },
{ {
type: 'value', type: 'value',
name: '平均活跃度(人员平均访问次数)', name: '平均活跃度(人员平均访问次数)',
// min: 0, // min: 0,
// max: 25, // max: 25,
// interval: 5, // interval: 5,
axisLabel: { axisLabel: {
formatter: '{value}' formatter: '{value}'
}, },
splitLine: { splitLine: {
show: false show: false
}, },
nameTextStyle: { nameTextStyle: {
fontSize: 18 fontSize: 18
}, },
nameRotate: 90, nameRotate: 90,
nameGap: '46', nameGap: '46',
nameLocation: 'middle' nameLocation: 'middle'
// axisLine: { // axisLine: {
// lineStyle: { // lineStyle: {
// color: '#f7c455' // color: '#f7c455'
// } // }
// } // }
} }
], ],
series: [ series: [
{ {
name: 'HP访问次数', name: 'HP访问次数',
type: 'bar', type: 'bar',
tooltip: { tooltip: {
valueFormatter: function (value) { valueFormatter: function (value) {
return value + '' return value + ''
} }
}, },
// data: [ // data: [
// 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3 // 2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3
// ] // ]
data: visitCount data: visitCount
// color: '#5b9bd5' // color: '#5b9bd5'
}, },
{ {
name: '平均活跃度(人员平均访问次数)', name: '平均活跃度(人员平均访问次数)',
type: 'line', type: 'line',
yAxisIndex: 1, yAxisIndex: 1,
tooltip: { tooltip: {
valueFormatter: function (value) { valueFormatter: function (value) {
return value + '' return value + ''
} }
}, },
// data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] // data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
data: avgCount, data: avgCount,
smooth: true, smooth: true,
color: '#ed7d31' color: '#ed7d31'
} }
] ]
// emphasis: { // emphasis: {
// itemStyle: { // itemStyle: {
// shadowBlur: 10, // shadowBlur: 10,
// shadowOffsetX: 0, // shadowOffsetX: 0,
// shadowColor: 'rgba(0, 0, 0, 0.5)' // shadowColor: 'rgba(0, 0, 0, 0.5)'
// } // }
// } // }
} }
}
export function barEchartModuleList(data = []) {
const option = {
title: {
text: '模块更新统计',
left: 'center',
textStyle: {
fontSize: 30
},
top: 10
},
xAxis: {
type: 'category',
data: data.map((item) => item.moduleName)
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
tooltip: {
trigger: 'axis'
},
series: [
{
data: data.map((item) => item.updateCount),
// data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar'
}
]
}
return option
} }

View File

@ -4,56 +4,60 @@ import AppBlock from '@/components/AppBlock.vue'
import AppNewsBox from '@/components/AppNewsBox.vue' import AppNewsBox from '@/components/AppNewsBox.vue'
import Layout from './components/Layout.vue' import Layout from './components/Layout.vue'
import DetailNews from './DetailNews.vue' import DetailNews from './DetailNews.vue'
import { getArticleDetail, getArticlePage, getManagerDetail, report } from '@/api/daikin/base' import {
getArticleDetail,
getArticlePage,
getManagerDetail
} from '@/api/daikin/base'
import { message } from '@/utils/message' import { message } from '@/utils/message'
const { push } = useRouter() const { push } = useRouter()
const route = useRoute() const route = useRoute()
const SideNews = [ const SideNews = [
{ key: 'IntelligenceOutside', name: '社外情报' }, { key: 'IntelligenceOutside', name: '社外情报' },
{ key: 'IntelligenceWithin', name: '社内情报' } { key: 'IntelligenceWithin', name: '社内情报' }
] ]
const state = ref<any>({}) const state = ref<any>({})
async function getData() { async function getData() {
const { id, flag } = route.params const { id, flag } = route.params
console.log(typeof flag) console.log(typeof flag)
if (!id) return if (!id) return
if (flag === 'true') { if (flag === 'true') {
// & // &
const { data } = await getManagerDetail(id as string) const { data } = await getManagerDetail(id as string)
data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06' data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
data.content = unescapeHTML(data.content) data.content = unescapeHTML(data.content)
state.value = data state.value = data
} else { } else {
const { data } = await getArticleDetail(id as string) const { data } = await getArticleDetail(id as string)
data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06' data.tagColor = data.tag === '紧急' ? '#e60e0e' : '#2cba06'
data.content = unescapeHTML(data.content) data.content = unescapeHTML(data.content)
state.value = data state.value = data
} }
} }
function unescapeHTML(html: string) { function unescapeHTML(html: string) {
const doc = new DOMParser().parseFromString(html, 'text/html') const doc = new DOMParser().parseFromString(html, 'text/html')
return doc.documentElement.textContent return doc.documentElement.textContent
} }
async function getDatas(id: string) { async function getDatas(id: string) {
if (!id) return if (!id) return
const { data } = await getArticleDetail(id as string) const { data } = await getArticleDetail(id as string)
data.content = unescapeHTML(data.content) data.content = unescapeHTML(data.content)
state.value = data state.value = data
} }
async function toDetail2(n: { id: any }) { async function toDetail2(n: { id: any }) {
console.log(route, route.path, n.id) console.log(route, route.path, n.id)
if (n.id === 0) return if (n.id === 0) return
if (n.isSelect === 1) { if (n.isSelect === 1) {
getDatas(n.id) getDatas(n.id)
} else { } else {
message.info('您没有权限查看!') message.info('您没有权限查看!')
} }
} }
getData() getData()
@ -63,96 +67,101 @@ getPageLists(1)
const neiScoll = ref<HTMLElement | null>(null) const neiScoll = ref<HTMLElement | null>(null)
const waiScoll = ref<HTMLElement | null>(null) const waiScoll = ref<HTMLElement | null>(null)
onMounted(() => { onMounted(() => {
neiScoll.value?.addEventListener('scroll', handleNeiScoll) neiScoll.value?.addEventListener('scroll', handleNeiScoll)
waiScoll.value?.addEventListener('scroll', handlewaiScoll) waiScoll.value?.addEventListener('scroll', handlewaiScoll)
}) })
const listData = ref<any[]>([]) const listData = ref<any[]>([])
let neiLength: number let neiLength: number
let neiPum = 1 let neiPum = 1
async function getPageList(page) { async function getPageList(page) {
const pasr = { const pasr = {
pageNum: page, pageNum: page,
pageSize: 5, pageSize: 5,
type: 2, type: 2,
position: 'recommend' position: 'recommend'
} }
const { rows, total } = await getArticlePage(pasr) const { rows, total } = await getArticlePage(pasr)
neiLength = total / 6 neiLength = total / 6
listData.value.push(...rows) listData.value.push(...rows)
console.log(listData.value) console.log(listData.value)
} }
const listDatas = ref<any[]>([]) const listDatas = ref<any[]>([])
let waiLength: number let waiLength: number
let waiPum = 1 let waiPum = 1
async function getPageLists(page) { async function getPageLists(page) {
const pasr = { const pasr = {
pageNum: page, pageNum: page,
pageSize: 5, pageSize: 5,
type: 1, type: 1,
position: 'recommend' position: 'recommend'
} }
const { rows, total } = await getArticlePage(pasr) const { rows, total } = await getArticlePage(pasr)
waiLength = total / 6 waiLength = total / 6
listDatas.value.push(...rows) listDatas.value.push(...rows)
} }
const handleNeiScoll = () => { const handleNeiScoll = () => {
const container = neiScoll.value const container = neiScoll.value
if (container) { if (container) {
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight const isAtBottom =
if (isAtBottom) { container.scrollHeight - container.scrollTop === container.clientHeight
if (neiPum < neiLength) { if (isAtBottom) {
++neiPum if (neiPum < neiLength) {
getPageList(neiPum) ++neiPum
} getPageList(neiPum)
} }
} }
}
} }
const handlewaiScoll = () => { const handlewaiScoll = () => {
const container = waiScoll.value const container = waiScoll.value
if (container) { if (container) {
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight const isAtBottom =
if (isAtBottom) { container.scrollHeight - container.scrollTop === container.clientHeight
if (waiPum < waiLength) { if (isAtBottom) {
++waiPum if (waiPum < waiLength) {
getPageList(waiPum) ++waiPum
} getPageList(waiPum)
} }
} }
}
} }
</script> </script>
<template> <template>
<Layout> <Layout>
<div class="page-wrap h-834px"> <div class="page-wrap h-834px">
<div class="page-main"> <div class="page-main">
<AppBlock class="h-full"> <AppBlock class="h-full">
<div class="overflow-y-auto h-full"> <div class="overflow-y-auto h-full">
<div class="px46px py40px"> <div class="px46px py40px">
<DetailNews <DetailNews
:title="state.title" :title="state.title"
:content="state.content" :content="state.content"
:publishTime="state.publishTime" :publishTime="state.publishTime"
:tag="state.tag" :tag="state.tag"
:tagColor="state.tagColor" :tagColor="state.tagColor"
:source="state.source" :source="state.source"
/> />
</div> </div>
</div> </div>
</AppBlock> </AppBlock>
</div> </div>
<div class="page-side"> <div class="page-side">
<AppBlock class="h-400px"> <AppBlock class="h-400px">
<div class="box h-full"> <div class="box h-full">
<div class="box-title flex items-center" @click="push({ name: 'IntelligenceWithin' })"> <div
<span class="flex-1">社内情报</span> class="box-title flex items-center"
<span></span> @click="push({ name: 'IntelligenceWithin' })"
</div> >
<div ref="neiScoll" class="box-content overflow-y-auto px22px"> <span class="flex-1">社内情报</span>
<div class="py13px line" v-for="i in listData" :key="i"> <span></span>
<!-- <AppNewsBox @click="toDetail2(i)" </div>
<div ref="neiScoll" class="box-content overflow-y-auto px22px">
<div class="py13px line" v-for="i in listData" :key="i">
<!-- <AppNewsBox @click="toDetail2(i)"
class="!lh-2em" class="!lh-2em"
:labelText="i.tag" :labelText="i.tag"
labelColor="#2cba06" labelColor="#2cba06"
@ -160,29 +169,40 @@ const handlewaiScoll = () => {
:date="i.publishTime" :date="i.publishTime"
size="h20px" size="h20px"
/> --> /> -->
<div class="flex" @click="toDetail2(i)"> <div class="flex" @click="toDetail2(i)">
<img v-if="i.tag === 'New'" src="../../../assets/images/NEW3.gif" class="h20px" /> <img
<img v-if="i.tag === ''" src="../../../assets/images/jj.gif" class="h20px" /> v-if="i.tag === 'New'"
<div class="ml5px leading-4.5 max-w300px overflow-ellipsis"> src="../../../assets/images/NEW3.gif"
{{ i.title }} class="h20px"
</div> />
</div> <img
<div class="text-#808696 text-right">{{ i.publishTime }}</div> v-if="i.tag === '紧急'"
</div> src="../../../assets/images/jj.gif"
</div> class="h20px"
</div> />
</AppBlock> <div class="ml5px leading-4.5 max-w300px overflow-ellipsis">
</div> {{ i.title }}
<div class="page-side"> </div>
<AppBlock class="h-400px"> </div>
<div class="box h-full"> <div class="text-#808696 text-right">{{ i.publishTime }}</div>
<div class="box-title flex items-center" @click="push({ name: 'IntelligenceOutside' })"> </div>
<span class="flex-1">社外情报</span> </div>
<span></span> </div>
</div> </AppBlock>
<div ref="waiScoll" class="box-content overflow-y-auto px22px"> </div>
<div class="py13px line" v-for="i in listDatas" :key="i"> <div class="page-side">
<!-- <AppNewsBox @click="toDetail2(i)" <AppBlock class="h-400px">
<div class="box h-full">
<div
class="box-title flex items-center"
@click="push({ name: 'IntelligenceOutside' })"
>
<span class="flex-1">社外情报</span>
<span></span>
</div>
<div ref="waiScoll" class="box-content overflow-y-auto px22px">
<div class="py13px line" v-for="i in listDatas" :key="i">
<!-- <AppNewsBox @click="toDetail2(i)"
class="!lh-2em" class="!lh-2em"
:labelText="i.tag" :labelText="i.tag"
labelColor="#2cba06" labelColor="#2cba06"
@ -191,72 +211,80 @@ const handlewaiScoll = () => {
size="h20px" size="h20px"
/> --> /> -->
<div class="flex" @click="toDetail2(i)"> <div class="flex" @click="toDetail2(i)">
<img v-if="i.tag === 'New'" src="../../../assets/images/NEW3.gif" class="h20px" /> <img
<img v-if="i.tag === ''" src="../../../assets/images/jj.gif" class="h20px" /> v-if="i.tag === 'New'"
<div class="ml5px leading-4.5 max-w300px overflow-ellipsis"> src="../../../assets/images/NEW3.gif"
{{ i.title }} class="h20px"
</div> />
</div> <img
<div class="text-#808696 text-right mt8px"> v-if="i.tag === '紧急'"
{{ i.publishTime }} src="../../../assets/images/jj.gif"
</div> class="h20px"
</div> />
</div> <div class="ml5px leading-4.5 max-w300px overflow-ellipsis">
</div> {{ i.title }}
</AppBlock> </div>
</div> </div>
</div> <div class="text-#808696 text-right mt8px">
</Layout> {{ i.publishTime }}
</div>
</div>
</div>
</div>
</AppBlock>
</div>
</div>
</Layout>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.overflow-ellipsis { .overflow-ellipsis {
white-space: nowrap; /* 防止换行 */ white-space: nowrap; /* 防止换行 */
overflow: hidden; /* 隐藏溢出部分 */ overflow: hidden; /* 隐藏溢出部分 */
text-overflow: ellipsis; /* 显示省略号 */ text-overflow: ellipsis; /* 显示省略号 */
} }
.page-wrap { .page-wrap {
display: grid; display: grid;
grid-template-columns: 1fr 314px; grid-template-columns: 1fr 314px;
grid-template-rows: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr);
grid-column-gap: 30px; grid-column-gap: 30px;
grid-row-gap: 30px; grid-row-gap: 30px;
.page-main { .page-main {
height: 830px; height: 830px;
grid-area: 1 / 1 / 3 / 2; grid-area: 1 / 1 / 3 / 2;
width: 100%; width: 100%;
} }
.page-side { .page-side {
height: 100%; height: 100%;
grid-area: 1 / 2 / 2 / 3; grid-area: 1 / 2 / 2 / 3;
&:last-of-type { &:last-of-type {
height: 300px; height: 300px;
grid-area: 2 / 2 / 3 / 3; grid-area: 2 / 2 / 3 / 3;
} }
} }
} }
.box { .box {
--title-h: 58px; --title-h: 58px;
border: 0; border: 0;
.box-title { .box-title {
height: var(--title-h); height: var(--title-h);
color: #fff; color: #fff;
background-color: #537deb; background-color: #537deb;
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
padding: 0 24px; padding: 0 24px;
cursor: pointer; cursor: pointer;
} }
.box-content { .box-content {
height: 100%; height: 100%;
max-height: calc(100% - var(--title-h)); max-height: calc(100% - var(--title-h));
} }
} }
.line { .line {
border-bottom: 1px solid #eef3fb; border-bottom: 1px solid #eef3fb;
} }
</style> </style>

View File

@ -9,7 +9,6 @@ import AppPagination from '@/components/AppPagination.vue'
import { Navs, useData } from './ListPageData' import { Navs, useData } from './ListPageData'
import { NEmpty } from 'naive-ui' import { NEmpty } from 'naive-ui'
import { message } from '@/utils/message' import { message } from '@/utils/message'
import { report } from '@/api/daikin/base'
const { push } = useRouter() const { push } = useRouter()
const route = useRoute() const route = useRoute()
@ -19,12 +18,12 @@ const { state, list } = useData()
const Type1 = [ const Type1 = [
{ key: '1', name: '外部环境', route: 'IntelligenceOutside', icon: getImg('icon-1.svg') }, { key: '1', name: '外部环境', route: 'IntelligenceOutside', icon: getImg('icon-1.svg') },
{ key: '2', name: '竞争对手', route: 'IntelligenceOutside', icon: getImg('icon-2.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 = [ const Type2 = [
{ key: '4', name: '大金集团', route: 'IntelligenceWithin', icon: getImg('icon-4.svg') }, { key: '4', name: '大金集团', route: 'IntelligenceWithin', icon: getImg('icon-4.svg') },
{ key: '5', name: '中国据点', route: 'IntelligenceWithin', icon: getImg('icon-5.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>({}) const firstNew = ref<any>({})
@ -40,16 +39,19 @@ watchEffect(() => {
// push(`${route.path.replace('/Home','')}/${firstNew.id}`) // push(`${route.path.replace('/Home','')}/${firstNew.id}`)
// // push({name:route.name,params:{id:firstNew.id}}) // // push({name:route.name,params:{id:firstNew.id}})
// } // }
const toDetail2 = (item: { id: any }) => { const toDetail2 =(item: { id: any })=>{
console.log(route, route.path, item.id) console.log(route,route.path,item.id)
// push(`${route.path}/${item.id}`) // push(`${route.path}/${item.id}`)
if (item.isSelect === 1) { if(item.isSelect===1){
push(`${route.path.replace('/Home', '')}/${item.id}`) push(`${route.path.replace('/Home','')}/${item.id}`)
} else {
message.error('没有访问权限')
} }
else{
message.error("没有访问权限")
}
} }
report({ moduleCode: 'App_Article' })
</script> </script>
<template> <template>
@ -91,17 +93,8 @@ report({ moduleCode: 'App_Article' })
<section class="px44px mt44px"> <section class="px44px mt44px">
<!-- <AppAlert v-if="firstNew?.title" @click="push(`${route.path.replace('/Home','')}/${firstNew.id}`)">{{ firstNew.title }}</AppAlert> --> <!-- <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="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)"> <div class="news-item" v-for="item in restNews" :key="item.id" @click="toDetail2(item)">
<AppNewsBox <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" />
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> </div>
<div class="text-center mt32px" v-if="state.total"> <div class="text-center mt32px" v-if="state.total">

View File

@ -1,103 +1,103 @@
<!-- 外部情报 --> <!-- 外部情报 -->
<script setup lang="tsx"> <script setup lang="tsx">
import AppBlock from '@/components/AppBlock.vue' import AppBlock from "@/components/AppBlock.vue";
import Layout from './components/Layout.vue' import Layout from "./components/Layout.vue";
import OverviewBlock from './OverviewBlock.vue' import OverviewBlock from "./OverviewBlock.vue";
import { getImg } from './images' import { getImg } from "./images";
import { useData } from './OverviewData' import { useData } from "./OverviewData";
import { getBannerList, report } from '@/api/daikin/base' import { getBannerList } from "@/api/daikin/base";
const { data1, data2, data3, data4, data5, data6, data7 } = useData() const { data1,data2,data3,data4,data5,data6,data7 } = useData();
// console.log(data.value) // console.log(data.value)
const swipeActiveIndex = ref(0) const swipeActiveIndex = ref(0);
function handleIndex(x: any) { function handleIndex(x: any) {
swipeActiveIndex.value = x.realIndex swipeActiveIndex.value = x.realIndex;
} }
async function getBanner() { async function getBanner() {
// 1- 2- // 1- 2-
const { data } = await getBannerList({ type: 1 }) const {data} =await getBannerList({type:1})
const { data: da } = await getBannerList({ type: 2 }) const {data:da} =await getBannerList({type:2})
if (data && data != 'null' && data.length > 0) { if(data&&data!='null'&&data.length>0){
imageList1.value = data imageList1.value = data
} }
if (da && da != 'null' && da.length > 0) { if(da&&da!='null'&&da.length>0){
imageList2.value = da imageList2.value = da
} }
} }
getBanner() getBanner()
report({ moduleCode: 'App_Article' }) const imageList1 =ref([
const imageList1 = ref([ { title: "三菱电机FY22年度方针说明会", bannerImg: getImg("swipe-1.svg") ,id:0},
{ title: '三菱电机FY22年度方针说明会', bannerImg: getImg('swipe-1.svg'), id: 0 }, { title: "23年度供应商大会热烈筹备中", bannerImg: getImg("swipe-2.svg") ,id:0},
{ title: '23年度供应商大会热烈筹备中', bannerImg: getImg('swipe-2.svg'), id: 0 }
]) ])
const imageList2 = ref([ const imageList2 =ref([
{ title: '三菱电机FY22年度方针说明会', bannerImg: getImg('swipe-1.svg'), id: 0 }, { title: "三菱电机FY22年度方针说明会", bannerImg: getImg("swipe-1.svg") ,id:0},
{ title: '23年度供应商大会热烈筹备中', bannerImg: getImg('swipe-2.svg'), id: 0 } { title: "23年度供应商大会热烈筹备中", bannerImg: getImg("swipe-2.svg") ,id:0},
]) ])
const swipeImages = [ const swipeImages = [
{ title: '三菱电机FY22年度方针说明会', bannerImg: getImg('swipe-1.svg') }, { title: "三菱电机FY22年度方针说明会", bannerImg: getImg("swipe-1.svg") },
{ title: '23年度供应商大会热烈筹备中', bannerImg: getImg('swipe-2.svg') } { title: "23年度供应商大会热烈筹备中", bannerImg: getImg("swipe-2.svg") },
] ];
const items1 = computed(() => [ const items1 = computed(() => [
{ {
key: '1', key: "1",
name: '外部环境', name: "外部环境",
color: '#63BFB2', color: "#63BFB2",
title: '全年原材料供应状况紧张', title: "全年原材料供应状况紧张",
icon: getImg('icon-1.svg'), icon: getImg("icon-1.svg"),
news: unref(data1), //.splice(0, 3), news:unref(data1), //.splice(0, 3),
list: unref(data7)[1] ?? [] list:unref(data7)[1]?? [],
}, },
{ {
key: '2', key: "2",
name: '竞争对手', name: "竞争对手",
color: '#F57E6E', color: "#F57E6E",
title: '三菱召开年度方针说明会', title: "三菱召开年度方针说明会",
icon: getImg('icon-2.svg'), icon: getImg("icon-2.svg"),
news: unref(data2), //.splice(0, 3), news: unref(data2), //.splice(0, 3),
list: unref(data7)[2] ?? [] list:unref(data7)[2]?? [],
}, },
{ {
key: '3', key: "3",
name: '供方动向', name: "供方动向",
color: '#537DEB', color: "#537DEB",
title: '全年原材料供应状况紧张', title: "全年原材料供应状况紧张",
icon: getImg('icon-3.svg'), icon: getImg("icon-3.svg"),
news: unref(data3), //.splice(0, 3), news:unref(data3), //.splice(0, 3),
list: unref(data7)[3] ?? [] list:unref(data7)[3]?? [],
} },
]) ]);
const items2 = computed(() => [ const items2 = computed(() => [
{ {
key: '4', key: "4",
name: '大金集团', name: "大金集团",
color: '#5DCCFA', color: "#5DCCFA",
title: '23年度集团方针正式发行', title: "23年度集团方针正式发行",
icon: getImg('icon-4.svg'), icon: getImg("icon-4.svg"),
news: unref(data4), //.splice(0, 3), news: unref(data4), //.splice(0, 3),
list: unref(data7)[4] ?? [] list:unref(data7)[4]?? [],
}, },
{ {
key: '5', key: "5",
name: '中国据点', name: "中国据点",
color: '#E8A743', color: "#E8A743",
title: '惠州工厂稼动正式开始', title: "惠州工厂稼动正式开始",
icon: getImg('icon-6.svg'), icon: getImg("icon-6.svg"),
news: unref(data5), //.splice(0, 3), news: unref(data5), //.splice(0, 3),
list: unref(data7)[5] ?? [] list:unref(data7)[5]?? [],
}, },
{ {
key: '6', key: "6",
name: '调达本部', name: "调达本部",
color: '#926CE1', color: "#926CE1",
title: '23年度供应商大会热烈筹备中', title: "23年度供应商大会热烈筹备中",
icon: getImg('icon-5.svg'), icon: getImg("icon-5.svg"),
news: unref(data6), //.splice(0, 3), news:unref(data6), //.splice(0, 3),
list: unref(data7)[6] ?? [] list:unref(data7)[6]?? [],
} },
]) ]);
</script> </script>
<template> <template>
@ -134,7 +134,7 @@ const items2 = computed(() => [
position: relative; position: relative;
padding-left: 24px; padding-left: 24px;
&::before { &::before {
content: ' '; content: " ";
display: block; display: block;
width: 8px; width: 8px;
height: 30px; height: 30px;

View File

@ -7,24 +7,16 @@ import { useDate } from '@/views/home/hooks/useDate'
import type { FormInst } from 'naive-ui' import type { FormInst } from 'naive-ui'
import { useMessage } from 'naive-ui' import { useMessage } from 'naive-ui'
import { ref } from 'vue' import { ref } from 'vue'
import { import { NModal, NCard, NForm, NButton, NFormItem, NInput, NRadio, NSelect, NSpace, NRadioGroup } from 'naive-ui'
NModal,
NCard,
NForm,
NButton,
NFormItem,
NInput,
NRadio,
NSelect,
NSpace,
NRadioGroup
} from 'naive-ui'
import { saveArticle } from '@/api/daikin/base' import { saveArticle } from '@/api/daikin/base'
import { useUserStore } from '@/stores/modules/user' import { useUserStore } from '@/stores/modules/user'
const store = useUserStore() const store =useUserStore()
console.log("🚀 ~ file: Layout.vue:15 ~ store:", store.user)
const { day, week } = useDate() const { day, week } = useDate()
const { push } = useRouter() const { push } = useRouter()
</script> </script>
<template> <template>
@ -38,35 +30,14 @@ const { push } = useRouter()
<div class="text-36px">外部情报</div> <div class="text-36px">外部情报</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
<div class="text-18px flex-1">{{ week }}</div> <div class="text-18px flex-1">{{ week }}</div>
<div <div style="margin-right: 8px" v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'">
style="margin-right: 8px" <div class="add text-18px px13px py11px cursor-pointer" @click="push({ path: '/Home/Process' })">情报流程</div>
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>
<div <div style="margin-right: 8px" v-if="store.user.isPublish ===1 || store.user.roleCode === 'zhuxi'">
style="margin-right: 8px" <div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'messageSelect'})"></div>
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>
<div v-if="store.user.isPublish === 1"> <div v-if="store.user.isPublish ===1">
<div <div class="add text-18px px13px py11px cursor-pointer" @click="push({name:'InfosEdit'})">+ </div>
class="add text-18px px13px py11px cursor-pointer"
@click="push({ name: 'InfosEdit' })"
>
+ 新增
</div>
</div> </div>
</div> </div>
<div class="flex-1 mt30px text-#142142"> <div class="flex-1 mt30px text-#142142">
@ -160,7 +131,7 @@ const { push } = useRouter()
} }
.add { .add {
border: 1px solid #ffffff; border: 1px solid #FFFFFF;
border-radius: 10px; border-radius: 10px;
} }
@ -168,10 +139,10 @@ const { push } = useRouter()
width: 80px; width: 80px;
height: 80px; height: 80px;
border-radius: 20px; border-radius: 20px;
background-color: #c2c2c2; background-color: #C2C2C2;
} }
.img.yes { .img.yes {
background-color: #63bfb2; background-color: #63BFB2;
} }
</style> </style>

View File

@ -1,184 +1,173 @@
<script setup lang="ts"> <script setup lang="ts">
import { deptTree, getGroupList, addGroup, getPage, deleteGroup } from '@/api/daikin/base' import { deptTree, getGroupList,addGroup, getPage,deleteGroup } from '@/api/daikin/base'
import { message } from '@/utils/message' import { message } from '@/utils/message'
import { Search, Refresh } from '@element-plus/icons-vue' import { Search, Refresh } from '@element-plus/icons-vue'
import { noticeld } from '@/stores/modules/noticeId' import {noticeld} from '@/stores/modules/noticeId'
import { uniqBy, cloneDeep } from 'lodash-es'
const stores = noticeld() const stores = noticeld()
const treeData = ref<any>() const treeData = ref<any>()
const emit = defineEmits(['clickChild', 'CloseThis']) const emit = defineEmits(['clickChild','CloseThis'])
const FlashOutline = ref('') const FlashOutline = ref('')
const treeRef = ref() const treeRef =ref()
const flag = ref(false)
async function getTree() { async function getTree() {
const reviewSource = stores.article.reviewSource const reviewSource =stores.article.reviewSource
const { data } = await deptTree({ reviewSource }) const { data } = await deptTree({reviewSource})
if (data && data != 'null' && data.length > 0) { if(data&&data!='null'&&data.length>0){
treeData.value = data treeData.value = data
} }
console.log(data)
console.log(data)
} }
const props = defineProps({ const props = defineProps({
userDataList: { userDataList: {
type: Array as PropType<any[]>, type: Array as PropType<any[]>,
default: () => [] default: () => [],
} },
}) })
const da = reactive({ const da = reactive({
pageNum: '1', pageNum: '1',
pageSize: '1000', pageSize: '1000',
phonenumber: '', phonenumber: '',
status: '', status: '',
beingTime: '', beingTime: '',
endTime: '', endTime: '',
deptId: '', deptId: '',
nickName: '' nickName:''
}) })
const userData = ref<any>() const userData = ref<any>()
async function getUserPage() { async function getUserPage() {
const reviewSource = stores.article.reviewSource const reviewSource =stores.article.reviewSource
const { pageNum, pageSize, phonenumber, status, beingTime, endTime, deptId, nickName } = unref(da) const {pageNum,pageSize,phonenumber,status,beingTime,endTime,deptId,nickName} = unref(da)
const { rows } = await getPage({ const { rows } = await getPage({pageNum,pageSize,phonenumber,status,beingTime,endTime,deptId,nickName,reviewSource})
pageNum, const rowsD = rows.map((i: any) => {
pageSize, if (i.loginDate) {
phonenumber, i.loginDate = i.loginDate.slice(0, 10)
status, }
beingTime,
endTime, return i
deptId, })
nickName, userData.value = rowsD
reviewSource
})
const rowsD = rows.map((i: any) => {
if (i.loginDate) {
i.loginDate = i.loginDate.slice(0, 10)
}
return i
})
const data = cloneDeep(toRaw(multipleSelection.value))
flag.value = false
userData.value = rowsD
setTimeout(() => {
selection(data)
}, 150)
} }
function selection(list = props.userDataList) { function selection(){
if (userData.value && list) { const list = props.userDataList
const commonItems = userData.value.filter((item1: { userId: any }) => if(userData.value&&list){
list.some((item2) => item2.userId === item1.userId) const commonItems = userData.value.filter((item1: { userId: any; }) =>
) list.some(item2 => item2.userId === item1.userId)
toggleSelection(commonItems) );
} toggleSelection(commonItems)
}
} }
onMounted(() => { onMounted(() => {
setTimeout(() => { setTimeout(() => {
selection() selection()
}, 1000) }, 1000);
}) })
const ss = computed(() => [da.deptId, da.nickName]) const ss = computed(() => [da.deptId,da.nickName])
watch( watch(() => unref(ss),
() => unref(ss), async (v) => {
async (v) => { getUserPage()
getUserPage() },
}, { immediate: true, deep: true },
{ immediate: true, deep: true }
) )
const thisClick = (e: { id: string }) => { const thisClick = (e: { id: string }) => {
da.deptId = e.id da.deptId = e.id
// console.log(e) // console.log(e)
} }
const formInline = ref() const formInline = ref()
const onSubmit = () => { const onSubmit = () => {
// console.log(formInline.value) // console.log(formInline.value)
da.nickName = formInline.value da.nickName= formInline.value
} }
const resetForm = () => { const resetForm = () => {
formInline.value = '' formInline.value =''
} }
const multipleTableRef = ref() const multipleTableRef = ref()
const multipleSelection = ref<[]>([]) const multipleSelection = ref<[]>([])
const multipleSelectionObj: any = {}
const handleSelectionChange = (val) => { const handleSelectionChange = (val) => {
console.log(val) console.log(val)
multipleSelectionObj[da.deptId] = val multipleSelection.value = val
multipleSelection.value = uniqBy(Object.values(multipleSelectionObj).flat(), 'userId')
} }
const selet = (rows: any) => { const selet = (rows: any) => {
multipleTableRef.value!.toggleRowSelection(rows, undefined) multipleTableRef.value!.toggleRowSelection(rows, undefined)
// console.log(unref(multipleSelection)) // console.log(unref(multipleSelection))
} }
const toggleSelection = (Data: any[]) => { const toggleSelection = (Data: any[]) => {
// console.log(Data) // console.log(Data)
if (Data) { if (Data) {
Data.forEach((row: any) => { Data.forEach((row: any) => {
multipleTableRef.value!.toggleRowSelection(row, undefined) multipleTableRef.value!.toggleRowSelection(row, undefined)
// console.log(multipleTableRef.value.data) // console.log(multipleTableRef.value.data)
}) })
}
}
} }
const handleClose = (id: any) => { const handleClose = (id: any) => {
multipleSelection.value = multipleSelection.value.filter((item) => { multipleSelection.value.filter(item => {
if (item.userId === id) {
console.log(item.userId, id) if (item.userId === id) {
multipleTableRef.value!.toggleRowSelection(item, undefined) console.log(item.userId,id)
return false multipleTableRef.value!.toggleRowSelection(item, undefined)
} }
return item })
})
} }
const showModal = ref() const showModal = ref()
const handleChange = () => { const handleChange = () => {
emit('clickChild', { multipleSelection, showModal }) emit('clickChild', { multipleSelection, showModal })
} }
const CloseThis = () => { const CloseThis=()=>{
emit('CloseThis', false)
emit('CloseThis',false)
} }
const CloseT = () => { const CloseT = ()=>{
showModal2.value = false showModal2.value = false
multipleSelection.value = [] multipleSelection.value=[]
} }
getTree() getTree()
const asGroup = ref() const asGroup = ref()
async function getGroup() { async function getGroup(){
const { data } = await getGroupList() const {data} = await getGroupList()
asGroup.value = data asGroup.value = data
} }
getGroup() getGroup()
const asGroupClick = (e: any) => { const asGroupClick = (e: any)=>{
multipleSelection.value = e.userList multipleSelection.value = e.userList
} }
const showModal2 = ref(false) const showModal2 =ref(false)
const groupName = ref() const groupName = ref()
const groupDeleteId = ref() const groupDeleteId = ref()
let id = 0 let id = 0
const modfify = (e) => { const modfify = (e)=>{
console.log(e.id) console.log(e.id)
groupDeleteId.value = e groupDeleteId.value =e
id = e.id id = e.id
showModal2.value = true showModal2.value = true
groupName.value = e.name groupName.value = e.name
multipleSelection.value = e.userList multipleSelection.value = e.userList
e.userList.forEach((row: any) => { e.userList.forEach((row: any) => {
multipleTableRef.value!.toggleRowSelection(row, undefined) multipleTableRef.value!.toggleRowSelection(row, undefined)
}) })
} }
const changeGroup = () => { const changeGroup=()=>{
changSave() changSave()
} }
watch(FlashOutline, (val) => { watch(FlashOutline, (val) => {
treeRef.value!.filter(val) treeRef.value!.filter(val)
@ -189,200 +178,162 @@ const filterNode = (value: string, data: Tree) => {
return data.label.includes(value) return data.label.includes(value)
} }
async function changSave() {
let userIdList: any[] = []
const name = groupName.value async function changSave(){
// console.log(multipleSelection.value) let userIdList: any[] = []
multipleSelection.value.forEach((i: { userId: any }) => { const name = groupName.value
userIdList.push(i.userId) // console.log(multipleSelection.value)
}) multipleSelection.value.forEach((i: { userId: any })=>{
console.log(id, groupName.value, userIdList) userIdList.push(i.userId)
// if(!id) return })
let formdata = new FormData() console.log(id, groupName.value,userIdList)
formdata.append('id', id) // if(!id) return
formdata.append('name', name) let formdata = new FormData();
formdata.append('userIdList', userIdList) formdata.append("id",id);
const { msg } = await addGroup(formdata, { headers: { 'Content-Type': 'application/form-data' } }) formdata.append("name",name);
message.success(msg) formdata.append("userIdList",userIdList);
getGroup() const {msg} = await addGroup(formdata,{headers: {'Content-Type': 'application/form-data'}})
message.success(msg)
getGroup()
} }
const addGroupList = () => { const addGroupList = () =>{
showModal2.value = true showModal2.value = true
} }
const deleteGroupp = (i: any) => { const deleteGroupp =(i: any)=>{
console.log(i) console.log(i)
deleteGroups(i.id) deleteGroups(i.id)
} }
async function deleteGroups(id) { async function deleteGroups(id) {
if (!id) return if(!id) return
const { code } = await deleteGroup({ id }) const {code} =await deleteGroup({id})
getGroup() getGroup()
asGroup.value = [] asGroup.value = []
multipleSelection.value = [] multipleSelection.value=[]
groupName.value = '' groupName.value=''
message.info('删除成功') message.info("删除成功")
} }
function onSelect(params: any) {
console.log('🚀 ~ file: UserPages.vue:230 ~ params:', params)
}
</script> </script>
<template> <template>
<div> <div>
<div class="max-w95% h800px m-auto bg-#fff rounded-10px overflow-hidden">
<div
class="pl20px text-18px w100% h60px p15px"
style="border-bottom: 1px solid #dfdfdf; font-weight: 700"
>
调达中心
</div>
<div class="p20px flex relative">
<div class="min-w150px">
<el-input
v-model="FlashOutline"
class="w-50 m-2"
placeholder="搜索"
suffix-icon="Calendar"
:prefix-icon="Search"
/>
<el-tree
ref="treeRef"
:data="treeData"
:filter-node-method="filterNode"
:default-expanded-keys="[2, 4]"
@node-click="thisClick"
class="max-h500px"
/>
<ul <div class=" max-w95% h800px m-auto bg-#fff rounded-10px overflow-hidden">
class="absolute max-h200px min-h100px bottom-0 list-none !p0 overflow-auto w190px" <div class="pl20px text-18px w100% h60px p15px" style="border-bottom:1px solid #dfdfdf ;font-weight: 700;">
v-if="asGroup" 调达中心</div>
> <div class="p20px flex relative">
<li v-for="i in asGroup" class="cursor-default w190px h32px"> <div class="min-w150px">
<span <el-input v-model="FlashOutline" class="w-50 m-2" placeholder="搜索" suffix-icon="Calendar"
@click="asGroupClick(i)" :prefix-icon="Search" />
class="w100px h30px text-12px float-left block border border-solid border-#f5f5f5 leading-30px overflow-hidden" <el-tree ref="treeRef" :data="treeData" :filter-node-method="filterNode" :default-expanded-keys="[2, 4]" @node-click="thisClick" class="max-h500px"/>
:title="i.name"
>{{ i.name }}</span
>
<span
class="text-12px text-#3E7DF0 leading-30px float-left block w38px text-center block border border-solid border-#f5f5f5 h32px"
@click="modfify(i)"
>编辑</span
>
<el-icon @click="deleteGroupp(i)" class="mt7px ml5px"><Delete /></el-icon>
</li>
</ul>
</div>
<div class="ml20px max-w80%">
<div v-if="showModal2 != true">
<el-form
:inline="true"
:model="formInline"
label-width="80px"
size="small"
class="demo-form-inline"
>
<el-form-item label="用户名称">
<el-input v-model="formInline" placeholder="请输入用户名称" clearable />
</el-form-item>
<el-form-item> <ul class="absolute max-h200px min-h100px bottom-0 list-none !p0 overflow-auto w190px" v-if="asGroup">
<el-button type="primary" @click="onSubmit" :icon="Search">搜素</el-button> <li v-for="i in asGroup" class="cursor-default w190px h32px" >
<el-button @click="resetForm()" :icon="Refresh">重置</el-button> <span @click="asGroupClick(i)" class="w100px h30px text-12px float-left block border border-solid border-#f5f5f5 leading-30px overflow-hidden" :title="i.name">{{i.name}}</span>
</el-form-item> <span class="text-12px text-#3E7DF0 leading-30px float-left block w38px text-center block border border-solid border-#f5f5f5 h32px" @click="modfify(i)"></span>
</el-form> <el-icon @click="deleteGroupp(i)" class="mt7px ml5px"><Delete/></el-icon>
</div> </li>
<div v-if="showModal2 == true" class="w500px"> </ul>
<!-- <el-form :inline="true" :model="formInline" </div>
<div class="ml20px max-w80%">
<div v-if="showModal2!=true">
<el-form :inline="true" :model="formInline" label-width="80px" size="small"
class="demo-form-inline">
<el-form-item label="用户名称">
<el-input v-model="formInline" placeholder="请输入用户名称" clearable />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit" :icon="Search">搜素</el-button>
<el-button @click="resetForm()" :icon="Refresh">重置</el-button>
</el-form-item>
</el-form>
</div>
<div v-if="showModal2==true" class="w500px">
<!-- <el-form :inline="true" :model="formInline"
class="demo-form-inline"> --> class="demo-form-inline"> -->
<el-form-item label="分组名称" label-width="80px" size="small"> <el-form-item label="分组名称" label-width="80px" size="small">
<el-input v-model="groupName" placeholder="请输入分组名称" clearable /> <el-input v-model="groupName" placeholder="请输入分组名称" clearable />
</el-form-item> </el-form-item>
<!-- </el-form> --> <!-- </el-form> -->
</div>
<div v-if="showModal2 != true" class="float-left block"> </div>
<el-button type="warning" size="small" @click="toggleSelection(userData)" <div v-if="showModal2!=true" class="float-left block">
>@所有人</el-button <el-button type="warning" size="small" @click="toggleSelection(userData)">@</el-button>
> <el-button type="primary" color="#00A73A" size="small" @click="addGroupList"></el-button>
<el-button type="primary" color="#00A73A" size="small" @click="addGroupList" </div>
>新增分组</el-button <div class="w100% h450px overflow-auto">
> <el-table ref="multipleTableRef" :data="userData" :header-cell-style="{ 'text-align': 'center' }"
</div> height="400" :cell-style="{ 'text-align': 'center' }" @selection-change="handleSelectionChange">
<div class="w100% h450px overflow-auto"> <el-table-column type="selection" width="55" />
<el-table <el-table-column property="nickName" label="用户名称" width="220" />
ref="multipleTableRef" <el-table-column property="dept.deptName" label="科室" width="180" />
:data="userData" <el-table-column property="dept.parentDeptName" label="部门" width="180" />
:header-cell-style="{ 'text-align': 'center' }" <el-table-column property="positionName" label="职位" width="120" />
height="400"
:cell-style="{ 'text-align': 'center' }"
@selection-change="handleSelectionChange"
@select="onSelect"
>
<el-table-column type="selection" width="55" />
<el-table-column property="nickName" label="用户名称" width="220" />
<el-table-column property="dept.deptName" label="科室" width="180" />
<el-table-column property="dept.parentDeptName" label="部门" width="180" />
<el-table-column property="positionName" label="职位" width="120" />
<el-table-column property="name" label="操作" width="220"> <el-table-column property="name" label="操作" width="220">
<template #default="{ row, $index }"> <template #default="{ row, $index }">
<el-button type="primary" size="small" @click="selet(row)"></el-button> <el-button type="primary" size="small" @click="selet(row)"></el-button>
</template> </template>
</el-table-column>
</el-table> </el-table-column>
</div>
<div class="h80px overflow-y-auto"> </el-table>
<div v-if="showModal2 === true && groupName" class="mb10px h32px">
{{ groupName }}
<span class="text-12px text-#959595 w30px" @click="deleteGroupp(groupDeleteId)" </div>
>删除</span <div class="h80px overflow-y-auto">
> <div v-if="showModal2===true && groupName" class="mb10px h32px">
<!-- <el-icon class="mt8px"><Delete /></el-icon> --> {{groupName}}
<span class="text-12px text-#959595 w30px" @click="deleteGroupp(groupDeleteId)"></span>
<!-- <el-icon class="mt8px"><Delete /></el-icon> -->
</div>
<el-tag v-for="i in multipleSelection" :key="i" class="mx-1" closable :disable-transitions="false"
@close="handleClose(i.userId)">
{{ i.nickName }}
</el-tag>
</div>
</div>
</div> </div>
<el-tag <div class="w100% text-end float-right block h50px pt10px"
v-for="i in multipleSelection" style="border-top:1px solid #dfdfdf ;font-weight: 700;">
:key="i" <div class="pr30px" v-if="showModal2!=true">
class="mx-1" <el-button type="warning" color="#f1f1f1" size="small" @click="CloseThis"></el-button>
closable <el-button type="primary" size="small" @click="handleChange"></el-button>
:disable-transitions="false" </div>
@close="handleClose(i.userId)" <div class="pr30px" v-if="showModal2==true">
> <el-button type="warning" color="#f1f1f1" size="small" @click="CloseT"></el-button>
{{ i.nickName }} <el-button type="primary" size="small" @click="changeGroup"></el-button>
</el-tag> </div>
</div> </div>
</div> </div>
</div>
<div
class="w100% text-end float-right block h50px pt10px"
style="border-top: 1px solid #dfdfdf; font-weight: 700"
>
<div class="pr30px" v-if="showModal2 != true">
<el-button type="warning" color="#f1f1f1" size="small" @click="CloseThis"></el-button>
<el-button type="primary" size="small" @click="handleChange"></el-button>
</div>
<div class="pr30px" v-if="showModal2 == true">
<el-button type="warning" color="#f1f1f1" size="small" @click="CloseT"></el-button>
<el-button type="primary" size="small" @click="changeGroup"></el-button>
</div>
</div>
</div> </div>
</div>
</template> </template>
<style lang="less"> <style lang="less">
.el-form--inline .el-input { .el-form--inline .el-input {
width: 180px !important; width: 180px !important;
} }
::-webkit-scrollbar { ::-webkit-scrollbar{
width: 1px; width: 1px;
} }
.thList { .thList {
td { td {
border-bottom: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5;
line-height: 40px; line-height: 40px;
font-size: 12px; font-size: 12px;
} }
} }
</style> </style>

View File

@ -6,7 +6,7 @@ import AppBlock from '@/components/AppBlock.vue'
import AppNewsBox from '@/components/AppNewsBox.vue' import AppNewsBox from '@/components/AppNewsBox.vue'
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
import { useDate } from '@/views/home/hooks/useDate' import { useDate } from '@/views/home/hooks/useDate'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from "element-plus/lib/locale/lang/zh-cn";
import { getList ,marketPreADD,getMarketUser,saveMarketUser,MarketDownload,MarketPreview,getCurrencyList,getMetalList} from '@/api/daikin/base' import { getList ,marketPreADD,getMarketUser,saveMarketUser,MarketDownload,MarketPreview,getCurrencyList,getMetalList} from '@/api/daikin/base'
import { NModal,NCard } from 'naive-ui' import { NModal,NCard } from 'naive-ui'
import {formatDate} from '@/utils/format' import {formatDate} from '@/utils/format'

View File

@ -1,293 +0,0 @@
<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()
const num = ['', '第一周', '第二周', '第三周', '第四周', '第五周']
//
function groupDatesByWeek(dates = [], weekStartDay = 1) {
return dates.reduce((acc: any, item: any) => {
const date = dayjs(item.createTime)
const weekStart = date.startOf('week').add(weekStartDay, 'day').format('MM月DD日')
item.date = date.format('YYYY-MM-DD')
const weekEnd = date.endOf('week').add(weekStartDay, 'day').format('MM月DD日')
const week = getWeekOfMonth(date)
const month = date.format('MM')
const key = `${+month}${num[week]} ${weekStart} - ${weekEnd} `
acc[key] = acc[key] || []
acc[key].push(item)
return acc
}, {})
}
function getWeekOfMonth(date) {
const startOfMonth = date.startOf('month')
const diff = date.diff(startOfMonth, 'day')
return Math.ceil((diff + startOfMonth.day()) / 7)
}
// 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?id=',
modulePath: '/DataBase'
}
}
const goModule = (item, type) => {
const { moduleCode, id, cateId } = item
const { modulePath, path } = codePath[moduleCode]
console.log('🚀 ~ file: News.vue:128 ~ modulePath, path:', modulePath, path)
if (modulePath) {
if (type === 'module') {
push(modulePath)
} else {
push(path + (moduleCode === 'App_Database' ? cateId : id))
}
}
}
const clickItem = (item: any) => {
const { id, filePath, isSelect, moduleCode, fileCommon = {} } = item
if (isSelect == 1) {
if (item.moduleCode === 'App_Article') {
return push('/Home/intelligence/' + item.id)
}
if (['App_Database'].includes(moduleCode)) {
goModule(item, 'path')
} else {
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) {
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-0px relative" v-if="newsData">
<div class="h-710px overflow-y-scroll">
<div v-for="(val, key) of newsData" :key="key" class="w-94% mb-20px flex-1">
<div class="text-#142142 text-20px font-bold mb20px mt40px">
{{ key }}
</div>
<div v-for="(i, k) in val" :key="k" class="mb-20px flex items-center w-full">
<div
@click="clickItem(i)"
class="w-[40%] no-underline truncate text-18px text-#142142 cursor-pointer hover:underline h-16px leading-16px"
>
{{ i.title || '' }}
</div>
<div class="text-#808696 text-16px ml30px flex flex-1 items-center justify-between">
<div class="flex-1">发布科室: {{ i.departName }}</div>
<div class="w-[36%]">发布人: {{ i.userName }}</div>
<div class="w-[20%]">{{ i.createTime?.slice(0, 10) }}</div>
</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>

View File

@ -8,53 +8,49 @@ import { useDate } from '@/views/home/hooks/useDate'
const { day, week } = useDate() const { day, week } = useDate()
const { push } = useRouter() const { push } = useRouter()
const array = ref<any[]>([ const array = ref<any[]>([
{ {
content1: '将扩大的机遇转为成果 更强更大地展翅飞翔', content1: '将扩大的机遇转为成果 更强更大地展翅飞翔',
content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう', content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう',
year: '2023年' year: '2023年'
}, },
{ content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' }, { content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' },
{ {
content1: '以“重大变化”为契机 向新课题发起挑战', content1: '以“重大变化”为契机 向新课题发起挑战',
content2: '', content2: '',
year: '2021年' year: '2021年'
}, },
{ {
content1: '加速推进三个协创 决胜于变化的时代', content1: '加速推进三个协创 决胜于变化的时代',
content2: '', content2: '',
year: '2020年' year: '2020年'
}, },
{ {
content1: '以三个协创为轴心 人人迅速果断行动', content1: '以三个协创为轴心 人人迅速果断行动',
content2: '', content2: '',
year: '2016年' year: '2016年'
}, },
{ {
content1: '突破壁垒 集中优势 不断挑战新课题', content1: '突破壁垒 集中优势 不断挑战新课题',
content2: '', content2: '',
year: '2018年' year: '2018年'
}, },
{ {
content1: '坚持以人为轴心,融合新的力量', content1: '坚持以人为轴心,融合新的力量',
content2: '集团上下齐心协力提升企业价值', content2: '集团上下齐心协力提升企业价值',
year: '2017年' year: '2017年'
}, },
{ content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' }, { content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' },
{ content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' } { content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' }
]) ])
let flag = ref(false)
const switchImg = () => {
flag.value = !flag.value
}
</script> </script>
<template> <template>
<HomeHead class="top"> <HomeHead class="top">
<template #content> <template #content>
<!-- <HomeHeadSearch /> --> <!-- <HomeHeadSearch /> -->
</template> </template>
</HomeHead> </HomeHead>
<!-- <div class="h-full relative flex flex-col"> <!-- <div class="h-full relative flex flex-col">
<div class="font-600 flex items-end mt27px"> <div class="font-600 flex items-end mt27px">
<div class="text-36px">集团方针</div> <div class="text-36px">集团方针</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
@ -74,55 +70,41 @@ const switchImg = () => {
</div> </div>
</div> </div>
</div> --> </div> -->
<div class="mt30px mr20px flex w100% relative overflow-hidden"> <div class="mt30px mr20px flex w100%">
<!-- <img src="../../../assets/images/fzqiet3.png" class="w100%" /> --> <img src="../../../assets/images/fzqiet3.png" class="w100%" />
<img </div>
src="../../../assets/images/jjllt.jpg"
class="w100% transition-all duration-500"
:class="flag ? '-translate-x-full' : ''"
/>
<img
src="../../../assets/images/jjllt-right.jpg"
class="w100% transition-all duration-500"
:class="flag ? '-translate-x-full' : ''"
/>
<div
@click="switchImg"
class="absolute top-56px right-40px w-300px h50px z-10 cursor-pointer"
></div>
</div>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.top { .top {
position: absolute; position: absolute;
right: 30px; right: 30px;
top: -92px; top: -92px;
} }
.g-wrapper { .g-wrapper {
border-radius: 18px; border-radius: 18px;
border: 1px solid #e7ebf5; border: 1px solid #e7ebf5;
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
overflow: hidden; overflow: hidden;
.timeline { .timeline {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #142142; color: #142142;
.one { .one {
position: relative; position: relative;
.year { .year {
left: -132px; left: -132px;
top: -14px; top: -14px;
color: #003cb7; color: #003cb7;
font-size: 26px; font-size: 26px;
font-weight: normal; font-weight: normal;
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
} }
} }
} }
} }
</style> </style>

View File

@ -3,74 +3,76 @@
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
import { useDate } from '@/views/home/hooks/useDate' import { useDate } from '@/views/home/hooks/useDate'
import { NForm, NFormItem, NInput, NModal, NButton, useMessage } from 'naive-ui' import {NForm,NFormItem,NInput,NModal,NButton,useMessage} from 'naive-ui'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from "element-plus/lib/locale/lang/zh-cn";
import UserPage from '@/views/home/intelligence/process/UserPages.vue' import UserPage from '@/views/home/intelligence/process/UserPages.vue'
import Editor from '@/views/home/intelligence/components/TinyECE.vue' import Editor from '@/views/home/intelligence/components/TinyECE.vue'
import { addPageInv } from '@/api/daikin/base' import {addPageInv} from '@/api/daikin/base'
const message = useMessage() const message = useMessage()
const { day, week } = useDate() const { day, week } = useDate()
const { push } = useRouter() const { push } = useRouter()
let rules = { let rules = {
title: { title: {
required: false, required: false,
message: '请输入标题', message: '请输入标题',
trigger: 'blur' trigger: 'blur'
}, },
actName: { actName:{
required: false, required: false,
message: '请输入名称', message: '请输入名称',
trigger: 'blur' trigger: 'blur'
}, },
actSTime: { actSTime: {
required: false, required: false,
message: '请选择开始', message: '请选择开始',
trigger: 'blur' trigger: 'blur'
}, },
actETime: { actETime: {
required: false, required: false,
message: '请选择结束', message: '请选择结束',
trigger: 'blur' trigger: 'blur'
}, },
position: { position:{
required: false, required: false,
message: '请输入职务', message: '请输入职务',
trigger: 'blur' trigger: 'blur'
} },
} }
const showModals = ref(false) const showModals =ref(false)
const showModal = ref(false) const showModal = ref(false)
const dataList = ref() const dataList = ref()
const handleChild = (data) => { const handleChild = (data)=>{
const { showModal: show, multipleSelection } = data const { showModal: show, multipleSelection } = data
showModal.value = unref(show) showModal.value = unref(show)
dataList.value = unref(multipleSelection) dataList.value = unref(multipleSelection)
} }
const CloseThis = (data) => { const CloseThis = (data)=>{
showModal.value = data showModal.value = data
} }
const handleClose = (tag: any) => { const handleClose = (tag: any) => {
dataList.value.splice(dataList.value.indexOf(tag), 1)
console.log(dataList.value) dataList.value.splice(dataList.value.indexOf(tag), 1)
console.log( dataList.value)
} }
const formValue = ref({ const formValue = ref({
title: '', title:'',
content: '', content:'',
actName: '', actName:'',
actSTime: '', actSTime:'',
actETime: '', actETime:'',
position: '', position:'',
userIdList: [] userIdList:[],
}) })
const editorContent = ref() const editorContent =ref()
function escapeHTML(html: string): string { function escapeHTML(html: string): string {
const tempElement = document.createElement('div') const tempElement = document.createElement('div');
tempElement.textContent = html tempElement.textContent = html;
return tempElement.innerHTML return tempElement.innerHTML;
} }
// //
const handleChild2 = (data: string) => { const handleChild2 = (data: string) => {
@ -78,184 +80,152 @@ const handleChild2 = (data: string) => {
} }
async function sure() { async function sure() {
const cont = editorContent.value const cont = editorContent.value
const content = escapeHTML(cont) const content = escapeHTML(cont)
const { title, actName, actSTime, actETime, position } = formValue.value const {title, actName, actSTime, actETime,position } = formValue.value
const starTime = new Date(actSTime).getTime()
const endTime = new Date(actETime).getTime() const starTime = new Date(actSTime).getTime()
console.log(starTime, endTime) const endTime = new Date(actETime).getTime()
let userIdList: any[] = [] console.log(starTime,endTime)
if (!dataList.value) { let userIdList: any[] =[]
message.success('请选择要提醒的对象') if(!dataList.value){
return message.success("请选择要提醒的对象")
} return
dataList.value.forEach((i: { userId: any }) => { }
userIdList.push(i.userId) dataList.value.forEach((i: { userId: any })=>{
}) userIdList.push(i.userId)
console.log(formValue.value, dataList, content) })
if (userIdList.length < 0) return console.log(formValue.value,dataList,content)
let formdata = new FormData() if(userIdList.length<0) return
formdata.append('title', title) let formdata = new FormData();
formdata.append('actName', actName) formdata.append("title",title);
formdata.append('actSTime', starTime) formdata.append("actName",actName);
formdata.append('actETime', endTime) formdata.append("actSTime",starTime);
formdata.append('content', content) formdata.append("actETime",endTime);
formdata.append('position', position) formdata.append("content",content);
formdata.append('userIdList', userIdList) formdata.append("position",position);
const { msg, code } = await addPageInv(formdata, { formdata.append("userIdList",userIdList);
headers: { 'Content-Type': 'application/form-data' } const { msg, code } = await addPageInv(formdata,{headers: {'Content-Type': 'application/form-data'}})
}) if (code === 200) {
if (code === 200) { message.success("添加成功")
message.success('添加成功') }
} else { else { message.success(msg); }
message.success(msg)
}
} }
</script> </script>
<template> <template>
<HomeHead class="top"> <HomeHead class="top">
<template #content> <template #content>
<!-- <HomeHeadSearch /> --> <!-- <HomeHeadSearch /> -->
</template> </template>
</HomeHead> </HomeHead>
<div class="h-full relative flex flex-col"> <div class="h-full relative flex flex-col">
<div class="font-600 flex items-end mt27px"> <div class="font-600 flex items-end mt27px">
<div class="text-36px">邀请</div> <div class="text-36px">邀请</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
<div class="text-18px">{{ week }}</div> <div class="text-18px">{{ week }}</div>
</div>
<div class="g-wrapper flex-1 mt30px p30px">
<n-form
ref="formRef"
:label-width="300"
:model="formValue"
:rules="rules"
size="medium"
require-mark-placement="left"
>
<n-form-item label="标题" path="title">
<n-input v-model:value="formValue.title" placeholder="" />
</n-form-item>
<n-form-item label="活动名称" path="actName">
<n-input v-model:value="formValue.actName" placeholder="" />
</n-form-item>
<n-form-item label="职位" path="position">
<n-input v-model:value="formValue.position" placeholder="" />
</n-form-item>
<n-form-item label="开始时间" path="actSTime">
<el-config-provider :locale="zhCn">
<el-date-picker
v-model="formValue.actSTime"
type="datetime"
placeholder="请选择时间"
format="YYYY/MM/DD HH:mm:ss"
/>
</el-config-provider>
</n-form-item>
<n-form-item label="结束时间" path="actETime">
<el-config-provider :locale="zhCn">
<el-date-picker
v-model="formValue.actETime"
type="datetime"
placeholder="请选择时间"
format="YYYY/MM/DD HH:mm:ss"
/>
</el-config-provider>
</n-form-item>
<n-form-item label="内容" path="content" class="text-#000">
<Editor @getChildData="handleChild2"></Editor>
</n-form-item>
</n-form>
<n-form-item>
<div>
<n-button @click="showModals = true"> 文本内容预览</n-button>
</div> </div>
</n-form-item> <div class="g-wrapper flex-1 mt30px p30px">
<n-button @click="showModal = true"> 情报公开范围 </n-button> <n-form ref="formRef" :label-width="300" :model="formValue" :rules="rules" size="medium"
<div class="mt15px h100px overflow-y-auto"> require-mark-placement="left">
<el-tag <n-form-item label="标题" path="title">
v-for="i in dataList" <n-input v-model:value="formValue.title" placeholder="" />
:key="i" </n-form-item>
class="mx-1" <n-form-item label="活动名称" path="actName">
closable <n-input v-model:value="formValue.actName" placeholder="" />
:disable-transitions="false" </n-form-item>
@close="handleClose(i)" <n-form-item label="职位" path="position">
type="info" <n-input v-model:value="formValue.position" placeholder="" />
size="large" </n-form-item>
> <n-form-item label="开始时间" path="actSTime">
{{ i.nickName }} <el-config-provider :locale="zhCn">
</el-tag> <el-date-picker v-model="formValue.actSTime" type="datetime" placeholder="请选择时间" format="YYYY/MM/DD HH:mm:ss"/>
</div> </el-config-provider>
</n-form-item>
<n-form-item label="结束时间" path="actETime">
<el-config-provider :locale="zhCn">
<el-date-picker v-model="formValue.actETime" type="datetime" placeholder="请选择时间" format="YYYY/MM/DD HH:mm:ss"/>
</el-config-provider>
</n-form-item>
<n-form-item label="内容" path="content" class="text-#000">
<Editor @getChildData="handleChild2"></Editor>
</n-form-item>
<n-button </n-form>
attr-type="button"
@click="sure" <n-form-item>
style=" <div>
background-color: #3870e5; <n-button @click="showModals = true"> 文本内容预览</n-button>
border-radius: 5px; </div>
color: #fff; </n-form-item>
margin-left: 10px; <n-button @click="showModal = true">
margin-top: 20px; 情报公开范围
padding: 0 20px; </n-button>
" <div class="mt15px h100px overflow-y-auto">
> <el-tag v-for="i in dataList" :key="i" class="mx-1" closable :disable-transitions="false"
提交 @close="handleClose(i)" type="info" size="large">
</n-button> {{ i.nickName }}
</div> </el-tag>
</div> </div>
<n-modal v-model:show="showModal">
<UserPage @clickChild="handleChild" @CloseThis="CloseThis"></UserPage>
</n-modal>
<n-modal v-model:show="showModals">
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
<div class="overflow-y-auto h800px container" v-html="editorContent"></div>
</div>
</n-modal>
<div <n-button attr-type="button" @click="sure" style="background-color: #3870E5; border-radius: 5px; color: #fff;margin-left: 10px;margin-top: 20px; padding: 0 20px;">
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)" </n-button>
> </div>
<img src="@/assets/images/chah.png" />
<br /> </div>
<div class="text-#5683DB text-36px">做成中,敬请期待</div> <n-modal v-model:show="showModal">
</div> <UserPage @clickChild="handleChild" @CloseThis="CloseThis"></UserPage>
</n-modal>
<n-modal v-model:show="showModals">
<div class=" flex w80% p30px bg-#fff my40px rounded-30px">
<div class=" overflow-y-auto h800px container" v-html="editorContent"></div>
</div>
</n-modal>
<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>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.top { .top {
position: absolute; position: absolute;
right: 30px; right: 30px;
top: -92px; top: -92px;
} }
.g-wrapper { .g-wrapper {
border-radius: 18px; border-radius: 18px;
border: 1px solid #e7ebf5; border: 1px solid #E7EBF5;
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
overflow: auto; overflow: auto;
height: 800px; height: 800px;
background-color: #fff; background-color: #fff;
.timeline { .timeline {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #142142; color: #142142;
.one { .one {
position: relative; position: relative;
.year { .year{
left: -132px; left: -132px;
top: -14px; top: -14px;
color: #003cb7; color: #003CB7;
font-size: 26px; font-size: 26px;
font-weight: normal; font-weight: normal;
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
} }
}
} }
}
} }
</style> </style>

View File

@ -3,259 +3,233 @@
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
import { useDate } from '@/views/home/hooks/useDate' import { useDate } from '@/views/home/hooks/useDate'
import { NForm, NFormItem, NInput, NModal, NButton, useMessage } from 'naive-ui' import {NForm,NFormItem,NInput,NModal,NButton,useMessage} from 'naive-ui'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from "element-plus/lib/locale/lang/zh-cn";
import UserPage from '@/views/home/intelligence/process/UserPages.vue' import UserPage from '@/views/home/intelligence/process/UserPages.vue'
import Editor from '@/views/home/intelligence/components/TinyECE.vue' import Editor from '@/views/home/intelligence/components/TinyECE.vue'
import { addPageVisit } from '@/api/daikin/base' import {addPageVisit} from '@/api/daikin/base'
const message = useMessage() const message = useMessage()
const { day, week } = useDate() const { day, week } = useDate()
const { push } = useRouter() const { push } = useRouter()
let rules = { let rules = {
title: { title: {
required: false, required: false,
message: '请输入标题', message: '请输入标题',
trigger: 'blur' trigger: 'blur'
}, },
actName: { actName:{
required: false, required: false,
message: '请输入名称', message: '请输入名称',
trigger: 'blur' trigger: 'blur'
}, },
actSTime: { actSTime: {
required: false, required: false,
message: '请选择开始', message: '请选择开始',
trigger: 'blur' trigger: 'blur'
}, },
actETime: { actETime: {
required: false, required: false,
message: '请选择结束', message: '请选择结束',
trigger: 'blur' trigger: 'blur'
}, },
position: { position:{
required: false, required: false,
message: '请输入职务', message: '请输入职务',
trigger: 'blur' trigger: 'blur'
} },
} }
const showModal = ref(false) const showModal = ref(false)
const dataList = ref() const dataList = ref()
const handleChild = (data) => { const handleChild = (data)=>{
const { showModal: show, multipleSelection } = data const { showModal: show, multipleSelection } = data
showModal.value = unref(show) showModal.value = unref(show)
dataList.value = unref(multipleSelection) dataList.value = unref(multipleSelection)
} }
const CloseThis = (data) => { const CloseThis = (data)=>{
showModal.value = data showModal.value = data
} }
const handleClose = (tag: any) => { const handleClose = (tag: any) => {
dataList.value.splice(dataList.value.indexOf(tag), 1)
console.log(dataList.value) dataList.value.splice(dataList.value.indexOf(tag), 1)
console.log( dataList.value)
} }
const formValue = ref({ const formValue = ref({
title: '', title:'',
content: '', content:'',
actName: '', actName:'',
actSTime: '', actSTime:'',
actETime: '', actETime:'',
position: '', position:'',
userIdList: [] userIdList:[],
}) })
const editorContent = ref() const editorContent =ref()
function escapeHTML(html: string): string { function escapeHTML(html: string): string {
const tempElement = document.createElement('div') const tempElement = document.createElement('div');
tempElement.textContent = html tempElement.textContent = html;
return tempElement.innerHTML return tempElement.innerHTML;
} }
const showModals = ref(false) const showModals =ref(false)
// //
const handleChild2 = (data: string) => { const handleChild2 = (data: string) => {
editorContent.value = data editorContent.value = data
} }
async function sure() { async function sure() {
const cont = editorContent.value const cont = editorContent.value
const content = escapeHTML(cont) const content = escapeHTML(cont)
const { title, actName, actSTime, actETime, position } = formValue.value const {title, actName, actSTime, actETime,position } = formValue.value
const starTime = new Date(actSTime).getTime()
const endTime = new Date(actETime).getTime() const starTime = new Date(actSTime).getTime()
console.log(starTime, endTime) const endTime = new Date(actETime).getTime()
let userIdList: any[] = [] console.log(starTime,endTime)
if (!dataList.value) { let userIdList: any[] =[]
message.success('请选择要提醒的对象') if(!dataList.value){
return message.success("请选择要提醒的对象")
} return
dataList.value.forEach((i: { userId: any }) => { }
userIdList.push(i.userId) dataList.value.forEach((i: { userId: any })=>{
}) userIdList.push(i.userId)
console.log(formValue.value, dataList, content) })
if (userIdList.length < 0) return console.log(formValue.value,dataList,content)
let formdata = new FormData() if(userIdList.length<0) return
formdata.append('title', title) let formdata = new FormData();
formdata.append('actName', actName) formdata.append("title",title);
formdata.append('actSTime', starTime) formdata.append("actName",actName);
formdata.append('actETime', endTime) formdata.append("actSTime",starTime);
formdata.append('content', content) formdata.append("actETime",endTime);
formdata.append('position', position) formdata.append("content",content);
formdata.append('userIdList', userIdList) formdata.append("position",position);
const { msg, code } = await addPageVisit(formdata, { formdata.append("userIdList",userIdList);
headers: { 'Content-Type': 'application/form-data' } const { msg, code } = await addPageVisit(formdata,{headers: {'Content-Type': 'application/form-data'}})
}) if (code === 200) {
if (code === 200) { message.success("添加成功")
message.success('添加成功') }
} else { else { message.success(msg); }
message.success(msg)
}
} }
</script> </script>
<template> <template>
<HomeHead class="top"> <HomeHead class="top">
<template #content> <template #content>
<!-- <HomeHeadSearch /> --> <!-- <HomeHeadSearch /> -->
</template> </template>
</HomeHead> </HomeHead>
<div class="h-full relative flex flex-col"> <div class="h-full relative flex flex-col">
<div class="font-600 flex items-end mt27px"> <div class="font-600 flex items-end mt27px">
<div class="text-36px">拜访</div> <div class="text-36px">拜访</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
<div class="text-18px">{{ week }}</div> <div class="text-18px">{{ week }}</div>
</div>
<div class="g-wrapper flex-1 mt30px p30px">
<n-form
ref="formRef"
:label-width="300"
:model="formValue"
:rules="rules"
size="medium"
require-mark-placement="left"
>
<n-form-item label="标题" path="title">
<n-input v-model:value="formValue.title" placeholder="" />
</n-form-item>
<n-form-item label="活动名称" path="actName">
<n-input v-model:value="formValue.actName" placeholder="" />
</n-form-item>
<n-form-item label="职位" path="position">
<n-input v-model:value="formValue.position" placeholder="" />
</n-form-item>
<n-form-item label="开始时间" path="actSTime">
<el-config-provider :locale="zhCn">
<el-date-picker
v-model="formValue.actSTime"
type="datetime"
placeholder="请选择时间"
format="YYYY/MM/DD HH:mm:ss"
/>
</el-config-provider>
</n-form-item>
<n-form-item label="结束时间" path="actETime">
<el-config-provider :locale="zhCn">
<el-date-picker
v-model="formValue.actETime"
type="datetime"
placeholder="请选择时间"
format="YYYY/MM/DD HH:mm:ss"
/>
</el-config-provider>
</n-form-item>
<n-form-item label="内容" path="content" class="text-#000">
<Editor @getChildData="handleChild2"></Editor>
</n-form-item>
</n-form>
<n-form-item>
<div>
<n-button @click="showModals = true"> 文本内容预览</n-button>
</div> </div>
</n-form-item> <div class="g-wrapper flex-1 mt30px p30px">
<n-form ref="formRef" :label-width="300" :model="formValue" :rules="rules" size="medium"
require-mark-placement="left">
<n-form-item label="标题" path="title">
<n-input v-model:value="formValue.title" placeholder="" />
</n-form-item>
<n-form-item label="活动名称" path="actName">
<n-input v-model:value="formValue.actName" placeholder="" />
</n-form-item>
<n-form-item label="职位" path="position">
<n-input v-model:value="formValue.position" placeholder="" />
</n-form-item>
<n-form-item label="开始时间" path="actSTime">
<el-config-provider :locale="zhCn">
<el-date-picker v-model="formValue.actSTime" type="datetime" placeholder="请选择时间" format="YYYY/MM/DD HH:mm:ss"/>
</el-config-provider>
</n-form-item>
<n-form-item label="结束时间" path="actETime">
<el-config-provider :locale="zhCn">
<el-date-picker v-model="formValue.actETime" type="datetime" placeholder="请选择时间" format="YYYY/MM/DD HH:mm:ss"/>
</el-config-provider>
</n-form-item>
<n-form-item label="内容" path="content" class="text-#000">
<Editor @getChildData="handleChild2"></Editor>
</n-form-item>
<n-button @click="showModal = true"> 情报公开范围 </n-button> </n-form>
<div class="mt15px h100px overflow-y-auto">
<el-tag
v-for="i in dataList" <n-form-item>
:key="i" <div>
class="mx-1" <n-button @click="showModals = true"> 文本内容预览</n-button>
closable </div>
:disable-transitions="false" </n-form-item>
@close="handleClose(i)"
type="info"
size="large"
>
{{ i.nickName }}
</el-tag>
</div>
<n-button
attr-type="button"
@click="sure"
style="
background-color: #3870e5; <n-button @click="showModal = true">
border-radius: 5px; 情报公开范围
color: #fff; </n-button>
margin-left: 10px; <div class="mt15px h100px overflow-y-auto">
margin-top: 20px; <el-tag v-for="i in dataList" :key="i" class="mx-1" closable :disable-transitions="false"
padding: 0 20px; @close="handleClose(i)" type="info" size="large">
" {{ i.nickName }}
> </el-tag>
提交 </div>
</n-button>
<n-button attr-type="button" @click="sure" style="background-color: #3870E5; border-radius: 5px; color: #fff;margin-left: 10px;margin-top: 20px; padding: 0 20px;">
提交
</n-button>
</div>
</div> </div>
</div> <n-modal v-model:show="showModal">
<n-modal v-model:show="showModal"> <UserPage @clickChild="handleChild" @CloseThis="CloseThis"></UserPage>
<UserPage @clickChild="handleChild" @CloseThis="CloseThis"></UserPage> </n-modal>
</n-modal> <n-modal v-model:show="showModals">
<n-modal v-model:show="showModals"> <div class=" flex w80% p30px bg-#fff my40px rounded-30px">
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
<div class="overflow-y-auto h800px container" v-html="editorContent"></div> <div class=" overflow-y-auto h800px container" v-html="editorContent"></div>
</div>
</n-modal>
<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>
</n-modal>
<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>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
.top { .top {
position: absolute; position: absolute;
right: 30px; right: 30px;
top: -92px; top: -92px;
} }
.g-wrapper { .g-wrapper {
border-radius: 18px; border-radius: 18px;
border: 1px solid #e7ebf5; border: 1px solid #E7EBF5;
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
overflow: auto; overflow: auto;
height: 800px; height: 800px;
background-color: #fff; background-color: #fff;
.timeline { .timeline {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #142142; color: #142142;
.one { .one {
position: relative; position: relative;
.year { .year{
left: -132px; left: -132px;
top: -14px; top: -14px;
color: #003cb7; color: #003CB7;
font-size: 26px; font-size: 26px;
font-weight: normal; font-weight: normal;
text-align: center; text-align: center;
line-height: 50px; line-height: 50px;
} }
}
} }
}
} }
</style> </style>

View File

@ -1,105 +0,0 @@
<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 } from '@/api/daikin/base'
import { noticeld } from '@/stores/modules/noticeId'
import { searchStore } from '@/stores/modules/search'
import { message } from '@/utils/message'
const store = noticeld()
const store2 = useUserStore()
const searchS = searchStore()
const { day, week } = useDate()
const { push } = useRouter()
const route = useRoute()
const listData = ref()
const flg =ref()
let keywords =ref()
async function getSearchList() {
const keyword = keywords.value
const { rows } = await getArticlePage({ pageNum: 1, pageSize: 100, type: 2, position: 'search', keyword } as any);
listData.value = rows
}
watchSyncEffect(()=>{
keywords.value = searchS.search.content
// console.log(keywords.value)
getSearchList()
})
onMounted(() => {
getSearchList()
flg.value = store2.user.isReview > 0
console.log(flg.value,store2.user.isReview)
})
const clickTo=(obj)=>{
// console.log(obj)
if(obj.isSelect===1){
push(`${route.path}/${obj.id}`)
}
else{
message.info("您没有权限查看!")
}
}
</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 v-if="listData&&listData.length>0" v-for="i in listData" :key="i"
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px max-w-805px">
<span class="truncate flex-1 w0 text-#142142 hover:underline " @click=" clickTo(i)">{{ i.title }}</span>
<span class="shrink-0 ml38px text-#808696">{{ i.createTime }}</span>
<!-- <span v-if="flg" class="ml20px text-#808696 text-16px">: {{ i.publishName }}</span> -->
</div>
<div v-else class="w-full h-hull">
<el-empty :image-size="200" />
</div>
</div>
</div>
</template>
<style scoped lang="less">
.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>

View File

@ -3,12 +3,10 @@ import { useUserStore } from '@/stores/modules/user'
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
import { useDate } from '@/views/home/hooks/useDate' import { useDate } from '@/views/home/hooks/useDate'
import { getArticlePage, getSearchGlobal } from '@/api/daikin/base' import { getArticlePage } from '@/api/daikin/base'
import { noticeld } from '@/stores/modules/noticeId' import { noticeld } from '@/stores/modules/noticeId'
import { searchStore } from '@/stores/modules/search' import { searchStore } from '@/stores/modules/search'
import { message } from '@/utils/message' import { message } from '@/utils/message'
import { NPopover } from 'naive-ui'
const store = noticeld() const store = noticeld()
const store2 = useUserStore() const store2 = useUserStore()
const searchS = searchStore() const searchS = searchStore()
@ -17,282 +15,81 @@ const { push } = useRouter()
const route = useRoute() const route = useRoute()
const listData = ref() const listData = ref()
const flg = ref() const flg =ref()
let keywords = 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() { async function getSearchList() {
loading.value = true const keyword = keywords.value
const keyword = searchS.search.content const { rows } = await getArticlePage({ pageNum: 1, pageSize: 100, type: 2, position: 'search', keyword } as any);
// const { rows } = await getArticlePage({ pageNum: 1, pageSize: 100, type: 2, position: 'search', keyword } as any); listData.value = rows
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
} }
watchEffect(() => { watchSyncEffect(()=>{
searchS.search.time keywords.value = searchS.search.content
getSearchList(searchS.search.content) // console.log(keywords.value)
getSearchList()
}) })
onMounted(() => {
const codePath = { getSearchList()
App_Article: { flg.value = store2.user.isReview > 0
path: '/intelligence/outside/', console.log(flg.value,store2.user.isReview)
modulePath: '/Home/intelligence' })
}, const clickTo=(obj)=>{
App_Market: { // console.log(obj)
path: '/Home/market', if(obj.isSelect===1){
modulePath: '/Home/market' push(`${route.path}/${obj.id}`)
}, }
App_data_platform: { else{
path: '/Home/cd', message.info("您没有权限查看!")
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 clickItem = (item) => {
const { id, filePath, isSelect, moduleCode, fileCommon = {} } = item
console.log('🚀 ~ file: index.vue:104 ~ item:', item)
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 goModule = (item, type) => {
const { moduleCode, id } = item
const { modulePath, path } = codePath[moduleCode]
if (modulePath) {
if (type === 'module') {
push(modulePath)
} else {
push(path + id)
} }
}
} }
const handleSizeChange = (e) => {
pageInfo.pageSize = e
pageInfo.currentPage = 1
getSearchList()
}
// const handleCurrentChange = (e) => {
// pageInfo.currentPage = e
// getSearchList()
// }
const fileSize = 24 * 1024 * 1024
</script> </script>
<template> <template>
<HomeHead class="top"> <HomeHead class="top">
<template #content> <template #content>
<!-- <HomeHeadSearch /> --> <!-- <HomeHeadSearch /> -->
</template> </template>
</HomeHead> </HomeHead>
<div class="h-full relative flex flex-col"> <div class="h-full relative flex flex-col">
<div class="font-600 flex items-end mt30px"> <div class="font-600 flex items-end mt30px">
<div class="text-36px">搜索列表</div> <div class="text-36px">搜索列表</div>
<div class="text-18px ml40px mr25px">{{ day }}</div> <div class="text-18px ml40px mr25px">{{ day }}</div>
<div class="text-18px">{{ week }}</div> <div class="text-18px">{{ week }}</div>
</div> </div>
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px"> <div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px">
<div class="h-800px mt-30px relative" v-if="listData && listData.length > 0">
<el-table
v-loading="loading" <div v-if="listData&&listData.length>0" v-for="i in listData" :key="i"
:data="listData" class="mt8px cursor-pointer flex items-center p15px pl20px text-18px max-w-805px">
style="width: 100%; margin-bottom: 20px" <span class="truncate flex-1 w0 text-#142142 hover:underline " @click=" clickTo(i)">{{ i.title }}</span>
row-key="id" <span class="shrink-0 ml38px text-#808696">{{ i.createTime }}</span>
border <!-- <span v-if="flg" class="ml20px text-#808696 text-16px">: {{ i.publishName }}</span> -->
default-expand-all </div>
:header-cell-style="{ <div v-else class="w-full h-hull">
background: '#2A7BF7', <el-empty :image-size="200" />
color: '#fff', </div>
height: '70px',
lineHeight: '60px',
textAlign: 'center',
'font-size': '24px'
}"
:cell-style="{
'text-align': 'center',
'overflow-y': 'auto',
height: '60px'
}"
>
<el-table-column prop="moduleName" label="模块名称" width="150">
<template #default="{ row }">
<span class="text-16px">{{ codeType[row.moduleCode] }}</span>
<!-- <n-popover trigger="hover" placement="top-start">
<template #trigger>
</template>
<span>点击进入 {{ codeType[row.moduleCode] }}</span>
</n-popover> -->
</template>
</el-table-column>
<el-table-column prop="title" label="标题" show-overflow-tooltip> </el-table-column>
<el-table-column label="部门" prop="departName" show-overflow-tooltip width="150" />
<el-table-column prop="userName" label="发布人" show-overflow-tooltip width="150" />
<el-table-column label="发布日期" prop="createTime" show-overflow-tooltip width="220" />
<el-table-column label="操作" width="270">
<template #default="{ row }">
<div class="">
<div class="inline-block">
<el-button
v-if="row.moduleCode === 'App_Article'"
style="color: #000"
@click="goModule(row, 'path')"
>详情
</el-button>
<template v-else>
<n-popover
v-if="(row.fileCommon?.fileSize || 0) > fileSize"
trigger="hover"
placement="top-start"
>
<template #trigger>
<el-button style="color: #000" @click="clickItem(row)"></el-button>
</template>
<span>该文件超过25MB无法进行预览点击进行下载</span>
</n-popover>
<el-button v-else style="color: #000" @click="clickItem(row)"></el-button>
</template>
</div>
<el-button type="primary" class="ml-16px" @click="goModule(row, 'module')">
进入模块</el-button
>
</div>
</template>
</el-table-column>
</el-table>
<div class="absolute bottom-20px 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="getSearchList"
/>
<!-- @size-change="handleSizeChange" -->
</div> </div>
</div>
<div v-else class="w-full h-hull">
<el-empty :image-size="300" description="搜索结果为空~" />
</div>
</div> </div>
</div>
</template> </template>
<style scoped lang="less"> <style scoped lang="less">
:deep(.el-empty__description) {
p {
font-size: 20px;
}
}
.top { .top {
position: absolute; position: absolute;
right: 30px; right: 30px;
top: -92px; top: -92px;
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 1px; width: 1px;
} }
.q-wrapper { .q-wrapper {
border-radius: 18px; border-radius: 18px;
border: 1px solid #e7ebf5; border: 1px solid #E7EBF5;
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32); box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
overflow: auto; overflow: auto;
&::after { &::after {
content: ' '; content: ' ';
background-image: url('@/assets/images/bg-card.svg'); background-image: url('@/assets/images/bg-card.svg');
pointer-events: none; pointer-events: none;
@ -305,5 +102,4 @@ const fileSize = 24 * 1024 * 1024
left: 0; left: 0;
top: 0; top: 0;
} }
} }</style>
</style>

View File

@ -15,394 +15,435 @@ 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
} }
if (menu.key === 'phone' && idx.value === index) { idx.value = index
push(menu.path) console.log(menu.key, 'key')
return if (!menu.key) return
} // if (menu.key === 'DataBase') {
idx.value = index // if (flag) {
if (!menu.key) return // push({ name: menu.key })
// if (menu.key === 'DataBase') { // flag = false
// if (flag) { // return
// push({ name: menu.key }) // }
// flag = false // flag = true
// return // setTimeout(() => {
// } // flag = false
// flag = true // }, 300)
// setTimeout(() => { // }
// flag = false if (menu.children) return
// }, 300) if (menu.key === 'DataBase') {
// } report({ moduleCode: 'App_Database' })
if (menu.children) return }
if (menu.key === 'DataBase') { push({ name: menu.key })
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">大金中国调达本部 HOMEPAGE</div> <div class="text-20px text-#fff font-600 mt6px">
大金中国调达本部 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>
<!-- max-h-636px --> <div class="pt10px pb10px flex-1 max-h-636px">
<div class="pt10px pb10px flex-1 max-h-836px"> <div
<div class="nav pl36px pr16px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#fff cursor-pointer hover:underline"
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"
v-for="(m, index) in Menus" :key="m.key"
:key="m.key" :class="
:class="activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''" activeMenuKey === m.key ? (m.children ? 'actives' : 'active') : ''
@click="() => menuHandler(m, index)" "
> @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" /> <div :class="activeMenuKey === m.key && 'onActive'">
<img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" /> <img
<span v-if="activeMenuKey === m.key"
class="text-22px font-900 leading-22px" :src="m.icon1"
:class=" class="w22px h22px mr16px mt--5px"
(m.key === 'link' || m.key === 'DataBase') && />
'underline border-b-0px border-b-solid' <img v-else :src="m.icon" class="w22px h22px mr16px mt--5px" />
" <span
> class="text-22px font-900 leading-22px"
<a v-if="m.link" class="no-underline text-#fff" :href="m.link"> {{ m.name }}</a> :class="
<span v-else> (m.key === 'link' || m.key === 'DataBase') &&
<a v-if="m.key === 'link' || m.key === 'DataBase'" class="text-#fff"> 'underline border-b-0px border-b-solid'
{{ m.name }}</a "
> >
<span v-else>{{ m.name }}</span> <a v-if="m.link" class="no-underline text-#fff" :href="m.link">
</span> {{ m.name }}</a
<span class="text-18px italic font-500" v-if="m.other">{{ m.other }}</span> >
</span> <span v-else>
</div> <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>
</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 v-if="item.link" class="no-underline !text-#fff flex" :href="item.link" <a
><span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"></span>{{ item.name }}</a v-if="item.link"
> class="no-underline !text-#fff flex"
<span v-else class="flex" :href="item.link"
><span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"></span ><span
>{{ item.name }}</span class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"
> ></span
</div> >{{ item.name }}</a
</div> >
</div> <span v-else class="flex"
</div> ><span
<div class="w7px h7px rd-7px bg-#fff block mr-8px mt4px"
v-if="false" ></span
class="w270px py14px my20px px24px flex rd-20px bg-#003cb7 hover:underline hover:cursor-pointer" >{{ item.name }}</span
style="box-shadow: 0 2rpx 14rpx 0 #00000069" >
> </div>
<div </div>
class="flex items-center text-18px" </div>
@click="push({ name: 'DataBase', query: { id: 267 } })" </div>
> <div
<img src="@/assets/images/dianhhh@2x.png" class="w22px h22px mr10px" /> 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
<n-popover class="flex items-center text-18px"
v-if="false" @click="push({ name: 'DataBase', query: { id: 267 } })"
trigger="hover" >
placement="top" <img
:style="{ '--n-border-radius': '8px' }" src="@/assets/images/dianhhh@2x.png"
> class="w22px h22px mr10px"
<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>
<span>{{ '公司内线公司内线公司内线' }}</span> </div>
</div> <n-popover
</n-popover> v-if="false"
<div class="p20px w270px rd-20px b-4px bg-#fff/4 b-4px b-solid b-#fff/23 text-14px relative"> trigger="hover"
<a placement="top"
href="http://172.31.119.37/scripts/cbgrn/grn.exe/portal/index" :style="{ '--n-border-radius': '8px' }"
target="_blank" >
class="no-underline text-#fff" <template #trigger> </template>
> <div
<div class="flex items-center text-18px hover:underline"> class="text-14px text-#285FE9 flex items-center hover:underline cursor-pointer"
<img src="@/assets/images/icon-book.svg" class="w22px h22px mr10px" /> >
个人日程 <img
</div> src="@/assets/images/wjqq@2x.png"
<!-- <div class="mt18px">9:00-10:00</div> 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"
>
<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 class="mt10px ml-30px opacity-70" @click="(e) => e.stopPropagation()"> <div
请点击上方链接登录cybouzu class="mt10px ml-30px opacity-70"
</div> @click="(e) => e.stopPropagation()"
</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.appLoginCount store.user.appLoginToDayCount
}} }}&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="border-bottom: 1px solid #dadada; font-weight: bold; color: #494a63" style="
> border-bottom: 1px solid #dadada;
大金空调中国相关 font-weight: bold;
<img color: #494a63;
@click="shorm = false" "
src="@/assets/images/chac@2x.png" >
class="w15px float-right mt5px mr5px" 大金空调中国相关
/> <img
</div> @click="shorm = false"
<div class="flex mt70px text-center"> src="@/assets/images/chac@2x.png"
<div class="w-full text-center"> class="w15px float-right mt5px mr5px"
<img src="@/assets/images/ewm1@2x.png" class="w200px" /> />
<div class="py10px bg-#377CFF text-#fff w200px rd-20px mt35px mx-auto"> </div>
大金空调中国视频号 <div class="flex mt70px text-center">
</div> <div class="w-full text-center">
</div> <img src="@/assets/images/ewm1@2x.png" class="w200px" />
<div class="w-full"> <div
<img src="@/assets/images/ewm2@2x.png" class="w200px" /> 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> </div>
</div> <div class="w-full">
</div> <img src="@/assets/images/ewm2@2x.png" class="w200px" />
</NModal> <div
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>

View File

@ -13,59 +13,59 @@ import PurgeIcons from 'vite-plugin-purge-icons'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
server: { server: {
proxy: { proxy: {
'/test-api': { '/test-api': {
target: 'http://admin.echo.mteam01.com/openApi/', target: 'http://admin.echo.mteam01.com/openApi/',
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径 rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径
} }
} }
}, },
resolve: { resolve: {
alias: { alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)) '@': fileURLToPath(new URL('./src', import.meta.url))
} }
}, },
plugins: [ plugins: [
vue(), vue(),
vueJsx(), vueJsx(),
Unocss({ Unocss({
presets: [presetUno()] presets: [presetUno()]
}), }),
AutoImport({ AutoImport({
imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数 imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数
dts: 'src/types/auto-import.d.ts', dts: 'src/types/auto-import.d.ts',
// eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912 // eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912
eslintrc: { eslintrc: {
enabled: false, // Default `false` enabled: false, // Default `false`
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable') globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
}, },
resolvers: [ElementPlusResolver()] resolvers: [ElementPlusResolver()]
}), }),
Components({ Components({
resolvers: [ElementPlusResolver()] resolvers: [ElementPlusResolver()]
}), }),
PurgeIcons(), PurgeIcons(),
ViteCompression({ ViteCompression({
algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli' algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli'
ext: '.gz', // 压缩后文件的扩展名 ext: '.gz', // 压缩后文件的扩展名
verbose: false verbose: false
}) })
], ],
build: { build: {
chunkSizeWarningLimit: 6300, chunkSizeWarningLimit: 4000,
sourcemap: false, // Builds sourcemaps for better debugging but could be disabled for performance sourcemap: false, // Builds sourcemaps for better debugging but could be disabled for performance
minify: 'esbuild', // Use 'terser' for minimizing your codes, it could be 'esbuild' but 'terser' is more accurate minify: 'esbuild', // Use 'terser' for minimizing your codes, it could be 'esbuild' but 'terser' is more accurate
rollupOptions: { rollupOptions: {
treeshake: true // Enable tree-shaking treeshake: true // Enable tree-shaking
}, },
terserOptions: { terserOptions: {
compress: { compress: {
// pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build // pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build
} }
} }
} }
}) })