From 3313467ddc324d3e19610142756423c8355dc82d Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期五, 30 八月 2024 15:13:58 +0800
Subject: [PATCH] fix: 更新聊天展示
---
src/views/dmx/IntelligentAgent/components/editAgent.vue | 47 +++++++++++++++--------------------------------
1 files changed, 15 insertions(+), 32 deletions(-)
diff --git a/src/views/dmx/IntelligentAgent/components/editAgent.vue b/src/views/dmx/IntelligentAgent/components/editAgent.vue
index ad78aa7..e82a113 100644
--- a/src/views/dmx/IntelligentAgent/components/editAgent.vue
+++ b/src/views/dmx/IntelligentAgent/components/editAgent.vue
@@ -106,29 +106,7 @@
</div>
</div>
<div class="main-container-rt">
- <div :style="{ height: heightrg }">
- <div style="padding: 10px">
- <a-avatar :style="{ backgroundColor: '#3370ff' }">
- <img
- :style="{ width: '100%' }"
- alt="dessert"
- src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a20012a2d4d5b9db43dfc6a01fe508c0.png~tplv-uwbnlip3yd-webp.webp"
- />
- </a-avatar>
- 璋冭瘯棰勮
- </div>
- <a-divider style="margin: 0; margin-left: 10px" />
-
- <div class="bottom">
- <div class="input">
- <a-input placeholder="杈撳叆鎮ㄦ兂浜嗚В鐨勫唴瀹癸紝鎸塃nter鍙戦��">
- <template #suffix>
- <icon-send style="cursor: pointer" />
- </template> </a-input
- ></div>
- <div class="text">鍐呭鐢盇I鐢熸垚锛屼粎渚涘弬鑰�</div>
- </div>
- </div>
+ <sessionAction></sessionAction>
</div>
</div>
</a-modal>
@@ -142,6 +120,7 @@
import { dialogSet } from '@/api/Agent';
import { Message } from '@arco-design/web-vue';
import EventBus from "@/utils/EventBus";
+ import sessionAction from "@/views/dmx/IntelligentAgent/components/sessionAction.vue";
const { setLoading } = useLoading(true);
const props = defineProps(['typeAngint', 'formData']);
const visible = ref(false);
@@ -190,7 +169,6 @@
const formRef = ref(null);
let tabs = ref([]);
const height = ref('calc(100vh - 150px)');
- const heightrg = ref('calc(100vh - 100px)');
const emit = defineEmits(['cancelModal']);
const rules = {
name: [
@@ -235,7 +213,6 @@
const editClick = (data) => {
visible.value = true;
-
console.log(props.formData);
Object.assign(form, props.formData);
console.log(form);
@@ -246,8 +223,11 @@
visible.value = true;
nextTick(() => {
Object.assign(form, data);
- console.log(form);
+ console.log(form,'浼犲��');
system.value = form.prompt_config.system;
+ if(tabs.value && tabs.value.length>0){
+ form.kb_ids = [tabs.value[0].id];
+ }
});
};
defineExpose({
@@ -274,7 +254,7 @@
const queryModel = async (params) => {
try {
const data = await queryModelList(params);
- console.log(data.data, '澶фā鍨嬪垪琛�');
+ // console.log(data.data, '澶фā鍨嬪垪琛�');
modelList.value = data.data;
} catch (err) {
// you can report use errorHandler or other
@@ -298,11 +278,10 @@
try {
const { data } = await queryKbList(params);
console.log(data, 'data');
- tabs.value = data;
- if(tabs.value && tabs.value.length>0){
- form.kb_ids = [tabs.value[0].id];
- }
- console.log(tabs.value, 'tabs');
+ nextTick(() => {
+ tabs.value = data;
+ console.log(tabs.value, 'tabs');
+ });
} catch (err) {
// you can report use errorHandler or other
} finally {
@@ -345,4 +324,8 @@
line-height: 40px;
}
}
+ :deep(.arco-textarea-wrapper.arco-textarea-disabled){
+ background: var(--color-bg-2);
+ color: var(--color-text-1);
+ }
</style>
--
Gitblit v1.8.0