From a53981aea70d2247120954a96f9f462c6bad936b Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期一, 12 八月 2024 16:52:54 +0800 Subject: [PATCH] 修改智能体的bug问题 --- src/views/dmx/IntelligentAgent/index.vue | 149 ++++++++++++++++++++++++++++--------------------- 1 files changed, 84 insertions(+), 65 deletions(-) diff --git a/src/views/dmx/IntelligentAgent/index.vue b/src/views/dmx/IntelligentAgent/index.vue index 4643bb3..a96dd22 100644 --- a/src/views/dmx/IntelligentAgent/index.vue +++ b/src/views/dmx/IntelligentAgent/index.vue @@ -16,7 +16,15 @@ <a-row justify="space-between"> <a-col :span="24"> <a-spin :loading="loading" style="width: 100%"> - <a-scrollbar style="display: flex; flex-wrap: wrap;align-content: flex-start;overflow: auto;" :style="{height: documentHeight + 'px'}"> + <a-scrollbar + style=" + display: flex; + flex-wrap: wrap; + align-content: flex-start; + overflow: auto; + " + :style="{ height: documentHeight + 'px' }" + > <div class="card-wrap" v-for="(item, index) of agentList" @@ -41,36 +49,40 @@ </a-switch> <div class="arco-card-body-content"> <div class="arco-card-body-content-top"> - <span style="font-size: 18px; font-weight: 900"> - {{ item.name }} - </span> + <span style="font-size: 18px; font-weight: 900"> + {{ item.name }} + </span> </div> <div class="arco-card-body-content-down"> {{ item.prompt_config.prologue }} </div> </div> - <div style="position: absolute; bottom: 1.4rem; left: 1rem"> + <div + style="position: absolute; bottom: 1.4rem; left: 1rem" + > <icon-user /> <span style="font-size: 12px"> - <!-- {{ item.name }}--> - </span> - </div> - <div style="position: absolute; bottom: 1rem; right: 1rem"> - <a-space> - <span v-show="!item.off"> - <agent-config - ref="editAgentKuai" - typeAngint="edit" - :formData="item" - @queryList="queryList" - ></agent-config> + <!-- {{ item.name }}--> </span> + </div> + <div + style="position: absolute; bottom: 1rem; right: 1rem" + > + <a-space> + <span v-show="!item.off"> + <agent-config + ref="editAgentKuai" + typeAngint="edit" + :formData="item" + @queryList="queryList" + ></agent-config> + </span> <a-popconfirm :content="'纭畾鍒犻櫎鍚�'" type="warning" @ok="deleteItem(item)" > - <a-button type="text" > + <a-button type="text"> <template #icon> <icon-delete /> </template> @@ -81,40 +93,40 @@ </a-card> </div> </a-scrollbar> -<!-- <div--> -<!-- class="card-wrap"--> -<!-- style="cursor: pointer"--> -<!-- @click="handleAdd"--> -<!-- >--> -<!-- <a-card :bordered="false" hoverable>--> -<!-- <div style="margin-top: 30px; text-align: center">--> -<!-- <a-avatar style="background: #3370ff">--> -<!-- <icon-plus />--> -<!-- </a-avatar>--> -<!-- </div>--> -<!-- <div class="arco-card-body-content">--> -<!-- <div style="text-align: center; margin-top: 10px">--> -<!-- 鏂板缓鏅鸿兘浣�--> -<!-- </div>--> -<!-- <div--> -<!-- style="--> -<!-- text-align: center;--> -<!-- margin-top: 10px;--> -<!-- font-size: 12px;--> -<!-- color: #999999;--> -<!-- "--> -<!-- >--> -<!-- 閫氳繃鎻忚堪瑙掕壊鍜屼换鍔℃潵鍒涘缓浣犵殑鏅鸿兘浣�<br />--> -<!-- 鏅鸿兘浣撳彲浠ヨ皟鐢ㄥ涓伐浣滄祦鍜屽伐鍏�--> -<!-- </div>--> -<!-- </div>--> -<!-- <add-agent ref="addAgents"></add-agent>--> -<!-- <!– <div style="position: absolute; bottom: 1rem; right: 1rem;">–>--> -<!-- <!– <a-space>–>--> -<!-- <!– </a-space>–>--> -<!-- <!– </div>–>--> -<!-- </a-card>--> -<!-- </div>--> + <!-- <div--> + <!-- class="card-wrap"--> + <!-- style="cursor: pointer"--> + <!-- @click="handleAdd"--> + <!-- >--> + <!-- <a-card :bordered="false" hoverable>--> + <!-- <div style="margin-top: 30px; text-align: center">--> + <!-- <a-avatar style="background: #3370ff">--> + <!-- <icon-plus />--> + <!-- </a-avatar>--> + <!-- </div>--> + <!-- <div class="arco-card-body-content">--> + <!-- <div style="text-align: center; margin-top: 10px">--> + <!-- 鏂板缓鏅鸿兘浣�--> + <!-- </div>--> + <!-- <div--> + <!-- style="--> + <!-- text-align: center;--> + <!-- margin-top: 10px;--> + <!-- font-size: 12px;--> + <!-- color: #999999;--> + <!-- "--> + <!-- >--> + <!-- 閫氳繃鎻忚堪瑙掕壊鍜屼换鍔℃潵鍒涘缓浣犵殑鏅鸿兘浣�<br />--> + <!-- 鏅鸿兘浣撳彲浠ヨ皟鐢ㄥ涓伐浣滄祦鍜屽伐鍏�--> + <!-- </div>--> + <!-- </div>--> + <!-- <add-agent ref="addAgents"></add-agent>--> + <!-- <!– <div style="position: absolute; bottom: 1rem; right: 1rem;">–>--> + <!-- <!– <a-space>–>--> + <!-- <!– </a-space>–>--> + <!-- <!– </div>–>--> + <!-- </a-card>--> + <!-- </div>--> </a-spin> </a-col> </a-row> @@ -125,16 +137,23 @@ </template> <script lang="ts" setup> -import { ref, reactive, nextTick, onBeforeMount, onMounted, onBeforeUnmount } from "vue"; + import { + ref, + reactive, + nextTick, + onBeforeMount, + onMounted, + onBeforeUnmount, + } from 'vue'; import { Message } from '@arco-design/web-vue'; import { deletedialog, querydialogList } from '@/api/Agent'; import useLoading from '@/hooks/loading'; const { loading, setLoading } = useLoading(true); import EventBus from '@/utils/EventBus'; - import AgentConfig from "@/views/dmx/IntelligentAgent/components/agentConfig.vue"; - import logo from "../../../assets/images/model.png"; - import { documentHeight } from "@/utils"; -// console.log(documentHeight,'楂樺害'); + import AgentConfig from '@/views/dmx/IntelligentAgent/components/agentConfig.vue'; + import logo from '../../../assets/images/model.png'; + import { documentHeight } from '@/utils'; + // console.log(documentHeight,'楂樺害'); let count = 5; const activeKey = ref(1); const addAgents = ref(); @@ -214,14 +233,14 @@ onBeforeMount(() => { queryList(); }); - onMounted(()=>{ - EventBus.on('queryList',()=>{ + onMounted(() => { + EventBus.on('queryList', () => { queryList(); - }) - }) - onBeforeUnmount(()=>{ - EventBus.off('queryList') - }) + }); + }); + onBeforeUnmount(() => { + EventBus.off('queryList'); + }); </script> <script lang="ts"> @@ -340,7 +359,7 @@ text-align: center; } .arco-card-body-content-down { - text-align: center; + // text-align: center; margin-top: 10px; font-size: 12px; color: #999999; -- Gitblit v1.8.0