Commit 0ec85660 authored by chenqikuai's avatar chenqikuai

fix

parent 0fac46a9
...@@ -68,6 +68,14 @@ export function getFiles(query: any) { ...@@ -68,6 +68,14 @@ export function getFiles(query: any) {
}); });
} }
export function copyrightMerge(data: { fileName: string; file_hash: string }) {
return $ajax({
url: "/api/copyright/chunk/merge",
type: "post",
params: data,
});
}
interface iFileChunkPayload { interface iFileChunkPayload {
current_data: string; //当前块数据 current_data: string; //当前块数据
current_seq: number; // 当前块序号 current_seq: number; // 当前块序号
...@@ -109,6 +117,7 @@ export function handleBigFileUpload( ...@@ -109,6 +117,7 @@ export function handleBigFileUpload(
) { ) {
return new Promise<{ return new Promise<{
unzip: (category_id: number) => Promise<any>; unzip: (category_id: number) => Promise<any>;
copyrightMerge: () => Promise<any>;
uploadAllFileChunks: Promise<boolean>; uploadAllFileChunks: Promise<boolean>;
cancelUpload?: () => void; cancelUpload?: () => void;
}>(async (rootResolve, rootReject) => { }>(async (rootResolve, rootReject) => {
...@@ -138,6 +147,12 @@ export function handleBigFileUpload( ...@@ -138,6 +147,12 @@ export function handleBigFileUpload(
file_name: file_info.name, file_name: file_info.name,
}), }),
uploadAllFileChunks: Promise.resolve(true), uploadAllFileChunks: Promise.resolve(true),
copyrightMerge: () => {
return copyrightMerge({
file_hash: res.data.file_hash,
fileName: file_info.name,
});
},
}); });
return; return;
} }
...@@ -232,6 +247,12 @@ export function handleBigFileUpload( ...@@ -232,6 +247,12 @@ export function handleBigFileUpload(
isCancel = true; isCancel = true;
cancelTokenList.forEach((cancel) => cancel()); cancelTokenList.forEach((cancel) => cancel());
}, },
copyrightMerge: () => {
return copyrightMerge({
file_hash: res.data.file_hash,
fileName: file_info.name,
});
},
}); });
}); });
}); });
......
...@@ -63,6 +63,7 @@ import { ref, watch } from "vue"; ...@@ -63,6 +63,7 @@ import { ref, watch } from "vue";
import Icon from "@/components/Icon/index.vue"; import Icon from "@/components/Icon/index.vue";
import { copyrightUploadFile } from "@/service/copyrightService"; import { copyrightUploadFile } from "@/service/copyrightService";
import { saveAs } from "file-saver"; import { saveAs } from "file-saver";
import { handleBigFileUpload } from "@/service/Upload";
const props = defineProps<{ const props = defineProps<{
modelValue?: UploadFile; modelValue?: UploadFile;
...@@ -103,16 +104,17 @@ const handleChange = async (e: Event) => { ...@@ -103,16 +104,17 @@ const handleChange = async (e: Event) => {
loading.value = false; loading.value = false;
return; return;
} }
const res = await copyrightUploadFile(file!); const res = await handleBigFileUpload(file!);
fileName = file?.name!; res.copyrightMerge().then(() => {});
name.value = file?.name!; // fileName = file?.name!;
if (res && res.code === 200) { // name.value = file?.name!;
emit("update:modelValue", { // if (res && res.code === 200) {
...res.data, // emit("update:modelValue", {
}); // ...res.data,
} // });
loading.value = false; // }
formItem?.validate("change"); // loading.value = false;
// formItem?.validate("change");
}; };
</script> </script>
......
<template> <template>
<div class="h-full albumTable"> <div class="h-full albumTable relative">
<div
class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
v-if="tableData.length === 0"
>
<img src="@/assets/img/collectListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
藏品列表暂无内容
</div>
</div>
<Table <Table
:columns="columns" :columns="columns"
:data="tableData" :data="tableData"
...@@ -7,14 +16,7 @@ ...@@ -7,14 +16,7 @@
height="100%" height="100%"
:loading="loading" :loading="loading"
> >
<template #empty> <template #empty> &nbsp; </template>
<img
src="@/assets/img/collectListEmpty.svg"
class="mx-auto mt-28"
alt=""
srcset=""
/>
</template>
<template #name="props"> <template #name="props">
<div <div
class="cursor-pointer" class="cursor-pointer"
......
<template> <template>
<div class="h-full copyrightTable"> <div class="h-full copyrightTable relative">
<div
class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
v-if="tableData.length === 0"
>
<img src="@/assets/img/collectListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
藏品列表暂无内容
</div>
</div>
<Table <Table
:columns="columns" :columns="columns"
:data="tableData" :data="tableData"
...@@ -7,14 +16,7 @@ ...@@ -7,14 +16,7 @@
height="100%" height="100%"
:loading="loading" :loading="loading"
> >
<template #empty> <template #empty> &nbsp; </template>
<img
src="@/assets/img/collectListEmpty.svg"
class="mx-auto mt-28"
alt=""
srcset=""
/>
</template>
<template #name="props"> <template #name="props">
<div <div
class="cursor-pointer overflow-hidden overflow-ellipsis" class="cursor-pointer overflow-hidden overflow-ellipsis"
......
<template> <template>
<Table <div class="relative h-full">
class="filingPersonTable" <div
ref="tableRef" class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
:columns="tableColumns" v-if="data.length === 0"
height="100%" >
:data="data" <img src="@/assets/img/filingPersonListEmpty.svg" class="mx-auto" />
v-loading="loading" <div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
element-loading-text="加载中..." 备案人列表暂无内容
>
<template #empty>
<img
src="@/assets/img/filingPersonListEmpty.svg"
class="mx-auto mt-28"
alt=""
srcset=""
/>
</template>
<template #authentication_name="slotProps">
<div
class="cursor-pointer overflow-hidden text-ellipsis"
@click="
$router.push({
name: 'filingPersonDetail',
query: {
id: slotProps.id,
},
})
"
>
{{ slotProps.authentication_name }}
</div> </div>
</template> </div>
<template #currentStatusCell="slotProps"> <Table
<div class="flex items-center"> class="filingPersonTable"
<ApproveStatus ref="tableRef"
:type="slotProps.authentication_status" :columns="tableColumns"
mode="filingPerson" height="100%"
></ApproveStatus> :data="data"
</div> v-loading="loading"
</template> element-loading-text="加载中..."
<template #currentStatusHeader> >
<div class="flex items-center"> <template #empty> &nbsp; </template>
<syMoreOperate <template #authentication_name="slotProps">
:teleport="true" <div
:list="operateListOfFilterStatus" class="cursor-pointer overflow-hidden text-ellipsis"
@click-item="(value) => handleClickCurrentStatusTableHeader(value)"
class="flex items-center"
>
当前状态
<Icon
icon-name="iconlujingbeifen1"
class="cursor-pointer ml-1"
></Icon>
</syMoreOperate>
</div>
</template>
<template #additional="slotProps">
<div class="flex items-center">
{{
slotProps.authentication_subject_nature === 2
? "营业执照"
: "居民身份证"
}}
<img
v-if="
(slotProps.authentication_subject_nature === 2 &&
slotProps?.authentication_business_license?.url) ||
slotProps.authentication_subject_nature === 1
"
src="@/assets/img/link.png"
style="width: 14px"
@click=" @click="
async () => { $router.push({
if (slotProps.authentication_subject_nature === 1) { name: 'filingPersonDetail',
saveAs(slotProps.authentication_held_front_id_card.url); query: {
await sleep(1000); id: slotProps.id,
saveAs(slotProps.authentication_held_back_id_card.url); },
} else { })
saveAs(slotProps.authentication_business_license.url);
}
}
" "
class="ml-2.5 cursor-pointer"
/>
</div>
</template>
<template #operate="slotProps">
<div class="text-right">
<syMoreOperate
:teleport="true"
:list="getOperateList(slotProps)"
@click-item="(value) => handleClickItem(value, slotProps)"
:margin-left="-65"
class="align-middle"
> >
<Icon {{ slotProps.authentication_name }}
icon-name="iconbianzu7-copy" </div>
style="font-size: 26px" </template>
class="cursor-pointer" <template #currentStatusCell="slotProps">
></Icon> <div class="flex items-center">
</syMoreOperate> <ApproveStatus
</div> :type="slotProps.authentication_status"
</template> mode="filingPerson"
</Table> ></ApproveStatus>
</div>
</template>
<template #currentStatusHeader>
<div class="flex items-center">
<syMoreOperate
:teleport="true"
:list="operateListOfFilterStatus"
@click-item="(value) => handleClickCurrentStatusTableHeader(value)"
class="flex items-center"
>
当前状态
<Icon
icon-name="iconlujingbeifen1"
class="cursor-pointer ml-1"
></Icon>
</syMoreOperate>
</div>
</template>
<template #additional="slotProps">
<div class="flex items-center">
{{
slotProps.authentication_subject_nature === 2
? "营业执照"
: "居民身份证"
}}
<img
v-if="
(slotProps.authentication_subject_nature === 2 &&
slotProps?.authentication_business_license?.url) ||
slotProps.authentication_subject_nature === 1
"
src="@/assets/img/link.png"
style="width: 14px"
@click="
async () => {
if (slotProps.authentication_subject_nature === 1) {
saveAs(slotProps.authentication_held_front_id_card.url);
await sleep(1000);
saveAs(slotProps.authentication_held_back_id_card.url);
} else {
saveAs(slotProps.authentication_business_license.url);
}
}
"
class="ml-2.5 cursor-pointer"
/>
</div>
</template>
<template #operate="slotProps">
<div class="text-right">
<syMoreOperate
:teleport="true"
:list="getOperateList(slotProps)"
@click-item="(value) => handleClickItem(value, slotProps)"
:margin-left="-65"
class="align-middle"
>
<Icon
icon-name="iconbianzu7-copy"
style="font-size: 26px"
class="cursor-pointer"
></Icon>
</syMoreOperate>
</div>
</template>
</Table>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
......
<template> <template>
<div class="recycleBinTable h-full"> <div class="recycleBinTable h-full relative">
<div
class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
v-if="data.length === 0"
>
<img src="@/assets/img/recycleListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
回收站暂无内容
</div>
</div>
<Table <Table
ref="tableRef" ref="tableRef"
:columns="columns" :columns="columns"
...@@ -7,14 +16,7 @@ ...@@ -7,14 +16,7 @@
height="100%" height="100%"
:loading="loading" :loading="loading"
> >
<template #empty> <template #empty> &nbsp; </template>
<img
src="@/assets/img/recycleListEmpty.svg"
class="mt-28 mx-auto"
alt=""
srcset=""
/>
</template>
<template #update_time="slotProps"> <template #update_time="slotProps">
{{ getRelativeTime(slotProps.update_time) }} {{ getRelativeTime(slotProps.update_time) }}
</template> </template>
......
...@@ -81,13 +81,15 @@ ...@@ -81,13 +81,15 @@
></CategoryList> ></CategoryList>
</HorizontalListWrapper> </HorizontalListWrapper>
<syScrollBar class="flex-grow" style="margin-top: 28px"> <syScrollBar class="flex-grow" style="margin-top: 28px">
<img <div
src="@/assets/img/templateListEmpty.svg" class="absolute z-10 left-1/2 -translate-x-1/2 top-1/4 text-center"
class="mx-auto mt-28"
v-if="templateList.length === 0 && focusedMenu === 'private'" v-if="templateList.length === 0 && focusedMenu === 'private'"
alt="" >
srcset="" <img src="@/assets/img/templateListEmpty.svg" class="mx-auto" />
/> <div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
模板列表暂无内容
</div>
</div>
<TemplateList <TemplateList
v-if="focusedMenu === 'private'" v-if="focusedMenu === 'private'"
:list="templateList" :list="templateList"
......
<template> <template>
<div class="proofTable h-full"> <div class="proofTable relative h-full">
<div
class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
v-if="data.length === 0"
>
<img src="@/assets/img/traceListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
溯源列表暂无内容
</div>
</div>
<Table <Table
ref="tableRef" ref="tableRef"
:columns="columns" :columns="columns"
...@@ -8,12 +17,7 @@ ...@@ -8,12 +17,7 @@
v-loading="loading" v-loading="loading"
element-loading-text="加载中..." element-loading-text="加载中..."
> >
<template #empty> <template #empty>&nbsp;</template>
<img
src="@/assets/img/traceListEmpty.svg"
class="mx-auto mt-28"
/>
</template>
<template #name="slotProps"> <template #name="slotProps">
<div <div
class="whitespace-nowrap overflow-hidden text-ellipsis cursor-pointer flex items-center" class="whitespace-nowrap overflow-hidden text-ellipsis cursor-pointer flex items-center"
......
<template> <template>
<Table <div class="h-full relative">
ref="tableRef" <div
:columns="tableColumns" class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
:data="data" v-if="data.length === 0"
v-loading="loading" >
class="copyrightTable" <img src="@/assets/img/copyrightListEmpty.svg" class="mx-auto" />
element-loading-text="加载中..." <div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
> 版权列表暂无内容
<template #empty>
<img
src="@/assets/img/copyrightListEmpty.svg"
class="mt-28 mx-auto"
alt=""
srcset=""
/>
</template>
<template #record_work_name="slotProps">
<div
class="cursor-pointer overflow-hidden text-ellipsis"
@click="
$router.push({
name: `copyRightDetail`,
query: {
id: slotProps.id,
},
})
"
>
{{ slotProps.record_work_name }}
</div> </div>
</template> </div>
<template #currentStatusCell="slotProps"> <Table
<div class="flex items-center"> ref="tableRef"
<ApproveStatus :columns="tableColumns"
class="flex-shrink-0" :data="data"
:type="slotProps.record_work_status" v-loading="loading"
></ApproveStatus> height="100%"
<HoverShowReason class="copyrightTable"
class="ml-2" element-loading-text="加载中..."
v-if="slotProps.record_work_status === eStatusOfCopyright.NOT_PASSED" >
:rowData="slotProps" <template #empty> &nbsp; </template>
></HoverShowReason> <template #record_work_name="slotProps">
</div> <div
</template> class="cursor-pointer overflow-hidden text-ellipsis"
<template #currentStatusHeader> @click="
<div class="flex items-center"> $router.push({
<syMoreOperate name: `copyRightDetail`,
:teleport="true" query: {
:list="operateListOfStatus" id: slotProps.id,
@click-item="(value) => handleClickCurrentStatusTableHeader(value)" },
class="flex items-center" })
> "
当前状态
<Icon1
v-if="showStateFilterIcon"
icon-name="iconlujingbeifen1"
class="cursor-pointer ml-1"
></Icon1>
</syMoreOperate></div
></template>
<template #record_work_type="slotProps">
{{ (workTypeMapping as any)[slotProps.record_work_type] }}
</template>
<template #create_time="slotProps">
{{ formatTime(slotProps.create_time) }}
</template>
<template #operate="slotProps">
<div class="text-right">
<syMoreOperate
:teleport="true"
:list="getOperateList(slotProps)"
@click-item="(value) => handleClickItem(value, slotProps)"
:margin-left="-65"
class="align-middle"
> >
<Icon1 {{ slotProps.record_work_name }}
icon-name="iconbianzu7-copy" </div>
style="font-size: 26px" </template>
class="cursor-pointer" <template #currentStatusCell="slotProps">
></Icon1> <div class="flex items-center">
</syMoreOperate> <ApproveStatus
</div> class="flex-shrink-0"
</template> :type="slotProps.record_work_status"
</Table> ></ApproveStatus>
<HoverShowReason
class="ml-2"
v-if="
slotProps.record_work_status === eStatusOfCopyright.NOT_PASSED
"
:rowData="slotProps"
></HoverShowReason>
</div>
</template>
<template #currentStatusHeader>
<div class="flex items-center">
<syMoreOperate
:teleport="true"
:list="operateListOfStatus"
@click-item="(value) => handleClickCurrentStatusTableHeader(value)"
class="flex items-center"
>
当前状态
<Icon1
v-if="showStateFilterIcon"
icon-name="iconlujingbeifen1"
class="cursor-pointer ml-1"
></Icon1>
</syMoreOperate></div
></template>
<template #record_work_type="slotProps">
{{ (workTypeMapping as any)[slotProps.record_work_type] }}
</template>
<template #create_time="slotProps">
{{ formatTime(slotProps.create_time) }}
</template>
<template #operate="slotProps">
<div class="text-right">
<syMoreOperate
:teleport="true"
:list="getOperateList(slotProps)"
@click-item="(value) => handleClickItem(value, slotProps)"
:margin-left="-65"
class="align-middle"
>
<Icon1
icon-name="iconbianzu7-copy"
style="font-size: 26px"
class="cursor-pointer"
></Icon1>
</syMoreOperate>
</div>
</template>
</Table>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
......
<template> <template>
<Table <div class="h-full relative">
ref="tableRef" <div
:columns="tableColumns" class="absolute z-10 left-1/2 -translate-x-1/2 top-1/3 text-center"
:data="data" v-if="data.length === 0"
v-loading="loading" >
height="100%" <img src="@/assets/img/copyrightListEmpty.svg" class="mx-auto" />
element-loading-text="加载中..." <div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
class="draftBoxTable" 草稿箱暂无内容
>
<template #empty>
<img
src="@/assets/img/collectListEmpty.svg"
class="mx-auto mt-28"
alt=""
srcset=""
/>
</template>
<template #record_work_name="slotProps">
<div
class="cursor-pointer"
@click="
$router.push({
name: 'addCopyRight',
query: {
id: slotProps.id,
},
})
"
>
{{ slotProps.record_work_name }}
</div> </div>
</template> </div>
<template #record_work_type="slotProps"> <Table
{{ (workTypeMapping as any)[slotProps.record_work_type] }}</template ref="tableRef"
:columns="tableColumns"
:data="data"
v-loading="loading"
height="100%"
element-loading-text="加载中..."
class="draftBoxTable"
> >
<template #create_time="slotProps"> <template #empty> &nbsp; </template>
{{ formatTime(slotProps.create_time) }} <template #record_work_name="slotProps">
</template> <div
<template #operate="slotProps">
<syMoreOperate
:teleport="true"
:list="operateList"
@click-item="(value) => handleClickItem(value, slotProps)"
:margin-left="-50"
>
<Icon
icon-name="iconbianzu7-copy"
style="font-size: 26px"
class="cursor-pointer" class="cursor-pointer"
></Icon> @click="
</syMoreOperate> $router.push({
</template> name: 'addCopyRight',
</Table> query: {
id: slotProps.id,
},
})
"
>
{{ slotProps.record_work_name }}
</div>
</template>
<template #record_work_type="slotProps">
{{ (workTypeMapping as any)[slotProps.record_work_type] }}</template
>
<template #create_time="slotProps">
{{ formatTime(slotProps.create_time) }}
</template>
<template #operate="slotProps">
<syMoreOperate
:teleport="true"
:list="operateList"
@click-item="(value) => handleClickItem(value, slotProps)"
:margin-left="-50"
>
<Icon
icon-name="iconbianzu7-copy"
style="font-size: 26px"
class="cursor-pointer"
></Icon>
</syMoreOperate>
</template>
</Table>
</div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
......
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