From 18dc8a0cfb44820b8a7054dab3e6ebab749cb920 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Fri, 8 Dec 2023 12:42:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AF=B9=E8=AF=9D=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/styles/element-plus.scss | 3 + .../views/log/component/ChatRecordDrawer.vue | 25 ++++++-- .../views/log/component/EditContentDialog.vue | 2 +- ui/src/views/log/index.vue | 60 ++++++++++++++++++- 4 files changed, 82 insertions(+), 8 deletions(-) diff --git a/ui/src/styles/element-plus.scss b/ui/src/styles/element-plus.scss index 1321fbef6..b3090ad62 100644 --- a/ui/src/styles/element-plus.scss +++ b/ui/src/styles/element-plus.scss @@ -115,6 +115,9 @@ .el-checkbox { height: 23px; } + tr.hightlight { + background: var(--el-table-current-row-bg-color); + } } .el-pagination .el-select .el-input { diff --git a/ui/src/views/log/component/ChatRecordDrawer.vue b/ui/src/views/log/component/ChatRecordDrawer.vue index 5674ef854..917ed2e95 100644 --- a/ui/src/views/log/component/ChatRecordDrawer.vue +++ b/ui/src/views/log/component/ChatRecordDrawer.vue @@ -9,7 +9,11 @@ -
+
@@ -24,8 +28,8 @@
@@ -44,6 +48,8 @@ const props = defineProps({ } }) +const emit = defineEmits(['changeId', 'close']) + const route = useRoute() const { params: { id } @@ -75,6 +81,7 @@ function closeHandel() { currentChatId.value = '' paginationConfig.total = 0 paginationConfig.current_page = 1 + emit('close') } function loadDataset() { @@ -93,11 +100,21 @@ function getChatRecord() { }) } +// function nextRecord(id: string) { +// currentChatId.value = id +// emit('changeId', id) +// recordList.value = [] +// paginationConfig.total = 0 +// paginationConfig.current_page = 1 +// getChatRecord() +// } + const open = (id: string) => { currentChatId.value = id getChatRecord() visible.value = true } + defineExpose({ open }) @@ -106,7 +123,7 @@ defineExpose({ .chat-record-drawer { .el-drawer__body { background: var(--app-layout-bg-color); - padding: 24px 0; + padding: 0; } } diff --git a/ui/src/views/log/component/EditContentDialog.vue b/ui/src/views/log/component/EditContentDialog.vue index 701e576d6..7f4fa9727 100644 --- a/ui/src/views/log/component/EditContentDialog.vue +++ b/ui/src/views/log/component/EditContentDialog.vue @@ -159,7 +159,7 @@ const submitForm = async (formEl: FormInstance | undefined) => { ) .then((res: any) => { emit('updateContent', res.data) - loading.value = false + dialogVisible.value = false }) } else { console.log('error submit!', fields) diff --git a/ui/src/views/log/index.vue b/ui/src/views/log/index.vue index 6d2e5b883..d6f323842 100644 --- a/ui/src/views/log/index.vue +++ b/ui/src/views/log/index.vue @@ -26,6 +26,7 @@ @changePage="getList" @row-click="rowClickHandle" v-loading="loading" + :row-class-name="setRowClass" > @@ -66,7 +67,7 @@