From 64920403797a80149ac1ba2cd2426ad5db044bec Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期一, 26 八月 2024 14:58:01 +0800
Subject: [PATCH] fix: 修改settings 备注
---
src/views/dmx/IntelligentAgent/index.vue | 62 ++++++++++++++++++++++++-------
1 files changed, 48 insertions(+), 14 deletions(-)
diff --git a/src/views/dmx/IntelligentAgent/index.vue b/src/views/dmx/IntelligentAgent/index.vue
index 6a9c250..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="'纭畾鍒犻櫎鍚�'"
@@ -132,7 +144,7 @@
>
<icon-calendar-clock />
<span style="font-size: 12px;margin-left: 10px">
- {{ parseTime(item.create_date) }}
+ {{ moment(item.create_date).format('YYYY-MM-DD HH:mm:ss') }}
</span>
</div>
<!-- <div-->
@@ -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,18 +226,19 @@
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';
import AgentConfig from '@/views/dmx/IntelligentAgent/components/agentConfig.vue';
import logo from '../../../assets/images/model.png';
import { documentHeight, parseTime } from "@/utils";
+ import moment from "moment";
// console.log(documentHeight,'楂樺害');
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([]);
@@ -232,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