refactor: clean up formatting and whitespace in chat-log.ts and EditMarkDialog.vue
This commit is contained in:
parent
4c9d024b67
commit
a0e2403e77
@ -14,6 +14,7 @@ import type { pageRequest } from '@/api/type/common'
|
||||
import type {ApplicationFormType} from '@/api/type/application'
|
||||
import {type Ref} from 'vue'
|
||||
import useStore from '@/stores'
|
||||
|
||||
const prefix: any = {_value: '/workspace/'}
|
||||
Object.defineProperty(prefix, 'value', {
|
||||
get: function () {
|
||||
@ -81,25 +82,21 @@ const getChatRecordLog: (
|
||||
/**
|
||||
* 获取标注段落列表信息
|
||||
* @param 参数
|
||||
* application_id, chart_id, chart_record_id, knowledge_id, document_id
|
||||
* application_id, chart_id, chart_record_id
|
||||
*/
|
||||
const getMarkChatRecord: (
|
||||
application_id: String,
|
||||
chart_id: String,
|
||||
chart_record_id: String,
|
||||
knowledge_id: String,
|
||||
document_id: String,
|
||||
application_id: string,
|
||||
chart_id: string,
|
||||
chart_record_id: string,
|
||||
loading?: Ref<boolean>,
|
||||
) => Promise<Result<any>> = (
|
||||
application_id,
|
||||
chart_id,
|
||||
chart_record_id,
|
||||
knowledge_id,
|
||||
document_id,
|
||||
loading,
|
||||
) => {
|
||||
return get(
|
||||
`${prefix.value}/${application_id}/chat/${chart_id}/chat_record/${chart_record_id}/knowledge/${knowledge_id}/document/${document_id}/improve`,
|
||||
`${prefix.value}/${application_id}/chat/${chart_id}/chat_record/${chart_record_id}/improve`,
|
||||
undefined,
|
||||
loading,
|
||||
)
|
||||
|
||||
@ -12,10 +12,14 @@
|
||||
<h4 :id="titleId" :class="titleClass">{{ $t('views.chatLog.editMark') }}</h4>
|
||||
<div class="text-right">
|
||||
<el-button text @click="isEdit = true" v-if="!isEdit">
|
||||
<el-icon><EditPen /></el-icon>
|
||||
<el-icon>
|
||||
<EditPen/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-button text style="margin-left: 4px" @click="deleteMark">
|
||||
<el-icon><Delete /></el-icon>
|
||||
<el-icon>
|
||||
<Delete/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
<el-divider direction="vertical"/>
|
||||
</div>
|
||||
@ -116,8 +120,9 @@ function deleteMark() {
|
||||
}
|
||||
|
||||
function getMark(data: any) {
|
||||
console.log(data)
|
||||
chatLogApi
|
||||
.getMarkChatRecord(id as string, data.chat_id, data.id, data.knowledge, data.document, loading)
|
||||
.getMarkChatRecord(id as string, data.chat_id, data.id, loading)
|
||||
.then((res: any) => {
|
||||
if (res.data.length > 0) {
|
||||
form.value = res.data[0]
|
||||
@ -158,6 +163,7 @@ defineExpose({ open })
|
||||
.el-dialog__header.show-close {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.el-dialog__headerbtn {
|
||||
top: 13px;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user