fix bug
parent
405b215bf5
commit
cdc9fff2d9
|
|
@ -12,161 +12,157 @@ const noticeData = ref()
|
||||||
const flgs = ref(false)
|
const flgs = ref(false)
|
||||||
const userCode = ref(false)
|
const userCode = ref(false)
|
||||||
async function getNoticeList() {
|
async function getNoticeList() {
|
||||||
const { data } = await getAllNoticeList()
|
const { data } = await getAllNoticeList()
|
||||||
noticeData.value = data
|
noticeData.value = data
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getNoticeList()
|
getNoticeList()
|
||||||
|
|
||||||
// console.log( flgs.value,flg)
|
// console.log( flgs.value,flg)
|
||||||
})
|
})
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
// console.log( flgs.value,store.user.type, 'tech_service')
|
// console.log( flgs.value,store.user.type, 'tech_service')
|
||||||
flgs.value = [1, 2, 3, 4].includes(store.user.type)
|
flgs.value = [1, 2, 3, 4].includes(store.user.type)
|
||||||
userCode.value = ['admin', 'tech_service', 'footprint_dandang'].includes(
|
userCode.value = ['admin', 'tech_service', 'footprint_dandang'].some((item) =>
|
||||||
store.user.roleCode
|
store.user.roleCode?.includes(item)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
const options = [
|
const options = [
|
||||||
{ label: '个人中心', key: 'ucenter' },
|
{ label: '个人中心', key: 'ucenter' },
|
||||||
,
|
,
|
||||||
{
|
{
|
||||||
label: '修改密码',
|
label: '修改密码',
|
||||||
key: 'ChangePWD',
|
key: 'ChangePWD',
|
||||||
props: {
|
props: {
|
||||||
onclick: () => {
|
onclick: () => {
|
||||||
console.log(route.path)
|
console.log(route.path)
|
||||||
const pth = route.path === '/external' ? 'modify' : 'modifys'
|
const pth = route.path === '/external' ? 'modify' : 'modifys'
|
||||||
push({ name: pth })
|
push({ name: pth })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'logout',
|
key: 'logout',
|
||||||
label: '退出登录',
|
label: '退出登录',
|
||||||
props: {
|
props: {
|
||||||
style: { width: '150px' },
|
style: { width: '150px' },
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
store.LogOut()
|
store.LogOut()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const noticeShow = ref(false)
|
const noticeShow = ref(false)
|
||||||
let showIs = false
|
let showIs = false
|
||||||
//模块id,1-情报 2-市况汇率 3-数据平台 4-BCP管理 5-碳中和 6-品质 7-差别化LAB
|
//模块id,1-情报 2-市况汇率 3-数据平台 4-BCP管理 5-碳中和 6-品质 7-差别化LAB
|
||||||
const goModeuls = (obj) => {
|
const goModeuls = (obj) => {
|
||||||
const { moduleId } = obj
|
const { moduleId } = obj
|
||||||
if (!moduleId) return
|
if (!moduleId) return
|
||||||
switch (moduleId) {
|
switch (moduleId) {
|
||||||
case 1:
|
case 1:
|
||||||
if (store.user.isReview === 1 || store.user.isPublish === 1) {
|
if (store.user.isReview === 1 || store.user.isPublish === 1) {
|
||||||
push('/Home/Process')
|
push('/Home/Process')
|
||||||
} else {
|
} else {
|
||||||
push('/Home/intelligence')
|
push('/Home/intelligence')
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
push({ name: 'Market' })
|
push({ name: 'Market' })
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
push({ name: 'CD' })
|
push({ name: 'CD' })
|
||||||
break
|
break
|
||||||
case 4:
|
case 4:
|
||||||
push({ name: 'BCP' })
|
push({ name: 'BCP' })
|
||||||
break
|
break
|
||||||
case 5:
|
case 5:
|
||||||
push({ name: 'CSR' })
|
push({ name: 'CSR' })
|
||||||
break
|
break
|
||||||
case 6:
|
case 6:
|
||||||
push({ name: 'Quality' })
|
push({ name: 'Quality' })
|
||||||
break
|
break
|
||||||
case 7:
|
case 7:
|
||||||
push({ name: 'Diffspace' })
|
push({ name: 'Diffspace' })
|
||||||
break
|
break
|
||||||
case 9:
|
case 9:
|
||||||
push({ name: 'DataBaseReview' })
|
push({ name: 'DataBaseReview' })
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
push('/Home/intelligence')
|
push('/Home/intelligence')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const noticeShows = () => {
|
const noticeShows = () => {
|
||||||
if (noticeData.value && noticeData.value.length > 0) {
|
if (noticeData.value && noticeData.value.length > 0) {
|
||||||
// console.log(noticeData.value)
|
// console.log(noticeData.value)
|
||||||
noticeShow.value = !noticeShow.value
|
noticeShow.value = !noticeShow.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const toFootPrint = () => {
|
const toFootPrint = () => {
|
||||||
console.log(111)
|
console.log(111)
|
||||||
push('/Home/footprint')
|
push('/Home/footprint')
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="inline-flex items-center relative">
|
<div class="inline-flex items-center relative">
|
||||||
<!-- 足迹 -->
|
<!-- 足迹 -->
|
||||||
<!-- <div class="cursor-pointer w-40px h-40px z-200"> -->
|
<!-- <div class="cursor-pointer w-40px h-40px z-200"> -->
|
||||||
<el-icon size="35" v-if="userCode" @click="toFootPrint"
|
<el-icon size="35" v-if="userCode" @click="toFootPrint"><Platform /></el-icon>
|
||||||
><Platform
|
<!-- </div> -->
|
||||||
/></el-icon>
|
|
||||||
<!-- </div> -->
|
|
||||||
|
|
||||||
<!-- 全屏小图标 -->
|
<!-- 全屏小图标 -->
|
||||||
<div
|
<div
|
||||||
size="40"
|
size="40"
|
||||||
color="#ccc"
|
color="#ccc"
|
||||||
style="font-size: 20px; width: 30px; margin: 10px"
|
style="font-size: 20px; width: 30px; margin: 10px"
|
||||||
@click="toggle"
|
@click="toggle"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
viewBox="0 0 20 20"
|
viewBox="0 0 20 20"
|
||||||
>
|
>
|
||||||
<g fill="none">
|
<g fill="none">
|
||||||
<path
|
<path
|
||||||
d="M3.75 3a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V5.56l2.22 2.22a.75.75 0 0 0 1.06-1.06L5.56 4.5h1.69a.75.75 0 0 0 0-1.5h-3.5zm0 14a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 1.5 0v1.69l2.22-2.22a.75.75 0 0 1 1.06 1.06L5.56 15.5h1.69a.75.75 0 0 1 0 1.5h-3.5zM17 3.75a.75.75 0 0 0-.75-.75h-3.5a.75.75 0 0 0 0 1.5h1.69l-2.22 2.22a.75.75 0 0 0 1.06 1.06l2.22-2.22v1.69a.75.75 0 0 0 1.5 0v-3.5zM16.25 17a.75.75 0 0 0 .75-.75v-3.5a.75.75 0 0 0-1.5 0v1.69l-2.22-2.22a.75.75 0 1 0-1.06 1.06l2.22 2.22h-1.69a.75.75 0 0 0 0 1.5h3.5z"
|
d="M3.75 3a.75.75 0 0 0-.75.75v3.5a.75.75 0 0 0 1.5 0V5.56l2.22 2.22a.75.75 0 0 0 1.06-1.06L5.56 4.5h1.69a.75.75 0 0 0 0-1.5h-3.5zm0 14a.75.75 0 0 1-.75-.75v-3.5a.75.75 0 0 1 1.5 0v1.69l2.22-2.22a.75.75 0 0 1 1.06 1.06L5.56 15.5h1.69a.75.75 0 0 1 0 1.5h-3.5zM17 3.75a.75.75 0 0 0-.75-.75h-3.5a.75.75 0 0 0 0 1.5h1.69l-2.22 2.22a.75.75 0 0 0 1.06 1.06l2.22-2.22v1.69a.75.75 0 0 0 1.5 0v-3.5zM16.25 17a.75.75 0 0 0 .75-.75v-3.5a.75.75 0 0 0-1.5 0v1.69l-2.22-2.22a.75.75 0 1 0-1.06 1.06l2.22 2.22h-1.69a.75.75 0 0 0 0 1.5h3.5z"
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
></path>
|
></path>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="flgs"
|
v-if="flgs"
|
||||||
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer"
|
class="bg-#fff/20 b-1px b-solid b-#fff rd-12px flex items-center h-52px px12px cursor-pointer"
|
||||||
>
|
>
|
||||||
<div size="small" @click="noticeShows">
|
<div size="small" @click="noticeShows">
|
||||||
<img
|
<img src="../assets/images/tongzhi@2x.png" class="w20px mr5px mt--5px" />新着通知<span
|
||||||
src="../assets/images/tongzhi@2x.png"
|
class="ml8px pl5px pr5px rounded-20px bg-#002FA7"
|
||||||
class="w20px mr5px mt--5px"
|
>{{ store.user.reviewCount ?? 0 }}</span
|
||||||
/>新着通知<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
>
|
||||||
store.user.reviewCount ?? 0
|
</div>
|
||||||
}}</span>
|
<!-- 跳转到碳中和页面的 -->
|
||||||
</div>
|
<div class="notice" v-if="noticeShow">
|
||||||
<!-- 跳转到碳中和页面的 -->
|
<div
|
||||||
<div class="notice" v-if="noticeShow">
|
v-for="ite in noticeData"
|
||||||
<div
|
class="p10px box flex justify-between"
|
||||||
v-for="ite in noticeData"
|
v-if="noticeData"
|
||||||
class="p10px box flex justify-between"
|
@click="goModeuls(ite)"
|
||||||
v-if="noticeData"
|
>
|
||||||
@click="goModeuls(ite)"
|
<div>{{ ite.moduleName }}</div>
|
||||||
>
|
<span class="">{{ ite.moduleCount }}</span>
|
||||||
<div>{{ ite.moduleName }}</div>
|
</div>
|
||||||
<span class="">{{ ite.moduleCount }}</span>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 跳转到审批页面 -->
|
<!-- 跳转到审批页面 -->
|
||||||
<!-- <div size="small">
|
<!-- <div size="small">
|
||||||
新着通知
|
新着通知
|
||||||
<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
<span class="ml8px pl5px pr5px rounded-20px bg-#002FA7">{{
|
||||||
store.user.reviewCount ?? 0
|
store.user.reviewCount ?? 0
|
||||||
}}</span>
|
}}</span>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- <n-popover :overlap="false" placement="bottom-start" trigger="click">
|
<!-- <n-popover :overlap="false" placement="bottom-start" trigger="click">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<div size="small">
|
<div size="small">
|
||||||
新着通知
|
新着通知
|
||||||
|
|
@ -175,7 +171,7 @@ const toFootPrint = () => {
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
</template> -->
|
</template> -->
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="inline-flex items-center p10px cursor-pointer"
|
class="inline-flex items-center p10px cursor-pointer"
|
||||||
v-if="store.user.isReview === 1"
|
v-if="store.user.isReview === 1"
|
||||||
>
|
>
|
||||||
|
|
@ -207,60 +203,57 @@ const toFootPrint = () => {
|
||||||
>去查看</n-button
|
>去查看</n-button
|
||||||
>
|
>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- </n-popover> -->
|
<!-- </n-popover> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- 当前登录用户信息 -->
|
<!-- 当前登录用户信息 -->
|
||||||
<NDropdown show-arrow placement="bottom-end" size="huge" :options="options">
|
<NDropdown show-arrow placement="bottom-end" size="huge" :options="options">
|
||||||
<div class="cursor-pointer inline-flex items-center">
|
<div class="cursor-pointer inline-flex items-center">
|
||||||
<img
|
<img src="@/assets/images/icon-user.svg" class="ml40px mr16px w60px h60px" />
|
||||||
src="@/assets/images/icon-user.svg"
|
<!-- @click="toggle" -->
|
||||||
class="ml40px mr16px w60px h60px"
|
<span>{{ store.user.nikeName ?? '游客' }}</span>
|
||||||
/>
|
<img src="@/assets/images/icon-more.svg" class="ml30px w13px" />
|
||||||
<!-- @click="toggle" -->
|
</div>
|
||||||
<span>{{ store.user.nikeName ?? '游客' }}</span>
|
</NDropdown>
|
||||||
<img src="@/assets/images/icon-more.svg" class="ml30px w13px" />
|
</div>
|
||||||
</div>
|
|
||||||
</NDropdown>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.notice {
|
.notice {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 52px;
|
top: 52px;
|
||||||
left: -3px;
|
left: -3px;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
background: rgb(255, 255, 255);
|
background: rgb(255, 255, 255);
|
||||||
max-height: 520px;
|
max-height: 520px;
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
color: rgb(26, 25, 25);
|
color: rgb(26, 25, 25);
|
||||||
box-shadow: 1px 1px 5px 1px #d9d5d5;
|
box-shadow: 1px 1px 5px 1px #d9d5d5;
|
||||||
.box:hover {
|
.box:hover {
|
||||||
background: #e5e5e5;
|
background: #e5e5e5;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
color: #1836c3;
|
color: #1836c3;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
background: red;
|
background: red;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
color: #1836c3;
|
color: #1836c3;
|
||||||
padding: 2px 7px;
|
padding: 2px 7px;
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.popover-grid {
|
.popover-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto auto auto auto auto;
|
grid-template-columns: auto auto auto auto auto;
|
||||||
grid-gap: 12px;
|
grid-gap: 12px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -80,16 +80,16 @@ const router = createRouter({
|
||||||
name: 'DetailInfos',
|
name: 'DetailInfos',
|
||||||
component: () => import('@/views/extermal/Article/Details.vue')
|
component: () => import('@/views/extermal/Article/Details.vue')
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
path: '/external/Board',
|
// path: '/external/Board',
|
||||||
name: 'BoardlInfo',
|
// name: 'BoardlInfo',
|
||||||
component: () => import('@/views/extermal/Board/index.vue')
|
// component: () => import('@/views/extermal/Board/index.vue')
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
path: '/external/Process',
|
// path: '/external/Process',
|
||||||
name: 'Process1',
|
// name: 'Process1',
|
||||||
component: () => import('@/views/extermal/Process/index.vue')
|
// component: () => import('@/views/extermal/Process/index.vue')
|
||||||
},
|
// },
|
||||||
|
|
||||||
// 内部首页
|
// 内部首页
|
||||||
{
|
{
|
||||||
|
|
@ -356,6 +356,16 @@ const router = createRouter({
|
||||||
name: 'Process',
|
name: 'Process',
|
||||||
component: () => import('@/views/home/intelligence/process/Process.vue')
|
component: () => import('@/views/home/intelligence/process/Process.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/external/Board',
|
||||||
|
name: 'BoardlInfo',
|
||||||
|
component: () => import('@/views/extermal/Board/index.vue')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/external/Process',
|
||||||
|
name: 'Process1',
|
||||||
|
component: () => import('@/views/extermal/Process/index.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/Home/Process/ProcessInfo/:id',
|
path: '/Home/Process/ProcessInfo/:id',
|
||||||
meta: { title: '情报审批详情' },
|
meta: { title: '情报审批详情' },
|
||||||
|
|
|
||||||
|
|
@ -10,34 +10,34 @@ export const useUserStore = defineStore('user', () => {
|
||||||
roleName: '',
|
roleName: '',
|
||||||
//账号类型 1-管理员 2-调达本部内部课长 3-调达本部内部一般人员 4-公司其他部门人员 5-供应商
|
//账号类型 1-管理员 2-调达本部内部课长 3-调达本部内部一般人员 4-公司其他部门人员 5-供应商
|
||||||
type: '',
|
type: '',
|
||||||
roleCode:'',
|
roleCode: '',
|
||||||
isReview:0,
|
isReview: 0,
|
||||||
deptId:'',
|
deptId: '',
|
||||||
nikeName:'',
|
nikeName: '',
|
||||||
reviewCount:0,
|
reviewCount: 0,
|
||||||
isPublish:0,
|
isPublish: 0,
|
||||||
token:'',
|
token: '',
|
||||||
appLoginCount:0,
|
appLoginCount: 0,
|
||||||
appLoginToDayCount:0,
|
appLoginToDayCount: 0,
|
||||||
isUpPwd:0,
|
isUpPwd: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getUser() {
|
async function getUser() {
|
||||||
const a = ['review_person','zhuxi','tech_service']
|
const a = ['review_person', 'zhuxi', 'tech_service']
|
||||||
const b = ['publish','tech_service']
|
const b = ['publish', 'tech_service']
|
||||||
try {
|
try {
|
||||||
// if (!unref(token)) return
|
// if (!unref(token)) return
|
||||||
const { data } = await getCurLogin()
|
const { data } = await getCurLogin()
|
||||||
user.value = Object.assign(data,{
|
user.value = Object.assign(data, {
|
||||||
token:token.value
|
token: token.value
|
||||||
})
|
})
|
||||||
if(a.includes(data.roleCode)){
|
if (a.some((item) => data.roleCode?.includes(item))) {
|
||||||
user.value.isReview = 1
|
user.value.isReview = 1
|
||||||
}
|
}
|
||||||
if(b.includes(data.roleCode)){
|
if (b.some((item) => data.roleCode?.includes(item))) {
|
||||||
user.value.isPublish = 1
|
user.value.isPublish = 1
|
||||||
}
|
}
|
||||||
// console.log( user.value)
|
// console.log('----40----', user.value)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LogOut()
|
LogOut()
|
||||||
}
|
}
|
||||||
|
|
@ -46,22 +46,22 @@ export const useUserStore = defineStore('user', () => {
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
function LogOut() {
|
function LogOut() {
|
||||||
token.value = null
|
token.value = null
|
||||||
user.value ={
|
user.value = {
|
||||||
id: '',
|
id: '',
|
||||||
account: '',
|
account: '',
|
||||||
roleName: '',
|
roleName: '',
|
||||||
//账号类型 1-管理员 2-调达本部内部课长 3-调达本部内部一般人员 4-公司其他部门人员 5-供应商
|
//账号类型 1-管理员 2-调达本部内部课长 3-调达本部内部一般人员 4-公司其他部门人员 5-供应商
|
||||||
type: '',
|
type: '',
|
||||||
roleCode:'',
|
roleCode: '',
|
||||||
isReview:0,
|
isReview: 0,
|
||||||
nikeName:'',
|
nikeName: '',
|
||||||
reviewCount:0,
|
reviewCount: 0,
|
||||||
isPublish:0,
|
isPublish: 0,
|
||||||
token:'',
|
token: '',
|
||||||
appLoginCount:0,
|
appLoginCount: 0,
|
||||||
isUpPwd:0
|
isUpPwd: 0
|
||||||
}
|
}
|
||||||
console.log(user.value)
|
// console.log('------64-', user.value)
|
||||||
push({ name: 'Entry' })
|
push({ name: 'Entry' })
|
||||||
}
|
}
|
||||||
return { user, getUser, LogOut }
|
return { user, getUser, LogOut }
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,19 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<HomeHead class="top"> </HomeHead>
|
||||||
<HomeHead class="top">
|
<div class="h-full relative flex flex-col">
|
||||||
<!-- <template #content>
|
<div class="font-600 flex items-end mt30px">
|
||||||
<HomeHeadSearch />
|
<div class="text-36px">
|
||||||
</template> -->
|
{{ not.article.cate == 7 ? '外部新增-News' : '外部新增-重要通知' }}
|
||||||
</HomeHead>
|
</div>
|
||||||
<div class="back" @click="push({ name: 'external' })">返回首页</div>
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
<div class="bg-#fff p30px rounded-5px mt40px overflow-y-auto max-h980px">
|
<div class="text-18px">{{ week }}</div>
|
||||||
<n-form :label-width="900" size="medium" :model="formValue">
|
</div>
|
||||||
|
<div
|
||||||
|
class="q-wrapper flex-1 rounded-5px overflow-y-auto mt30px text-#142142 flex flex-col bg-#fff p30px"
|
||||||
|
>
|
||||||
|
<n-form :label-width="800" size="medium" :model="formValue">
|
||||||
<n-form-item label="标题" path="title">
|
<n-form-item label="标题" path="title">
|
||||||
<n-input v-model:value="formValue.title" placeholder="" />
|
<n-input class="w90%" v-model:value="formValue.title" placeholder="" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-form-item v-if="formValue.cate == 8" label="是否置顶" path="isTop">
|
<n-form-item v-if="formValue.cate == 8" label="是否置顶" path="isTop">
|
||||||
<n-radio-group v-model:value="formValue.isTop" name="radiogroup">
|
<n-radio-group v-model:value="formValue.isTop" name="radiogroup">
|
||||||
|
|
@ -28,16 +32,14 @@
|
||||||
<n-space>
|
<n-space>
|
||||||
<n-radio value="1">供应商留言</n-radio>
|
<n-radio value="1">供应商留言</n-radio>
|
||||||
<n-radio value="2">空调需求依赖</n-radio> -->
|
<n-radio value="2">空调需求依赖</n-radio> -->
|
||||||
<!-- <n-radio value="3">回执单</n-radio> -->
|
<!-- <n-radio value="3">回执单</n-radio> -->
|
||||||
<!-- </n-space>
|
<!-- </n-space>
|
||||||
</n-radio-group>
|
</n-radio-group>
|
||||||
</n-form-item> -->
|
</n-form-item> -->
|
||||||
<n-form-item label="内容" path="title">
|
<n-form-item label="内容" path="title">
|
||||||
<Editor @getChildData="handleChild" class="bg-#fff" />
|
<Editor @getChildData="handleChild" class="bg-#fff" />
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<n-button @click="thisClick" v-if="formValue.cate == 8">
|
<n-button @click="thisClick" v-if="formValue.cate == 8"> 情报公开范围 </n-button>
|
||||||
情报公开范围
|
|
||||||
</n-button>
|
|
||||||
<div class="mt15px h150px overflow-y-auto" v-if="formValue.cate == 8">
|
<div class="mt15px h150px overflow-y-auto" v-if="formValue.cate == 8">
|
||||||
<el-tag
|
<el-tag
|
||||||
v-for="i in dataList"
|
v-for="i in dataList"
|
||||||
|
|
@ -55,16 +57,11 @@
|
||||||
<n-form-item>
|
<n-form-item>
|
||||||
<n-button @click="showModal1 = true"> 文本内容预览</n-button>
|
<n-button @click="showModal1 = true"> 文本内容预览</n-button>
|
||||||
</n-form-item>
|
</n-form-item>
|
||||||
<el-button type="primary" class="mt20px" @click="saveThis"
|
<el-button type="primary" class="mt20px w-100px" @click="saveThis">提交</el-button>
|
||||||
>提交</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="showModal1">
|
<n-modal v-model:show="showModal1">
|
||||||
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
|
<div class="flex w80% p30px bg-#fff my40px rounded-30px">
|
||||||
<div
|
<div class="overflow-y-auto h800px container" v-html="editorContent"></div>
|
||||||
class="overflow-y-auto h800px container"
|
|
||||||
v-html="editorContent"
|
|
||||||
></div>
|
|
||||||
</div>
|
</div>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -82,8 +79,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Editor from "@/views/home/intelligence/components/TinyECE.vue";
|
import Editor from '@/views/home/intelligence/components/TinyECE.vue'
|
||||||
import UserPage from "../../home/intelligence/process/UserPages.vue";
|
import UserPage from '../../home/intelligence/process/UserPages.vue'
|
||||||
import {
|
import {
|
||||||
NModal,
|
NModal,
|
||||||
NCard,
|
NCard,
|
||||||
|
|
@ -96,118 +93,116 @@ import {
|
||||||
NSpace,
|
NSpace,
|
||||||
NRadioGroup,
|
NRadioGroup,
|
||||||
useMessage,
|
useMessage,
|
||||||
treeDark,
|
treeDark
|
||||||
} from "naive-ui";
|
} from 'naive-ui'
|
||||||
import HomeHead from "@/views/home/components/HomeHead.vue";
|
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import { noticeld } from "@/stores/modules/noticeId";
|
import { noticeld } from '@/stores/modules/noticeId'
|
||||||
import { saveArticle,trendsAdd } from "@/api/daikin/base";
|
import { saveArticle, trendsAdd } from '@/api/daikin/base'
|
||||||
const editorContent = ref();
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
const { push } = useRouter();
|
const editorContent = ref()
|
||||||
const message = useMessage();
|
const { push } = useRouter()
|
||||||
const not = noticeld();
|
const message = useMessage()
|
||||||
|
const { day, week } = useDate()
|
||||||
|
const not = noticeld()
|
||||||
// const CloseThis = ()=>{
|
// const CloseThis = ()=>{
|
||||||
// mask.value = false
|
// mask.value = false
|
||||||
// }
|
// }
|
||||||
let formValue: any = ref({
|
let formValue: any = ref({
|
||||||
type: "1",
|
type: '1',
|
||||||
cate: not.article.cate,
|
cate: not.article.cate,
|
||||||
title: "",
|
title: '',
|
||||||
tag: "",
|
tag: '',
|
||||||
source: "",
|
source: '',
|
||||||
content: "",
|
content: '',
|
||||||
reviewSource: "3",
|
reviewSource: '3',
|
||||||
isTop: "N",
|
isTop: 'N',
|
||||||
treeSource: "3",
|
treeSource: '3'
|
||||||
});
|
})
|
||||||
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 handleClose = (tag: any) => {
|
const handleClose = (tag: any) => {
|
||||||
dataList.value.splice(dataList.value.indexOf(tag), 1);
|
dataList.value.splice(dataList.value.indexOf(tag), 1)
|
||||||
};
|
}
|
||||||
// 添加留言
|
// 添加留言
|
||||||
async function save() {
|
async function save() {
|
||||||
let userIdList: any[] = [];
|
let userIdList: any[] = []
|
||||||
const cont = editorContent.value;
|
const cont = editorContent.value
|
||||||
const content = escapeHTML(cont);
|
const content = escapeHTML(cont)
|
||||||
const { title, reviewSource, tag, treeSource, source, type, isTop } =
|
const { title, reviewSource, tag, treeSource, source, type, isTop } = formValue.value
|
||||||
formValue.value;
|
const cate = not.article.cate
|
||||||
const cate = not.article.cate;
|
|
||||||
// console.log(formValue.value, content,cate)
|
// console.log(formValue.value, content,cate)
|
||||||
if (dataList.value) {
|
if (dataList.value) {
|
||||||
dataList.value.forEach((i: { userId: any }) => {
|
dataList.value.forEach((i: { userId: any }) => {
|
||||||
console.log(dataList.value);
|
console.log(dataList.value)
|
||||||
userIdList.push(i.userId);
|
userIdList.push(i.userId)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(formValue.value)
|
// console.log(formValue.value)
|
||||||
// if(userIdList.length<0) return
|
// if(userIdList.length<0) return
|
||||||
if (not.article.cate==='9') {
|
if (not.article.cate === '9') {
|
||||||
const { msg, code } = await trendsAdd({title,content});
|
const { msg, code } = await trendsAdd({ title, content })
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success("新增成功");
|
message.success('新增成功')
|
||||||
} else {
|
} else {
|
||||||
message.success(msg);
|
message.success(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
const { msg, code } = await saveArticle({
|
|
||||||
title,
|
|
||||||
tag: "",
|
|
||||||
isTop,
|
|
||||||
treeSource,
|
|
||||||
reviewSource,
|
|
||||||
source,
|
|
||||||
cate,
|
|
||||||
type,
|
|
||||||
content,
|
|
||||||
userIdList,
|
|
||||||
});
|
|
||||||
if (code === 200) {
|
|
||||||
message.success("新增成功");
|
|
||||||
} else {
|
} else {
|
||||||
message.success(msg);
|
const { msg, code } = await saveArticle({
|
||||||
}
|
title,
|
||||||
|
tag: '',
|
||||||
|
isTop,
|
||||||
|
treeSource,
|
||||||
|
reviewSource,
|
||||||
|
source,
|
||||||
|
cate,
|
||||||
|
type,
|
||||||
|
content,
|
||||||
|
userIdList
|
||||||
|
})
|
||||||
|
if (code === 200) {
|
||||||
|
message.success('新增成功')
|
||||||
|
} else {
|
||||||
|
message.success(msg)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
push({ name: "external" });
|
push({ name: 'external' })
|
||||||
}
|
}
|
||||||
// 编辑器数据
|
// 编辑器数据
|
||||||
const handleChild = (data: string) => {
|
const handleChild = (data: string) => {
|
||||||
editorContent.value = data;
|
editorContent.value = data
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
};
|
}
|
||||||
// 添加
|
// 添加
|
||||||
const saveThis = (e: { preventDefault: () => void }) => {
|
const saveThis = (e: { preventDefault: () => void }) => {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
save();
|
save()
|
||||||
};
|
}
|
||||||
const stores = noticeld();
|
const stores = noticeld()
|
||||||
const showModal = ref(false);
|
const showModal = ref(false)
|
||||||
const showModal1 = ref(false);
|
const showModal1 = ref(false)
|
||||||
const setUserList = ref();
|
const setUserList = ref()
|
||||||
const dataList = ref();
|
const dataList = ref()
|
||||||
const thisClick = () => {
|
const thisClick = () => {
|
||||||
showModal.value = true;
|
showModal.value = true
|
||||||
|
|
||||||
setUserList.value = dataList.value;
|
|
||||||
stores.article.reviewSource = formValue.value.reviewSource;
|
|
||||||
};
|
|
||||||
const CloseThis = (data: boolean) => {
|
|
||||||
showModal.value = data;
|
|
||||||
};
|
|
||||||
const handleChild1 = (data: any) => {
|
|
||||||
const { showModal: show, multipleSelection } = data;
|
|
||||||
console.log(show);
|
|
||||||
showModal.value = unref(show);
|
|
||||||
dataList.value = unref(multipleSelection);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
|
setUserList.value = dataList.value
|
||||||
|
stores.article.reviewSource = formValue.value.reviewSource
|
||||||
|
}
|
||||||
|
const CloseThis = (data: boolean) => {
|
||||||
|
showModal.value = data
|
||||||
|
}
|
||||||
|
const handleChild1 = (data: any) => {
|
||||||
|
const { showModal: show, multipleSelection } = data
|
||||||
|
console.log(show)
|
||||||
|
showModal.value = unref(show)
|
||||||
|
dataList.value = unref(multipleSelection)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
|
|
@ -225,16 +220,28 @@ const handleChild1 = (data: any) => {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.top {
|
.top {
|
||||||
|
position: absolute;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
top: 0px;
|
top: -92px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-wrapper {
|
||||||
|
border-radius: 18px;
|
||||||
|
border: 1px solid #e7ebf5;
|
||||||
|
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 100px;
|
// height: 100px;
|
||||||
font-family: "PingFang SC";
|
font-family: 'PingFang SC';
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
background-image: url("@/assets/images/bg.jpg");
|
background-image: url('@/assets/images/bg.jpg');
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -264,7 +271,7 @@ const handleChild1 = (data: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.main {
|
.main {
|
||||||
background-image: url("@/assets/images/bg-rs-main.svg");
|
background-image: url('@/assets/images/bg-rs-main.svg');
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-size: auto;
|
background-size: auto;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@ const userCode = ref(false)
|
||||||
const shormA = ref(false)
|
const shormA = ref(false)
|
||||||
const shormB = ref(false)
|
const shormB = ref(false)
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].includes(store.user.roleCode)
|
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
console.log(isUpPwds.value, userCode.value)
|
console.log(isUpPwds.value, userCode.value)
|
||||||
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
||||||
console.log(isUpPwds.value, 'xiaolu0000222')
|
console.log(isUpPwds.value, 'xiaolu0000222')
|
||||||
|
|
@ -599,14 +601,14 @@ const demandWithdraws = async (obj) => {
|
||||||
<div class="cards w34% h800px page-wrapper">
|
<div class="cards w34% h800px page-wrapper">
|
||||||
<div class="cards_title">News</div>
|
<div class="cards_title">News</div>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="userCode"
|
v-if="false && userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="absolute right-164px top-15px"
|
class="absolute right-164px top-15px"
|
||||||
@click="push('/external/Process')"
|
@click="push('/external/Process')"
|
||||||
>流程列表</el-button
|
>流程列表</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="userCode"
|
v-if="false && userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="absolute right-80px top-15px"
|
class="absolute right-80px top-15px"
|
||||||
@click="toDetail2(7)"
|
@click="toDetail2(7)"
|
||||||
|
|
@ -660,13 +662,17 @@ const demandWithdraws = async (obj) => {
|
||||||
<div class="text-26px text-#142142 font-extrabold mb-10px pl20px">重要通知</div>
|
<div class="text-26px text-#142142 font-extrabold mb-10px pl20px">重要通知</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="userCode"
|
v-if="false && userCode"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="mt0px mr0px"
|
class="mt0px mr0px"
|
||||||
@click="push({ path: '/external/Process', query: { cate: '8' } })"
|
@click="push({ path: '/external/Process', query: { cate: '8' } })"
|
||||||
>流程列表</el-button
|
>流程列表</el-button
|
||||||
>
|
>
|
||||||
<el-button v-if="userCode" type="primary" class="mt0px mr10px" @click="toDetail2(8)"
|
<el-button
|
||||||
|
v-if="false && userCode"
|
||||||
|
type="primary"
|
||||||
|
class="mt0px mr10px"
|
||||||
|
@click="toDetail2(8)"
|
||||||
>+ 新增</el-button
|
>+ 新增</el-button
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getImg } from "./images";
|
import { getImg } from './images'
|
||||||
import {
|
import {
|
||||||
getNoticeList,
|
getNoticeList,
|
||||||
deleteWithdraw,
|
deleteWithdraw,
|
||||||
getManagerList,
|
getManagerList,
|
||||||
getExternalManagerDetail, // news/重要通知-流程详情
|
getExternalManagerDetail, // news/重要通知-流程详情
|
||||||
externalWithdraw, // news/重要通知-撤回
|
externalWithdraw, // news/重要通知-撤回
|
||||||
getExternalManagerList, // news/重要通知-流程列表
|
getExternalManagerList // news/重要通知-流程列表
|
||||||
} from "@/api/daikin/base";
|
} from '@/api/daikin/base'
|
||||||
import Editor from "@/views/home/intelligence/components/TinyECE.vue";
|
import Editor from '@/views/home/intelligence/components/TinyECE.vue'
|
||||||
import UserPage from "../../home/intelligence/process/UserPages.vue";
|
import UserPage from '../../home/intelligence/process/UserPages.vue'
|
||||||
import {
|
import {
|
||||||
NModal,
|
NModal,
|
||||||
NCard,
|
NCard,
|
||||||
|
|
@ -24,137 +24,137 @@ import {
|
||||||
useMessage,
|
useMessage,
|
||||||
treeDark,
|
treeDark,
|
||||||
NTag
|
NTag
|
||||||
} from "naive-ui";
|
} from 'naive-ui'
|
||||||
import { useUserStore } from "@/stores/modules/user";
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import HomeHead from "@/views/home/components/HomeHead.vue";
|
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import { noticeld } from "@/stores/modules/noticeId";
|
import { noticeld } from '@/stores/modules/noticeId'
|
||||||
import { saveArticle } from "@/api/daikin/base";
|
import { saveArticle } from '@/api/daikin/base'
|
||||||
const editorContent = ref();
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
const { push } = useRouter();
|
const editorContent = ref()
|
||||||
const message = useMessage();
|
const { push } = useRouter()
|
||||||
const not = noticeld();
|
const message = useMessage()
|
||||||
|
const not = noticeld()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const activeNames = ref("2");
|
const activeNames = ref('2')
|
||||||
const Status = reactive({
|
const Status = reactive({
|
||||||
reviewStatus: 1,
|
reviewStatus: 1,
|
||||||
reviewSource: 2,
|
reviewSource: 2
|
||||||
});
|
})
|
||||||
const cate = ref('7')
|
const cate = ref('7')
|
||||||
const activeName = ref("0");
|
const activeName = ref('0')
|
||||||
const tabIndex = ref("0");
|
const tabIndex = ref('0')
|
||||||
const tabs = ref([
|
const tabs = ref([
|
||||||
{
|
{
|
||||||
name: "审核中",
|
name: '审核中',
|
||||||
icon: getImg("shhz2@2x.png"),
|
icon: getImg('shhz2@2x.png'),
|
||||||
icons: getImg("shhz1@2x.png"),
|
icons: getImg('shhz1@2x.png'),
|
||||||
id: 0,
|
id: 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "已审核",
|
name: '已审核',
|
||||||
icon: getImg("wanc2@2x.png"),
|
icon: getImg('wanc2@2x.png'),
|
||||||
icons: getImg("wanc1@2x.png"),
|
icons: getImg('wanc1@2x.png'),
|
||||||
id: 1,
|
id: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "驳回/撤回",
|
name: '驳回/撤回',
|
||||||
icon: getImg("boh2@2x.png"),
|
icon: getImg('boh2@2x.png'),
|
||||||
icons: getImg("boh1@2x.png"),
|
icons: getImg('boh1@2x.png'),
|
||||||
id: 2,
|
id: 2
|
||||||
},
|
}
|
||||||
]);
|
])
|
||||||
const listData = ref<any>([]);
|
const listData = ref<any>([])
|
||||||
|
|
||||||
const store2 = useUserStore();
|
const store2 = useUserStore()
|
||||||
// 二级
|
// 二级
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
tabIndex.value = tab.index;
|
tabIndex.value = tab.index
|
||||||
switch (tab.index) {
|
switch (tab.index) {
|
||||||
case "0":
|
case '0':
|
||||||
getPageList("1");
|
getPageList('1')
|
||||||
break;
|
break
|
||||||
case "1":
|
case '1':
|
||||||
// 审核通过
|
// 审核通过
|
||||||
getPageList("3");
|
getPageList('3')
|
||||||
break;
|
break
|
||||||
case "2":
|
case '2':
|
||||||
// 撤销驳回
|
// 撤销驳回
|
||||||
getPageList("4");
|
getPageList('4')
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
getPageList("1");
|
getPageList('1')
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
async function getPageList(reviewStatus: string) {
|
async function getPageList(reviewStatus: string) {
|
||||||
const { pageNum, pageSize } = pageInfo;
|
const { pageNum, pageSize } = pageInfo
|
||||||
const resp = await getExternalManagerList({
|
const resp = await getExternalManagerList({
|
||||||
pageNum,
|
pageNum,
|
||||||
pageSize,
|
pageSize,
|
||||||
reviewStatus,
|
reviewStatus,
|
||||||
cate: cate.value,
|
cate: cate.value
|
||||||
});
|
})
|
||||||
// listData.value = [];
|
// listData.value = [];
|
||||||
listData.value = resp?.rows || [];
|
listData.value = resp?.rows || []
|
||||||
}
|
}
|
||||||
// 撤回按钮
|
// 撤回按钮
|
||||||
const clickCancel = (data: any) => {
|
const clickCancel = (data: any) => {
|
||||||
const { id, noticeId, reviewStatus } = data;
|
const { id, noticeId, reviewStatus } = data
|
||||||
externalWithdraw(id).then((res) => {
|
externalWithdraw(id).then((res) => {
|
||||||
console.log(res, "删除结果");
|
console.log(res, '删除结果')
|
||||||
getPageList("1");
|
getPageList('1')
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
let formValue: any = ref({
|
let formValue: any = ref({
|
||||||
type: "1",
|
type: '1',
|
||||||
cate: not.article.cate,
|
cate: not.article.cate,
|
||||||
title: "",
|
title: '',
|
||||||
tag: "",
|
tag: '',
|
||||||
source: "",
|
source: '',
|
||||||
content: "",
|
content: '',
|
||||||
reviewSource: "3",
|
reviewSource: '3',
|
||||||
isTop: "N",
|
isTop: 'N',
|
||||||
treeSource: "1",
|
treeSource: '1'
|
||||||
});
|
})
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
type: "1",
|
type: '1',
|
||||||
cate: "7",
|
cate: '7',
|
||||||
total: 10,
|
total: 10
|
||||||
});
|
})
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
cate.value = route.query.cate
|
cate.value = route.query.cate
|
||||||
getPageList("1");
|
getPageList('1')
|
||||||
});
|
})
|
||||||
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 handleClose = (tag: any) => {
|
const handleClose = (tag: any) => {
|
||||||
dataList.value.splice(dataList.value.indexOf(tag), 1);
|
dataList.value.splice(dataList.value.indexOf(tag), 1)
|
||||||
};
|
}
|
||||||
// 添加留言
|
// 添加留言
|
||||||
async function save() {
|
async function save() {
|
||||||
let userIdList: any[] = [];
|
let userIdList: any[] = []
|
||||||
const cont = editorContent.value;
|
const cont = editorContent.value
|
||||||
const content = escapeHTML(cont);
|
const content = escapeHTML(cont)
|
||||||
const { title, reviewSource, tag, treeSource, source, type, isTop } =
|
const { title, reviewSource, tag, treeSource, source, type, isTop } = formValue.value
|
||||||
formValue.value;
|
const cate = not.article.cate
|
||||||
const cate = not.article.cate;
|
|
||||||
// console.log(formValue.value, content,cate)
|
// console.log(formValue.value, content,cate)
|
||||||
if (dataList.value) {
|
if (dataList.value) {
|
||||||
dataList.value.forEach((i: { userId: any }) => {
|
dataList.value.forEach((i: { userId: any }) => {
|
||||||
console.log(dataList.value);
|
console.log(dataList.value)
|
||||||
userIdList.push(i.userId);
|
userIdList.push(i.userId)
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(formValue.value)
|
// console.log(formValue.value)
|
||||||
// if(userIdList.length<0) return
|
// if(userIdList.length<0) return
|
||||||
const { msg, code } = await saveArticle({
|
const { msg, code } = await saveArticle({
|
||||||
title,
|
title,
|
||||||
tag: "",
|
tag: '',
|
||||||
isTop,
|
isTop,
|
||||||
treeSource,
|
treeSource,
|
||||||
reviewSource,
|
reviewSource,
|
||||||
|
|
@ -162,54 +162,57 @@ async function save() {
|
||||||
cate,
|
cate,
|
||||||
type,
|
type,
|
||||||
content,
|
content,
|
||||||
userIdList,
|
userIdList
|
||||||
});
|
})
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
message.success("新增成功");
|
message.success('新增成功')
|
||||||
} else {
|
} else {
|
||||||
message.success(msg);
|
message.success(msg)
|
||||||
}
|
}
|
||||||
push({ name: "external" });
|
push({ name: 'external' })
|
||||||
}
|
}
|
||||||
// 编辑器数据
|
// 编辑器数据
|
||||||
const handleChild = (data: string) => {
|
const handleChild = (data: string) => {
|
||||||
editorContent.value = data;
|
editorContent.value = data
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
};
|
}
|
||||||
// 添加
|
// 添加
|
||||||
const saveThis = (e: { preventDefault: () => void }) => {
|
const saveThis = (e: { preventDefault: () => void }) => {
|
||||||
e.preventDefault();
|
e.preventDefault()
|
||||||
save();
|
save()
|
||||||
};
|
}
|
||||||
const stores = noticeld();
|
const { day, week } = useDate()
|
||||||
const showModal = ref(false);
|
const stores = noticeld()
|
||||||
const setUserList = ref();
|
const showModal = ref(false)
|
||||||
const dataList = ref();
|
const setUserList = ref()
|
||||||
|
const dataList = ref()
|
||||||
const thisClick = () => {
|
const thisClick = () => {
|
||||||
showModal.value = true;
|
showModal.value = true
|
||||||
setUserList.value = dataList.value;
|
setUserList.value = dataList.value
|
||||||
stores.article.reviewSource = formValue.value.reviewSource;
|
stores.article.reviewSource = formValue.value.reviewSource
|
||||||
};
|
}
|
||||||
const CloseThis = (data: boolean) => {
|
const CloseThis = (data: boolean) => {
|
||||||
showModal.value = data;
|
showModal.value = data
|
||||||
};
|
}
|
||||||
const handleChild1 = (data: any) => {
|
const handleChild1 = (data: any) => {
|
||||||
const { showModal: show, multipleSelection } = data;
|
const { showModal: show, multipleSelection } = data
|
||||||
console.log("🚀 ~ file: index.vue:197 ~ data:", data)
|
console.log('🚀 ~ file: index.vue:197 ~ data:', data)
|
||||||
// showModal.value = unref(show);
|
// showModal.value = unref(show);
|
||||||
// dataList.value = unref(multipleSelection);
|
// dataList.value = unref(multipleSelection);
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<HomeHead class="top"> </HomeHead>
|
||||||
<HomeHead class="top">
|
<div class="h-full relative flex flex-col">
|
||||||
<!-- <template #content>
|
<div class="font-600 flex items-end mt30px">
|
||||||
<HomeHeadSearch />
|
<div class="text-36px">{{ cate == 7 ? '外部审批流程-News' : '外部审批流程-重要通知' }}</div>
|
||||||
</template> -->
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
</HomeHead>
|
<div class="text-18px">{{ week }}</div>
|
||||||
<div class="back" @click="push({ name: 'external' })">返回首页</div>
|
</div>
|
||||||
<div class="bg-#fff p30px rounded-5px mt40px overflow-y-scroll h900px">
|
<div
|
||||||
|
class="q-wrapper flex-1 rounded-5px mt30px overflow-y-scroll h900px text-#142142 flex flex-col bg-#fff p30px"
|
||||||
|
>
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane v-for="item in tabs" :key="item">
|
<el-tab-pane v-for="item in tabs" :key="item">
|
||||||
<template #label>
|
<template #label>
|
||||||
|
|
@ -253,7 +256,7 @@ const handleChild1 = (data: any) => {
|
||||||
</span> -->
|
</span> -->
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="truncate flex-1 text-#142142 hover:underline w400px max-w400px"
|
class="truncate flex-1 text-#142142 hover:underline w400px max-w400px"
|
||||||
:title="i.title"
|
:title="i.title"
|
||||||
@click="handleChild1(i)"
|
@click="handleChild1(i)"
|
||||||
>
|
>
|
||||||
|
|
@ -263,28 +266,20 @@ const handleChild1 = (data: any) => {
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="i.firstReviewName">
|
<el-dropdown-item v-if="i.firstReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px"
|
<span class="min-w120px">初审人:{{ i.firstReviewName }}</span>
|
||||||
>初审人:{{ i.firstReviewName }}</span
|
|
||||||
>
|
|
||||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px"
|
<span class="min-w120px">终审人:{{ i.ultimateReviewName }}</span>
|
||||||
>终审人:{{ i.ultimateReviewName }}</span
|
<span class="ml20px">终审时间:{{ i.ultimateReviewTime }}</span>
|
||||||
>
|
|
||||||
<span class="ml20px"
|
|
||||||
>终审时间:{{ i.ultimateReviewTime }}</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
<span class="shrink-0 ml38px text-#808696 w220px">{{ i.createTime }}</span>
|
||||||
i.createTime
|
|
||||||
}}</span>
|
|
||||||
<span
|
<span
|
||||||
v-if="store2.user.isReview > 0 && i.publishName"
|
v-if="store2.user.isReview > 0 && i.publishName"
|
||||||
class="ml20px text-#808696 text-16px flex-1"
|
class="ml20px text-#808696 text-16px flex-1"
|
||||||
|
|
@ -314,16 +309,28 @@ const handleChild1 = (data: any) => {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.top {
|
.top {
|
||||||
|
position: absolute;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
top: 0px;
|
top: -92px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.q-wrapper {
|
||||||
|
border-radius: 18px;
|
||||||
|
border: 1px solid #e7ebf5;
|
||||||
|
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
.page {
|
.page {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 100px;
|
// height: 100px;
|
||||||
font-family: "PingFang SC";
|
font-family: 'PingFang SC';
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
|
||||||
background-image: url("@/assets/images/bg.jpg");
|
background-image: url('@/assets/images/bg.jpg');
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
@ -353,7 +360,7 @@ const handleChild1 = (data: any) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.main {
|
.main {
|
||||||
background-image: url("@/assets/images/bg-rs-main.svg");
|
background-image: url('@/assets/images/bg-rs-main.svg');
|
||||||
background-position: 0 0;
|
background-position: 0 0;
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
background-size: auto;
|
background-size: auto;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@ const store = useUserStore()
|
||||||
const isUpPwds = ref(false)
|
const isUpPwds = ref(false)
|
||||||
const userCode = ref(false)
|
const userCode = ref(false)
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
userCode.value = ['admin', 'cd_dandang', 'tech_service'].includes(store.user.roleCode)
|
userCode.value = ['admin', 'cd_dandang', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
isUpPwds.value = store.user.isUpPwd === 2 ? true : false
|
||||||
})
|
})
|
||||||
const activeCard5NavKey = ref('DIS')
|
const activeCard5NavKey = ref('DIS')
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@ import { Swiper, SwiperSlide } from 'swiper/vue'
|
||||||
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
import { Autoplay, Navigation, Pagination, A11y } from 'swiper'
|
||||||
const modules = [Autoplay, Pagination, Navigation, A11y]
|
const modules = [Autoplay, Pagination, Navigation, A11y]
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const userCode = ['admin', 'bcp_dandnag', 'tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin', 'bcp_dandnag', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
|
|
||||||
// import { da } from 'element-plus/es/locale/index.js'
|
// import { da } from 'element-plus/es/locale/index.js'
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
|
|
|
||||||
|
|
@ -1,140 +1,135 @@
|
||||||
<template>
|
<template>
|
||||||
<div @mousemove="handleMouseMove">
|
<div @mousemove="handleMouseMove">
|
||||||
<ul id="ul1">
|
<ul id="ul1">
|
||||||
<li v-for="index in numCards" :key="index" ref="cards">
|
<li v-for="index in numCards" :key="index" ref="cards">
|
||||||
<p class="pt10px pb10px text-15px">大金数据</p>
|
<p class="pt10px pb10px text-15px">大金数据</p>
|
||||||
<span class="text-12px leading-15px">大金数据数据数据数据数据</span>
|
<span class="text-12px leading-15px">大金数据数据数据数据数据</span>
|
||||||
</li>
|
</li>
|
||||||
<div id="earth" class="earth"></div>
|
<div id="earth" class="earth"></div>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
const numCards = ref(9);
|
<script setup lang="ts">
|
||||||
const mouseX = ref(0);
|
const numCards = ref(9)
|
||||||
const mouseY = ref(0);
|
const mouseX = ref(0)
|
||||||
const isDragging = ref(false);
|
const mouseY = ref(0)
|
||||||
|
const isDragging = ref(false)
|
||||||
|
|
||||||
const handleMouseMove = (event) => {
|
const handleMouseMove = (event) => {
|
||||||
const rect = event.currentTarget.getBoundingClientRect();
|
const rect = event.currentTarget?.getBoundingClientRect()
|
||||||
mouseX.value = event.clientX - rect.left;
|
mouseX.value = event.clientX - rect.left
|
||||||
mouseY.value = event.clientY - rect.top;
|
mouseY.value = event.clientY - rect.top
|
||||||
};
|
}
|
||||||
|
|
||||||
const updateRotation = () => {
|
const updateRotation = () => {
|
||||||
const cardRefs = ref([]);
|
const cardRefs = ref([])
|
||||||
const earth = ref(null);
|
const earth = ref(null)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
cardRefs.value = document.querySelectorAll('#ul1 li');
|
cardRefs.value = document.querySelectorAll('#ul1 li')
|
||||||
earth.value = document.getElementById('earth');
|
earth.value = document.getElementById('earth')
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
cardRefs.value.forEach((card, index) => {
|
cardRefs.value.forEach((card, index) => {
|
||||||
const d = (360 / numCards.value) * index + mouseX.value / 10;
|
const d = (360 / numCards.value) * index + mouseX.value / 10
|
||||||
card.style.transform = `rotateY(${d}deg) translateZ(350px)`;
|
card.style.transform = `rotateY(${d}deg) translateZ(350px)`
|
||||||
|
|
||||||
if (Math.abs(d) < 30) {
|
if (Math.abs(d) < 30) {
|
||||||
card.style.zIndex = 2;
|
card.style.zIndex = 2
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(-400px)';
|
earth.value.style.transform = 'translateZ(-400px)'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
card.style.zIndex = -1;
|
card.style.zIndex = -1
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(400px)';
|
earth.value.style.transform = 'translateZ(400px)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}, 30);
|
}, 30)
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
const autoRotate = () => {
|
const autoRotate = () => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
if (!isDragging.value) {
|
if (!isDragging.value) {
|
||||||
// 自动旋转的速度
|
// 自动旋转的速度
|
||||||
rotationY.value += 1;
|
rotationY.value += 1
|
||||||
}
|
}
|
||||||
}, 30);
|
}, 30)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
clearInterval(interval);
|
clearInterval(interval)
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
updateRotation();
|
updateRotation()
|
||||||
autoRotate();
|
autoRotate()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
html {
|
html {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background: #000;
|
background: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ul1 {
|
#ul1 {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 110px;
|
width: 110px;
|
||||||
height: 75px;
|
height: 75px;
|
||||||
margin: 190px auto;
|
margin: 190px auto;
|
||||||
background: none;
|
background: none;
|
||||||
transform-style: preserve-3d;
|
transform-style: preserve-3d;
|
||||||
transform: perspective(1320px) rotateX(-15deg) rotateY(0deg);
|
transform: perspective(1320px) rotateX(-15deg) rotateY(0deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ul1 li {
|
#ul1 li {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
transition: 1s all ease;
|
transition: 1s all ease;
|
||||||
transform: rotateY(0deg) translateZ(0px);
|
transform: rotateY(0deg) translateZ(0px);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: rgba(14, 116, 238, 0.8);
|
background: rgba(14, 116, 238, 0.8);
|
||||||
color: rgb(255, 255, 255);
|
color: rgb(255, 255, 255);
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
/* font-size: 30px; */
|
/* font-size: 30px; */
|
||||||
p{
|
p {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ul1 li img {
|
#ul1 li img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#earth {
|
#earth {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 2%;
|
top: 2%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
width: 260px;
|
width: 260px;
|
||||||
height: 260px;
|
height: 260px;
|
||||||
margin-top: -222px;
|
margin-top: -222px;
|
||||||
margin-left: -130px;
|
margin-left: -130px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background-image: url('./images/diqiu.png');
|
background-image: url('./images/diqiu.png');
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
transform-style: preserve-3d;
|
transform-style: preserve-3d;
|
||||||
transform: translateZ(400px);
|
transform: translateZ(400px);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
transition: transform 0.5s ease;
|
transition: transform 0.5s ease;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<div @mousemove="handleMouseMove">
|
<div @mousemove="handleMouseMove">
|
||||||
<ul id="ul1">
|
<ul id="ul1">
|
||||||
<li class="ation-li" v-for="(item, index) in props.dataE" :key="index" ref="cards">
|
<li class="ation-li" v-for="(item, index) in props.dataE" :key="index" ref="cards">
|
||||||
<div class="pt10px pb10px text-15px title">{{item.title}}</div>
|
<div class="pt10px pb10px text-15px title">{{ item.title }}</div>
|
||||||
<div class="text-12px leading-15px sub-title" @click="downloadHandle(item)">{{item.content}}</div>
|
<div class="text-12px leading-15px sub-title" @click="downloadHandle(item)">
|
||||||
</li>
|
{{ item.content }}
|
||||||
<div id="earth" class="earth"></div>
|
</div>
|
||||||
</ul>
|
</li>
|
||||||
|
<div id="earth" class="earth"></div>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -19,86 +20,80 @@ const downloadHandle = (item) => {
|
||||||
emit('downloadHandle', item, 5)
|
emit('downloadHandle', item, 5)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
const props = defineProps({//对象写法
|
//对象写法
|
||||||
dataE:{
|
dataE: {
|
||||||
type:Array,//接受的数据类型
|
type: Array, //接受的数据类型
|
||||||
default:[],//接受默认数据
|
default: [] //接受默认数据
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const numCards = ref(10)
|
||||||
|
const mouseX = ref(0)
|
||||||
const numCards = ref(10);
|
const mouseY = ref(0)
|
||||||
const mouseX = ref(0);
|
const isDragging = ref(false)
|
||||||
const mouseY = ref(0);
|
|
||||||
const isDragging = ref(false);
|
|
||||||
|
|
||||||
const handleMouseMove = (event) => {
|
const handleMouseMove = (event) => {
|
||||||
const rect = event.currentTarget.getBoundingClientRect();
|
const rect = event.currentTarget?.getBoundingClientRect()
|
||||||
mouseX.value = event.clientX - rect.left;
|
mouseX.value = event.clientX - rect.left
|
||||||
mouseY.value = event.clientY - rect.top;
|
mouseY.value = event.clientY - rect.top
|
||||||
};
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.dataE,
|
() => props.dataE,
|
||||||
(newValue, oldValue) => {
|
(newValue, oldValue) => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
updateRotation();
|
updateRotation()
|
||||||
// autoRotate();
|
// autoRotate();
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
const updateRotation = () => {
|
const updateRotation = () => {
|
||||||
const cardRefs = ref([]);
|
const cardRefs = ref([])
|
||||||
const earth = ref(null);
|
const earth = ref(null)
|
||||||
|
|
||||||
cardRefs.value = document.querySelectorAll('#ul1 li');
|
cardRefs.value = document.querySelectorAll('#ul1 li')
|
||||||
earth.value = document.getElementById('earth');
|
earth.value = document.getElementById('earth')
|
||||||
console.log(cardRefs, 1111)
|
console.log(cardRefs, 1111)
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
numCards.value = cardRefs.value.length;
|
numCards.value = cardRefs.value.length
|
||||||
cardRefs.value.forEach((card, index) => {
|
cardRefs.value.forEach((card, index) => {
|
||||||
const d = (360 / numCards.value) * index + mouseX.value / 10;
|
const d = (360 / numCards.value) * index + mouseX.value / 10
|
||||||
let radian = d * Math.PI / 180;
|
let radian = (d * Math.PI) / 180
|
||||||
let opacity = (Math.cos(radian) + 1) / 2;
|
let opacity = (Math.cos(radian) + 1) / 2
|
||||||
card.style.transform = `rotateY(${d}deg) translateZ(280px) rotateY(${-d}deg)`;
|
card.style.transform = `rotateY(${d}deg) translateZ(280px) rotateY(${-d}deg)`
|
||||||
card.style.opacity = opacity * opacity;
|
card.style.opacity = opacity * opacity
|
||||||
|
|
||||||
if (Math.abs(d) < 30) {
|
if (Math.abs(d) < 30) {
|
||||||
card.style.zIndex = 2;
|
card.style.zIndex = 2
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(-400px)';
|
earth.value.style.transform = 'translateZ(-400px)'
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
card.style.zIndex = -1;
|
card.style.zIndex = -1
|
||||||
if (earth.value) {
|
if (earth.value) {
|
||||||
earth.value.style.transform = 'translateZ(400px)';
|
earth.value.style.transform = 'translateZ(400px)'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}, 30);
|
}, 30)
|
||||||
};
|
}
|
||||||
|
|
||||||
const autoRotate = () => {
|
const autoRotate = () => {
|
||||||
const interval = setInterval(() => {
|
const interval = setInterval(() => {
|
||||||
if (!isDragging.value) {
|
if (!isDragging.value) {
|
||||||
// 自动旋转的速度
|
// 自动旋转的速度
|
||||||
mouseY.value += 1;
|
mouseY.value += 1
|
||||||
}
|
}
|
||||||
}, 30);
|
}, 30)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
clearInterval(interval);
|
clearInterval(interval)
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
@ -135,15 +130,14 @@ body {
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
// background: rgba(14, 116, 238, 0.8);
|
// background: rgba(14, 116, 238, 0.8);
|
||||||
background-image: url("./images/biaoq.png");
|
background-image: url('./images/biaoq.png');
|
||||||
color: rgb(255, 255, 255);
|
color: rgb(255, 255, 255);
|
||||||
line-height: 10px;
|
line-height: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 8px 8px 40px;
|
padding: 8px 8px 40px;
|
||||||
/* font-size: 30px; */
|
/* font-size: 30px; */
|
||||||
p{
|
p {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -176,7 +170,7 @@ body {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
.sub-title {
|
.sub-title {
|
||||||
color: #00E4FF;
|
color: #00e4ff;
|
||||||
text-align: start;
|
text-align: start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,9 @@ const store = useUserStore()
|
||||||
|
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin', 'csr_dandang', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
const Navs = [
|
const Navs = [
|
||||||
{ name: '集团*部门方针' },
|
{ name: '集团*部门方针' },
|
||||||
{ name: '年度活动日程表' },
|
{ name: '年度活动日程表' },
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@ import ModifyB from './modifyB.vue'
|
||||||
import { message } from '@/utils/message';
|
import { message } from '@/utils/message';
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const userCode = ['admin','csr_dandang','tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin','csr_dandang','tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
|
|
||||||
const { chartRef, option } = charData()
|
const { chartRef, option } = charData()
|
||||||
const { chartRef: chartRefP1, option: optionP1 } = pieData1()
|
const { chartRef: chartRefP1, option: optionP1 } = pieData1()
|
||||||
|
|
|
||||||
|
|
@ -16,286 +16,267 @@ const store = useUserStore()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const userCode = ['admin', 'csr_dandang', 'tech_service'].includes(
|
const userCode = ['admin', 'csr_dandang', 'tech_service'].some((item) =>
|
||||||
store.user.roleCode
|
store.user.roleCode?.includes(item)
|
||||||
)
|
)
|
||||||
const swipeRef = ref<any>(null)
|
const swipeRef = ref<any>(null)
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
const swipeActiveIndex = ref(0)
|
const swipeActiveIndex = ref(0)
|
||||||
function handleIndex(x: any) {
|
function handleIndex(x: any) {
|
||||||
swipeActiveIndex.value = x.realIndex
|
swipeActiveIndex.value = x.realIndex
|
||||||
}
|
}
|
||||||
const modules = [Autoplay, Pagination, Navigation, A11y]
|
const modules = [Autoplay, Pagination, Navigation, A11y]
|
||||||
const setSwiperRef = (swiper: any) => {
|
const setSwiperRef = (swiper: any) => {
|
||||||
swipeRef.value = swiper
|
swipeRef.value = swiper
|
||||||
}
|
}
|
||||||
// 2
|
// 2
|
||||||
const swipeSubRef = ref<any>(null)
|
const swipeSubRef = ref<any>(null)
|
||||||
const dataList2 = ref([])
|
const dataList2 = ref([])
|
||||||
const swipeActiveIndex2 = ref(0)
|
const swipeActiveIndex2 = ref(0)
|
||||||
function handleIndex2(x: any) {
|
function handleIndex2(x: any) {
|
||||||
swipeActiveIndex2.value = x.realIndex
|
swipeActiveIndex2.value = x.realIndex
|
||||||
}
|
}
|
||||||
const modules2 = [Autoplay, Pagination, Navigation, A11y]
|
const modules2 = [Autoplay, Pagination, Navigation, A11y]
|
||||||
const setSwiperRef2 = (swiper: any) => {
|
const setSwiperRef2 = (swiper: any) => {
|
||||||
swipeSubRef.value = swiper
|
swipeSubRef.value = swiper
|
||||||
}
|
}
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 100,
|
pageSize: 100,
|
||||||
total: 10
|
total: 10
|
||||||
})
|
})
|
||||||
const swiperList = ref()
|
const swiperList = ref()
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
dataList.value = []
|
dataList.value = []
|
||||||
msgScoll.value?.addEventListener('scroll', handleVisitsScoll)
|
msgScoll.value?.addEventListener('scroll', handleVisitsScoll)
|
||||||
// 空调节能Solution活动
|
// 空调节能Solution活动
|
||||||
const { rows } = await getFootprintList({
|
const { rows } = await getFootprintList({
|
||||||
pageNum: pageInfo.currentPage,
|
pageNum: pageInfo.currentPage,
|
||||||
pageSize: pageInfo.pageSize,
|
pageSize: pageInfo.pageSize,
|
||||||
moduleId: '1'
|
moduleId: '1'
|
||||||
})
|
})
|
||||||
if (rows && rows != 'null' && rows.length > 0) {
|
if (rows && rows != 'null' && rows.length > 0) {
|
||||||
// const newData = rows.flatMap((item) => {
|
// const newData = rows.flatMap((item) => {
|
||||||
// if (item.imgUrl && item.imgUrl.length > 0) {
|
// if (item.imgUrl && item.imgUrl.length > 0) {
|
||||||
// return item.imgUrl.map((img) => {
|
// return item.imgUrl.map((img) => {
|
||||||
// return {
|
// return {
|
||||||
// ...item,
|
// ...item,
|
||||||
// imgPath: img.url,
|
// imgPath: img.url,
|
||||||
// };
|
// };
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
swiperList.value = rows
|
swiperList.value = rows
|
||||||
// if(rows.length>5 || rows.length < 3){
|
// if(rows.length>5 || rows.length < 3){
|
||||||
// }else{
|
// }else{
|
||||||
// swiperList.value = [...rows,...rows]
|
// swiperList.value = [...rows,...rows]
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
// 碳足迹
|
// 碳足迹
|
||||||
getZu(1)
|
getZu(1)
|
||||||
})
|
})
|
||||||
const shomks = () => {
|
const shomks = () => {
|
||||||
// push('csr/modifyCsr2')
|
// push('csr/modifyCsr2')
|
||||||
push({ name: 'modifyCsr2' })
|
push({ name: 'modifyCsr2' })
|
||||||
}
|
}
|
||||||
const srcType = ref()
|
const srcType = ref()
|
||||||
const openUrl = async (url) => {
|
const openUrl = async (url) => {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
message.info('没有可预览文件!')
|
message.info('没有可预览文件!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(url)
|
srcType.value = getLastSubstring(url)
|
||||||
if (
|
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
||||||
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
// src.value = filePath
|
||||||
) {
|
// pdfShow.value = true
|
||||||
// src.value = filePath
|
url = 'https://view.xdocin.com/view?src=' + url
|
||||||
// pdfShow.value = true
|
const screenWidth = window.screen.width
|
||||||
url = 'https://view.xdocin.com/view?src=' + url
|
const screenHeight = window.screen.height
|
||||||
const screenWidth = window.screen.width
|
window.open(
|
||||||
const screenHeight = window.screen.height
|
url,
|
||||||
window.open(
|
'',
|
||||||
url,
|
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
||||||
'',
|
)
|
||||||
'width=' +
|
} else {
|
||||||
screenWidth +
|
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
||||||
',height=' +
|
}
|
||||||
screenHeight +
|
|
||||||
',top=' +
|
|
||||||
0 +
|
|
||||||
',left=' +
|
|
||||||
0
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
message.error(
|
|
||||||
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
const lastIndex = str.lastIndexOf('.')
|
const lastIndex = str.lastIndexOf('.')
|
||||||
if (lastIndex !== -1) {
|
if (lastIndex !== -1) {
|
||||||
return str.substring(lastIndex + 1)
|
return str.substring(lastIndex + 1)
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const toDetail = (obj) => {
|
const toDetail = (obj) => {
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
if (obj.isSelect === 2) {
|
if (obj.isSelect === 2) {
|
||||||
message.info('没有访问权限')
|
message.info('没有访问权限')
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
obj.filePath?.[0]?.url
|
obj.filePath?.[0]?.url ? openUrl(obj.filePath[0].url) : message.info('没有可预览文件!')
|
||||||
? openUrl(obj.filePath[0].url)
|
}
|
||||||
: message.info('没有可预览文件!')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
async function down(data: {
|
async function down(data: {
|
||||||
it: {
|
it: {
|
||||||
response: { url: any; originalFilename: any }
|
response: { url: any; originalFilename: any }
|
||||||
url: any
|
url: any
|
||||||
newFileName: any
|
newFileName: any
|
||||||
}
|
}
|
||||||
}) {
|
}) {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
let url, name
|
let url, name
|
||||||
if (data.it && data.it.response) {
|
if (data.it && data.it.response) {
|
||||||
url = data.it.response.url
|
url = data.it.response.url
|
||||||
name = data.it.response.originalFilename
|
name = data.it.response.originalFilename
|
||||||
} else {
|
} else {
|
||||||
url = data.it.url
|
url = data.it.url
|
||||||
name = data.it.newFileName
|
name = data.it.newFileName
|
||||||
}
|
}
|
||||||
if (!url) {
|
if (!url) {
|
||||||
message.error('没有可预览文件!')
|
message.error('没有可预览文件!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// downloadFiles(url, name)
|
// downloadFiles(url, name)
|
||||||
openUrl(url)
|
openUrl(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataInfo = reactive({
|
const dataInfo = reactive({
|
||||||
treeSource: 3,
|
treeSource: 3,
|
||||||
type: 0,
|
type: 0,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
})
|
})
|
||||||
let maxMsgLingth = 1
|
let maxMsgLingth = 1
|
||||||
let pageNum = 1
|
let pageNum = 1
|
||||||
const getZu = async (pageNum) => {
|
const getZu = async (pageNum) => {
|
||||||
const { treeSource, type, pageSize } = dataInfo
|
const { treeSource, type, pageSize } = dataInfo
|
||||||
const { rows, total } = await getFootprintList({
|
const { rows, total } = await getFootprintList({
|
||||||
pageNum,
|
pageNum,
|
||||||
pageSize,
|
pageSize,
|
||||||
moduleId: '2'
|
moduleId: '2'
|
||||||
})
|
})
|
||||||
|
|
||||||
// if (type === 0) {
|
// if (type === 0) {
|
||||||
// dataList.value = rows
|
// dataList.value = rows
|
||||||
// } else {
|
// } else {
|
||||||
// }
|
// }
|
||||||
dataList.value.push(...rows)
|
dataList.value.push(...rows)
|
||||||
maxMsgLingth = total / pageSize
|
maxMsgLingth = total / pageSize
|
||||||
console.log(dataList.value, type)
|
console.log(dataList.value, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
const msgScoll = ref<HTMLElement | null>(null)
|
const msgScoll = ref<HTMLElement | null>(null)
|
||||||
|
|
||||||
const handleVisitsScoll = () => {
|
const handleVisitsScoll = () => {
|
||||||
// if(pageNum >= 1) return
|
// if(pageNum >= 1) return
|
||||||
const container = msgScoll.value
|
const container = msgScoll.value
|
||||||
if (container) {
|
if (container) {
|
||||||
const isAtBottom =
|
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
||||||
container.scrollHeight - container.scrollTop === container.clientHeight
|
if (isAtBottom) {
|
||||||
if (isAtBottom) {
|
if (pageNum < maxMsgLingth) {
|
||||||
if (pageNum < maxMsgLingth) {
|
++pageNum
|
||||||
++pageNum
|
getZu(pageNum)
|
||||||
getZu(pageNum)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const scroll = ({ scrollTop }: any) => {
|
const scroll = ({ scrollTop }: any) => {
|
||||||
const isAtBottom = scrollTop >= 400
|
const isAtBottom = scrollTop >= 400
|
||||||
if (isAtBottom) {
|
if (isAtBottom) {
|
||||||
if (pageNum < maxMsgLingth) {
|
if (pageNum < maxMsgLingth) {
|
||||||
++pageNum
|
++pageNum
|
||||||
getZu(pageNum)
|
getZu(pageNum)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="w-full h-full box rounded-18px overflow-hidden">
|
<div class="w-full h-full box rounded-18px overflow-hidden">
|
||||||
<!-- <AppBlock class="w-full ">
|
<!-- <AppBlock class="w-full ">
|
||||||
<img src="./images/goudongxi.png" class="w-full h-full" />
|
<img src="./images/goudongxi.png" class="w-full h-full" />
|
||||||
</AppBlock> -->
|
</AppBlock> -->
|
||||||
<div class="w-full h-500px mb-10px bg-#fff">
|
<div class="w-full h-500px mb-10px bg-#fff">
|
||||||
<div
|
<div
|
||||||
class="text-center text-#142142 text-26px py25px font-extrabold"
|
class="text-center text-#142142 text-26px py25px font-extrabold"
|
||||||
style="border-bottom: solid 1px #f4f4f4"
|
style="border-bottom: solid 1px #f4f4f4"
|
||||||
>
|
>
|
||||||
PLUS活动相关
|
PLUS活动相关
|
||||||
</div>
|
</div>
|
||||||
<el-button v-if="userCode" type="primary" class="button" @click="shomks"
|
<el-button v-if="userCode" type="primary" class="button" @click="shomks">管理</el-button>
|
||||||
>管理</el-button
|
<div class="text-#142142 text-20px font-extrabold flex p20px">
|
||||||
>
|
<!-- <div class=""></div> -->
|
||||||
<div class="text-#142142 text-20px font-extrabold flex p20px">
|
<div class="w-70% text-24px font-bold p20px pb-0px">
|
||||||
<!-- <div class=""></div> -->
|
<!-- 空调节能solution活动 -->
|
||||||
<div class="w-70% text-24px font-bold p20px pb-0px">
|
PLUS活动
|
||||||
<!-- 空调节能solution活动 -->
|
</div>
|
||||||
PLUS活动
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="w-30%" style="text-align: -webkit-right">
|
<div class="w-30%" style="text-align: -webkit-right">
|
||||||
<div
|
<div
|
||||||
@click="push({ name: 'modifyCsrList' })"
|
@click="push({ name: 'modifyCsrList' })"
|
||||||
class="w-145px px15px text-#fff !rd-22px !bg-gradient-to-r !from-#34a6d9/90 !to-#23d1c6/70 p10px"
|
class="w-145px px15px text-#fff !rd-22px !bg-gradient-to-r !from-#34a6d9/90 !to-#23d1c6/70 p10px"
|
||||||
>
|
>
|
||||||
查看更多<img
|
查看更多<img src="../../../assets/images/ckgduo@2x.png" class="w25px ml-10px mt--5px" />
|
||||||
src="../../../assets/images/ckgduo@2x.png"
|
</div>
|
||||||
class="w25px ml-10px mt--5px"
|
</div>
|
||||||
/>
|
</div>
|
||||||
</div>
|
<AppBlock class="w-full h325px box !b-0" style="box-shadow: none">
|
||||||
</div>
|
<div class="w1200px px68px relative">
|
||||||
</div>
|
<div class="swipe-nav nav-prev">
|
||||||
<AppBlock class="w-full h325px box !b-0" style="box-shadow: none">
|
<NIcon size="40" color="#537deb">
|
||||||
<div class="w1200px px68px relative">
|
<ChevronBack />
|
||||||
<div class="swipe-nav nav-prev">
|
</NIcon>
|
||||||
<NIcon size="40" color="#537deb">
|
</div>
|
||||||
<ChevronBack />
|
<div class="swipe-nav nav-next">
|
||||||
</NIcon>
|
<NIcon size="40" color="#537deb">
|
||||||
</div>
|
<ChevronForward />
|
||||||
<div class="swipe-nav nav-next">
|
</NIcon>
|
||||||
<NIcon size="40" color="#537deb">
|
</div>
|
||||||
<ChevronForward />
|
<!-- :slides-per-group="3" -->
|
||||||
</NIcon>
|
<!-- :autoplay="{delay: 3000, disableOnInteraction: false, pauseOnMouseEnter: true,stopOnLastSlide: false}" -->
|
||||||
</div>
|
<Swiper
|
||||||
<!-- :slides-per-group="3" -->
|
ref="swipeRef"
|
||||||
<!-- :autoplay="{delay: 3000, disableOnInteraction: false, pauseOnMouseEnter: true,stopOnLastSlide: false}" -->
|
@swiper="setSwiperRef"
|
||||||
<Swiper
|
class="h325px"
|
||||||
ref="swipeRef"
|
:slides-per-view="3"
|
||||||
@swiper="setSwiperRef"
|
:slides-per-group="1"
|
||||||
class="h325px"
|
:loopAdditionalSlides="3"
|
||||||
:slides-per-view="3"
|
:speed="500"
|
||||||
:slides-per-group="1"
|
:space-between="8"
|
||||||
:loopAdditionalSlides="3"
|
:modules="modules"
|
||||||
:speed="500"
|
:scrollbar="{ draggable: false }"
|
||||||
:space-between="8"
|
:loop="true"
|
||||||
:modules="modules"
|
:navigation="{
|
||||||
:scrollbar="{ draggable: false }"
|
nextEl: '.nav-next',
|
||||||
:loop="true"
|
prevEl: '.nav-prev'
|
||||||
:navigation="{
|
}"
|
||||||
nextEl: '.nav-next',
|
>
|
||||||
prevEl: '.nav-prev'
|
<template v-for="(i, index) in swiperList" :key="index">
|
||||||
}"
|
<SwiperSlide>
|
||||||
>
|
<div
|
||||||
<template v-for="(i, index) in swiperList" :key="index">
|
class="w340px h300px overflow-hidden bg-#F6F8FF mt10px relative rd-25px"
|
||||||
<SwiperSlide>
|
style="box-shadow: 0px 7px 12px 0px #e7e7e7"
|
||||||
<div
|
>
|
||||||
class="w340px h300px overflow-hidden bg-#F6F8FF mt10px relative rd-25px"
|
<div
|
||||||
style="box-shadow: 0px 7px 12px 0px #e7e7e7"
|
class="flex items-center !bg-gradient-to-r !from-#5C87F5/90 !to-#466CCD/70 text-#fff font-[500] font-bold px20px py15px text-18px truncates"
|
||||||
>
|
>
|
||||||
<div
|
<img
|
||||||
class="flex items-center !bg-gradient-to-r !from-#5C87F5/90 !to-#466CCD/70 text-#fff font-[500] font-bold px20px py15px text-18px truncates"
|
v-if="isNotOneWeekAgo(i.createTime)"
|
||||||
>
|
src="@/assets/images/NEW.gif"
|
||||||
<img
|
class="h-20px"
|
||||||
v-if="isNotOneWeekAgo(i.createTime)"
|
alt=""
|
||||||
src="@/assets/images/NEW.gif"
|
/>
|
||||||
class="h-20px"
|
活动{{ index + 1 }}:
|
||||||
alt=""
|
<span>{{ i.title }}</span>
|
||||||
/>
|
|
||||||
活动{{ index + 1 }}:
|
|
||||||
<span>{{ i.title }}</span>
|
|
||||||
|
|
||||||
<!-- <span class="float-right"><el-icon>
|
<!-- <span class="float-right"><el-icon>
|
||||||
<ArrowRightBold />
|
<ArrowRightBold />
|
||||||
</el-icon></span> -->
|
</el-icon></span> -->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="overflow-hidden w-full h-206px z-10">
|
<div class="overflow-hidden w-full h-206px z-10">
|
||||||
<!-- <el-carousel
|
<!-- <el-carousel
|
||||||
autoplay
|
autoplay
|
||||||
indicator-position="none"
|
indicator-position="none"
|
||||||
arrow="never"
|
arrow="never"
|
||||||
|
|
@ -312,70 +293,60 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
/>
|
/>
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel> -->
|
</el-carousel> -->
|
||||||
<n-carousel
|
<n-carousel
|
||||||
draggable
|
draggable
|
||||||
autoplay
|
autoplay
|
||||||
trigger="hover"
|
trigger="hover"
|
||||||
mousewheel
|
mousewheel
|
||||||
effect="fade"
|
effect="fade"
|
||||||
:interval="5000"
|
:interval="5000"
|
||||||
:loop="true"
|
:loop="true"
|
||||||
class="overflow-hidden box-border"
|
class="overflow-hidden box-border"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="w-full h-200px overflow-hidden p10px"
|
class="w-full h-200px overflow-hidden p10px"
|
||||||
v-if="i.imgUrl"
|
v-if="i.imgUrl"
|
||||||
v-for="ite in i.imgUrl"
|
v-for="ite in i.imgUrl"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
:src="ite.url"
|
:src="ite.url"
|
||||||
class="w-full max-h-200px image-container overflow-hidden"
|
class="w-full max-h-200px image-container overflow-hidden"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</n-carousel>
|
</n-carousel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <img :src="i.imgPath" class="p10px w-full max-h-180px rd-10px" @click="toDetail(i)" /> -->
|
<!-- <img :src="i.imgPath" class="p10px w-full max-h-180px rd-10px" @click="toDetail(i)" /> -->
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="absolute left-0 right-0 bottom-14px text-#000 text-18px text-left px16px py6px z-100 transition-none"
|
class="absolute left-0 right-0 bottom-14px text-#000 text-18px text-left px16px py6px z-100 transition-none"
|
||||||
>
|
>
|
||||||
<div class="max-w500px text-16px flex flex-col">
|
<div class="max-w500px text-16px flex flex-col">
|
||||||
<div class="flex items-center max-w-[84%]">
|
<div class="flex items-center max-w-[84%]">
|
||||||
<img
|
<img src="../../../assets/images/lvbiao@2x.png" class="mr-5px" />
|
||||||
src="../../../assets/images/lvbiao@2x.png"
|
<n-popover trigger="hover" placement="top-start">
|
||||||
class="mr-5px"
|
<template #trigger>
|
||||||
/>
|
<span class="truncate text-18px !min-w-[auto]" @click="toDetail(i)">
|
||||||
<n-popover trigger="hover" placement="top-start">
|
{{ i.filePath[0]?.originalFileName }}
|
||||||
<template #trigger>
|
</span>
|
||||||
<span
|
</template>
|
||||||
class="truncate text-18px !min-w-[auto]"
|
<div class="text-18px leading-40px">
|
||||||
@click="toDetail(i)"
|
{{ i.filePath[0]?.originalFileName }}
|
||||||
>
|
</div>
|
||||||
{{ i.filePath[0]?.originalFileName }}
|
</n-popover>
|
||||||
</span>
|
</div>
|
||||||
</template>
|
<div
|
||||||
<div class="text-18px leading-40px">
|
v-if="i.filePath.length >= 1"
|
||||||
{{ i.filePath[0]?.originalFileName }}
|
title="查看更多"
|
||||||
</div>
|
@click="toDetail(i)"
|
||||||
</n-popover>
|
class="absolute cursor-pointer right--14px top-0px w60px pt-3px flex items-center ml-auto text-right"
|
||||||
</div>
|
style="color: #4d7ee8; text-align: center; font-size: 16px"
|
||||||
<div
|
>
|
||||||
v-if="i.filePath.length >= 1"
|
更多<el-icon>
|
||||||
title="查看更多"
|
<DArrowRight class="" />
|
||||||
@click="toDetail(i)"
|
</el-icon>
|
||||||
class="absolute cursor-pointer right--14px top-0px w60px pt-3px flex items-center ml-auto text-right"
|
</div>
|
||||||
style="
|
<!-- <el-dropdown max-height="100px" @command="down">
|
||||||
color: #4d7ee8;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 16px;
|
|
||||||
"
|
|
||||||
>
|
|
||||||
更多<el-icon>
|
|
||||||
<DArrowRight class="" />
|
|
||||||
</el-icon>
|
|
||||||
</div>
|
|
||||||
<!-- <el-dropdown max-height="100px" @command="down">
|
|
||||||
<el-icon size="25">
|
<el-icon size="25">
|
||||||
<CaretBottom />
|
<CaretBottom />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
|
|
@ -390,22 +361,22 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown> -->
|
</el-dropdown> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</SwiperSlide>
|
</SwiperSlide>
|
||||||
</template>
|
</template>
|
||||||
</Swiper>
|
</Swiper>
|
||||||
</div>
|
</div>
|
||||||
</AppBlock>
|
</AppBlock>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-49% h-375px float-left bg-#fff">
|
<div class="w-49% h-375px float-left bg-#fff">
|
||||||
<div class="text-24px font-bold p20px" @click="push({ name: 'CSRList' })">
|
<div class="text-24px font-bold p20px" @click="push({ name: 'CSRList' })">
|
||||||
<!-- 碳足迹报告 -->
|
<!-- 碳足迹报告 -->
|
||||||
相关活动报告
|
相关活动报告
|
||||||
</div>
|
</div>
|
||||||
<!-- <div title="查看更多" class="absolute right-25px top-5px w80px h50px flex justify-center items-center cursor-pointer" style="background: #0539A3;line-height: 50px;color: #00C2EE;text-align: center;" @click="jumpContentHandler('BCP简报', 2)"> -->
|
<!-- <div title="查看更多" class="absolute right-25px top-5px w80px h50px flex justify-center items-center cursor-pointer" style="background: #0539A3;line-height: 50px;color: #00C2EE;text-align: center;" @click="jumpContentHandler('BCP简报', 2)"> -->
|
||||||
<!-- <div
|
<!-- <div
|
||||||
title="查看更多"
|
title="查看更多"
|
||||||
class="absolute right-25px top-5px w80px h50px flex justify-center items-center cursor-pointer"
|
class="absolute right-25px top-5px w80px h50px flex justify-center items-center cursor-pointer"
|
||||||
style="
|
style="
|
||||||
|
|
@ -420,159 +391,145 @@ const scroll = ({ scrollTop }: any) => {
|
||||||
<DArrowRight class="" />
|
<DArrowRight class="" />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div> -->
|
</div> -->
|
||||||
<span
|
<span
|
||||||
style="
|
style="border: #417bef 1px solid; color: #417bef; border-radius: 5px; height: 30px"
|
||||||
border: #417bef 1px solid;
|
class="absolute right-25px top-16px w80px h50px flex justify-center items-center cursor-pointer"
|
||||||
color: #417bef;
|
@click="push({ name: 'CSRList' })"
|
||||||
border-radius: 5px;
|
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
||||||
height: 30px;
|
></span>
|
||||||
"
|
<!-- <div ref="msgScoll" class="px20px h280px cent_box overflow-y-scroll "> -->
|
||||||
class="absolute right-25px top-16px w80px h50px flex justify-center items-center cursor-pointer"
|
<!-- <div
|
||||||
@click="push({ name: 'CSRList' })"
|
|
||||||
>更多<el-icon> <DArrowRight class="" /> </el-icon
|
|
||||||
></span>
|
|
||||||
<!-- <div ref="msgScoll" class="px20px h280px cent_box overflow-y-scroll "> -->
|
|
||||||
<!-- <div
|
|
||||||
ref="msgScoll"
|
ref="msgScoll"
|
||||||
class="px20px h280px cent_box overflow-y-scroll"
|
class="px20px h280px cent_box overflow-y-scroll"
|
||||||
> -->
|
> -->
|
||||||
<el-scrollbar
|
<el-scrollbar class="px20px" ref="" height="280px" always @scroll="scroll">
|
||||||
class="px20px"
|
<!-- <div class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px" v-for="(i, key) in dataList" :key="i"> -->
|
||||||
ref=""
|
<div
|
||||||
height="280px"
|
class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px"
|
||||||
always
|
v-for="(i, key) in dataList"
|
||||||
@scroll="scroll"
|
:key="i"
|
||||||
>
|
>
|
||||||
<!-- <div class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px" v-for="(i, key) in dataList" :key="i"> -->
|
<div class="truncate2 flex items-center" @click="toDetail(i)">
|
||||||
<div
|
<span class="text-#fff bg-#407DF1 px5px text-18px rounded-20px mr-5px inlineFlex">{{
|
||||||
class="text-#808696 bg-#F4F8FF py10px rd-5px mt10px"
|
++key
|
||||||
v-for="(i, key) in dataList"
|
}}</span>
|
||||||
:key="i"
|
<span class="text-18px mr-2">{{ i.title }}</span>
|
||||||
>
|
<img
|
||||||
<div class="truncate2 flex items-center" @click="toDetail(i)">
|
v-if="isNotOneWeekAgo(i.createTime)"
|
||||||
<span
|
src="@/assets/images/NEW.gif"
|
||||||
class="text-#fff bg-#407DF1 px5px text-18px rounded-20px mr-5px inlineFlex"
|
class="h-20px"
|
||||||
>{{ ++key }}</span
|
alt=""
|
||||||
>
|
/>
|
||||||
<span class="text-18px mr-2">{{ i.title }}</span>
|
</div>
|
||||||
<img
|
<span class="absolute right-10px top-24px text-18px">{{ i.createTime }}</span>
|
||||||
v-if="isNotOneWeekAgo(i.createTime)"
|
</div>
|
||||||
src="@/assets/images/NEW.gif"
|
</el-scrollbar>
|
||||||
class="h-20px"
|
<!-- </div> -->
|
||||||
alt=""
|
</div>
|
||||||
/>
|
<div class="w-50% h-375px bg-#fff float-left ml-1%">
|
||||||
</div>
|
<div class="text-24px font-bold p20px">碳足迹平台</div>
|
||||||
<span class="absolute right-10px top-24px text-18px">{{
|
<div
|
||||||
i.createTime
|
class="absolute flex flex-col w-full h-full z-200 top-0 left-0 text-center bg-red justify-center items-center"
|
||||||
}}</span>
|
style="background-color: rgba(255, 255, 255, 0.8)"
|
||||||
</div>
|
>
|
||||||
</el-scrollbar>
|
<img src="@/assets/images/chah.png" />
|
||||||
<!-- </div> -->
|
<br />
|
||||||
</div>
|
<div class="text-#5683DB text-36px">【做成中,敬请期待】</div>
|
||||||
<div class="w-50% h-375px bg-#fff float-left ml-1%">
|
</div>
|
||||||
<div class="text-24px font-bold p20px">碳足迹平台</div>
|
</div>
|
||||||
<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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
/* 修正后的代码 */
|
/* 修正后的代码 */
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background-color: #ccc;
|
background-color: #ccc;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
height: 50px; /* 添加高度 */
|
height: 50px; /* 添加高度 */
|
||||||
}
|
}
|
||||||
.image-container {
|
.image-container {
|
||||||
transition: filter 0.3s ease; /* 添加图像加载时的过渡效果 */
|
transition: filter 0.3s ease; /* 添加图像加载时的过渡效果 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.truncate {
|
.truncate {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 260px;
|
max-width: 260px;
|
||||||
min-width: 260px;
|
min-width: 260px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.truncates {
|
.truncates {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 340px;
|
max-width: 340px;
|
||||||
min-width: 340px;
|
min-width: 340px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
right: 20px;
|
right: 20px;
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-img {
|
.carousel-img {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.truncate2 {
|
.truncate2 {
|
||||||
max-width: 78%;
|
max-width: 78%;
|
||||||
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: #000;
|
color: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.swipe-nav {
|
.swipe-nav {
|
||||||
// absolute left-10px w36px h46px flex items-center justify-center
|
// absolute left-10px w36px h46px flex items-center justify-center
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 46px;
|
height: 46px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
border: 1px solid #537deb;
|
border: 1px solid #537deb;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&.nav-prev {
|
&.nav-prev {
|
||||||
left: 16px;
|
left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.nav-next {
|
&.nav-next {
|
||||||
right: 16px;
|
right: 16px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-img {
|
.carousel-img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 240px;
|
height: 240px;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,16 +1,16 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import DataBaseHead from '@/views/home/components/DataBaseHead.vue'
|
import DataBaseHead from '@/views/home/components/DataBaseHead.vue'
|
||||||
import {
|
import {
|
||||||
cateAdd,
|
cateAdd,
|
||||||
cateUpdate,
|
cateUpdate,
|
||||||
treeDbList,
|
treeDbList,
|
||||||
cateInfo,
|
cateInfo,
|
||||||
cateDel,
|
cateDel,
|
||||||
cateFileUpdate,
|
cateFileUpdate,
|
||||||
cateFileDel,
|
cateFileDel,
|
||||||
cateFileList,
|
cateFileList,
|
||||||
download,
|
download,
|
||||||
fetchdbAuthGetInfo
|
fetchdbAuthGetInfo
|
||||||
} from '@/api/daikin/base'
|
} from '@/api/daikin/base'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { useMessage, NModal, NPopover } from 'naive-ui'
|
import { useMessage, NModal, NPopover } from 'naive-ui'
|
||||||
|
|
@ -19,7 +19,7 @@ import { isNotOneWeekAgo } from '@/utils'
|
||||||
|
|
||||||
const store: any = useUserStore()
|
const store: any = useUserStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const userCode = ['admin', 'database_dandang'].includes(store.user.roleCode)
|
const userCode = ['admin', 'database_dandang'].some((item) => store.user.roleCode?.includes(item))
|
||||||
const isDbReview = store.user?.isDbReview === 1
|
const isDbReview = store.user?.isDbReview === 1
|
||||||
const isDbUpload = store.user?.isDbUpload === 1
|
const isDbUpload = store.user?.isDbUpload === 1
|
||||||
const user: any = store.user
|
const user: any = store.user
|
||||||
|
|
@ -28,32 +28,32 @@ const { push } = useRouter()
|
||||||
const title = ref('大金集团经营理念')
|
const title = ref('大金集团经营理念')
|
||||||
|
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
cateId: Number,
|
cateId: Number,
|
||||||
title: String
|
title: String
|
||||||
})
|
})
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 13,
|
pageSize: 13,
|
||||||
total: 10
|
total: 10
|
||||||
})
|
})
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
prop.cateId
|
prop.cateId
|
||||||
prop.title
|
prop.title
|
||||||
title.value = prop.title
|
title.value = prop.title
|
||||||
getTree()
|
getTree()
|
||||||
// getAuth()
|
// getAuth()
|
||||||
})
|
})
|
||||||
const tableData = ref()
|
const tableData = ref()
|
||||||
async function getTree() {
|
async function getTree() {
|
||||||
const { currentPage, pageSize } = pageInfo
|
const { currentPage, pageSize } = pageInfo
|
||||||
if (!prop.cateId) return
|
if (!prop.cateId) return
|
||||||
const { rows, total } = await cateFileList({
|
const { rows, total } = await cateFileList({
|
||||||
cateId: prop.cateId,
|
cateId: prop.cateId,
|
||||||
pageNum: currentPage,
|
pageNum: currentPage,
|
||||||
pageSize
|
pageSize
|
||||||
})
|
})
|
||||||
pageInfo.total = total
|
pageInfo.total = total
|
||||||
tableData.value = rows
|
tableData.value = rows
|
||||||
}
|
}
|
||||||
// async function downloads(row) {
|
// async function downloads(row) {
|
||||||
// console.log(row)
|
// console.log(row)
|
||||||
|
|
@ -81,39 +81,39 @@ async function getTree() {
|
||||||
const arr = [1706, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1386, 1388, 1391]
|
const arr = [1706, 1416, 1415, 1414, 1413, 1412, 1411, 1410, 1386, 1388, 1391]
|
||||||
|
|
||||||
async function downloads(row: any) {
|
async function downloads(row: any) {
|
||||||
// console.log('xiazai', row)
|
// console.log('xiazai', row)
|
||||||
const { isSelect, filePath, id, fileCommon } = row
|
const { isSelect, filePath, id, fileCommon } = row
|
||||||
if (isSelect === 2) {
|
if (isSelect === 2) {
|
||||||
message.info('没有访问权限')
|
message.info('没有访问权限')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (arr.includes(id) || (fileCommon?.fileSize || 0) > 25 * 1024 * 1024) {
|
if (arr.includes(id) || (fileCommon?.fileSize || 0) > 25 * 1024 * 1024) {
|
||||||
try {
|
try {
|
||||||
message.info('正在下载中,请稍等~')
|
message.info('正在下载中,请稍等~')
|
||||||
downloadFile(filePath)
|
downloadFile(filePath)
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
}
|
}
|
||||||
// window.open(
|
// window.open(
|
||||||
// 'https://view.officeapps.live.com/op/view.aspx?src=' +
|
// 'https://view.officeapps.live.com/op/view.aspx?src=' +
|
||||||
// encodeURIComponent(filePath)
|
// encodeURIComponent(filePath)
|
||||||
// )
|
// )
|
||||||
filePath && window.open(filePath)
|
filePath && window.open(filePath)
|
||||||
}
|
}
|
||||||
const lazyState = computed(() => [pageInfo.currentPage])
|
const lazyState = computed(() => [pageInfo.currentPage])
|
||||||
watch(
|
watch(
|
||||||
() => unref(lazyState),
|
() => unref(lazyState),
|
||||||
async (v) => {
|
async (v) => {
|
||||||
getTree()
|
getTree()
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
const handleSizeChange = (e) => {
|
const handleSizeChange = (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCurrentChange = (e) => {
|
const handleCurrentChange = (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
// 预览
|
// 预览
|
||||||
const srcType = ref()
|
const srcType = ref()
|
||||||
|
|
@ -121,99 +121,88 @@ const src = ref()
|
||||||
const pdfShow = ref(false)
|
const pdfShow = ref(false)
|
||||||
const showModalRef2 = ref(false)
|
const showModalRef2 = ref(false)
|
||||||
const openUrl = async (it) => {
|
const openUrl = async (it) => {
|
||||||
console.log(it, 2222)
|
console.log(it, 2222)
|
||||||
let { filePath, isSelect } = it
|
let { filePath, isSelect } = it
|
||||||
if (isSelect === 2) {
|
if (isSelect === 2) {
|
||||||
message.info('没有访问权限')
|
message.info('没有访问权限')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!filePath) {
|
if (!filePath) {
|
||||||
message.info('没有可预览文件!')
|
message.info('没有可预览文件!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
srcType.value = getLastSubstring(filePath)
|
srcType.value = getLastSubstring(filePath)
|
||||||
if (
|
if (['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)) {
|
||||||
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
// src.value = filePath
|
||||||
) {
|
// pdfShow.value = true
|
||||||
// src.value = filePath
|
filePath = 'https://view.xdocin.com/view?src=' + filePath
|
||||||
// pdfShow.value = true
|
const screenWidth = window.screen.width
|
||||||
filePath = 'https://view.xdocin.com/view?src=' + filePath
|
const screenHeight = window.screen.height
|
||||||
const screenWidth = window.screen.width
|
window.open(
|
||||||
const screenHeight = window.screen.height
|
filePath,
|
||||||
window.open(
|
'',
|
||||||
filePath,
|
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
||||||
'',
|
)
|
||||||
'width=' +
|
} else {
|
||||||
screenWidth +
|
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
||||||
',height=' +
|
}
|
||||||
screenHeight +
|
|
||||||
',top=' +
|
|
||||||
0 +
|
|
||||||
',left=' +
|
|
||||||
0
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
message.error(
|
|
||||||
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
function getLastSubstring(str: string): string {
|
function getLastSubstring(str: string): string {
|
||||||
const lastIndex = str.lastIndexOf('.')
|
const lastIndex = str.lastIndexOf('.')
|
||||||
if (lastIndex !== -1) {
|
if (lastIndex !== -1) {
|
||||||
return str.substring(lastIndex + 1)
|
return str.substring(lastIndex + 1)
|
||||||
} else {
|
} else {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function downloadFile(url: any) {
|
function downloadFile(url: any) {
|
||||||
fetch(url)
|
fetch(url)
|
||||||
.then((response) => response.blob())
|
.then((response) => response.blob())
|
||||||
.then((blob) => {
|
.then((blob) => {
|
||||||
const downloadUrl = URL.createObjectURL(blob)
|
const downloadUrl = URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = downloadUrl
|
link.href = downloadUrl
|
||||||
link.download = getFileNameFromUrl(url)
|
link.download = getFileNameFromUrl(url)
|
||||||
link.click()
|
link.click()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
function getFileName(url: string) {
|
function getFileName(url: string) {
|
||||||
let lastSplashIndex = url.lastIndexOf('/')
|
let lastSplashIndex = url.lastIndexOf('/')
|
||||||
let lastDotIndex = url.lastIndexOf('.')
|
let lastDotIndex = url.lastIndexOf('.')
|
||||||
return url.slice(lastSplashIndex + 1, lastDotIndex)
|
return url.slice(lastSplashIndex + 1, lastDotIndex)
|
||||||
}
|
}
|
||||||
function getFileNameFromUrl(url: string) {
|
function getFileNameFromUrl(url: string) {
|
||||||
const lastSlashIndex = url.lastIndexOf('/')
|
const lastSlashIndex = url.lastIndexOf('/')
|
||||||
if (lastSlashIndex !== -1) {
|
if (lastSlashIndex !== -1) {
|
||||||
return url.substring(lastSlashIndex + 1)
|
return url.substring(lastSlashIndex + 1)
|
||||||
} else {
|
} else {
|
||||||
return 'Invalid URL'
|
return 'Invalid URL'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取该目录下是否设置过权限
|
// 获取该目录下是否设置过权限
|
||||||
const hasUpload = ref(false)
|
const hasUpload = ref(false)
|
||||||
const hasReview = ref(false)
|
const hasReview = ref(false)
|
||||||
async function getAuth() {
|
async function getAuth() {
|
||||||
if (!prop.cateId) return
|
if (!prop.cateId) return
|
||||||
const { data: uploadUser = [] } = await fetchdbAuthGetInfo({
|
const { data: uploadUser = [] } = await fetchdbAuthGetInfo({
|
||||||
cateId: prop.cateId,
|
cateId: prop.cateId,
|
||||||
type: 1
|
type: 1
|
||||||
})
|
})
|
||||||
hasUpload.value = uploadUser.findIndex((x: any) => x.userId === user?.id) > -1
|
hasUpload.value = uploadUser.findIndex((x: any) => x.userId === user?.id) > -1
|
||||||
const { data: reviewUser = [] } = await fetchdbAuthGetInfo({
|
const { data: reviewUser = [] } = await fetchdbAuthGetInfo({
|
||||||
cateId: prop.cateId,
|
cateId: prop.cateId,
|
||||||
type: 2
|
type: 2
|
||||||
})
|
})
|
||||||
hasReview.value = reviewUser.findIndex((x: any) => x.userId === user?.id) > -1
|
hasReview.value = reviewUser.findIndex((x: any) => x.userId === user?.id) > -1
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<DataBaseHead />
|
<DataBaseHead />
|
||||||
<div class="w-full h-1px bg-#507FFD mt50px rd-b-20px"></div>
|
<div class="w-full h-1px bg-#507FFD mt50px rd-b-20px"></div>
|
||||||
<div class="w-full h-95%">
|
<div class="w-full h-95%">
|
||||||
<!-- <div class="px30px flex text-center py40px">
|
<!-- <div class="px30px flex text-center py40px">
|
||||||
<div class="bg-#6C93F8 text-#fff px20px pt18px pb-15px w-180px rd-10px mr-15px">
|
<div class="bg-#6C93F8 text-#fff px20px pt18px pb-15px w-180px rd-10px mr-15px">
|
||||||
<img src="@/assets/images/xinxi@2x.png" class="w30px mr-5px mt--3px" /><span>公司经营信息</span>
|
<img src="@/assets/images/xinxi@2x.png" class="w30px mr-5px mt--3px" /><span>公司经营信息</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -232,156 +221,122 @@ async function getAuth() {
|
||||||
|
|
||||||
|
|
||||||
</div> -->
|
</div> -->
|
||||||
<div class="bg-#fff rd-15px px30px pt30px w-full h930px">
|
<div class="bg-#fff rd-15px px30px pt30px w-full h930px">
|
||||||
<div
|
<div class="rd-15px w-full h870px" style="box-shadow: 1px 2px 26px -3px #cdcccc">
|
||||||
class="rd-15px w-full h870px"
|
<div class="h80px rd-t-15px bg-#4877FB leading-80px text-#fff text-20px">
|
||||||
style="box-shadow: 1px 2px 26px -3px #cdcccc"
|
<img src="@/assets/images/Shape7@2x.png" class="w50px ml-30px mr10px mt--20px" />
|
||||||
>
|
{{ title }}
|
||||||
<div
|
<div class="float-right top-0 right-30px">
|
||||||
class="h80px rd-t-15px bg-#4877FB leading-80px text-#fff text-20px"
|
<el-button
|
||||||
>
|
class="mr-30px"
|
||||||
<img
|
v-if="isDbReview || isDbUpload || userCode"
|
||||||
src="@/assets/images/Shape7@2x.png"
|
type="warning"
|
||||||
class="w50px ml-30px mr10px mt--20px"
|
@click="push({ path: '/DataBase/review' })"
|
||||||
/>
|
>
|
||||||
{{ title }}
|
审批流程
|
||||||
<div class="float-right top-0 right-30px">
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
class="mr-30px"
|
v-if="isDbReview || isDbUpload || userCode"
|
||||||
v-if="isDbReview || isDbUpload || userCode"
|
type="primary"
|
||||||
type="warning"
|
@click="push('/DataBase/Modify')"
|
||||||
@click="push({ path: '/DataBase/review' })"
|
>内容管理</el-button
|
||||||
>
|
>
|
||||||
审批流程
|
</div>
|
||||||
</el-button>
|
</div>
|
||||||
<el-button
|
<div class="p30px relative h790px">
|
||||||
v-if="isDbReview || isDbUpload || userCode"
|
<!-- lujinli -->
|
||||||
type="primary"
|
<!-- <table class="history w-full text-center text-16px border-spacing-0 "> -->
|
||||||
@click="push('/DataBase/Modify')"
|
<table class="history w-full text-center text-18px border-spacing-0">
|
||||||
>内容管理</el-button
|
<thead
|
||||||
>
|
style="
|
||||||
</div>
|
background-color: #e7edff;
|
||||||
</div>
|
color: #000;
|
||||||
<div class="p30px relative h790px">
|
height: 50px;
|
||||||
<!-- lujinli -->
|
width: 220px;
|
||||||
<!-- <table class="history w-full text-center text-16px border-spacing-0 "> -->
|
border: 1px solid #417bef;
|
||||||
<table class="history w-full text-center text-18px border-spacing-0">
|
"
|
||||||
<thead
|
>
|
||||||
style="
|
<tr class="text-20px leading-50px">
|
||||||
background-color: #e7edff;
|
<th width="20%">
|
||||||
color: #000;
|
<img src="@/assets/images/baiot@2x.png" class="w35px mt--7px mr-5px" />标题
|
||||||
height: 50px;
|
</th>
|
||||||
width: 220px;
|
<th width="20%">
|
||||||
border: 1px solid #417bef;
|
<img src="@/assets/images/scbmm@2x.png" class="w35px mt--7px mr-5px" />上传科室
|
||||||
"
|
</th>
|
||||||
>
|
<th width="20%">
|
||||||
<tr class="text-20px leading-50px">
|
<img src="@/assets/images/scbmm@2x.png" class="w35px mt--7px mr-5px" />上传部门
|
||||||
<th width="20%">
|
</th>
|
||||||
<img
|
<th width="20%">
|
||||||
src="@/assets/images/baiot@2x.png"
|
<img src="@/assets/images/riqii@2x.png" class="w35px mt--7px mr-5px" />上传日期
|
||||||
class="w35px mt--7px mr-5px"
|
</th>
|
||||||
/>标题
|
<th width="20% text-center">操作</th>
|
||||||
</th>
|
</tr>
|
||||||
<th width="20%">
|
</thead>
|
||||||
<img
|
<tbody class="h650px overflow-auto absolute w-full">
|
||||||
src="@/assets/images/scbmm@2x.png"
|
<tr class="w-full flex leading-50px" v-for="it in tableData">
|
||||||
class="w35px mt--7px mr-5px"
|
<td
|
||||||
/>上传科室
|
class="w20% h50px cursor-pointer overflow-hidden text-left pl25px truncate text-#000"
|
||||||
</th>
|
>
|
||||||
<th width="20%">
|
<div class="flex items-center truncate">
|
||||||
<img
|
<img
|
||||||
src="@/assets/images/scbmm@2x.png"
|
v-if="isNotOneWeekAgo(it.createTime)"
|
||||||
class="w35px mt--7px mr-5px"
|
src="@/assets/images/NEW.gif"
|
||||||
/>上传部门
|
class="!h-20px !w-auto mr-2"
|
||||||
</th>
|
alt=""
|
||||||
<th width="20%">
|
/>
|
||||||
<img
|
<span :title="it.title"> {{ it.title }}</span>
|
||||||
src="@/assets/images/riqii@2x.png"
|
</div>
|
||||||
class="w35px mt--7px mr-5px"
|
</td>
|
||||||
/>上传日期
|
<td class="w20% h50px">{{ it.deptName }}</td>
|
||||||
</th>
|
<td class="w20% h50px">{{ it.parentDeptName }}</td>
|
||||||
<th width="20% text-center">操作</th>
|
<td class="w20% h50px">{{ it.createTime }}</td>
|
||||||
</tr>
|
<td class="w20% h50px">
|
||||||
</thead>
|
<!-- <el-button style="color: #000;" @click="openUrl(it)">预览</el-button> -->
|
||||||
<tbody class="h650px overflow-auto absolute w-full">
|
<!-- <el-button style="color: #000;" @click="downloads(it)">下载</el-button> -->
|
||||||
<tr class="w-full flex leading-50px" v-for="it in tableData">
|
<n-popover
|
||||||
<td
|
trigger="hover"
|
||||||
class="w20% h50px cursor-pointer overflow-hidden text-left pl25px truncate text-#000"
|
placement="top-start"
|
||||||
>
|
v-if="arr.includes(it.id) || (it.fileCommon?.fileSize || 0) > 25 * 1024 * 1024"
|
||||||
<div class="flex items-center truncate">
|
>
|
||||||
<img
|
<template #trigger>
|
||||||
v-if="isNotOneWeekAgo(it.createTime)"
|
<el-button style="color: #000" @click="downloads(it)">查看</el-button>
|
||||||
src="@/assets/images/NEW.gif"
|
</template>
|
||||||
class="!h-20px !w-auto mr-2"
|
<span>该文件超过25MB,无法进行预览,请点击 查看 进行下载!</span>
|
||||||
alt=""
|
</n-popover>
|
||||||
/>
|
<el-button v-else style="color: #000" @click="downloads(it)">查看</el-button>
|
||||||
<span :title="it.title"> {{ it.title }}</span>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
</td>
|
</tbody>
|
||||||
<td class="w20% h50px">{{ it.deptName }}</td>
|
</table>
|
||||||
<td class="w20% h50px">{{ it.parentDeptName }}</td>
|
<div class="float-right absolute bottom-20px right-30px">
|
||||||
<td class="w20% h50px">{{ it.createTime }}</td>
|
<el-pagination
|
||||||
<td class="w20% h50px">
|
v-model:current-page="pageInfo.currentPage"
|
||||||
<!-- <el-button style="color: #000;" @click="openUrl(it)">预览</el-button> -->
|
v-model:page-size="pageInfo.pageSize"
|
||||||
<!-- <el-button style="color: #000;" @click="downloads(it)">下载</el-button> -->
|
layout="prev, pager, next, jumper"
|
||||||
<n-popover
|
:total="pageInfo.total"
|
||||||
trigger="hover"
|
@size-change="handleSizeChange"
|
||||||
placement="top-start"
|
@current-change="handleCurrentChange"
|
||||||
v-if="
|
/>
|
||||||
arr.includes(it.id) ||
|
</div>
|
||||||
(it.fileCommon?.fileSize || 0) > 25 * 1024 * 1024
|
</div>
|
||||||
"
|
</div>
|
||||||
>
|
</div>
|
||||||
<template #trigger>
|
</div>
|
||||||
<el-button style="color: #000" @click="downloads(it)"
|
<n-modal v-model:show="pdfShow">
|
||||||
>查看</el-button
|
<div class="w100% h100%">
|
||||||
>
|
<el-icon color="#fff" size="26px" @click="pdfShow = false" class="absolute left-92% bg-#F43"
|
||||||
</template>
|
><Close
|
||||||
<span
|
/></el-icon>
|
||||||
>该文件超过25MB,无法进行预览,请点击 查看
|
<Amtion :data="src" :datas="srcType" />
|
||||||
进行下载!</span
|
</div>
|
||||||
>
|
</n-modal>
|
||||||
</n-popover>
|
|
||||||
<el-button v-else style="color: #000" @click="downloads(it)"
|
|
||||||
>查看</el-button
|
|
||||||
>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<div class="float-right absolute bottom-20px right-30px">
|
|
||||||
<el-pagination
|
|
||||||
v-model:current-page="pageInfo.currentPage"
|
|
||||||
v-model:page-size="pageInfo.pageSize"
|
|
||||||
layout="prev, pager, next, jumper"
|
|
||||||
:total="pageInfo.total"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<n-modal v-model:show="pdfShow">
|
|
||||||
<div class="w100% h100%">
|
|
||||||
<el-icon
|
|
||||||
color="#fff"
|
|
||||||
size="26px"
|
|
||||||
@click="pdfShow = false"
|
|
||||||
class="absolute left-92% bg-#F43"
|
|
||||||
><Close
|
|
||||||
/></el-icon>
|
|
||||||
<Amtion :data="src" :datas="srcType" />
|
|
||||||
</div>
|
|
||||||
</n-modal>
|
|
||||||
</template>
|
</template>
|
||||||
<style>
|
<style>
|
||||||
.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;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -19,7 +19,9 @@ import { isNotOneWeekAgo } from '@/utils'
|
||||||
|
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const myStore = useMyStore()
|
const myStore = useMyStore()
|
||||||
const userCode = ['admin', 'theme_dandang', 'tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin', 'theme_dandang', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
|
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const showDropdown1 = ref(false)
|
const showDropdown1 = ref(false)
|
||||||
|
|
|
||||||
|
|
@ -2,69 +2,75 @@
|
||||||
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 { NModal, useMessage } from 'naive-ui'
|
import { NModal, useMessage } from 'naive-ui'
|
||||||
import { getCateList, editCateItem,getCateItemList,deleteCateItem ,getLabActList} from '@/api/daikin/base'
|
import {
|
||||||
|
getCateList,
|
||||||
|
editCateItem,
|
||||||
|
getCateItemList,
|
||||||
|
deleteCateItem,
|
||||||
|
getLabActList
|
||||||
|
} from '@/api/daikin/base'
|
||||||
import { useUserStore } from '@/stores/modules/user'
|
import { useUserStore } from '@/stores/modules/user'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import { useMyStore } from '@/stores/modules/mystor'
|
import { useMyStore } from '@/stores/modules/mystor'
|
||||||
|
|
||||||
const myStore = useMyStore();
|
const myStore = useMyStore()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const header = { 'token': store.user.token }
|
const header = { 'token': store.user.token }
|
||||||
const userCode = ['admin', 'theme_dandang', 'tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin', 'theme_dandang', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
|
||||||
const dataA = ref([])
|
const dataA = ref([])
|
||||||
|
|
||||||
|
|
||||||
const shomkA = ref(false)
|
const shomkA = ref(false)
|
||||||
|
|
||||||
const actMidIsSelects=ref()
|
const actMidIsSelects = ref()
|
||||||
const activeName = ref()
|
const activeName = ref()
|
||||||
const tabsList = ref()
|
const tabsList = ref()
|
||||||
const cateIds = ref()
|
const cateIds = ref()
|
||||||
const starId = ref()
|
const starId = ref()
|
||||||
const state = reactive<any>({
|
const state = reactive<any>({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
cateId:route.params.id!==':id'?route.params.id:starId.value,
|
cateId: route.params.id !== ':id' ? route.params.id : starId.value
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
const { data } = await getLabActList()
|
const { data } = await getLabActList()
|
||||||
actMidIsSelects.value = data.actMidIsSelect
|
actMidIsSelects.value = data.actMidIsSelect
|
||||||
const indexId = myStore.data
|
const indexId = myStore.data
|
||||||
console.log(indexId)
|
console.log(indexId)
|
||||||
const { data: dataBot } = await getCateList({indexId})
|
const { data: dataBot } = await getCateList({ indexId })
|
||||||
|
|
||||||
tabsList.value = dataBot
|
tabsList.value = dataBot
|
||||||
if(dataBot.length>0){
|
if (dataBot.length > 0) {
|
||||||
starId.value = dataBot[0].id
|
starId.value = dataBot[0].id
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(starId.value)
|
console.log(starId.value)
|
||||||
cateIds.value = route.params.id
|
cateIds.value = route.params.id
|
||||||
activeName.value = route.params.id!==':id'?route.params.id:starId.value+''
|
activeName.value = route.params.id !== ':id' ? route.params.id : starId.value + ''
|
||||||
|
|
||||||
})
|
})
|
||||||
async function getItemList() {
|
async function getItemList() {
|
||||||
const {rows} =await getCateItemList(state)
|
const { rows } = await getCateItemList(state)
|
||||||
dataA.value = rows
|
dataA.value = rows
|
||||||
}
|
}
|
||||||
|
|
||||||
const ss = computed(() => [state.pageNum, state.cateId])
|
const ss = computed(() => [state.pageNum, state.cateId])
|
||||||
watch(() => unref(ss),
|
watch(
|
||||||
async (v) => {
|
() => unref(ss),
|
||||||
getItemList()
|
async (v) => {
|
||||||
},
|
getItemList()
|
||||||
{ immediate: true, deep: true },
|
},
|
||||||
)
|
{ immediate: true, deep: true }
|
||||||
|
)
|
||||||
|
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
state.cateId = tab.props.label
|
state.cateId = tab.props.label
|
||||||
cateIds.value = tab.props.label
|
cateIds.value = tab.props.label
|
||||||
starId.value = tab.props.label
|
starId.value = tab.props.label
|
||||||
console.log(tab.props.label)
|
console.log(tab.props.label)
|
||||||
}
|
}
|
||||||
|
|
@ -76,89 +82,92 @@ const editA = ref({
|
||||||
fileList: []
|
fileList: []
|
||||||
})
|
})
|
||||||
|
|
||||||
async function onSubmit(row: { id: number; url: any; title: string; time: string; dowhat: string; files: never[]; fileList: never[] }) {
|
async function onSubmit(row: {
|
||||||
|
id: number
|
||||||
|
url: any
|
||||||
|
title: string
|
||||||
|
time: string
|
||||||
|
dowhat: string
|
||||||
|
files: never[]
|
||||||
|
fileList: never[]
|
||||||
|
}) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
|
|
||||||
const { id, title, fileList } = row
|
const { id, title, fileList } = row
|
||||||
const cateId = cateIds.value===':id'?activeName.value:cateIds.value
|
const cateId = cateIds.value === ':id' ? activeName.value : cateIds.value
|
||||||
let filePath
|
let filePath
|
||||||
console.log(cateId)
|
console.log(cateId)
|
||||||
if (fileList && fileList.length > 0) {
|
if (fileList && fileList.length > 0) {
|
||||||
filePath = fileList.map(file => {
|
filePath = fileList
|
||||||
if(file.response){
|
.map((file) => {
|
||||||
return file.response.url
|
if (file.response) {
|
||||||
}
|
return file.response.url
|
||||||
else{
|
} else {
|
||||||
return file.url
|
return file.url
|
||||||
}
|
}
|
||||||
}).join(',')
|
})
|
||||||
|
.join(',')
|
||||||
}
|
}
|
||||||
console.log({id,title,cateId,filePath})
|
console.log({ id, title, cateId, filePath })
|
||||||
if(cateId&&cateId=='undefined'){
|
if (cateId && cateId == 'undefined') {
|
||||||
message.error("请先添加类别!")
|
message.error('请先添加类别!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const { code, msg } = await editCateItem({ id, title, cateId, filePath })
|
const { code, msg } = await editCateItem({ id, title, cateId, filePath })
|
||||||
if (code === 200) { message.success("添加成功!") }
|
if (code === 200) {
|
||||||
else { message.error(msg) }
|
message.success('添加成功!')
|
||||||
|
} else {
|
||||||
window.location.reload();
|
message.error(msg)
|
||||||
|
}
|
||||||
|
|
||||||
|
window.location.reload()
|
||||||
shomkA.value = false
|
shomkA.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = (row: any) => {
|
const handleEdit = (row: any) => {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
row.fileList = row.filePathList.map(item=>Object.assign(item,{
|
row.fileList = row.filePathList.map((item) =>
|
||||||
name:item.originalFileName
|
Object.assign(item, {
|
||||||
}))
|
name: item.originalFileName
|
||||||
shomkA.value = true
|
})
|
||||||
if (!row) return
|
)
|
||||||
editA.value = row
|
shomkA.value = true
|
||||||
|
if (!row) return
|
||||||
|
editA.value = row
|
||||||
}
|
}
|
||||||
async function handleDelete(obj) {
|
async function handleDelete(obj) {
|
||||||
const {id} = obj
|
const { id } = obj
|
||||||
const { code,msg} =await deleteCateItem({id})
|
const { code, msg } = await deleteCateItem({ id })
|
||||||
if (code === 200) { message.success("删除成功!") }
|
if (code === 200) {
|
||||||
else { message.error(msg) }
|
message.success('删除成功!')
|
||||||
window.location.reload();
|
} else {
|
||||||
|
message.error(msg)
|
||||||
|
}
|
||||||
|
window.location.reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function downloadFile(data) {
|
async function downloadFile(data) {
|
||||||
// console.log(data)
|
// console.log(data)
|
||||||
if(actMidIsSelects.value===2){
|
if (actMidIsSelects.value === 2) {
|
||||||
message.info("没有访问权限")
|
message.info('没有访问权限')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const url = data.it.url
|
const url = data.it.url
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url)
|
||||||
const blob = await response.blob();
|
const blob = await response.blob()
|
||||||
|
|
||||||
const downloadUrl = URL.createObjectURL(blob);
|
const downloadUrl = URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a');
|
const link = document.createElement('a')
|
||||||
link.href = downloadUrl;
|
link.href = downloadUrl
|
||||||
link.download = data.it.originalFileName; // 替换为你要保存的文件名
|
link.download = data.it.originalFileName // 替换为你要保存的文件名
|
||||||
link.click();
|
link.click()
|
||||||
URL.revokeObjectURL(downloadUrl);
|
URL.revokeObjectURL(downloadUrl)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
message.error('下载文件出错:', error);
|
message.error('下载文件出错:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top">
|
<HomeHead class="top">
|
||||||
|
|
@ -174,9 +183,14 @@ async function downloadFile(data) {
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
<div class="text-18px">{{ week }}</div>
|
<div class="text-18px">{{ week }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px rounded-20px">
|
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px rounded-20px">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<el-tab-pane v-for="(item,ind) in tabsList" :label="item.id" :name="item.id+''" :index="item.id">
|
<el-tab-pane
|
||||||
|
v-for="(item, ind) in tabsList"
|
||||||
|
:label="item.id"
|
||||||
|
:name="item.id + ''"
|
||||||
|
:index="item.id"
|
||||||
|
>
|
||||||
<template #label>
|
<template #label>
|
||||||
<span class="custom-tabs-label">
|
<span class="custom-tabs-label">
|
||||||
<span class="text-20px">{{ item.cateName }}</span>
|
<span class="text-20px">{{ item.cateName }}</span>
|
||||||
|
|
@ -186,54 +200,59 @@ async function downloadFile(data) {
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<div v-if="dataA" v-for="iet in dataA" class="py25px px10px text-18px ">
|
<div v-if="dataA" v-for="iet in dataA" class="py25px px10px text-18px">
|
||||||
<span class="content">{{iet.title}}</span>
|
<span class="content">{{ iet.title }}</span>
|
||||||
<el-dropdown max-height="100px" @command="downloadFile" class="top--5px w50px block float-left">
|
<el-dropdown
|
||||||
<el-icon size="25" color="#0054E4">
|
max-height="100px"
|
||||||
<CaretBottom />
|
@command="downloadFile"
|
||||||
</el-icon>
|
class="top--5px w50px block float-left"
|
||||||
|
>
|
||||||
|
<el-icon size="25" color="#0054E4">
|
||||||
|
<CaretBottom />
|
||||||
|
</el-icon>
|
||||||
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="iet.filePathList" v-for="it in iet.filePathList"
|
<el-dropdown-item
|
||||||
:command="{ it }">{{ it.originalFileName }}</el-dropdown-item>
|
v-if="iet.filePathList"
|
||||||
</el-dropdown-menu>
|
v-for="it in iet.filePathList"
|
||||||
</template>
|
:command="{ it }"
|
||||||
</el-dropdown>
|
>{{ it.originalFileName }}</el-dropdown-item
|
||||||
<!--
|
>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
<!--
|
||||||
<div v-if="userCode" class="w120px block float-right">
|
<div v-if="userCode" class="w120px block float-right">
|
||||||
<el-button size="small" @click="handleEdit(iet)">编辑</el-button>
|
<el-button size="small" @click="handleEdit(iet)">编辑</el-button>
|
||||||
<el-button size="small" type="danger" @click="handleDelete(iet)">删除</el-button>
|
<el-button size="small" type="danger" @click="handleDelete(iet)">删除</el-button>
|
||||||
</div> -->
|
</div> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-button v-if="userCode" type="primary" class="" @click="shomkA = !shomkA">新增内容</el-button> -->
|
<!-- <el-button v-if="userCode" type="primary" class="" @click="shomkA = !shomkA">新增内容</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<n-modal v-model:show="shomkA">
|
<n-modal v-model:show="shomkA">
|
||||||
<div class="bg-#FFF p30px">
|
<div class="bg-#FFF p30px">
|
||||||
<el-form :model="editA" label-width="120px" :inline="true">
|
<el-form :model="editA" label-width="120px" :inline="true">
|
||||||
|
<br />
|
||||||
|
|
||||||
<br>
|
|
||||||
<el-form-item label="标题">
|
<el-form-item label="标题">
|
||||||
<el-input v-model="editA.title" />
|
<el-input v-model="editA.title" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<br>
|
<br />
|
||||||
<el-form-item label="文件">
|
<el-form-item label="文件">
|
||||||
<el-upload v-model:file-list="editA.fileList" class="upload-demo" :headers="header"
|
<el-upload
|
||||||
action="/test-api/common/upload">
|
v-model:file-list="editA.fileList"
|
||||||
|
class="upload-demo"
|
||||||
|
:headers="header"
|
||||||
|
action="/test-api/common/upload"
|
||||||
|
>
|
||||||
<el-button type="primary">选择文件</el-button>
|
<el-button type="primary">选择文件</el-button>
|
||||||
|
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<hr class="mb15px border-#f1f1f1">
|
<hr class="mb15px border-#f1f1f1" />
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit(editA)">确认</el-button>
|
<el-button type="primary" @click="onSubmit(editA)">确认</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -241,15 +260,15 @@ async function downloadFile(data) {
|
||||||
</n-modal>
|
</n-modal>
|
||||||
</template>
|
</template>
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
.el-tabs__content{
|
.el-tabs__content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.content{
|
.content {
|
||||||
display: block;
|
display: block;
|
||||||
max-width:1100px;
|
max-width: 1100px;
|
||||||
float: left;
|
float: left;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.top {
|
.top {
|
||||||
|
|
@ -264,4 +283,4 @@ async function downloadFile(data) {
|
||||||
right: 20px;
|
right: 20px;
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ 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 Editor from './TinyECE.vue'
|
import Editor from './TinyECE.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
|
import { noticeld } from '@/stores/modules/noticeId'
|
||||||
import type { FormInst } from 'naive-ui'
|
import type { FormInst } from 'naive-ui'
|
||||||
import { useMessage } from 'naive-ui'
|
import { useMessage } from 'naive-ui'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
@ -25,6 +26,19 @@ import { useUserStore } from '@/stores/modules/user'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
|
const not = noticeld()
|
||||||
|
|
||||||
|
const toDetail2 = (id: any) => {
|
||||||
|
not.article.cate = id
|
||||||
|
console.log(not.article.cate)
|
||||||
|
// push(`${route.path.replace('/external','')}/info/${n.id}`)
|
||||||
|
push('/external/Board')
|
||||||
|
}
|
||||||
|
|
||||||
|
const userCode = ref(false)
|
||||||
|
userCode.value = ['admin', 'waibuyemianguanliyuan', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -38,9 +52,34 @@ const { push } = useRouter()
|
||||||
<div class="text-36px">外部情报</div>
|
<div class="text-36px">外部情报</div>
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
<div class="text-18px flex-1">{{ week }}</div>
|
<div class="text-18px flex-1">{{ week }}</div>
|
||||||
|
<el-dropdown>
|
||||||
|
<div class="text-#fff" style="margin-right: 8px" v-if="userCode">
|
||||||
|
<div class="add text-18px px13px py11px cursor-pointer">外部审批流程</div>
|
||||||
|
</div>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item @click="push({ path: '/external/Process' })">News</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="push({ path: '/external/Process', query: { cate: '8' } })"
|
||||||
|
>重要通知</el-dropdown-item
|
||||||
|
>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
<el-dropdown>
|
||||||
|
<div class="text-#fff" style="margin-right: 28px" v-if="userCode">
|
||||||
|
<div class="add text-18px px13px py11px cursor-pointer">外部新增 +</div>
|
||||||
|
</div>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-menu>
|
||||||
|
<el-dropdown-item @click="toDetail2(7)">News</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="toDetail2(8)">重要通知</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
style="margin-right: 8px"
|
style="margin-right: 8px"
|
||||||
v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'"
|
v-if="store.user.isPublish === 1 || store.user.roleCode?.includes('zhuxi')"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="add text-18px px13px py11px cursor-pointer"
|
class="add text-18px px13px py11px cursor-pointer"
|
||||||
|
|
@ -51,7 +90,7 @@ const { push } = useRouter()
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="margin-right: 8px"
|
style="margin-right: 8px"
|
||||||
v-if="store.user.isPublish === 1 || store.user.roleCode === 'zhuxi'"
|
v-if="store.user.isPublish === 1 || store.user.roleCode?.includes('zhuxi')"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="add text-18px px13px py11px cursor-pointer"
|
class="add text-18px px13px py11px cursor-pointer"
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,7 @@ import { useUserStore } from '@/stores/modules/user'
|
||||||
import HomeHead from '@/views/home/components/HomeHead.vue'
|
import HomeHead from '@/views/home/components/HomeHead.vue'
|
||||||
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue'
|
||||||
import { useDate } from '@/views/home/hooks/useDate'
|
import { useDate } from '@/views/home/hooks/useDate'
|
||||||
import {
|
import { getNoticeList, deleteWithdraw, getManagerList } from '@/api/daikin/base'
|
||||||
getNoticeList,
|
|
||||||
deleteWithdraw,
|
|
||||||
getManagerList
|
|
||||||
} from '@/api/daikin/base'
|
|
||||||
import { noticeld } from '@/stores/modules/noticeId'
|
import { noticeld } from '@/stores/modules/noticeId'
|
||||||
import { getImg } from '../images'
|
import { getImg } from '../images'
|
||||||
import { NTag } from 'naive-ui'
|
import { NTag } from 'naive-ui'
|
||||||
|
|
@ -21,236 +17,234 @@ const route = useRoute()
|
||||||
// console.log(route,route.path)
|
// console.log(route,route.path)
|
||||||
// push(`/Home/Process/ProcessInfo`)
|
// push(`/Home/Process/ProcessInfo`)
|
||||||
const cateList = [
|
const cateList = [
|
||||||
{ cate: 1, name: '外部环境', color: '#33C2B2' },
|
{ cate: 1, name: '外部环境', color: '#33C2B2' },
|
||||||
{ cate: 2, name: '竞争对手', color: '#F57E6C' },
|
{ cate: 2, name: '竞争对手', color: '#F57E6C' },
|
||||||
{ cate: 3, name: '供方动向 ', color: '#547EE9' },
|
{ cate: 3, name: '供方动向 ', color: '#547EE9' },
|
||||||
{ cate: 4, name: '大金集团', color: '#5ECBFA' },
|
{ cate: 4, name: '大金集团', color: '#5ECBFA' },
|
||||||
{ cate: 5, name: '中国据点', color: '#E5A742' },
|
{ cate: 5, name: '中国据点', color: '#E5A742' },
|
||||||
{ cate: 6, name: '调达本部', color: '#946DE1' },
|
{ cate: 6, name: '调达本部', color: '#946DE1' },
|
||||||
{ cate: 7, name: 'news', color: '#63BF90' },
|
{ cate: 7, name: 'news', color: '#63BF90' },
|
||||||
{ cate: 8, name: '重要通知', color: '#E36461' },
|
{ cate: 8, name: '重要通知', color: '#E36461' },
|
||||||
{ cate: 9, name: '留言板', color: '#F5BC00' }
|
{ cate: 9, name: '留言板', color: '#F5BC00' }
|
||||||
]
|
]
|
||||||
const listData = ref<any>({})
|
const listData = ref<any>({})
|
||||||
const Status = reactive({
|
const Status = reactive({
|
||||||
reviewStatus: 1,
|
reviewStatus: 1,
|
||||||
reviewSource: 2
|
reviewSource: 2
|
||||||
})
|
})
|
||||||
const pageInfo = reactive({
|
const pageInfo = reactive({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 13,
|
pageSize: 13,
|
||||||
total: 10
|
total: 10
|
||||||
})
|
})
|
||||||
const handleSizeChange = (e) => {
|
const handleSizeChange = (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
const handleCurrentChange = (e) => {
|
const handleCurrentChange = (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
async function getPageList() {
|
async function getPageList() {
|
||||||
const { reviewStatus, reviewSource } = Status
|
const { reviewStatus, reviewSource } = Status
|
||||||
// 外部-驳回&撤回
|
// 外部-驳回&撤回
|
||||||
if (reviewStatus == 4) {
|
if (reviewStatus == 4) {
|
||||||
console.log('一级:', reviewSource, '二级:', reviewStatus)
|
console.log('一级:', reviewSource, '二级:', reviewStatus)
|
||||||
const { pageNum, pageSize } = pageInfo
|
const { pageNum, pageSize } = pageInfo
|
||||||
const { rows } = await getManagerList({
|
const { rows } = await getManagerList({
|
||||||
pageNum,
|
pageNum,
|
||||||
pageSize,
|
pageSize,
|
||||||
reviewStatus: '5'
|
reviewStatus: '5'
|
||||||
})
|
})
|
||||||
console.log(rows, 7777777777)
|
console.log(rows, 7777777777)
|
||||||
listData.value = []
|
listData.value = []
|
||||||
listData.value = rows
|
listData.value = rows
|
||||||
} else {
|
} else {
|
||||||
const { data } = await getNoticeList({ reviewStatus, reviewSource })
|
const { data } = await getNoticeList({ reviewStatus, reviewSource })
|
||||||
listData.value = []
|
listData.value = []
|
||||||
listData.value = data
|
listData.value = data
|
||||||
}
|
}
|
||||||
if (listData.value && reviewStatus === 3) {
|
if (listData.value && reviewStatus === 3) {
|
||||||
flg.value = true
|
flg.value = true
|
||||||
} else {
|
} else {
|
||||||
flg.value = false
|
flg.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 详情页
|
// 详情页
|
||||||
const clickTo = (data: any) => {
|
const clickTo = (data: any) => {
|
||||||
let flag = false
|
let flag = false
|
||||||
const { id, noticeId, reviewStatus } = data
|
const { id, noticeId, reviewStatus } = data
|
||||||
if (reviewStatus == 4) {
|
if (reviewStatus == 4) {
|
||||||
flag = true
|
flag = true
|
||||||
}
|
}
|
||||||
console.log(data)
|
console.log(data)
|
||||||
store.article.noticeld = noticeId
|
store.article.noticeld = noticeId
|
||||||
if (
|
if (
|
||||||
[1, 2].includes(reviewStatus) &&
|
[1, 2].includes(reviewStatus) &&
|
||||||
['review_person', 'zhuxi', 'tech_service'].includes(store2.user.roleCode)
|
['review_person', 'zhuxi', 'tech_service'].some((item) => store2.user.roleCode?.includes(item))
|
||||||
) {
|
) {
|
||||||
push(`/Home/Process/ProcessInfo/${id}`)
|
push(`/Home/Process/ProcessInfo/${id}`)
|
||||||
} else {
|
} else {
|
||||||
push(`/Home/Process/Detail/${id}/${flag}`) // 详情
|
push(`/Home/Process/Detail/${id}/${flag}`) // 详情
|
||||||
}
|
}
|
||||||
// console.log(store.article.noticeld)
|
// console.log(store.article.noticeld)
|
||||||
}
|
}
|
||||||
// 撤回按钮
|
// 撤回按钮
|
||||||
const clickCancel = (data: any) => {
|
const clickCancel = (data: any) => {
|
||||||
const { id, noticeId, reviewStatus } = data
|
const { id, noticeId, reviewStatus } = data
|
||||||
deleteWithdraw(id).then((res) => {
|
deleteWithdraw(id).then((res) => {
|
||||||
console.log(res, '删除结果')
|
console.log(res, '删除结果')
|
||||||
getPageList()
|
getPageList()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const activeName = ref('0')
|
const activeName = ref('0')
|
||||||
const activeNames = ref('2')
|
const activeNames = ref('2')
|
||||||
const flg = ref(false)
|
const flg = ref(false)
|
||||||
const handleClicks = (tab: any) => {
|
const handleClicks = (tab: any) => {
|
||||||
// 2 内部 3外部
|
// 2 内部 3外部
|
||||||
Status.reviewSource = tab.paneName
|
Status.reviewSource = tab.paneName
|
||||||
}
|
}
|
||||||
// 二级
|
// 二级
|
||||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||||
switch (tab.index) {
|
switch (tab.index) {
|
||||||
case '0':
|
case '0':
|
||||||
// 审核中
|
// 审核中
|
||||||
Status.reviewStatus = 1
|
Status.reviewStatus = 1
|
||||||
break
|
break
|
||||||
case '1':
|
case '1':
|
||||||
// 审核通过
|
// 审核通过
|
||||||
Status.reviewStatus = 3
|
Status.reviewStatus = 3
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
// 撤销驳回
|
// 撤销驳回
|
||||||
Status.reviewStatus = 4
|
Status.reviewStatus = 4
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
// 默认展示审核中
|
// 默认展示审核中
|
||||||
Status.reviewStatus = 1
|
Status.reviewStatus = 1
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
console.log(tab.index)
|
console.log(tab.index)
|
||||||
}
|
}
|
||||||
const showDetail = (row: any) => {
|
const showDetail = (row: any) => {
|
||||||
console.log(row, '单选一行')
|
console.log(row, '单选一行')
|
||||||
// sessionStorage.setItem("title", row.title);
|
// sessionStorage.setItem("title", row.title);
|
||||||
// console.log(row.content);
|
// console.log(row.content);
|
||||||
// sessionStorage.setItem("content", row.content);
|
// sessionStorage.setItem("content", row.content);
|
||||||
// push({ name: "bcpDetail" });
|
// push({ name: "bcpDetail" });
|
||||||
}
|
}
|
||||||
// 监听 一级Tab 点击哪个[二级,一级]
|
// 监听 一级Tab 点击哪个[二级,一级]
|
||||||
const ss = computed(() => [Status.reviewStatus, Status.reviewSource])
|
const ss = computed(() => [Status.reviewStatus, Status.reviewSource])
|
||||||
watch(
|
watch(
|
||||||
() => unref(ss),
|
() => unref(ss),
|
||||||
async (v) => {
|
async (v) => {
|
||||||
getPageList()
|
getPageList()
|
||||||
},
|
},
|
||||||
{ immediate: true, deep: true }
|
{ immediate: true, deep: true }
|
||||||
)
|
)
|
||||||
const tabsList = ref([
|
const tabsList = ref([
|
||||||
{
|
{
|
||||||
name: '审核中',
|
name: '审核中',
|
||||||
icon: getImg('shq2@2x.png'),
|
icon: getImg('shq2@2x.png'),
|
||||||
icons: getImg('shq1@2x.png'),
|
icons: getImg('shq1@2x.png'),
|
||||||
id: 0
|
id: 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '审核通过',
|
name: '审核通过',
|
||||||
icon: getImg('shetg2@2x.png'),
|
icon: getImg('shetg2@2x.png'),
|
||||||
icons: getImg('shetg1@2x.png'),
|
icons: getImg('shetg1@2x.png'),
|
||||||
id: 1
|
id: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '驳回/撤回',
|
name: '驳回/撤回',
|
||||||
icon: getImg('boh2@2x.png'),
|
icon: getImg('boh2@2x.png'),
|
||||||
icons: getImg('boh1@2x.png'),
|
icons: getImg('boh1@2x.png'),
|
||||||
id: 2
|
id: 2
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
// name:'草稿',
|
// name:'草稿',
|
||||||
// icon:getImg('caog2@2x.png'),
|
// icon:getImg('caog2@2x.png'),
|
||||||
// icons:getImg('caog1@2x.png'),
|
// icons:getImg('caog1@2x.png'),
|
||||||
// id:3,
|
// id:3,
|
||||||
// },
|
// },
|
||||||
])
|
])
|
||||||
// tab
|
// tab
|
||||||
const tabsList2 = ref([
|
const tabsList2 = ref([
|
||||||
{
|
{
|
||||||
name: '待审核',
|
name: '待审核',
|
||||||
icon: getImg('shhz2@2x.png'),
|
icon: getImg('shhz2@2x.png'),
|
||||||
icons: getImg('shhz1@2x.png'),
|
icons: getImg('shhz1@2x.png'),
|
||||||
id: 0
|
id: 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '已发布',
|
name: '已发布',
|
||||||
icon: getImg('wanc2@2x.png'),
|
icon: getImg('wanc2@2x.png'),
|
||||||
icons: getImg('wanc1@2x.png'),
|
icons: getImg('wanc1@2x.png'),
|
||||||
id: 1
|
id: 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '驳回/撤回',
|
name: '驳回/撤回',
|
||||||
icon: getImg('boh2@2x.png'),
|
icon: getImg('boh2@2x.png'),
|
||||||
icons: getImg('boh1@2x.png'),
|
icons: getImg('boh1@2x.png'),
|
||||||
id: 2
|
id: 2
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
// name:'归档',
|
// name:'归档',
|
||||||
// icon:getImg('guid2@2x.png'),
|
// icon:getImg('guid2@2x.png'),
|
||||||
// icons:getImg('guid1@2x.png'),
|
// icons:getImg('guid1@2x.png'),
|
||||||
// id:3,
|
// id:3,
|
||||||
// },
|
// },
|
||||||
])
|
])
|
||||||
let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<HomeHead class="top"> </HomeHead>
|
<HomeHead class="top"> </HomeHead>
|
||||||
<div class="h-full relative flex flex-col">
|
<div class="h-full relative flex flex-col">
|
||||||
<div class="font-600 flex items-end mt30px">
|
<div class="font-600 flex items-end mt30px">
|
||||||
<div class="text-36px">情报列表</div>
|
<div class="text-36px">情报列表</div>
|
||||||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||||
<div class="text-18px">{{ week }}</div>
|
<div class="text-18px">{{ week }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px">
|
||||||
class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px"
|
<div>
|
||||||
>
|
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
||||||
<div>
|
<el-tab-pane name="2">
|
||||||
<el-tabs type="card" v-model="activeNames" @tab-click="handleClicks">
|
<template #label>
|
||||||
<el-tab-pane name="2">
|
<span class="custom-tabs-label text-25px">内部情报</span>
|
||||||
<template #label>
|
</template>
|
||||||
<span class="custom-tabs-label text-25px">内部情报</span>
|
</el-tab-pane>
|
||||||
</template>
|
<el-tab-pane
|
||||||
</el-tab-pane>
|
name="3"
|
||||||
<el-tab-pane
|
v-if="
|
||||||
name="3"
|
['review_person', 'zhuxi', 'tech_service'].some((item) =>
|
||||||
v-if="
|
store2.user.roleCode?.includes(item)
|
||||||
['review_person', 'zhuxi', 'tech_service'].includes(
|
)
|
||||||
store2.user.roleCode
|
"
|
||||||
)
|
>
|
||||||
"
|
<template #label>
|
||||||
>
|
<span class="custom-tabs-label text-25px">外部情报</span>
|
||||||
<template #label>
|
</template>
|
||||||
<span class="custom-tabs-label text-25px">外部情报</span>
|
</el-tab-pane>
|
||||||
</template>
|
</el-tabs>
|
||||||
</el-tab-pane>
|
</div>
|
||||||
</el-tabs>
|
<div>
|
||||||
</div>
|
<!-- tab标题页 -->
|
||||||
<div>
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
<!-- tab标题页 -->
|
<el-tab-pane v-for="item in tabs" :key="item">
|
||||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
<template #label>
|
||||||
<el-tab-pane v-for="item in tabs" :key="item">
|
<span class="custom-tabs-label">
|
||||||
<template #label>
|
<img
|
||||||
<span class="custom-tabs-label">
|
:src="activeName == item.id ? item.icon : item.icons"
|
||||||
<img
|
class="w25px h25px mr-5px mt--5px"
|
||||||
:src="activeName == item.id ? item.icon : item.icons"
|
/>
|
||||||
class="w25px h25px mr-5px mt--5px"
|
<span class="text-20px">{{ item.name }}</span>
|
||||||
/>
|
</span>
|
||||||
<span class="text-20px">{{ item.name }}</span>
|
</template>
|
||||||
</span>
|
</el-tab-pane>
|
||||||
</template>
|
</el-tabs>
|
||||||
</el-tab-pane>
|
</div>
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 驳回分页 -->
|
<!-- 驳回分页 -->
|
||||||
<!-- <div
|
<!-- <div
|
||||||
class="bg-#fff rd-15px px30px pt30px w-full h100%"
|
class="bg-#fff rd-15px px30px pt30px w-full h100%"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
@ -307,103 +301,95 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
<!-- 没分页 -->
|
<!-- 没分页 -->
|
||||||
<div
|
<div
|
||||||
v-for="i in listData"
|
v-for="i in listData"
|
||||||
:key="i"
|
:key="i"
|
||||||
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px"
|
class="mt8px cursor-pointer flex items-center p15px pl20px text-18px"
|
||||||
>
|
>
|
||||||
<span v-for="s in cateList" :key="s">
|
<span v-for="s in cateList" :key="s">
|
||||||
<span
|
<span
|
||||||
v-if="s.cate === i.cate"
|
v-if="s.cate === i.cate"
|
||||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-gray mr10px"
|
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-gray mr10px"
|
||||||
:style="{ backgroundColor: s.color }"
|
:style="{ backgroundColor: s.color }"
|
||||||
>
|
>
|
||||||
{{ s.name }}
|
{{ s.name }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<NTag
|
<NTag
|
||||||
type="info"
|
type="info"
|
||||||
v-if="i.reviewStatus == 5 && Status.reviewSource === 2"
|
v-if="i.reviewStatus == 5 && Status.reviewSource === 2"
|
||||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#547EE9 mr10px"
|
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#547EE9 mr10px"
|
||||||
>
|
>
|
||||||
个人撤回
|
个人撤回
|
||||||
</NTag>
|
</NTag>
|
||||||
<NTag
|
<NTag
|
||||||
type="info"
|
type="info"
|
||||||
v-else-if="i.reviewStatus == 4 && Status.reviewSource === 2"
|
v-else-if="i.reviewStatus == 4 && Status.reviewSource === 2"
|
||||||
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#002FA7 mr10px"
|
class="shrink-0 w80px inline-flex px8px py5px lh-1.5em text-14px rd-6px text-#fff/80 vertical-middle items-center justify-center bg-#002FA7 mr10px"
|
||||||
>
|
>
|
||||||
领导驳回
|
领导驳回
|
||||||
</NTag>
|
</NTag>
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<span
|
<span
|
||||||
class="truncate flex-1 text-#142142 hover:underline w400px max-w400px"
|
class="truncate flex-1 text-#142142 hover:underline w400px max-w400px"
|
||||||
:title="i.title"
|
:title="i.title"
|
||||||
@click="clickTo(i)"
|
@click="clickTo(i)"
|
||||||
>
|
>
|
||||||
{{ i.title }}
|
{{ i.title }}
|
||||||
</span>
|
</span>
|
||||||
<template #dropdown v-if="flg && i.firstReviewName">
|
<template #dropdown v-if="flg && i.firstReviewName">
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item v-if="i.firstReviewName">
|
<el-dropdown-item v-if="i.firstReviewName">
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<span class="min-w120px"
|
<span class="min-w120px">初审人:{{ i.firstReviewName }}</span>
|
||||||
>初审人:{{ i.firstReviewName }}</span
|
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
||||||
>
|
</div>
|
||||||
<span class="ml20px">初审时间:{{ i.firstReviewTime }}</span>
|
</el-dropdown-item>
|
||||||
</div>
|
<el-dropdown-item v-if="i.ultimateReviewName">
|
||||||
</el-dropdown-item>
|
<div class="ml20px text-#808696 !text-12px flex">
|
||||||
<el-dropdown-item v-if="i.ultimateReviewName">
|
<span class="min-w120px">终审人:{{ i.ultimateReviewName }}</span>
|
||||||
<div class="ml20px text-#808696 !text-12px flex">
|
<span class="ml20px">终审时间:{{ i.ultimateReviewTime }}</span>
|
||||||
<span class="min-w120px"
|
</div>
|
||||||
>终审人:{{ i.ultimateReviewName }}</span
|
</el-dropdown-item>
|
||||||
>
|
</el-dropdown-menu>
|
||||||
<span class="ml20px"
|
</template>
|
||||||
>终审时间:{{ i.ultimateReviewTime }}</span
|
</el-dropdown>
|
||||||
>
|
<span class="shrink-0 ml38px text-#808696 w220px">{{ i.createTime }}</span>
|
||||||
</div>
|
<span
|
||||||
</el-dropdown-item>
|
v-if="store2.user.isReview > 0 && i.publishName"
|
||||||
</el-dropdown-menu>
|
class="ml20px text-#808696 text-16px flex-1"
|
||||||
</template>
|
>来自: {{ i.publishName }}</span
|
||||||
</el-dropdown>
|
>
|
||||||
<span class="shrink-0 ml38px text-#808696 w220px">{{
|
<span
|
||||||
i.createTime
|
v-if="
|
||||||
}}</span>
|
['publish', 'tech_service'].some((item) => store2.user.roleCode?.includes(item)) &&
|
||||||
<span
|
Status.reviewStatus === 1
|
||||||
v-if="store2.user.isReview > 0 && i.publishName"
|
"
|
||||||
class="ml20px text-#808696 text-16px flex-1"
|
class="absolute right-10px top-18px"
|
||||||
>来自: {{ i.publishName }}</span
|
>
|
||||||
>
|
<el-button @click="clickCancel(i)">撤回</el-button>
|
||||||
<span
|
</span>
|
||||||
v-if="
|
</div>
|
||||||
['publish', 'tech_service'].includes(store2.user.roleCode) &&
|
</div>
|
||||||
Status.reviewStatus === 1
|
</div>
|
||||||
"
|
|
||||||
class="absolute right-10px top-18px"
|
|
||||||
>
|
|
||||||
<el-button @click="clickCancel(i)">撤回</el-button>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</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;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 1px;
|
width: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.q-wrapper {
|
.q-wrapper {
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
border: 1px solid #e7ebf5;
|
border: 1px solid #e7ebf5;
|
||||||
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
box-shadow: inset 1px 2px 12px rgba(14, 86, 221, 0.32);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,12 @@ import Amtion from '@/components/amtion.vue'
|
||||||
import {noticeld} from '@/stores/modules/noticeId'
|
import {noticeld} from '@/stores/modules/noticeId'
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const stores = noticeld()
|
const stores = noticeld()
|
||||||
const userCode = ['admin','shikuang_dandang','tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin','shikuang_dandang','tech_service'].some((item) =>
|
||||||
const userCodes = ['admin','huilv_dandang','tech_service'].includes(store.user.roleCode)
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
|
const userCodes = ['admin','huilv_dandang','tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
const { day, week } = useDate()
|
const { day, week } = useDate()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const currentDate = new Date();
|
const currentDate = new Date();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,9 @@ import { topList, actList, highList, badartList, topStat } from '@/api/daikin/ba
|
||||||
import { isNotOneWeekAgo } from '@/utils'
|
import { isNotOneWeekAgo } from '@/utils'
|
||||||
// import { it } from "element-plus/es/locale/index.js";
|
// import { it } from "element-plus/es/locale/index.js";
|
||||||
const store = useUserStore()
|
const store = useUserStore()
|
||||||
const userCode = ['admin', 'quality_dangdan', 'tech_service'].includes(store.user.roleCode)
|
const userCode = ['admin', 'quality_dangdan', 'tech_service'].some((item) =>
|
||||||
|
store.user.roleCode?.includes(item)
|
||||||
|
)
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
// console.log(userCode);
|
// console.log(userCode);
|
||||||
const dataA = ref([])
|
const dataA = ref([])
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue