Merge remote-tracking branch 'origin/feature/v1.2灵机空间-内容上传审核_rxd' into test
This commit is contained in:
@ -344,7 +344,7 @@ export default {
|
||||
</div>
|
||||
<div class="mb-16px suggestion-box p-12px rounded-8px bg-#F7F8FA flex flex-col">
|
||||
<div class="mb-24px relative w-fit">
|
||||
<span class="ai-text">AI 审核建议</span>
|
||||
<span class="ai-text relative z-2">AI 审核建议</span>
|
||||
<img src={icon2} class="w-80px h-10.8px absolute bottom-1px left-1px" />
|
||||
</div>
|
||||
<div class="flex flex-col items-center h-138px justify-center">
|
||||
@ -371,7 +371,7 @@ export default {
|
||||
</div>
|
||||
<div class="mb-16px suggestion-box p-12px rounded-8px bg-#F7F8FA flex flex-col">
|
||||
<div class=" mb-8px relative w-fit">
|
||||
<span class="ai-text">AI 审核建议</span>
|
||||
<span class="ai-text relative z-2">AI 审核建议</span>
|
||||
<img src={icon2} class="w-80px h-10.8px absolute bottom-1px left-1px" />
|
||||
</div>
|
||||
{aiReview.value?.suggestion?.map((item, index) => (
|
||||
|
||||
@ -56,6 +56,15 @@ export default {
|
||||
const form = ref(cloneDeep(INITIAL_FORM));
|
||||
const works = ref([]);
|
||||
|
||||
// 生成自增 id(基于当前列表中最大的 id)
|
||||
const getNextWorkId = () => {
|
||||
const currentMax = works.value.reduce((max, item) => {
|
||||
const numericId = Number(item?.id);
|
||||
return Number.isFinite(numericId) ? Math.max(max, numericId) : max;
|
||||
}, 0);
|
||||
return currentMax + 1;
|
||||
};
|
||||
|
||||
// 剪贴板功能
|
||||
|
||||
const isLink = computed(() => uploadType.value === UPLOAD_TYPE.LINK);
|
||||
@ -136,7 +145,10 @@ export default {
|
||||
});
|
||||
if (code === 200) {
|
||||
taskStatus.value = TASK_STATUS.SUCCESS;
|
||||
data && works.value.push(data);
|
||||
if (data) {
|
||||
const id = data.id ?? getNextWorkId();
|
||||
works.value.push({ ...data, id });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -345,7 +345,7 @@ export default {
|
||||
</div>
|
||||
<div class="mb-16px suggestion-box p-12px rounded-8px bg-#F7F8FA flex flex-col">
|
||||
<div class="mb-24px relative w-fit">
|
||||
<span class="ai-text">AI 审核建议</span>
|
||||
<span class="ai-text relative z-2">AI 审核建议</span>
|
||||
<img src={icon2} class="w-80px h-10.8px absolute bottom-1px left-1px" />
|
||||
</div>
|
||||
<div class="flex flex-col items-center h-138px justify-center">
|
||||
@ -372,7 +372,7 @@ export default {
|
||||
</div>
|
||||
<div class="mb-16px suggestion-box p-12px rounded-8px bg-#F7F8FA flex flex-col">
|
||||
<div class=" mb-8px relative w-fit">
|
||||
<span class="ai-text">AI 审核建议</span>
|
||||
<span class="ai-text relative z-2">AI 审核建议</span>
|
||||
<img src={icon2} class="w-80px h-10.8px absolute bottom-1px left-1px" />
|
||||
</div>
|
||||
{aiReview.value?.suggestion?.map((item, index) => (
|
||||
|
||||
@ -52,6 +52,15 @@ export default {
|
||||
const form = ref(cloneDeep(INITIAL_FORM));
|
||||
const works = ref([]);
|
||||
|
||||
// 生成自增 id(基于当前列表中最大的 id)
|
||||
const getNextWorkId = () => {
|
||||
const currentMax = works.value.reduce((max, item) => {
|
||||
const numericId = Number(item?.id);
|
||||
return Number.isFinite(numericId) ? Math.max(max, numericId) : max;
|
||||
}, 0);
|
||||
return currentMax + 1;
|
||||
};
|
||||
|
||||
// 剪贴板功能
|
||||
const { copy } = useClipboard({ source: form.value.writerLink });
|
||||
|
||||
@ -158,7 +167,10 @@ export default {
|
||||
});
|
||||
if (code === 200) {
|
||||
taskStatus.value = TASK_STATUS.SUCCESS;
|
||||
data && works.value.push(data);
|
||||
if (data) {
|
||||
const id = data.id ?? getNextWorkId();
|
||||
works.value.push({ ...data, id });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user