Commit 0ec85660 authored by chenqikuai's avatar chenqikuai

fix

parent 0fac46a9
......@@ -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 {
current_data: string; //当前块数据
current_seq: number; // 当前块序号
......@@ -109,6 +117,7 @@ export function handleBigFileUpload(
) {
return new Promise<{
unzip: (category_id: number) => Promise<any>;
copyrightMerge: () => Promise<any>;
uploadAllFileChunks: Promise<boolean>;
cancelUpload?: () => void;
}>(async (rootResolve, rootReject) => {
......@@ -138,6 +147,12 @@ export function handleBigFileUpload(
file_name: file_info.name,
}),
uploadAllFileChunks: Promise.resolve(true),
copyrightMerge: () => {
return copyrightMerge({
file_hash: res.data.file_hash,
fileName: file_info.name,
});
},
});
return;
}
......@@ -232,6 +247,12 @@ export function handleBigFileUpload(
isCancel = true;
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";
import Icon from "@/components/Icon/index.vue";
import { copyrightUploadFile } from "@/service/copyrightService";
import { saveAs } from "file-saver";
import { handleBigFileUpload } from "@/service/Upload";
const props = defineProps<{
modelValue?: UploadFile;
......@@ -103,16 +104,17 @@ const handleChange = async (e: Event) => {
loading.value = false;
return;
}
const res = await copyrightUploadFile(file!);
fileName = file?.name!;
name.value = file?.name!;
if (res && res.code === 200) {
emit("update:modelValue", {
...res.data,
});
}
loading.value = false;
formItem?.validate("change");
const res = await handleBigFileUpload(file!);
res.copyrightMerge().then(() => {});
// fileName = file?.name!;
// name.value = file?.name!;
// if (res && res.code === 200) {
// emit("update:modelValue", {
// ...res.data,
// });
// }
// loading.value = false;
// formItem?.validate("change");
};
</script>
......
<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
:columns="columns"
:data="tableData"
......@@ -7,14 +16,7 @@
height="100%"
:loading="loading"
>
<template #empty>
<img
src="@/assets/img/collectListEmpty.svg"
class="mx-auto mt-28"
alt=""
srcset=""
/>
</template>
<template #empty> &nbsp; </template>
<template #name="props">
<div
class="cursor-pointer"
......
<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
:columns="columns"
:data="tableData"
......@@ -7,14 +16,7 @@
height="100%"
:loading="loading"
>
<template #empty>
<img
src="@/assets/img/collectListEmpty.svg"
class="mx-auto mt-28"
alt=""
srcset=""
/>
</template>
<template #empty> &nbsp; </template>
<template #name="props">
<div
class="cursor-pointer overflow-hidden overflow-ellipsis"
......
<template>
<Table
class="filingPersonTable"
ref="tableRef"
:columns="tableColumns"
height="100%"
:data="data"
v-loading="loading"
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 class="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/filingPersonListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
备案人列表暂无内容
</div>
</template>
<template #currentStatusCell="slotProps">
<div class="flex items-center">
<ApproveStatus
:type="slotProps.authentication_status"
mode="filingPerson"
></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"
</div>
<Table
class="filingPersonTable"
ref="tableRef"
:columns="tableColumns"
height="100%"
:data="data"
v-loading="loading"
element-loading-text="加载中..."
>
<template #empty> &nbsp; </template>
<template #authentication_name="slotProps">
<div
class="cursor-pointer overflow-hidden text-ellipsis"
@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);
}
}
$router.push({
name: 'filingPersonDetail',
query: {
id: slotProps.id,
},
})
"
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>
{{ slotProps.authentication_name }}
</div>
</template>
<template #currentStatusCell="slotProps">
<div class="flex items-center">
<ApproveStatus
:type="slotProps.authentication_status"
mode="filingPerson"
></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>
<script setup lang="ts">
......
<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
ref="tableRef"
:columns="columns"
......@@ -7,14 +16,7 @@
height="100%"
:loading="loading"
>
<template #empty>
<img
src="@/assets/img/recycleListEmpty.svg"
class="mt-28 mx-auto"
alt=""
srcset=""
/>
</template>
<template #empty> &nbsp; </template>
<template #update_time="slotProps">
{{ getRelativeTime(slotProps.update_time) }}
</template>
......
......@@ -81,13 +81,15 @@
></CategoryList>
</HorizontalListWrapper>
<syScrollBar class="flex-grow" style="margin-top: 28px">
<img
src="@/assets/img/templateListEmpty.svg"
class="mx-auto mt-28"
<div
class="absolute z-10 left-1/2 -translate-x-1/2 top-1/4 text-center"
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
v-if="focusedMenu === 'private'"
:list="templateList"
......
<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
ref="tableRef"
:columns="columns"
......@@ -8,12 +17,7 @@
v-loading="loading"
element-loading-text="加载中..."
>
<template #empty>
<img
src="@/assets/img/traceListEmpty.svg"
class="mx-auto mt-28"
/>
</template>
<template #empty>&nbsp;</template>
<template #name="slotProps">
<div
class="whitespace-nowrap overflow-hidden text-ellipsis cursor-pointer flex items-center"
......
<template>
<Table
ref="tableRef"
:columns="tableColumns"
:data="data"
v-loading="loading"
class="copyrightTable"
element-loading-text="加载中..."
>
<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 class="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/copyrightListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
版权列表暂无内容
</div>
</template>
<template #currentStatusCell="slotProps">
<div class="flex items-center">
<ApproveStatus
class="flex-shrink-0"
:type="slotProps.record_work_status"
></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"
</div>
<Table
ref="tableRef"
:columns="tableColumns"
:data="data"
v-loading="loading"
height="100%"
class="copyrightTable"
element-loading-text="加载中..."
>
<template #empty> &nbsp; </template>
<template #record_work_name="slotProps">
<div
class="cursor-pointer overflow-hidden text-ellipsis"
@click="
$router.push({
name: `copyRightDetail`,
query: {
id: slotProps.id,
},
})
"
>
<Icon1
icon-name="iconbianzu7-copy"
style="font-size: 26px"
class="cursor-pointer"
></Icon1>
</syMoreOperate>
</div>
</template>
</Table>
{{ slotProps.record_work_name }}
</div>
</template>
<template #currentStatusCell="slotProps">
<div class="flex items-center">
<ApproveStatus
class="flex-shrink-0"
:type="slotProps.record_work_status"
></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>
<script setup lang="ts">
......
<template>
<Table
ref="tableRef"
:columns="tableColumns"
:data="data"
v-loading="loading"
height="100%"
element-loading-text="加载中..."
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 class="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/copyrightListEmpty.svg" class="mx-auto" />
<div style="color: var(--sy-gray); font-size: 14px; margin-top: 10px">
草稿箱暂无内容
</div>
</template>
<template #record_work_type="slotProps">
{{ (workTypeMapping as any)[slotProps.record_work_type] }}</template
</div>
<Table
ref="tableRef"
:columns="tableColumns"
:data="data"
v-loading="loading"
height="100%"
element-loading-text="加载中..."
class="draftBoxTable"
>
<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"
<template #empty> &nbsp; </template>
<template #record_work_name="slotProps">
<div
class="cursor-pointer"
></Icon>
</syMoreOperate>
</template>
</Table>
@click="
$router.push({
name: 'addCopyRight',
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>
<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