Browse Source

update README.MD

pull/216/head
cKey 5 years ago
parent
commit
e975704b9e
  1. 45
      aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun/README.md
  2. 4
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Aliyun/README.md
  3. 4
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/README.md
  4. 2
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/FileValidater.cs
  5. BIN
      aspnet-core/services/apigateway/LINGYUN.ApiGateway.Host/event-bus-cap.db
  6. 60
      vueJs/src/views/admin/components/FeatureManagement.vue
  7. 2
      vueJs/src/views/oss-management/index.vue

45
aspnet-core/modules/cloud-aliyun/LINGYUN.Abp.Aliyun/README.md

@ -2,23 +2,48 @@
File-Management更名为Oss-Management
## 模块说明
### 基础模块
* LINGYUN.Abp.OssManagement.Domain.Shared 领域层公共模块,定义了错误代码、本地化、模块设置
* LINGYUN.Abp.OssManagement.Domain 领域层模块,定义了抽象的Oss容器与对象管理接口
* LINGYUN.Abp.OssManagement.Application.Contracts 应用服务层公共模块,定义了管理Oss的外部接口、权限、功能限制策略
* LINGYUN.Abp.OssManagement.Application 应用服务层实现,实现了Oss管理接口
* LINGYUN.Abp.OssManagement.HttpApi RestApi实现,实现了独立的对外RestApi接口
* LINGYUN.Abp.OssManagement.SettingManagement 设置管理模块,对外暴露自身的设置管理,用于网关聚合
* [LINGYUN.Abp.OssManagement.Domain.Shared](./LINGYUN.Abp.OssManagement.Domain.Shared) 领域层公共模块,定义了错误代码、本地化、模块设置
* [LINGYUN.Abp.OssManagement.Domain](./LINGYUN.Abp.OssManagement.Domain) 领域层模块,定义了抽象的Oss容器与对象管理接口
* [LINGYUN.Abp.OssManagement.Application.Contracts](./LINGYUN.Abp.OssManagement.Application.Contracts) 应用服务层公共模块,定义了管理Oss的外部接口、权限、功能限制策略
* [LINGYUN.Abp.OssManagement.Application](./LINGYUN.Abp.OssManagement.Application) 应用服务层实现,实现了Oss管理接口
* [LINGYUN.Abp.OssManagement.HttpApi](./LINGYUN.Abp.OssManagement.HttpApi) RestApi实现,实现了独立的对外RestApi接口
* [LINGYUN.Abp.OssManagement.SettingManagement](./LINGYUN.Abp.OssManagement.SettingManagement) 设置管理模块,对外暴露自身的设置管理,用于网关聚合
### 高阶模块
* LINGYUN.Abp.OssManagement.Aliyun Oss管理的阿里云实现,实现了部分阿里云Oss服务的容器与对象管理
* LINGYUN.Abp.OssManagement.FileSystem Oss管理的本地文件系统实现,实现了部分本地文件系统的容器(目录)与对象(文件/目录)管理
* LINGYUN.Abp.OssManagement.FileSystem.ImageSharp Oss本地对象的ImageSharp扩展,当前端传递需求处理对象时,此模块用于实现基于图形文件流的处理
* [LINGYUN.Abp.OssManagement.Aliyun](./LINGYUN.Abp.OssManagement.Aliyun) Oss管理的阿里云实现,实现了部分阿里云Oss服务的容器与对象管理
* [LINGYUN.Abp.OssManagement.FileSystem](./LINGYUN.Abp.OssManagement.FileSystem) Oss管理的本地文件系统实现,实现了部分本地文件系统的容器(目录)与对象(文件/目录)管理
* [LINGYUN.Abp.OssManagement.FileSystem.ImageSharp](./LINGYUN.Abp.OssManagement.FileSystem.ImageSharp) Oss本地对象的ImageSharp扩展,当前端传递需求处理对象时,此模块用于实现基于图形文件流的处理
### 权限定义
* AbpOssManagement.Container 授权对象是否允许访问容器(bucket)
* AbpOssManagement.Container.Create 授权对象是否允许创建容器(bucket)
* AbpOssManagement.Container.Delete 授权对象是否允许删除容器(bucket)
* AbpOssManagement.OssObject 授权对象是否允许访问Oss对象
* AbpOssManagement.OssObject.Create 授权对象是否允许创建Oss对象
* AbpOssManagement.OssObject.Delete 授权对象是否允许删除Oss对象
* AbpOssManagement.OssObject.Download 授权对象是否允许下载Oss对象
### 功能定义
* AbpOssManagement.OssObject.DownloadFile 用户可以下载文件
* AbpOssManagement.OssObject.DownloadLimit 用户在周期内允许下载文件的最大次数,范围0-1000000
* AbpOssManagement.OssObject.DownloadInterval 用户限制下载文件次数的周期,时钟刻度:月,默认: 1,范围1-12
* AbpOssManagement.OssObject.UploadFile 用户可以上传文件
* AbpOssManagement.OssObject.UploadLimit 用户在周期内允许上传文件的最大次数,范围0-1000000
* AbpOssManagement.OssObject.UploadInterval 用户限制上传文件次数的周期,时钟刻度:月,默认: 1,范围1-12
* AbpOssManagement.OssObject.MaxUploadFileCount 单次上传文件的数量,未实现
### 配置定义
* Abp.OssManagement.DownloadPackageSize 下载分包大小,分块下载时单次传输的数据大小,未实现
* Abp.OssManagement.FileLimitLength 上传文件限制大小,默认:100
* Abp.OssManagement.AllowFileExtensions 允许的上传文件扩展名,多个扩展名以逗号分隔,默认:dll,zip,rar,txt,log,xml,config,json,jpeg,jpg,png,bmp,ico,xlsx,xltx,xls,xlt,docs,dots,doc,dot,pptx,potx,ppt,pot,chm
## 更新日志

4
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Aliyun/README.md

@ -1,4 +1,4 @@
# LINGYUN.Abp.FileManagement.Aliyun
# LINGYUN.Abp.OssManagement.Aliyun
阿里云oss容器接口
@ -7,7 +7,7 @@
模块按需引用
```csharp
[DependsOn(typeof(AbpFileManagementAliyunModule))]
[DependsOn(typeof(AbpOssManagementAliyunModule))]
public class YouProjectModule : AbpModule
{
// other

4
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.FileSystem/README.md

@ -1,4 +1,4 @@
# LINGYUN.Abp.FileManagement.FileSystem
# LINGYUN.Abp.OssManagement.FileSystem
本地文件系统oss容器接口
@ -7,7 +7,7 @@
模块按需引用
```csharp
[DependsOn(typeof(AbpFileManagementFileSystemModule))]
[DependsOn(typeof(AbpOssManagementFileSystemModule))]
public class YouProjectModule : AbpModule
{
// other

2
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.HttpApi/LINGYUN/Abp/OssManagement/FileValidater.cs

@ -77,7 +77,7 @@ namespace LINGYUN.Abp.OssManagement
public class FileValidation
{
public const string CacheKey = "Abp.FileManagement.FileValidation";
public const string CacheKey = "Abp.OssManagement.FileValidation";
public int SizeLimit { get; set; }
public string[] AllowedExtensions { get; set; }
public FileValidation()

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

Binary file not shown.

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

@ -46,7 +46,6 @@
<el-input
v-if="feature.valueType.validator.name === 'NUMERIC'"
v-model.number="feature.value"
type="number"
@change="(value) => handleValueChanged(feature, value)"
/>
<el-input
@ -65,7 +64,7 @@
<el-option
v-for="valueItem in feature.valueType.itemSource.items"
:key="valueItem.value"
:label="localizer(valueItem.displayText.resourceName + ':' + valueItem.displayText.name)"
:label="localizer(valueItem.displayText.resourceName + '.' + valueItem.displayText.name)"
:value="valueItem.value"
/>
</el-select>
@ -106,6 +105,11 @@ import { ElForm } from 'element-ui/types/form'
}
return false
}
},
getNumericValue() {
return (value: any) => {
return Number(value)
}
}
},
filters: {
@ -116,17 +120,22 @@ import { ElForm } from 'element-ui/types/form'
*/
inputRuleFilter(validator: any, localizer: any) {
const featureRules: {[key: string]: any}[] = new Array<{[key: string]: any}>()
if (validator.name === 'NUMERIC') {
if (validator.name === 'NUMERIC' && validator.properties) {
const ruleRang: {[key: string]: any} = {}
ruleRang.pattern = RegExp('^(' + validator.minValue + '|[1-9]d?|' + validator.maxValue + ')$')
// ruleRang.pattern = /^(1|[1-9]\d?|10)$/
// ruleRang.min = validator.minValue
// ruleRang.max = validator.maxValue
// TODO:
//
// 使form-itemrules
// TODO...
ruleRang.pattern = RegExp('^[^' + validator.properties.MinValue + ']\\d{0,4}$|^' + validator.properties.MaxValue + '$')
// ruleRang.pattern = ^\d{0,11}$
// ruleRang.type = 'number'
// ruleRang.min = validator.properties.MinValue
// ruleRang.max = validator.properties.MaxValue
ruleRang.trigger = 'blur'
ruleRang.message = localizer('AbpFeatureManagement.ThisFieldMustBeBetween{0}And{1}', { 0: validator.minValue, 1: validator.maxValue })
ruleRang.message = localizer('AbpFeatureManagement.ThisFieldMustBeBetween{0}And{1}', { 0: validator.properties.MinValue, 1: validator.properties.MaxValue })
featureRules.push(ruleRang)
} else if (validator.name === 'STRING') {
if (validator.allowNull && validator.allowNull.toLowerCase() === 'true') {
} else if (validator.name === 'STRING' && validator.properties) {
if (validator.properties.AllowNull && validator.properties.AllowNull.toLowerCase() === 'true') {
const ruleRequired: {[key: string]: any} = {}
ruleRequired.required = true
ruleRequired.trigger = 'blur'
@ -134,10 +143,10 @@ import { ElForm } from 'element-ui/types/form'
featureRules.push(ruleRequired)
}
const ruleString: {[key: string]: any} = {}
ruleString.min = validator.minLength
ruleString.max = validator.maxLength
ruleString.min = validator.properties.MinLength
ruleString.max = validator.properties.MaxLength
ruleString.trigger = 'blur'
ruleString.message = localizer('AbpFeatureManagement.ThisFieldMustBeBetween{0}And{1}', { 0: validator.minValue, 1: validator.maxValue })
ruleString.message = localizer('AbpFeatureManagement.ThisFieldMustBeBetween{0}And{1}', { 0: validator.properties.MinValue, 1: validator.properties.MaxValue })
featureRules.push(ruleString)
}
return featureRules
@ -149,6 +158,15 @@ import { ElForm } from 'element-ui/types/form'
*/
localizer(name: string, values?: any[]) {
return this.$t(name, values)
},
validatorNumberRange(rule: any, value: any, callback: any) {
if (value) {
const num = Number(value)
if (num < rule.min ||
num > rule.max) {
callback(new Error(this.$t('AbpFeatureManagement.ThisFieldMustBeBetween{0}And{1}', { 0: rule.min, 1: rule.max }).toString()))
}
}
}
}
})
@ -176,8 +194,6 @@ export default class extends Vue {
/**
* 用于拼接动态表单的功能数据,需要把abp返回的数据做一次调整
*/
// private features = new FeatureItems()
private featureGroups = new FeatureGroups()
mounted() {
@ -206,12 +222,14 @@ export default class extends Vue {
*/
private handleGetFeatures() {
if (this.loadFeature) {
FeatureManagementService.getFeatures(this.providerName, this.providerKey).then(res => {
this.featureGroups = res
if (this.featureGroups.groups.length > 0) {
this.selectTab = this.featureGroups.groups[0].name
}
})
FeatureManagementService
.getFeatures(this.providerName, this.providerKey)
.then(res => {
this.featureGroups = res
if (this.featureGroups.groups.length > 0) {
this.selectTab = this.featureGroups.groups[0].name
}
})
}
}

2
vueJs/src/views/oss-management/index.vue

@ -125,7 +125,7 @@
>
<template slot-scope="{row}">
<el-button
v-permission="['AbpFileManagement.FileSystem.FileManager']"
v-permission="['AbpOssManagement.FileSystem.FileManager']"
size="mini"
type="success"
icon="el-icon-tickets"

Loading…
Cancel
Save