fix: 优化文件状态提示样式

This commit is contained in:
wangdan-fit2cloud 2024-12-04 19:05:26 +08:00
parent 5eaafb07a1
commit caa02c5571
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,10 @@
<template> <template>
<el-popover v-model:visible="visible" placement="top" :width="450" trigger="hover"> <el-popover
v-model:visible="visible"
placement="top"
trigger="hover"
:popper-style="{ width: 'auto' }"
>
<template #default <template #default
><StatusTable ><StatusTable
v-if="visible" v-if="visible"
@ -48,13 +53,16 @@ const checkList: Array<string> = [
State.SUCCESS State.SUCCESS
] ]
const aggStatus = computed(() => { const aggStatus = computed(() => {
let obj = { key: 0, value: '' }
for (const i in checkList) { for (const i in checkList) {
const state = checkList[i] const state = checkList[i]
const index = props.status.indexOf(state) const index = props.status.indexOf(state)
if (index > -1) { if (index > -1) {
return { key: props.status.length - index, value: state } obj = { key: props.status.length - index, value: state }
break
} }
} }
return obj
}) })
const startedMap = { const startedMap = {
[TaskType.EMBEDDING]: '索引中', [TaskType.EMBEDDING]: '索引中',

View File

@ -37,7 +37,7 @@
Object.values(status.aggs ? status.aggs : {}).reduce((x: any, y: any) => x + y, 0) Object.values(status.aggs ? status.aggs : {}).reduce((x: any, y: any) => x + y, 0)
}}</span }}</span
> >
<el-text type="info" class="ml-4"> <el-text type="info" class="ml-12">
{{ {{
status.time status.time
? status.time[status.state == State.REVOKED ? State.REVOKED : State.PENDING]?.substring( ? status.time[status.state == State.REVOKED ? State.REVOKED : State.PENDING]?.substring(