From 6666ce5526b1ed17f5c3906c94620cad586745a5 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期五, 28 六月 2024 17:01:39 +0800 Subject: [PATCH] 优化代码 --- src/views/system/post/index.vue | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index aee6034..323c574 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -187,11 +187,13 @@ loading.value = false; }); } + /** 鍙栨秷鎸夐挳 */ function cancel() { open.value = false; reset(); } + /** 琛ㄥ崟閲嶇疆 */ function reset() { form.value = { @@ -204,28 +206,33 @@ }; proxy.resetForm("postRef"); } + /** 鎼滅储鎸夐挳鎿嶄綔 */ function handleQuery() { queryParams.value.pageNum = 1; getList(); } + /** 閲嶇疆鎸夐挳鎿嶄綔 */ function resetQuery() { proxy.resetForm("queryRef"); handleQuery(); } + /** 澶氶�夋閫変腑鏁版嵁 */ function handleSelectionChange(selection) { ids.value = selection.map(item => item.postId); single.value = selection.length != 1; multiple.value = !selection.length; } + /** 鏂板鎸夐挳鎿嶄綔 */ function handleAdd() { reset(); open.value = true; title.value = "娣诲姞宀椾綅"; } + /** 淇敼鎸夐挳鎿嶄綔 */ function handleUpdate(row) { reset(); @@ -236,6 +243,7 @@ title.value = "淇敼宀椾綅"; }); } + /** 鎻愪氦鎸夐挳 */ function submitForm() { proxy.$refs["postRef"].validate(valid => { @@ -256,6 +264,7 @@ } }); } + /** 鍒犻櫎鎸夐挳鎿嶄綔 */ function handleDelete(row) { const postIds = row.postId || ids.value; @@ -266,6 +275,7 @@ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛"); }).catch(() => {}); } + /** 瀵煎嚭鎸夐挳鎿嶄綔 */ function handleExport() { proxy.download("system/post/export", { -- Gitblit v1.9.3