Merge branch 'main' of github.com:maxkb-dev/maxkb
This commit is contained in:
commit
d38a9c2659
@ -116,6 +116,36 @@ const getMarkRecord: (
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标注
|
||||||
|
* @param 参数
|
||||||
|
* application_id, chart_id, chart_record_id, dataset_id, document_id,paragraph_id
|
||||||
|
*/
|
||||||
|
const delMarkRecord: (
|
||||||
|
applicaiton_id: String,
|
||||||
|
chart_id: String,
|
||||||
|
chart_record_id: String,
|
||||||
|
dataset_id: String,
|
||||||
|
document_id: String,
|
||||||
|
paragraph_id: String,
|
||||||
|
loading?: Ref<boolean>
|
||||||
|
) => Promise<Result<any>> = (
|
||||||
|
applicaiton_id,
|
||||||
|
chart_id,
|
||||||
|
chart_record_id,
|
||||||
|
dataset_id,
|
||||||
|
document_id,
|
||||||
|
paragraph_id,
|
||||||
|
loading
|
||||||
|
) => {
|
||||||
|
return del(
|
||||||
|
`${prefix}/${applicaiton_id}/chat/${chart_id}/chat_record/${chart_record_id}/dataset/${dataset_id}/document_id/${document_id}/improve/${paragraph_id}`,
|
||||||
|
undefined,
|
||||||
|
{},
|
||||||
|
loading
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取对话记录详情
|
* 获取对话记录详情
|
||||||
* @param 参数
|
* @param 参数
|
||||||
@ -140,5 +170,6 @@ export default {
|
|||||||
getChatRecordLog,
|
getChatRecordLog,
|
||||||
putChatRecordLog,
|
putChatRecordLog,
|
||||||
getMarkRecord,
|
getMarkRecord,
|
||||||
getRecordDetail
|
getRecordDetail,
|
||||||
|
delMarkRecord
|
||||||
}
|
}
|
||||||
|
|||||||
@ -310,7 +310,12 @@
|
|||||||
color: var(--app-text-color);
|
color: var(--app-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input-number .el-input__wrapper {
|
.el-input-number.is-controls-right .el-input__wrapper {
|
||||||
padding-left: 15px !important;;
|
padding-left: 15px !important;
|
||||||
padding-right: 42px !important;;
|
padding-right: 42px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-input-number.is-without-controls .el-input__wrapper {
|
||||||
|
padding-left: 12px !important;
|
||||||
|
padding-right: 12px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<el-button text @click="isEdit = true" v-if="!isEdit">
|
<el-button text @click="isEdit = true" v-if="!isEdit">
|
||||||
<el-icon><EditPen /></el-icon>
|
<el-icon><EditPen /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button text style="margin-left: 4px" @click="deleteParagraph">
|
<el-button text style="margin-left: 4px" @click="deleteMark">
|
||||||
<el-icon><Delete /></el-icon>
|
<el-icon><Delete /></el-icon>
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
@ -74,6 +74,7 @@ const loading = ref(false)
|
|||||||
|
|
||||||
const form = ref<any>({})
|
const form = ref<any>({})
|
||||||
const isEdit = ref(false)
|
const isEdit = ref(false)
|
||||||
|
const detail = ref<any>({})
|
||||||
|
|
||||||
const rules = reactive<FormRules>({
|
const rules = reactive<FormRules>({
|
||||||
content: [{ required: true, message: '请输入内容', trigger: 'blur' }]
|
content: [{ required: true, message: '请输入内容', trigger: 'blur' }]
|
||||||
@ -86,9 +87,17 @@ watch(dialogVisible, (bool) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function deleteParagraph() {
|
function deleteMark() {
|
||||||
paragraph
|
logApi
|
||||||
.asyncDelParagraph(form.value.dataset, form.value.document, form.value.id, loading)
|
.delMarkRecord(
|
||||||
|
id as string,
|
||||||
|
detail.value.chat_id,
|
||||||
|
detail.value.id,
|
||||||
|
form.value.dataset,
|
||||||
|
form.value.document,
|
||||||
|
form.value.id,
|
||||||
|
loading
|
||||||
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
emit('refresh')
|
emit('refresh')
|
||||||
MsgSuccess('删除成功')
|
MsgSuccess('删除成功')
|
||||||
@ -105,6 +114,7 @@ function getMark(data: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const open = (data: any) => {
|
const open = (data: any) => {
|
||||||
|
detail.value = data
|
||||||
getMark(data)
|
getMark(data)
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user