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 EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "platform", "platform", "{E5D1B78A-1A8F-4D52-BF99-A4A863ADE898}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "platform", "platform", "{E5D1B78A-1A8F-4D52-BF99-A4A863ADE898}"
EndProject 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 EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{8AC72641-30D3-4ACF-89FA-808FADC55C2E}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{8AC72641-30D3-4ACF-89FA-808FADC55C2E}"
EndProject 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 :
Source Server Type : MySQL Source Server Type : MySQL
@ -11,7 +11,7 @@
Target Server Version : 80020 Target Server Version : 80020
File Encoding : 65001 File Encoding : 65001
Date: 12/09/2020 15:21:54 Date: 15/09/2020 14:50:52
*/ */
SET NAMES utf8mb4; SET NAMES utf8mb4;
@ -90,7 +90,7 @@ CREATE TABLE `appapigatewayauthoptions` (
PRIMARY KEY (`Id`) USING BTREE, PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayAuthOptions_ReRouteId`(`ReRouteId`) 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 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 -- Records of appapigatewayauthoptions
@ -208,7 +208,7 @@ CREATE TABLE `appapigatewaybalanceroptions` (
UNIQUE INDEX `IX_AppApiGatewayBalancerOptions_ReRouteId`(`ReRouteId`) USING BTREE, 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_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 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 -- Records of appapigatewaybalanceroptions
@ -323,7 +323,7 @@ CREATE TABLE `appapigatewaycacheoptions` (
PRIMARY KEY (`Id`) USING BTREE, PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayCacheOptions_ReRouteId`(`ReRouteId`) 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 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 -- 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 (41, 1262665159905267712, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (42, 1262665329829105664, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (42, 1262665329829105664, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (43, 1262665456471920640, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (43, 1262665456471920640, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (44, 1262665628165754880, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (44, 1262665628165754880, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (45, 1262666172682883072, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (45, 1262666172682883072, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (47, 1262723402331885568, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (47, 1262723402331885568, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (48, 1262935771746734080, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (48, 1262935771746734080, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (49, 1262935906522304512, 0, ''); INSERT INTO `appapigatewaycacheoptions` VALUES (49, 1262935906522304512, 0, '');
@ -533,7 +533,7 @@ CREATE TABLE `appapigatewayhttpoptions` (
UNIQUE INDEX `IX_AppApiGatewayHttpOptions_ReRouteId`(`ReRouteId`) USING BTREE, 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_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 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 -- Records of appapigatewayhttpoptions
@ -652,7 +652,7 @@ CREATE TABLE `appapigatewayqosoptions` (
UNIQUE INDEX `IX_AppApiGatewayQoSOptions_ReRouteId`(`ReRouteId`) USING BTREE, 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_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 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 -- Records of appapigatewayqosoptions
@ -795,7 +795,7 @@ CREATE TABLE `appapigatewayratelimitrule` (
UNIQUE INDEX `IX_AppApiGatewayRateLimitRule_ReRouteId`(`ReRouteId`) USING BTREE, 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_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 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 -- Records of appapigatewayratelimitrule
@ -935,7 +935,7 @@ CREATE TABLE `appapigatewayreroute` (
PRIMARY KEY (`Id`) USING BTREE, PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `AK_AppApiGatewayReRoute_ReRouteId`(`ReRouteId`) USING BTREE, UNIQUE INDEX `AK_AppApiGatewayReRoute_ReRouteId`(`ReRouteId`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayReRoute_AppId_DownstreamPathTemplate_UpstreamPa~`(`AppId`, `DownstreamPathTemplate`, `UpstreamPathTemplate`) 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 -- 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 (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 (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 (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 (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, '{}', '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 (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 (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 (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'); 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 (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 (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 (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 (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, '{}', '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 (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, '{}', '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 (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, '{}', '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 (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 (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 (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'); 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, PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewaySecurityOptions_ReRouteId`(`ReRouteId`) 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 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 -- Records of appapigatewaysecurityoptions
@ -1198,10 +1198,6 @@ CREATE TABLE `cap.published` (
INDEX `IX_ExpiresAt`(`ExpiresAt`) USING BTREE INDEX `IX_ExpiresAt`(`ExpiresAt`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of cap.published
-- ----------------------------
-- ---------------------------- -- ----------------------------
-- Table structure for cap.received -- 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 namespace LINGYUN.Abp.TenantManagement
{ {
[RemoteService(Name = TenantManagementRemoteServiceConsts.RemoteServiceName)] [RemoteService(Name = TenantManagementRemoteServiceConsts.RemoteServiceName)]
[Area("multi-tenancy")] [Area("tenant-management")]
[Route("api/multi-tenancy/tenants")] [Route("api/tenant-management/tenants")]
public class TenantController : AbpController, ITenantAppService //TODO: Throws exception on validation if we inherit from Controller public class TenantController : AbpController, ITenantAppService //TODO: Throws exception on validation if we inherit from Controller
{ {
protected ITenantAppService TenantAppService { get; } 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.SettingManagement;
using LINGYUN.Abp.TenantManagement; using LINGYUN.Abp.TenantManagement;
using LINGYUN.ApiGateway; using LINGYUN.ApiGateway;
using LINGYUN.BackendAdmin.MultiTenancy; using LINGYUN.Abp.BackendAdmin.MultiTenancy;
using LINGYUN.Platform; using LINGYUN.Platform;
using LINYUN.Abp.Sms.Aliyun; using LINYUN.Abp.Sms.Aliyun;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
@ -54,7 +54,7 @@ using Volo.Abp.TenantManagement.EntityFrameworkCore;
using Volo.Abp.Threading; using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem; using Volo.Abp.VirtualFileSystem;
namespace LINGYUN.BackendAdmin namespace LINGYUN.Abp.BackendAdmin
{ {
[DependsOn( [DependsOn(
typeof(AbpAspNetCoreMvcUiMultiTenancyModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
@ -183,7 +183,7 @@ namespace LINGYUN.BackendAdmin
Configure<AbpVirtualFileSystemOptions>(options => 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 options.Resources
.Get<IdentityResource>() .Get<IdentityResource>()
.AddVirtualJson("/LINGYUN/BackendAdmin/Identity/Localization"); .AddVirtualJson("/Localization");
options options
.AddLanguagesMapOrUpdate( .AddLanguagesMapOrUpdate(
"vue-admin-element-ui", "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; using Volo.Abp.AspNetCore.Mvc;
#if DEBUG #if DEBUG
namespace LINGYUN.BackendAdmin.Controllers namespace LINGYUN.Abp.BackendAdmin.Controllers
{ {
[Route("Location")] [Route("Location")]
public class LocationController : AbpController 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 EXPOSE 80/tcp
VOLUME [ "./app/Logs" ] 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.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore; using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.EntityFrameworkCore namespace LINGYUN.Abp.BackendAdmin.EntityFrameworkCore
{ {
public class BackendAdminHostMigrationsDbContext : AbpDbContext<BackendAdminHostMigrationsDbContext> 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.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
namespace LINGYUN.BackendAdmin.EntityFrameworkCore namespace LINGYUN.Abp.BackendAdmin.EntityFrameworkCore
{ {
public class BackendAdminHostMigrationsDbContextFactory : IDesignTimeDbContextFactory<BackendAdminHostMigrationsDbContext> 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.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace LINGYUN.BackendAdmin.EventBus.Handlers namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers
{ {
public class TenantConnectionStringCreateEventHandler 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.PermissionManagement;
using Volo.Abp.Uow; using Volo.Abp.Uow;
namespace LINGYUN.BackendAdmin.EventBus.Handlers namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers
{ {
public class TenantCreateEventHandler : IDistributedEventHandler<CreateEventData>, ITransientDependency 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.TenantManagement;
using Volo.Abp.Uow; using Volo.Abp.Uow;
namespace LINGYUN.BackendAdmin.EventBus.Handlers namespace LINGYUN.Abp.BackendAdmin.EventBus.Handlers
{ {
public class TenantDeleteEventHandler : IDistributedEventHandler<EntityDeletedEto<TenantEto>>, ITransientDependency 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> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>LINGYUN.BackendAdmin</RootNamespace> <RootNamespace>LINGYUN.Abp.BackendAdmin</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -13,13 +13,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Remove="LINGYUN\BackendAdmin\Identity\Localization\en.json" /> <Content Remove="Localization\en.json" />
<Content Remove="LINGYUN\BackendAdmin\Identity\Localization\zh-Hans.json" /> <Content Remove="Localization\zh-Hans.json" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="LINGYUN\BackendAdmin\Identity\Localization\en.json" /> <EmbeddedResource Include="Localization\en.json" />
<EmbeddedResource Include="LINGYUN\BackendAdmin\Identity\Localization\zh-Hans.json" /> <EmbeddedResource Include="Localization\zh-Hans.json" />
</ItemGroup> </ItemGroup>
<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 /> // <auto-generated />
using System; using System;
using LINGYUN.BackendAdmin.EntityFrameworkCore; using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.Migrations namespace LINGYUN.Abp.BackendAdmin.Migrations
{ {
[DbContext(typeof(BackendAdminHostMigrationsDbContext))] [DbContext(typeof(BackendAdminHostMigrationsDbContext))]
[Migration("20200804085641_Migration-Backend-Admin-MySql")] [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 System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
namespace LINGYUN.BackendAdmin.Migrations namespace LINGYUN.Abp.BackendAdmin.Migrations
{ {
public partial class MigrationBackendAdminMySql : Migration 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 /> // <auto-generated />
using System; using System;
using LINGYUN.BackendAdmin.EntityFrameworkCore; using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.Migrations namespace LINGYUN.Abp.BackendAdmin.Migrations
{ {
[DbContext(typeof(BackendAdminHostMigrationsDbContext))] [DbContext(typeof(BackendAdminHostMigrationsDbContext))]
[Migration("20200910080638_Add-abp-feature-module")] [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 System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
namespace LINGYUN.BackendAdmin.Migrations namespace LINGYUN.Abp.BackendAdmin.Migrations
{ {
public partial class Addabpfeaturemodule : Migration 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 /> // <auto-generated />
using System; using System;
using LINGYUN.BackendAdmin.EntityFrameworkCore; using LINGYUN.Abp.BackendAdmin.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore;
namespace LINGYUN.BackendAdmin.Migrations namespace LINGYUN.Abp.BackendAdmin.Migrations
{ {
[DbContext(typeof(BackendAdminHostMigrationsDbContext))] [DbContext(typeof(BackendAdminHostMigrationsDbContext))]
partial class BackendAdminHostMigrationsDbContextModelSnapshot : ModelSnapshot 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.MultiTenancy;
using Volo.Abp.Security.Claims; using Volo.Abp.Security.Claims;
namespace LINGYUN.BackendAdmin.MultiTenancy namespace LINGYUN.Abp.BackendAdmin.MultiTenancy
{ {
public class AuthorizationTenantResolveContributor : HttpTenantResolveContributorBase 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;
using System.IO; using System.IO;
namespace LINGYUN.BackendAdmin namespace LINGYUN.Abp.BackendAdmin
{ {
public class Program 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": { "profiles": {
"LINGYUN.BackendAdminApp.Host": { "LINGYUN.Abp.BackendAdminApp.Host": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": false, "launchBrowser": false,
"applicationUrl": "http://localhost:30010", "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.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
namespace LINGYUN.BackendAdmin namespace LINGYUN.Abp.BackendAdmin
{ {
public class Startup 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 .\apigateway\LINGYUN.ApiGateway.HttpApi.Host\Logs /Q
del .\account\AuthServer.Host\Logs /Q del .\account\AuthServer.Host\Logs /Q
del .\messages\LINGYUN.Abp.MessageService.HttpApi.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. 启动后台管理服务 echo. 启动后台管理服务
cd .\admin\LINGYUN.BackendAdminApp.Host cd .\admin\LINGYUN.Abp.BackendAdmin.HttpApi.Host
if '%1' equ '--publish' goto publish if '%1' equ '--publish' goto publish
if '%1' equ '--run' goto run if '%1' equ '--run' goto run

2
vueJs/src/App.vue

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

2
vueJs/src/api/organizationunit.ts

@ -204,7 +204,7 @@ export class OrganizationUnitGetRoleByPaged extends PagedAndSortedResultRequestD
/** 主键标识 */ /** 主键标识 */
id!: string 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 { export class RoleGetPagedDto extends PagedAndSortedResultRequestDto {
filter?: string filter = ''
} }
export class CreateRoleDto extends RoleBaseDto { 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 const serviceUrl = process.env.VUE_APP_BASE_API
export default class TenantService { export default class TenantService {
public static getTenantByName(name: string) { public static findTenantByName(name: string) {
let _url = '/api/abp/multi-tenancy/tenants/by-name/' let _url = '/api/abp/multi-tenancy/tenants/by-name/'
_url += name _url += name
return ApiService.Get<FindTenantResult>(_url, serviceUrl) 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) { public static getTenantById(id: string) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id _url += id
return ApiService.Get<TenantDto>(_url, serviceUrl) return ApiService.Get<TenantDto>(_url, serviceUrl)
} }
public static getTenants(payload: TenantGetByPaged) { public static getTenants(payload: TenantGetByPaged) {
let _url = '/api/multi-tenancy/tenants' let _url = '/api/tenant-management/tenants'
_url += '?filter=' + payload.filter _url += '?filter=' + payload.filter
_url += '&sorting=' + payload.sorting _url += '&sorting=' + payload.sorting
// 因为abp设计的原因, 需要前端组合页面 // 因为abp设计的原因, 需要前端组合页面
@ -28,43 +34,43 @@ export default class TenantService {
} }
public static createTenant(payload: TenantCreateOrEdit) { public static createTenant(payload: TenantCreateOrEdit) {
const _url = '/api/multi-tenancy/tenants' const _url = '/api/tenant-management/tenants'
return ApiService.Post<TenantDto>(_url, payload, serviceUrl) return ApiService.Post<TenantDto>(_url, payload, serviceUrl)
} }
public static changeTenantName(id: string, name: string) { public static changeTenantName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id _url += id
return ApiService.Put<TenantDto>(_url, { name: name }, serviceUrl) return ApiService.Put<TenantDto>(_url, { name: name }, serviceUrl)
} }
public static deleteTenant(id: string) { public static deleteTenant(id: string) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id _url += id
return ApiService.Delete(_url, serviceUrl) return ApiService.Delete(_url, serviceUrl)
} }
public static getTenantConnections(id: string) { public static getTenantConnections(id: string) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation' _url += id + '/concatenation'
return ApiService.Get<ListResultDto<TenantConnectionString>>(_url, serviceUrl) return ApiService.Get<ListResultDto<TenantConnectionString>>(_url, serviceUrl)
} }
public static getTenantConnectionByName(id: string, name: string) { public static getTenantConnectionByName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation/' _url += id + '/concatenation/'
_url += name _url += name
return ApiService.Get<TenantConnectionString>(_url, serviceUrl) return ApiService.Get<TenantConnectionString>(_url, serviceUrl)
} }
public static setTenantConnection(id: string, payload: TenantConnectionString) { public static setTenantConnection(id: string, payload: TenantConnectionString) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation' _url += id + '/concatenation'
return ApiService.Put<TenantConnectionString>(_url, payload, serviceUrl) return ApiService.Put<TenantConnectionString>(_url, payload, serviceUrl)
} }
public static deleteTenantConnectionByName(id: string, name: string) { public static deleteTenantConnectionByName(id: string, name: string) {
let _url = '/api/multi-tenancy/tenants/' let _url = '/api/tenant-management/tenants/'
_url += id + '/concatenation/' _url += id + '/concatenation/'
_url += name _url += name
return ApiService.Delete(_url, serviceUrl) return ApiService.Delete(_url, serviceUrl)
@ -81,7 +87,6 @@ export class TenantGetByPaged extends PagedAndSortedResultRequestDto {
this.filter = '' this.filter = ''
this.sorting = '' this.sorting = ''
this.skipCount = 1 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) { private async handleSetLanguage(lang: string) {
AppModule.SetLanguage(lang) AppModule.SetLanguage(lang)
this.$i18n.locale = lang this.$i18n.locale = lang
await AbpModule.GetAbpConfiguration() await AbpModule.LoadAbpConfiguration()
this.$message({ this.$message({
message: 'Switch Language Success', message: 'Switch Language Success',
type: 'success' type: 'success'

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

@ -20,7 +20,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator' 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' import { setTenant, removeTenant } from '@/utils/sessions'
@Component({ @Component({
@ -37,7 +37,7 @@ export default class extends Vue {
}).then((val: any) => { }).then((val: any) => {
removeTenant() removeTenant()
if (val.value) { if (val.value) {
TenantService.getTenantByName(val.value).then(tenant => { TenantService.findTenantByName(val.value).then(tenant => {
if (tenant.success) { if (tenant.success) {
setTenant(tenant.tenantId) setTenant(tenant.tenantId)
this.$emit('input', tenant.name) 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 }) @Action({ rawError: true })
public async GetAbpConfiguration() { public async LoadAbpConfiguration() {
const config = await AbpConfigurationService.getAbpConfiguration() const config = await AbpConfigurationService.getAbpConfiguration()
this.SET_ABPCONFIGURATION(config) this.SET_ABPCONFIGURATION(config)
this.SET_ABPLOCALIZER(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 { VuexModule, Module, Action, Mutation, getModule } from 'vuex-module-decorators'
import UserApiService, { UserLoginData, UserLoginPhoneData } from '@/api/users' 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 { getItem, setItem, removeItem } from '@/utils/localStorage'
import { resetRouter } from '@/router' import { resetRouter } from '@/router'
import { TagsViewModule } from './tags-view' import { TagsViewModule } from './tags-view'
@ -156,13 +156,13 @@ class User extends VuexModule implements IUserState {
@Action @Action
private async PreLogin(tenantName: string) { private async PreLogin(tenantName: string) {
const tenantResult = await TenantService.getTenantByName(tenantName) const tenantResult = await TenantService.findTenantByName(tenantName)
setTenant(tenantResult.tenantId) setTenant(tenantResult.tenantId)
} }
@Action @Action
private async PostLogin() { 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;" style="padding-left:10px;"
>{{ $t('apiGateWay.appId') }}</label> >{{ $t('apiGateWay.appId') }}</label>
<el-select <el-select
v-model="aggregateRouteGetPagedFilter.appId" v-model="dataFilter.appId"
style="width: 250px;margin-left: 10px;" style="width: 250px;margin-left: 10px;"
class="filter-item" class="filter-item"
:placeholder="$t('pleaseSelectBy', {name: $t('apiGateWay.appId')})" :placeholder="$t('pleaseSelectBy', {name: $t('apiGateWay.appId')})"
@ -23,7 +23,7 @@
style="padding-left:10px;" style="padding-left:10px;"
>{{ $t('queryFilter') }}</label> >{{ $t('queryFilter') }}</label>
<el-input <el-input
v-model="aggregateRouteGetPagedFilter.filter" v-model="dataFilter.filter"
:placeholder="$t('filterString')" :placeholder="$t('filterString')"
style="width: 250px;margin-left: 10px;" style="width: 250px;margin-left: 10px;"
class="filter-item" class="filter-item"
@ -32,7 +32,7 @@
class="filter-item" class="filter-item"
style="margin-left: 10px; text-alignt" style="margin-left: 10px; text-alignt"
type="primary" type="primary"
@click="handleGetAggregateRoutes" @click="refreshPagedData"
> >
{{ $t('searchList') }} {{ $t('searchList') }}
</el-button> </el-button>
@ -47,9 +47,9 @@
</div> </div>
<el-table <el-table
v-loading="aggregateRouteListLoading" v-loading="dataLoading"
row-key="reRouteId" row-key="reRouteId"
:data="aggregateRouteList" :data="dataList"
border border
fit fit
highlight-current-row highlight-current-row
@ -172,11 +172,11 @@
</el-table> </el-table>
<Pagination <Pagination
v-show="routesCount>0" v-show="dataTotal>0"
:total="routesCount" :total="dataTotal"
:page.sync="aggregateRouteGetPagedFilter.skipCount" :page.sync="dataFilter.skipCount"
:limit.sync="aggregateRouteGetPagedFilter.maxResultCount" :limit.sync="dataFilter.maxResultCount"
@pagination="handleGetAggregateRoutes" @pagination="refreshPagedData"
@sort-change="handleSortChange" @sort-change="handleSortChange"
/> />
@ -215,7 +215,8 @@
<script lang="ts"> <script lang="ts">
import { checkPermission } from '@/utils/permission' 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 Pagination from '@/components/Pagination/index.vue'
import AggregateRouteConfigEditForm from './components/AggregateRouteConfigEditForm.vue' import AggregateRouteConfigEditForm from './components/AggregateRouteConfigEditForm.vue'
import AggregateRouteCreateOrEditForm from './components/AggregateRouteCreateOrEditForm.vue' import AggregateRouteCreateOrEditForm from './components/AggregateRouteCreateOrEditForm.vue'
@ -244,31 +245,15 @@ import ApiGatewayService, { RouteGroupAppIdDto, AggregateReRoute, AggregateReRou
} }
} }
}) })
export default class extends Vue { export default class extends mixins(DataListMiXin) {
private editAggregateRouteId: string private editAggregateRouteId = ''
private routesCount: number private editRouteTitle = ''
private editRouteTitle: any private routeGroupAppIdOptions = new Array<RouteGroupAppIdDto>()
private aggregateRouteList: AggregateReRoute[]
private aggregateRouteListLoading: boolean
private aggregateRouteGetPagedFilter: AggregateReRouteGetByPaged
private routeGroupAppIdOptions: RouteGroupAppIdDto[]
private showEditAggregateRouteDialog: boolean private showEditAggregateRouteDialog = false
private showEditAggregateRouteConfigDialog: boolean private showEditAggregateRouteConfigDialog = false
constructor() { public dataFilter = new AggregateReRouteGetByPaged()
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
}
mounted() { mounted() {
ApiGatewayService.getRouteGroupAppIds().then(appKeys => { ApiGatewayService.getRouteGroupAppIds().then(appKeys => {
@ -276,23 +261,14 @@ export default class extends Vue {
}) })
} }
private handleGetAggregateRoutes() { protected getPagedList(filter: any) {
if (this.aggregateRouteGetPagedFilter.appId) { if (filter.appId) {
this.aggregateRouteListLoading = true return ApiGatewayService.getAggregateReRoutes(filter)
ApiGatewayService.getAggregateReRoutes(this.aggregateRouteGetPagedFilter).then(routes => {
this.aggregateRouteList = routes.items
this.routesCount = routes.totalCount
}).finally(() => {
this.aggregateRouteListLoading = false
})
} else { } else {
const errorMessage = this.$t('apiGateWay.appIdHasRequired').toString() const errorMessage = this.$t('apiGateWay.appIdHasRequired').toString()
this.$message.warning(errorMessage) this.$message.warning(errorMessage)
} }
} return this.getEmptyPagedList()
private handleSortChange(column: any) {
this.aggregateRouteGetPagedFilter.sorting = column.prop
} }
private handleCommand(command: {key: string, row: AggregateReRoute }) { private handleCommand(command: {key: string, row: AggregateReRoute }) {
@ -314,7 +290,7 @@ export default class extends Vue {
if (action === 'confirm') { if (action === 'confirm') {
ApiGatewayService.deleteAggregateReRoute(reRouteId).then(() => { ApiGatewayService.deleteAggregateReRoute(reRouteId).then(() => {
this.$message.success(this.l('apiGateWay.deleteAggregateRouteSuccess', { name: name })) 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) { private handleCreateOrEditAggregateRoute(reRouteId: string, name: string) {
this.editAggregateRouteId = reRouteId this.editAggregateRouteId = reRouteId
this.editRouteTitle = this.$t('apiGateWay.createAggregateRoute') this.editRouteTitle = this.l('apiGateWay.createAggregateRoute')
if (reRouteId) { if (reRouteId) {
this.editRouteTitle = this.$t('apiGateWay.updateAggregateRouteByName', { name: name }) this.editRouteTitle = this.l('apiGateWay.updateAggregateRouteByName', { name: name })
} }
this.showEditAggregateRouteDialog = true this.showEditAggregateRouteDialog = true
} }
@ -334,8 +310,8 @@ export default class extends Vue {
this.editAggregateRouteId = '' this.editAggregateRouteId = ''
this.editRouteTitle = '' this.editRouteTitle = ''
this.showEditAggregateRouteDialog = false this.showEditAggregateRouteDialog = false
if (changed && this.aggregateRouteGetPagedFilter.appId) { if (changed && this.dataFilter.appId) {
this.handleGetAggregateRoutes() this.refreshPagedData()
} }
} }
@ -343,10 +319,6 @@ export default class extends Vue {
this.editAggregateRouteId = '' this.editAggregateRouteId = ''
this.showEditAggregateRouteConfigDialog = false this.showEditAggregateRouteConfigDialog = false
} }
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}
} }
</script> </script>

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

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

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

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

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

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

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

@ -19,6 +19,16 @@
:prop="'features.' + fi + '.children.' + fci + '.value'" :prop="'features.' + fi + '.children.' + fci + '.value'"
:rules="featureChildren.valueType.validator | inputRuleFilter(localizer)" :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 <div
v-if="featureChildren.valueType.name === 'ToggleStringValueType'" v-if="featureChildren.valueType.name === 'ToggleStringValueType'"
> >
@ -74,6 +84,7 @@
<script lang="ts"> <script lang="ts">
import { Component, Prop, Vue, Watch } from 'vue-property-decorator' import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
import FeatureManagementService, { ValueType, Feature, Features } from '@/api/feature-management' 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() { 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 => { FeatureManagementService.getFeatures(this.providerName, this.providerKey).then(res => {
this.features = new FeatureItems() this.features = new FeatureItems()
res.features.forEach(feature => { res.features.forEach(feature => {
const featureTrue = new FeatureItem( const featureItem = new FeatureItem(
feature.name, feature.name,
feature.value, feature.value,
feature.displayName, feature.displayName,
@ -245,12 +257,12 @@ export default class extends Vue {
if (feature.parentName) { if (feature.parentName) {
const children = this.features.features.find(f => f.name === feature.parentName) const children = this.features.features.find(f => f.name === feature.parentName)
if (children) { if (children) {
children.appendChildren(featureTrue) children.appendChildren(featureItem)
} else { } else {
this.features.features.push(featureTrue) this.features.features.push(featureItem)
} }
} else { } else {
this.features.features.push(featureTrue) this.features.features.push(featureItem)
} }
}) })
// ? // ?
@ -299,6 +311,7 @@ export default class extends Vue {
*/ */
private onClosed() { private onClosed() {
this.$emit('closed') this.$emit('closed')
this.resetFeature()
} }
} }
</script> </script>

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -94,7 +94,7 @@
</template> </template>
<script lang="ts"> <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 { Component, Vue, Prop, Watch } from 'vue-property-decorator'
import { checkPermission } from '@/utils/permission' 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() { private onFormClosed() {
this.$emit('closed') this.$emit('closed')
const featureManagement = this.$refs.featureManagement as FeatureManagement
featureManagement.resetFeature()
} }
} }
</script> </script>

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

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

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

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

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

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

Loading…
Cancel
Save