fix bug
parent
405b215bf5
commit
cdc9fff2d9
|
|
@ -23,8 +23,8 @@ onMounted(() => {
|
|||
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
|
||||
userCode.value = ['admin', 'tech_service', 'footprint_dandang'].some((item) =>
|
||||
store.user.roleCode?.includes(item)
|
||||
)
|
||||
})
|
||||
const options = [
|
||||
|
|
@ -108,9 +108,7 @@ const toFootPrint = () => {
|
|||
<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>
|
||||
<el-icon size="35" v-if="userCode" @click="toFootPrint"><Platform /></el-icon>
|
||||
<!-- </div> -->
|
||||
|
||||
<!-- 全屏小图标 -->
|
||||
|
|
@ -139,12 +137,10 @@ const toFootPrint = () => {
|
|||
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>
|
||||
<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">
|
||||
|
|
@ -212,10 +208,7 @@ const toFootPrint = () => {
|
|||
<!-- 当前登录用户信息 -->
|
||||
<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"
|
||||
/>
|
||||
<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" />
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
@ -35,9 +39,7 @@
|
|||
<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,68 +93,67 @@ 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{
|
||||
} else {
|
||||
const { msg, code } = await saveArticle({
|
||||
title,
|
||||
tag: "",
|
||||
tag: '',
|
||||
isTop,
|
||||
treeSource,
|
||||
reviewSource,
|
||||
|
|
@ -165,50 +161,49 @@ 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 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;
|
||||
showModal.value = true
|
||||
|
||||
setUserList.value = dataList.value;
|
||||
stores.article.reviewSource = formValue.value.reviewSource;
|
||||
};
|
||||
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(show);
|
||||
showModal.value = unref(show);
|
||||
dataList.value = unref(multipleSelection);
|
||||
};
|
||||
const { showModal: show, multipleSelection } = data
|
||||
console.log(show)
|
||||
showModal.value = unref(show)
|
||||
dataList.value = unref(multipleSelection)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style scoped lang="less">
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
|
|
@ -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>
|
||||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -7,69 +7,66 @@
|
|||
</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);
|
||||
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;
|
||||
|
|
@ -110,9 +107,8 @@ body {
|
|||
line-height: 10px;
|
||||
text-align: center;
|
||||
/* font-size: 30px; */
|
||||
p{
|
||||
p {
|
||||
font-size: 15px;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -137,4 +133,3 @@ body {
|
|||
transition: transform 0.5s ease;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -2,12 +2,13 @@
|
|||
<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>
|
||||
<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);
|
||||
const cardRefs = ref([])
|
||||
const earth = ref(null)
|
||||
|
||||
cardRefs.value = document.querySelectorAll('#ul1 li');
|
||||
earth.value = document.getElementById('earth');
|
||||
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{
|
||||
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,8 +16,8 @@ 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([])
|
||||
|
|
@ -85,9 +85,7 @@ const openUrl = async (url) => {
|
|||
return
|
||||
}
|
||||
srcType.value = getLastSubstring(url)
|
||||
if (
|
||||
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||
) {
|
||||
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
|
||||
|
|
@ -96,19 +94,10 @@ const openUrl = async (url) => {
|
|||
window.open(
|
||||
url,
|
||||
'',
|
||||
'width=' +
|
||||
screenWidth +
|
||||
',height=' +
|
||||
screenHeight +
|
||||
',top=' +
|
||||
0 +
|
||||
',left=' +
|
||||
0
|
||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
||||
)
|
||||
} else {
|
||||
message.error(
|
||||
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||
)
|
||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
||||
}
|
||||
}
|
||||
function getLastSubstring(str: string): string {
|
||||
|
|
@ -126,9 +115,7 @@ const toDetail = (obj) => {
|
|||
message.info('没有访问权限')
|
||||
return
|
||||
} else {
|
||||
obj.filePath?.[0]?.url
|
||||
? openUrl(obj.filePath[0].url)
|
||||
: message.info('没有可预览文件!')
|
||||
obj.filePath?.[0]?.url ? openUrl(obj.filePath[0].url) : message.info('没有可预览文件!')
|
||||
}
|
||||
}
|
||||
async function down(data: {
|
||||
|
|
@ -185,8 +172,7 @@ const handleVisitsScoll = () => {
|
|||
// if(pageNum >= 1) return
|
||||
const container = msgScoll.value
|
||||
if (container) {
|
||||
const isAtBottom =
|
||||
container.scrollHeight - container.scrollTop === container.clientHeight
|
||||
const isAtBottom = container.scrollHeight - container.scrollTop === container.clientHeight
|
||||
if (isAtBottom) {
|
||||
if (pageNum < maxMsgLingth) {
|
||||
++pageNum
|
||||
|
|
@ -218,9 +204,7 @@ const scroll = ({ scrollTop }: any) => {
|
|||
>
|
||||
PLUS活动相关
|
||||
</div>
|
||||
<el-button v-if="userCode" type="primary" class="button" @click="shomks"
|
||||
>管理</el-button
|
||||
>
|
||||
<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">
|
||||
|
|
@ -233,10 +217,7 @@ const scroll = ({ scrollTop }: any) => {
|
|||
@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"
|
||||
/>
|
||||
查看更多<img src="../../../assets/images/ckgduo@2x.png" class="w25px ml-10px mt--5px" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -342,16 +323,10 @@ const scroll = ({ scrollTop }: any) => {
|
|||
>
|
||||
<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"
|
||||
/>
|
||||
<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)"
|
||||
>
|
||||
<span class="truncate text-18px !min-w-[auto]" @click="toDetail(i)">
|
||||
{{ i.filePath[0]?.originalFileName }}
|
||||
</span>
|
||||
</template>
|
||||
|
|
@ -365,11 +340,7 @@ const scroll = ({ scrollTop }: any) => {
|
|||
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;
|
||||
"
|
||||
style="color: #4d7ee8; text-align: center; font-size: 16px"
|
||||
>
|
||||
更多<el-icon>
|
||||
<DArrowRight class="" />
|
||||
|
|
@ -421,12 +392,7 @@ const scroll = ({ scrollTop }: any) => {
|
|||
</el-icon>
|
||||
</div> -->
|
||||
<span
|
||||
style="
|
||||
border: #417bef 1px solid;
|
||||
color: #417bef;
|
||||
border-radius: 5px;
|
||||
height: 30px;
|
||||
"
|
||||
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
|
||||
|
|
@ -436,13 +402,7 @@ const scroll = ({ scrollTop }: any) => {
|
|||
ref="msgScoll"
|
||||
class="px20px h280px cent_box overflow-y-scroll"
|
||||
> -->
|
||||
<el-scrollbar
|
||||
class="px20px"
|
||||
ref=""
|
||||
height="280px"
|
||||
always
|
||||
@scroll="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"
|
||||
|
|
@ -450,10 +410,9 @@ const scroll = ({ scrollTop }: any) => {
|
|||
: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-#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)"
|
||||
|
|
@ -462,9 +421,7 @@ const scroll = ({ scrollTop }: any) => {
|
|||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<span class="absolute right-10px top-24px text-18px">{{
|
||||
i.createTime
|
||||
}}</span>
|
||||
<span class="absolute right-10px top-24px text-18px">{{ i.createTime }}</span>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<!-- </div> -->
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ const listData = ref<any>([])
|
|||
const message = useMessage()
|
||||
const activeName = ref(1)
|
||||
const flg = ref(false)
|
||||
const userCode = ['admin', 'database_dandang', 'tech_service'].includes(
|
||||
store2.user.roleCode
|
||||
const userCode = ['admin', 'database_dandang', 'tech_service'].some((item) =>
|
||||
store2.user.roleCode?.includes(item)
|
||||
)
|
||||
const isDbReview = computed(() => !!user?.isDbReview)
|
||||
const isDbUpload = computed(() => !!user?.isDbUpload)
|
||||
|
|
@ -60,9 +60,7 @@ const handleDialogConfirm = async () => {
|
|||
}
|
||||
const handleCommand = (command: number, row: any) => {
|
||||
selCommand.value = command
|
||||
dialogText.value = `确认${command === 2 ? '通过' : '驳回'}标题为 ${
|
||||
row.title
|
||||
} 的文件发布吗?`
|
||||
dialogText.value = `确认${command === 2 ? '通过' : '驳回'}标题为 ${row.title} 的文件发布吗?`
|
||||
dialogVisible.value = true
|
||||
selItemId.value = row.id
|
||||
}
|
||||
|
|
@ -203,19 +201,10 @@ const openUrl = async (it: any) => {
|
|||
window.open(
|
||||
filePath,
|
||||
'',
|
||||
'width=' +
|
||||
screenWidth +
|
||||
',height=' +
|
||||
screenHeight +
|
||||
',top=' +
|
||||
0 +
|
||||
',left=' +
|
||||
0
|
||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
||||
)
|
||||
} else {
|
||||
message.error(
|
||||
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||
)
|
||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
||||
}
|
||||
}
|
||||
function getLastSubstring(str: string): string {
|
||||
|
|
@ -433,25 +422,13 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
hasChildren: 'hasChildren'
|
||||
}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cateName"
|
||||
label="所属分类"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="title"
|
||||
label="标题名称"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="title" label="标题名称" show-overflow-tooltip />
|
||||
<el-table-column prop="deptName" label="上传科室" />
|
||||
<el-table-column prop="parentDeptName" label="上传部门" />
|
||||
<el-table-column prop="createTime" label="上传日期" />
|
||||
<el-table-column
|
||||
label="文件列表"
|
||||
prop="filePath"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="文件列表" prop="filePath" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="排序" prop="sort" show-overflow-tooltip/> -->
|
||||
<el-table-column label="查看范围" prop="userIdList">
|
||||
<template #default="scope">
|
||||
|
|
@ -467,9 +444,7 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
<div class="descStyle max-w-60vw !h-46px">
|
||||
<p
|
||||
v-for="(it, e) in scope.row.userList"
|
||||
:class="
|
||||
scope.row.userList.length < 2 ? '!leading-46px' : ''
|
||||
"
|
||||
:class="scope.row.userList.length < 2 ? '!leading-46px' : ''"
|
||||
>
|
||||
{{ it.nickName }}
|
||||
<span v-if="e == 1 && scope.row.userList.length > 2"
|
||||
|
|
@ -493,21 +468,11 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
v-if="(row.fileCommon?.fileSize || 0) > 25 * 1024 * 1024"
|
||||
>
|
||||
<template #trigger>
|
||||
<el-button style="color: #000" @click="downloads(row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button style="color: #000" @click="downloads(row)">查看</el-button>
|
||||
</template>
|
||||
<span
|
||||
>该文件超过25MB,无法进行预览,请点击 查看
|
||||
进行下载!</span
|
||||
>
|
||||
<span>该文件超过25MB,无法进行预览,请点击 查看 进行下载!</span>
|
||||
</n-popover>
|
||||
<el-button
|
||||
v-else
|
||||
style="color: #000"
|
||||
@click="downloads(row)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button v-else style="color: #000" @click="downloads(row)">查看</el-button>
|
||||
</div>
|
||||
<el-dropdown
|
||||
v-if="activeName === 1 && isDbReview"
|
||||
|
|
@ -524,13 +489,8 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
</el-button>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item :command="2" :icon="Check"
|
||||
>同意</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item
|
||||
:command="3"
|
||||
:icon="Close"
|
||||
type="danger"
|
||||
<el-dropdown-item :command="2" :icon="Check">同意</el-dropdown-item>
|
||||
<el-dropdown-item :command="3" :icon="Close" type="danger"
|
||||
>驳回</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
|
|
@ -544,17 +504,10 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
>
|
||||
编辑</el-button
|
||||
>
|
||||
<template
|
||||
v-if="(activeName === 1 || activeName === 3) && isDbUpload"
|
||||
>
|
||||
<el-popconfirm
|
||||
title="确认撤回该文件?"
|
||||
@confirm="handleWithdraw(row)"
|
||||
>
|
||||
<template v-if="(activeName === 1 || activeName === 3) && isDbUpload">
|
||||
<el-popconfirm title="确认撤回该文件?" @confirm="handleWithdraw(row)">
|
||||
<template #reference>
|
||||
<el-button class="ml-16px" type="danger">
|
||||
撤回</el-button
|
||||
>
|
||||
<el-button class="ml-16px" type="danger"> 撤回</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
|
|
@ -606,30 +559,20 @@ function getParentIds(id: number, list: any[] = tableData.value): 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="ml20px"
|
||||
>初审时间:{{ i.firstReviewTime }}</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"
|
||||
|
|
@ -642,11 +585,7 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
</div>
|
||||
</div>
|
||||
<n-modal v-model:show="showModal">
|
||||
<UserList
|
||||
:userDataList="setUserList"
|
||||
@clickChild="handleChild"
|
||||
@CloseThis="CloseThiss"
|
||||
/>
|
||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
|
||||
</n-modal>
|
||||
<NModal v-model:show="shomk" :z-index="99999">
|
||||
<div class="bg-#FFF p30px">
|
||||
|
|
@ -695,34 +634,19 @@ function getParentIds(id: number, list: any[] = tableData.value): any {
|
|||
</el-form-item>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<el-button type="primary" @click="handleEditClick" class="mb-20px">
|
||||
确认</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleEditClick" class="mb-20px"> 确认</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</NModal>
|
||||
<el-dialog
|
||||
v-model="dialogVisible"
|
||||
title="提示"
|
||||
width="30%"
|
||||
top="40vh"
|
||||
center
|
||||
>
|
||||
<el-dialog v-model="dialogVisible" title="提示" width="30%" top="40vh" center>
|
||||
<span class="text-18px">
|
||||
{{ dialogText }}
|
||||
</span>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button size="large" @click="dialogVisible = false"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button
|
||||
class="!ml-50px"
|
||||
size="large"
|
||||
type="primary"
|
||||
@click="handleDialogConfirm"
|
||||
>
|
||||
<el-button size="large" @click="dialogVisible = false">取消</el-button>
|
||||
<el-button class="!ml-50px" size="large" type="primary" @click="handleDialogConfirm">
|
||||
确认
|
||||
</el-button>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -132,9 +132,7 @@ const openUrl = async (it) => {
|
|||
return
|
||||
}
|
||||
srcType.value = getLastSubstring(filePath)
|
||||
if (
|
||||
['doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'pdf'].includes(srcType.value)
|
||||
) {
|
||||
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
|
||||
|
|
@ -143,19 +141,10 @@ const openUrl = async (it) => {
|
|||
window.open(
|
||||
filePath,
|
||||
'',
|
||||
'width=' +
|
||||
screenWidth +
|
||||
',height=' +
|
||||
screenHeight +
|
||||
',top=' +
|
||||
0 +
|
||||
',left=' +
|
||||
0
|
||||
'width=' + screenWidth + ',height=' + screenHeight + ',top=' + 0 + ',left=' + 0
|
||||
)
|
||||
} else {
|
||||
message.error(
|
||||
"文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!"
|
||||
)
|
||||
message.error("文件格式不是 'doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx','pdf'!")
|
||||
}
|
||||
}
|
||||
function getLastSubstring(str: string): string {
|
||||
|
|
@ -233,17 +222,9 @@ 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"
|
||||
/>
|
||||
<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
|
||||
|
|
@ -277,28 +258,16 @@ async function getAuth() {
|
|||
>
|
||||
<tr class="text-20px leading-50px">
|
||||
<th width="20%">
|
||||
<img
|
||||
src="@/assets/images/baiot@2x.png"
|
||||
class="w35px mt--7px mr-5px"
|
||||
/>标题
|
||||
<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"
|
||||
/>上传科室
|
||||
<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"
|
||||
/>上传部门
|
||||
<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"
|
||||
/>上传日期
|
||||
<img src="@/assets/images/riqii@2x.png" class="w35px mt--7px mr-5px" />上传日期
|
||||
</th>
|
||||
<th width="20% text-center">操作</th>
|
||||
</tr>
|
||||
|
|
@ -327,24 +296,14 @@ async function getAuth() {
|
|||
<n-popover
|
||||
trigger="hover"
|
||||
placement="top-start"
|
||||
v-if="
|
||||
arr.includes(it.id) ||
|
||||
(it.fileCommon?.fileSize || 0) > 25 * 1024 * 1024
|
||||
"
|
||||
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
|
||||
>
|
||||
<el-button style="color: #000" @click="downloads(it)">查看</el-button>
|
||||
</template>
|
||||
<span
|
||||
>该文件超过25MB,无法进行预览,请点击 查看
|
||||
进行下载!</span
|
||||
>
|
||||
<span>该文件超过25MB,无法进行预览,请点击 查看 进行下载!</span>
|
||||
</n-popover>
|
||||
<el-button v-else style="color: #000" @click="downloads(it)"
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button v-else style="color: #000" @click="downloads(it)">查看</el-button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
@ -365,11 +324,7 @@ async function getAuth() {
|
|||
</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"
|
||||
<el-icon color="#fff" size="26px" @click="pdfShow = false" class="absolute left-92% bg-#F43"
|
||||
><Close
|
||||
/></el-icon>
|
||||
<Amtion :data="src" :datas="srcType" />
|
||||
|
|
|
|||
|
|
@ -23,12 +23,7 @@
|
|||
</div>
|
||||
<el-tab-pane v-if="userCode" label="分类管理" name="first">
|
||||
<div class="h-52px">
|
||||
<el-button
|
||||
v-if="userCode"
|
||||
type="primary"
|
||||
@click="editClickA('add')"
|
||||
class="mb-20px"
|
||||
>
|
||||
<el-button v-if="userCode" type="primary" @click="editClickA('add')" class="mb-20px">
|
||||
新增
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
@ -56,36 +51,20 @@
|
|||
<!-- <el-table-column prop="sort" label="排序" align="center"/> -->
|
||||
<el-table-column prop="address" label="操作" align="center">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="editClickA('edit', scope.row)"
|
||||
class="my-10px"
|
||||
>
|
||||
<el-button type="primary" @click="editClickA('edit', scope.row)" class="my-10px">
|
||||
编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
type="success"
|
||||
v-if="
|
||||
scope.row.level === 1 ||
|
||||
scope.row.level === 2 ||
|
||||
scope.row.level === 3
|
||||
"
|
||||
v-if="scope.row.level === 1 || scope.row.level === 2 || scope.row.level === 3"
|
||||
@click="editClickA('add', scope.row)"
|
||||
class="my-10px"
|
||||
>
|
||||
新增{{
|
||||
scope.row.level === 1
|
||||
? '二'
|
||||
: scope.row.level === 2
|
||||
? '三'
|
||||
: '四'
|
||||
scope.row.level === 1 ? '二' : scope.row.level === 2 ? '三' : '四'
|
||||
}}级</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
@click="deleteClickA(scope.row)"
|
||||
class="my-10px"
|
||||
>
|
||||
<el-button type="danger" @click="deleteClickA(scope.row)" class="my-10px">
|
||||
删除</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
@ -103,12 +82,7 @@
|
|||
>
|
||||
新增</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="userCode"
|
||||
type="primary"
|
||||
@click="getAll"
|
||||
class="mb-20px"
|
||||
>
|
||||
<el-button v-if="userCode" type="primary" @click="getAll" class="mb-20px">
|
||||
查看所有</el-button
|
||||
>
|
||||
<template v-if="false">
|
||||
|
|
@ -155,26 +129,14 @@
|
|||
hasChildren: 'hasChildren'
|
||||
}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cateName"
|
||||
label="所属分类"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
||||
<!-- <template #default="scope">
|
||||
<span v-if="scope.row.cateId==="></span>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="title"
|
||||
label="标题名称"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column prop="title" label="标题名称" show-overflow-tooltip />
|
||||
<!-- <el-table-column prop="deptName" label="排序" /> -->
|
||||
<el-table-column
|
||||
label="文件列表"
|
||||
prop="filePath"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="文件列表" prop="filePath" show-overflow-tooltip />
|
||||
<!-- <el-table-column label="排序" prop="sort" show-overflow-tooltip/> -->
|
||||
<el-table-column label="查看范围" prop="userIdList">
|
||||
<template #default="scope">
|
||||
|
|
@ -183,19 +145,12 @@
|
|||
<!-- <span class="descStyle" v-if="scope.row.userList" v-for="it in scope.row.userList"> {{it.nickName}}</span> -->
|
||||
<!-- <span>{{ scope.row.userList }}</span> -->
|
||||
<p v-if="scope.row.userList.length">
|
||||
<el-tooltip
|
||||
:content="handTooltip(scope.row.userList)"
|
||||
placement="top"
|
||||
>
|
||||
<el-tooltip :content="handTooltip(scope.row.userList)" placement="top">
|
||||
<div class="!h-50px descStyle">
|
||||
<div class="descStyle max-w-60vw !h-46px">
|
||||
<p
|
||||
v-for="(it, e) in scope.row.userList"
|
||||
:class="
|
||||
scope.row.userList.length < 2
|
||||
? '!leading-46px'
|
||||
: 'xx'
|
||||
"
|
||||
:class="scope.row.userList.length < 2 ? '!leading-46px' : 'xx'"
|
||||
>
|
||||
{{ it.nickName || undefined }}
|
||||
<span v-if="e == 1 && scope.row.userList.length > 2"
|
||||
|
|
@ -209,11 +164,7 @@
|
|||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="address" label="操作" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<div v-if="userCode || hasUpload || hasReview">
|
||||
<el-button
|
||||
|
|
@ -223,19 +174,12 @@
|
|||
>
|
||||
编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
@click="deleteClickB(scope.row)"
|
||||
class="w45px my-10px"
|
||||
>
|
||||
<el-button type="danger" @click="deleteClickB(scope.row)" class="w45px my-10px">
|
||||
删除</el-button
|
||||
>
|
||||
<div
|
||||
style="float: right; margin: 10px 0"
|
||||
v-if="
|
||||
scope.$index !== 0 &&
|
||||
scope.$index !== infoData.length - 1
|
||||
"
|
||||
v-if="scope.$index !== 0 && scope.$index !== infoData.length - 1"
|
||||
>
|
||||
<el-button
|
||||
style="color: #000; width: 45px; height: 33px"
|
||||
|
|
@ -256,9 +200,7 @@
|
|||
</el-table>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="float-right absolute bottom-0px right-30px z-2000 bg-#fff"
|
||||
>
|
||||
<div class="float-right absolute bottom-0px right-30px z-2000 bg-#fff">
|
||||
<el-pagination
|
||||
v-model:current-page="pageInfo.currentPage"
|
||||
v-model:page-size="pageInfo.pageSize"
|
||||
|
|
@ -271,11 +213,7 @@
|
|||
</el-tab-pane>
|
||||
<el-tab-pane label="权限管理" name="three" v-if="userCode">
|
||||
<div class="h-52px">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleAuthClick('add')"
|
||||
class="mb-20px"
|
||||
>
|
||||
<el-button type="primary" @click="handleAuthClick('add')" class="mb-20px">
|
||||
新增审批关系</el-button
|
||||
>
|
||||
</div>
|
||||
|
|
@ -298,27 +236,12 @@
|
|||
}"
|
||||
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
|
||||
>
|
||||
<el-table-column
|
||||
prop="cateName"
|
||||
label="所属分类"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column prop="cateName" label="所属分类" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="上传人员"
|
||||
prop="userIdList"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column label="上传人员" prop="userIdList" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<p
|
||||
v-if="scope.row.uploadList.length"
|
||||
class="truncate text-ellipsis"
|
||||
>
|
||||
{{
|
||||
scope.row.uploadList
|
||||
.map((item: any) => item.nickName)
|
||||
.join('、')
|
||||
}}
|
||||
<p v-if="scope.row.uploadList.length" class="truncate text-ellipsis">
|
||||
{{ scope.row.uploadList.map((item: any) => item.nickName).join('、') }}
|
||||
<el-tooltip
|
||||
v-if="false"
|
||||
:content="handTooltip(scope.row.uploadList)"
|
||||
|
|
@ -329,15 +252,10 @@
|
|||
<p
|
||||
v-for="(it, e) in scope.row.uploadList"
|
||||
:key="e"
|
||||
:class="
|
||||
scope.row.uploadList.length < 2
|
||||
? '!leading-46px'
|
||||
: 'xx'
|
||||
"
|
||||
:class="scope.row.uploadList.length < 2 ? '!leading-46px' : 'xx'"
|
||||
>
|
||||
{{ it.nickName || undefined }}
|
||||
<span
|
||||
v-if="e == 1 && scope.row.uploadList.length > 2"
|
||||
<span v-if="e == 1 && scope.row.uploadList.length > 2"
|
||||
>...共{{ scope.row.uploadList.length }}人</span
|
||||
>
|
||||
</p>
|
||||
|
|
@ -348,21 +266,10 @@
|
|||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="审批人员"
|
||||
prop="userIdList"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column label="审批人员" prop="userIdList" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<p
|
||||
v-if="scope.row.reviewList.length"
|
||||
class="truncate text-ellipsis"
|
||||
>
|
||||
{{
|
||||
scope.row.reviewList
|
||||
.map((item: any) => item.nickName)
|
||||
.join('、')
|
||||
}}
|
||||
<p v-if="scope.row.reviewList.length" class="truncate text-ellipsis">
|
||||
{{ scope.row.reviewList.map((item: any) => item.nickName).join('、') }}
|
||||
<el-tooltip
|
||||
v-if="false"
|
||||
:content="handTooltip(scope.row.reviewList)"
|
||||
|
|
@ -373,15 +280,10 @@
|
|||
<p
|
||||
v-for="(it, e) in scope.row.reviewList"
|
||||
:key="e"
|
||||
:class="
|
||||
scope.row.reviewList.length < 2
|
||||
? '!leading-46px'
|
||||
: 'xx'
|
||||
"
|
||||
:class="scope.row.reviewList.length < 2 ? '!leading-46px' : 'xx'"
|
||||
>
|
||||
{{ it.nickName || undefined }}
|
||||
<span
|
||||
v-if="e == 1 && scope.row.reviewList.length > 2"
|
||||
<span v-if="e == 1 && scope.row.reviewList.length > 2"
|
||||
>...共{{ scope.row.reviewList.length }}人</span
|
||||
>
|
||||
</p>
|
||||
|
|
@ -392,12 +294,7 @@
|
|||
<span v-else></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="操作"
|
||||
show-overflow-tooltip
|
||||
width="180px"
|
||||
>
|
||||
<el-table-column prop="address" label="操作" show-overflow-tooltip width="180px">
|
||||
<template #default="scope">
|
||||
<div>
|
||||
<el-button
|
||||
|
|
@ -412,13 +309,7 @@
|
|||
@confirm="handleAuthClick('del', scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
type="danger"
|
||||
@click=""
|
||||
class="w45px my-10px"
|
||||
>
|
||||
删除</el-button
|
||||
>
|
||||
<el-button type="danger" @click="" class="w45px my-10px"> 删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</div>
|
||||
|
|
@ -427,9 +318,7 @@
|
|||
</el-table>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="float-right absolute bottom-0px right-30px z-2000 bg-#fff"
|
||||
>
|
||||
<div class="float-right absolute bottom-0px right-30px z-2000 bg-#fff">
|
||||
<el-pagination
|
||||
v-model:current-page="pageInfo.currentPage"
|
||||
v-model:page-size="pageInfo.pageSize"
|
||||
|
|
@ -454,9 +343,7 @@
|
|||
</el-form-item>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<el-button type="primary" @click="addClickA(editA)" class="mb-20px">
|
||||
确认</el-button
|
||||
>
|
||||
<el-button type="primary" @click="addClickA(editA)" class="mb-20px"> 确认</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -507,9 +394,7 @@
|
|||
</el-form-item>
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<el-button type="primary" @click="addClickB(editB)" class="mb-20px">
|
||||
确认</el-button
|
||||
>
|
||||
<el-button type="primary" @click="addClickB(editB)" class="mb-20px"> 确认</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
|
@ -548,19 +433,13 @@
|
|||
<br />
|
||||
<br />
|
||||
<div class="text-center">
|
||||
<el-button type="primary" @click="handleSetAuth" class="mb-20px">
|
||||
确认</el-button
|
||||
>
|
||||
<el-button type="primary" @click="handleSetAuth" class="mb-20px"> 确认</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</NModal>
|
||||
<n-modal v-model:show="showModal" :z-index="99999">
|
||||
<UserList
|
||||
:userDataList="setUserList"
|
||||
@clickChild="handleChild"
|
||||
@CloseThis="CloseThiss"
|
||||
/>
|
||||
<UserList :userDataList="setUserList" @clickChild="handleChild" @CloseThis="CloseThiss" />
|
||||
</n-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -592,7 +471,7 @@ const database = databaseld()
|
|||
const store: any = useUserStore()
|
||||
const message = useMessage()
|
||||
const userCode = computed(() =>
|
||||
['admin', 'database_dandang', 'tech_service'].includes(store.user.roleCode)
|
||||
['admin', 'database_dandang', 'tech_service'].some((item) => store.user.roleCode?.includes(item))
|
||||
)
|
||||
// 'tech_service'
|
||||
const isDbReview = store.user?.isDbReview === 1
|
||||
|
|
@ -878,10 +757,7 @@ const handleChange = (e: string | any[]) => {
|
|||
}
|
||||
// console.log(e,editB.value.cateId,99999)
|
||||
}
|
||||
const handOnExceed: UploadProps['onExceed'] = (
|
||||
uploadFile: any,
|
||||
uploadFiles: any
|
||||
) => {
|
||||
const handOnExceed: UploadProps['onExceed'] = (uploadFile: any, uploadFiles: any) => {
|
||||
message.warning('最多只能上传一个文件!')
|
||||
}
|
||||
|
||||
|
|
@ -895,12 +771,7 @@ const flg = ref()
|
|||
const setUserList = ref()
|
||||
const dbAuthType = ref()
|
||||
const selSetAuthKey = ref('')
|
||||
async function getUser(row: {
|
||||
id?: any
|
||||
userList?: any
|
||||
type?: number
|
||||
key?: string
|
||||
}) {
|
||||
async function getUser(row: { id?: any; userList?: any; type?: number; key?: string }) {
|
||||
showModal.value = !showModal.value
|
||||
flg.value = row
|
||||
if (showAuthModal.value) {
|
||||
|
|
|
|||
|
|
@ -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,65 +2,71 @@
|
|||
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,
|
||||
})
|
||||
cateId: route.params.id !== ':id' ? route.params.id : starId.value
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
const { data } = await getLabActList()
|
||||
actMidIsSelects.value = data.actMidIsSelect
|
||||
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),
|
||||
watch(
|
||||
() => unref(ss),
|
||||
async (v) => {
|
||||
getItemList()
|
||||
},
|
||||
{ immediate: true, deep: true },
|
||||
)
|
||||
{ immediate: true, deep: true }
|
||||
)
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
state.cateId = 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){
|
||||
filePath = fileList
|
||||
.map((file) => {
|
||||
if (file.response) {
|
||||
return file.response.url
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
return file.url
|
||||
}
|
||||
}).join(',')
|
||||
})
|
||||
.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) }
|
||||
if (code === 200) {
|
||||
message.success('添加成功!')
|
||||
} else {
|
||||
message.error(msg)
|
||||
}
|
||||
|
||||
window.location.reload();
|
||||
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
|
||||
}))
|
||||
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("没有访问权限")
|
||||
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">
|
||||
|
|
@ -176,7 +185,12 @@ async function downloadFile(data) {
|
|||
</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">
|
||||
<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">
|
||||
<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-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,12 +260,12 @@ 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;
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
@ -83,7 +79,7 @@ const clickTo = (data: any) => {
|
|||
store.article.noticeld = noticeId
|
||||
if (
|
||||
[1, 2].includes(reviewStatus) &&
|
||||
['review_person', 'zhuxi', 'tech_service'].includes(store2.user.roleCode)
|
||||
['review_person', 'zhuxi', 'tech_service'].some((item) => store2.user.roleCode?.includes(item))
|
||||
) {
|
||||
push(`/Home/Process/ProcessInfo/${id}`)
|
||||
} else {
|
||||
|
|
@ -208,9 +204,7 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
|||
<div class="text-18px ml40px mr25px">{{ day }}</div>
|
||||
<div class="text-18px">{{ week }}</div>
|
||||
</div>
|
||||
<div
|
||||
class="q-wrapper flex-1 mt30px text-#142142 flex flex-col bg-#fff p30px"
|
||||
>
|
||||
<div class="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">
|
||||
|
|
@ -221,8 +215,8 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
|||
<el-tab-pane
|
||||
name="3"
|
||||
v-if="
|
||||
['review_person', 'zhuxi', 'tech_service'].includes(
|
||||
store2.user.roleCode
|
||||
['review_person', 'zhuxi', 'tech_service'].some((item) =>
|
||||
store2.user.roleCode?.includes(item)
|
||||
)
|
||||
"
|
||||
>
|
||||
|
|
@ -348,28 +342,20 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
|||
<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"
|
||||
|
|
@ -377,7 +363,7 @@ let tabs = store2.user.isReview > 0 ? tabsList2.value : tabsList.value
|
|||
>
|
||||
<span
|
||||
v-if="
|
||||
['publish', 'tech_service'].includes(store2.user.roleCode) &&
|
||||
['publish', 'tech_service'].some((item) => store2.user.roleCode?.includes(item)) &&
|
||||
Status.reviewStatus === 1
|
||||
"
|
||||
class="absolute right-10px top-18px"
|
||||
|
|
|
|||
|
|
@ -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