Merge remote-tracking branch 'origin/main' into feature/v1.3_主agent_rxd

# Conflicts:
#	src/views/creative-generation-workshop/explore/detail/style.scss
This commit is contained in:
rd
2025-08-16 10:02:13 +08:00
11 changed files with 50 additions and 25 deletions

View File

@ -264,17 +264,19 @@ export default {
}; };
const getCommentName = (item) => { const getCommentName = (item) => {
if (item.commenter_id === 0) {
return '佚名';
}
// 姓名脱敏保留首尾字符中间拼接6个**** // 姓名脱敏保留首尾字符中间拼接6个****
const maskName = (name) => { const maskName = (name) => {
if (!name || name.length <= 1) return name; // 单字符不脱敏 if (!name || name.length <= 1) return name; // 单字符不脱敏
return name[0] + '****' + name[name.length - 1]; return name[0] + '****' + name[name.length - 1];
}; };
// 手机号脱敏保留前3位和后4位中间4位替换为**** // 手机号脱敏保留前3位和后4位中间4位替换为****
const maskMobile = (mobile) => mobile?.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2'); const maskMobile = (mobile) => mobile?.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2');
if (item.commenter_id === 0) {
return item.commenter?.name ? maskName(item.commenter?.name) : '佚名';
}
const maskedName = maskName(item.commenter?.name); const maskedName = maskName(item.commenter?.name);
const maskedMobile = maskMobile(item.commenter?.mobile); const maskedMobile = maskMobile(item.commenter?.mobile);
return maskedName || maskedMobile; return maskedName || maskedMobile;

View File

@ -210,7 +210,7 @@ export default {
return () => { return () => {
return ( return (
<div class="explore-page"> <div class='explore-page'>
<header class="page-header"> <header class="page-header">
<div class="content w-full px-24px flex items-center bg-#fff justify-between"> <div class="content w-full px-24px flex items-center bg-#fff justify-between">
<div class="h-full flex items-center"> <div class="h-full flex items-center">

View File

@ -1,4 +1,10 @@
.explore-page { .explore-page {
position: relative;
min-width: 1200px;
min-height: 100vh;
background: #fff;
display: flex;
flex-direction: column;
&::before { &::before {
content: ''; content: '';
position: absolute; position: absolute;
@ -9,12 +15,6 @@
background: #fff; background: #fff;
z-index: -1; z-index: -1;
} }
position: relative;
min-width: 1200px;
min-height: 100vh;
background: #fff;
display: flex;
flex-direction: column;
.fold-box { .fold-box {
width: 40px; width: 40px;
height: 40px; height: 40px;
@ -68,11 +68,14 @@
} }
.page-wrap { .page-wrap {
width: calc(100% - 456px); width: 100%;
flex: 1; flex: 1;
display: flex; display: flex;
justify-content: center; justify-content: center;
// background: #fff; background: #fff;
&.expand {
width: calc(100% - 456px);
}
.explore-detail-wrap { .explore-detail-wrap {
min-height: 500px; min-height: 500px;
width: 684px; width: 684px;

View File

@ -51,7 +51,7 @@
</template> </template>
<template v-else-if="column.dataIndex === 'platform'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'platform'" #cell="{ record }">
<template v-if="!PLATFORMS.find((item) => item.value === record.platform)"> - </template> <template v-if="!PLATFORMS.find((item) => item.value === record.platform)"> - </template>
<img v-else width="24" height="24" :src="PLATFORMS.find((item) => item.value === record.platform)?.icon" /> <img v-else width="24" height="24" class="rounded-4px" :src="PLATFORMS.find((item) => item.value === record.platform)?.icon" />
</template> </template>
<template v-else-if="column.dataIndex === 'compliance_level'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'compliance_level'" #cell="{ record }">
<span class="cts num !color-#6D4CFE">{{ <span class="cts num !color-#6D4CFE">{{

View File

@ -30,7 +30,7 @@ export const TABLE_COLUMNS1 = [
}, },
{ {
title: '上传时间', title: '上传时间',
dataIndex: 'updated_at', dataIndex: 'created_at',
width: 180, width: 180,
sortable: { sortable: {
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],

View File

@ -35,7 +35,7 @@ export const TABLE_COLUMNS = [
}, },
{ {
title: '上传时间', title: '上传时间',
dataIndex: 'updated_at', dataIndex: 'created_at',
width: 180, width: 180,
sortable: { sortable: {
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],

View File

@ -55,6 +55,8 @@ export default {
const taskStatus = ref(TASK_STATUS.DEFAULT); const taskStatus = ref(TASK_STATUS.DEFAULT);
const form = ref(cloneDeep(INITIAL_FORM)); const form = ref(cloneDeep(INITIAL_FORM));
const works = ref([]); const works = ref([]);
const uploadingFiles = ref([]); // 上传中
const uploadSuccessFiles = ref([]); // 上传成功
// 生成自增 id基于当前列表中最大的 id // 生成自增 id基于当前列表中最大的 id
const getNextWorkId = () => { const getNextWorkId = () => {
@ -65,8 +67,6 @@ export default {
return currentMax + 1; return currentMax + 1;
}; };
// 剪贴板功能
const isLink = computed(() => uploadType.value === UPLOAD_TYPE.LINK); const isLink = computed(() => uploadType.value === UPLOAD_TYPE.LINK);
const isLocal = computed(() => uploadType.value === UPLOAD_TYPE.LOCAL); const isLocal = computed(() => uploadType.value === UPLOAD_TYPE.LOCAL);
const isDefault = computed(() => taskStatus.value === TASK_STATUS.DEFAULT); const isDefault = computed(() => taskStatus.value === TASK_STATUS.DEFAULT);
@ -90,6 +90,8 @@ export default {
taskStatus.value = TASK_STATUS.DEFAULT; taskStatus.value = TASK_STATUS.DEFAULT;
form.value = cloneDeep(INITIAL_FORM); form.value = cloneDeep(INITIAL_FORM);
works.value = []; works.value = [];
uploadingFiles.value = [];
uploadSuccessFiles.value = [];
}; };
const open = () => { const open = () => {
@ -137,6 +139,8 @@ export default {
const formData = new FormData(); const formData = new FormData();
formData.append('file', file); formData.append('file', file);
uploadingFiles.value.push(file);
const { code, data } = await postWorksByFileWriter(formData, { const { code, data } = await postWorksByFileWriter(formData, {
timeout: 0, timeout: 0,
headers: { headers: {
@ -145,10 +149,15 @@ export default {
}, },
}); });
if (code === 200) { if (code === 200) {
taskStatus.value = TASK_STATUS.SUCCESS;
if (data) { if (data) {
const id = data.id ?? getNextWorkId(); const id = data.id ?? getNextWorkId();
works.value.push({ ...data, id }); const _data = { ...data, id };
works.value.push(_data);
uploadSuccessFiles.value.push(_data);
}
if (uploadingFiles.value.length === uploadSuccessFiles.value.length) {
taskStatus.value = TASK_STATUS.SUCCESS;
} }
} }
}; };

View File

@ -51,7 +51,7 @@
</template> </template>
<template v-else-if="column.dataIndex === 'platform'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'platform'" #cell="{ record }">
<template v-if="!PLATFORMS.find((item) => item.value === record.platform)"> - </template> <template v-if="!PLATFORMS.find((item) => item.value === record.platform)"> - </template>
<img v-else width="24" height="24" :src="PLATFORMS.find((item) => item.value === record.platform)?.icon" /> <img v-else width="24" height="24" class="rounded-4px" :src="PLATFORMS.find((item) => item.value === record.platform)?.icon" />
</template> </template>
<template v-else-if="column.dataIndex === 'compliance_level'" #cell="{ record }"> <template v-else-if="column.dataIndex === 'compliance_level'" #cell="{ record }">
<span class="cts num !color-#6D4CFE">{{ <span class="cts num !color-#6D4CFE">{{

View File

@ -30,7 +30,7 @@ export const TABLE_COLUMNS1 = [
}, },
{ {
title: '上传时间', title: '上传时间',
dataIndex: 'updated_at', dataIndex: 'created_at',
width: 180, width: 180,
sortable: { sortable: {
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],

View File

@ -40,7 +40,7 @@ export const TABLE_COLUMNS = [
}, },
{ {
title: '上传时间', title: '上传时间',
dataIndex: 'updated_at', dataIndex: 'created_at',
width: 180, width: 180,
sortable: { sortable: {
sortDirections: ['ascend', 'descend'], sortDirections: ['ascend', 'descend'],

View File

@ -50,6 +50,8 @@ export default {
const uploadType = ref(UPLOAD_TYPE.LINK); const uploadType = ref(UPLOAD_TYPE.LINK);
const taskStatus = ref(TASK_STATUS.DEFAULT); const taskStatus = ref(TASK_STATUS.DEFAULT);
const form = ref(cloneDeep(INITIAL_FORM)); const form = ref(cloneDeep(INITIAL_FORM));
const uploadingFiles = ref([]); // 上传中
const uploadSuccessFiles = ref([]); // 上传成功
const works = ref([]); const works = ref([]);
// 生成自增 id基于当前列表中最大的 id // 生成自增 id基于当前列表中最大的 id
@ -87,6 +89,8 @@ export default {
taskStatus.value = TASK_STATUS.DEFAULT; taskStatus.value = TASK_STATUS.DEFAULT;
form.value = cloneDeep(INITIAL_FORM); form.value = cloneDeep(INITIAL_FORM);
works.value = []; works.value = [];
uploadingFiles.value = [];
uploadSuccessFiles.value = [];
}; };
const getWriterLink = async () => { const getWriterLink = async () => {
@ -160,6 +164,8 @@ export default {
const formData = new FormData(); const formData = new FormData();
formData.append('file', file); formData.append('file', file);
uploadingFiles.value.push(file);
const { code, data } = await postWorksByFile(formData, { const { code, data } = await postWorksByFile(formData, {
timeout: 0, timeout: 0,
headers: { headers: {
@ -167,10 +173,15 @@ export default {
}, },
}); });
if (code === 200) { if (code === 200) {
taskStatus.value = TASK_STATUS.SUCCESS;
if (data) { if (data) {
const id = data.id ?? getNextWorkId(); const id = data.id ?? getNextWorkId();
works.value.push({ ...data, id }); const _data = { ...data, id };
works.value.push(_data);
uploadSuccessFiles.value.push(_data);
}
if (uploadingFiles.value.length === uploadSuccessFiles.value.length) {
taskStatus.value = TASK_STATUS.SUCCESS;
} }
} }
}; };