From 65c531eb6209bde490419e9a319cdee4c07f9af6 Mon Sep 17 00:00:00 2001
From: huguodong <“531035580@qq.com”>
Date: Tue, 14 Mar 2023 20:25:02 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E7=94=9F?=
=?UTF-8?q?=E6=88=90=E5=99=A8=E6=A8=A1=E6=9D=BF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CodeGen/Frontend/views/index.vue.vm | 20 +++----------------
1 file changed, 3 insertions(+), 17 deletions(-)
diff --git a/api/SimpleAdmin/SimpleAdmin.Web.Entry/wwwroot/CodeGen/Frontend/views/index.vue.vm b/api/SimpleAdmin/SimpleAdmin.Web.Entry/wwwroot/CodeGen/Frontend/views/index.vue.vm
index 3a8fb8cd..99eb09c0 100644
--- a/api/SimpleAdmin/SimpleAdmin.Web.Entry/wwwroot/CodeGen/Frontend/views/index.vue.vm
+++ b/api/SimpleAdmin/SimpleAdmin.Web.Entry/wwwroot/CodeGen/Frontend/views/index.vue.vm
@@ -155,10 +155,8 @@ var showColumns= tableFieIds.Where(it => it.WhetherTable == "Y").ToList();//获
- 新增
-
- 删除
-
+ 新增@(@Model.FunctionName)
+ title="确定要删除选中@(@Model.FunctionName)吗?" buttonName="删除@(@Model.FunctionName)" :selectedRowKeys="selectedRowKeys" @@batchDelete="deleteBatch@(@Model.ClassName)"/>
@@ -318,19 +316,7 @@ var isSelect=searchColumns.Any(it => it.EffectType=="select"||it.EffectType=="ra
}
// 批量删除
- const deleteBatch@(@Model.ClassName) = () => {
- if (selectedRowKeys.value.length < 1) {
- message.warning('请选择一条或多条数据')
- return false
- }
- const params = selectedRowKeys.value.map((m) => {
- return {
- @foreach (var column in tableFieIds){//遍历字段
- @if(column.IsPrimarykey=="Y"){//如果是主键
- @:@column.FieldNameFirstLower: m
- }}
- }
- })
+ const deleteBatch@(@Model.ClassName) = (params) => {
@(@Model.ClassNameFirstLower)Api.@(@Model.ClassNameFirstLower)Delete(params).then(() => {
table.value.clearRefreshSelected()
})