From 10fe40839144bf9a3554e67e41bf1b209d050903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Mon, 16 Dec 2024 13:44:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=BD=E5=B1=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/content/layoutItem/edit.vue | 45 +++++++++-------- src/views/content/layoutItem/index.vue | 16 ++---- src/views/data/notice/edit.vue | 69 +++++++++++++------------- src/views/data/notice/index.vue | 16 ++---- src/views/monitor/job/index.vue | 9 ++-- src/views/monitor/job/log/index.vue | 32 ++++++------ 6 files changed, 92 insertions(+), 95 deletions(-) diff --git a/src/views/content/layoutItem/edit.vue b/src/views/content/layoutItem/edit.vue index 04cc917..ac9065c 100644 --- a/src/views/content/layoutItem/edit.vue +++ b/src/views/content/layoutItem/edit.vue @@ -1,5 +1,5 @@ @@ -185,8 +179,8 @@ */ const handleAdd = async () => { layoutId.value = 0; - await nextTick(); - editVisible.value = true; + const { openDrawer } = createModalRef.value; + openDrawer(); }; /** @@ -194,8 +188,8 @@ */ async function handleEdit(record: Recordable) { layoutId.value = record.id; - await nextTick(); - editVisible.value = true; + const { openDrawer } = createModalRef.value; + openDrawer(layoutId.value); } /** diff --git a/src/views/data/notice/edit.vue b/src/views/data/notice/edit.vue index de355d7..b37d132 100644 --- a/src/views/data/notice/edit.vue +++ b/src/views/data/notice/edit.vue @@ -1,5 +1,5 @@ @@ -186,8 +180,8 @@ */ const handleAdd = async () => { noticeId.value = 0; - await nextTick(); - editVisible.value = true; + const { openDrawer } = createModalRef.value; + openDrawer(); }; /** @@ -195,8 +189,8 @@ */ async function handleEdit(record: Recordable) { noticeId.value = record.id; - await nextTick(); - editVisible.value = true; + const { openDrawer } = createModalRef.value; + openDrawer(noticeId.value); } /** diff --git a/src/views/monitor/job/index.vue b/src/views/monitor/job/index.vue index 7b39859..03dab14 100644 --- a/src/views/monitor/job/index.vue +++ b/src/views/monitor/job/index.vue @@ -51,7 +51,7 @@ v-model:visible="editVisible" @success="reloadTable('noRefresh')" /> - + @@ -83,6 +83,7 @@ const dialog = useDialog(); const basicTableRef = ref(); const createModalRef = ref(); + const jobModalRef = ref(); const editVisible = ref(false); const editLogVisible = ref(false); const jobId = ref(0); @@ -299,10 +300,12 @@ * @param record 参数 */ const handleJobLog = (record) => { - console.log(record); // router.push({path:'/monitorJob/log'}) - editLogVisible.value = true; jobId.value = record.id; + // editLogVisible.value = true; + + const { openDrawer } = jobModalRef.value; + openDrawer(); }; /** diff --git a/src/views/monitor/job/log/index.vue b/src/views/monitor/job/log/index.vue index 924a2e1..e7bbb56 100644 --- a/src/views/monitor/job/log/index.vue +++ b/src/views/monitor/job/log/index.vue @@ -1,5 +1,5 @@