From 4123b18e86c05753e52c68a48c8a4067c2a6d625 Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期三, 21 八月 2024 15:41:21 +0800 Subject: [PATCH] 智能体详情信息 --- src/views/dmx/IntelligentAgent/index.vue | 59 ++++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/views/dmx/IntelligentAgent/index.vue b/src/views/dmx/IntelligentAgent/index.vue index 38b17b9..3013586 100644 --- a/src/views/dmx/IntelligentAgent/index.vue +++ b/src/views/dmx/IntelligentAgent/index.vue @@ -10,7 +10,16 @@ style="width: 240px" @change="queryList" /> - <agent-config typeAngint="add"></agent-config> + <a-button + type="primary" + @click="handleClick" + style="margin-left: 10px" + > + <template #icon> + <icon-plus /> + </template> + 鏂板缓鏅鸿兘浣� + </a-button> </div> <a-divider style="margin: 10px 0" /> <a-row justify="space-between"> @@ -72,12 +81,15 @@ > <a-space> <span v-show="!item.off"> - <agent-config - ref="editAgentKuai" - typeAngint="edit" - :formData="item" - @queryList="queryList" - ></agent-config> + <a-button + type="text" + size="small" + @click="editClick(item)" + > + <template #icon> + <icon-tool /> + </template> + </a-button> </span> <a-popconfirm :content="'纭畾鍒犻櫎鍚�'" @@ -195,6 +207,12 @@ </a-card> </a-col> </a-row> + <agent-config + ref="editAgentKuai" + :typeAngint="addType" + :formData="itemObj" + @queryList="queryList" + ></agent-config> </div> </template> @@ -208,7 +226,7 @@ onBeforeUnmount, } from 'vue'; import { Message } from '@arco-design/web-vue'; - import { deletedialog, queryCanvasList, querydialogList } from "@/api/Agent"; + import { deletedialog, queryCanvasList, querydialogdetail, querydialogList } from "@/api/Agent"; import useLoading from '@/hooks/loading'; const { loading, setLoading } = useLoading(true); import EventBus from '@/utils/EventBus'; @@ -220,7 +238,7 @@ let count = 5; const activeKey = ref(1); const addAgents = ref(); - const editAgentKuai = ref(); + const editAgentKuai = ref(null); const imgSrc = ref(logo); const agentList = ref([]); const agentNewList = ref([]); @@ -233,10 +251,25 @@ const visible = ref(false); const formRef = ref(null); - const form = reactive({ - // size: 'medium', - // name: '', - }); + let addType = ref('add'); + let itemObj = reactive({}); + const form = reactive({}); + + + const handleClick = () => { + addType.value = 'add'; + editAgentKuai.value.handleClick(); + }; + + const editClick = async(data) => { + let res = await querydialogdetail({ + dialog_id: data.id + }) + Object.assign(itemObj, res.data); + addType.value = 'edit'; + editAgentKuai.value.editClick(); + }; + const queryList = async (params = {}) => { setLoading(true); -- Gitblit v1.8.0