main
wwl 2024-03-26 18:19:18 +08:00
parent 9ceffc71f9
commit a955287aba
10 changed files with 1300 additions and 1308 deletions

View File

@ -24,7 +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.3.7", "element-plus": "^2.6.2",
"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' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
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,55 +26,49 @@ 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 = ({ const scaleChange = ({ widthRatio, heightRatio }: { widthRatio: number; heightRatio: number }) => {
widthRatio, console.log('scaleChange', widthRatio, heightRatio)
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"
@ -88,40 +82,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>

View File

@ -10,73 +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 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 goFile = () => { const goFile = () => {
const { isSelect, filePath } = fileItem.value 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>
@ -96,49 +96,57 @@ 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>
</div> <!-- <img src="../../assets/images/2024fz.jpg" class="w100%" />
<div
class="absolute py10px left-880px top-250px pb-0px z-100 text-20px text-#285FE9 flex justify-center items-center hover:border-b-1px hover:border-b-solid hover:border-b-#285FE9 hover:cursor-pointer"
@click="goFile"
>
<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

@ -15,33 +15,37 @@ const store = useUserStore()
const { push } = useRouter() const { push } = useRouter()
const route = useRoute() const route = useRoute()
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes( const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(store.user.roleCode)
store.user.roleCode const Navs = [
) { name: '集团*部门方针' },
const Navs = [{ name: '集团*部门方针' }, { name: '年度活动日程表' }, { name: '其他链接' }, { name: '紧急联络' }, { name: 'CN/JP' }] { name: '年度活动日程表' },
{ 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>
@ -54,14 +58,18 @@ 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 class="absolute right-5 top-[-8px]" v-if="userCode && activeNav === '1-2'" type="primary" @click="shomks" <el-button
>管理</el-button class="absolute right-5 top-[-8px]"
> 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,96 +21,75 @@ 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 = [ const months = ['04', '05', '06', '07', '08', '09', '10', '11', '12', '01', '02', '03']
'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( console.log('🚀 ~ file: CSRContent23.vue:50 ~ csrSupplierObj:', csrSupplierObj)
'🚀 ~ file: CSRContent23.vue:50 ~ csrSupplierObj:', if (!csrSupplier.value.length) {
csrSupplierObj // message.warning('')
) csrSupplierObj.value = {}
if (!csrSupplier.value.length) { }
// message.warning('') })
csrSupplierObj.value = {} setTimeout(() => {
} 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 = const month = index || index === 0 ? query.value.year + '-' + months[index] : ''
index || index === 0 ? query.value.year + '-' + months[index] : '' csrSupplierList.value = []
csrSupplierList.value = [] selMonth.value = ''
selMonth.value = '' const req = { pageNum: 1, pageSize: 10, ...query.value, month }
const req = { pageNum: 1, pageSize: 10, ...query.value, month } req.supplierName
req.supplierName ? fetchCsrSupplierList(req).then((res: any) => {
? fetchCsrSupplierList(req).then((res: any) => { csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
csrSupplierList.value = (res.rows || []).filter( })
(item: any) => item.submitunCount > 0 : fetchCsrSupplierTopList(req).then((res: any) => {
) csrSupplierList.value = (res.rows || []).filter((item: any) => item.submitunCount > 0)
}) })
: fetchCsrSupplierTopList(req).then((res: any) => { selMonth.value = month ? +months[index] + '月' : ''
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()
@ -119,375 +98,329 @@ 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 ><img src="./images/yuny@2x.png" class="w25px mr5px mt--4px" /><span>明道云</span></a
>明道云</span >
></a </div>
> <div class="flex w-full h-80px p20px items-center mt10px">
</div> <div>
<div class="flex w-full h-80px p20px items-center mt10px"> <el-date-picker
<div> popper-class="dete-picker"
<el-date-picker v-model="query.year"
v-model="query.year" type="year"
type="year" @change="handleChange"
@change="handleChange" placeholder=""
placeholder="" :disabled-date="isDateDisabled"
:disabled-date="isDateDisabled" :clearable="false"
:clearable="false" value-format="YYYY"
value-format="YYYY" />
/> </div>
</div> <el-input
<el-input v-model.trim="query.supplierName"
v-model.trim="query.supplierName" class="w-50 m-2"
class="w-50 m-2" placeholder="供方名"
placeholder="供方名" prefix-icon="Search"
prefix-icon="Search" width="150px"
width="150px" />
/> <el-button type="primary" @click="handleChange"></el-button>
<el-button type="primary" @click="handleChange"></el-button> </div>
</div> <div class="w-full h-730px p20px" v-loading="loading">
<div class="w-full h-730px p20px" v-loading="loading"> <el-row :gutter="10" v-if="false">
<el-row :gutter="10" v-if="false"> <el-col :span="8"
<el-col :span="8" ><div class="times">
><div class="times"> <div class="text-#fff text-18px font-bold absolute left-40% top-18px">
<div <span class="text-30px">1</span>
class="text-#fff text-18px font-bold absolute left-40% top-18px" </div>
> <div
<span class="text-30px">1</span> class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
</div> >
<div 已提交45
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%" </div>
> <div
已提交45 class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
</div> >
<div 未提交100
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%" </div>
> </div></el-col
未提交100 >
</div> <el-col :span="8"
</div></el-col ><div class="time">
> <div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%">
<el-col :span="8" <span class="text-60px">2</span>
><div class="time"> </div>
<div </div></el-col
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%" >
> <el-col :span="8"
<span class="text-60px">2</span> ><div class="time">
</div> <div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%">
</div></el-col <span class="text-60px">3</span>
> </div>
<el-col :span="8" </div></el-col
><div class="time"> >
<div </el-row>
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%" <el-row :gutter="10">
> <el-col :span="8" v-for="(it, i) in months" :key="i">
<span class="text-60px">3</span> <div
</div> v-show="!loading"
</div></el-col :class="i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'"
> @click="handleMonth(i)"
</el-row> >
<el-row :gutter="10"> <div
<el-col :span="8" v-for="(it, i) in months" :key="i"> v-if="i > nowIndexMonth || query.year != jpMonth"
<div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
v-show="!loading" >
:class=" <span class="text-60px">{{ +it }}</span
i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time' >
" </div>
@click="handleMonth(i)" <template
> v-if="i <= nowIndexMonth && (query.year == jpMonth || !!csrSupplierObj[it])"
<div >
v-if="i > nowIndexMonth || query.year != jpMonth" <div class="text-#fff text-18px font-bold absolute left-40% top-24px">
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%" <span class="text-24px">{{ +it }}</span
> >
<span class="text-60px">{{ +it }}</span </div>
> <div
</div> class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
<template >
v-if=" 已提交{{ csrSupplierObj[it]?.submitedCount || 0 }}
i <= nowIndexMonth && </div>
(query.year == jpMonth || !!csrSupplierObj[it]) <div
" class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
> >
<div 未提交{{ csrSupplierObj[it]?.submitunCount || 0 }}
class="text-#fff text-18px font-bold absolute left-40% top-24px" </div>
> </template>
<span class="text-24px">{{ +it }}</span </div>
> </el-col>
</div> <el-col :span="8" v-if="false"
<div ><div class="time">
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl" <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
> <span class="text-60px">5</span>
已提交{{ csrSupplierObj[it]?.submitedCount || 0 }} </div>
</div> <template v-if="false">
<div <div
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl" class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15% rounded-xl"
> >
未提交{{ csrSupplierObj[it]?.submitunCount || 0 }} 已提交45
</div> </div>
</template> <div
</div> class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15% rounded-xl"
</el-col> >
<el-col :span="8" v-if="false" 未提交100
><div class="time"> </div>
<div </template>
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%" </div></el-col
> >
<span class="text-60px">5</span> <el-col :span="8" v-if="false"
</div> ><div class="time">
<template v-if="false"> <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
<div <span class="text-60px">6</span>
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15% rounded-xl" </div>
> </div></el-col
已提交45 >
</div> </el-row>
<div <el-row :gutter="10" v-if="false">
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15% rounded-xl" <el-col :span="8"
> ><div class="time">
未提交100 <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
</div> <span class="text-60px">7</span>
</template> </div>
</div></el-col </div></el-col
> >
<el-col :span="8" v-if="false" <el-col :span="8"
><div class="time"> ><div class="time">
<div <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%" <span class="text-60px">8</span>
> </div>
<span class="text-60px">6</span> </div></el-col
</div> >
</div></el-col <el-col :span="8"
> ><div class="times">
</el-row> <!-- <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"><span class="text-60px">9</span></div> -->
<el-row :gutter="10" v-if="false"> <div class="text-#fff text-18px font-bold absolute left-40% top-24px">
<el-col :span="8" <span class="text-24px">9</span>
><div class="time"> </div>
<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">7</span> 已提交45
</div> </div>
</div></el-col <div
> class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
<el-col :span="8" >
><div class="time"> 未提交100
<div </div>
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%" </div></el-col
> >
<span class="text-60px">8</span> </el-row>
</div> <el-row :gutter="10" v-if="false">
</div></el-col <el-col :span="8"
> ><div class="time">
<el-col :span="8" <div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%">
><div class="times"> <span class="text-60px">10</span>
<!-- <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"><span class="text-60px">9</span></div> --> </div>
<div </div></el-col
class="text-#fff text-18px font-bold absolute left-40% top-24px" >
> <el-col :span="8"
<span class="text-24px">9</span> ><div class="time">
</div> <div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%">
<div <span class="text-60px">11</span>
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl" </div>
> </div></el-col
已提交45 >
</div> <el-col :span="8"
<div ><div class="time">
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl" <div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%">
> <span class="text-60px">12</span>
未提交100 </div>
</div> </div></el-col
</div></el-col >
> </el-row>
</el-row> <el-row :gutter="10" v-if="false">
<el-row :gutter="10" v-if="false"> <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">1</span>
class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%" </div>
> <template v-if="false">
<span class="text-60px">10</span> <div
</div> class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
</div></el-col >
> 已提交45
<el-col :span="8" </div>
><div class="time"> <div
<div class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%" >
> 未提交100
<span class="text-60px">11</span> </div>
</div> </template>
</div></el-col </div></el-col
> >
<el-col :span="8" <el-col :span="8"
><div class="time"> ><div class="time">
<div <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%" <span class="text-60px">2</span>
> </div>
<span class="text-60px">12</span> </div></el-col
</div> >
</div></el-col <el-col :span="8"
> ><div class="time">
</el-row> <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
<el-row :gutter="10" v-if="false"> <span class="text-60px">3</span>
<el-col :span="8" </div>
><div class="time"> </div></el-col
<div >
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%" </el-row>
> </div>
<span class="text-60px">1</span> </div>
</div> <div class="cards">
<template v-if="false"> <div class="cards_title relative">未提交供应商明细({{ query.year }}{{ selMonth }})</div>
<div <div class="absolute top-24px !text-18px right-20px pt30px text-#4E7EE8">
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%" <span class="text-#ababab">更新时间{{ updateTime }}</span>
> </div>
已提交45 <div ref="msgScoll" class="px20px w-full h800px cent_box overflow-y-auto mt-12px">
</div> <div
<div v-if="csrSupplierList?.length"
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%" class="text-18px text-#808696 bg-#F4F8FF items-center flex py10px rd-5px mt10px"
> v-for="(i, key) in csrSupplierList"
未提交100 :key="key"
</div> >
</template> <div class="truncate2" @click="">
</div></el-col <span class="text-#fff bg-#407DF1 px8px rounded-1/2 mr-5px inlineFlex">{{
> ++key
<el-col :span="8" }}</span>
><div class="time"> <span>{{ i.supplierName }} </span>
<div </div>
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%" <div class="min-w130px max-w130px text-#000">{{ i.submitunCount }}次未提交</div>
> <!-- <div class="min-w150px max-w150px text-#000">{{++key}}月未提交</div> -->
<span class="text-60px">2</span> <span class="absolute right-10px top-18px">
</div> <!-- 暂不开发 12-03 -->
</div></el-col <!-- <el-button>提醒</el-button> -->
> </span>
<el-col :span="8" </div>
><div class="time"> <div v-else class="py10px rd-5px mt100px">
<div <el-empty description="该月份下供应商全部提交" :image-size="300" />
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%" </div>
> </div>
<span class="text-60px">3</span> </div>
</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,343 +15,336 @@ 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( function findItemById(items: any, targetId: any, topLevelItem: any = null): any {
items: any, for (let i = 0; i < items.length; i++) {
targetId: any, const item = items[i]
topLevelItem: any = null if (item.id === targetId) {
): any { return { topLevelItem: topLevelItem || item, targetItem: item }
for (let i = 0; i < items.length; i++) { } else if (item.childList?.length > 0) {
const item = items[i] const result = findItemById(item.childList, targetId, topLevelItem || item)
if (item.id === targetId) { if (result.targetItem) {
return { topLevelItem: topLevelItem || item, targetItem: item } return result
} else if (item.childList?.length > 0) { }
const result = findItemById( }
item.childList, }
targetId, return { topLevelItem: null, targetItem: null }
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=" :class="activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''"
activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : '' @click="() => menuHandler(m, index)"
" >
@click="() => menuHandler(m, index)" <div :class="activeMenuKey === m.id && 'onActive'" class="flex relative">
> <!-- @click="!!m.childList?.length ? (onClic = !onClic) : ''" -->
<div <!-- <img v-if="activeMenuKey === m.id" :src="m.icon1" class="w22px h22px mr16px mt--5px" />
: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 <CaretTop v-if="activeMenuKey === m.id && onClic" class="text-#4977FC" />
v-if="activeMenuKey === m.id && onClic" <CaretBottom v-else /> </el-icon
class="text-#4977FC" ></span>
/> <img
<CaretBottom v-else /> </el-icon v-if="m.isSelFlag == 1"
></span> src="@/assets/images/NEW.gif"
<img class="!h-20px !w-auto absolute left-[-46px] top-[50%] translate-y-[-50%]"
v-if="m.isSelFlag == 1" alt=""
src="@/assets/images/NEW.gif" />
class="!h-20px !w-auto absolute left-[-46px] top-[50%] translate-y-[-50%]" </span>
alt="" </div>
/>
</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"> -->
<n-popover trigger="hover" placement="top-start"> <div class="relative">
<template #trigger> <n-popover trigger="hover" placement="top-start">
<span <template #trigger>
class="text-18px flex child font-900 truncate" <span
:class="activeItem === item.id ? 'text-#002fa7' : ''" class="text-18px flex child font-900 truncate"
>{{ item.name }}</span :class="activeItem === item.id ? 'text-#002fa7' : ''"
> >{{ item.name }}</span
</template> >
<div class="text-18px leading-40px"> </template>
{{ item.name }} <div class="text-18px leading-40px">
</div> {{ item.name }}
</n-popover> </div>
<!-- </el-tooltip> --> </n-popover>
<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>

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/lib/locale/lang/zh-cn"; import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
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

@ -3,76 +3,74 @@
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/lib/locale/lang/zh-cn"; import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
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)
dataList.value.splice(dataList.value.indexOf(tag), 1) console.log(dataList.value)
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) => {
@ -80,152 +78,184 @@ 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 starTime = new Date(actSTime).getTime() const endTime = new Date(actETime).getTime()
const endTime = new Date(actETime).getTime() console.log(starTime, endTime)
console.log(starTime,endTime) let userIdList: any[] = []
let userIdList: any[] =[] if (!dataList.value) {
if(!dataList.value){ message.success('请选择要提醒的对象')
message.success("请选择要提醒的对象") return
return }
} dataList.value.forEach((i: { userId: any }) => {
dataList.value.forEach((i: { userId: any })=>{ userIdList.push(i.userId)
userIdList.push(i.userId) })
}) console.log(formValue.value, dataList, content)
console.log(formValue.value,dataList,content) if (userIdList.length < 0) return
if(userIdList.length<0) return let formdata = new FormData()
let formdata = new FormData(); formdata.append('title', title)
formdata.append("title",title); formdata.append('actName', actName)
formdata.append("actName",actName); formdata.append('actSTime', starTime)
formdata.append("actSTime",starTime); formdata.append('actETime', endTime)
formdata.append("actETime",endTime); formdata.append('content', content)
formdata.append("content",content); formdata.append('position', position)
formdata.append("position",position); formdata.append('userIdList', userIdList)
formdata.append("userIdList",userIdList); const { msg, code } = await addPageInv(formdata, {
const { msg, code } = await addPageInv(formdata,{headers: {'Content-Type': 'application/form-data'}}) headers: { 'Content-Type': 'application/form-data' }
if (code === 200) { })
message.success("添加成功") if (code === 200) {
} message.success('添加成功')
else { message.success(msg); } } else {
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>
</n-form-item>
<n-button @click="showModal = true">
情报公开范围
</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">
{{ i.nickName }}
</el-tag>
</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;">
提交
</n-button>
</div>
</div> </div>
<n-modal v-model:show="showModal"> <div class="g-wrapper flex-1 mt30px p30px">
<UserPage @clickChild="handleChild" @CloseThis="CloseThis"></UserPage> <n-form
</n-modal> ref="formRef"
<n-modal v-model:show="showModals"> :label-width="300"
<div class=" flex w80% p30px bg-#fff my40px rounded-30px"> :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>
<div class=" overflow-y-auto h800px container" v-html="editorContent"></div> <n-form-item>
</div> <div>
</n-modal> <n-button @click="showModals = true"> 文本内容预览</n-button>
</div>
</n-form-item>
<n-button @click="showModal = true"> 情报公开范围 </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"
>
{{ i.nickName }}
</el-tag>
</div>
<n-button
<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);"> attr-type="button"
<img src="@/assets/images/chah.png"/> @click="sure"
<br> style="
<div class="text-#5683DB text-36px">做成中,敬请期待</div> background-color: #3870e5;
border-radius: 5px;
color: #fff;
margin-left: 10px;
margin-top: 20px;
padding: 0 20px;
"
>
提交
</n-button>
</div> </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
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,233 +3,259 @@
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/lib/locale/lang/zh-cn"; import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
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)
dataList.value.splice(dataList.value.indexOf(tag), 1) console.log(dataList.value)
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 starTime = new Date(actSTime).getTime() const endTime = new Date(actETime).getTime()
const endTime = new Date(actETime).getTime() console.log(starTime, endTime)
console.log(starTime,endTime) let userIdList: any[] = []
let userIdList: any[] =[] if (!dataList.value) {
if(!dataList.value){ message.success('请选择要提醒的对象')
message.success("请选择要提醒的对象") return
return }
} dataList.value.forEach((i: { userId: any }) => {
dataList.value.forEach((i: { userId: any })=>{ userIdList.push(i.userId)
userIdList.push(i.userId) })
}) console.log(formValue.value, dataList, content)
console.log(formValue.value,dataList,content) if (userIdList.length < 0) return
if(userIdList.length<0) return let formdata = new FormData()
let formdata = new FormData(); formdata.append('title', title)
formdata.append("title",title); formdata.append('actName', actName)
formdata.append("actName",actName); formdata.append('actSTime', starTime)
formdata.append("actSTime",starTime); formdata.append('actETime', endTime)
formdata.append("actETime",endTime); formdata.append('content', content)
formdata.append("content",content); formdata.append('position', position)
formdata.append("position",position); formdata.append('userIdList', userIdList)
formdata.append("userIdList",userIdList); const { msg, code } = await addPageVisit(formdata, {
const { msg, code } = await addPageVisit(formdata,{headers: {'Content-Type': 'application/form-data'}}) headers: { 'Content-Type': 'application/form-data' }
if (code === 200) { })
message.success("添加成功") if (code === 200) {
} message.success('添加成功')
else { message.success(msg); } } else {
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>
</n-form-item>
<n-button @click="showModal = true">
情报公开范围
</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">
{{ i.nickName }}
</el-tag>
</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;">
提交
</n-button>
</div>
</div> </div>
<n-modal v-model:show="showModal"> <div class="g-wrapper flex-1 mt30px p30px">
<UserPage @clickChild="handleChild" @CloseThis="CloseThis"></UserPage> <n-form
</n-modal> ref="formRef"
<n-modal v-model:show="showModals"> :label-width="300"
<div class=" flex w80% p30px bg-#fff my40px rounded-30px"> :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>
<div class=" overflow-y-auto h800px container" v-html="editorContent"></div> <n-form-item>
</div> <div>
</n-modal> <n-button @click="showModals = true"> 文本内容预览</n-button>
<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);"> </div>
<img src="@/assets/images/chah.png"/> </n-form-item>
<br>
<div class="text-#5683DB text-36px">做成中,敬请期待</div> <n-button @click="showModal = true"> 情报公开范围 </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"
>
{{ i.nickName }}
</el-tag>
</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;
"
>
提交
</n-button>
</div> </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
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

@ -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: 4000, chunkSizeWarningLimit: 6300,
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
} }
} }
} }
}) })