Skip to content

Commit

Permalink
feat: 问题管理
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdan-fit2cloud committed Apr 8, 2024
1 parent e8690cc commit c5f79df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ui/src/api/problem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const delMulProblem: (
data: any,
loading?: Ref<boolean>
) => Promise<Result<boolean>> = (dataset_id, data, loading) => {
return del(`${prefix}/${dataset_id}/problem/_bach`, undefined, data, loading)
return del(`${prefix}/${dataset_id}/problem/_batch`, undefined, data, loading)
}

/**
Expand Down
13 changes: 9 additions & 4 deletions ui/src/views/problem/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
</el-table-column>
<el-table-column prop="paragraph_count" label="关联分段数" align="right" min-width="100">
<template #default="{ row }">
<el-link type="primary" @click.stop="rowClickHandle(row)">
<el-link type="primary" @click.stop="rowClickHandle(row)" v-if="row.paragraph_count">
{{ row.paragraph_count }}
</el-link>
<span v-else>
{{ row.paragraph_count }}
</span>
</template>
</el-table-column>
<el-table-column prop="create_time" label="创建时间" width="170">
Expand Down Expand Up @@ -293,9 +296,11 @@ const preChatRecord = () => {
}
function rowClickHandle(row: any) {
currentClickId.value = row.id
currentContent.value = row.content
DetailProblemRef.value.open()
if (row.paragraph_count) {
currentClickId.value = row.id
currentContent.value = row.content
DetailProblemRef.value.open()
}
}
const setRowClass = ({ row }: any) => {
Expand Down

0 comments on commit c5f79df

Please sign in to comment.