Commit 48f10a07 authored by chenqikuai's avatar chenqikuai

版权管理页面更新

parent 7beb61c7
<template> <template>
<div :style="status?.style" class="approveStatus"> <div
<img v-if="status?.icon" :src="status?.icon" alt="" srcset="" /> :style="status?.style"
class="approveStatus flex items-center whitespace-nowrap"
>
<img
v-if="status?.icon"
:src="status?.icon"
alt=""
style="width: 16px"
class="mr-2"
srcset=""
/>
{{ status?.label }} {{ status?.label }}
</div> </div>
</template> </template>
......
...@@ -8,24 +8,26 @@ ...@@ -8,24 +8,26 @@
> >
<template #currentStatusCell="slotProps"> <template #currentStatusCell="slotProps">
<div class="flex items-center"> <div class="flex items-center">
<ApproveStatus :type="eStatus.RECORD_SUCCESS"></ApproveStatus> <ApproveStatus :type="slotProps.status"></ApproveStatus>
<HoverShowReason :rowData="slotProps"></HoverShowReason> <HoverShowReason
v-if="slotProps.status === eStatus.NOT_PASSED"
:rowData="slotProps"
></HoverShowReason>
</div> </div>
</template> </template>
<template #currentStatusHeader> <template #currentStatusHeader>
<div class="flex items-center"> <div class="flex items-center">
当前状态
<syMoreOperate <syMoreOperate
:teleport="true" :teleport="true"
:list="operateListOfStatus" :list="operateListOfStatus"
@click-item="(value) => handleClickCurrentStatusTableHeader(value)" @click-item="(value) => handleClickCurrentStatusTableHeader(value)"
:margin-left="-10" class="flex items-center"
> >
当前状态
<Icon1 <Icon1
v-if="showStateFilterIcon" v-if="showStateFilterIcon"
icon-name="iconlujingbeifen1" icon-name="iconlujingbeifen1"
class="cursor-pointer ml-1" class="cursor-pointer ml-1"
@click="handleClickCurrentStatusTableHeader"
></Icon1> ></Icon1>
</syMoreOperate></div </syMoreOperate></div
></template> ></template>
......
<template> <template>
<HoverMe class="ml-2" :margin-top="20" :margin-left="-154" @over="over"> <HoverMe
class="ml-2 cursor-pointer"
:margin-top="20"
:margin-left="-154"
@over="over"
>
<template #default> <template #default>
<Icon icon-name="iconshenpiweitongguo-chakanyuanyin"></Icon> <Icon icon-name="iconshenpiweitongguo-chakanyuanyin"></Icon>
</template> </template>
......
...@@ -15,6 +15,15 @@ ...@@ -15,6 +15,15 @@
style="width: 113px" style="width: 113px"
mode="elementBtn" mode="elementBtn"
size="large" size="large"
@click="() => {}"
type="default"
>
备案人管理</syButton
>
<syButton
style="width: 113px"
mode="elementBtn"
size="large"
@click=" @click="
() => { () => {
$router.push('/draftBox'); $router.push('/draftBox');
...@@ -42,11 +51,12 @@ ...@@ -42,11 +51,12 @@
<div class="flex-grow overflow-hidden mt-4"> <div class="flex-grow overflow-hidden mt-4">
<CopyrightTable <CopyrightTable
v-show="activedMenu === eTableTab.going" v-show="activedMenu === eTableTab.going"
:data="tableDataForGoing" :data="tableData"
:loading="loadingForGoing" :loading="loading"
:show-state-filter-icon="true" :show-state-filter-icon="true"
height="100%" height="100%"
@scrollToEnd="fetchNextPageForGoing" @scrollToEnd="fetchNextPage"
@clickStatusFilter="handleClickStatusFilter"
> >
</CopyrightTable> </CopyrightTable>
</div> </div>
...@@ -66,14 +76,14 @@ import { eStatus } from "@/components/ApproveStatus/status"; ...@@ -66,14 +76,14 @@ import { eStatus } from "@/components/ApproveStatus/status";
import CopyrightTable from "./CopyrightTable.vue"; import CopyrightTable from "./CopyrightTable.vue";
import { eTableTab } from "./types"; import { eTableTab } from "./types";
import { useTableData } from "@/components/Table/hooks"; import { useTableData } from "@/components/Table/hooks";
import { debounce, throttle } from "lodash"; import { debounce } from "lodash";
import CopyRightNotify from "@/components/Dialogs/CopyRightNotify/index.vue"; import CopyRightNotify from "@/components/Dialogs/CopyRightNotify/index.vue";
const copyRightNotifyVisible = ref(false); const copyRightNotifyVisible = ref(false);
const searchValue = ref(""); const searchValue = ref("");
const activedMenu = ref(eTableTab.going); const activedMenu = ref(eTableTab.going);
const currentStatusForGoing = ref(eStatus.NOT_PASSED); // 进行中的表格的状态 const currentStatusForGoing = ref(eStatus.ALL); // 进行中的表格的状态
const fetchTableData = ({ const fetchTableData = ({
page, page,
...@@ -98,7 +108,10 @@ const fetchTableData = ({ ...@@ -98,7 +108,10 @@ const fetchTableData = ({
.split("") .split("")
.map((i, index) => ({ .map((i, index) => ({
name: index + (page - 1) * page_size + currentStatus, name: index + (page - 1) * page_size + currentStatus,
status: eStatus.RECORD_SUCCESS, status:
currentStatus === eStatus.ALL
? eStatus.RECORD_SUCCESS
: currentStatus,
address: searchValue.value, address: searchValue.value,
})), })),
}); });
...@@ -117,18 +130,23 @@ const generateFetchTableData = (getCurrentStatus: () => eStatus) => { ...@@ -117,18 +130,23 @@ const generateFetchTableData = (getCurrentStatus: () => eStatus) => {
}; };
const { const {
fetchNextPage: fetchNextPageForGoing, fetchNextPage: fetchNextPage,
tableData: tableDataForGoing, tableData: tableData,
refetch: refetchForGoing, refetch: refetch,
loading: loadingForGoing, loading: loading,
} = useTableData({ } = useTableData({
fetchData: generateFetchTableData(() => currentStatusForGoing.value), fetchData: generateFetchTableData(() => currentStatusForGoing.value),
}); });
const refetchDebounce = debounce(() => { const refetchDebounce = debounce(() => {
refetchForGoing(); refetch();
}, 500); }, 500);
const handleClickStatusFilter = (status: eStatus) => {
currentStatusForGoing.value = status;
refetch();
};
watch(searchValue, () => { watch(searchValue, () => {
refetchDebounce(); refetchDebounce();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment