From 0448d7ffb98c5f4089ac00278427277ef0215a9d Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期一, 05 八月 2024 15:19:06 +0800
Subject: [PATCH] 知识库智能体管理的页面开发和功能开发
---
src/views/dmx/IntelligentAgent/components/editAgent.vue | 90 ++++++++++++++++----------------------------
1 files changed, 33 insertions(+), 57 deletions(-)
diff --git a/src/views/dmx/IntelligentAgent/components/editAgent.vue b/src/views/dmx/IntelligentAgent/components/editAgent.vue
index 6e140ad..d1d6d6c 100644
--- a/src/views/dmx/IntelligentAgent/components/editAgent.vue
+++ b/src/views/dmx/IntelligentAgent/components/editAgent.vue
@@ -19,66 +19,40 @@
title-align="start"
fullscreen
>
- <div class="main-container">
- <div class="main-container-lf">
- <div style="padding: 10px; font-size: 16px; background: #eeeeee"
- >鏅鸿兘浣撻厤缃�</div
- >
- <div style="display: flex; width: 100%" :style="{ height: height }">
- <div style="width: 50%; height: 100%">
- <div style="padding: 10px; font-size: 12px; color: #2a2a2b"
- >鏅鸿兘浣撶敾鍍�</div
- >
- <div>
- <a-textarea
- v-model="system"
- placeholder=""
- disabled
- style="height: 400px; background: #ffffff; color: #666666"
- />
- </div>
+ <div class="main-container">
+ <div class="main-container-lf">
+ <div style="padding: 10px;font-size: 16px;background: var(--color-neutral-3);">鏅鸿兘浣撻厤缃�</div>
+ <div style="display: flex;width: 100%;" :style="{height:height}">
+ <div style="width: 50%;height: 100%">
+ <div style="padding: 10px;font-size: 12px;color: #2a2a2b;">鏅鸿兘浣撶敾鍍�</div>
+ <div>
+ <a-textarea v-model="system" placeholder="" disabled style="height: 400px;" />
</div>
- <div style="background: #eeeeee; width: 50%">
- <a-form
- ref="formRef"
- :rules="rules"
- :model="form"
- @submit="handleSubmit"
- layout="vertical"
- >
- <a-collapse :default-active-key="['1']">
- <a-collapse-item
- header="鍩虹淇℃伅"
- key="0"
- v-if="typeAngint == 'edit'"
- >
- <a-input
- v-model="form.name"
- placeholder="璇疯緭鍏ユ櫤鑳戒綋鍚嶇О"
- style="width: 200px; margin-top: 10px"
- />
- </a-collapse-item>
- <a-collapse-item header="AI妯″瀷閰嶇疆" key="1">
- <a-space direction="vertical" size="large">
- <a-select
- :size="'large'"
- v-model="form.llm_id"
- :style="{ width: '25rem' }"
- placeholder="璇烽�夋嫨 ..."
+
+ </div>
+ <div style="width: 50%;border: 1px solid var(--color-neutral-3);background: var(--color-neutral-3)">
+ <a-form ref="formRef" :rules="rules" :model="form" @submit="handleSubmit" layout="vertical" >
+ <a-collapse :default-active-key="['1']">
+ <a-collapse-item header="鍩虹淇℃伅" key="0" v-if="typeAngint == 'edit'">
+ <a-input v-model="form.name" placeholder="璇疯緭鍏ユ櫤鑳戒綋鍚嶇О" style="width:200px;margin-top: 10px" />
+ </a-collapse-item>
+ <a-collapse-item header="AI妯″瀷閰嶇疆" key="1">
+ <a-space direction="vertical" size="large">
+ <a-select :size="'large'" v-model="form.llm_id" :style="{width:'25rem'}" placeholder="璇烽�夋嫨 ...">
+ <a-optgroup
+ :label="index"
+ v-for="(item, index) in modelList"
+ :key="index"
>
- <a-optgroup
- :label="index"
- v-for="(item, index) in modelList"
- :key="index"
+ <a-option
+ v-for="obj in item"
+ :key="obj.fid"
+ :disabled="!obj.available"
+ :value="obj.llm_id"
>
- <a-option
- v-for="obj in item"
- :key="obj.fid"
- :value="obj.llm_id"
- >
- {{ obj.llm_name }}
- </a-option>
- </a-optgroup>
+ {{ obj.llm_name }}
+ </a-option>
+ </a-optgroup>
</a-select>
</a-space>
</a-collapse-item>
@@ -163,6 +137,7 @@
import useLoading from '@/hooks/loading';
import { dialogSet } from '@/api/Agent';
import { Message } from '@arco-design/web-vue';
+ import EventBus from "@/utils/EventBus";
const { setLoading } = useLoading(true);
const props = defineProps(['typeAngint', 'formData']);
const visible = ref(false);
@@ -236,6 +211,7 @@
if (data.code == 0) {
Message.success(title);
handleCancel();
+ EventBus.emit('queryList');
}
};
--
Gitblit v1.8.0