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