From 15836ae17a8bc869fb387c6d4d924cad633f71af Mon Sep 17 00:00:00 2001
From: cKey <35512826+colinin@users.noreply.github.com>
Date: Fri, 28 Aug 2020 17:17:24 +0800
Subject: [PATCH] rewrite setting-management service and view
---
.../LINGYUN.Abp.EventBus.CAP.xml | 39 +++++
.../SettingManagement/ISettingAppService.cs | 13 +-
.../SettingManagement/SettingAppService.cs | 134 ++++++++++++------
.../SettingManagement/SettingController.cs | 41 ++++--
vueJs/src/api/abpconfiguration.ts | 4 +-
vueJs/src/api/filemanagement.ts | 1 -
vueJs/src/api/roles.ts | 4 +-
vueJs/src/api/settings.ts | 50 ++++---
vueJs/src/api/users.ts | 14 +-
vueJs/src/icons/components/index.ts | 1 +
vueJs/src/icons/components/setting.ts | 12 ++
vueJs/src/icons/svg/setting.svg | 1 +
vueJs/src/router/modules/file-management.ts | 2 +-
vueJs/src/shims.d.ts | 2 +-
vueJs/src/store/modules/user.ts | 1 -
.../components/GlobalSettingEditForm.vue | 20 ++-
.../settings/components/SettingEditForm.vue | 81 +++++++----
.../components/TenantSettingEditForm.vue | 22 ++-
.../components/UserSettingEditForm.vue | 22 ---
vueJs/src/views/admin/settings/index.vue | 45 ++----
vueJs/src/views/permission/role.vue | 2 +-
21 files changed, 320 insertions(+), 191 deletions(-)
create mode 100644 vueJs/src/icons/components/setting.ts
create mode 100644 vueJs/src/icons/svg/setting.svg
delete mode 100644 vueJs/src/views/admin/settings/components/UserSettingEditForm.vue
diff --git a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
index 5e60c1842..bfa18c163 100644
--- a/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
+++ b/aspnet-core/modules/common/LINGYUN.Abp.EventBus.CAP/LINGYUN.Abp.EventBus.CAP.xml
@@ -121,6 +121,45 @@
+
+
+ AbpECAPExecutionFailedException
+
+
+
+
+ MessageType
+
+
+
+
+ Message
+
+
+
+
+ constructor
+
+
+
+
+
+
+ constructor
+
+
+
+
+
+
+
+ constructor
+
+
+
+
+
+
CAP分布式事件总线
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/ISettingAppService.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/ISettingAppService.cs
index 9752f2b04..a6390392d 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/ISettingAppService.cs
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application.Contracts/LINGYUN/Abp/SettingManagement/ISettingAppService.cs
@@ -11,15 +11,18 @@ namespace LINGYUN.Abp.SettingManagement
{
Task> GetAllGlobalAsync();
- Task> GetAllForTenantAsync();
+ Task SetGlobalAsync(UpdateSettingsDto input);
+
+ Task> GetAllForCurrentTenantAsync();
+
+ Task SetCurrentTenantAsync(UpdateSettingsDto input);
Task> GetAllForUserAsync([Required] Guid userId);
- Task> GetAllForCurrentUserAsync();
+ Task SetForUserAsync([Required] Guid userId, UpdateSettingsDto input);
- [Obsolete("The best way to do this is to separate the individual configurations")]
- Task> GetAsync([NotNull] string providerName, [NotNull] string providerKey);
+ Task> GetAllForCurrentUserAsync();
- Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input);
+ Task SetCurrentUserAsync(UpdateSettingsDto input);
}
}
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
index 47f547acb..3492de673 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.Application/LINGYUN/Abp/SettingManagement/SettingAppService.cs
@@ -1,5 +1,4 @@
-using JetBrains.Annotations;
-using Microsoft.AspNetCore.Authorization;
+using Microsoft.AspNetCore.Authorization;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -8,9 +7,11 @@ using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;
using Volo.Abp.Caching;
+using Volo.Abp.MultiTenancy;
using Volo.Abp.SettingManagement;
using Volo.Abp.SettingManagement.Localization;
using Volo.Abp.Settings;
+using Volo.Abp.Users;
namespace LINGYUN.Abp.SettingManagement
{
@@ -32,109 +33,147 @@ namespace LINGYUN.Abp.SettingManagement
LocalizationResource = typeof(AbpSettingManagementResource);
}
- public virtual async Task> GetAsync([NotNull] string providerName, [NotNull] string providerKey)
+ [Authorize(AbpSettingManagementPermissions.Settings.Manager)]
+ public virtual async Task SetGlobalAsync(UpdateSettingsDto input)
+ {
+ foreach (var setting in input.Settings)
+ {
+ await SettingManager.SetGlobalAsync(setting.Name, setting.Value);
+ var settingDefinition = SettingDefinitionManager.GetOrNull(setting.Name);
+ if (settingDefinition != null)
+ {
+ foreach (var provider in settingDefinition.Providers)
+ {
+ // 同步变更缓存配置
+ await SetCacheItemAsync(setting.Name, setting.Value, provider, null);
+ }
+ }
+ }
+
+ await CurrentUnitOfWork.SaveChangesAsync();
+ }
+
+ [Authorize(AbpSettingManagementPermissions.Settings.Manager)]
+ public virtual async Task SetCurrentTenantAsync(UpdateSettingsDto input)
{
- return await GetAllSettingAsync(providerName, providerKey);
+ if (CurrentTenant.IsAvailable)
+ {
+ foreach (var setting in input.Settings)
+ {
+ await SettingManager.SetForTenantAsync(CurrentTenant.GetId(), setting.Name, setting.Value);
+ // 同步变更缓存配置
+ await SetCacheItemAsync(setting.Name, setting.Value, TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString());
+ }
+
+ await CurrentUnitOfWork.SaveChangesAsync();
+ }
}
[Authorize(AbpSettingManagementPermissions.Settings.Manager)]
- public virtual async Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input)
+ public virtual async Task SetForUserAsync([Required] Guid userId, UpdateSettingsDto input)
{
foreach (var setting in input.Settings)
{
- await SettingManager.SetAsync(setting.Name, setting.Value, providerName, providerKey);
+ await SettingManager.SetForUserAsync(userId, setting.Name, setting.Value);
// 同步变更缓存配置
- var settingCacheKey = CalculateCacheKey(setting.Name, providerName, providerKey);
- var settignCacheItem = new SettingCacheItem(setting.Value);
- await Cache.SetAsync(settingCacheKey, settignCacheItem);
+ await SetCacheItemAsync(setting.Name, setting.Value, UserSettingValueProvider.ProviderName, userId.ToString());
}
+
+ await CurrentUnitOfWork.SaveChangesAsync();
+ }
+
+ [Authorize]
+ public virtual async Task SetCurrentUserAsync(UpdateSettingsDto input)
+ {
+ foreach (var setting in input.Settings)
+ {
+ await SettingManager.SetForUserAsync(CurrentUser.GetId(), setting.Name, setting.Value);
+ // 同步变更缓存配置
+ await SetCacheItemAsync(setting.Name, setting.Value, UserSettingValueProvider.ProviderName, CurrentUser.GetId().ToString());
+ }
+
+ await CurrentUnitOfWork.SaveChangesAsync();
}
[AllowAnonymous]
public virtual async Task> GetAllGlobalAsync()
{
- var globalSettings = await SettingManager.GetAllGlobalAsync();
+ // return GetAllSetting(await SettingManager.GetAllGlobalAsync());
- return GetAllSetting(globalSettings);
+ return await GetAllSettingAsync(GlobalSettingValueProvider.ProviderName, null);
}
- public virtual async Task> GetAllForTenantAsync()
+ public virtual async Task> GetAllForCurrentTenantAsync()
{
if (CurrentTenant.IsAvailable)
{
- var tenantSettings = await SettingManager.GetAllForTenantAsync(CurrentTenant.Id.Value);
- return GetAllSetting(tenantSettings);
+ // return GetAllSetting(await SettingManager.GetAllForTenantAsync(CurrentTenant.GetId(), false));
+
+ return await GetAllSettingAsync(TenantSettingValueProvider.ProviderName, CurrentTenant.GetId().ToString());
}
return new ListResultDto();
+
}
public virtual async Task> GetAllForUserAsync([Required] Guid userId)
{
- var userSettings = await SettingManager.GetAllForUserAsync(userId);
- return GetAllSetting(userSettings);
+ // return GetAllSetting(await SettingManager.GetAllForUserAsync(userId));
+
+ return await GetAllSettingAsync(UserSettingValueProvider.ProviderName, userId.ToString());
}
+ [Authorize]
public virtual async Task> GetAllForCurrentUserAsync()
{
- var userSettings = await SettingManager.GetAllForUserAsync(CurrentUser.Id.Value);
- return GetAllSetting(userSettings);
+ // return GetAllSetting(await SettingManager.GetAllForUserAsync(CurrentUser.GetId()));
+
+ return await GetAllSettingAsync(UserSettingValueProvider.ProviderName, CurrentUser.GetId().ToString());
}
- protected virtual async Task> GetAllSettingAsync(
- string providerName, string providerKey)
+ protected virtual ListResultDto GetAllSetting(List settings)
{
var settingsDto = new List();
- var settingDefinitions = SettingDefinitionManager.GetAll();
- foreach (var setting in settingDefinitions)
+ foreach (var setting in settings)
{
- if (setting.Providers.Any() && !setting.Providers.Contains(providerName))
- {
- continue;
- }
-
- // 既然是配置服务,那必须能管理所有配置才对
- //if (!setting.IsVisibleToClients)
- //{
- // continue;
- //}
-
- var settingValue = await SettingManager.GetOrNullAsync(setting.Name, providerName, providerKey);
+ var settingDefinition = SettingDefinitionManager.Get(setting.Name);
var settingInfo = new SettingDto
{
Name = setting.Name,
- Value = settingValue,
- DefaultValue = setting.DefaultValue,
- Description = setting.Description.Localize(StringLocalizerFactory),
- DisplayName = setting.DisplayName.Localize(StringLocalizerFactory)
+ Value = setting.Value ?? settingDefinition.DefaultValue,
+ DefaultValue = settingDefinition.DefaultValue,
+ Description = settingDefinition.Description.Localize(StringLocalizerFactory),
+ DisplayName = settingDefinition.DisplayName.Localize(StringLocalizerFactory)
};
settingsDto.Add(settingInfo);
}
+
return new ListResultDto(settingsDto);
}
- protected virtual ListResultDto GetAllSetting(
- List settings)
+ protected virtual async Task> GetAllSettingAsync(string providerName, string providerKey)
{
var settingsDto = new List();
+ var settings = await SettingManager.GetAllAsync(providerName, providerKey);
foreach (var setting in settings)
{
var settingDefinition = SettingDefinitionManager.Get(setting.Name);
-
- if (!settingDefinition.IsVisibleToClients)
+ if (settingDefinition.Providers.Count > 0 &&
+ !settingDefinition.Providers.Any(p => p.Equals(providerName)))
{
continue;
}
- var settingInfo = new SettingDto
+ var settingInfo = new SettingDto
{
Name = setting.Name,
- Value = setting.Value,
+ Value = setting.Value ?? settingDefinition.DefaultValue,
DefaultValue = settingDefinition.DefaultValue,
Description = settingDefinition.Description.Localize(StringLocalizerFactory),
DisplayName = settingDefinition.DisplayName.Localize(StringLocalizerFactory)
};
settingsDto.Add(settingInfo);
}
+
return new ListResultDto(settingsDto);
}
@@ -142,5 +181,12 @@ namespace LINGYUN.Abp.SettingManagement
{
return SettingCacheItem.CalculateCacheKey(name, providerName, providerKey);
}
+
+ protected virtual async Task SetCacheItemAsync(string name, string value, string providerName, string providerKey)
+ {
+ var settingCacheKey = CalculateCacheKey(name, providerName, providerKey);
+ var settignCacheItem = new SettingCacheItem(value);
+ await Cache.SetAsync(settingCacheKey, settignCacheItem);
+ }
}
}
diff --git a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs
index a6c9c80e8..f92964ab4 100644
--- a/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs
+++ b/aspnet-core/modules/settings/LINGYUN.Abp.SettingManagement.HttpApi/LINGYUN/Abp/SettingManagement/SettingController.cs
@@ -1,5 +1,4 @@
-using JetBrains.Annotations;
-using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc;
using System;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
@@ -10,8 +9,8 @@ using Volo.Abp.AspNetCore.Mvc;
namespace LINGYUN.Abp.SettingManagement
{
[RemoteService(Name = AbpSettingManagementRemoteServiceConsts.RemoteServiceName)]
- [Area("settings")]
- [Route("api/settings")]
+ [Area("settingManagement")]
+ [Route("api/setting-management/settings")]
public class SettingController : AbpController, ISettingAppService
{
private readonly ISettingAppService _settingAppService;
@@ -28,14 +27,14 @@ namespace LINGYUN.Abp.SettingManagement
}
[HttpGet]
- [Route("by-tenant")]
- public virtual async Task> GetAllForTenantAsync()
+ [Route("by-current-tenant")]
+ public virtual async Task> GetAllForCurrentTenantAsync()
{
- return await _settingAppService.GetAllForTenantAsync();
+ return await _settingAppService.GetAllForCurrentTenantAsync();
}
[HttpGet]
- [Route("by-user")]
+ [Route("by-user/{userId}")]
public virtual async Task> GetAllForUserAsync([Required] Guid userId)
{
return await _settingAppService.GetAllForUserAsync(userId);
@@ -48,16 +47,32 @@ namespace LINGYUN.Abp.SettingManagement
return await _settingAppService.GetAllGlobalAsync();
}
- [HttpGet]
- public virtual async Task> GetAsync([NotNull] string providerName, [NotNull] string providerKey)
+ [HttpPut]
+ [Route("by-current-user")]
+ public virtual async Task SetCurrentUserAsync(UpdateSettingsDto input)
+ {
+ await _settingAppService.SetCurrentUserAsync(input);
+ }
+
+ [HttpPut]
+ [Route("by-current-tenant")]
+ public virtual async Task SetCurrentTenantAsync(UpdateSettingsDto input)
+ {
+ await _settingAppService.SetCurrentTenantAsync(input);
+ }
+
+ [HttpPut]
+ [Route("by-user/{userId}")]
+ public virtual async Task SetForUserAsync([Required] Guid userId, UpdateSettingsDto input)
{
- return await _settingAppService.GetAsync(providerName, providerKey);
+ await _settingAppService.SetForUserAsync(userId, input);
}
[HttpPut]
- public virtual async Task UpdateAsync([NotNull] string providerName, [NotNull] string providerKey, UpdateSettingsDto input)
+ [Route("by-global")]
+ public virtual async Task SetGlobalAsync(UpdateSettingsDto input)
{
- await _settingAppService.UpdateAsync(providerName, providerKey, input);
+ await _settingAppService.SetGlobalAsync(input);
}
}
}
diff --git a/vueJs/src/api/abpconfiguration.ts b/vueJs/src/api/abpconfiguration.ts
index b8227e784..53b2ae6b6 100644
--- a/vueJs/src/api/abpconfiguration.ts
+++ b/vueJs/src/api/abpconfiguration.ts
@@ -70,7 +70,7 @@ export class Localization {
currentCulture!: CurrentCulture
defaultResourceName?: string
languages!: Language[]
- values!: {[key:string]: {[key:string]: string}}
+ values!: {[key: string]: {[key: string]: string}}
}
export class MultiTenancy {
@@ -78,7 +78,7 @@ export class MultiTenancy {
}
export class Setting {
- values?: {[key:string]: string}
+ values?: {[key: string]: string}
}
export interface IAbpConfiguration {
diff --git a/vueJs/src/api/filemanagement.ts b/vueJs/src/api/filemanagement.ts
index f986231e6..b48d0d5c2 100644
--- a/vueJs/src/api/filemanagement.ts
+++ b/vueJs/src/api/filemanagement.ts
@@ -1,4 +1,3 @@
-import qs from 'qs'
import ApiService from './serviceBase'
import { PagedAndSortedResultRequestDto, PagedResultDto } from './types'
diff --git a/vueJs/src/api/roles.ts b/vueJs/src/api/roles.ts
index 6b6468910..fc39f2a55 100644
--- a/vueJs/src/api/roles.ts
+++ b/vueJs/src/api/roles.ts
@@ -28,12 +28,12 @@ export default class RoleService {
public static getRoleOrganizationUnits(roleId: string) {
const _url = '/api/identity/roles/organization-units/' + roleId
- return ApiService.Get>(_url, IdentityServiceUrl);
+ return ApiService.Get>(_url, IdentityServiceUrl)
}
public static changeRoleOrganizationUnits(roleId: string, payload: ChangeRoleOrganizationUnitDto) {
const _url = '/api/identity/roles/organization-units/' + roleId
- return ApiService.Put(_url, payload, IdentityServiceUrl);
+ return ApiService.Put(_url, payload, IdentityServiceUrl)
}
public static createRole(input: CreateRoleDto) {
diff --git a/vueJs/src/api/settings.ts b/vueJs/src/api/settings.ts
index 1e449a206..710758def 100644
--- a/vueJs/src/api/settings.ts
+++ b/vueJs/src/api/settings.ts
@@ -5,51 +5,69 @@ const IdentityService = process.env.VUE_APP_BASE_API
export default class SettingApiService {
/**
- * 获取配置
- * @param providerName 配置提供者名称
- * @param providerKey 配置提供者标识
- * @returns 返回类型为 ListResultDto 的配置列表
+ * 获取公共配置
*/
- public static getSettings(providerName: string, providerKey: string) {
- let _url = '/api/settings'
- _url += '?providerName=' + providerName
- _url += '&providerKey=' + providerKey
+ public static getGlobalSettings() {
+ const _url = '/api/setting-management/settings/by-global'
return ApiService.Get>(_url, IdentityService)
}
/**
- * 获取公共配置
+ * 设置公共配置
*/
- public static getGlobalSettings() {
- const _url = '/api/settings/by-global'
- return ApiService.Get>(_url, IdentityService)
+ public static setGlobalSettings(payload: SettingsUpdate) {
+ const _url = '/api/setting-management/settings/by-global'
+ return ApiService.Put(_url, payload, IdentityService)
}
/**
* 获取当前租户配置
*/
public static getCurrentTenantSettings() {
- const _url = '/api/settings/by-current-tenant'
+ const _url = '/api/setting-management/settings/by-current-tenant'
return ApiService.Get>(_url, IdentityService)
}
+ /**
+ * 设置当前租户配置
+ */
+ public static setCurrentTenantSettings(payload: SettingsUpdate) {
+ const _url = '/api/setting-management/settings/by-current-tenant'
+ return ApiService.Put(_url, payload, IdentityService)
+ }
+
/**
* 获取当前用户配置
*/
public static getCurrentUserSettings() {
- const _url = '/api/settings/by-current-user'
+ const _url = '/api/setting-management/settings/by-current-user'
return ApiService.Get>(_url, IdentityService)
}
+ /**
+ * 设置当前用户配置
+ */
+ public static setCurrentUserSettings(payload: SettingsUpdate) {
+ const _url = '/api/setting-management/settings/by-current-user'
+ return ApiService.Put(_url, payload, IdentityService)
+ }
+
/**
* 获取用户配置
*/
public static getUserSettings(userId: string) {
- let _url = '/api/settings/by-user'
- _url += '?userId=' + userId
+ const _url = '/api/setting-management/settings/by-user/' + userId
return ApiService.Get>(_url, IdentityService)
}
+ /**
+ * 设置当前用户配置
+ */
+ public static setUserSettings(userId: string, payload: SettingsUpdate) {
+ const _url = '/api/setting-management/settings/by-user/' + userId
+ return ApiService.Put(_url, payload, IdentityService)
+ }
+
/**
* 保存配置
* @param providerName 配置提供者名称
diff --git a/vueJs/src/api/users.ts b/vueJs/src/api/users.ts
index f3466b8a6..2c77ae85f 100644
--- a/vueJs/src/api/users.ts
+++ b/vueJs/src/api/users.ts
@@ -1,15 +1,13 @@
import qs from 'querystring'
import { pagerFormat } from '@/utils/index'
-import { PagedAndSortedResultRequestDto, FullAuditedEntityDto, PagedResultDto } from '@/api/types'
+import { PagedAndSortedResultRequestDto, FullAuditedEntityDto, PagedResultDto, ListResultDto } from '@/api/types'
import { OrganizationUnit } from './organizationunit'
import ApiService from './serviceBase'
-import { ListResultDto } from './types'
const IdentityServiceUrl = process.env.VUE_APP_BASE_API
const IdentityServerUrl = process.env.VUE_APP_BASE_IDENTITY_SERVER
export default class UserApiService {
-
public static getUsers(input: UsersGetPagedDto) {
let _url = '/api/identity/users'
// 因为abp设计的原因, 需要前端组合页面
@@ -62,12 +60,12 @@ export default class UserApiService {
public static getUserOrganizationUnits(userId: string) {
const _url = '/api/identity/users/organization-units/' + userId
- return ApiService.Get>(_url, IdentityServiceUrl);
+ return ApiService.Get>(_url, IdentityServiceUrl)
}
public static changeUserOrganizationUnits(roleId: string, payload: ChangeUserOrganizationUnitDto) {
const _url = '/api/identity/users/organization-units/' + roleId
- return ApiService.Put(_url, payload, IdentityServiceUrl);
+ return ApiService.Put(_url, payload, IdentityServiceUrl)
}
public static setUserRoles(userId: string, roles: string[]) {
@@ -186,7 +184,7 @@ export default class UserApiService {
data: qs.stringify(refresh),
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
- 'Authorization': token
+ Authorization: token
}
})
}
@@ -249,13 +247,13 @@ export class UserLoginData {
export enum VerifyType {
Register = 0,
- Signin = 10,
+ Signin = 10,
ResetPassword = 20
}
export class PhoneVerify {
phoneNumber!: string
- verifyType!:VerifyType
+ verifyType!: VerifyType
}
export class UserResetPasswordData {
diff --git a/vueJs/src/icons/components/index.ts b/vueJs/src/icons/components/index.ts
index 928f221f5..70843e324 100644
--- a/vueJs/src/icons/components/index.ts
+++ b/vueJs/src/icons/components/index.ts
@@ -54,6 +54,7 @@ import './qq'
import './role'
import './route'
import './search'
+import './setting'
import './shopping'
import './size'
import './skill'
diff --git a/vueJs/src/icons/components/setting.ts b/vueJs/src/icons/components/setting.ts
new file mode 100644
index 000000000..3e358e649
--- /dev/null
+++ b/vueJs/src/icons/components/setting.ts
@@ -0,0 +1,12 @@
+/* eslint-disable */
+/* tslint:disable */
+// @ts-ignore
+import icon from 'vue-svgicon'
+icon.register({
+ 'setting': {
+ width: 128,
+ height: 128,
+ viewBox: '0 0 1024 1024',
+ data: ''
+ }
+})
diff --git a/vueJs/src/icons/svg/setting.svg b/vueJs/src/icons/svg/setting.svg
new file mode 100644
index 000000000..a12381474
--- /dev/null
+++ b/vueJs/src/icons/svg/setting.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/vueJs/src/router/modules/file-management.ts b/vueJs/src/router/modules/file-management.ts
index f1a049091..e2a6c03ff 100644
--- a/vueJs/src/router/modules/file-management.ts
+++ b/vueJs/src/router/modules/file-management.ts
@@ -13,7 +13,7 @@ const fileManagementRouter: RouteConfig = {
children: [
{
path: 'file-system',
- component: () => import(/* webpackChunkName: "file-system" */ '@/views/file-management/index.vue'),
+ component: () => import(/* webpackChunkName: "file-system" */ '@/views/file-management/index.vue'),
name: 'filesystem',
meta: {
title: 'filesystem',
diff --git a/vueJs/src/shims.d.ts b/vueJs/src/shims.d.ts
index a8e598bd3..03355ea3b 100644
--- a/vueJs/src/shims.d.ts
+++ b/vueJs/src/shims.d.ts
@@ -30,4 +30,4 @@ declare module 'vue-splitpane'
declare module 'vue-simple-uploader'
// TODO vue-contextmenujs
-declare module 'vue-contextmenujs'
\ No newline at end of file
+declare module 'vue-contextmenujs'
diff --git a/vueJs/src/store/modules/user.ts b/vueJs/src/store/modules/user.ts
index 17b42743a..4790d9a18 100644
--- a/vueJs/src/store/modules/user.ts
+++ b/vueJs/src/store/modules/user.ts
@@ -18,7 +18,6 @@ export interface IUserState {
email: string
}
-const scopeKey = 'vue_typescript_admin_scope'
const tokenKey = 'vue_typescript_admin_token'
const refreshTokenKey = 'vue_typescript_admin_refresh_token'
diff --git a/vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue b/vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue
index d140aa9e2..43f385866 100644
--- a/vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue
+++ b/vueJs/src/views/admin/settings/components/GlobalSettingEditForm.vue
@@ -1,12 +1,14 @@
diff --git a/vueJs/src/views/admin/settings/components/SettingEditForm.vue b/vueJs/src/views/admin/settings/components/SettingEditForm.vue
index cd28cbb56..84d3b398d 100644
--- a/vueJs/src/views/admin/settings/components/SettingEditForm.vue
+++ b/vueJs/src/views/admin/settings/components/SettingEditForm.vue
@@ -12,6 +12,7 @@
:label="$t('settings.systemSetting')"
>
@@ -64,7 +65,9 @@
v-if="hasSettingExistsed('Abp.Identity.Password.RequiredLength')"
:label="$t('settings.passwordSecurity')"
>
-
+
-
+
handleSettingValueChanged('Abp.Account.PhoneVerifyCodeExpiration', value)"
/>
@@ -462,7 +468,9 @@
v-if="hasSettingExistsed('Abp.Mailing.Smtp.Host')"
:label="$t('settings.mailing')"
>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.Host', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.Port', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.UserName', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.Password', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.Domain', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.EnableSsl', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.Smtp.UseDefaultCredentials', value)"
/>
-
+
handleSettingValueChanged('Abp.Mailing.DefaultFromAddress', value)"
/>
-
+
diff --git a/vueJs/src/views/admin/settings/components/UserSettingEditForm.vue b/vueJs/src/views/admin/settings/components/UserSettingEditForm.vue
deleted file mode 100644
index 194cab827..000000000
--- a/vueJs/src/views/admin/settings/components/UserSettingEditForm.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
diff --git a/vueJs/src/views/admin/settings/index.vue b/vueJs/src/views/admin/settings/index.vue
index 9381e50cb..5caf56466 100644
--- a/vueJs/src/views/admin/settings/index.vue
+++ b/vueJs/src/views/admin/settings/index.vue
@@ -1,48 +1,25 @@
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
-
diff --git a/vueJs/src/views/permission/role.vue b/vueJs/src/views/permission/role.vue
index e8144603f..035f3b228 100644
--- a/vueJs/src/views/permission/role.vue
+++ b/vueJs/src/views/permission/role.vue
@@ -263,7 +263,7 @@ export default class extends Vue {
}
private handleDelete(scope: any) {
- const { $index, row } = scope
+ const { $index } = scope
this.$confirm('Confirm to remove the role?', 'Warning', {
confirmButtonText: 'Confirm',
cancelButtonText: 'Cancel',