404 lines
12 KiB
Plaintext
404 lines
12 KiB
Plaintext
<!-- 情报新增待审批 -->
|
|
<script setup lang="ts">
|
|
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 { noticeld } from "@/stores/modules/noticeId";
|
|
import { getImg } from "../images";
|
|
import {NTag } from "naive-ui";
|
|
const store = noticeld();
|
|
const store2 = useUserStore();
|
|
const { day, week } = useDate();
|
|
const { push } = useRouter();
|
|
const route = useRoute();
|
|
// const toDetail2 =()=>{
|
|
// 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" },
|
|
];
|
|
const listData = ref<any>({});
|
|
const Status = reactive({
|
|
reviewStatus: 1,
|
|
reviewSource: 2,
|
|
});
|
|
const pageInfo = reactive({
|
|
pageNum: 1,
|
|
pageSize: 13,
|
|
total: 10,
|
|
});
|
|
const handleSizeChange = (e) => {
|
|
console.log(e);
|
|
};
|
|
const handleCurrentChange = (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 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)
|
|
};
|
|
// 撤回按钮
|
|
const clickCancel = (data: any) => {
|
|
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;
|
|
};
|
|
// 二级
|
|
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)
|
|
};
|
|
const showDetail = (row: any) => {
|
|
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 }
|
|
);
|
|
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,
|
|
// },
|
|
]);
|
|
// 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,
|
|
// },
|
|
]);
|
|
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>
|
|
|
|
<!-- 驳回分页 -->
|
|
<!-- <div
|
|
class="bg-#fff rd-15px px30px pt30px w-full h100%"
|
|
>
|
|
<div
|
|
class="rd-15px w-full h100%"
|
|
style="box-shadow: 1px 2px 26px -3px #cdcccc"
|
|
>
|
|
<div class="p30px relative h100%">
|
|
<table
|
|
class="history w-full text-center text-16px border-spacing-0"
|
|
>
|
|
<thead
|
|
style="
|
|
background-color: #e7edff;
|
|
color: #0a0a0a;
|
|
height: 50px;
|
|
width: 220px;
|
|
border: 1px solid #417bef;
|
|
"
|
|
>
|
|
<tr class="text-20px leading-50px">
|
|
<th>标题</th>
|
|
<th>文本内容</th>
|
|
<th>提交时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="(it, index) in listData" :key="index">
|
|
<td>
|
|
<span >
|
|
{{ it.title }}</span
|
|
>
|
|
</td>
|
|
|
|
<td class="h50px">
|
|
<span> {{ it.reviewStatusTxt }}</span>
|
|
</td>
|
|
<td class="h50px">
|
|
<el-button size="small" @click="clickTo2(it)">详情</el-button>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="float-right absolute bottom-20px right-30px">
|
|
<el-pagination
|
|
v-model:current-page="pageInfo.pageNum"
|
|
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
|
|
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>
|
|
</template>
|
|
|
|
<style scoped lang="less">
|
|
.top {
|
|
position: absolute;
|
|
right: 30px;
|
|
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;
|
|
}
|
|
</style>
|