Commit 48f10a07 authored by chenqikuai's avatar chenqikuai

版权管理页面更新

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