Browse Source

added upload file vive and enabled file-management permissions

pull/52/head
cKey 5 years ago
parent
commit
e834205179
  1. 22
      aspnet-core/LINGYUN.MicroService.sln
  2. 99
      aspnet-core/database/ApiGateway-Init.sql
  3. 16
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/FileCreateDto.cs
  4. 68
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application/LINGYUN/Abp/FileManagement/FileSystemAppService.cs
  5. 6
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain.Shared/LINGYUN/Abp/FileManagement/Localization/Resources/en.json
  6. 6
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain.Shared/LINGYUN/Abp/FileManagement/Localization/Resources/zh-Hans.json
  7. 0
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain.Shared/LINGYUN/Abp/FileManagement/Settings/AbpFileManagementSettingDefinitionProvider.cs
  8. 36
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.HttpApi/LINGYUN/Abp/FileManagement/FileSystemController.cs
  9. 35
      aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.HttpApi/LINGYUN/Abp/FileManagement/FileUploadDto.cs
  10. 3
      aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs
  11. 7
      aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj
  12. 1
      vueJs/.env.development
  13. 13
      vueJs/package-lock.json
  14. 1
      vueJs/package.json
  15. 20
      vueJs/src/api/filemanagement.ts
  16. 10
      vueJs/src/lang/zh.ts
  17. 4
      vueJs/src/main.ts
  18. 3
      vueJs/src/shims.d.ts
  19. 3
      vueJs/src/store/modules/user.ts
  20. 46
      vueJs/src/views/admin/settings/components/SettingEditForm.vue
  21. 106
      vueJs/src/views/file-management/components/FileUploadForm.vue
  22. 86
      vueJs/src/views/file-management/index.vue

22
aspnet-core/LINGYUN.MicroService.sln

@ -179,8 +179,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Platform.HttpApi",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "admin", "admin", "{F4615BCE-D5C1-407A-8681-8EEE92DEF9D0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Platform.HttpApi.Host", "services\platform\LINGYUN.Platform.HttpApi.Host\LINGYUN.Platform.HttpApi.Host.csproj", "{8C2D5292-19D7-4355-BC23-5A3B1F4B219B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.EntityFrameworkCore.Tests", "tests\LINGYUN.Abp.EntityFrameworkCore.Tests\LINGYUN.Abp.EntityFrameworkCore.Tests.csproj", "{F3D9B137-32DE-4018-8058-78AB17FCDF9C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "identity", "identity", "{52B5D4F7-237B-4E0A-A167-68442164F70A}"
@ -197,13 +195,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "file-management", "file-man
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement.Application", "modules\file-management\LINGYUN.Abp.FileManagement.Application\LINGYUN.Abp.FileManagement.Application.csproj", "{F3D50E3E-34D2-48C1-AB0D-ADCF92DC07D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.FileManagement.Application.Contracts", "modules\file-management\LINGYUN.Abp.FileManagement.Application.Contracts\LINGYUN.Abp.FileManagement.Application.Contracts.csproj", "{86A67B8C-EFA0-4103-B60F-312F07C15A7A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement.Application.Contracts", "modules\file-management\LINGYUN.Abp.FileManagement.Application.Contracts\LINGYUN.Abp.FileManagement.Application.Contracts.csproj", "{86A67B8C-EFA0-4103-B60F-312F07C15A7A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement.HttpApi", "modules\file-management\LINGYUN.Abp.FileManagement.HttpApi\LINGYUN.Abp.FileManagement.HttpApi.csproj", "{854E1A42-FEA4-420E-9E83-0A39EE03F1ED}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.FileManagement.HttpApi", "modules\file-management\LINGYUN.Abp.FileManagement.HttpApi\LINGYUN.Abp.FileManagement.HttpApi.csproj", "{854E1A42-FEA4-420E-9E83-0A39EE03F1ED}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement.Domain.Shared", "modules\file-management\LINGYUN.Abp.FileManagement.Domain.Shared\LINGYUN.Abp.FileManagement.Domain.Shared.csproj", "{21FCEF89-9A3F-476E-833A-A9C2131B2AE6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.FileManagement.Domain.Shared", "modules\file-management\LINGYUN.Abp.FileManagement.Domain.Shared\LINGYUN.Abp.FileManagement.Domain.Shared.csproj", "{21FCEF89-9A3F-476E-833A-A9C2131B2AE6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Abp.FileManagement.Domain", "modules\file-management\LINGYUN.Abp.FileManagement.Domain\LINGYUN.Abp.FileManagement.Domain.csproj", "{14ECCFD6-2DC1-4124-BE26-15E8D28E3E90}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LINGYUN.Abp.FileManagement.Domain", "modules\file-management\LINGYUN.Abp.FileManagement.Domain\LINGYUN.Abp.FileManagement.Domain.csproj", "{14ECCFD6-2DC1-4124-BE26-15E8D28E3E90}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LINGYUN.Platform.HttpApi.Host", "services\platform\LINGYUN.Platform.HttpApi.Host\LINGYUN.Platform.HttpApi.Host.csproj", "{372123C3-3AFD-42C8-BB80-778322EA72C3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -499,10 +499,6 @@ Global
{5FBBBA6A-D6EC-42E1-8164-15C411EC77BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FBBBA6A-D6EC-42E1-8164-15C411EC77BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FBBBA6A-D6EC-42E1-8164-15C411EC77BE}.Release|Any CPU.Build.0 = Release|Any CPU
{8C2D5292-19D7-4355-BC23-5A3B1F4B219B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C2D5292-19D7-4355-BC23-5A3B1F4B219B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C2D5292-19D7-4355-BC23-5A3B1F4B219B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C2D5292-19D7-4355-BC23-5A3B1F4B219B}.Release|Any CPU.Build.0 = Release|Any CPU
{F3D9B137-32DE-4018-8058-78AB17FCDF9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F3D9B137-32DE-4018-8058-78AB17FCDF9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F3D9B137-32DE-4018-8058-78AB17FCDF9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -543,6 +539,10 @@ Global
{14ECCFD6-2DC1-4124-BE26-15E8D28E3E90}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14ECCFD6-2DC1-4124-BE26-15E8D28E3E90}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14ECCFD6-2DC1-4124-BE26-15E8D28E3E90}.Release|Any CPU.Build.0 = Release|Any CPU
{372123C3-3AFD-42C8-BB80-778322EA72C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{372123C3-3AFD-42C8-BB80-778322EA72C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{372123C3-3AFD-42C8-BB80-778322EA72C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{372123C3-3AFD-42C8-BB80-778322EA72C3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -633,7 +633,6 @@ Global
{0655A0FB-59E8-4A9F-BAF5-47A89377F747} = {F4923692-D343-4318-AECA-96F580B1A563}
{5FBBBA6A-D6EC-42E1-8164-15C411EC77BE} = {F4923692-D343-4318-AECA-96F580B1A563}
{F4615BCE-D5C1-407A-8681-8EEE92DEF9D0} = {672E1170-7B18-474B-85C7-1961BF2A48AE}
{8C2D5292-19D7-4355-BC23-5A3B1F4B219B} = {E5D1B78A-1A8F-4D52-BF99-A4A863ADE898}
{F3D9B137-32DE-4018-8058-78AB17FCDF9C} = {370D7CD5-1E17-4F3D-BBFA-03429F6D4F2F}
{52B5D4F7-237B-4E0A-A167-68442164F70A} = {C5CAD011-DF84-4914-939C-0C029DCEF26F}
{F19C8B0F-A332-4190-9ABE-95790E0AE864} = {52B5D4F7-237B-4E0A-A167-68442164F70A}
@ -646,6 +645,7 @@ Global
{854E1A42-FEA4-420E-9E83-0A39EE03F1ED} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
{21FCEF89-9A3F-476E-833A-A9C2131B2AE6} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
{14ECCFD6-2DC1-4124-BE26-15E8D28E3E90} = {B05CB08F-C088-4D6D-97EE-A94A5D1AE4A6}
{372123C3-3AFD-42C8-BB80-778322EA72C3} = {E5D1B78A-1A8F-4D52-BF99-A4A863ADE898}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C95FDF91-16F2-4A8B-A4BE-0E62D1B66718}

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

@ -11,7 +11,7 @@
Target Server Version : 80020
File Encoding : 65001
Date: 10/08/2020 09:45:50
Date: 12/08/2020 17:07:43
*/
SET NAMES utf8mb4;
@ -58,8 +58,8 @@ CREATE TABLE `appapigatewayaggregate` (
-- ----------------------------
-- Records of appapigatewayaggregate
-- ----------------------------
INSERT INTO `appapigatewayaggregate` VALUES (5, '{}', '324ada7e1f824c31ac113a3bf63dd725', 'TEST-APP', 'abp接口代理服务', 1263083077348196352, 'apigateway-definition,platform-definition,', '/api/abp/api-definition', '', 1, 'AbpApiDefinitionAggregator', NULL, '');
INSERT INTO `appapigatewayaggregate` VALUES (6, '{}', 'ac00ab19b3fd4a988cec490ca3a9ec22', 'TEST-APP', 'abp框架配置', 1263102116090970112, 'apigateway-configuration,platform-configuration,', '/api/abp/application-configuration', '', 1, 'AbpApiDefinitionAggregator', NULL, '');
INSERT INTO `appapigatewayaggregate` VALUES (5, '{}', '7ad8b6d6c53a4ed0843ea55478e7dd6e', 'TEST-APP', 'abp接口代理服务', 1263083077348196352, 'platform-api-definition,backend-admin-api-definition,messages-api-definition,apigateway-api-definition,', '/api/abp/api-definition', '', 1, 'AbpApiDefinitionAggregator', NULL, '');
INSERT INTO `appapigatewayaggregate` VALUES (6, '{}', 'a28de19ee118498188cd4b3ed1f79ea4', 'TEST-APP', 'abp框架配置', 1263102116090970112, 'apigateway-configuration,platform-configuration,backend-admin-configuration,messages-configuration,', '/api/abp/application-configuration', '', 1, 'AbpApiDefinitionAggregator', NULL, '');
-- ----------------------------
-- Table structure for appapigatewayaggregateconfig
@ -89,7 +89,7 @@ CREATE TABLE `appapigatewayauthoptions` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayAuthOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayAuthOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 114 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 118 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayauthoptions
@ -182,6 +182,10 @@ INSERT INTO `appapigatewayauthoptions` VALUES (110, 1292621363161137152, '', '')
INSERT INTO `appapigatewayauthoptions` VALUES (111, 1292621494837116928, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (112, 1292621629260365824, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (113, 1292622526073864192, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (114, 1293470838745821184, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (115, 1293471661785706496, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (116, 1293472678392721408, '', '');
INSERT INTO `appapigatewayauthoptions` VALUES (117, 1293472857510473728, '', '');
-- ----------------------------
-- Table structure for appapigatewaybalanceroptions
@ -199,7 +203,7 @@ CREATE TABLE `appapigatewaybalanceroptions` (
UNIQUE INDEX `IX_AppApiGatewayBalancerOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayBalancerOptions_AppApiGatewayGlobalConfiguratio~` FOREIGN KEY (`ItemId`) REFERENCES `appapigatewayglobalconfiguration` (`ItemId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayBalancerOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewaybalanceroptions
@ -293,6 +297,10 @@ INSERT INTO `appapigatewaybalanceroptions` VALUES (113, NULL, 129262136316113715
INSERT INTO `appapigatewaybalanceroptions` VALUES (114, NULL, 1292621494837116928, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (115, NULL, 1292621629260365824, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (116, NULL, 1292622526073864192, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (117, NULL, 1293470838745821184, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (118, NULL, 1293471661785706496, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (119, NULL, 1293472678392721408, '', '', 0);
INSERT INTO `appapigatewaybalanceroptions` VALUES (120, NULL, 1293472857510473728, '', '', 0);
-- ----------------------------
-- Table structure for appapigatewaycacheoptions
@ -306,7 +314,7 @@ CREATE TABLE `appapigatewaycacheoptions` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayCacheOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayCacheOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 114 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 118 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewaycacheoptions
@ -358,7 +366,7 @@ INSERT INTO `appapigatewaycacheoptions` VALUES (47, 1262723402331885568, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (48, 1262935771746734080, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (49, 1262935906522304512, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (50, 1262936009924481024, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (52, 1263074419073593344, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (52, 1263074419073593344, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (53, 1263075249394790400, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (54, 1263075593499684864, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (56, 1263101898440146944, NULL, NULL);
@ -372,7 +380,7 @@ INSERT INTO `appapigatewaycacheoptions` VALUES (63, 1263639172959174656, NULL, N
INSERT INTO `appapigatewaycacheoptions` VALUES (64, 1264799968944640000, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (65, 1264800070161584128, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (66, 1267360794414161920, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (67, 1267383367629807616, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (67, 1267383367629807616, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (68, 1267817055527632896, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (69, 1267817221286526976, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (70, 1268893687085518848, NULL, NULL);
@ -393,12 +401,16 @@ INSERT INTO `appapigatewaycacheoptions` VALUES (104, 1290849978032238592, 0, '')
INSERT INTO `appapigatewaycacheoptions` VALUES (105, 1291259822512693248, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (106, 1292620505149145088, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (107, 1292620665505775616, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (108, 1292620843398791168, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (108, 1292620843398791168, NULL, NULL);
INSERT INTO `appapigatewaycacheoptions` VALUES (109, 1292621027574874112, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (110, 1292621363161137152, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (111, 1292621494837116928, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (112, 1292621629260365824, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (113, 1292622526073864192, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (114, 1293470838745821184, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (115, 1293471661785706496, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (116, 1293472678392721408, 0, '');
INSERT INTO `appapigatewaycacheoptions` VALUES (117, 1293472857510473728, 0, '');
-- ----------------------------
-- Table structure for appapigatewaydiscovery
@ -508,7 +520,7 @@ CREATE TABLE `appapigatewayhttpoptions` (
UNIQUE INDEX `IX_AppApiGatewayHttpOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayHttpOptions_AppApiGatewayGlobalConfiguration_It~` FOREIGN KEY (`ItemId`) REFERENCES `appapigatewayglobalconfiguration` (`ItemId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayHttpOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayhttpoptions
@ -596,12 +608,16 @@ INSERT INTO `appapigatewayhttpoptions` VALUES (107, NULL, 1290849978032238592, 0
INSERT INTO `appapigatewayhttpoptions` VALUES (108, NULL, 1291259822512693248, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (109, NULL, 1292620505149145088, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (110, NULL, 1292620665505775616, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (111, NULL, 1292620843398791168, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (111, NULL, 1292620843398791168, 100, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (112, NULL, 1292621027574874112, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (113, NULL, 1292621363161137152, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (114, NULL, 1292621494837116928, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (115, NULL, 1292621629260365824, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (116, NULL, 1292622526073864192, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (117, NULL, 1293470838745821184, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (118, NULL, 1293471661785706496, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (119, NULL, 1293472678392721408, 0, 0, 0, 0, 0);
INSERT INTO `appapigatewayhttpoptions` VALUES (120, NULL, 1293472857510473728, 0, 0, 0, 0, 0);
-- ----------------------------
-- Table structure for appapigatewayqosoptions
@ -619,7 +635,7 @@ CREATE TABLE `appapigatewayqosoptions` (
UNIQUE INDEX `IX_AppApiGatewayQoSOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayQoSOptions_AppApiGatewayGlobalConfiguration_Ite~` FOREIGN KEY (`ItemId`) REFERENCES `appapigatewayglobalconfiguration` (`ItemId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayQoSOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayqosoptions
@ -707,12 +723,16 @@ INSERT INTO `appapigatewayqosoptions` VALUES (107, NULL, 1290849978032238592, 50
INSERT INTO `appapigatewayqosoptions` VALUES (108, NULL, 1291259822512693248, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (109, NULL, 1292620505149145088, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (110, NULL, 1292620665505775616, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (111, NULL, 1292620843398791168, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (111, NULL, 1292620843398791168, 50, 60000, 1200000);
INSERT INTO `appapigatewayqosoptions` VALUES (112, NULL, 1292621027574874112, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (113, NULL, 1292621363161137152, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (114, NULL, 1292621494837116928, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (115, NULL, 1292621629260365824, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (116, NULL, 1292622526073864192, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (117, NULL, 1293470838745821184, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (118, NULL, 1293471661785706496, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (119, NULL, 1293472678392721408, 50, 60000, 30000);
INSERT INTO `appapigatewayqosoptions` VALUES (120, NULL, 1293472857510473728, 50, 60000, 30000);
-- ----------------------------
-- Table structure for appapigatewayratelimitoptions
@ -754,7 +774,7 @@ CREATE TABLE `appapigatewayratelimitrule` (
UNIQUE INDEX `IX_AppApiGatewayRateLimitRule_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewayRateLimitRule_AppApiGatewayDynamicReRoute_Dynam~` FOREIGN KEY (`DynamicReRouteId`) REFERENCES `appapigatewaydynamicreroute` (`DynamicReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT,
CONSTRAINT `FK_AppApiGatewayRateLimitRule_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 114 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 118 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayratelimitrule
@ -847,6 +867,10 @@ INSERT INTO `appapigatewayratelimitrule` VALUES (110, 1292621363161137152, NULL,
INSERT INTO `appapigatewayratelimitrule` VALUES (111, 1292621494837116928, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (112, 1292621629260365824, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (113, 1292622526073864192, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (114, 1293470838745821184, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (115, 1293471661785706496, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (116, 1293472678392721408, NULL, '', 0, NULL, NULL, NULL);
INSERT INTO `appapigatewayratelimitrule` VALUES (117, 1293472857510473728, NULL, '', 0, NULL, NULL, NULL);
-- ----------------------------
-- Table structure for appapigatewayreroute
@ -886,7 +910,7 @@ CREATE TABLE `appapigatewayreroute` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `AK_AppApiGatewayReRoute_ReRouteId`(`ReRouteId`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewayReRoute_AppId_DownstreamPathTemplate_UpstreamPa~`(`AppId`, `DownstreamPathTemplate`, `UpstreamPathTemplate`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 125 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewayreroute
@ -938,12 +962,12 @@ INSERT INTO `appapigatewayreroute` VALUES (49, '{}', '4114a097b9e04a9e90458edf02
INSERT INTO `appapigatewayreroute` VALUES (50, '{}', '2a9cc98d3ed0462d98c4bf0e946f410d', 1262935771746734080, '身份认证服务-身份资源管理', '/api/IdentityServer/IdentityResources', '', '', '/api/IdentityServer/IdentityResources', 'GET,POST,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 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:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (52, '{}', '387df08693e54e91ac055a2324d4c10e', 1262936009924481024, '身份认证服务-身份资源属性', '/api/IdentityServer/IdentityResources/Properties', '', '', '/api/IdentityServer/IdentityResources/Properties', 'POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (54, '{}', '22950f5be9cd434b8452a9da11cfc034', 1263074419073593344, '服务网关管理-abp代理接口', '/api/abp/api-definition', '', '', '/api/abp/apigateway/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30001,', '', '', 'apigateway-definition', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (54, '{}', '7b847d8434bc4d1db07fa8961d90c14a', 1263074419073593344, '【服务网关管理】- 接口代理', '/api/abp/api-definition', '', '', '/api/abp/apigateway/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30001,', '', '', 'apigateway-api-definition', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (55, '{}', 'ca2cedfa620045a9adef0be2f958c4bc', 1263075249394790400, '服务网关管理-查询聚合路由', '/api/ApiGateway/Aggregates/{RouteId}', '', '', '/api/ApiGateway/Aggregates/{RouteId}', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30001,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (57, '{}', '98fbc99fc8644946ac0a72cc3dc5fd1f', 1263075593499684864, '服务网关管理-聚合路由配置', '/api/ApiGateway/Aggregates/RouteConfig', '', '', '/api/ApiGateway/Aggregates/RouteConfig', 'POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30001,', '', '', '', 0, 30000, 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, '{}', 'd6b379ce336c4a33bc8d8ff2f99fad83', 1263303878648569856, '平台服务-abp代理接口', '/api/abp/api-definition', '', '', '/api/abp/platform/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', 'platform-definition', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (61, '{}', 'bbfd4597517947808e5ea66883fbed18', 1263304204797648896, '平台服务-框架配置', '/api/abp/application-configuration', '', '', '/api/abp/platform/application-configuration', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', 'platform-configuration', 0, 120000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (60, '{}', '8409117162504f71aa66982f05c38a80', 1263303878648569856, '【平台服务】- 接口代理', '/api/abp/api-definition', '', '', '/api/abp/platform/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', 'platform-api-definition', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (61, '{}', '9f520820071b4e14bc94ab57989cea1f', 1263304204797648896, '平台服务-框架配置', '/api/abp/application-configuration', '', '', '/api/abp/platform/application-configuration', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', 'platform-configuration', 0, 120000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (62, '{}', '9810656b884947e3897e776b47208352', 1263304872891555840, '平台服务-租户管理', '/api/multi-tenancy/tenants', '', '', '/api/multi-tenancy/tenants', 'GET,POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (63, '{}', '12254ca25e15420faa694f62148dd694', 1263305106250047488, '平台服务-特定租户管理', '/api/multi-tenancy/tenants/{id}', '', '', '/api/multi-tenancy/tenants/{id}', 'GET,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (64, '{}', '27761205c6344bfebbafbc077781ab76', 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');
@ -951,10 +975,10 @@ INSERT INTO `appapigatewayreroute` VALUES (65, '{}', 'af470c53a25340fd9248fd0309
INSERT INTO `appapigatewayreroute` VALUES (66, '{}', '50b18f8d4ddb4540b142877a7852f20d', 1263639172959174656, '【平台服务】- 公共配置', '/api/settings/by-global', '', '', '/api/settings/by-global', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (67, '{}', '858056ce80b8420084b60d62ef4aa25c', 1264799968944640000, '平台服务-验证手机号', '/api/account/phone/verify', '', '', '/api/account/phone/verify', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (68, '{}', 'd460979de403436e840de179767ed770', 1264800070161584128, '平台服务-手机号注册', '/api/account/phone/register', '', '', '/api/account/phone/register', 'POST,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (69, '{}', 'd2329516ff954ab68f29c69da8db725a', 1267360794414161920, '即时通讯-通知', '/signalr-hubs/notifications/{everything}', '', '', '/signalr-hubs/notifications/{everything}', 'POST,GET,OPTIONS,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (70, '{}', 'e83c654c4e4e4ef5bac6ced23305f843', 1267383367629807616, '即时通讯-通知0', '/signalr-hubs/notifications', '', '', '/signalr-hubs/notifications', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (71, '{}', '01b7a7e9975a41809fd636df95a57cde', 1267817055527632896, '即时通讯-聊天', '/signalr-hubs/message', '', '', '/signalr-hubs/message', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (72, '{}', 'dbc40249beb74d01906e435f132a79d7', 1267817221286526976, '即时通讯-聊天1', '/signalr-hubs/message/{everything}', '', '', '/signalr-hubs/message/{everything}', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (69, '{}', '723c9b111f9f4a1aa804118cdde193d3', 1267360794414161920, '【消息服务】- 通知', '/signalr-hubs/notifications/{everything}', '', '', '/signalr-hubs/notifications/{everything}', 'POST,GET,OPTIONS,PUT,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (70, '{}', 'f3aa2b42dd9f468aa5aae4ef64754427', 1267383367629807616, '【消息服务】- 通知0', '/signalr-hubs/notifications', '', '', '/signalr-hubs/notifications', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (71, '{}', '99dc8259c50044008c8aede7442ddde3', 1267817055527632896, '【消息服务】- 聊天', '/signalr-hubs/message', '', '', '/signalr-hubs/message', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (72, '{}', '4ec40b72d469474ba10ae02e8d3298bb', 1267817221286526976, '【消息服务】- 聊天1', '/signalr-hubs/message/{everything}', '', '', '/signalr-hubs/message/{everything}', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:30020,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (73, '{}', 'cfb5f09a12bf495fbcaf2fa5d9123a40', 1268893687085518848, '身份认证服务-重置密码', '/api/account/phone/reset-password', '', '', '/api/account/phone/reset-password', 'PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 1, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (97, '{}', 'f9e4d8f541b34ea7a22fa159b8cbcf6a', 1285579388652576768, '【SingalR】- 本地打印服务', '/document/print-single/{everything}', '', '', '/signalr-hubs/document/print-single/{everything}', 'GET,POST,PUT,DELETE,OPTIONS,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:36390,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (99, '{}', '4105470ee52345448e75b64983cd50cd', 1285580096881778688, '【SingalR】- 本地打印多个文档', '/document/print-multiple/{everything}', '', '', '/signalr-hubs/document/print-multiple/{everything}', 'GET,PUT,DELETE,OPTIONS,POST,', '', '', '', '', '', '', '', 1, '', '', 'ws', '127.0.0.1:36390,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
@ -973,12 +997,16 @@ INSERT INTO `appapigatewayreroute` VALUES (111, '{}', '8dfa430d752a4b4a869ad401b
INSERT INTO `appapigatewayreroute` VALUES (112, '{}', '9844fed6507844f2ac64bd08649bd3a6', 1291259822512693248, '【身份认证服务】- 查询组织机构根节点', '/api/identity/organization-units/root-node', '', '', '/api/identity/organization-units/root-node', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (113, '{}', '24d8794cf8f943b4ac45d2bcccf7c128', 1292620505149145088, '【平台服务】- 文件系统', '/api/file-management/file-system', '', '', '/api/file-management/file-system', 'GET,PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (114, '{}', '0acf6762d3af43efb655107e0039f5fc', 1292620665505775616, '【平台服务】- 文件系统 - 目录管理', '/api/file-management/file-system/folders', '', '', '/api/file-management/file-system/folders', 'POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (115, '{}', '5442138c816542bbb8b2c7fa51f10a5f', 1292620843398791168, '【平台服务】- 文件系统 - 文件管理', '/api/file-management/file-system/files', '', '', '/api/file-management/file-system/files', 'GET,POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (115, '{}', '8b4363f70865419089b5f62ba35382df', 1292620843398791168, '【平台服务】- 文件系统 - 文件管理', '/api/file-management/file-system/files', '', '', '/api/file-management/file-system/files', 'GET,POST,DELETE,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 1200000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (116, '{}', '7eb315567bbc470bbbfd26923c5d0aba', 1292621027574874112, '【平台服务】- 文件系统 - 复制目录', '/api/file-management/file-system/folders/copy', '', '', '/api/file-management/file-system/folders/copy', 'PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (117, '{}', 'af5853680cff454fa66ff6022f18da23', 1292621363161137152, '【平台服务】- 文件系统 - 移动目录', '/api/file-management/file-system/folders/move', '', '', '/api/file-management/file-system/folders/move', 'PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (118, '{}', '6daa6d8c8adb466899988fd8181c29a8', 1292621494837116928, '【平台服务】- 文件系统 - 复制文件', '/api/file-management/file-system/files/copy', '', '', '/api/file-management/file-system/files/copy', 'PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (119, '{}', '9560caaa3bd9424984c44724aa54bfe9', 1292621629260365824, '【平台服务】- 文件系统 - 移动文件', '/api/file-management/file-system/files/move', '', '', '/api/file-management/file-system/files/move', 'PUT,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (120, '{}', 'fc2aaa6035484201b9014912930fb7cb', 1292622526073864192, '【平台服务】- 文件系统 - 详情页', '/api/file-management/file-system/profile', '', '', '/api/file-management/file-system/profile', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30025,', '', '', '', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (121, '{}', 'c6c7b027000942dda8ba0d2e2d8cf705', 1293470838745821184, '【后台管理】- 框架配置', '/api/abp/application-configuration', '', '', '/api/abp/backend-admin/application-configuration', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', 'backend-admin-configuration', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (122, '{}', 'becd4342079d4399abda5b5ba3b46fdc', 1293471661785706496, '【消息服务】- 框架配置', '/api/abp/application-configuration', '', '', '/api/abp/messages/application-configuration', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30020,', '', '', 'messages-configuration', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (123, '{}', 'c828140cee3043c18ffc274f6461f0f2', 1293472678392721408, '【后台管理】- 接口代理', '/api/abp/api-definition', '', '', '/api/abp/backend-admin/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30010,', '', '', 'backend-admin-api-definition', 0, 30000, 1, '', 'TEST-APP');
INSERT INTO `appapigatewayreroute` VALUES (124, '{}', 'e683cff8066d4c2899a17d0f618f1a0b', 1293472857510473728, '【消息服务】- 接口代理', '/api/abp/api-definition', '', '', '/api/abp/messages/api-definition', 'GET,', '', '', '', '', '', '', '', 1, '', '', 'HTTP', '127.0.0.1:30020,', '', '', 'messages-api-definition', 0, 30000, 1, '', 'TEST-APP');
-- ----------------------------
-- Table structure for appapigatewayroutegroup
@ -1022,7 +1050,7 @@ CREATE TABLE `appapigatewaysecurityoptions` (
PRIMARY KEY (`Id`) USING BTREE,
UNIQUE INDEX `IX_AppApiGatewaySecurityOptions_ReRouteId`(`ReRouteId`) USING BTREE,
CONSTRAINT `FK_AppApiGatewaySecurityOptions_AppApiGatewayReRoute_ReRouteId` FOREIGN KEY (`ReRouteId`) REFERENCES `appapigatewayreroute` (`ReRouteId`) ON DELETE CASCADE ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 114 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
) ENGINE = InnoDB AUTO_INCREMENT = 118 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of appapigatewaysecurityoptions
@ -1115,6 +1143,10 @@ INSERT INTO `appapigatewaysecurityoptions` VALUES (110, 1292621363161137152, '',
INSERT INTO `appapigatewaysecurityoptions` VALUES (111, 1292621494837116928, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (112, 1292621629260365824, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (113, 1292622526073864192, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (114, 1293470838745821184, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (115, 1293471661785706496, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (116, 1293472678392721408, '', '');
INSERT INTO `appapigatewaysecurityoptions` VALUES (117, 1293472857510473728, '', '');
-- ----------------------------
-- Table structure for cap.published
@ -1133,6 +1165,25 @@ CREATE TABLE `cap.published` (
INDEX `IX_ExpiresAt`(`ExpiresAt`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of cap.published
-- ----------------------------
INSERT INTO `cap.published` VALUES (1293448401761169408, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293448401761169408\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 15:25:04 +08:00\",\"cap-corr-id\":\"1293448401761169408\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T15:25:04.7428488+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 15:25:05', '2020-08-13 15:25:05', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293470839240749056, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293470839240749056\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:54:14 +08:00\",\"cap-corr-id\":\"1293470839240749056\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:54:14.2581381+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:54:14', '2020-08-13 16:54:14', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471034632400896, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471034632400896\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:55:00 +08:00\",\"cap-corr-id\":\"1293471034632400896\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:55:00.8429371+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:55:01', '2020-08-13 16:55:01', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471410236518400, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471410236518400\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:56:30 +08:00\",\"cap-corr-id\":\"1293471410236518400\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:56:30.3946481+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:56:30', '2020-08-13 16:56:30', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471467044171776, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471467044171776\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:56:43 +08:00\",\"cap-corr-id\":\"1293471467044171776\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:56:43.9385819+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:56:44', '2020-08-13 16:56:44', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471498056855552, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471498056855552\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:56:51 +08:00\",\"cap-corr-id\":\"1293471498056855552\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:56:51.3322365+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:56:51', '2020-08-13 16:56:51', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471525202391040, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471525202391040\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:56:57 +08:00\",\"cap-corr-id\":\"1293471525202391040\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:56:57.8043755+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:56:58', '2020-08-13 16:56:58', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471661861203968, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471661861203968\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:57:30 +08:00\",\"cap-corr-id\":\"1293471661861203968\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:57:30.3865689+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 16:57:30', '2020-08-13 16:57:30', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293471788579516416, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293471788579516416\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 16:58:00 +08:00\",\"cap-corr-id\":\"1293471788579516416\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T16:58:00.5982295+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Update\",\"Object\":\"AggregateRoute\"}}', 0, '2020-08-12 16:58:01', '2020-08-13 16:58:01', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293472678459830272, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293472678459830272\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 17:01:32 +08:00\",\"cap-corr-id\":\"1293472678459830272\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T17:01:32.7620314+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 17:01:33', '2020-08-13 17:01:33', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293472857581776896, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293472857581776896\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 17:02:15 +08:00\",\"cap-corr-id\":\"1293472857581776896\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T17:02:15.4669191+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Create\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 17:02:15', '2020-08-13 17:02:15', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293472998195818496, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293472998195818496\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 17:02:48 +08:00\",\"cap-corr-id\":\"1293472998195818496\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T17:02:48.9930402+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 17:02:49', '2020-08-13 17:02:49', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293473212981932032, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293473212981932032\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 17:03:40 +08:00\",\"cap-corr-id\":\"1293473212981932032\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T17:03:40.2013274+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Update\",\"Object\":\"AggregateRoute\"}}', 0, '2020-08-12 17:03:40', '2020-08-13 17:03:40', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293473334767742976, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293473334767742976\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 17:04:09 +08:00\",\"cap-corr-id\":\"1293473334767742976\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T17:04:09.2373626+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Modify\",\"Object\":\"ReRoute\"}}', 0, '2020-08-12 17:04:09', '2020-08-13 17:04:09', 'Succeeded');
INSERT INTO `cap.published` VALUES (1293473381651673088, 'v1', 'LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData', '{\"Headers\":{\"cap-callback-name\":null,\"cap-msg-id\":\"1293473381651673088\",\"cap-msg-name\":\"LINGYUN.ApiGateway.EventBus.ApigatewayConfigChangeEventData\",\"cap-msg-type\":\"Object\",\"cap-senttime\":\"2020/8/12 17:04:20 +08:00\",\"cap-corr-id\":\"1293473381651673088\",\"cap-corr-seq\":\"0\"},\"Value\":{\"DateTime\":\"2020-08-12T17:04:20.41444+08:00\",\"AppId\":\"TEST-APP\",\"Method\":\"Update\",\"Object\":\"AggregateRoute\"}}', 0, '2020-08-12 17:04:20', '2020-08-13 17:04:20', 'Succeeded');
-- ----------------------------
-- Table structure for cap.received
-- ----------------------------

16
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application.Contracts/LINGYUN/Abp/FileManagement/FileCreateDto.cs

@ -1,5 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.IO;
using Volo.Abp.Auditing;
using Volo.Abp.Validation;
namespace LINGYUN.Abp.FileManagement
{
@ -8,8 +10,9 @@ namespace LINGYUN.Abp.FileManagement
/// <summary>
/// 文件名
/// </summary>
[Required]
[StringLength(255)]
public string Name { get; set; }
public string FileName { get; set; }
/// <summary>
/// 文件路径
/// </summary>
@ -19,18 +22,9 @@ namespace LINGYUN.Abp.FileManagement
/// 文件数据,前端无需传递此参数,由控制器传递
/// </summary>
[DisableAuditing]
[DisableValidation]// TODO: 需要禁用参数检查,否则会有一个框架方面的性能问题存在
public byte[] Data { get; set; }
/// <summary>
/// 当前字节数
/// </summary>
[Required]
public int CurrentByte { get; set; }
/// <summary>
/// 最大字节数
/// </summary>
[Required]
public int TotalByte { get; set; }
/// <summary>
/// 是否覆盖文件
/// </summary>
public bool Rewrite { get; set; } = false;

68
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Application/LINGYUN/Abp/FileManagement/FileSystemAppService.cs

@ -1,4 +1,6 @@
using System;
using LINGYUN.Abp.FileManagement.Permissions;
using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.IO;
@ -11,6 +13,7 @@ using Volo.Abp.BlobStoring.FileSystem;
namespace LINGYUN.Abp.FileManagement
{
[Authorize(AbpFileManagementPermissions.FileSystem.Default)]
public class FileSystemAppService : FileManagementApplicationServiceBase, IFileSystemAppService
{
protected IBlobContainer<FileSystemContainer> BlobContainer { get; }
@ -23,19 +26,20 @@ namespace LINGYUN.Abp.FileManagement
BlobContainerConfigurationProvider = blobContainerConfigurationProvider;
}
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Copy)]
public virtual Task CopyFileAsync(FileCopyOrMoveDto input)
{
string fileSystemPath = GetFileSystemPath(input.Path);
var fileFullName = Path.Combine(fileSystemPath, input.Name);
if (!File.Exists(fileFullName))
{
throw new UserFriendlyException("指定的文件不存在!");
throw new UserFriendlyException(L["FilePathNotFound"]);
}
var copyToFilePath = GetFileSystemPath(input.ToPath);
var copyToFileFullName = Path.Combine(copyToFilePath, input.ToName ?? input.Name);
if (File.Exists(copyToFileFullName))
{
throw new UserFriendlyException("指定的路径中已经有相同的文件名存在!");
throw new UserFriendlyException(L["FilePathAlreadyExists"]);
}
File.Copy(fileFullName, copyToFileFullName);
@ -43,6 +47,7 @@ namespace LINGYUN.Abp.FileManagement
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.Copy)]
public virtual Task CopyFolderAsync([Required, StringLength(255)] string path, FolderCopyDto input)
{
string fileSystemPath = GetFileSystemPath(path);
@ -61,17 +66,23 @@ namespace LINGYUN.Abp.FileManagement
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Create)]
public virtual async Task CreateFileAsync(FileCreateDto input)
{
string fileSystemPath = GetFileSystemPath(input.Path);
var fileFullName = Path.Combine(fileSystemPath, input.Name);
if (File.Exists(fileFullName) && !input.Rewrite)
fileSystemPath = Path.Combine(fileSystemPath, input.FileName);
var blobName = GetFileSystemRelativePath(fileSystemPath);
// 去除第一个路径标识符
blobName = blobName.RemovePreFix("/", "\\");
if (!input.Rewrite && await BlobContainer.ExistsAsync(blobName))
{
throw new UserFriendlyException("指定的文件已经存在!");
throw new UserFriendlyException(L["FilePathAlreadyExists"]);
}
await BlobContainer.SaveAsync(input.Name, input.Data, input.Rewrite);
await BlobContainer.SaveAsync(blobName, input.Data, input.Rewrite);
Array.Clear(input.Data, 0, input.Data.Length);
}
[Authorize(AbpFileManagementPermissions.FileSystem.Create)]
public virtual Task CreateFolderAsync(FolderCreateDto input)
{
string fileSystemPath = GetFileSystemBashPath();
@ -82,13 +93,14 @@ namespace LINGYUN.Abp.FileManagement
var newFloderPath = Path.Combine(fileSystemPath, input.Path);
if (Directory.Exists(newFloderPath))
{
throw new UserFriendlyException("指定目录已经存在!");
throw new UserFriendlyException(L["PathAlreadyExists"]);
}
Directory.CreateDirectory(newFloderPath);
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Delete)]
public virtual Task DeleteFileAsync(FileDeleteDto input)
{
var fileSystemPath = GetFileSystemPath(input.Path);
@ -100,27 +112,29 @@ namespace LINGYUN.Abp.FileManagement
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.Delete)]
public virtual Task DeleteFolderAsync([Required, StringLength(255)] string path)
{
string fileSystemPath = GetFileSystemPath(path);
if (!Directory.Exists(fileSystemPath))
{
throw new UserFriendlyException("指定目录不存在!");
throw new UserFriendlyException(L["FilePathNotFound"]);
}
var fileSystemChildrenPath = Directory.GetDirectories(fileSystemPath);
if (fileSystemChildrenPath.Length > 0)
{
throw new UserFriendlyException("指定的目录不为空,不可删除此目录!");
throw new UserFriendlyException(L["PathCannotBeDeletedWithNotEmpty"]);
}
var fileSystemPathFiles = Directory.GetFiles(fileSystemPath);
if (fileSystemPathFiles.Length > 0)
{
throw new UserFriendlyException("指定的目录不为空,不可删除此目录!");
throw new UserFriendlyException(L["PathCannotBeDeletedWithNotEmpty"]);
}
Directory.Delete(fileSystemPath);
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Download)]
public virtual async Task<Stream> DownloadFileAsync(FileSystemGetDto input)
{
var fileSystemPath = GetFileSystemPath(input.Path);
@ -169,7 +183,7 @@ namespace LINGYUN.Abp.FileManagement
}
return Task.FromResult(fileSystem);
}
throw new UserFriendlyException("文件或目录不存在!");
throw new UserFriendlyException(L["FilePathNotFound"]);
}
public virtual Task<PagedResultDto<FileSystemDto>> GetListAsync(GetFileSystemListDto input)
@ -245,19 +259,20 @@ namespace LINGYUN.Abp.FileManagement
));
}
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Move)]
public virtual Task MoveFileAsync(FileCopyOrMoveDto input)
{
string fileSystemPath = GetFileSystemPath(input.Path);
fileSystemPath = Path.Combine(fileSystemPath, input.Name);
if (!File.Exists(fileSystemPath))
{
throw new UserFriendlyException("指定目录不存在!");
throw new UserFriendlyException(L["FilePathNotFound"]);
}
var moveToFilePath = GetFileSystemPath(input.ToPath);
moveToFilePath = Path.Combine(moveToFilePath, input.ToName ?? input.Name);
if (Directory.Exists(moveToFilePath))
if (File.Exists(moveToFilePath))
{
throw new UserFriendlyException("指定的路径中已经有同名的文件存在!");
throw new UserFriendlyException(L["FilePathAlreadyExists"]);
}
File.Move(fileSystemPath, moveToFilePath);
@ -265,17 +280,18 @@ namespace LINGYUN.Abp.FileManagement
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.Move)]
public virtual Task MoveFolderAsync([Required, StringLength(255)] string path, FolderMoveDto input)
{
string fileSystemPath = GetFileSystemPath(path);
if (!Directory.Exists(fileSystemPath))
{
throw new UserFriendlyException("指定目录不存在!");
throw new UserFriendlyException(L["FilePathNotFound"]);
}
var moveToFilePath = GetFileSystemPath(input.MoveToPath);
if (Directory.Exists(moveToFilePath))
{
throw new UserFriendlyException("指定的路径中已经有同名的目录存在!");
throw new UserFriendlyException(L["FilePathAlreadyExists"]);
}
Directory.Move(fileSystemPath, moveToFilePath);
@ -283,6 +299,7 @@ namespace LINGYUN.Abp.FileManagement
return Task.CompletedTask;
}
[Authorize(AbpFileManagementPermissions.FileSystem.Update)]
public virtual Task<FileSystemDto> UpdateAsync([Required, StringLength(255)] string name, FileSystemUpdateDto input)
{
string fileSystemPath = GetFileSystemPath(name);
@ -291,7 +308,7 @@ namespace LINGYUN.Abp.FileManagement
{
if (File.Exists(renameFilePath))
{
throw new UserFriendlyException("指定的文件名已经存在!");
throw new UserFriendlyException(L["FilePathAlreadyExists"]);
}
File.Move(fileSystemPath, renameFilePath);
@ -315,7 +332,7 @@ namespace LINGYUN.Abp.FileManagement
{
if (Directory.Exists(renameFilePath))
{
throw new UserFriendlyException("指定的路径中已经有同名的目录存在!");
throw new UserFriendlyException(L["FilePathAlreadyExists"]);
}
Directory.Move(fileSystemPath, renameFilePath);
@ -334,7 +351,7 @@ namespace LINGYUN.Abp.FileManagement
}
return Task.FromResult(fileSystem);
}
throw new UserFriendlyException("文件或目录不存在!");
throw new UserFriendlyException(L["FilePathNotFound"]);
}
/// <summary>
/// 获取文件系统相对路径
@ -364,7 +381,11 @@ namespace LINGYUN.Abp.FileManagement
path = path.Replace(blobPath, "");
return path;
}
/// <summary>
/// 获取合并的文件路径
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
protected virtual string GetFileSystemPath(string path)
{
var fileSystemConfiguration = GetFileSystemBlobProviderConfiguration();
@ -379,7 +400,10 @@ namespace LINGYUN.Abp.FileManagement
return blobPath;
}
/// <summary>
/// 获取文件系统存储路径
/// </summary>
/// <returns></returns>
protected virtual string GetFileSystemBashPath()
{
var fileSystemConfiguration = GetFileSystemBlobProviderConfiguration();

6
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain.Shared/LINGYUN/Abp/FileManagement/Localization/Resources/en.json

@ -15,6 +15,12 @@
"Permission:CopyFile": "Copy file",
"Permission:MoveFile": "Move file",
"Permission:DownloadFile": "Download file",
"FileNotFound": "The specified file does not exist!",
"PathNotFound": "The specified directory does not exist!",
"FilePathNotFound": "The file or directory does not exist!",
"PathAlreadyExists": "The specified directory already exists!",
"PathCannotBeDeletedWithNotEmpty": "The specified directory is not empty and cannot be deleted!",
"FilePathAlreadyExists": "The same file or directory already exists in the specified path!",
"UploadFileSizeBeyondLimit": "Upload file size cannot exceed {0} MB!",
"NotAllowedFileExtensionName": "Not allowed file extension: {0}!",
"DisplayName:FileLimitLength": "File limit size",

6
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain.Shared/LINGYUN/Abp/FileManagement/Localization/Resources/zh-Hans.json

@ -15,6 +15,12 @@
"Permission:CopyFile": "复制文件",
"Permission:MoveFile": "移动文件",
"Permission:DownloadFile": "下载文件",
"FileNotFound": "指定的文件不存在!",
"PathNotFound": "指定的目录不存在!",
"FilePathNotFound": "文件或目录不存在!",
"PathAlreadyExists": "指定的目录已经存在!",
"PathCannotBeDeletedWithNotEmpty": "指定的目录不为空,不可删除此目录!",
"FilePathAlreadyExists": "指定的路径中已经有相同的文件或目录存在!",
"UploadFileSizeBeyondLimit": "上传文件大小不能超过 {0} MB!",
"NotAllowedFileExtensionName": "不被允许的文件扩展名: {0}!",
"DisplayName:FileLimitLength": "文件限制大小",

0
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain/LINGYUN/Abp/FileManagement/Settings/AbpFileManagementSettingDefinitionProvider.cs → aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.Domain.Shared/LINGYUN/Abp/FileManagement/Settings/AbpFileManagementSettingDefinitionProvider.cs

36
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.HttpApi/LINGYUN/Abp/FileManagement/FileSystemController.cs

@ -1,4 +1,7 @@
using LINGYUN.Abp.FileManagement.Settings;
using LINGYUN.Abp.FileManagement.Localization;
using LINGYUN.Abp.FileManagement.Permissions;
using LINGYUN.Abp.FileManagement.Settings;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.StaticFiles;
@ -30,6 +33,7 @@ namespace LINGYUN.Abp.FileManagement
{
SettingProvider = settingProvider;
FileSystemAppService = fileSystemAppService;
LocalizationResource = typeof(AbpFileManagementResource);
}
[HttpPut]
@ -48,21 +52,22 @@ namespace LINGYUN.Abp.FileManagement
[HttpPost]
[Route("files")]
public virtual async Task CreateFileAsync([FromQuery] FileCreateDto input, IFormFile file)
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Create)]
public virtual async Task CreateFileAsync([FromForm] FileUploadDto input)
{
// 检查文件大小
var fileSizeLimited = await SettingProvider
.GetAsync(
AbpFileManagementSettingNames.FileLimitLength,
AbpFileManagementSettingNames.DefaultFileLimitLength);
if (fileSizeLimited * 1024 * 1024 < input.TotalByte)
if (fileSizeLimited * 1024 * 1024 < input.TotalSize)
{
throw new UserFriendlyException(L["UploadFileSizeBeyondLimit", fileSizeLimited]);
}
// 采用分块模式上传文件
// 保存分块到临时目录
var fileName = input.Name;
var fileName = input.FileName;
// 文件扩展名
var fileExtensionName = FileHelper.GetExtension(fileName);
var fileAllowExtension = await SettingProvider
@ -82,10 +87,10 @@ namespace LINGYUN.Abp.FileManagement
Path.GetTempPath(),
"lingyun-abp-file-management",
"upload",
string.Concat(input.Path ?? "", input.Name).ToMd5());
string.Concat(input.Path ?? "", input.FileName).ToMd5());
DirectoryHelper.CreateIfNotExists(tempFilePath);
// 以上传的分片索引创建临时文件
var tempSavedFile = Path.Combine(tempFilePath, $"{input.CurrentByte}.{fileExtensionName}");
var tempSavedFile = Path.Combine(tempFilePath, $"{input.ChunkNumber}.{fileExtensionName}");
try
{
if (HttpContext.RequestAborted.IsCancellationRequested)
@ -94,35 +99,35 @@ namespace LINGYUN.Abp.FileManagement
Directory.Delete(tempFilePath, true);
return;
}
if (input.File != null)
{
// 保存临时文件
using (var fs = new FileStream(tempSavedFile, FileMode.Create, FileAccess.Write))
{
// 写入当前分片文件
await file.CopyToAsync(fs);
await input.File.CopyToAsync(fs);
}
}
if (input.CurrentByte == input.TotalByte)
if (input.ChunkNumber == input.TotalChunks)
{
// 合并文件
var mergeSavedFile = Path.Combine(tempFilePath, $"{fileName}");
// 获取并排序所有分片文件
var mergeFiles = Directory.GetFiles(tempFilePath).OrderBy(f => f.Length).ThenBy(f => f);
// 创建临时合并文件
using (var mergeSavedFileStream = new FileStream(mergeSavedFile, FileMode.Create))
{
input.Data = new byte[0];
foreach (var mergeFile in mergeFiles)
{
// 读取当前文件字节
var mergeFileBytes = await FileHelper.ReadAllBytesAsync(mergeFile);
// 写入到合并文件流
await mergeSavedFileStream.WriteAsync(mergeFileBytes, 0, mergeFileBytes.Length);
input.Data = input.Data.Concat(mergeFileBytes).ToArray();
Array.Clear(mergeFileBytes,0, mergeFileBytes.Length);
// 删除已参与合并的临时文件分片
FileHelper.DeleteIfExists(mergeFile);
}
// 读取文件数据
var fileData = await mergeSavedFileStream.GetAllBytesAsync();
input.Data = fileData;
}
await FileSystemAppService.CreateFileAsync(input);
// 文件保存之后删除临时文件目录
Directory.Delete(tempFilePath, true);
@ -159,6 +164,7 @@ namespace LINGYUN.Abp.FileManagement
[HttpGet]
[Route("files")]
[Authorize(AbpFileManagementPermissions.FileSystem.FileManager.Download)]
public virtual async Task<IActionResult> DownloadFileAsync(FileSystemDownloadDto input)
{
var tempFileName = string.Concat(input.Path ?? "", input.Name);

35
aspnet-core/modules/file-management/LINGYUN.Abp.FileManagement.HttpApi/LINGYUN/Abp/FileManagement/FileUploadDto.cs

@ -0,0 +1,35 @@
using Microsoft.AspNetCore.Http;
using System.ComponentModel.DataAnnotations;
namespace LINGYUN.Abp.FileManagement
{
public class FileUploadDto : FileCreateDto
{
/// <summary>
/// 常规块大小
/// </summary>
[Required]
public int ChunkSize { get; set; }
/// <summary>
/// 当前块大小
/// </summary>
[Required]
public int CurrentChunkSize { get; set; }
/// <summary>
/// 当前上传中块的索引
/// </summary>
[Required]
public int ChunkNumber { get; set; }
/// <summary>
/// 块总数
/// </summary>
[Required]
public int TotalChunks { get; set; }
/// <summary>
/// 总文件大小
/// </summary>
[Required]
public int TotalSize { get; set; }
public IFormFile File { get; set; }
}
}

3
aspnet-core/services/account/AuthServer.Host/DataSeeder/IdentityServerDataSeedContributor.cs

@ -139,7 +139,8 @@ namespace AuthServer.DataSeeder
"profile",
"role",
"phone",
"address"
"address",
"offline_access" // 加上刷新
};
var configurationSection = _configuration.GetSection("IdentityServer:Clients");

7
aspnet-core/services/platform/LINGYUN.Platform.HttpApi.Host/LINGYUN.Platform.HttpApi.Host.csproj

@ -5,6 +5,13 @@
<RootNamespace>LINGYUN.Platform</RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Remove="%2a%2a\**" />
<Content Remove="%2a%2a\**" />
<EmbeddedResource Remove="%2a%2a\**" />
<None Remove="%2a%2a\**" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Migrations\20200723131720_Add-Platform-Module.cs" />
<Compile Remove="Migrations\20200723131720_Add-Platform-Module.Designer.cs" />

1
vueJs/.env.development

@ -12,6 +12,7 @@ VUE_APP_BASE_IDENTITY_SERVER = '/connect'
VUE_APP_TENANT_NAME = ''
VUE_APP_CLIENT_ID = 'vue-admin-element'
VUE_APP_CLIENT_SCOPE = 'openid address email phone role profile offline_access auth-service apigateway-service'
VUE_APP_CLIENT_SECRET = '1q2w3e*'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,

13
vueJs/package-lock.json

@ -19237,6 +19237,11 @@
}
}
},
"simple-uploader.js": {
"version": "0.5.4",
"resolved": "https://registry.npm.taobao.org/simple-uploader.js/download/simple-uploader.js-0.5.4.tgz",
"integrity": "sha1-+FjtH+/t3FjUanJNWmx3BAsLKbs="
},
"sisteransi": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/sisteransi/download/sisteransi-1.0.5.tgz?cache=0&sync_timestamp=1584536263469&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsisteransi%2Fdownload%2Fsisteransi-1.0.5.tgz",
@ -21403,6 +21408,14 @@
"resolved": "https://registry.npm.taobao.org/vue-router/download/vue-router-3.1.6.tgz",
"integrity": "sha1-RfWjo4Q+MXAsBh3YKTk1VOQyj4k="
},
"vue-simple-uploader": {
"version": "0.7.4",
"resolved": "https://registry.npm.taobao.org/vue-simple-uploader/download/vue-simple-uploader-0.7.4.tgz",
"integrity": "sha1-jPYDP9rgWzn4mBRsyWEhOjhgYlk=",
"requires": {
"simple-uploader.js": "^0.5.4"
}
},
"vue-splitpane": {
"version": "1.0.6",
"resolved": "https://registry.npm.taobao.org/vue-splitpane/download/vue-splitpane-1.0.6.tgz",

1
vueJs/package.json

@ -51,6 +51,7 @@
"vue-image-crop-upload": "^2.5.0",
"vue-property-decorator": "^8.4.1",
"vue-router": "^3.1.6",
"vue-simple-uploader": "^0.7.4",
"vue-splitpane": "^1.0.6",
"vue-svgicon": "^3.2.6",
"vue2-dropzone": "^3.6.0",

20
vueJs/src/api/filemanagement.ts

@ -1,9 +1,10 @@
import qs from 'qs'
import ApiService from './serviceBase'
import { PagedAndSortedResultRequestDto, PagedResultDto } from './types'
const serviceUrl = process.env.VUE_APP_BASE_API
const baseUrl = '/api/file-management/file-system'
export const FileManagementUrl = serviceUrl + baseUrl
export const FileUploadUrl = serviceUrl + baseUrl + '/files'
export default class FileManagementService {
public static getFileSystem(name: string, path: string | undefined) {
@ -74,6 +75,23 @@ export default class FileManagementService {
return ApiService.Put<void>(_url, payload, serviceUrl)
}
public static mergeFile(name: string, path: string | undefined) {
const _url = baseUrl + '/files'
const _data = {
path: path,
fileName: name,
mergeFile: true
}
return ApiService.HttpRequest<void>({
url: _url,
data: qs.stringify(_data),
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
public static downlodFle(name: string, path: string | undefined, currentByte: number | undefined) {
let _url = baseUrl + '/files?name=' + name
if (path) {

10
vueJs/src/lang/zh.ts

@ -622,6 +622,7 @@ export default {
noMessages: '没有消息'
},
fileSystem: {
setting: '文件系统',
name: '名称',
creationTime: '创建时间',
lastModificationTime: '修改时间',
@ -634,6 +635,13 @@ export default {
download: '下载文件',
upload: '上传文件',
deleteFolder: '删除目录',
deleteFile: '删除文件'
deleteFile: '删除文件',
addFile: '添加文件',
addFolder: '添加目录',
uploadError: '上传失败',
uploading: '正在上传',
waitingUpload: '等待上传',
paused: '已暂停',
uploadSuccess: '上传成功'
}
}

4
vueJs/src/main.ts

@ -5,6 +5,8 @@ import ElementUI from 'element-ui'
import ViewUI from 'view-design'
import SvgIcon from 'vue-svgicon'
import uploader from 'vue-simple-uploader'
import '@/styles/element-variables.scss'
import 'view-design/dist/styles/iview.css'
import '@/styles/index.scss'
@ -37,6 +39,8 @@ Vue.use(SvgIcon, {
defaultHeight: '1em'
})
Vue.use(uploader)
// Register global directives
Object.keys(directives).forEach(key => {
Vue.directive(key, (directives as { [key: string ]: DirectiveOptions })[key])

3
vueJs/src/shims.d.ts

@ -25,3 +25,6 @@ declare module 'vue-image-crop-upload'
// TODO: remove this part after vue-splitpane has its typescript file
declare module 'vue-splitpane'
// TODO vue-simple-uploader
declare module 'vue-simple-uploader'

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

@ -18,6 +18,7 @@ export interface IUserState {
email: string
}
const scopeKey = 'vue_typescript_admin_scope'
const tokenKey = 'vue_typescript_admin_token'
const refreshTokenKey = 'vue_typescript_admin_refresh_token'
@ -139,7 +140,7 @@ class User extends VuexModule implements IUserState {
return new Promise((resolve, reject) => {
const refreshToken = getItem(refreshTokenKey)
const token = getItem(tokenKey)
if (token && refreshToken) {
if (refreshToken) {
UserApiService.refreshToken(token, refreshToken).then(result => {
const token = result.token_type + ' ' + result.access_token
this.SET_TOKEN(token)

46
vueJs/src/views/admin/settings/components/SettingEditForm.vue

@ -614,6 +614,52 @@
/>
</el-form-item>
</el-tab-pane>
<el-tab-pane
v-if="hasSettingExistsed('Abp.FileManagement.FileLimitLength')"
:label="$t('fileSystem.setting')"
>
<el-form-item
v-if="hasSettingExistsed('Abp.FileManagement.FileLimitLength')"
prop="Abp.FileManagement.FileLimitLength'].value"
>
<el-popover
ref="FileLimitLength"
trigger="hover"
:title="setting['Abp.FileManagement.FileLimitLength'].displayName"
:content="setting['Abp.FileManagement.FileLimitLength'].description"
/>
<span
slot="label"
v-popover:FileLimitLength
>{{ setting['Abp.FileManagement.FileLimitLength'].displayName }}</span>
<el-input
v-model="setting['Abp.FileManagement.FileLimitLength'].value"
:placeholder="setting['Abp.FileManagement.FileLimitLength'].description"
type="number"
@input="(value) => handleSettingValueChanged('Abp.FileManagement.FileLimitLength', value)"
/>
</el-form-item>
<el-form-item
v-if="hasSettingExistsed('Abp.FileManagement.AllowFileExtensions')"
prop="Abp.FileManagement.AllowFileExtensions'].value"
>
<el-popover
ref="AllowFileExtensions"
trigger="hover"
:title="setting['Abp.FileManagement.AllowFileExtensions'].displayName"
:content="setting['Abp.FileManagement.AllowFileExtensions'].description"
/>
<span
slot="label"
v-popover:AllowFileExtensions
>{{ setting['Abp.FileManagement.AllowFileExtensions'].displayName }}</span>
<el-input
v-model="setting['Abp.FileManagement.AllowFileExtensions'].value"
:placeholder="setting['Abp.FileManagement.AllowFileExtensions'].description"
@input="(value) => handleSettingValueChanged('Abp.FileManagement.AllowFileExtensions', value)"
/>
</el-form-item>
</el-tab-pane>
</el-tabs>
<el-form-item

106
vueJs/src/views/file-management/components/FileUploadForm.vue

@ -0,0 +1,106 @@
<template>
<div>
<uploader
ref="uploader"
:options="options"
:auto-start="false"
class="uploader-pane"
@file-added="onFileAdded"
@file-error="onFileError"
@file-complete="onFileUploadCompleted"
>
<uploader-unsupport />
<uploader-drop>
<uploader-btn :attrs="attrs">
{{ $t('fileSystem.addFile') }}
</uploader-btn>
</uploader-drop>
<uploader-list />
</uploader>
</div>
</template>
<script lang="ts">
import { Component, Vue, Prop, Watch } from 'vue-property-decorator'
import FileManagementAppService, { FileUploadUrl } from '@/api/filemanagement'
export class UploadOptions {
target!: string
chunkSize!: number
testChunks!: boolean
fileParameterName!: string
maxChunkRetries!: number
headers?: any
query?: any
permanentErrors?: number[]
successStatuses?: number[]
constructor() {
this.query = {}
this.headers = {}
this.testChunks = false
this.successStatuses = new Array<number>()
this.permanentErrors = new Array<number>()
}
}
@Component({
name: 'FileUploadForm'
})
export default class extends Vue {
@Prop({ default: () => new UploadOptions() })
private options!: UploadOptions
@Prop({ default: '' })
private path!: string
private attrs!: {[key: string]: any}
private files?: any = {}
constructor() {
super()
this.attrs = {
accept: ['image/*', 'document/*', 'video/*', 'audio/*']
}
this.options.target = FileUploadUrl
this.options.successStatuses = [200, 201, 202, 204, 205]
this.options.permanentErrors = [400, 401, 403, 404, 415, 500, 501]
}
public close() {
this.files = {}
const uploadControl = this.$refs.uploader as any
uploadControl.files = []
uploadControl.fileList = []
uploadControl.uploader.cancel()
}
@Watch('path', { immediate: true })
private onPathChanged() {
this.options.query.path = this.path
}
private onFileAdded(file: any) {
this.files[file.name] = file.chunkSize
file.uploader.fileStatusText.error = this.$t('fileSystem.uploadError')
file.uploader.fileStatusText.paused = this.$t('fileSystem.paused')
file.uploader.fileStatusText.success = this.$t('fileSystem.uploadSuccess')
file.uploader.fileStatusText.waiting = this.$t('fileSystem.waitingUpload')
file.uploader.fileStatusText.uploading = this.$t('fileSystem.uploading')
}
private onFileError(rootFile: any, file: any, message: any) {
const abpResponse = JSON.parse(message)
this.$message.error(abpResponse.error.message)
}
private onFileUploadCompleted(file: any) {
console.log(file)
this.$emit('onFileUploaded')
}
}
</script>
<style lang="scss" scoped>
</style>

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

@ -16,7 +16,7 @@
v-for="(fileRoot, index) in fileSystemRoot"
:key="index"
class="file-system-breadcrumb"
@click.native="(event) => handleBreadCrumbClick(event, index)"
@click.native="(event) => onBreadCrumbClick(event, index)"
>
{{ fileRoot }}
</el-breadcrumb-item>
@ -35,9 +35,8 @@
highlight-current-row
style="width: 100%;"
:row-class-name="tableRowClassName"
@selection-change="handleSelectionChanged"
@row-click="handleRowClick"
@row-dblclick="handleRowDoubleClick"
@row-click="onRowClick"
@row-dblclick="onRowDoubleClick"
>
<el-table-column
type="selection"
@ -158,6 +157,19 @@
:limit.sync="fileSystemGetFilter.maxResultCount"
@pagination="handleGetFileSystemList"
/>
<el-dialog
:visible.sync="showFileUploadDialog"
:title="$t('fileSystem.upload')"
:show-close="false"
@closed="onFileUploadFormClosed"
>
<file-upload-form
ref="fileUploadForm"
:path="lastFilePath"
@onFileUploaded="onFileUploaded"
/>
</el-dialog>
</div>
</template>
@ -165,6 +177,7 @@
import { dateFormat } from '@/utils'
import { checkPermission } from '@/utils/permission'
import { Component, Vue } from 'vue-property-decorator'
import FileUploadForm from './components/FileUploadForm.vue'
import Pagination from '@/components/Pagination/index.vue'
import FileSystemService, { FileSystem, FileSystemGetByPaged, FileSystemType } from '@/api/filemanagement'
@ -175,7 +188,8 @@ const gbUnit = mbUnit * 1024
@Component({
name: 'FileManagement',
components: {
Pagination
Pagination,
FileUploadForm
},
filters: {
dateTimeFilter(datetime: string) {
@ -233,6 +247,7 @@ const gbUnit = mbUnit * 1024
}
})
export default class extends Vue {
private showFileUploadDialog!: boolean
private downloading!: boolean
private lastFilePath!: string
private fileSystemRoot!: string[]
@ -247,6 +262,7 @@ export default class extends Vue {
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()
@ -267,30 +283,6 @@ export default class extends Vue {
})
}
private handleSelectionChanged(selection: any, row: any) {
console.log(row)
}
private handleRowClick(row: any) {
const table = this.$refs.fileSystemTable as any
table.toggleRowSelection(row)
}
private handleRowDoubleClick(row: any) {
if (row.type === FileSystemType.Folder) {
this.fileSystemRoot.push(row.name)
this.navigationToFilePath()
}
}
private handleBreadCrumbClick(event: any, index: number) {
// ,
if ((index + 1) < this.fileSystemRoot.length) {
this.fileSystemRoot.splice(index + 1)
this.navigationToFilePath()
}
}
private navigationToFilePath() {
const fileSystemPathArray = this.fileSystemRoot.slice(1)
const fileSystemPath = fileSystemPathArray.join('/')
@ -347,8 +339,8 @@ export default class extends Vue {
}
private handleUploadFile(path: string) {
console.log(path)
// TODO:
this.lastFilePath = path
this.showFileUploadDialog = true
}
private handleDownloadFile(path: string, fileName: string, size: number) {
@ -388,6 +380,38 @@ export default class extends Vue {
})
}
private onRowClick(row: any) {
const table = this.$refs.fileSystemTable as any
table.toggleRowSelection(row)
}
private onRowDoubleClick(row: any) {
if (row.type === FileSystemType.Folder) {
this.fileSystemRoot.push(row.name)
this.navigationToFilePath()
}
}
private onBreadCrumbClick(event: any, index: number) {
// ,
if ((index + 1) < this.fileSystemRoot.length) {
this.fileSystemRoot.splice(index + 1)
this.navigationToFilePath()
} else {
this.handleGetFileSystemList()
}
}
private onFileUploaded() {
this.handleGetFileSystemList()
}
private onFileUploadFormClosed() {
this.showFileUploadDialog = false
const frmUpload = this.$refs.fileUploadForm as any
frmUpload.close()
}
private l(name: string, values?: any[] | { [key: string]: any }) {
return this.$t(name, values).toString()
}

Loading…
Cancel
Save