34 changed files with 1403 additions and 146 deletions
@ -0,0 +1,24 @@ |
|||||
|
# LINGYUN.Platform.Domain |
||||
|
|
||||
|
平台管理模块 |
||||
|
|
||||
|
#### 注意 |
||||
|
|
||||
|
> 动态菜单管理 |
||||
|
|
||||
|
## IDataSeedContributor |
||||
|
说明: 用于预置菜单数据的接口,模块默认已初始化与vue-admin相关的菜单 |
||||
|
|
||||
|
## 其他注意事项 |
||||
|
不论是布局(path)还是菜单(component),都不需要添加 @/ 的前缀(这通常在前端定义路由时需要),因为前端不支持这样的形式 |
||||
|
|
||||
|
|
||||
|
## 配置使用 |
||||
|
|
||||
|
|
||||
|
```csharp |
||||
|
[DependsOn(typeof(PlatformDomainModule))] |
||||
|
public class YouProjectModule : AbpModule |
||||
|
{ |
||||
|
// other |
||||
|
} |
||||
Binary file not shown.
@ -0,0 +1,641 @@ |
|||||
|
// <auto-generated />
|
||||
|
using System; |
||||
|
using LINGYUN.Platform.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.EntityFrameworkCore.Infrastructure; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
|
||||
|
namespace LINGYUN.Platform.Migrations |
||||
|
{ |
||||
|
[DbContext(typeof(PlatformHttpApiHostMigrationsDbContext))] |
||||
|
[Migration("20201221093615_Remove-Layout-Column-Code")] |
||||
|
partial class RemoveLayoutColumnCode |
||||
|
{ |
||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
||||
|
{ |
||||
|
#pragma warning disable 612, 618
|
||||
|
modelBuilder |
||||
|
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.MySql) |
||||
|
.HasAnnotation("ProductVersion", "3.1.8") |
||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 64); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Datas.Data", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Code") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Code") |
||||
|
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(1024); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid?>("DeleterId") |
||||
|
.HasColumnName("DeleterId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnName("DeletionTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<string>("Description") |
||||
|
.HasColumnName("Description") |
||||
|
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(1024); |
||||
|
|
||||
|
b.Property<string>("DisplayName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("DisplayName") |
||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnName("IsDeleted") |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Name") |
||||
|
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(30); |
||||
|
|
||||
|
b.Property<Guid?>("ParentId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Name"); |
||||
|
|
||||
|
b.ToTable("AppPlatformDatas"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<bool>("AllowBeNull") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(true); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid>("DataId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("DefaultValue") |
||||
|
.HasColumnName("DefaultValue") |
||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<Guid?>("DeleterId") |
||||
|
.HasColumnName("DeleterId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnName("DeletionTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<string>("Description") |
||||
|
.HasColumnName("Description") |
||||
|
.HasColumnType("varchar(1024) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(1024); |
||||
|
|
||||
|
b.Property<string>("DisplayName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("DisplayName") |
||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnName("IsDeleted") |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Name") |
||||
|
.HasColumnType("varchar(30) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(30); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<int>("ValueType") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("DataId"); |
||||
|
|
||||
|
b.HasIndex("Name"); |
||||
|
|
||||
|
b.ToTable("AppPlatformDataItems"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Layouts.Layout", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid>("DataId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid?>("DeleterId") |
||||
|
.HasColumnName("DeleterId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnName("DeletionTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<string>("Description") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<string>("DisplayName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("DisplayName") |
||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnName("IsDeleted") |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Name") |
||||
|
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<string>("Path") |
||||
|
.HasColumnName("Path") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<int>("PlatformType") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<string>("Redirect") |
||||
|
.HasColumnName("Redirect") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.ToTable("AppPlatformLayouts"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Menus.Menu", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Code") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Code") |
||||
|
.HasColumnType("varchar(23) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(23); |
||||
|
|
||||
|
b.Property<string>("Component") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Component") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid?>("DeleterId") |
||||
|
.HasColumnName("DeleterId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnName("DeletionTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<string>("Description") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<string>("DisplayName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("DisplayName") |
||||
|
.HasColumnType("varchar(128) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(128); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnName("IsDeleted") |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false); |
||||
|
|
||||
|
b.Property<bool>("IsPublic") |
||||
|
.HasColumnType("tinyint(1)"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid>("LayoutId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Name") |
||||
|
.HasColumnType("varchar(64) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(64); |
||||
|
|
||||
|
b.Property<Guid?>("ParentId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Path") |
||||
|
.HasColumnName("Path") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<int>("PlatformType") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<string>("Redirect") |
||||
|
.HasColumnName("Redirect") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.ToTable("AppPlatformMenus"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Menus.RoleMenu", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid>("MenuId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("RoleName") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("RoleName") |
||||
|
.HasColumnType("varchar(256) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(256); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("RoleName", "MenuId"); |
||||
|
|
||||
|
b.ToTable("AppPlatformRoleMenus"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Menus.UserMenu", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid>("MenuId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid>("UserId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("UserId", "MenuId"); |
||||
|
|
||||
|
b.ToTable("AppPlatformUserMenus"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Versions.AppVersion", b => |
||||
|
{ |
||||
|
b.Property<Guid>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("ConcurrencyStamp") |
||||
|
.IsConcurrencyToken() |
||||
|
.HasColumnName("ConcurrencyStamp") |
||||
|
.HasColumnType("varchar(40) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(40); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<Guid?>("DeleterId") |
||||
|
.HasColumnName("DeleterId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime?>("DeletionTime") |
||||
|
.HasColumnName("DeletionTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<string>("Description") |
||||
|
.HasColumnName("Description") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(2048); |
||||
|
|
||||
|
b.Property<string>("ExtraProperties") |
||||
|
.HasColumnName("ExtraProperties") |
||||
|
.HasColumnType("longtext CHARACTER SET utf8mb4"); |
||||
|
|
||||
|
b.Property<bool>("IsDeleted") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnName("IsDeleted") |
||||
|
.HasColumnType("tinyint(1)") |
||||
|
.HasDefaultValue(false); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<int>("Level") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<int>("PlatformType") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Title") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Title") |
||||
|
.HasColumnType("varchar(50) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(50); |
||||
|
|
||||
|
b.Property<string>("Version") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Version") |
||||
|
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(20); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("Version"); |
||||
|
|
||||
|
b.ToTable("AppPlatformVersion"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
||||
|
{ |
||||
|
b.Property<int>("Id") |
||||
|
.ValueGeneratedOnAdd() |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<Guid>("AppVersionId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<DateTime>("CreationTime") |
||||
|
.HasColumnName("CreationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("CreatorId") |
||||
|
.HasColumnName("CreatorId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<int>("DownloadCount") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<int>("FileType") |
||||
|
.HasColumnType("int"); |
||||
|
|
||||
|
b.Property<DateTime?>("LastModificationTime") |
||||
|
.HasColumnName("LastModificationTime") |
||||
|
.HasColumnType("datetime(6)"); |
||||
|
|
||||
|
b.Property<Guid?>("LastModifierId") |
||||
|
.HasColumnName("LastModifierId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Name") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Name") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<string>("Path") |
||||
|
.HasColumnName("Path") |
||||
|
.HasColumnType("varchar(255) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(255); |
||||
|
|
||||
|
b.Property<string>("SHA256") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("SHA256") |
||||
|
.HasColumnType("varchar(65) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(65); |
||||
|
|
||||
|
b.Property<long>("Size") |
||||
|
.HasColumnType("bigint"); |
||||
|
|
||||
|
b.Property<Guid?>("TenantId") |
||||
|
.HasColumnName("TenantId") |
||||
|
.HasColumnType("char(36)"); |
||||
|
|
||||
|
b.Property<string>("Version") |
||||
|
.IsRequired() |
||||
|
.HasColumnName("Version") |
||||
|
.HasColumnType("varchar(20) CHARACTER SET utf8mb4") |
||||
|
.HasMaxLength(20); |
||||
|
|
||||
|
b.HasKey("Id"); |
||||
|
|
||||
|
b.HasIndex("AppVersionId"); |
||||
|
|
||||
|
b.HasIndex("Path", "Name", "Version") |
||||
|
.IsUnique(); |
||||
|
|
||||
|
b.ToTable("AppPlatformVersionFile"); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Datas.DataItem", b => |
||||
|
{ |
||||
|
b.HasOne("LINGYUN.Platform.Datas.Data", null) |
||||
|
.WithMany("Items") |
||||
|
.HasForeignKey("DataId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
|
||||
|
modelBuilder.Entity("LINGYUN.Platform.Versions.VersionFile", b => |
||||
|
{ |
||||
|
b.HasOne("LINGYUN.Platform.Versions.AppVersion", "AppVersion") |
||||
|
.WithMany("Files") |
||||
|
.HasForeignKey("AppVersionId") |
||||
|
.OnDelete(DeleteBehavior.Cascade) |
||||
|
.IsRequired(); |
||||
|
}); |
||||
|
#pragma warning restore 612, 618
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace LINGYUN.Platform.Migrations |
||||
|
{ |
||||
|
public partial class RemoveLayoutColumnCode : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropColumn( |
||||
|
name: "Code", |
||||
|
table: "AppPlatformLayouts"); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.AddColumn<string>( |
||||
|
name: "Code", |
||||
|
table: "AppPlatformLayouts", |
||||
|
type: "longtext CHARACTER SET utf8mb4", |
||||
|
nullable: true); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,37 @@ |
|||||
|
import { RouteConfig } from 'vue-router' |
||||
|
import Layout from '@/layout/index.vue' |
||||
|
|
||||
|
const containerRouter: RouteConfig = { |
||||
|
path: '/container', |
||||
|
component: Layout, |
||||
|
meta: { |
||||
|
title: 'container', |
||||
|
icon: 'container', |
||||
|
roles: ['Platform.Layout', 'Platform.Menus'], |
||||
|
alwaysShow: true |
||||
|
}, |
||||
|
children: [ |
||||
|
{ |
||||
|
path: 'layouts', |
||||
|
component: () => import(/* webpackChunkName: "layouts" */ '@/views/container/layouts/index.vue'), |
||||
|
name: 'layouts', |
||||
|
meta: { |
||||
|
title: 'layouts', |
||||
|
icon: 'layouts', |
||||
|
roles: ['Platform.Layout'] |
||||
|
} |
||||
|
}, |
||||
|
{ |
||||
|
path: 'menus', |
||||
|
component: () => import(/* webpackChunkName: "menus" */ '@/views/container/menus/index.vue'), |
||||
|
name: 'menus', |
||||
|
meta: { |
||||
|
title: 'menus', |
||||
|
icon: 'menus', |
||||
|
roles: ['ApiGateway.Menus'] |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
|
||||
|
export default containerRouter |
||||
@ -0,0 +1,275 @@ |
|||||
|
<template> |
||||
|
<el-dialog |
||||
|
v-el-draggable-dialog |
||||
|
width="800px" |
||||
|
:visible="showDialog" |
||||
|
:title="title" |
||||
|
custom-class="modal-form" |
||||
|
:show-close="false" |
||||
|
:close-on-click-modal="false" |
||||
|
:close-on-press-escape="false" |
||||
|
@close="onFormClosed(false)" |
||||
|
> |
||||
|
<el-form |
||||
|
ref="formLayout" |
||||
|
:model="layout" |
||||
|
label-width="120px" |
||||
|
> |
||||
|
<el-form-item |
||||
|
:label="$t('AppPlatform.DisplayName:PlatformType')" |
||||
|
:rules="{ |
||||
|
required: true, |
||||
|
message: $t('pleaseInputBy', {key: $t('AppPlatform.DisplayName:PlatformType')}), |
||||
|
trigger: 'blur' |
||||
|
}" |
||||
|
> |
||||
|
<el-select |
||||
|
v-model="layout.platformType" |
||||
|
style="width: 100%;" |
||||
|
class="filter-item" |
||||
|
clearable |
||||
|
:placeholder="$t('pleaseSelectBy', {name: $t('AppPlatform.DisplayName:PlatformType')})" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="platformType in platformTypes" |
||||
|
:key="platformType.key" |
||||
|
:label="platformType.key" |
||||
|
:value="platformType.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
v-if="!isEdit" |
||||
|
:label="$t('AppPlatform.DisplayName:DataDictionary')" |
||||
|
:rules="{ |
||||
|
required: true |
||||
|
}" |
||||
|
> |
||||
|
<el-select |
||||
|
v-model="dataId" |
||||
|
style="width: 100%;" |
||||
|
class="filter-item" |
||||
|
clearable |
||||
|
:placeholder="$t('pleaseSelectBy', {name: $t('AppPlatform.DisplayName:DataDictionary')})" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="data in datas" |
||||
|
:key="data.name" |
||||
|
:label="data.displayName" |
||||
|
:value="data.id" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
prop="name" |
||||
|
:label="$t(('AppPlatform.DisplayName:Name'))" |
||||
|
:rules="{ |
||||
|
required: true, |
||||
|
message: $t('pleaseInputBy', {key: $t('AppPlatform.DisplayName:Name')}), |
||||
|
trigger: 'blur' |
||||
|
}" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="layout.name" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
prop="displayName" |
||||
|
:label="$t(('AppPlatform.DisplayName:DisplayName'))" |
||||
|
:rules="{ |
||||
|
required: true, |
||||
|
message: $t('pleaseInputBy', {key: $t('AppPlatform.DisplayName:DisplayName')}), |
||||
|
trigger: 'blur' |
||||
|
}" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="layout.displayName" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
prop="path" |
||||
|
:label="$t(('AppPlatform.DisplayName:Path'))" |
||||
|
:rules="{ |
||||
|
required: true, |
||||
|
message: $t('pleaseInputBy', {key: $t('AppPlatform.DisplayName:Path')}), |
||||
|
trigger: 'blur' |
||||
|
}" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="layout.path" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
prop="redirect" |
||||
|
:label="$t(('AppPlatform.DisplayName:Redirect'))" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="layout.redirect" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
prop="description" |
||||
|
:label="$t(('AppPlatform.DisplayName:Description'))" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="layout.description" |
||||
|
type="textarea" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
|
||||
|
<el-form-item> |
||||
|
<el-button |
||||
|
class="cancel" |
||||
|
type="info" |
||||
|
@click="onFormClosed(false)" |
||||
|
> |
||||
|
{{ $t('AbpUi.Cancel') }} |
||||
|
</el-button> |
||||
|
<el-button |
||||
|
class="confirm" |
||||
|
type="primary" |
||||
|
icon="el-icon-check" |
||||
|
@click="onSave" |
||||
|
> |
||||
|
{{ $t('AbpUi.Save') }} |
||||
|
</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-dialog> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts"> |
||||
|
import { Component, Vue, Prop, Watch } from 'vue-property-decorator' |
||||
|
|
||||
|
import { Form } from 'element-ui' |
||||
|
import DataService, { Data } from '@/api/data-dictionary' |
||||
|
import LayoutService, { |
||||
|
Layout, |
||||
|
LayoutCreateOrUpdate, |
||||
|
LayoutCreate, |
||||
|
LayoutUpdate, |
||||
|
PlatformTypes |
||||
|
} from '@/api/layout' |
||||
|
|
||||
|
@Component({ |
||||
|
name: 'CreateOrUpdateLayoutDialog' |
||||
|
}) |
||||
|
export default class CreateOrUpdateLayoutDialog extends Vue { |
||||
|
@Prop({ default: false }) |
||||
|
private showDialog!: boolean |
||||
|
|
||||
|
@Prop({ default: null }) |
||||
|
private layoutId!: string |
||||
|
|
||||
|
private layout = new Layout() |
||||
|
private datas = new Array<Data>() |
||||
|
private platformTypes = PlatformTypes |
||||
|
private dataId = '' |
||||
|
|
||||
|
get isEdit() { |
||||
|
if (this.layoutId) { |
||||
|
return true |
||||
|
} |
||||
|
return false |
||||
|
} |
||||
|
|
||||
|
get title() { |
||||
|
if (this.isEdit) { |
||||
|
return this.$t('AppPlatform.Layout:EditByName', { 0: this.layout.displayName }) |
||||
|
} |
||||
|
return this.$t('AppPlatform.Layout:AddNew') |
||||
|
} |
||||
|
|
||||
|
@Watch('showDialog') |
||||
|
private onShowDialogChanged() { |
||||
|
this.handleGetLayout() |
||||
|
} |
||||
|
|
||||
|
mounted() { |
||||
|
this.handleGetDataDictionarys() |
||||
|
} |
||||
|
|
||||
|
private handleGetDataDictionarys() { |
||||
|
DataService |
||||
|
.getAll() |
||||
|
.then(res => { |
||||
|
this.datas = res.items |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
private handleGetLayout() { |
||||
|
if (this.showDialog && this.layoutId) { |
||||
|
LayoutService |
||||
|
.get(this.layoutId) |
||||
|
.then(res => { |
||||
|
this.layout = res |
||||
|
}) |
||||
|
} else { |
||||
|
this.layout = new Layout() |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private onSave() { |
||||
|
const formLayout = this.$refs.formLayout as Form |
||||
|
formLayout |
||||
|
.validate(valid => { |
||||
|
if (valid) { |
||||
|
if (this.isEdit) { |
||||
|
const update = new LayoutUpdate() |
||||
|
this.updateMenuByInput(update) |
||||
|
LayoutService |
||||
|
.update(this.layoutId, update) |
||||
|
.then(res => { |
||||
|
this.layout = res |
||||
|
this.$message.success(this.$t('successful').toString()) |
||||
|
this.onFormClosed(true) |
||||
|
}) |
||||
|
} else { |
||||
|
if (!this.dataId) { |
||||
|
this.$message.warning(this.$t('pleaseSelectBy', { key: this.$t('AppPlatform.DisplayName:DataDictionary') }).toString()) |
||||
|
return |
||||
|
} |
||||
|
const create = new LayoutCreate() |
||||
|
this.updateMenuByInput(create) |
||||
|
create.dataId = this.dataId |
||||
|
LayoutService |
||||
|
.create(create) |
||||
|
.then(res => { |
||||
|
this.layout = res |
||||
|
this.$message.success(this.$t('successful').toString()) |
||||
|
this.onFormClosed(true) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
private onFormClosed(changed: boolean) { |
||||
|
const formLayout = this.$refs.formLayout as Form |
||||
|
formLayout.resetFields() |
||||
|
this.$emit('closed', changed) |
||||
|
} |
||||
|
|
||||
|
private updateMenuByInput(update: LayoutCreateOrUpdate) { |
||||
|
update.name = this.layout.name |
||||
|
update.path = this.layout.path |
||||
|
update.displayName = this.layout.displayName |
||||
|
update.description = this.layout.description |
||||
|
update.redirect = this.layout.redirect |
||||
|
update.platformType = this.layout.platformType |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.confirm { |
||||
|
position: absolute; |
||||
|
right: 10px; |
||||
|
width:100px; |
||||
|
} |
||||
|
.cancel { |
||||
|
position: absolute; |
||||
|
right: 120px; |
||||
|
width:100px; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,237 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<div class="filter-container"> |
||||
|
<el-form inline> |
||||
|
<el-form-item |
||||
|
label-width="100px" |
||||
|
:label="$t('AppPlatform.DisplayName:Filter')" |
||||
|
> |
||||
|
<el-input |
||||
|
v-model="dataFilter.filter" |
||||
|
/> |
||||
|
</el-form-item> |
||||
|
<el-form-item |
||||
|
label-width="100px" |
||||
|
:label="$t('AppPlatform.DisplayName:PlatformType')" |
||||
|
> |
||||
|
<el-select |
||||
|
v-model="dataFilter.platformType" |
||||
|
class="filter-item" |
||||
|
clearable |
||||
|
:placeholder="$t('pleaseSelectBy', {name: $t('AppPlatform.DisplayName:PlatformType')})" |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in platformTypes" |
||||
|
:key="item.key" |
||||
|
:label="item.key" |
||||
|
:value="item.value" |
||||
|
/> |
||||
|
</el-select> |
||||
|
</el-form-item> |
||||
|
<el-button |
||||
|
class="filter-item" |
||||
|
style="width: 150px; margin-left: 10px;" |
||||
|
type="primary" |
||||
|
@click="refreshPagedData" |
||||
|
> |
||||
|
<i class="el-icon-search" /> |
||||
|
{{ $t('AppPlatform.DisplayName:SecrchLayout') }} |
||||
|
</el-button> |
||||
|
<el-button |
||||
|
class="filter-item" |
||||
|
style="width: 150px; margin-left: 10px;" |
||||
|
type="success" |
||||
|
@click="handleAddLayout" |
||||
|
> |
||||
|
<i class="ivu-icon ivu-icon-md-add" /> |
||||
|
{{ $t('AppPlatform.Layout:AddNew') }} |
||||
|
</el-button> |
||||
|
</el-form> |
||||
|
</div> |
||||
|
|
||||
|
<el-table |
||||
|
v-loading="dataLoading" |
||||
|
row-key="id" |
||||
|
:data="dataList" |
||||
|
border |
||||
|
fit |
||||
|
highlight-current-row |
||||
|
style="width: 100%;" |
||||
|
@sort-change="handleSortChange" |
||||
|
> |
||||
|
<el-table-column |
||||
|
:label="$t('AppPlatform.DisplayName:Name')" |
||||
|
prop="Name" |
||||
|
sortable |
||||
|
width="200px" |
||||
|
> |
||||
|
<template slot-scope="{row}"> |
||||
|
<span>{{ row.name }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
:label="$t('AppPlatform.DisplayName:Path')" |
||||
|
prop="path" |
||||
|
sortable |
||||
|
width="250px" |
||||
|
> |
||||
|
<template slot-scope="{row}"> |
||||
|
<el-tag> |
||||
|
{{ row.path }} |
||||
|
</el-tag> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
:label="$t('AppPlatform.DisplayName:DisplayName')" |
||||
|
prop="displayName" |
||||
|
sortable |
||||
|
width="250px" |
||||
|
> |
||||
|
<template slot-scope="{row}"> |
||||
|
<span>{{ row.displayName }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
:label="$t('AppPlatform.DisplayName:Description')" |
||||
|
prop="description" |
||||
|
sortable |
||||
|
width="250px" |
||||
|
> |
||||
|
<template slot-scope="{row}"> |
||||
|
<span>{{ row.description }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
:label="$t('AppPlatform.DisplayName:Redirect')" |
||||
|
prop="redirect" |
||||
|
sortable |
||||
|
width="250px" |
||||
|
> |
||||
|
<template slot-scope="{row}"> |
||||
|
<span>{{ row.redirect }}</span> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
<el-table-column |
||||
|
:label="$t('operaActions')" |
||||
|
align="center" |
||||
|
min-width="200px" |
||||
|
> |
||||
|
<template slot-scope="{row}"> |
||||
|
<el-button |
||||
|
:disabled="!checkPermission(['Platform.Layout.Update'])" |
||||
|
size="mini" |
||||
|
type="primary" |
||||
|
icon="el-icon-edit" |
||||
|
@click="handleEditLayout(row.id)" |
||||
|
/> |
||||
|
<el-button |
||||
|
:disabled="!checkPermission(['Platform.Layout.Delete'])" |
||||
|
size="mini" |
||||
|
type="danger" |
||||
|
icon="el-icon-delete" |
||||
|
@click="handleRemoveLayout(row)" |
||||
|
/> |
||||
|
</template> |
||||
|
</el-table-column> |
||||
|
</el-table> |
||||
|
|
||||
|
<pagination |
||||
|
v-show="dataTotal>0" |
||||
|
:total="dataTotal" |
||||
|
:page.sync="currentPage" |
||||
|
:limit.sync="pageSize" |
||||
|
@pagination="refreshPagedData" |
||||
|
@sort-change="handleSortChange" |
||||
|
/> |
||||
|
|
||||
|
<create-or-update-layout-dialog |
||||
|
:show-dialog="showEditDialog" |
||||
|
:layout-id="editLayoutId" |
||||
|
@closed="onLayoutEditDialogClosed" |
||||
|
/> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts"> |
||||
|
import { dateFormat, abpPagerFormat } from '@/utils' |
||||
|
import { checkPermission } from '@/utils/permission' |
||||
|
import LayoutService, { Layout, GetLayoutByPaged, PlatformTypes } from '@/api/layout' |
||||
|
import DataListMiXin from '@/mixins/DataListMiXin' |
||||
|
import Component, { mixins } from 'vue-class-component' |
||||
|
import Pagination from '@/components/Pagination/index.vue' |
||||
|
import CreateOrUpdateLayoutDialog from './components/CreateOrUpdateLayoutDialog.vue' |
||||
|
|
||||
|
@Component({ |
||||
|
name: 'Layouts', |
||||
|
components: { |
||||
|
Pagination, |
||||
|
CreateOrUpdateLayoutDialog |
||||
|
}, |
||||
|
filters: { |
||||
|
dateTimeFormatFilter(dateTime: Date) { |
||||
|
return dateFormat(new Date(dateTime), 'YYYY-mm-dd HH:MM:SS:NS') |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
checkPermission |
||||
|
} |
||||
|
}) |
||||
|
export default class extends mixins(DataListMiXin) { |
||||
|
public dataFilter = new GetLayoutByPaged() |
||||
|
private showEditDialog = false |
||||
|
private editLayoutId = '' |
||||
|
|
||||
|
private platformTypes = PlatformTypes |
||||
|
|
||||
|
mounted() { |
||||
|
this.refreshPagedData() |
||||
|
} |
||||
|
|
||||
|
protected processDataFilter() { |
||||
|
this.dataFilter.skipCount = abpPagerFormat(this.currentPage, this.pageSize) |
||||
|
} |
||||
|
|
||||
|
protected getPagedList(filter: any) { |
||||
|
return LayoutService.getList(filter) |
||||
|
} |
||||
|
|
||||
|
private handleRemoveLayout(layout: Layout) { |
||||
|
this.$confirm(this.l('questingDeleteByMessage', { message: layout.displayName }), |
||||
|
this.l('AppPlatform.Layout:Delete'), { |
||||
|
callback: (action) => { |
||||
|
if (action === 'confirm') { |
||||
|
LayoutService |
||||
|
.delete(layout.id) |
||||
|
.then(() => { |
||||
|
this.$message.success(this.l('successful')) |
||||
|
this.refreshPagedData() |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
private handleAddLayout() { |
||||
|
this.editLayoutId = '' |
||||
|
this.showEditDialog = true |
||||
|
} |
||||
|
|
||||
|
private handleEditLayout(id: string) { |
||||
|
this.editLayoutId = id |
||||
|
this.showEditDialog = true |
||||
|
} |
||||
|
|
||||
|
private onLayoutEditDialogClosed(changed: boolean) { |
||||
|
this.showEditDialog = false |
||||
|
if (changed) { |
||||
|
this.refreshPagedData() |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.data-filter-collapse-title { |
||||
|
font-size: 15px; |
||||
|
} |
||||
|
</style> |
||||
Loading…
Reference in new issue