|
@@ -47,6 +47,16 @@
|
|
|
:index="String(item.doc_id)"
|
|
|
style="display: flex; justify-content: space-between; align-items: center;"
|
|
|
>
|
|
|
+ <span v-if="item.statusDesc" style="margin-right: 8px; display: flex; align-items: center;">
|
|
|
+ <span :style="{
|
|
|
+ width: '12px',
|
|
|
+ height: '12px',
|
|
|
+ borderRadius: '50%',
|
|
|
+ backgroundColor: item.statusDesc === '可用' ? '#4fc280' : '#f56c6c',
|
|
|
+ marginRight: '5px'
|
|
|
+ }">
|
|
|
+ </span>
|
|
|
+ </span>
|
|
|
<!-- 左边文字:固定宽度 + 超出省略号 -->
|
|
|
<span class="menu-text">{{ item.title || item.text }}</span>
|
|
|
|
|
@@ -79,8 +89,6 @@
|
|
|
|
|
|
<!-- 右侧内容区域 -->
|
|
|
<el-main style="padding: 20px; overflow-y: auto; height: calc(100vh - 60px); position: relative;">
|
|
|
- <!-- 右上角按钮 -->
|
|
|
- <!-- 右上角按钮:有内容时才显示 -->
|
|
|
<el-button
|
|
|
v-if="selectedContent"
|
|
|
size="small"
|
|
@@ -90,7 +98,6 @@
|
|
|
>
|
|
|
展示分段
|
|
|
</el-button>
|
|
|
-
|
|
|
<h2>{{ selectedTitle }}</h2>
|
|
|
<p>{{ selectedContent }}</p>
|
|
|
</el-main>
|
|
@@ -113,6 +120,7 @@
|
|
|
<el-table-column prop="chunk_id" label="分段ID" width="100" header-align="center" align="center"/>
|
|
|
<el-table-column prop="summary" label="总结" width="300" header-align="center"/>
|
|
|
<el-table-column prop="text" label="内容" header-align="center"/>
|
|
|
+ <el-table-column prop="statusDesc" label="状态" width="100" header-align="center" align="center"/>
|
|
|
</el-table>
|
|
|
|
|
|
|
|
@@ -130,9 +138,6 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</el-container>
|
|
|
|
|
|
<!-- 弹窗 -->
|
|
@@ -157,7 +162,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { API_BASE_URL } from "@/config";
|
|
|
+import {API_BASE_URL} from "@/config";
|
|
|
import {defineComponent, onMounted, ref, computed} from 'vue';
|
|
|
import {useRouter} from 'vue-router'; // 引入 vue-router 用于路由跳转
|
|
|
import axios from 'axios';
|
|
@@ -169,6 +174,7 @@ interface Item {
|
|
|
doc_id: string;
|
|
|
title: string | null;
|
|
|
text: string;
|
|
|
+ statusDesc: string;
|
|
|
}
|
|
|
|
|
|
export default defineComponent({
|
|
@@ -182,6 +188,7 @@ export default defineComponent({
|
|
|
// 当前选中的内容的标题和内容
|
|
|
const selectedTitle = ref('');
|
|
|
const selectedContent = ref('');
|
|
|
+ const statusDesc = ref('');
|
|
|
|
|
|
// 页码控制
|
|
|
const pageIndex = ref(1);
|
|
@@ -238,6 +245,7 @@ export default defineComponent({
|
|
|
if (selected) {
|
|
|
selectedTitle.value = selected.title || ''; // 如果 title 为 null,使用默认值
|
|
|
selectedContent.value = selected.text;
|
|
|
+ statusDesc.value = selected.statusDesc
|
|
|
}
|
|
|
};
|
|
|
|
|
@@ -410,6 +418,7 @@ export default defineComponent({
|
|
|
chunkTotal,
|
|
|
openChunkDialog,
|
|
|
fetchChunks,
|
|
|
+ statusDesc,
|
|
|
};
|
|
|
},
|
|
|
});
|