update
parent
9ceffc71f9
commit
a955287aba
|
|
@ -24,7 +24,7 @@
|
|||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.4.3",
|
||||
"echarts-liquidfill": "^3.1.0",
|
||||
"element-plus": "^2.3.7",
|
||||
"element-plus": "^2.6.2",
|
||||
"lottie-web": "^5.12.2",
|
||||
"naive-ui": "^2.34.4",
|
||||
"pinia": "^2.0.32",
|
||||
|
|
|
|||
126
src/App.vue
126
src/App.vue
|
|
@ -1,7 +1,7 @@
|
|||
<script setup lang="ts">
|
||||
import { RouterView } from 'vue-router'
|
||||
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 { NMessageProvider } from 'naive-ui'
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
|
|
@ -26,55 +26,49 @@ store.getUser()
|
|||
const route = useRoute() // 获取当前的路由信息
|
||||
|
||||
const pageClass = computed(() => {
|
||||
// console.log(route.name)
|
||||
// if (navigator.userAgent.match(/iPad|Android Tablet/i)) {
|
||||
// // 这是一个平板设备
|
||||
// console.log("平板",navigator.userAgent)
|
||||
// } else {
|
||||
// // 这不是一个平板设备
|
||||
// console.log("电脑")
|
||||
// }
|
||||
// 根据路由信息返回不同的页面类名
|
||||
if (route.name === 'Entry') {
|
||||
return 'bg-#fff' // 假设关于页的类名为 page-about
|
||||
} else if (route.name === 'DataBase') {
|
||||
return 'bg-#fff'
|
||||
} else if (route.name === 'ExternalLogin' || route.name === 'Login') {
|
||||
return 'bg-#f3f3f3' // 假设关于页的类名为 page-about
|
||||
}
|
||||
return 'page' // 默认类名
|
||||
// console.log(route.name)
|
||||
// if (navigator.userAgent.match(/iPad|Android Tablet/i)) {
|
||||
// // 这是一个平板设备
|
||||
// console.log("平板",navigator.userAgent)
|
||||
// } else {
|
||||
// // 这不是一个平板设备
|
||||
// console.log("电脑")
|
||||
// }
|
||||
// 根据路由信息返回不同的页面类名
|
||||
if (route.name === 'Entry') {
|
||||
return 'bg-#fff' // 假设关于页的类名为 page-about
|
||||
} else if (route.name === 'DataBase') {
|
||||
return 'bg-#fff'
|
||||
} else if (route.name === 'ExternalLogin' || route.name === 'Login') {
|
||||
return 'bg-#f3f3f3' // 假设关于页的类名为 page-about
|
||||
}
|
||||
return 'page' // 默认类名
|
||||
})
|
||||
const pageStyle = computed(() => {
|
||||
// 根据路由信息返回不同的页面样式
|
||||
if (route.name === 'Entry') {
|
||||
return { 'background-color': '#fff !important' } // 假设关于页的类名为 page-about
|
||||
} else if (route.name === 'DataBase') {
|
||||
return { 'background-color': '#fff !important' }
|
||||
} else if (route.name === 'ExternalLogin' || route.name === 'Login') {
|
||||
return { 'background-color': '#f3f3f3 !important' } // 假设关于页的类名为 page-about
|
||||
}
|
||||
return {
|
||||
'background-image': `url(${img}) !important`,
|
||||
'background-position': '0 0',
|
||||
'background-repeat': 'no-repeat',
|
||||
'background-size': 'cover'
|
||||
} // 默认类名
|
||||
// 根据路由信息返回不同的页面样式
|
||||
if (route.name === 'Entry') {
|
||||
return { 'background-color': '#fff !important' } // 假设关于页的类名为 page-about
|
||||
} else if (route.name === 'DataBase') {
|
||||
return { 'background-color': '#fff !important' }
|
||||
} else if (route.name === 'ExternalLogin' || route.name === 'Login') {
|
||||
return { 'background-color': '#f3f3f3 !important' } // 假设关于页的类名为 page-about
|
||||
}
|
||||
return {
|
||||
'background-image': `url(${img}) !important`,
|
||||
'background-position': '0 0',
|
||||
'background-repeat': 'no-repeat',
|
||||
'background-size': 'cover'
|
||||
} // 默认类名
|
||||
})
|
||||
|
||||
const locale = computed(() => zhCn)
|
||||
|
||||
const scaleChange = ({
|
||||
widthRatio,
|
||||
heightRatio
|
||||
}: {
|
||||
widthRatio: number
|
||||
heightRatio: number
|
||||
}) => {
|
||||
console.log('scaleChange', widthRatio, heightRatio)
|
||||
const scaleChange = ({ widthRatio, heightRatio }: { widthRatio: number; heightRatio: number }) => {
|
||||
console.log('scaleChange', widthRatio, heightRatio)
|
||||
}
|
||||
const beforeCalculate = (scale) => {
|
||||
console.log('🚀 ~ scale:', scale)
|
||||
return false
|
||||
console.log('🚀 ~ scale:', scale)
|
||||
return false
|
||||
}
|
||||
// ref="fitscreenRef"
|
||||
// :width="screenWidth"
|
||||
|
|
@ -88,40 +82,40 @@ const beforeCalculate = (scale) => {
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<NMessageProvider>
|
||||
<VScaleScreen
|
||||
ref="fitscreenRef"
|
||||
:width="screenWidth"
|
||||
:height="screenHeight"
|
||||
mode="fit"
|
||||
:box-style="pageStyle"
|
||||
>
|
||||
<!-- <div :class="pageClass"> -->
|
||||
<n-config-provider :locale="NZhCN" :date-locale="dateZhCN">
|
||||
<el-config-provider :locale="locale">
|
||||
<RouterView />
|
||||
</el-config-provider>
|
||||
</n-config-provider>
|
||||
<!-- </div> -->
|
||||
</VScaleScreen>
|
||||
</NMessageProvider>
|
||||
<NMessageProvider>
|
||||
<VScaleScreen
|
||||
ref="fitscreenRef"
|
||||
:width="screenWidth"
|
||||
:height="screenHeight"
|
||||
mode="fit"
|
||||
:box-style="pageStyle"
|
||||
>
|
||||
<!-- <div :class="pageClass"> -->
|
||||
<n-config-provider :locale="NZhCN" :date-locale="dateZhCN">
|
||||
<el-config-provider :locale="locale">
|
||||
<RouterView />
|
||||
</el-config-provider>
|
||||
</n-config-provider>
|
||||
<!-- </div> -->
|
||||
</VScaleScreen>
|
||||
</NMessageProvider>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.fit-screen {
|
||||
text-rendering: optimizeLegibility !important;
|
||||
text-rendering: optimizeLegibility !important;
|
||||
}
|
||||
.page,
|
||||
.v-screen-box {
|
||||
// background-image: url('@/assets/images/bg.jpg') !important;
|
||||
// background-position: 0 0;
|
||||
// background-repeat: no-repeat;
|
||||
// background-size: cover;
|
||||
// background-image: url('@/assets/images/bg.jpg') !important;
|
||||
// background-position: 0 0;
|
||||
// background-repeat: no-repeat;
|
||||
// background-size: cover;
|
||||
}
|
||||
.pages {
|
||||
background-color: #fff;
|
||||
background-color: #fff;
|
||||
}
|
||||
.pagess {
|
||||
background-color: #f3f3f3;
|
||||
background-color: #f3f3f3;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -10,73 +10,73 @@ import { cateFileList } from '@/api/daikin/base'
|
|||
const { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
const array = ref<any[]>([
|
||||
{
|
||||
content1: '将扩大的机遇转为成果 更强更大地展翅飞翔',
|
||||
content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう',
|
||||
year: '2023年'
|
||||
},
|
||||
{ content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' },
|
||||
{
|
||||
content1: '以“重大变化”为契机 向新课题发起挑战',
|
||||
content2: '',
|
||||
year: '2021年'
|
||||
},
|
||||
{
|
||||
content1: '加速推进三个协创 决胜于变化的时代',
|
||||
content2: '',
|
||||
year: '2020年'
|
||||
},
|
||||
{
|
||||
content1: '以三个协创为轴心 人人迅速果断行动',
|
||||
content2: '',
|
||||
year: '2016年'
|
||||
},
|
||||
{
|
||||
content1: '突破壁垒 集中优势 不断挑战新课题',
|
||||
content2: '',
|
||||
year: '2018年'
|
||||
},
|
||||
{
|
||||
content1: '坚持以人为轴心,融合新的力量',
|
||||
content2: '集团上下齐心协力提升企业价值',
|
||||
year: '2017年'
|
||||
},
|
||||
{ content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' },
|
||||
{ content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' }
|
||||
{
|
||||
content1: '将扩大的机遇转为成果 更强更大地展翅飞翔',
|
||||
content2: 'ひろがるチャンスを 成果につなげ 強く大きく 羽ばたこう',
|
||||
year: '2023年'
|
||||
},
|
||||
{ content1: '领先时代的变化 开创崭新的未来', content2: '', year: '2022年' },
|
||||
{
|
||||
content1: '以“重大变化”为契机 向新课题发起挑战',
|
||||
content2: '',
|
||||
year: '2021年'
|
||||
},
|
||||
{
|
||||
content1: '加速推进三个协创 决胜于变化的时代',
|
||||
content2: '',
|
||||
year: '2020年'
|
||||
},
|
||||
{
|
||||
content1: '以三个协创为轴心 人人迅速果断行动',
|
||||
content2: '',
|
||||
year: '2016年'
|
||||
},
|
||||
{
|
||||
content1: '突破壁垒 集中优势 不断挑战新课题',
|
||||
content2: '',
|
||||
year: '2018年'
|
||||
},
|
||||
{
|
||||
content1: '坚持以人为轴心,融合新的力量',
|
||||
content2: '集团上下齐心协力提升企业价值',
|
||||
year: '2017年'
|
||||
},
|
||||
{ content1: '站稳脚跟 强化优势 大步迈进', content2: '', year: '2016年' },
|
||||
{ content1: '创造未来,决胜于变化的时代', content2: '', year: '2015年' }
|
||||
])
|
||||
|
||||
const fileItem = ref<any>({})
|
||||
const message = useMessage()
|
||||
const getFile = async () => {
|
||||
const { rows }: any = await cateFileList({
|
||||
cateId: 261,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
fileItem.value = rows.find((item: any) => item.id == 1693) || {}
|
||||
const { rows }: any = await cateFileList({
|
||||
cateId: 261,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
})
|
||||
fileItem.value = rows.find((item: any) => item.id == 1693) || {}
|
||||
}
|
||||
const goFile = () => {
|
||||
const { isSelect, filePath } = fileItem.value
|
||||
if (!isSelect || isSelect === 2) {
|
||||
message.info('没有访问权限!')
|
||||
return
|
||||
}
|
||||
if (!filePath) {
|
||||
message.info('暂无文件')
|
||||
}
|
||||
window.open(filePath)
|
||||
const { isSelect, filePath } = fileItem.value
|
||||
if (!isSelect || isSelect === 2) {
|
||||
message.info('没有访问权限!')
|
||||
return
|
||||
}
|
||||
if (!filePath) {
|
||||
message.info('暂无文件')
|
||||
}
|
||||
window.open(filePath)
|
||||
}
|
||||
|
||||
getFile()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<!-- <div class="h-full relative flex flex-col">
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<!-- <div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt27px">
|
||||
<div class="text-36px">集团方针</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
|
|
@ -96,49 +96,57 @@ getFile()
|
|||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="mt30px mr20px flex w100% relative">
|
||||
<!-- <img src="../../assets/images/fangz.png" class="w100%"/> -->
|
||||
<img src="../../assets/images/fzqiet.png" class="w100%" />
|
||||
<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"
|
||||
@click="goFile"
|
||||
>
|
||||
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
||||
2024年グループ年頭方针
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30px mr20px flex w100% relative">
|
||||
<!-- <img src="../../assets/images/fangz.png" class="w100%"/> -->
|
||||
<img src="../../assets/images/fzqiet.png" class="w100%" />
|
||||
<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"
|
||||
@click="goFile"
|
||||
>
|
||||
<img src="../../assets/images/wjqq@2x.png" class="w18px h20px mr8px" />
|
||||
2024年グループ年頭方针
|
||||
</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>
|
||||
|
||||
<style scoped lang="less">
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
.g-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: hidden;
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: hidden;
|
||||
|
||||
.timeline {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #142142;
|
||||
.timeline {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #142142;
|
||||
|
||||
.one {
|
||||
position: relative;
|
||||
.year {
|
||||
left: -132px;
|
||||
top: -14px;
|
||||
color: #003cb7;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.one {
|
||||
position: relative;
|
||||
.year {
|
||||
left: -132px;
|
||||
top: -14px;
|
||||
color: #003cb7;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -15,33 +15,37 @@ const store = useUserStore()
|
|||
|
||||
const { push } = useRouter()
|
||||
const route = useRoute()
|
||||
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(
|
||||
store.user.roleCode
|
||||
)
|
||||
const Navs = [{ name: '集团*部门方针' }, { name: '年度活动日程表' }, { name: '其他链接' }, { name: '紧急联络' }, { name: 'CN/JP' }]
|
||||
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(store.user.roleCode)
|
||||
const Navs = [
|
||||
{ name: '集团*部门方针' },
|
||||
{ name: '年度活动日程表' },
|
||||
{ name: '其他链接' },
|
||||
{ name: '紧急联络' },
|
||||
{ name: 'CN/JP' }
|
||||
]
|
||||
const Content = [
|
||||
{ key: '1-1', component: () => <CSRContent /> },
|
||||
{ key: '1-2', component: () => <CSRContent22/> },
|
||||
{ key: '1-2', component: () => <CSRContent22 /> },
|
||||
{ key: '1-3', component: () => <CSRContent23 /> },
|
||||
// { 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 activeContent = computed(() => {
|
||||
const nav = unref(activeNav)
|
||||
const curContent = Content.find((i) => nav.includes(i.key))
|
||||
console.log(curContent,1111)
|
||||
console.log(curContent, 1111)
|
||||
return curContent?.component || null
|
||||
})
|
||||
|
||||
const shomks = () => {
|
||||
// push('csr/modifyCsr2')
|
||||
push({ name: 'modifyCsrCarbon' })
|
||||
// push('csr/modifyCsr2')
|
||||
push({ name: 'modifyCsrCarbon' })
|
||||
}
|
||||
|
||||
watch(activeNav, (newVal) => {
|
||||
push({ path: '/Home/csr',replace:true, query: { key: newVal } })
|
||||
push({ path: '/Home/csr', replace: true, query: { key: newVal } })
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
@ -54,14 +58,18 @@ watch(activeNav, (newVal) => {
|
|||
<div class="h-full relative flex flex-col">
|
||||
<div class="flex flex-end ml10px mt27px">
|
||||
<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>
|
||||
<div class="flex-1 mt30px text-#142142 flex gap-30px h-825px">
|
||||
<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" />
|
||||
</div>
|
||||
</AppBlock>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
<script setup lang="ts">
|
||||
// import {message} from '@/utils/message'
|
||||
import {
|
||||
fetchCsrSupplier,
|
||||
fetchCsrSupplierList,
|
||||
fetchCsrSupplierTopList,
|
||||
fetchCsrSupplierTaskInfo
|
||||
fetchCsrSupplier,
|
||||
fetchCsrSupplierList,
|
||||
fetchCsrSupplierTopList,
|
||||
fetchCsrSupplierTaskInfo
|
||||
} from '@/api/daikin/base'
|
||||
|
||||
const query = ref<any>({
|
||||
year: '',
|
||||
supplierName: ''
|
||||
year: '',
|
||||
supplierName: ''
|
||||
})
|
||||
const year = new Date().getFullYear()
|
||||
const month = new Date().getMonth()
|
||||
|
|
@ -21,96 +21,75 @@ const nowIndexMonth = calendar.indexOf(calendarShow)
|
|||
const updateTime = ref('')
|
||||
|
||||
const handleChange = () => {
|
||||
getCsrSupplier()
|
||||
getCsrSupplierList()
|
||||
getCsrSupplier()
|
||||
getCsrSupplierList()
|
||||
}
|
||||
|
||||
const isDateDisabled = (date: any) => {
|
||||
return date > new Date()
|
||||
return date > new Date()
|
||||
}
|
||||
const csrSupplier = 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 getCsrSupplier = () => {
|
||||
loading.value = true
|
||||
months.forEach((item: any) => {
|
||||
csrSupplierObj.value[item] = { month: item }
|
||||
})
|
||||
const req = { ...query.value }
|
||||
fetchCsrSupplier(req).then(({ data = {} }) => {
|
||||
const resData = Object.keys(data) || []
|
||||
try {
|
||||
csrSupplier.value = resData.length
|
||||
? resData.map((key) => {
|
||||
const obj = data[key] || {}
|
||||
const month = String(key).split('-')?.[1] || ''
|
||||
Object.assign(csrSupplierObj.value[month], obj)
|
||||
return {
|
||||
key,
|
||||
month,
|
||||
data: obj
|
||||
}
|
||||
})
|
||||
: []
|
||||
} catch (error) {}
|
||||
console.log(
|
||||
'🚀 ~ file: CSRContent23.vue:50 ~ csrSupplierObj:',
|
||||
csrSupplierObj
|
||||
)
|
||||
if (!csrSupplier.value.length) {
|
||||
// message.warning('暂无数据')
|
||||
csrSupplierObj.value = {}
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 300)
|
||||
loading.value = true
|
||||
months.forEach((item: any) => {
|
||||
csrSupplierObj.value[item] = { month: item }
|
||||
})
|
||||
const req = { ...query.value }
|
||||
fetchCsrSupplier(req).then(({ data = {} }) => {
|
||||
const resData = Object.keys(data) || []
|
||||
try {
|
||||
csrSupplier.value = resData.length
|
||||
? resData.map((key) => {
|
||||
const obj = data[key] || {}
|
||||
const month = String(key).split('-')?.[1] || ''
|
||||
Object.assign(csrSupplierObj.value[month], obj)
|
||||
return {
|
||||
key,
|
||||
month,
|
||||
data: obj
|
||||
}
|
||||
})
|
||||
: []
|
||||
} catch (error) {}
|
||||
console.log('🚀 ~ file: CSRContent23.vue:50 ~ csrSupplierObj:', csrSupplierObj)
|
||||
if (!csrSupplier.value.length) {
|
||||
// message.warning('暂无数据')
|
||||
csrSupplierObj.value = {}
|
||||
}
|
||||
})
|
||||
setTimeout(() => {
|
||||
loading.value = false
|
||||
}, 300)
|
||||
}
|
||||
|
||||
const csrSupplierList = ref<any>([])
|
||||
const selMonth = ref('')
|
||||
const getCsrSupplierList = (index?: any) => {
|
||||
const month =
|
||||
index || index === 0 ? query.value.year + '-' + months[index] : ''
|
||||
csrSupplierList.value = []
|
||||
selMonth.value = ''
|
||||
const req = { pageNum: 1, pageSize: 10, ...query.value, month }
|
||||
req.supplierName
|
||||
? fetchCsrSupplierList(req).then((res: any) => {
|
||||
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
|
||||
)
|
||||
})
|
||||
selMonth.value = month ? +months[index] + '月' : ''
|
||||
const month = index || index === 0 ? query.value.year + '-' + months[index] : ''
|
||||
csrSupplierList.value = []
|
||||
selMonth.value = ''
|
||||
const req = { pageNum: 1, pageSize: 10, ...query.value, month }
|
||||
req.supplierName
|
||||
? fetchCsrSupplierList(req).then((res: any) => {
|
||||
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)
|
||||
})
|
||||
selMonth.value = month ? +months[index] + '月' : ''
|
||||
}
|
||||
|
||||
const getCsrSupplierTaskInfo = () => {
|
||||
fetchCsrSupplierTaskInfo().then((res) => {
|
||||
updateTime.value = res.data?.updateTime
|
||||
})
|
||||
fetchCsrSupplierTaskInfo().then((res) => {
|
||||
updateTime.value = res.data?.updateTime
|
||||
})
|
||||
}
|
||||
|
||||
const handleMonth = (index: number) => {
|
||||
getCsrSupplierList(index)
|
||||
getCsrSupplierList(index)
|
||||
}
|
||||
|
||||
getCsrSupplier()
|
||||
|
|
@ -119,375 +98,329 @@ getCsrSupplierTaskInfo()
|
|||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex w-full rounded-18px">
|
||||
<!-- <AppBlock> -->
|
||||
<!-- <img src="./images/goudongxi2.png" class="w-full h-full" /> -->
|
||||
<div
|
||||
class="relative overflow-hidden w-full bg-#f4f4f4 flex flex-wrap justify-between h-full rd-25px"
|
||||
>
|
||||
<div class="cards">
|
||||
<div class="cards_title">供方月度碳排放数据提交情况</div>
|
||||
<div class="!text-18px right-20 pt30px text-#4E7EE8">
|
||||
<a
|
||||
href="https://procurement.daikin.net.cn/mingdao/portal/app/7abea528-f7b4-4437-84bb-6b6b169bad3d"
|
||||
class="no-underline text-#4E7EE8"
|
||||
><img src="./images/yuny@2x.png" class="w25px mr5px mt--4px" /><span
|
||||
>明道云</span
|
||||
></a
|
||||
>
|
||||
</div>
|
||||
<div class="flex w-full h-80px p20px items-center mt10px">
|
||||
<div>
|
||||
<el-date-picker
|
||||
v-model="query.year"
|
||||
type="year"
|
||||
@change="handleChange"
|
||||
placeholder=""
|
||||
:disabled-date="isDateDisabled"
|
||||
:clearable="false"
|
||||
value-format="YYYY"
|
||||
/>
|
||||
</div>
|
||||
<el-input
|
||||
v-model.trim="query.supplierName"
|
||||
class="w-50 m-2"
|
||||
placeholder="供方名"
|
||||
prefix-icon="Search"
|
||||
width="150px"
|
||||
/>
|
||||
<el-button type="primary" @click="handleChange">查询</el-button>
|
||||
</div>
|
||||
<div class="w-full h-730px p20px" v-loading="loading">
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="times">
|
||||
<div
|
||||
class="text-#fff text-18px font-bold absolute left-40% top-18px"
|
||||
>
|
||||
<span class="text-30px">1</span>月
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
|
||||
>
|
||||
<span class="text-60px">2</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
|
||||
>
|
||||
<span class="text-60px">3</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" v-for="(it, i) in months" :key="i">
|
||||
<div
|
||||
v-show="!loading"
|
||||
:class="
|
||||
i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'
|
||||
"
|
||||
@click="handleMonth(i)"
|
||||
>
|
||||
<div
|
||||
v-if="i > nowIndexMonth || query.year != jpMonth"
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
|
||||
>
|
||||
<span class="text-60px">{{ +it }}</span
|
||||
>月
|
||||
</div>
|
||||
<template
|
||||
v-if="
|
||||
i <= nowIndexMonth &&
|
||||
(query.year == jpMonth || !!csrSupplierObj[it])
|
||||
"
|
||||
>
|
||||
<div
|
||||
class="text-#fff text-18px font-bold absolute left-40% top-24px"
|
||||
>
|
||||
<span class="text-24px">{{ +it }}</span
|
||||
>月
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
已提交:{{ csrSupplierObj[it]?.submitedCount || 0 }}
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
未提交:{{ csrSupplierObj[it]?.submitunCount || 0 }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="false"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">5</span>月
|
||||
</div>
|
||||
<template v-if="false">
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15% rounded-xl"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15% rounded-xl"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</template>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8" v-if="false"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">6</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">7</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">8</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="times">
|
||||
<!-- <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"><span class="text-60px">9</span>月</div> -->
|
||||
<div
|
||||
class="text-#fff text-18px font-bold absolute left-40% top-24px"
|
||||
>
|
||||
<span class="text-24px">9</span>月
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"
|
||||
>
|
||||
<span class="text-60px">10</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"
|
||||
>
|
||||
<span class="text-60px">11</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%"
|
||||
>
|
||||
<span class="text-60px">12</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">1</span>月
|
||||
</div>
|
||||
<template v-if="false">
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</template>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">2</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"
|
||||
>
|
||||
<span class="text-60px">3</span>月
|
||||
</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>
|
||||
<div class="flex w-full rounded-18px">
|
||||
<!-- <AppBlock> -->
|
||||
<!-- <img src="./images/goudongxi2.png" class="w-full h-full" /> -->
|
||||
<div
|
||||
class="relative overflow-hidden w-full bg-#f4f4f4 flex flex-wrap justify-between h-full rd-25px"
|
||||
>
|
||||
<div class="cards">
|
||||
<div class="cards_title">供方月度碳排放数据提交情况</div>
|
||||
<div class="!text-18px right-20 pt30px text-#4E7EE8">
|
||||
<a
|
||||
href="https://procurement.daikin.net.cn/mingdao/portal/app/7abea528-f7b4-4437-84bb-6b6b169bad3d"
|
||||
class="no-underline text-#4E7EE8"
|
||||
><img src="./images/yuny@2x.png" class="w25px mr5px mt--4px" /><span>明道云</span></a
|
||||
>
|
||||
</div>
|
||||
<div class="flex w-full h-80px p20px items-center mt10px">
|
||||
<div>
|
||||
<el-date-picker
|
||||
popper-class="dete-picker"
|
||||
v-model="query.year"
|
||||
type="year"
|
||||
@change="handleChange"
|
||||
placeholder=""
|
||||
:disabled-date="isDateDisabled"
|
||||
:clearable="false"
|
||||
value-format="YYYY"
|
||||
/>
|
||||
</div>
|
||||
<el-input
|
||||
v-model.trim="query.supplierName"
|
||||
class="w-50 m-2"
|
||||
placeholder="供方名"
|
||||
prefix-icon="Search"
|
||||
width="150px"
|
||||
/>
|
||||
<el-button type="primary" @click="handleChange">查询</el-button>
|
||||
</div>
|
||||
<div class="w-full h-730px p20px" v-loading="loading">
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="times">
|
||||
<div class="text-#fff text-18px font-bold absolute left-40% top-18px">
|
||||
<span class="text-30px">1</span>月
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%">
|
||||
<span class="text-60px">2</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%">
|
||||
<span class="text-60px">3</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" v-for="(it, i) in months" :key="i">
|
||||
<div
|
||||
v-show="!loading"
|
||||
:class="i <= nowIndexMonth && query.year == jpMonth ? 'times' : 'time'"
|
||||
@click="handleMonth(i)"
|
||||
>
|
||||
<div
|
||||
v-if="i > nowIndexMonth || query.year != jpMonth"
|
||||
class="text-#d3d2d2 text-18px font-bold absolute left-40% top-45%"
|
||||
>
|
||||
<span class="text-60px">{{ +it }}</span
|
||||
>月
|
||||
</div>
|
||||
<template
|
||||
v-if="i <= nowIndexMonth && (query.year == jpMonth || !!csrSupplierObj[it])"
|
||||
>
|
||||
<div class="text-#fff text-18px font-bold absolute left-40% top-24px">
|
||||
<span class="text-24px">{{ +it }}</span
|
||||
>月
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
已提交:{{ csrSupplierObj[it]?.submitedCount || 0 }}
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
未提交:{{ csrSupplierObj[it]?.submitunCount || 0 }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="false"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">5</span>月
|
||||
</div>
|
||||
<template v-if="false">
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15% rounded-xl"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15% rounded-xl"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</template>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8" v-if="false"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">6</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">7</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">8</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="times">
|
||||
<!-- <div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%"><span class="text-60px">9</span>月</div> -->
|
||||
<div class="text-#fff text-18px font-bold absolute left-40% top-24px">
|
||||
<span class="text-24px">9</span>月
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-70px text-#A0C6B5 text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-140px absolute top-110px text-red text-18px font-bold p10px left-10% rounded-xl"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%">
|
||||
<span class="text-60px">10</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%">
|
||||
<span class="text-60px">11</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-30% top-45%">
|
||||
<span class="text-60px">12</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
</el-row>
|
||||
<el-row :gutter="10" v-if="false">
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">1</span>月
|
||||
</div>
|
||||
<template v-if="false">
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-70px text-#A0C6B5 text-16px font-bold p10px left-15%"
|
||||
>
|
||||
已提交:45
|
||||
</div>
|
||||
<div
|
||||
class="bg-#fff w-120px absolute top-110px text-red text-16px font-bold p10px left-15%"
|
||||
>
|
||||
未提交:100
|
||||
</div>
|
||||
</template>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">2</span>月
|
||||
</div>
|
||||
</div></el-col
|
||||
>
|
||||
<el-col :span="8"
|
||||
><div class="time">
|
||||
<div class="text-#d3d2d2 text-18px font-bold absolute left-38% top-45%">
|
||||
<span class="text-60px">3</span>月
|
||||
</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> -->
|
||||
</div>
|
||||
<!-- </AppBlock> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.cards {
|
||||
width: 49%;
|
||||
height: 100%;
|
||||
border-radius: 18px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
width: 49%;
|
||||
height: 100%;
|
||||
border-radius: 18px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.time {
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
background: url('@/assets/images/A2@2x.png');
|
||||
background-size: cover;
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
background: url('@/assets/images/A2@2x.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.times {
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
background: url('@/assets/images/A1@2x.png');
|
||||
background-size: cover;
|
||||
width: 175px;
|
||||
height: 175px;
|
||||
background: url('@/assets/images/A1@2x.png');
|
||||
background-size: cover;
|
||||
}
|
||||
.cards_title {
|
||||
flex-shrink: 0;
|
||||
font-size: 26px;
|
||||
color: #142142;
|
||||
padding: 20px;
|
||||
margin-left: 20px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
font-size: 26px;
|
||||
color: #142142;
|
||||
padding: 20px;
|
||||
margin-left: 20px;
|
||||
font-weight: bold;
|
||||
padding-bottom: 0;
|
||||
|
||||
&::before {
|
||||
content: ' ';
|
||||
display: block;
|
||||
width: 8px;
|
||||
height: 30px;
|
||||
background-color: #003ab5;
|
||||
&::before {
|
||||
content: ' ';
|
||||
display: block;
|
||||
width: 8px;
|
||||
height: 30px;
|
||||
background-color: #003ab5;
|
||||
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.truncate2 {
|
||||
max-width: 360px;
|
||||
min-width: 360px;
|
||||
overflow: hidden;
|
||||
padding: 5px 10px;
|
||||
line-height: 30px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #142142;
|
||||
cursor: pointer;
|
||||
max-width: 360px;
|
||||
min-width: 360px;
|
||||
overflow: hidden;
|
||||
padding: 5px 10px;
|
||||
line-height: 30px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #142142;
|
||||
cursor: pointer;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
:deep {
|
||||
.el-empty__description > p {
|
||||
font-size: 28px !important;
|
||||
}
|
||||
.el-empty__description > p {
|
||||
font-size: 28px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -15,343 +15,336 @@ let idx = ref(0)
|
|||
const onClic = ref(false)
|
||||
const titles = ref()
|
||||
function menuHandler(menu: any, index: number) {
|
||||
console.log(menu, index)
|
||||
activeMenuKey.value = menu.id
|
||||
titles.value = menu.name
|
||||
idx.value = index
|
||||
activeItem.value = menu.id
|
||||
if (menu.childList && menu.childList.length > 0) {
|
||||
activeItem.value = menu.childList[0].id
|
||||
}
|
||||
if (database.database.id == activeItem.value && onClic.value) {
|
||||
onClic.value = false
|
||||
} else {
|
||||
onClic.value = !!menu.childList?.length
|
||||
// onClic.value = !onClic.value
|
||||
}
|
||||
database.database.id = activeItem.value
|
||||
goListPage()
|
||||
console.log(menu, index)
|
||||
activeMenuKey.value = menu.id
|
||||
titles.value = menu.name
|
||||
idx.value = index
|
||||
activeItem.value = menu.id
|
||||
if (menu.childList && menu.childList.length > 0) {
|
||||
activeItem.value = menu.childList[0].id
|
||||
}
|
||||
if (database.database.id == activeItem.value && onClic.value) {
|
||||
onClic.value = false
|
||||
} else {
|
||||
onClic.value = !!menu.childList?.length
|
||||
// onClic.value = !onClic.value
|
||||
}
|
||||
database.database.id = activeItem.value
|
||||
goListPage()
|
||||
}
|
||||
function goChild(menu: any) {
|
||||
activeItem.value = menu.id
|
||||
console.log('🚀 ~ menu:', menu.id, menu.name)
|
||||
database.database.id = menu.id
|
||||
goListPage()
|
||||
activeItem.value = menu.id
|
||||
console.log('🚀 ~ menu:', menu.id, menu.name)
|
||||
database.database.id = menu.id
|
||||
goListPage()
|
||||
}
|
||||
function goListPage() {
|
||||
const { path } = route
|
||||
if (path === '/DataBase/review') push('/DataBase')
|
||||
const { path } = route
|
||||
if (path === '/DataBase/review') push('/DataBase')
|
||||
}
|
||||
var activeItem = ref<any>(0)
|
||||
const tableData = ref()
|
||||
async function getTree() {
|
||||
const { data = [] } = await treeDbList({})
|
||||
tableData.value = data
|
||||
const { data = [] } = await treeDbList({})
|
||||
tableData.value = data
|
||||
|
||||
if (data && data[0]) {
|
||||
// console.log(data[0])
|
||||
titles.value = data[0].name
|
||||
activeMenuKey.value = data[0].id
|
||||
// if(data[0].childList&&data[0].childList.length>0){
|
||||
// activeItem.value = data[0].childList[0].id
|
||||
// activeMenuKey.value = data[0].childList[0].id
|
||||
// }
|
||||
}
|
||||
const { id } = route.query
|
||||
if (id) {
|
||||
activeItem.value = +id
|
||||
// const index = data.findIndex((i: any) => i.id == id)
|
||||
// if (index > -1) {
|
||||
// const item = data[index]
|
||||
// if (item) {
|
||||
// // menuHandler(item, index)
|
||||
// // onClic.value = true
|
||||
// // titles.value = item.name
|
||||
// // activeMenuKey.value = item.id
|
||||
// // database.database.id = item.id
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (activeItem.value) {
|
||||
const { topLevelItem, targetItem } = findItemById(data, activeItem.value)
|
||||
console.log('🚀 ~ topLevelItem, targetItem:', topLevelItem, targetItem)
|
||||
if (topLevelItem && targetItem) {
|
||||
const index = data.findIndex((i: any) => i.id === topLevelItem.id)
|
||||
nextTick(() => {
|
||||
// onClic.value = true
|
||||
menuHandler(topLevelItem, index === -1 ? 0 : index)
|
||||
goChild(targetItem)
|
||||
})
|
||||
} else {
|
||||
const index = data.findIndex((i: any) => i.id == id)
|
||||
if (index > -1) {
|
||||
const item = data[index]
|
||||
if (item) {
|
||||
menuHandler(item, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
database.database.id = data[0].id
|
||||
}
|
||||
if (data && data[0]) {
|
||||
// console.log(data[0])
|
||||
titles.value = data[0].name
|
||||
activeMenuKey.value = data[0].id
|
||||
// if(data[0].childList&&data[0].childList.length>0){
|
||||
// activeItem.value = data[0].childList[0].id
|
||||
// activeMenuKey.value = data[0].childList[0].id
|
||||
// }
|
||||
}
|
||||
const { id } = route.query
|
||||
if (id) {
|
||||
activeItem.value = +id
|
||||
// const index = data.findIndex((i: any) => i.id == id)
|
||||
// if (index > -1) {
|
||||
// const item = data[index]
|
||||
// if (item) {
|
||||
// // menuHandler(item, index)
|
||||
// // onClic.value = true
|
||||
// // titles.value = item.name
|
||||
// // activeMenuKey.value = item.id
|
||||
// // database.database.id = item.id
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (activeItem.value) {
|
||||
const { topLevelItem, targetItem } = findItemById(data, activeItem.value)
|
||||
console.log('🚀 ~ topLevelItem, targetItem:', topLevelItem, targetItem)
|
||||
if (topLevelItem && targetItem) {
|
||||
const index = data.findIndex((i: any) => i.id === topLevelItem.id)
|
||||
nextTick(() => {
|
||||
// onClic.value = true
|
||||
menuHandler(topLevelItem, index === -1 ? 0 : index)
|
||||
goChild(targetItem)
|
||||
})
|
||||
} else {
|
||||
const index = data.findIndex((i: any) => i.id == id)
|
||||
if (index > -1) {
|
||||
const item = data[index]
|
||||
if (item) {
|
||||
menuHandler(item, index)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
database.database.id = data[0].id
|
||||
}
|
||||
}
|
||||
getTree()
|
||||
|
||||
function findItemById(
|
||||
items: any,
|
||||
targetId: any,
|
||||
topLevelItem: any = null
|
||||
): any {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i]
|
||||
if (item.id === targetId) {
|
||||
return { topLevelItem: topLevelItem || item, targetItem: item }
|
||||
} else if (item.childList?.length > 0) {
|
||||
const result = findItemById(
|
||||
item.childList,
|
||||
targetId,
|
||||
topLevelItem || item
|
||||
)
|
||||
if (result.targetItem) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
return { topLevelItem: null, targetItem: null }
|
||||
function findItemById(items: any, targetId: any, topLevelItem: any = null): any {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i]
|
||||
if (item.id === targetId) {
|
||||
return { topLevelItem: topLevelItem || item, targetItem: item }
|
||||
} else if (item.childList?.length > 0) {
|
||||
const result = findItemById(item.childList, targetId, topLevelItem || item)
|
||||
if (result.targetItem) {
|
||||
return result
|
||||
}
|
||||
}
|
||||
}
|
||||
return { topLevelItem: null, targetItem: null }
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page w-1920px h-1080px flex">
|
||||
<div class="w350px -mr-1px flex flex-col shrink-0 overflow-auto">
|
||||
<div class="p30px bg-#000">
|
||||
<!-- @dblclick="toggle" -->
|
||||
<img src="@/assets/images/logo@2x.png" class="w197px h44px mt14px" />
|
||||
</div>
|
||||
<div class="page w-1920px h-1080px flex">
|
||||
<div class="w350px -mr-1px flex flex-col shrink-0 overflow-auto">
|
||||
<div class="p30px bg-#000">
|
||||
<!-- @dblclick="toggle" -->
|
||||
<img src="@/assets/images/logo@2x.png" class="w197px h44px mt14px" />
|
||||
</div>
|
||||
|
||||
<div class="pt30px pb24px flex-1 pl20px bg-#fff">
|
||||
<div
|
||||
class="nav px50px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#000 cursor-pointer"
|
||||
v-for="(m, index) in tableData"
|
||||
:key="m.id"
|
||||
:class="
|
||||
activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''
|
||||
"
|
||||
@click="() => menuHandler(m, index)"
|
||||
>
|
||||
<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" />
|
||||
<div class="pt30px pb24px flex-1 pl20px bg-#fff">
|
||||
<div
|
||||
class="nav px50px py24px m10px mr0 rd-32px rd-r-0 flex flex-col text-#000 cursor-pointer"
|
||||
v-for="(m, index) in tableData"
|
||||
:key="m.id"
|
||||
:class="activeMenuKey === m.id ? (m.childList ? 'actives' : 'active') : ''"
|
||||
@click="() => menuHandler(m, index)"
|
||||
>
|
||||
<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" /> -->
|
||||
<!-- lujinli -->
|
||||
<!-- <span class="text-17px font-900 relative min-w195px block"> -->
|
||||
<span class="text-18px font-900 relative min-w195px block">
|
||||
<span class="truncate"> {{ m.name }} </span>
|
||||
<span class="text-#000000 absolute right--30px top--5px"
|
||||
><el-icon size="26">
|
||||
<CaretTop
|
||||
v-if="activeMenuKey === m.id && onClic"
|
||||
class="text-#4977FC"
|
||||
/>
|
||||
<CaretBottom v-else /> </el-icon
|
||||
></span>
|
||||
<img
|
||||
v-if="m.isSelFlag == 1"
|
||||
src="@/assets/images/NEW.gif"
|
||||
class="!h-20px !w-auto absolute left-[-46px] top-[50%] translate-y-[-50%]"
|
||||
alt=""
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
<!-- lujinli -->
|
||||
<!-- <span class="text-17px font-900 relative min-w195px block"> -->
|
||||
<span class="text-18px font-900 relative min-w195px block">
|
||||
<span class="truncate"> {{ m.name }} </span>
|
||||
<span class="text-#000000 absolute right--30px top--5px"
|
||||
><el-icon size="26">
|
||||
<CaretTop v-if="activeMenuKey === m.id && onClic" class="text-#4977FC" />
|
||||
<CaretBottom v-else /> </el-icon
|
||||
></span>
|
||||
<img
|
||||
v-if="m.isSelFlag == 1"
|
||||
src="@/assets/images/NEW.gif"
|
||||
class="!h-20px !w-auto absolute left-[-46px] top-[50%] translate-y-[-50%]"
|
||||
alt=""
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="m.childList && idx == index"
|
||||
class="pl40px"
|
||||
v-show="idx === index && onClic ? true : false"
|
||||
>
|
||||
<div
|
||||
class="my30px pl10px text-#000 activeChildren"
|
||||
v-for="(item, ind) in m.childList"
|
||||
:key="item.id"
|
||||
@click.stop="goChild(item)"
|
||||
@click="activeItem = item.id"
|
||||
>
|
||||
<!-- <el-tooltip :content="item.name" placement="top-start" effect="light"> -->
|
||||
<n-popover trigger="hover" placement="top-start">
|
||||
<template #trigger>
|
||||
<span
|
||||
class="text-18px flex child font-900 truncate"
|
||||
:class="activeItem === item.id ? 'text-#002fa7' : ''"
|
||||
>{{ item.name }}</span
|
||||
>
|
||||
</template>
|
||||
<div class="text-18px leading-40px">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</n-popover>
|
||||
<!-- </el-tooltip> -->
|
||||
<div
|
||||
v-if="m.childList && idx == index"
|
||||
class="pl40px"
|
||||
v-show="idx === index && onClic ? true : false"
|
||||
>
|
||||
<div
|
||||
class="my30px pl10px text-#000 activeChildren"
|
||||
v-for="(item, ind) in m.childList"
|
||||
:key="item.id"
|
||||
@click.stop="goChild(item)"
|
||||
@click="activeItem = item.id"
|
||||
>
|
||||
<!-- <el-tooltip :content="item.name" placement="top-start" effect="light"> -->
|
||||
<div class="relative">
|
||||
<n-popover trigger="hover" placement="top-start">
|
||||
<template #trigger>
|
||||
<span
|
||||
class="text-18px flex child font-900 truncate"
|
||||
:class="activeItem === item.id ? 'text-#002fa7' : ''"
|
||||
>{{ item.name }}</span
|
||||
>
|
||||
</template>
|
||||
<div class="text-18px leading-40px">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</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
|
||||
class="my30px pl10px text-#000"
|
||||
v-for="(ite, ind) in item.childList"
|
||||
:key="item.id"
|
||||
@click.stop="goChild(ite)"
|
||||
@click="activeItem = ite.id"
|
||||
>
|
||||
<div class="relative">
|
||||
<n-popover trigger="hover" placement="top-start">
|
||||
<template #trigger>
|
||||
<span
|
||||
class="text-18px flex childs font-900 truncate"
|
||||
:class="activeItem === ite.id ? 'text-#002fa7' : ''"
|
||||
>{{ ite.name }}</span
|
||||
>
|
||||
</template>
|
||||
<div class="text-18px leading-40px">
|
||||
{{ ite.name }}
|
||||
</div>
|
||||
</n-popover>
|
||||
<img
|
||||
@click="activeItem = ite.id"
|
||||
v-if="ite.isSelFlag === 1 && !ite.childList?.length"
|
||||
src="@/assets/images/NEW.gif"
|
||||
class="!h-20px !w-auto mr-1 absolute left-[-46px] top-[50%] translate-y-[-50%]"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div v-if="item.childList && idx == index" class="pl10px">
|
||||
<div
|
||||
class="my30px pl10px text-#000"
|
||||
v-for="(ite, ind) in item.childList"
|
||||
:key="item.id"
|
||||
@click.stop="goChild(ite)"
|
||||
@click="activeItem = ite.id"
|
||||
>
|
||||
<div class="relative">
|
||||
<n-popover trigger="hover" placement="top-start">
|
||||
<template #trigger>
|
||||
<span
|
||||
class="text-18px flex childs font-900 truncate"
|
||||
:class="activeItem === ite.id ? 'text-#002fa7' : ''"
|
||||
>{{ ite.name }}</span
|
||||
>
|
||||
</template>
|
||||
<div class="text-18px leading-40px">
|
||||
{{ ite.name }}
|
||||
</div>
|
||||
</n-popover>
|
||||
<img
|
||||
@click="activeItem = ite.id"
|
||||
v-if="ite.isSelFlag === 1 && !ite.childList?.length"
|
||||
src="@/assets/images/NEW.gif"
|
||||
class="!h-20px !w-auto mr-1 absolute left-[-46px] top-[50%] translate-y-[-50%]"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div v-if="ite.childList && idx == index" class="pl10px">
|
||||
<div
|
||||
class="my20px py-10px pl10px text-#000 relative"
|
||||
v-for="(it, ind) in ite.childList"
|
||||
:key="item.id"
|
||||
@click.stop="goChild(it)"
|
||||
@click="activeItem = it.id"
|
||||
>
|
||||
<n-popover trigger="hover" placement="top-start">
|
||||
<template #trigger>
|
||||
<span
|
||||
class="text-18px flex childs font-900 truncate"
|
||||
:class="activeItem === it.id ? 'text-#002fa7' : ''"
|
||||
>{{ it.name }}</span
|
||||
>
|
||||
</template>
|
||||
<div class="text-18px leading-40px">
|
||||
{{ it.name }}
|
||||
</div>
|
||||
</n-popover>
|
||||
<img
|
||||
@click="activeItem = it.id"
|
||||
v-if="it.isSelFlag == 1"
|
||||
src="@/assets/images/NEW.gif"
|
||||
class="!h-20px !w-auto mr-1 absolute left-[-36px] top-[50%] translate-y-[-50%]"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="ite.childList && idx == index" class="pl10px">
|
||||
<div
|
||||
class="my20px py-10px pl10px text-#000 relative"
|
||||
v-for="(it, ind) in ite.childList"
|
||||
:key="item.id"
|
||||
@click.stop="goChild(it)"
|
||||
@click="activeItem = it.id"
|
||||
>
|
||||
<n-popover trigger="hover" placement="top-start">
|
||||
<template #trigger>
|
||||
<span
|
||||
class="text-18px flex childs font-900 truncate"
|
||||
:class="activeItem === it.id ? 'text-#002fa7' : ''"
|
||||
>{{ it.name }}</span
|
||||
>
|
||||
</template>
|
||||
<div class="text-18px leading-40px">
|
||||
{{ it.name }}
|
||||
</div>
|
||||
</n-popover>
|
||||
<img
|
||||
@click="activeItem = it.id"
|
||||
v-if="it.isSelFlag == 1"
|
||||
src="@/assets/images/NEW.gif"
|
||||
class="!h-20px !w-auto mr-1 absolute left-[-36px] top-[50%] translate-y-[-50%]"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="main flex-1 pb15px pt0px relative">
|
||||
<!-- <Home /> -->
|
||||
<RouterView :cateId="activeItem" :title="titles" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="main flex-1 pb15px pt0px relative">
|
||||
<!-- <Home /> -->
|
||||
<RouterView :cateId="activeItem" :title="titles" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less">
|
||||
.truncate {
|
||||
display: block;
|
||||
max-width: 226px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
max-width: 226px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.page {
|
||||
font-family: 'PingFang SC';
|
||||
user-select: none;
|
||||
background-image: none;
|
||||
background-color: #cacaca;
|
||||
background-position: 0 0;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
// color: #3b3b3b;
|
||||
color: #000;
|
||||
font-family: 'PingFang SC';
|
||||
user-select: none;
|
||||
background-image: none;
|
||||
background-color: #cacaca;
|
||||
background-position: 0 0;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
// color: #3b3b3b;
|
||||
color: #000;
|
||||
|
||||
line-height: 1;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.nav {
|
||||
&::before {
|
||||
top: -48px;
|
||||
}
|
||||
.child:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.childs:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
&::before {
|
||||
top: -48px;
|
||||
}
|
||||
.child:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.childs:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
&::after {
|
||||
bottom: -49px;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
&::after {
|
||||
bottom: -49px;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
&.active {
|
||||
color: #002fa7;
|
||||
background-color: #e6ecff;
|
||||
&.active {
|
||||
color: #002fa7;
|
||||
background-color: #e6ecff;
|
||||
|
||||
a {
|
||||
color: #002fa7;
|
||||
}
|
||||
a {
|
||||
color: #002fa7;
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
&::before,
|
||||
&::after {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
&.actives {
|
||||
padding: 0px !important;
|
||||
color: #4977fc;
|
||||
background-color: #f5f8ff;
|
||||
&.actives {
|
||||
padding: 0px !important;
|
||||
color: #4977fc;
|
||||
background-color: #f5f8ff;
|
||||
|
||||
a {
|
||||
color: #002fa7;
|
||||
}
|
||||
a {
|
||||
color: #002fa7;
|
||||
}
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
opacity: 1;
|
||||
}
|
||||
&::before,
|
||||
&::after {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.onActive {
|
||||
background-color: #e6ecff;
|
||||
border-radius: 32px 0 0 32px;
|
||||
.onActive {
|
||||
background-color: #e6ecff;
|
||||
border-radius: 32px 0 0 32px;
|
||||
|
||||
padding: 24px 36px 24px 50px;
|
||||
}
|
||||
}
|
||||
padding: 24px 36px 24px 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
height: 95%;
|
||||
background-color: #4877fb;
|
||||
margin-left: 30px;
|
||||
width: 100%;
|
||||
height: 95%;
|
||||
background-color: #4877fb;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
scrollbar-width: none;
|
||||
display: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import AppBlock from '@/components/AppBlock.vue'
|
|||
import AppNewsBox from '@/components/AppNewsBox.vue'
|
||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||
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 { NModal,NCard } from 'naive-ui'
|
||||
import {formatDate} from '@/utils/format'
|
||||
|
|
|
|||
|
|
@ -3,76 +3,74 @@
|
|||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||
import { useDate } from '@/views/home/hooks/useDate'
|
||||
import {NForm,NFormItem,NInput,NModal,NButton,useMessage} from 'naive-ui'
|
||||
import zhCn from "element-plus/lib/locale/lang/zh-cn";
|
||||
import { NForm, NFormItem, NInput, NModal, NButton, useMessage } from 'naive-ui'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import UserPage from '@/views/home/intelligence/process/UserPages.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 { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
|
||||
let rules = {
|
||||
title: {
|
||||
required: false,
|
||||
message: '请输入标题',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actName:{
|
||||
required: false,
|
||||
message: '请输入名称',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actSTime: {
|
||||
required: false,
|
||||
message: '请选择开始',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actETime: {
|
||||
required: false,
|
||||
message: '请选择结束',
|
||||
trigger: 'blur'
|
||||
},
|
||||
position:{
|
||||
required: false,
|
||||
message: '请输入职务',
|
||||
trigger: 'blur'
|
||||
},
|
||||
|
||||
title: {
|
||||
required: false,
|
||||
message: '请输入标题',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actName: {
|
||||
required: false,
|
||||
message: '请输入名称',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actSTime: {
|
||||
required: false,
|
||||
message: '请选择开始',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actETime: {
|
||||
required: false,
|
||||
message: '请选择结束',
|
||||
trigger: 'blur'
|
||||
},
|
||||
position: {
|
||||
required: false,
|
||||
message: '请输入职务',
|
||||
trigger: 'blur'
|
||||
}
|
||||
}
|
||||
const showModals =ref(false)
|
||||
const showModals = ref(false)
|
||||
const showModal = ref(false)
|
||||
const dataList = ref()
|
||||
const handleChild = (data)=>{
|
||||
const { showModal: show, multipleSelection } = data
|
||||
showModal.value = unref(show)
|
||||
dataList.value = unref(multipleSelection)
|
||||
const handleChild = (data) => {
|
||||
const { showModal: show, multipleSelection } = data
|
||||
showModal.value = unref(show)
|
||||
dataList.value = unref(multipleSelection)
|
||||
}
|
||||
const CloseThis = (data)=>{
|
||||
showModal.value = data
|
||||
const CloseThis = (data) => {
|
||||
showModal.value = data
|
||||
}
|
||||
|
||||
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({
|
||||
title:'',
|
||||
content:'',
|
||||
actName:'',
|
||||
actSTime:'',
|
||||
actETime:'',
|
||||
position:'',
|
||||
userIdList:[],
|
||||
title: '',
|
||||
content: '',
|
||||
actName: '',
|
||||
actSTime: '',
|
||||
actETime: '',
|
||||
position: '',
|
||||
userIdList: []
|
||||
})
|
||||
|
||||
const editorContent =ref()
|
||||
const editorContent = ref()
|
||||
function escapeHTML(html: string): string {
|
||||
const tempElement = document.createElement('div');
|
||||
tempElement.textContent = html;
|
||||
return tempElement.innerHTML;
|
||||
const tempElement = document.createElement('div')
|
||||
tempElement.textContent = html
|
||||
return tempElement.innerHTML
|
||||
}
|
||||
// 获取子组件传过来的值
|
||||
const handleChild2 = (data: string) => {
|
||||
|
|
@ -80,152 +78,184 @@ const handleChild2 = (data: string) => {
|
|||
}
|
||||
|
||||
async function sure() {
|
||||
const cont = editorContent.value
|
||||
const content = escapeHTML(cont)
|
||||
const {title, actName, actSTime, actETime,position } = formValue.value
|
||||
const cont = editorContent.value
|
||||
const content = escapeHTML(cont)
|
||||
const { title, actName, actSTime, actETime, position } = formValue.value
|
||||
|
||||
|
||||
const starTime = new Date(actSTime).getTime()
|
||||
const endTime = new Date(actETime).getTime()
|
||||
console.log(starTime,endTime)
|
||||
let userIdList: any[] =[]
|
||||
if(!dataList.value){
|
||||
message.success("请选择要提醒的对象")
|
||||
return
|
||||
}
|
||||
dataList.value.forEach((i: { userId: any })=>{
|
||||
userIdList.push(i.userId)
|
||||
})
|
||||
console.log(formValue.value,dataList,content)
|
||||
if(userIdList.length<0) return
|
||||
let formdata = new FormData();
|
||||
formdata.append("title",title);
|
||||
formdata.append("actName",actName);
|
||||
formdata.append("actSTime",starTime);
|
||||
formdata.append("actETime",endTime);
|
||||
formdata.append("content",content);
|
||||
formdata.append("position",position);
|
||||
formdata.append("userIdList",userIdList);
|
||||
const { msg, code } = await addPageInv(formdata,{headers: {'Content-Type': 'application/form-data'}})
|
||||
if (code === 200) {
|
||||
message.success("添加成功")
|
||||
}
|
||||
else { message.success(msg); }
|
||||
const starTime = new Date(actSTime).getTime()
|
||||
const endTime = new Date(actETime).getTime()
|
||||
console.log(starTime, endTime)
|
||||
let userIdList: any[] = []
|
||||
if (!dataList.value) {
|
||||
message.success('请选择要提醒的对象')
|
||||
return
|
||||
}
|
||||
dataList.value.forEach((i: { userId: any }) => {
|
||||
userIdList.push(i.userId)
|
||||
})
|
||||
console.log(formValue.value, dataList, content)
|
||||
if (userIdList.length < 0) return
|
||||
let formdata = new FormData()
|
||||
formdata.append('title', title)
|
||||
formdata.append('actName', actName)
|
||||
formdata.append('actSTime', starTime)
|
||||
formdata.append('actETime', endTime)
|
||||
formdata.append('content', content)
|
||||
formdata.append('position', position)
|
||||
formdata.append('userIdList', userIdList)
|
||||
const { msg, code } = await addPageInv(formdata, {
|
||||
headers: { 'Content-Type': 'application/form-data' }
|
||||
})
|
||||
if (code === 200) {
|
||||
message.success('添加成功')
|
||||
} else {
|
||||
message.success(msg)
|
||||
}
|
||||
}
|
||||
|
||||
</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 mt27px">
|
||||
<div class="text-36px">邀请</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</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>
|
||||
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt27px">
|
||||
<div class="text-36px">邀请</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</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="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>
|
||||
|
||||
<div class=" overflow-y-auto h800px container" v-html="editorContent"></div>
|
||||
</div>
|
||||
</n-modal>
|
||||
<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>
|
||||
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
.g-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #E7EBF5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
height: 800px;
|
||||
background-color: #fff;
|
||||
.timeline {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #142142;
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
height: 800px;
|
||||
background-color: #fff;
|
||||
.timeline {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #142142;
|
||||
|
||||
.one {
|
||||
position: relative;
|
||||
.year{
|
||||
left: -132px;
|
||||
top: -14px;
|
||||
color: #003CB7;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
.one {
|
||||
position: relative;
|
||||
.year {
|
||||
left: -132px;
|
||||
top: -14px;
|
||||
color: #003cb7;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -3,233 +3,259 @@
|
|||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||
// import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||
import { useDate } from '@/views/home/hooks/useDate'
|
||||
import {NForm,NFormItem,NInput,NModal,NButton,useMessage} from 'naive-ui'
|
||||
import zhCn from "element-plus/lib/locale/lang/zh-cn";
|
||||
import { NForm, NFormItem, NInput, NModal, NButton, useMessage } from 'naive-ui'
|
||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||
import UserPage from '@/views/home/intelligence/process/UserPages.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 { day, week } = useDate()
|
||||
const { push } = useRouter()
|
||||
|
||||
let rules = {
|
||||
title: {
|
||||
required: false,
|
||||
message: '请输入标题',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actName:{
|
||||
required: false,
|
||||
message: '请输入名称',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actSTime: {
|
||||
required: false,
|
||||
message: '请选择开始',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actETime: {
|
||||
required: false,
|
||||
message: '请选择结束',
|
||||
trigger: 'blur'
|
||||
},
|
||||
position:{
|
||||
required: false,
|
||||
message: '请输入职务',
|
||||
trigger: 'blur'
|
||||
},
|
||||
|
||||
title: {
|
||||
required: false,
|
||||
message: '请输入标题',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actName: {
|
||||
required: false,
|
||||
message: '请输入名称',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actSTime: {
|
||||
required: false,
|
||||
message: '请选择开始',
|
||||
trigger: 'blur'
|
||||
},
|
||||
actETime: {
|
||||
required: false,
|
||||
message: '请选择结束',
|
||||
trigger: 'blur'
|
||||
},
|
||||
position: {
|
||||
required: false,
|
||||
message: '请输入职务',
|
||||
trigger: 'blur'
|
||||
}
|
||||
}
|
||||
const showModal = ref(false)
|
||||
const dataList = ref()
|
||||
const handleChild = (data)=>{
|
||||
const { showModal: show, multipleSelection } = data
|
||||
showModal.value = unref(show)
|
||||
dataList.value = unref(multipleSelection)
|
||||
const handleChild = (data) => {
|
||||
const { showModal: show, multipleSelection } = data
|
||||
showModal.value = unref(show)
|
||||
dataList.value = unref(multipleSelection)
|
||||
}
|
||||
const CloseThis = (data)=>{
|
||||
showModal.value = data
|
||||
const CloseThis = (data) => {
|
||||
showModal.value = data
|
||||
}
|
||||
|
||||
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({
|
||||
title:'',
|
||||
content:'',
|
||||
actName:'',
|
||||
actSTime:'',
|
||||
actETime:'',
|
||||
position:'',
|
||||
userIdList:[],
|
||||
title: '',
|
||||
content: '',
|
||||
actName: '',
|
||||
actSTime: '',
|
||||
actETime: '',
|
||||
position: '',
|
||||
userIdList: []
|
||||
})
|
||||
|
||||
const editorContent =ref()
|
||||
const editorContent = ref()
|
||||
function escapeHTML(html: string): string {
|
||||
const tempElement = document.createElement('div');
|
||||
tempElement.textContent = html;
|
||||
return tempElement.innerHTML;
|
||||
const tempElement = document.createElement('div')
|
||||
tempElement.textContent = html
|
||||
return tempElement.innerHTML
|
||||
}
|
||||
const showModals =ref(false)
|
||||
const showModals = ref(false)
|
||||
// 获取子组件传过来的值
|
||||
const handleChild2 = (data: string) => {
|
||||
editorContent.value = data
|
||||
}
|
||||
|
||||
async function sure() {
|
||||
const cont = editorContent.value
|
||||
const content = escapeHTML(cont)
|
||||
const {title, actName, actSTime, actETime,position } = formValue.value
|
||||
const cont = editorContent.value
|
||||
const content = escapeHTML(cont)
|
||||
const { title, actName, actSTime, actETime, position } = formValue.value
|
||||
|
||||
|
||||
const starTime = new Date(actSTime).getTime()
|
||||
const endTime = new Date(actETime).getTime()
|
||||
console.log(starTime,endTime)
|
||||
let userIdList: any[] =[]
|
||||
if(!dataList.value){
|
||||
message.success("请选择要提醒的对象")
|
||||
return
|
||||
}
|
||||
dataList.value.forEach((i: { userId: any })=>{
|
||||
userIdList.push(i.userId)
|
||||
})
|
||||
console.log(formValue.value,dataList,content)
|
||||
if(userIdList.length<0) return
|
||||
let formdata = new FormData();
|
||||
formdata.append("title",title);
|
||||
formdata.append("actName",actName);
|
||||
formdata.append("actSTime",starTime);
|
||||
formdata.append("actETime",endTime);
|
||||
formdata.append("content",content);
|
||||
formdata.append("position",position);
|
||||
formdata.append("userIdList",userIdList);
|
||||
const { msg, code } = await addPageVisit(formdata,{headers: {'Content-Type': 'application/form-data'}})
|
||||
if (code === 200) {
|
||||
message.success("添加成功")
|
||||
}
|
||||
else { message.success(msg); }
|
||||
const starTime = new Date(actSTime).getTime()
|
||||
const endTime = new Date(actETime).getTime()
|
||||
console.log(starTime, endTime)
|
||||
let userIdList: any[] = []
|
||||
if (!dataList.value) {
|
||||
message.success('请选择要提醒的对象')
|
||||
return
|
||||
}
|
||||
dataList.value.forEach((i: { userId: any }) => {
|
||||
userIdList.push(i.userId)
|
||||
})
|
||||
console.log(formValue.value, dataList, content)
|
||||
if (userIdList.length < 0) return
|
||||
let formdata = new FormData()
|
||||
formdata.append('title', title)
|
||||
formdata.append('actName', actName)
|
||||
formdata.append('actSTime', starTime)
|
||||
formdata.append('actETime', endTime)
|
||||
formdata.append('content', content)
|
||||
formdata.append('position', position)
|
||||
formdata.append('userIdList', userIdList)
|
||||
const { msg, code } = await addPageVisit(formdata, {
|
||||
headers: { 'Content-Type': 'application/form-data' }
|
||||
})
|
||||
if (code === 200) {
|
||||
message.success('添加成功')
|
||||
} else {
|
||||
message.success(msg)
|
||||
}
|
||||
}
|
||||
|
||||
</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 mt27px">
|
||||
<div class="text-36px">拜访</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</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>
|
||||
|
||||
<HomeHead class="top">
|
||||
<template #content>
|
||||
<!-- <HomeHeadSearch /> -->
|
||||
</template>
|
||||
</HomeHead>
|
||||
<div class="h-full relative flex flex-col">
|
||||
<div class="font-600 flex items-end mt27px">
|
||||
<div class="text-36px">拜访</div>
|
||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</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="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>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<style scoped lang="less">
|
||||
|
||||
.top {
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
position: absolute;
|
||||
right: 30px;
|
||||
top: -92px;
|
||||
}
|
||||
|
||||
.g-wrapper {
|
||||
border-radius: 18px;
|
||||
border: 1px solid #E7EBF5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
height: 800px;
|
||||
background-color: #fff;
|
||||
.timeline {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #142142;
|
||||
border-radius: 18px;
|
||||
border: 1px solid #e7ebf5;
|
||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||
overflow: auto;
|
||||
height: 800px;
|
||||
background-color: #fff;
|
||||
.timeline {
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
color: #142142;
|
||||
|
||||
.one {
|
||||
position: relative;
|
||||
.year{
|
||||
left: -132px;
|
||||
top: -14px;
|
||||
color: #003CB7;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
.one {
|
||||
position: relative;
|
||||
.year {
|
||||
left: -132px;
|
||||
top: -14px;
|
||||
color: #003cb7;
|
||||
font-size: 26px;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
108
vite.config.ts
108
vite.config.ts
|
|
@ -13,59 +13,59 @@ import PurgeIcons from 'vite-plugin-purge-icons'
|
|||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
server: {
|
||||
proxy: {
|
||||
'/test-api': {
|
||||
target: 'http://admin.echo.mteam01.com/openApi/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/test-api': {
|
||||
target: 'http://admin.echo.mteam01.com/openApi/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/test-api/, '') // 设置重写的路径
|
||||
}
|
||||
}
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||
}
|
||||
},
|
||||
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
Unocss({
|
||||
presets: [presetUno()]
|
||||
}),
|
||||
AutoImport({
|
||||
imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数
|
||||
dts: 'src/types/auto-import.d.ts',
|
||||
// eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912
|
||||
eslintrc: {
|
||||
enabled: false, // Default `false`
|
||||
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
|
||||
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
|
||||
},
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
PurgeIcons(),
|
||||
ViteCompression({
|
||||
algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli'
|
||||
ext: '.gz', // 压缩后文件的扩展名
|
||||
verbose: false
|
||||
})
|
||||
],
|
||||
build: {
|
||||
chunkSizeWarningLimit: 4000,
|
||||
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
|
||||
rollupOptions: {
|
||||
treeshake: true // Enable tree-shaking
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
// pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build
|
||||
}
|
||||
}
|
||||
}
|
||||
plugins: [
|
||||
vue(),
|
||||
vueJsx(),
|
||||
Unocss({
|
||||
presets: [presetUno()]
|
||||
}),
|
||||
AutoImport({
|
||||
imports: ['vue', 'vue-router', '@vueuse/core'], // 自动导入vue和vue-router相关函数
|
||||
dts: 'src/types/auto-import.d.ts',
|
||||
// eslint报错解决 https://blog.csdn.net/sayUonly/article/details/123482912
|
||||
eslintrc: {
|
||||
enabled: false, // Default `false`
|
||||
filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json`
|
||||
globalsPropValue: true // Default `true`, (true | false | 'readonly' | 'readable' | 'writable' | 'writeable')
|
||||
},
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()]
|
||||
}),
|
||||
PurgeIcons(),
|
||||
ViteCompression({
|
||||
algorithm: 'gzip', // 选择压缩算法,支持 'gzip' 或 'brotli'
|
||||
ext: '.gz', // 压缩后文件的扩展名
|
||||
verbose: false
|
||||
})
|
||||
],
|
||||
build: {
|
||||
chunkSizeWarningLimit: 6300,
|
||||
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
|
||||
rollupOptions: {
|
||||
treeshake: true // Enable tree-shaking
|
||||
},
|
||||
terserOptions: {
|
||||
compress: {
|
||||
// pure_funcs: ['console.log', 'console.info'] // Remove console.log and console.info from production build
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue