Browse Source

Merge pull request #80 from colinin/3.1

enhanced submit
pull/81/head
cKey 5 years ago
committed by GitHub
parent
commit
b824726b7b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      aspnet-core/LINGYUN.MicroService.sln
  2. 0
      aspnet-core/configuration/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json
  3. 21
      aspnet-core/database/ApiGateway-Init-SqlServer.sql
  4. 40
      aspnet-core/database/ApiGateway-Init.sql
  5. 4
      aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN/Abp/TenantManagement/TenantController.cs
  6. 0
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/.gitignore
  7. 8
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/BackendAdminHostModule.cs
  8. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Controllers/LocationController.cs
  9. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Dockerfile
  10. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminHostMigrationsDbContext.cs
  11. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminHostMigrationsDbContextFactory.cs
  12. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs
  13. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs
  14. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs
  15. 10
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj
  16. 0
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Localization/en.json
  17. 0
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Localization/zh-Hans.json
  18. 4
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.Designer.cs
  19. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.cs
  20. 4
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.Designer.cs
  21. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.cs
  22. 4
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs
  23. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/MultiTenancy/AuthorizationTenantResolveContributor.cs
  24. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Program.cs
  25. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Properties/launchSettings.json
  26. 2
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Startup.cs
  27. 0
      aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/tempkey.rsa
  28. BIN
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db
  29. 2
      aspnet-core/services/cleanup-logs.bat
  30. 2
      aspnet-core/services/start-backend-admin.bat
  31. 2
      vueJs/src/App.vue
  32. 2
      vueJs/src/api/organizationunit.ts
  33. 2
      vueJs/src/api/roles.ts
  34. 27
      vueJs/src/api/tenant-management.ts
  35. 2
      vueJs/src/components/LangSelect/index.vue
  36. 4
      vueJs/src/components/TenantBox/index.vue
  37. 99
      vueJs/src/mixins/DataListMiXin.ts
  38. 2
      vueJs/src/store/modules/abp.ts
  39. 6
      vueJs/src/store/modules/user.ts
  40. 84
      vueJs/src/views/admin/apigateway/aggregateRoute.vue
  41. 70
      vueJs/src/views/admin/apigateway/global.vue
  42. 77
      vueJs/src/views/admin/apigateway/group.vue
  43. 82
      vueJs/src/views/admin/apigateway/route.vue
  44. 23
      vueJs/src/views/admin/components/FeatureManagement.vue
  45. 81
      vueJs/src/views/admin/identityServer/api-resources/index.vue
  46. 100
      vueJs/src/views/admin/identityServer/client/index.vue
  47. 74
      vueJs/src/views/admin/identityServer/identity-resources/index.vue
  48. 43
      vueJs/src/views/admin/organization-unit/components/RoleOrganizationUint.vue
  49. 29
      vueJs/src/views/admin/organization-unit/components/UserOrganizationUint.vue
  50. 45
      vueJs/src/views/admin/roles/index.vue
  51. 2
      vueJs/src/views/admin/tenants/components/TenantCreateOrEditForm.vue
  52. 2
      vueJs/src/views/admin/tenants/components/TenantEditConnectionForm.vue
  53. 2
      vueJs/src/views/admin/tenants/components/TenantFeatureEditForm.vue
  54. 73
      vueJs/src/views/admin/tenants/index.vue
  55. 72
      vueJs/src/views/admin/users/index.vue
  56. 77
      vueJs/src/views/file-management/index.vue

2
aspnet-core/LINGYUN.MicroService.sln

@ -59,7 +59,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.TenantManagemen
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "platform", "platform", "{E5D1B78A-1A8F-4D52-BF99-A4A863ADE898}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.BackendAdminApp.Host", "services\admin\LINGYUN.BackendAdminApp.Host\LINGYUN.BackendAdminApp.Host.csproj", "{85090598-6B03-43D3-BE61-1E9777252D50}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.BackendAdmin.HttpApi.Host", "services\admin\LINGYUN.Abp.BackendAdmin.HttpApi.Host\LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj", "{85090598-6B03-43D3-BE61-1E9777252D50}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{8AC72641-30D3-4ACF-89FA-808FADC55C2E}"
EndProject

0
aspnet-core/configuration/admin/LINGYUN.BackendAdminApp.Host/appsettings.Development.json → aspnet-core/configuration/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/appsettings.Development.json

21
aspnet-core/database/ApiGateway-Init-SqlServer.sql

File diff suppressed because one or more lines are too long

40
aspnet-core/database/ApiGateway-Init.sql

@ -1,5 +1,5 @@
/*
Navicat MySQL Data Transfer
Navicat Premium Data Transfer
Source Server :
Source Server Type : MySQL
@ -11,7 +11,7 @@
Target Server Version : 80020
File Encoding : 65001
Date: 12/09/2020 15:21:54
Date: 15/09/2020 14:50:52
*/
SET NAMES utf8mb4;
@ -90,7 +90,7 @@ CREATE TABLE `appapigatewayauthoptions` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayAuthOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayAuthOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 126 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayauthoptions
@ -208,7 +208,7 @@ CREATE TABLE `appapigatewaybalanceroptions` (
UNIQUE INDEX `IX_AppApiGatewayBalancerOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayBalancerOptions_AppApiGatewayGlobalConfiguratio~` FOREIGN KEY (`ItemId`) REFERENCES `appapigatewayglobalconfiguration` (`ItemId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayBalancerOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 129 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 131 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewaybalanceroptions
@ -323,7 +323,7 @@ CREATE TABLE `appapigatewaycacheoptions` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayCacheOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayCacheOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 126 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewaycacheoptions
@ -367,8 +367,8 @@ INSERT INTO `appapigatewaycacheoptions` VALUES (40, 1262665026111164416, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (41, 1262665159905267712, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (42, 1262665329829105664, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (43, 1262665456471920640, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (44, 1262665628165754880, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (45, 1262666172682883072, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (44, 1262665628165754880, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (45, 1262666172682883072, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (47, 1262723402331885568, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (48, 1262935771746734080, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (49, 1262935906522304512, 0, '');
@ -533,7 +533,7 @@ CREATE TABLE `appapigatewayhttpoptions` (
UNIQUE INDEX `IX_AppApiGatewayHttpOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayHttpOptions_AppApiGatewayGlobalConfiguration_It~` FOREIGN KEY (`ItemId`) REFERENCES `appapigatewayglobalconfiguration` (`ItemId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayHttpOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 129 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 131 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayhttpoptions
@ -652,7 +652,7 @@ CREATE TABLE `appapigatewayqosoptions` (
UNIQUE INDEX `IX_AppApiGatewayQoSOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayQoSOptions_AppApiGatewayGlobalConfiguration_Ite~` FOREIGN KEY (`ItemId`) REFERENCES `appapigatewayglobalconfiguration` (`ItemId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayQoSOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 129 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 131 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayqosoptions
@ -795,7 +795,7 @@ CREATE TABLE `appapigatewayratelimitrule` (
UNIQUE INDEX `IX_AppApiGatewayRateLimitRule_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayRateLimitRule_AppApiGatewayDynamicReRoute_Dynam~` FOREIGN KEY (`DynamicReRouteId`) REFERENCES `appapigatewaydynamicreroute` (`DynamicReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayRateLimitRule_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 126 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayratelimitrule
@ -935,7 +935,7 @@ CREATE TABLE `appapigatewayreroute` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `AK_AppApiGatewayReRoute_ReRouteId`(`ReRouteId`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayReRoute_AppId_DownstreamPathTemplate_UpstreamPa~`(`AppId`, `DownstreamPathTemplate`, `UpstreamPathTemplate`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 133 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 135 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayreroute
@ -979,8 +979,8 @@ INSERT INTO `appapigatewayreroute` VALUES (42, '{}', '33dd757b79cb4f52994af13bfb
INSERT INTO `appapigatewayreroute` VALUES (43, '{}', 'e46fd6cb3a104da3aadfe0149fe4de68', 1262665159905267712, '【身份认证服务】- 通过邮件查询用户', '/api/identity/users/by-email/{email}', '', '', '/api/identity/users/by-email/{email}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (44, '{}', '8c8ec5ad6aaa4145981ee7ac876c36c9', 1262665329829105664, '【身份认证服务】- 通过标识查询用户', '/api/identity/users/lookup/{id}', '', '', '/api/identity/users/lookup/{id}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (45, '{}', 'f5c0c8c02c0846fdbe5015cd86f3d81b', 1262665456471920640, '【身份认证服务】- 通过名称查询用户', '/api/identity/users/lookup/by-username/{userName}', '', '', '/api/identity/users/lookup/by-username/{userName}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (46, '{}', '4de0c9e0437f40ce81628de956af9c5e', 1262665628165754880, '身份认证服务】- 通过名称查询租户', '/api/abp/multi-tenancy/tenants/by-name/{name}', '', '', '/api/abp/multi-tenancy/tenants/by-name/{name}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (47, '{}', 'fa60a7253b2f4c80b9afad4e82ba6ba8', 1262666172682883072, '身份认证服务】- 通过标识查询租户', '/api/abp/multi-tenancy/tenants/by-id/{id}', '', '', '/api/abp/multi-tenancy/tenants/by-id/{id}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (46, '{}', 'ecf0ea4a3e3c4b2e8fa3621514d00c74', 1262665628165754880, '基础服务】- 通过名称查询租户', '/api/abp/multi-tenancy/tenants/by-name/{name}', '', '', '/api/abp/multi-tenancy/tenants/by-name/{name}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (47, '{}', '69132bc515b64005af4292ce0dee5626', 1262666172682883072, '基础服务】- 通过标识查询租户', '/api/abp/multi-tenancy/tenants/by-id/{id}', '', '', '/api/abp/multi-tenancy/tenants/by-id/{id}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (49, '{}', '4114a097b9e04a9e90458edf02ef41c7', 1262723402331885568, '【身份认证服务】- 克隆客户端', '/api/IdentityServer/Clients/Clone', '', '', '/api/IdentityServer/Clients/Clone', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (50, '{}', '2a9cc98d3ed0462d98c4bf0e946f410d', 1262935771746734080, '【身份认证服务】- 身份资源管理', '/api/IdentityServer/IdentityResources', '', '', '/api/IdentityServer/IdentityResources', 'GET,POST,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (51, '{}', '4d36b0ea5b92473ea5de3e91ff155830', 1262935906522304512, '【身份认证服务】- 查询身份资源', '/api/IdentityServer/IdentityResources/{Id}', '', '', '/api/IdentityServer/IdentityResources/{Id}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
@ -991,10 +991,10 @@ INSERT INTO `appapigatewayreroute` VALUES (57, '{}', '98fbc99fc8644946ac0a72cc3d
INSERT INTO `appapigatewayreroute` VALUES (59, '{}', 'c692b30c72d4424eb4740ac49f4e9373', 1263101898440146944, '【服务网关管理】- 框架配置', '/api/abp/application-configuration', '', '', '/api/abp/apigateway/application-configuration', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30001,', '', '', 'apigateway-configuration', 0, 120000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (60, '{}', '8409117162504f71aa66982f05c38a80', 1263303878648569856, '【平台服务】- 接口代理', '/api/abp/api-definition', '', '', '/api/abp/platform/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', 'platform-api-definition', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (61, '{}', '9f520820071b4e14bc94ab57989cea1f', 1263304204797648896, '【平台服务】- 框架配置', '/api/abp/application-configuration', '', '', '/api/abp/platform/application-configuration', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', 'platform-configuration', 0, 120000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (62, '{}', '59d2d5e16c1b4fc5ad044609bdc46115', 1263304872891555840, '【后台管理】- 租户管理', '/api/multi-tenancy/tenants', '', '', '/api/multi-tenancy/tenants', 'GET,POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (63, '{}', '1c49816c03c24c229ab923abf59b7bb6', 1263305106250047488, '【后台管理】- 特定租户管理', '/api/multi-tenancy/tenants/{id}', '', '', '/api/multi-tenancy/tenants/{id}', 'GET,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (64, '{}', '24c95b3702e94340a85c0d8cb594cdcb', 1263305244594970624, '【后台管理】- 租户连接字符串', '/api/multi-tenancy/tenants/{id}/connection-string', '', '', '/api/multi-tenancy/tenants/{id}/concatenation', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 2, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (65, '{}', '03c614b2785145dfb1547edf919190fc', 1263305430536855552, '【后台管理】- 特定租户连接字符串', '/api/multi-tenancy/tenants/{id}/connection-string/{name}', '', '', '/api/multi-tenancy/tenants/{id}/concatenation/{name}', 'GET,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (62, '{}', '530ab314560f41678b40f48da9383d51', 1263304872891555840, '【后台管理】- 租户管理', '/api/tenant-management/tenants', '', '', '/api/tenant-management/tenants', 'GET,POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (63, '{}', '21334c6da4c349cc883c38c13de0e754', 1263305106250047488, '【后台管理】- 特定租户管理', '/api/tenant-management/tenants/{id}', '', '', '/api/tenant-management/tenants/{id}', 'GET,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (64, '{}', 'cc8fdf1b2d0b414ebf2dc51a6dc78305', 1263305244594970624, '【后台管理】- 租户连接字符串', '/api/tenant-management/tenants/{id}/connection-string', '', '', '/api/tenant-management/tenants/{id}/concatenation', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 2, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (65, '{}', 'aaf285ed10da4024ba561d5cf8c6322b', 1263305430536855552, '【后台管理】- 特定租户连接字符串', '/api/tenant-management/tenants/{id}/connection-string/{name}', '', '', '/api/tenant-management/tenants/{id}/concatenation/{name}', 'GET,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (66, '{}', 'b6ec80673b354c239def3bdce31b4cc0', 1263639172959174656, '【后台管理】- 全局设置', '/api/setting-management/settings/by-global', '', '', '/api/setting-management/settings/by-global', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (67, '{}', '755b4dce5c34444785fa3b647fef4131', 1264799968944640000, '【身份认证服务】- 验证手机号', '/api/account/phone/verify', '', '', '/api/account/phone/verify', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (68, '{}', '535191c570ae453ab320012304d7a62c', 1264800070161584128, '【身份认证服务】- 手机号注册', '/api/account/phone/register', '', '', '/api/account/phone/register', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30015,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
@ -1079,7 +1079,7 @@ CREATE TABLE `appapigatewaysecurityoptions` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewaySecurityOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewaySecurityOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 126 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 128 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewaysecurityoptions
@ -1198,10 +1198,6 @@ CREATE TABLE `cap.published` (
INDEX `IX_ExpiresAt`(`ExpiresAt`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of cap.published
-- ----------------------------
-- ----------------------------
-- Table structure for cap.received
-- ----------------------------

4
aspnet-core/modules/tenants/LINGYUN.Abp.TenantManagement.HttpApi/LINGYUN/Abp/TenantManagement/TenantController.cs

@ -8,8 +8,8 @@ using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.TenantManagement
{
[RemoteService(Name = TenantManagementRemoteServiceConsts.RemoteServiceName)]
[Area("multi-tenancy")]
[Route("api/multi-tenancy/tenants")]
[Area("tenant-management")]
[Route("api/tenant-management/tenants")]
public class TenantController : AbpController, ITenantAppService //TODO: Throws exception on validation if we inherit from Controller
{
protected ITenantAppService TenantAppService { get; }

0
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/.gitignore → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/.gitignore

8
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/BackendAdminHostModule.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/BackendAdminHostModule.cs

@ -10,7 +10,7 @@ using LINGYUN.Abp.MultiTenancy.DbFinder;
using LINGYUN.Abp.SettingManagement;
using LINGYUN.Abp.TenantManagement;
using LINGYUN.ApiGateway;
using LINGYUN.BackendAdmin.MultiTenancy;
using LINGYUN.Abp.BackendAdmin.MultiTenancy;
using LINGYUN.Platform;
using LINYUN.Abp.Sms.Aliyun;
using Microsoft.AspNetCore.Builder;
@ -54,7 +54,7 @@ using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.BackendAdmin
namespace LINGYUN.Abp.BackendAdmin
{
[DependsOn(
typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
@ -183,7 +183,7 @@ namespace LINGYUN.BackendAdmin
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<BackendAdminHostModule>("LINGYUN.BackendAdmin");
options.FileSets.AddEmbedded<BackendAdminHostModule>("LINGYUN.Abp.BackendAdmin");
});
// 多租户
@ -233,7 +233,7 @@ namespace LINGYUN.BackendAdmin
options.Resources
.Get<IdentityResource>()
.AddVirtualJson("/LINGYUN/BackendAdmin/Identity/Localization");
.AddVirtualJson("/Localization");
options
.AddLanguagesMapOrUpdate(
"vue-admin-element-ui",

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Controllers/LocationController.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Controllers/LocationController.cs

@ -4,7 +4,7 @@ using System.Threading.Tasks;
using Volo.Abp.AspNetCore.Mvc;
#if DEBUG
namespace LINGYUN.BackendAdmin.Controllers
namespace LINGYUN.Abp.BackendAdmin.Controllers
{
[Route("Location")]
public class LocationController : AbpController

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Dockerfile → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Dockerfile

@ -10,4 +10,4 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
EXPOSE 80/tcp
VOLUME [ "./app/Logs" ]
ENTRYPOINT ["dotnet", "LINGYUN.BackendAdminApp.Host.dll"]
ENTRYPOINT ["dotnet", "LINGYUN.Abp.BackendAdminApp.Host.dll"]

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/EntityFrameworkCore/BackendAdminHostMigrationsDbContext.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminHostMigrationsDbContext.cs

@ -5,7 +5,7 @@ using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.EntityFrameworkCore
namespace LINGYUN.Abp.BackendAdmin.EntityFrameworkCore
{
public class BackendAdminHostMigrationsDbContext : AbpDbContext<BackendAdminHostMigrationsDbContext>
{

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/EntityFrameworkCore/BackendAdminHostMigrationsDbContextFactory.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EntityFrameworkCore/BackendAdminHostMigrationsDbContextFactory.cs

@ -3,7 +3,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace LINGYUN.BackendAdmin.EntityFrameworkCore
namespace LINGYUN.Abp.BackendAdmin.EntityFrameworkCore
{
public class BackendAdminHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<BackendAdminHostMigrationsDbContext>
{

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantConnectionStringCreateEventHandler.cs

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LINGYUN.BackendAdmin.EventBus.Handlers
namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers
{
public class TenantConnectionStringCreateEventHandler
{

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/EventBus/Handlers/TenantCreateEventHandler.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantCreateEventHandler.cs

@ -13,7 +13,7 @@ using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
namespace LINGYUN.BackendAdmin.EventBus.Handlers
namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers
{
public class TenantCreateEventHandler : IDistributedEventHandler<CreateEventData>, ITransientDependency
{

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/EventBus/Handlers/TenantDeleteEventHandler.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/EventBus/Handlers/TenantDeleteEventHandler.cs

@ -12,7 +12,7 @@ using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.Uow;
namespace LINGYUN.BackendAdmin.EventBus.Handlers
namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers
{
public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency
{

10
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/LINGYUN.BackendAdminApp.Host.csproj → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/LINGYUN.Abp.BackendAdmin.HttpApi.Host.csproj

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>LINGYUN.BackendAdmin</RootNamespace>
<RootNamespace>LINGYUN.Abp.BackendAdmin</RootNamespace>
</PropertyGroup>
<ItemGroup>
@ -13,13 +13,13 @@
</ItemGroup>
<ItemGroup>
<Content Remove="LINGYUN\BackendAdmin\Identity\Localization\en.json" />
<Content Remove="LINGYUN\BackendAdmin\Identity\Localization\zh-Hans.json" />
<Content Remove="Localization\en.json" />
<Content Remove="Localization\zh-Hans.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="LINGYUN\BackendAdmin\Identity\Localization\en.json" />
<EmbeddedResource Include="LINGYUN\BackendAdmin\Identity\Localization\zh-Hans.json" />
<EmbeddedResource Include="Localization\en.json" />
<EmbeddedResource Include="Localization\zh-Hans.json" />
</ItemGroup>
<ItemGroup>

0
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/LINGYUN/BackendAdmin/Identity/Localization/en.json → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Localization/en.json

0
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/LINGYUN/BackendAdmin/Identity/Localization/zh-Hans.json → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Localization/zh-Hans.json

4
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.Designer.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.Designer.cs

@ -1,13 +1,13 @@
// <auto-generated />
using System;
using LINGYUN.BackendAdmin.EntityFrameworkCore;
using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.Migrations
namespace LINGYUN.Abp.BackendAdmin.Migrations
{
[DbContext(typeof(BackendAdminHostMigrationsDbContext))]
[Migration("20200804085641_Migration-Backend-Admin-MySql")]

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200804085641_Migration-Backend-Admin-MySql.cs

@ -1,7 +1,7 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace LINGYUN.BackendAdmin.Migrations
namespace LINGYUN.Abp.BackendAdmin.Migrations
{
public partial class MigrationBackendAdminMySql : Migration
{

4
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Migrations/20200910080638_Add-abp-feature-module.Designer.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.Designer.cs

@ -1,13 +1,13 @@
// <auto-generated />
using System;
using LINGYUN.BackendAdmin.EntityFrameworkCore;
using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.Migrations
namespace LINGYUN.Abp.BackendAdmin.Migrations
{
[DbContext(typeof(BackendAdminHostMigrationsDbContext))]
[Migration("20200910080638_Add-abp-feature-module")]

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Migrations/20200910080638_Add-abp-feature-module.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/20200910080638_Add-abp-feature-module.cs

@ -1,7 +1,7 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace LINGYUN.BackendAdmin.Migrations
namespace LINGYUN.Abp.BackendAdmin.Migrations
{
public partial class Addabpfeaturemodule : Migration
{

4
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Migrations/BackendAdminHostMigrationsDbContextModelSnapshot.cs

@ -1,12 +1,12 @@
// <auto-generated />
using System;
using LINGYUN.BackendAdmin.EntityFrameworkCore;
using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.Migrations
namespace LINGYUN.Abp.BackendAdmin.Migrations
{
[DbContext(typeof(BackendAdminHostMigrationsDbContext))]
partial class BackendAdminHostMigrationsDbContextModelSnapshot : ModelSnapshot

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/MultiTenancy/AuthorizationTenantResolveContributor.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/MultiTenancy/AuthorizationTenantResolveContributor.cs

@ -4,7 +4,7 @@ using Volo.Abp.AspNetCore.MultiTenancy;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Security.Claims;
namespace LINGYUN.BackendAdmin.MultiTenancy
namespace LINGYUN.Abp.BackendAdmin.MultiTenancy
{
public class AuthorizationTenantResolveContributor : HttpTenantResolveContributorBase
{

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Program.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Program.cs

@ -5,7 +5,7 @@ using Serilog;
using System;
using System.IO;
namespace LINGYUN.BackendAdmin
namespace LINGYUN.Abp.BackendAdmin
{
public class Program
{

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Properties/launchSettings.json → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Properties/launchSettings.json

@ -8,7 +8,7 @@
}
},
"profiles": {
"LINGYUN.BackendAdminApp.Host": {
"LINGYUN.Abp.BackendAdminApp.Host": {
"commandName": "Project",
"launchBrowser": false,
"applicationUrl": "http://localhost:30010",

2
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/Startup.cs → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/Startup.cs

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace LINGYUN.BackendAdmin
namespace LINGYUN.Abp.BackendAdmin
{
public class Startup
{

0
aspnet-core/services/admin/LINGYUN.BackendAdminApp.Host/tempkey.rsa → aspnet-core/services/admin/LINGYUN.Abp.BackendAdmin.HttpApi.Host/tempkey.rsa

BIN
aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db

Binary file not shown.

2
aspnet-core/services/cleanup-logs.bat

@ -9,5 +9,5 @@ del .\apigateway\LINGYUN.ApiGateway.Host\Logs /Q
del .\apigateway\LINGYUN.ApiGateway.HttpApi.Host\Logs /Q
del .\account\AuthServer.Host\Logs /Q
del .\messages\LINGYUN.Abp.MessageService.HttpApi.Host\Logs /Q
del .\admin\LINGYUN.BackendAdminApp.Host\Logs /Q
del .\admin\LINGYUN.Abp.BackendAdmin.HttpApi.Host\Logs /Q

2
aspnet-core/services/start-backend-admin.bat

@ -4,7 +4,7 @@ chcp 65001
echo. 启动后台管理服务
cd .\admin\LINGYUN.BackendAdminApp.Host
cd .\admin\LINGYUN.Abp.BackendAdmin.HttpApi.Host
if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run

2
vueJs/src/App.vue

@ -22,7 +22,7 @@ export default class extends Vue {
}
private async initializeAbpConfiguration() {
await AbpModule.GetAbpConfiguration()
await AbpModule.LoadAbpConfiguration()
}
}
</script>

2
vueJs/src/api/organizationunit.ts

@ -204,7 +204,7 @@ export class OrganizationUnitGetRoleByPaged extends PagedAndSortedResultRequestD
/** 主键标识 */
id!: string
/** 过滤字符 */
filter!: string
filter = ''
}
/** 组织机构创建对象 */

2
vueJs/src/api/roles.ts

@ -66,7 +66,7 @@ export class RoleDto extends RoleBaseDto {
}
export class RoleGetPagedDto extends PagedAndSortedResultRequestDto {
filter?: string
filter = ''
}
export class CreateRoleDto extends RoleBaseDto {

27
vueJs/src/api/tenant.ts → vueJs/src/api/tenant-management.ts

@ -5,20 +5,26 @@ import ApiService from './serviceBase'
const serviceUrl = process.env.VUE_APP_BASE_API
export default class TenantService {
public static getTenantByName(name: string) {
public static findTenantByName(name: string) {
let _url = '/api/abp/multi-tenancy/tenants/by-name/'
_url += name
return ApiService.Get<FindTenantResult>(_url, serviceUrl)
}
public static findTenantById(id: string) {
let _url = '/api/abp/multi-tenancy/tenants/by-id/'
_url += id
return ApiService.Get<FindTenantResult>(_url, serviceUrl)
}
public static getTenantById(id: string) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id
return ApiService.Get<TenantDto>(_url, serviceUrl)
}
public static getTenants(payload: TenantGetByPaged) {
let _url = '/api/multi-tenancy/tenants'
let _url = '/api/tenant-management/tenants'
_url += '?filter=' + payload.filter
_url += '&sorting=' + payload.sorting
// 因为abp设计的原因, 需要前端组合页面
@ -28,43 +34,43 @@ export default class TenantService {
}
public static createTenant(payload: TenantCreateOrEdit) {
const _url = '/api/multi-tenancy/tenants'
const _url = '/api/tenant-management/tenants'
return ApiService.Post<TenantDto>(_url, payload, serviceUrl)
}
public static changeTenantName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id
return ApiService.Put<TenantDto>(_url, { name: name }, serviceUrl)
}
public static deleteTenant(id: string) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id
return ApiService.Delete(_url, serviceUrl)
}
public static getTenantConnections(id: string) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation'
return ApiService.Get<ListResultDto<TenantConnectionString>>(_url, serviceUrl)
}
public static getTenantConnectionByName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation/'
_url += name
return ApiService.Get<TenantConnectionString>(_url, serviceUrl)
}
public static setTenantConnection(id: string, payload: TenantConnectionString) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation'
return ApiService.Put<TenantConnectionString>(_url, payload, serviceUrl)
}
public static deleteTenantConnectionByName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/'
let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation/'
_url += name
return ApiService.Delete(_url, serviceUrl)
@ -81,7 +87,6 @@ export class TenantGetByPaged extends PagedAndSortedResultRequestDto {
this.filter = ''
this.sorting = ''
this.skipCount = 1
this.maxResultCount = 25
}
}

2
vueJs/src/components/LangSelect/index.vue

@ -43,7 +43,7 @@ export default class extends Vue {
private async handleSetLanguage(lang: string) {
AppModule.SetLanguage(lang)
this.$i18n.locale = lang
await AbpModule.GetAbpConfiguration()
await AbpModule.LoadAbpConfiguration()
this.$message({
message: 'Switch Language Success',
type: 'success'

4
vueJs/src/components/TenantBox/index.vue

@ -20,7 +20,7 @@
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import TenantService from '@/api/tenant'
import TenantService from '@/api/tenant-management'
import { setTenant, removeTenant } from '@/utils/sessions'
@Component({
@ -37,7 +37,7 @@ export default class extends Vue {
}).then((val: any) => {
removeTenant()
if (val.value) {
TenantService.getTenantByName(val.value).then(tenant => {
TenantService.findTenantByName(val.value).then(tenant => {
if (tenant.success) {
setTenant(tenant.tenantId)
this.$emit('input', tenant.name)

99
vueJs/src/mixins/DataListMiXin.ts

@ -0,0 +1,99 @@
import { Component, Vue } from 'vue-property-decorator'
import { PagedResultDto, ListResultDto, PagedAndSortedResultRequestDto } from '@/api/types'
/**
* mixin
*
*/
@Component
export default class DataListMiXin extends Vue {
/** 数据列表 */
public dataList = new Array<any>()
/** 数据总数 */
public dataTotal = 0
/** 是否正在加载数据 */
public dataLoading = false
/**
*,
*/
public dataFilter = new PagedAndSortedResultRequestDto()
/**
*
*/
protected refreshData() {
this.dataLoading = true
this.getList(this.dataFilter)
.then(res => {
this.dataList = res.items
this.dataTotal = res.items.length
})
.finally(() => {
this.dataLoading = false
})
}
/**
*
*/
protected refreshPagedData() {
this.dataLoading = true
this.getPagedList(this.dataFilter)
.then(res => {
this.dataList = res.items
this.dataTotal = res.totalCount
})
.finally(() => {
this.dataLoading = false
})
}
/**
*
*/
protected getList(filter: any): Promise<ListResultDto<any>> {
console.log(filter)
return new Promise<ListResultDto<any>>((resolve) => {
return resolve(new ListResultDto<any>())
})
}
/** 获取空数据 */
protected getEmptyList() {
return new Promise<ListResultDto<any>>((resolve) => {
return resolve(new ListResultDto<any>())
})
}
/**
*
* @param filter
*/
protected getPagedList(filter: any): Promise<PagedResultDto<any>> {
console.log(filter)
return this.getEmptyPagedList()
}
/** 获取空分页数据 */
protected getEmptyPagedList() {
return new Promise<PagedResultDto<any>>((resolve) => {
return resolve(new PagedResultDto<any>())
})
}
/**
*
* @param column
*/
protected handleSortChange(column: any) {
this.dataFilter.sorting = column.prop
}
/**
*
* @param name
* @param values
*/
protected l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}

2
vueJs/src/store/modules/abp.ts

@ -38,7 +38,7 @@ class AbpConfiguration extends VuexModule implements IAbpState {
}
@Action({ rawError: true })
public async GetAbpConfiguration() {
public async LoadAbpConfiguration() {
const config = await AbpConfigurationService.getAbpConfiguration()
this.SET_ABPCONFIGURATION(config)
this.SET_ABPLOCALIZER(config)

6
vueJs/src/store/modules/user.ts

@ -1,6 +1,6 @@
import { VuexModule, Module, Action, Mutation, getModule } from 'vuex-module-decorators'
import UserApiService, { UserLoginData, UserLoginPhoneData } from '@/api/users'
import TenantService from '@/api/tenant'
import TenantService from '@/api/tenant-management'
import { getItem, setItem, removeItem } from '@/utils/localStorage'
import { resetRouter } from '@/router'
import { TagsViewModule } from './tags-view'
@ -156,13 +156,13 @@ class User extends VuexModule implements IUserState {
@Action
private async PreLogin(tenantName: string) {
const tenantResult = await TenantService.getTenantByName(tenantName)
const tenantResult = await TenantService.findTenantByName(tenantName)
setTenant(tenantResult.tenantId)
}
@Action
private async PostLogin() {
await AbpModule.GetAbpConfiguration()
await AbpModule.LoadAbpConfiguration()
}
}

84
vueJs/src/views/admin/apigateway/aggregateRoute.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('apiGateWay.appId') }}</label>
<el-select
v-model="aggregateRouteGetPagedFilter.appId"
v-model="dataFilter.appId"
style="width: 250px;margin-left: 10px;"
class="filter-item"
:placeholder="$t('pleaseSelectBy', {name: $t('apiGateWay.appId')})"
@ -23,7 +23,7 @@
style="padding-left:10px;"
>{{ $t('queryFilter') }}</label>
<el-input
v-model="aggregateRouteGetPagedFilter.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -32,7 +32,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetAggregateRoutes"
@click="refreshPagedData"
>
{{ $t('searchList') }}
</el-button>
@ -47,9 +47,9 @@
</div>
<el-table
v-loading="aggregateRouteListLoading"
v-loading="dataLoading"
row-key="reRouteId"
:data="aggregateRouteList"
:data="dataList"
border
fit
highlight-current-row
@ -172,11 +172,11 @@
</el-table>
<Pagination
v-show="routesCount>0"
:total="routesCount"
:page.sync="aggregateRouteGetPagedFilter.skipCount"
:limit.sync="aggregateRouteGetPagedFilter.maxResultCount"
@pagination="handleGetAggregateRoutes"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -215,7 +215,8 @@
<script lang="ts">
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import AggregateRouteConfigEditForm from './components/AggregateRouteConfigEditForm.vue'
import AggregateRouteCreateOrEditForm from './components/AggregateRouteCreateOrEditForm.vue'
@ -244,31 +245,15 @@ import ApiGatewayService, { RouteGroupAppIdDto, AggregateReRoute, AggregateReRou
}
}
})
export default class extends Vue {
private editAggregateRouteId: string
private routesCount: number
private editRouteTitle: any
private aggregateRouteList: AggregateReRoute[]
private aggregateRouteListLoading: boolean
private aggregateRouteGetPagedFilter: AggregateReRouteGetByPaged
private routeGroupAppIdOptions: RouteGroupAppIdDto[]
export default class extends mixins(DataListMiXin) {
private editAggregateRouteId = ''
private editRouteTitle = ''
private routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>()
private showEditAggregateRouteDialog: boolean
private showEditAggregateRouteConfigDialog: boolean
private showEditAggregateRouteDialog = false
private showEditAggregateRouteConfigDialog = false
constructor() {
super()
this.editAggregateRouteId = ''
this.routesCount = 0
this.editRouteTitle = ''
this.aggregateRouteListLoading = false
this.aggregateRouteList = new Array<AggregateReRoute>()
this.aggregateRouteGetPagedFilter = new AggregateReRouteGetByPaged()
this.routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>()
this.showEditAggregateRouteDialog = false
this.showEditAggregateRouteConfigDialog = false
}
public dataFilter = new AggregateReRouteGetByPaged()
mounted() {
ApiGatewayService.getRouteGroupAppIds().then(appKeys => {
@ -276,23 +261,14 @@ export default class extends Vue {
})
}
private handleGetAggregateRoutes() {
if (this.aggregateRouteGetPagedFilter.appId) {
this.aggregateRouteListLoading = true
ApiGatewayService.getAggregateReRoutes(this.aggregateRouteGetPagedFilter).then(routes => {
this.aggregateRouteList = routes.items
this.routesCount = routes.totalCount
}).finally(() => {
this.aggregateRouteListLoading = false
})
protected getPagedList(filter: any) {
if (filter.appId) {
return ApiGatewayService.getAggregateReRoutes(filter)
} else {
const errorMessage = this.$t('apiGateWay.appIdHasRequired').toString()
this.$message.warning(errorMessage)
}
}
private handleSortChange(column: any) {
this.aggregateRouteGetPagedFilter.sorting = column.prop
return this.getEmptyPagedList()
}
private handleCommand(command: {key: string, row: AggregateReRoute }) {
@ -314,7 +290,7 @@ export default class extends Vue {
if (action === 'confirm') {
ApiGatewayService.deleteAggregateReRoute(reRouteId).then(() => {
this.$message.success(this.l('apiGateWay.deleteAggregateRouteSuccess', { name: name }))
this.handleGetAggregateRoutes()
this.refreshPagedData()
})
}
}
@ -323,9 +299,9 @@ export default class extends Vue {
private handleCreateOrEditAggregateRoute(reRouteId: string, name: string) {
this.editAggregateRouteId = reRouteId
this.editRouteTitle = this.$t('apiGateWay.createAggregateRoute')
this.editRouteTitle = this.l('apiGateWay.createAggregateRoute')
if (reRouteId) {
this.editRouteTitle = this.$t('apiGateWay.updateAggregateRouteByName', { name: name })
this.editRouteTitle = this.l('apiGateWay.updateAggregateRouteByName', { name: name })
}
this.showEditAggregateRouteDialog = true
}
@ -334,8 +310,8 @@ export default class extends Vue {
this.editAggregateRouteId = ''
this.editRouteTitle = ''
this.showEditAggregateRouteDialog = false
if (changed && this.aggregateRouteGetPagedFilter.appId) {
this.handleGetAggregateRoutes()
if (changed && this.dataFilter.appId) {
this.refreshPagedData()
}
}
@ -343,10 +319,6 @@ export default class extends Vue {
this.editAggregateRouteId = ''
this.showEditAggregateRouteConfigDialog = false
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>

70
vueJs/src/views/admin/apigateway/global.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('queryFilter') }}</label>
<el-input
v-model="globalConfigurationGetQuery.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -15,7 +15,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handledGetGlobalConfigurations"
@click="refreshPagedData"
>
{{ $t('searchList') }}
</el-button>
@ -30,9 +30,9 @@
</div>
<el-table
v-loading="globalConfigurationsLoading"
v-loading="dataLoading"
row-key="itemId"
:data="globalConfigurations"
:data="dataList"
border
fit
highlight-current-row
@ -138,11 +138,11 @@
</el-table>
<Pagination
v-show="globalConfigurationsCount>0"
:total="globalConfigurationsCount"
:page.sync="globalConfigurationGetQuery.skipCount"
:limit.sync="globalConfigurationGetQuery.maxResultCount"
@pagination="handledGetGlobalConfigurations"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
/>
<el-dialog
@ -162,10 +162,11 @@
<script lang="ts">
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import GlobalCreateOrEditForm from './components/GlobalCreateOrEditForm.vue'
import ApiGatewayService, { GlobalGetByPagedDto, GlobalConfigurationDto } from '@/api/apigateway'
import ApiGatewayService, { GlobalGetByPagedDto } from '@/api/apigateway'
@Component({
name: 'GlobalRoute',
@ -177,44 +178,26 @@ import ApiGatewayService, { GlobalGetByPagedDto, GlobalConfigurationDto } from '
checkPermission
}
})
export default class extends Vue {
private editGlobalConfigurationTitle!: any
private globalConfigurationsCount!: number
private globalConfigurationsLoading!: boolean
private showEditGlobalConfiguration!: boolean
private editGlobalConfigurationAppId!: string
private globalConfigurations!: GlobalConfigurationDto[]
private globalConfigurationGetQuery!: GlobalGetByPagedDto
export default class extends mixins(DataListMiXin) {
private editGlobalConfigurationTitle = ''
private showEditGlobalConfiguration = false
private editGlobalConfigurationAppId = ''
constructor() {
super()
this.globalConfigurationsCount = 0
this.editGlobalConfigurationTitle = ''
this.editGlobalConfigurationAppId = ''
this.globalConfigurationsLoading = false
this.showEditGlobalConfiguration = false
this.globalConfigurationGetQuery = new GlobalGetByPagedDto()
this.globalConfigurations = new Array<GlobalConfigurationDto>()
}
public dataFilter = new GlobalGetByPagedDto()
mounted() {
this.handledGetGlobalConfigurations()
this.refreshPagedData()
}
private handledGetGlobalConfigurations() {
this.globalConfigurationsLoading = true
ApiGatewayService.getGlobalConfigurations(this.globalConfigurationGetQuery).then(globals => {
this.globalConfigurations = globals.items
this.globalConfigurationsCount = globals.totalCount
this.globalConfigurationsLoading = false
})
protected getPagedList(filter: any) {
return ApiGatewayService.getGlobalConfigurations(filter)
}
private handleCreateOrEditGlobalConfiguration(appId: string) {
this.editGlobalConfigurationAppId = appId
this.editGlobalConfigurationTitle = this.$t('apiGateWay.createGlobal')
this.editGlobalConfigurationTitle = this.l('apiGateWay.createGlobal')
if (appId) {
this.editGlobalConfigurationTitle = this.$t('apiGateWay.updateGlobalByApp', { name: appId })
this.editGlobalConfigurationTitle = this.l('apiGateWay.updateGlobalByApp', { name: appId })
}
this.showEditGlobalConfiguration = true
}
@ -224,7 +207,7 @@ export default class extends Vue {
this.editGlobalConfigurationTitle = ''
this.showEditGlobalConfiguration = false
if (changed) {
this.handledGetGlobalConfigurations()
this.refreshPagedData()
}
}
@ -237,15 +220,10 @@ export default class extends Vue {
await ApiGatewayService.deleteGlobalConfiguration(itemId)
const successMessage = this.$t('dataHasBeenDeleted', { name: appId }).toString()
this.$message.success(successMessage)
this.handledGetGlobalConfigurations()
this.refreshPagedData()
}
}
})
}
/** 响应表格排序事件 */
private handleSortChange(column: any) {
this.globalConfigurationGetQuery.sorting = column.prop
}
}
</script>

77
vueJs/src/views/admin/apigateway/group.vue

@ -6,7 +6,7 @@
style="padding-left:0;"
>{{ $t('apiGateWay.appId') }}</label>
<el-input
v-model="routeGroupQuery.appId"
v-model="dataFilter.appId"
:placeholder="$t('apiGateWay.appId')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -16,7 +16,7 @@
style="padding-left:10px;"
>{{ $t('queryFilter') }}</label>
<el-input
v-model="routeGroupQuery.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -25,7 +25,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetRouteGroups"
@click="refreshPagedData"
>
{{ $t('searchList') }}
</el-button>
@ -40,14 +40,13 @@
</div>
<el-table
v-loading="routeGroupListLoading"
v-loading="dataLoading"
row-key="id"
:data="routeGroupList"
:data="dataList"
border
fit
highlight-current-row
style="width: 100%;"
:default-sort="sortRule"
@sort-change="handleSortChange"
>
<el-table-column
@ -155,11 +154,11 @@
</el-table>
<Pagination
v-show="routeGroupCount>0"
:total="routeGroupCount"
:page.sync="routeGroupQuery.skipCount"
:limit.sync="routeGroupQuery.maxResultCount"
@pagination="handleGetRouteGroups"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
/>
<el-dialog
@ -179,10 +178,11 @@
<script lang="ts">
import { dateFormat } from '@/utils'
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import Pagination from '@/components/Pagination/index.vue'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import RouteGroupCreateOrEditForm from './components/RouteGroupCreateOrEditForm.vue'
import ApiGatewayService, { RouteGroupDto, RouteGroupGetByPagedDto } from '@/api/apigateway'
import ApiGatewayService, { GlobalGetByPagedDto } from '@/api/apigateway'
@Component({
name: 'RouteGroup',
@ -200,47 +200,26 @@ import ApiGatewayService, { RouteGroupDto, RouteGroupGetByPagedDto } from '@/api
checkPermission
}
})
export default class extends Vue {
private editRouteGroupAppId!: string
private editRouteGroupTitle!: any
private showEditRouteGroupDialog!: boolean
private routeGroupListLoading!: boolean
private routeGroupList?: RouteGroupDto[]
private routeGroupQuery!: RouteGroupGetByPagedDto
private routeGroupCount!: number
/** 排序组别 */
private sortRule!: { prop: string, sort: string }
export default class extends mixins(DataListMiXin) {
private editRouteGroupAppId = ''
private editRouteGroupTitle = ''
private showEditRouteGroupDialog = false
constructor() {
super()
this.routeGroupCount = 0
this.editRouteGroupAppId = ''
this.editRouteGroupTitle = ''
this.routeGroupListLoading = false
this.showEditRouteGroupDialog = false
this.sortRule = { prop: '', sort: '' }
this.routeGroupList = new Array<RouteGroupDto>()
this.routeGroupQuery = new RouteGroupGetByPagedDto()
}
public dataFilter = new GlobalGetByPagedDto()
mounted() {
this.handleGetRouteGroups()
this.refreshPagedData()
}
private handleGetRouteGroups() {
this.routeGroupListLoading = true
ApiGatewayService.getRouteGroups(this.routeGroupQuery).then(groupData => {
this.routeGroupList = groupData.items
this.routeGroupCount = groupData.totalCount
this.routeGroupListLoading = false
})
protected getPagedList(filter: any) {
return ApiGatewayService.getRouteGroups(filter)
}
private handleCreateOrEditRouteGroup(appId: string, appName: string) {
this.editRouteGroupAppId = appId
this.editRouteGroupTitle = this.$t('apiGateWay.createGroup')
this.editRouteGroupTitle = this.l('apiGateWay.createGroup')
if (appName) {
this.editRouteGroupTitle = this.$t('apiGateWay.updateGroupByApp', { name: appName })
this.editRouteGroupTitle = this.l('apiGateWay.updateGroupByApp', { name: appName })
}
this.showEditRouteGroupDialog = true
}
@ -250,7 +229,7 @@ export default class extends Vue {
this.editRouteGroupTitle = ''
this.showEditRouteGroupDialog = false
if (hasChanged) {
this.handleGetRouteGroups()
this.refreshPagedData()
}
}
@ -263,16 +242,10 @@ export default class extends Vue {
await ApiGatewayService.deleteRouteGroup(appId)
const successMessage = this.$t('dataHasBeenDeleted', { name: appName }).toString()
this.$message.success(successMessage)
this.handleGetRouteGroups()
this.refreshPagedData()
}
}
})
}
/** 响应表格排序事件 */
private handleSortChange(column: any) {
this.sortRule.prop = column.prop
this.sortRule.sort = column.sort
}
}
</script>

82
vueJs/src/views/admin/apigateway/route.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('apiGateWay.appId') }}</label>
<el-select
v-model="routeGetPagedFilter.appId"
v-model="dataFilter.appId"
style="width: 250px;margin-left: 10px;"
class="filter-item"
:placeholder="$t('pleaseSelectBy', {name: $t('apiGateWay.appId')})"
@ -23,7 +23,7 @@
style="padding-left:10px;"
>{{ $t('queryFilter') }}</label>
<el-input
v-model="routeGetPagedFilter.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -32,7 +32,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetRoutes"
@click="refreshPagedData"
>
{{ $t('searchList') }}
</el-button>
@ -47,9 +47,9 @@
</div>
<el-table
v-loading="routeListLoading"
v-loading="dataLoading"
row-key="itemId"
:data="routeList"
:data="dataList"
border
fit
highlight-current-row
@ -187,11 +187,11 @@
</el-table>
<Pagination
v-show="routesCount>0"
:total="routesCount"
:page.sync="routeGetPagedFilter.skipCount"
:limit.sync="routeGetPagedFilter.maxResultCount"
@pagination="handleGetRoutes"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -216,10 +216,11 @@
<script lang="ts">
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import RouteCreateOrEditForm from './components/RouteCreateOrEditForm.vue'
import ApiGatewayService, { RouteGroupAppIdDto, ReRouteGetByPagedDto, ReRouteDto } from '@/api/apigateway'
import ApiGatewayService, { RouteGroupAppIdDto, ReRouteGetByPagedDto } from '@/api/apigateway'
@Component({
name: 'Route',
@ -243,27 +244,13 @@ import ApiGatewayService, { RouteGroupAppIdDto, ReRouteGetByPagedDto, ReRouteDto
}
}
})
export default class extends Vue {
private editRouteId: number
private routesCount: number
private editRouteTitle: any
private routeList: ReRouteDto[]
private routeListLoading: boolean
private showEditRouteDialog: boolean
private routeGetPagedFilter: ReRouteGetByPagedDto
private routeGroupAppIdOptions: RouteGroupAppIdDto[]
export default class extends mixins(DataListMiXin) {
private editRouteId = 0
private editRouteTitle = ''
private showEditRouteDialog = false
private routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>()
constructor() {
super()
this.editRouteId = 0
this.routesCount = 0
this.editRouteTitle = ''
this.routeListLoading = false
this.showEditRouteDialog = false
this.routeList = new Array<ReRouteDto>()
this.routeGetPagedFilter = new ReRouteGetByPagedDto()
this.routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>()
}
public dataFilter = new ReRouteGetByPagedDto()
mounted() {
ApiGatewayService.getRouteGroupAppIds().then(appKeys => {
@ -271,23 +258,14 @@ export default class extends Vue {
})
}
private handleGetRoutes() {
if (this.routeGetPagedFilter.appId) {
this.routeListLoading = true
ApiGatewayService.getReRoutes(this.routeGetPagedFilter).then(routes => {
this.routeList = routes.items
this.routesCount = routes.totalCount
}).finally(() => {
this.routeListLoading = false
})
protected getPagedList(filter: any) {
if (filter.appId) {
return ApiGatewayService.getReRoutes(filter)
} else {
const errorMessage = this.$t('apiGateWay.appIdHasRequired').toString()
this.$message.warning(errorMessage)
}
}
private handleSortChange(column: any) {
this.routeGetPagedFilter.sorting = column.prop
return this.getEmptyPagedList()
}
private handleDeleteRoute(reRouteId: number, reRouteName: string) {
@ -297,7 +275,7 @@ export default class extends Vue {
if (action === 'confirm') {
ApiGatewayService.deleteReRoute(reRouteId).then(() => {
this.$message.success(this.l('apiGateWay.deleteRouteSuccess', { name: reRouteName }))
this.handleGetRoutes()
this.refreshPagedData()
})
}
}
@ -306,9 +284,9 @@ export default class extends Vue {
private handleCreateOrEditRoute(reRouteId: number, reRouteName: string) {
this.editRouteId = reRouteId
this.editRouteTitle = this.$t('apiGateWay.createRoute')
this.editRouteTitle = this.l('apiGateWay.createRoute')
if (reRouteId) {
this.editRouteTitle = this.$t('apiGateWay.updateRouteByApp', { name: reRouteName })
this.editRouteTitle = this.l('apiGateWay.updateRouteByApp', { name: reRouteName })
}
this.showEditRouteDialog = true
}
@ -317,13 +295,9 @@ export default class extends Vue {
this.editRouteId = -1
this.editRouteTitle = ''
this.showEditRouteDialog = false
if (changed && this.routeGetPagedFilter.appId) {
this.handleGetRoutes()
if (changed && this.dataFilter.appId) {
this.refreshPagedData()
}
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>

23
vueJs/src/views/admin/components/FeatureManagement.vue

@ -19,6 +19,16 @@
:prop="'features.' + fi + '.children.' + fci + '.value'"
:rules="featureChildren.valueType.validator | inputRuleFilter(localizer)"
>
<el-popover
:ref="'popover_' + fi + '_' + fci"
trigger="hover"
:title="featureChildren.displayName"
:content="featureChildren.description"
/>
<span
slot="label"
v-popover="'popover_' + fi + '_' + fci"
>{{ featureChildren.displayName }}</span>
<div
v-if="featureChildren.valueType.name === 'ToggleStringValueType'"
>
@ -74,6 +84,7 @@
<script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
import FeatureManagementService, { ValueType, Feature, Features } from '@/api/feature-management'
import { ElForm } from 'element-ui/types/form'
/**
* 适用于动态表单的功能节点列表
@ -224,7 +235,8 @@ export default class extends Vue {
* 重置表单数据
*/
public resetFeature() {
this.features = new FeatureItems()
const frmFeature = this.$refs.frmFeature as ElForm
frmFeature.resetFields()
}
/**
@ -234,7 +246,7 @@ export default class extends Vue {
FeatureManagementService.getFeatures(this.providerName, this.providerKey).then(res => {
this.features = new FeatureItems()
res.features.forEach(feature => {
const featureTrue = new FeatureItem(
const featureItem = new FeatureItem(
feature.name,
feature.value,
feature.displayName,
@ -245,12 +257,12 @@ export default class extends Vue {
if (feature.parentName) {
const children = this.features.features.find(f => f.name === feature.parentName)
if (children) {
children.appendChildren(featureTrue)
children.appendChildren(featureItem)
} else {
this.features.features.push(featureTrue)
this.features.features.push(featureItem)
}
} else {
this.features.features.push(featureTrue)
this.features.features.push(featureItem)
}
})
// ?
@ -299,6 +311,7 @@ export default class extends Vue {
*/
private onClosed() {
this.$emit('closed')
this.resetFeature()
}
}
</script>

81
vueJs/src/views/admin/identityServer/api-resources/index.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('queryFilter') }}</label>
<el-input
v-model="apiResourceGetPagedFilter.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -15,7 +15,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetApiResources"
@click="refreshPagedData"
>
{{ $t('searchList') }}
</el-button>
@ -30,9 +30,9 @@
</div>
<el-table
v-loading="apiResourceListLoading"
v-loading="dataLoading"
row-key="id"
:data="apiResourceList"
:data="dataList"
border
fit
highlight-current-row
@ -165,11 +165,11 @@
</el-table>
<Pagination
v-show="apiResourceListCount>0"
:total="apiResourceListCount"
:page.sync="apiResourceGetPagedFilter.skipCount"
:limit.sync="apiResourceGetPagedFilter.maxResultCount"
@pagination="handleGetApiResources"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -202,7 +202,7 @@
ref="formApiSecret"
:api-resource-id="editApiResource.id"
:api-secrets="editApiResource.secrets"
@apiSecretChanged="handleGetApiResources"
@apiSecretChanged="refreshPagedData"
/>
</el-dialog>
@ -219,16 +219,17 @@
ref="formApiScope"
:api-resource-id="editApiResource.id"
:api-scopes="editApiResource.scopes"
@apiSecretChanged="handleGetApiResources"
@apiSecretChanged="refreshPagedData"
/>
</el-dialog>
</div>
</template>
<script lang="ts">
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import { dateFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import ApiScopeEditForm from './components/ApiResourceScopeEditForm.vue'
import ApiSecretEditForm from './components/ApiResourceSecretEditForm.vue'
@ -262,48 +263,22 @@ import ApiResourceService, { ApiResource, ApiResourceGetByPaged } from '@/api/ap
}
}
})
export default class extends Vue {
private editApiResource: ApiResource
private apiResourceListCount: number
private editApiResourceTitle: any
private apiResourceList: ApiResource[]
private apiResourceListLoading: boolean
private apiResourceGetPagedFilter: ApiResourceGetByPaged
export default class extends mixins(DataListMiXin) {
private editApiResource = new ApiResource()
private editApiResourceTitle = ''
private showEditApiScopeDialog: boolean
private showEditApiSecretDialog: boolean
private showEditApiResourceDialog: boolean
private showEditApiScopeDialog = false
private showEditApiSecretDialog = false
private showEditApiResourceDialog = false
constructor() {
super()
this.apiResourceListCount = 0
this.editApiResourceTitle = ''
this.apiResourceListLoading = false
this.editApiResource = new ApiResource()
this.apiResourceList = new Array<ApiResource>()
this.apiResourceGetPagedFilter = new ApiResourceGetByPaged()
this.showEditApiScopeDialog = false
this.showEditApiSecretDialog = false
this.showEditApiResourceDialog = false
}
public dataFilter = new ApiResourceGetByPaged()
mounted() {
this.handleGetApiResources()
}
private handleGetApiResources() {
this.apiResourceListLoading = true
ApiResourceService.getApiResources(this.apiResourceGetPagedFilter).then(resources => {
this.apiResourceList = resources.items
this.apiResourceListCount = resources.totalCount
}).finally(() => {
this.apiResourceListLoading = false
})
this.refreshPagedData()
}
private handleSortChange(column: any) {
this.apiResourceGetPagedFilter.sorting = column.prop
protected getPagedList(filter: any) {
return ApiResourceService.getApiResources(filter)
}
private handleShowEditApiResourceForm(resource: ApiResource) {
@ -322,7 +297,7 @@ export default class extends Vue {
this.editApiResource = ApiResource.empty()
this.showEditApiResourceDialog = false
if (changed) {
this.handleGetApiResources()
this.refreshPagedData()
}
}
@ -345,7 +320,7 @@ export default class extends Vue {
if (action === 'confirm') {
ApiResourceService.deleteApiResource(id).then(() => {
this.$message.success(this.l('identityServer.deleteApiResourceSuccess', { name: name }))
this.handleGetApiResources()
this.refreshPagedData()
})
}
}
@ -368,10 +343,6 @@ export default class extends Vue {
}
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
private formatStatusText(status: boolean) {
let statusText = ''
if (status) {

100
vueJs/src/views/admin/identityServer/client/index.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('queryFilter') }}</label>
<el-input
v-model="clientGetPagedFilter.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -15,7 +15,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetClients"
@click="refreshPagedData"
>
{{ $t('searchList') }}
</el-button>
@ -30,9 +30,9 @@
</div>
<el-table
v-loading="clientListLoading"
v-loading="dataLoading"
row-key="id"
:data="clientList"
:data="dataList"
border
fit
highlight-current-row
@ -216,11 +216,11 @@
</el-table>
<Pagination
v-show="clientListCount>0"
:total="clientListCount"
:page.sync="clientGetPagedFilter.skipCount"
:limit.sync="clientGetPagedFilter.maxResultCount"
@pagination="handleGetClients"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -285,7 +285,7 @@
ref="formClientSecret"
:client-id="editClient.id"
:client-secrets="editClient.clientSecrets"
@clientSecretChanged="handleGetClients"
@clientSecretChanged="refreshPagedData"
/>
</el-dialog>
@ -297,7 +297,7 @@
custom-class="modal-form"
:show-close="false"
@closed="handleClientClaimEditFormClosed"
@clientClaimChanged="handleGetClients"
@clientClaimChanged="refreshPagedData"
>
<ClientClaimEditForm
ref="formClientClaim"
@ -314,7 +314,7 @@
custom-class="modal-form"
:show-close="false"
@closed="handleClientPropertyEditFormClosed"
@clientPropertyChanged="handleGetClients"
@clientPropertyChanged="refreshPagedData"
>
<ClientPropertyEditForm
ref="formClientProperty"
@ -343,7 +343,8 @@
<script lang="ts">
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import ClientEditForm from './components/ClientEditForm.vue'
import ClientCloneForm from './components/ClientCloneForm.vue'
@ -381,66 +382,37 @@ import ClientService, { Client, ClientGetByPaged } from '@/api/clients'
}
}
})
export default class extends Vue {
private editClient: Client
private clientListCount: number
private editClientTitle: any
private clientList: Client[]
private clientListLoading: boolean
private clientGetPagedFilter: ClientGetByPaged
export default class extends mixins(DataListMiXin) {
private editClient = Client.empty()
private editClientTitle = ''
private showEditClientDialog: boolean
private showCloneClientDialog: boolean
private showCreateClientDialog: boolean
private showEditClientSecretDialog: boolean
private showEditClientClaimDialog: boolean
private showEditClientPropertyDialog: boolean
private showEditClientPermissionDialog: boolean
private showEditClientDialog = false
private showCloneClientDialog = false
private showCreateClientDialog = false
private showEditClientSecretDialog = false
private showEditClientClaimDialog = false
private showEditClientPropertyDialog = false
private showEditClientPermissionDialog = false
constructor() {
super()
this.clientListCount = 0
this.editClientTitle = ''
this.clientListLoading = false
this.showEditClientDialog = false
this.showCreateClientDialog = false
this.showEditClientPermissionDialog = false
this.editClient = Client.empty()
this.clientList = new Array<Client>()
this.showCloneClientDialog = false
this.showEditClientSecretDialog = false
this.showEditClientClaimDialog = false
this.showEditClientPropertyDialog = false
this.clientGetPagedFilter = new ClientGetByPaged()
}
public dataFilter = new ClientGetByPaged()
mounted() {
this.handleGetClients()
this.refreshPagedData()
}
private handleGetClients() {
this.clientListLoading = true
ClientService.getClients(this.clientGetPagedFilter).then(routes => {
this.clientList = routes.items
this.clientListCount = routes.totalCount
}).finally(() => {
this.clientListLoading = false
})
}
private handleSortChange(column: any) {
this.clientGetPagedFilter.sorting = column.prop
protected getPagedList(filter: any) {
return ClientService.getClients(filter)
}
private handleShowCreateClientForm() {
this.editClient = Client.empty()
this.editClientTitle = this.$t('identityServer.createClient')
this.editClientTitle = this.l('identityServer.createClient')
this.showCreateClientDialog = true
}
private handleShowEditClientForm(client: Client) {
this.editClient = client
this.editClientTitle = this.$t('identityServer.updateClientByName', { name: this.editClient.clientName })
this.editClientTitle = this.l('identityServer.updateClientByName', { name: this.editClient.clientName })
this.showEditClientDialog = true
}
@ -451,7 +423,7 @@ export default class extends Vue {
const frmClient = this.$refs.formCreateClient as ClientCreateForm
frmClient.resetFields()
if (changed) {
this.handleGetClients()
this.refreshPagedData()
}
}
@ -462,7 +434,7 @@ export default class extends Vue {
const frmClient = this.$refs.formCloneClient as ClientCloneForm
frmClient.resetFields()
if (changed) {
this.handleGetClients()
this.refreshPagedData()
}
}
@ -471,7 +443,7 @@ export default class extends Vue {
this.editClient = Client.empty()
this.showEditClientDialog = false
if (changed) {
this.handleGetClients()
this.refreshPagedData()
}
}
@ -505,7 +477,7 @@ export default class extends Vue {
if (action === 'confirm') {
ClientService.deleteClient(id).then(() => {
this.$message.success(this.l('identityServer.deleteClientSuccess', { id: clientId }))
this.handleGetClients()
this.refreshPagedData()
})
}
}
@ -537,10 +509,6 @@ export default class extends Vue {
}
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
private formatStatusText(status: boolean) {
let statusText = ''
if (status) {

74
vueJs/src/views/admin/identityServer/identity-resources/index.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('global.queryFilter') }}</label>
<el-input
v-model="identityResourceGetPagedFilter.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -15,7 +15,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetIdentityResources"
@click="refreshPagedData"
>
{{ $t('global.searchList') }}
</el-button>
@ -30,9 +30,9 @@
</div>
<el-table
v-loading="identityResourceListLoading"
v-loading="dataLoading"
row-key="id"
:data="identityResourceList"
:data="dataList"
border
fit
highlight-current-row
@ -159,11 +159,11 @@
</el-table>
<Pagination
v-show="identityResourceListCount>0"
:total="identityResourceListCount"
:page.sync="identityResourceGetPagedFilter.skipCount"
:limit.sync="identityResourceGetPagedFilter.maxResultCount"
@pagination="handleGetIdentityResources"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -204,9 +204,10 @@
</template>
<script lang="ts">
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import { dateFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import IdentityPropertyEditForm from './components/IdentityResourcePropertyEditForm.vue'
import IdentityResourceCreateOrEditForm from './components/IdentityResourceCreateOrEditForm.vue'
@ -235,46 +236,21 @@ import IdentityResourceService, { IdentityResource, IdentityResourceGetByPaged }
}
}
})
export default class extends Vue {
private editIdentityResource: IdentityResource
private identityResourceListCount: number
private editIdentityResourceTitle: any
private identityResourceList: IdentityResource[]
private identityResourceListLoading: boolean
private identityResourceGetPagedFilter: IdentityResourceGetByPaged
export default class extends mixins(DataListMiXin) {
private editIdentityResource = IdentityResource.empty()
private editIdentityResourceTitle = ''
private showEditIdentityPropertyDialog: boolean
private showEditIdentityResourceDialog: boolean
private showEditIdentityPropertyDialog = false
private showEditIdentityResourceDialog = false
constructor() {
super()
this.identityResourceListCount = 0
this.editIdentityResourceTitle = ''
this.identityResourceListLoading = false
this.editIdentityResource = IdentityResource.empty()
this.identityResourceList = new Array<IdentityResource>()
this.identityResourceGetPagedFilter = new IdentityResourceGetByPaged()
this.showEditIdentityPropertyDialog = false
this.showEditIdentityResourceDialog = false
}
public dataFilter = new IdentityResourceGetByPaged()
mounted() {
this.handleGetIdentityResources()
}
private handleGetIdentityResources() {
this.identityResourceListLoading = true
IdentityResourceService.getIdentityResources(this.identityResourceGetPagedFilter).then(resources => {
this.identityResourceList = resources.items
this.identityResourceListCount = resources.totalCount
}).finally(() => {
this.identityResourceListLoading = false
})
this.refreshPagedData()
}
private handleSortChange(column: any) {
this.identityResourceGetPagedFilter.sorting = column.prop
protected getPagedList(filter: any) {
return IdentityResourceService.getIdentityResources(filter)
}
private handleShowEditIdentityResourceForm(resource: IdentityResource) {
@ -303,7 +279,7 @@ export default class extends Vue {
if (action === 'confirm') {
IdentityResourceService.deleteIdentityResource(id).then(() => {
this.$message.success(this.l('identityServer.deleteIdentityResourceSuccess', { name: name }))
this.handleGetIdentityResources()
this.refreshPagedData()
})
}
}
@ -323,10 +299,6 @@ export default class extends Vue {
}
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
private formatStatusText(status: boolean) {
let statusText = ''
if (status) {
@ -343,7 +315,7 @@ export default class extends Vue {
this.showEditIdentityResourceDialog = false
this.showEditIdentityPropertyDialog = false
if (changed) {
this.handleGetIdentityResources()
this.refreshPagedData()
}
}
}

43
vueJs/src/views/admin/organization-unit/components/RoleOrganizationUint.vue

@ -6,7 +6,7 @@
fit
highlight-current-row
style="width: 100%;"
:data="organizationUnitRoles"
:data="dataList"
>
<el-table-column
:label="$t('roles.name')"
@ -58,19 +58,20 @@
</el-table>
<pagination
v-show="organizationUnitRoleCount>0"
:total="organizationUnitRoleCount"
:page.sync="organizationUnitRoleFilter.skipCount"
:limit.sync="organizationUnitRoleFilter.maxResultCount"
@pagination="handleGetOrganizationUnitRoles"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
/>
</div>
</template>
<script lang="ts">
import { Component, Prop, Watch, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import { Prop, Watch } from 'vue-property-decorator'
import Component, { mixins } from 'vue-class-component'
import OrganizationUnitService, { OrganizationUnitGetRoleByPaged } from '@/api/organizationunit'
import { RoleDto } from '@/api/roles'
import Pagination from '@/components/Pagination/index.vue'
@Component({
@ -79,36 +80,26 @@ import Pagination from '@/components/Pagination/index.vue'
Pagination
}
})
export default class extends Vue {
export default class extends mixins(DataListMiXin) {
@Prop({ default: '' })
private organizationUnitId?: string
private organizationUnitRoleFilter: OrganizationUnitGetRoleByPaged
private organizationUnitRoleCount: number
private organizationUnitRoles: RoleDto[]
constructor() {
super()
this.organizationUnitRoleCount = 0
this.organizationUnitRoles = new Array<RoleDto>()
this.organizationUnitRoleFilter = new OrganizationUnitGetRoleByPaged()
}
public dataFilter = new OrganizationUnitGetRoleByPaged()
@Watch('organizationUnitId', { immediate: true })
private onOrganizationUnitIdChanged() {
this.organizationUnitRoles = new Array<RoleDto>()
this.dataList = new Array<any>()
if (this.organizationUnitId) {
this.handleGetOrganizationUnitRoles()
this.dataFilter.id = this.organizationUnitId
this.refreshPagedData()
}
}
private handleGetOrganizationUnitRoles() {
protected getPagedList(filter: any) {
if (this.organizationUnitId) {
this.organizationUnitRoleFilter.id = this.organizationUnitId
OrganizationUnitService.organizationUnitGetRoles(this.organizationUnitRoleFilter).then(res => {
this.organizationUnitRoles = res.items
})
return OrganizationUnitService.organizationUnitGetRoles(filter)
}
return this.getEmptyPagedList()
}
}
</script>

29
vueJs/src/views/admin/organization-unit/components/UserOrganizationUint.vue

@ -5,7 +5,7 @@
fit
highlight-current-row
style="width: 100%;"
:data="organizationUnitUsers"
:data="dataList"
>
<el-table-column
:label="$t('users.userName')"
@ -75,8 +75,9 @@
</template>
<script lang="ts">
import { Component, Prop, Watch, Vue } from 'vue-property-decorator'
import { UserDataDto } from '@/api/users'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import { Prop, Watch } from 'vue-property-decorator'
import { dateFormat } from '@/utils'
import OrganizationUnitService from '@/api/organizationunit'
@ -89,25 +90,23 @@ import OrganizationUnitService from '@/api/organizationunit'
}
}
})
export default class extends Vue {
export default class extends mixins(DataListMiXin) {
@Prop({ default: '' })
private organizationUnitId?: string
private organizationUnitUsers: UserDataDto[]
constructor() {
super()
this.organizationUnitUsers = new Array<UserDataDto>()
}
@Watch('organizationUnitId', { immediate: true })
private onOrganizationUnitIdChanged() {
this.organizationUnitUsers = new Array<UserDataDto>()
this.dataList = new Array<any>()
if (this.organizationUnitId) {
this.refreshData()
}
}
protected getList() {
if (this.organizationUnitId) {
OrganizationUnitService.organizationUnitGetUsers(this.organizationUnitId).then(res => {
this.organizationUnitUsers = res.items
})
return OrganizationUnitService.organizationUnitGetUsers(this.organizationUnitId)
}
return this.getEmptyList()
}
}
</script>

45
vueJs/src/views/admin/roles/index.vue

@ -5,7 +5,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetRoles"
@click="refreshPagedData"
>
{{ $t('roles.refreshList') }}
</el-button>
@ -20,9 +20,9 @@
</div>
<el-table
v-loading="roleListLoading"
v-loading="dataLoading"
row-key="id"
:data="roleList"
:data="dataList"
border
fit
highlight-current-row
@ -134,11 +134,11 @@
</el-table>
<pagination
v-show="roleCount>0"
:total="roleCount"
:page.sync="roleQueryFilter.skipCount"
:limit.sync="roleQueryFilter.maxResultCount"
@pagination="handleGetRoles"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
/>
<el-dialog
@ -156,7 +156,8 @@
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import RoleService, { CreateRoleDto, RoleDto, UpdateRoleDto, RoleGetPagedDto } from '@/api/roles'
import { checkPermission } from '@/utils/permission'
import Pagination from '@/components/Pagination/index.vue'
@ -174,27 +175,19 @@ import RoleEditForm from './components/RoleEditForm.vue'
checkPermission
}
})
export default class extends Vue {
private roleCount = 0
private roleQueryFilter = new RoleGetPagedDto()
private roleList = new Array<RoleDto>()
private roleListLoading = false
export default class extends mixins(DataListMiXin) {
private showEditDialog = false
private editRoleId = ''
public dataFilter = new RoleGetPagedDto()
mounted() {
this.handleGetRoles()
this.refreshPagedData()
}
/** 获取角色权限列表 */
private handleGetRoles() {
this.roleListLoading = true
RoleService.getRoles(this.roleQueryFilter).then(res => {
this.roleList = res.items
this.roleCount = res.totalCount
this.roleListLoading = false
})
protected getPagedList(filter: any) {
return RoleService.getRoles(filter)
}
/** 响应角色行操作事件 */
@ -232,7 +225,7 @@ export default class extends Vue {
RoleService.createRole(createRoleDto).then(role => {
const message = this.$t('roles.createRoleSuccess', { name: role.name }).toString()
this.$message.success(message)
this.handleGetRoles()
this.refreshPagedData()
})
})
}
@ -251,7 +244,7 @@ export default class extends Vue {
setDefaultRoleDto.concurrencyStamp = role.concurrencyStamp
RoleService.updateRole(role.id, setDefaultRoleDto).then(role => {
this.$message.success(this.$t('roles.roleHasBeenSetDefault', { name: role.name }).toString())
this.handleGetRoles()
this.refreshPagedData()
})
}
@ -263,7 +256,7 @@ export default class extends Vue {
if (action === 'confirm') {
RoleService.deleteRole(role.id).then(() => {
this.$message.success(this.$t('roles.roleHasBeenDeleted', { name: role.name }).toString())
this.handleGetRoles()
this.refreshPagedData()
})
}
}

2
vueJs/src/views/admin/tenants/components/TenantCreateOrEditForm.vue

@ -60,7 +60,7 @@
</template>
<script lang="ts">
import TenantService, { TenantCreateOrEdit } from '@/api/tenant'
import TenantService, { TenantCreateOrEdit } from '@/api/tenant-management'
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
@Component({

2
vueJs/src/views/admin/tenants/components/TenantEditConnectionForm.vue

@ -94,7 +94,7 @@
</template>
<script lang="ts">
import TenantService, { TenantConnectionString } from '@/api/tenant'
import TenantService, { TenantConnectionString } from '@/api/tenant-management'
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'
import { checkPermission } from '@/utils/permission'

2
vueJs/src/views/admin/tenants/components/TenantFeatureEditForm.vue

@ -34,8 +34,6 @@ export default class extends Vue {
private onFormClosed() {
this.$emit('closed')
const featureManagement = this.$refs.featureManagement as FeatureManagement
featureManagement.resetFeature()
}
}
</script>

73
vueJs/src/views/admin/tenants/index.vue

@ -6,7 +6,7 @@
style="padding-left:10px;"
>{{ $t('global.queryFilter') }}</label>
<el-input
v-model="tenantGetPagedFilter.filter"
v-model="dataFilter.filter"
:placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -15,7 +15,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetTenants"
@click="refreshPagedData"
>
{{ $t('global.searchList') }}
</el-button>
@ -30,9 +30,9 @@
</div>
<el-table
v-loading="tenantListLoading"
v-loading="dataLoading"
row-key="id"
:data="tenantList"
:data="dataList"
border
fit
highlight-current-row
@ -142,11 +142,11 @@
</el-table>
<Pagination
v-show="tenantListCount>0"
:total="tenantListCount"
:page.sync="tenantGetPagedFilter.skipCount"
:limit.sync="tenantGetPagedFilter.maxResultCount"
@pagination="handleGetTenants"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
@sort-change="handleSortChange"
/>
@ -191,8 +191,9 @@
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import TenantService, { TenantDto, TenantGetByPaged } from '@/api/tenant'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import TenantService, { TenantDto, TenantGetByPaged } from '@/api/tenant-management'
import { dateFormat } from '@/utils/index'
import { checkPermission } from '@/utils/permission'
import Pagination from '@/components/Pagination/index.vue'
@ -218,40 +219,20 @@ import TenantEditConnectionForm from './components/TenantEditConnectionForm.vue'
}
}
})
export default class extends Vue {
private editTenantId: string
private tenantList: TenantDto[]
private tenantListCount: number
private tenantListLoading: boolean
private tenantGetPagedFilter: TenantGetByPaged
private showEditTenantConnectionDialog: boolean
private showCreateOrEditTenantDialog: boolean
export default class extends mixins(DataListMiXin) {
private editTenantId = ''
private showEditTenantConnectionDialog = false
private showCreateOrEditTenantDialog = false
private showFeatureEditFormDialog = false
constructor() {
super()
this.editTenantId = ''
this.tenantListCount = 0
this.tenantListLoading = false
this.tenantList = new Array<TenantDto>()
this.tenantGetPagedFilter = new TenantGetByPaged()
this.showCreateOrEditTenantDialog = false
this.showEditTenantConnectionDialog = false
}
public dataFilter = new TenantGetByPaged()
mounted() {
this.handleGetTenants()
this.refreshPagedData()
}
private handleGetTenants() {
this.tenantListLoading = true
TenantService.getTenants(this.tenantGetPagedFilter).then(tenants => {
this.tenantList = tenants.items
this.tenantListCount = tenants.totalCount
this.tenantListLoading = false
})
protected getPagedList(filter: any) {
return TenantService.getTenants(filter)
}
private handleCommand(command: {key: string, row: TenantDto}) {
@ -283,7 +264,7 @@ export default class extends Vue {
if (action === 'confirm') {
TenantService.deleteTenant(id).then(() => {
this.$message.success(this.l('tenant.deleteTenantSuccess', { name: name }))
this.handleGetTenants()
this.refreshPagedData()
})
}
}
@ -294,7 +275,7 @@ export default class extends Vue {
this.showEditTenantConnectionDialog = false
this.editTenantId = ''
if (changed) {
this.handleGetTenants()
this.refreshPagedData()
}
}
@ -302,22 +283,14 @@ export default class extends Vue {
this.showCreateOrEditTenantDialog = false
this.editTenantId = ''
if (changed) {
this.handleGetTenants()
}
this.refreshPagedData()
}
private handleSortChange(column: any) {
this.tenantGetPagedFilter.sorting = column.prop
}
private onFeatureEditFormClosed() {
this.showFeatureEditFormDialog = false
this.editTenantId = ''
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>

72
vueJs/src/views/admin/users/index.vue

@ -6,6 +6,7 @@
style="padding-left:0;"
>{{ $t('users.queryFilter') }}</label>
<el-input
v-model="dataFilter.filter"
:placeholder="$t('users.filterString')"
style="width: 250px;margin-left: 10px;"
class="filter-item"
@ -14,7 +15,7 @@
class="filter-item"
style="margin-left: 10px; text-alignt"
type="primary"
@click="handleGetUsers"
@click="refreshPagedData"
>
{{ $t('users.searchList') }}
</el-button>
@ -29,14 +30,13 @@
</div>
<el-table
v-loading="userListLoading"
v-loading="dataLoading"
row-key="id"
:data="userList"
:data="dataList"
border
fit
highlight-current-row
style="width: 100%;"
:default-sort="sortRule"
@sort-change="handleSortChange"
>
<el-table-column
@ -150,11 +150,11 @@
</el-table>
<Pagination
v-show="totalCount>0"
:total="totalCount"
:page.sync="getUserQuery.skipCount"
:limit.sync="getUserQuery.maxResultCount"
@pagination="handleGetUsers"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
/>
<el-dialog
@ -185,7 +185,8 @@
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import Pagination from '@/components/Pagination/index.vue'
import { dateFormat } from '@/utils'
import UserApiService, { UserDataDto, UsersGetPagedDto } from '@/api/users'
@ -210,48 +211,22 @@ import { checkPermission } from '@/utils/permission'
checkPermission
}
})
export default class extends Vue {
/** 用户列表加载中 */
private userListLoading: boolean
/** 用户列表 */
private userList: UserDataDto[]
/** 最大用户数量 */
private totalCount: number
export default class extends mixins(DataListMiXin) {
/** 当前编辑用户 */
private editUser: UserDataDto
/** 排序组别 */
private sortRule: { prop: string, sort: string }
/** 查询用户过滤参数 */
private getUserQuery: UsersGetPagedDto
private editUser = new UserDataDto()
private showCreateUserDialog: boolean
private showEditUserDialog: boolean
public dataFilter = new UsersGetPagedDto()
constructor() {
super()
this.totalCount = 0
this.editUser = new UserDataDto()
this.userListLoading = false
this.sortRule = { prop: '', sort: '' }
this.getUserQuery = new UsersGetPagedDto()
this.userList = new Array<UserDataDto>()
this.showEditUserDialog = false
this.showCreateUserDialog = false
}
private showCreateUserDialog = false
private showEditUserDialog = false
mounted() {
this.handleGetUsers()
this.refreshPagedData()
}
/** 查询用户列表 */
private handleGetUsers() {
this.userListLoading = true
UserApiService.getUsers(this.getUserQuery).then(res => {
this.totalCount = res.totalCount
this.userList = res.items
this.userListLoading = false
})
protected getPagedList(filter: any) {
return UserApiService.getUsers(filter)
}
/**
@ -273,7 +248,7 @@ export default class extends Vue {
}
private handleUserProfileChanged() {
this.handleGetUsers()
this.refreshPagedData()
}
private handleCreateUser() {
@ -302,17 +277,12 @@ export default class extends Vue {
if (action === 'confirm') {
UserApiService.deleteUser(row.id).then(() => {
this.$message.success(this.$t('users.userHasBeenDeleted', { name: row.userName }).toString())
this.handleGetUsers()
this.refreshPagedData()
})
}
}
})
}
/** 响应表格排序事件 */
private handleSortChange(column: any) {
this.getUserQuery.sorting = column.sort
}
}
</script>

77
vueJs/src/views/file-management/index.vue

@ -27,9 +27,9 @@
<el-table
ref="fileSystemTable"
v-loading="fileSystemListLoading"
v-loading="dataLoading"
row-key="name"
:data="fileSystemList"
:data="dataList"
border
fit
highlight-current-row
@ -38,6 +38,7 @@
@row-click="onRowClick"
@row-dblclick="onRowDoubleClick"
@contextmenu.native="onContextMenu"
@sort-change="handleSortChange"
>
<el-table-column
type="selection"
@ -151,11 +152,11 @@
</el-table>
<Pagination
v-show="fileSystemCount>0"
:total="fileSystemCount"
:page.sync="fileSystemGetFilter.skipCount"
:limit.sync="fileSystemGetFilter.maxResultCount"
@pagination="handleGetFileSystemList"
v-show="dataTotal>0"
:total="dataTotal"
:page.sync="dataFilter.skipCount"
:limit.sync="dataFilter.maxResultCount"
@pagination="refreshPagedData"
/>
<el-dialog
@ -176,10 +177,12 @@
<script lang="ts">
import { dateFormat } from '@/utils'
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import { Vue } from 'vue-property-decorator'
import DataListMiXin from '@/mixins/DataListMiXin'
import Component, { mixins } from 'vue-class-component'
import FileUploadForm from './components/FileUploadForm.vue'
import Pagination from '@/components/Pagination/index.vue'
import FileSystemService, { FileSystem, FileSystemGetByPaged, FileSystemType } from '@/api/filemanagement'
import FileSystemService, { FileSystemGetByPaged, FileSystemType } from '@/api/filemanagement'
const kbUnit = 1 * 1024
const mbUnit = kbUnit * 1024
@ -247,48 +250,28 @@ const $contextmenu = Vue.prototype.$contextmenu
}
}
})
export default class extends Vue {
private showFileUploadDialog!: boolean
private downloading!: boolean
private lastFilePath!: string
private fileSystemRoot!: string[]
private fileSystemList?: FileSystem[]
private fileSystemCount!: number
private fileSystemListLoading!: boolean
private fileSystemGetFilter!: FileSystemGetByPaged
export default class extends mixins(DataListMiXin) {
private showFileUploadDialog = false
private downloading = false
private lastFilePath = ''
private fileSystemRoot = new Array<string>()
constructor() {
super()
this.lastFilePath = ''
this.fileSystemCount = 0
this.downloading = false
this.fileSystemListLoading = false
this.showFileUploadDialog = false
this.fileSystemRoot = new Array<string>()
this.fileSystemList = new Array<FileSystem>()
this.fileSystemGetFilter = new FileSystemGetByPaged()
}
public dataFilter = new FileSystemGetByPaged()
mounted() {
this.fileSystemRoot.push(this.$t('fileSystem.root').toString())
this.handleGetFileSystemList()
this.refreshPagedData()
}
private handleGetFileSystemList() {
this.fileSystemListLoading = true
FileSystemService.getFileSystemList(this.fileSystemGetFilter).then(res => {
this.fileSystemCount = res.totalCount
this.fileSystemList = res.items
}).finally(() => {
this.fileSystemListLoading = false
})
protected getPagedList(filter: any) {
return FileSystemService.getFileSystemList(filter)
}
private navigationToFilePath() {
const fileSystemPathArray = this.fileSystemRoot.slice(1)
const fileSystemPath = fileSystemPathArray.join('/')
this.fileSystemGetFilter.parent = fileSystemPath
this.handleGetFileSystemList()
this.dataFilter.parent = fileSystemPath
this.refreshPagedData()
}
private handleGoToLastFolder() {
@ -311,12 +294,12 @@ export default class extends Vue {
}
FileSystemService.deleteFolder(path).then(() => {
this.$notify.success(this.l('global.dataHasBeenDeleted', { name: row.name }))
this.handleGetFileSystemList()
this.refreshPagedData()
})
} else {
FileSystemService.deleteFile(row.parent, row.name).then(() => {
this.$notify.success(this.l('global.dataHasBeenDeleted', { name: row.name }))
this.handleGetFileSystemList()
this.refreshPagedData()
})
}
}
@ -412,12 +395,12 @@ export default class extends Vue {
this.fileSystemRoot.splice(index + 1)
this.navigationToFilePath()
} else {
this.handleGetFileSystemList()
this.refreshPagedData()
}
}
private onFileUploaded() {
this.handleGetFileSystemList()
this.refreshPagedData()
}
private onFileUploadFormClosed() {
@ -450,7 +433,7 @@ export default class extends Vue {
}).then((val: any) => {
FileSystemService.createFolder(val.value, parent).then(() => {
this.$message.success(this.$t('fileSystem.folderCreateSuccess', { name: val.value }).toString())
this.handleGetFileSystemList()
this.refreshPagedData()
})
}).catch(_ => _)
},
@ -476,10 +459,6 @@ export default class extends Vue {
})
return false
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
}
</script>

Loading…
Cancel
Save