mirror of
https://gitee.com/DotNetNext/ReZero.git
synced 2025-12-06 16:59:17 +08:00
添加全删功能
This commit is contained in:
@@ -250,6 +250,11 @@ namespace ReZero.SuperAPI
|
||||
addItem.IsInitialized = true;
|
||||
addItem.Id = InterfaceListInitializerProvider.GetSavePermissionModelById_Id;
|
||||
}
|
||||
if (addItem.Url == PubConst.InitApi_DeleteEntity)
|
||||
{
|
||||
addItem.IsInitialized = true;
|
||||
addItem.Id = InterfaceListInitializerProvider.DeleteEntityId;
|
||||
}
|
||||
zeroInterfaceLists.Add(addItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -381,6 +381,9 @@ namespace ReZero.SuperAPI
|
||||
[ChineseTextAttribute("获取License")]
|
||||
[EnglishTextAttribute("Get license")]
|
||||
public const long GetLicenseId = 80;
|
||||
[ChineseTextAttribute("删除实体")]
|
||||
[EnglishTextAttribute("Delete Entity")]
|
||||
public const long DeleteEntityId = 81;
|
||||
|
||||
private static ZeroInterfaceList GetNewItem(Action<ZeroInterfaceList> action)
|
||||
{
|
||||
|
||||
@@ -217,6 +217,18 @@ namespace ReZero.SuperAPI
|
||||
{
|
||||
return new MethodApi().ExecTemplateByViewWithoutCreatingFiles(databaseId, viewName, isView, templateId);
|
||||
}
|
||||
[ApiMethod(nameof(InternalInitApi.DeleteEntity), GroupName = nameof(ZeroEntityInfo), Url = PubConst.InitApi_DeleteEntity)]
|
||||
public bool DeleteEntity(string ids)
|
||||
{
|
||||
var db = App.Db;
|
||||
var idArray=db.Utilities.DeserializeObject<List<long>>(ids);
|
||||
db.Updateable<ZeroEntityInfo>()
|
||||
.SetColumns(it=>new ZeroEntityInfo()
|
||||
{
|
||||
IsDeleted=true
|
||||
}).Where(it => idArray.Contains(it.Id)).ExecuteCommand();
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Token
|
||||
|
||||
@@ -82,6 +82,7 @@ namespace ReZero.SuperAPI
|
||||
public const string InitApi_GetCurrentUser = "/Public/User";
|
||||
public const string InitApi_GetBizUsers = "/PrivateReZeroRoute/100003/GetBizUsers";
|
||||
public const string InitApi_ViewTemplate = "/PrivateReZeroRoute/100003/ViewTemplate";
|
||||
public const string InitApi_DeleteEntity = "/PrivateReZeroRoute/100003/DeleteSelectedEntities";
|
||||
public const string InitApi_AddTokenManage = "/PrivateReZeroRoute/100003/AddTokenManage";
|
||||
public const string InitApi_UpdateTokenManage = "/PrivateReZeroRoute/100003/UpdateTokenManage";
|
||||
public const string InitApi_DeleteTokenManage = "/PrivateReZeroRoute/100003/DeleteTokenManage";
|
||||
|
||||
@@ -570,7 +570,7 @@
|
||||
if (!confirm("确定要删除选中的实体吗?")) {
|
||||
return;
|
||||
}
|
||||
var url = "/PrivateReZeroRoute/100003/DeleteEntityInfoBatch";
|
||||
var url = "/PrivateReZeroRoute/100003/DeleteSelectedEntities";
|
||||
axios.post(url, { ids: this.selectedItems }, jwHeader)
|
||||
.then(response => {
|
||||
if (response.data && response.data.message) {
|
||||
|
||||
Reference in New Issue
Block a user