😎清理代码
This commit is contained in:
parent
e0b2d37fad
commit
30a3dec26c
@ -49,7 +49,7 @@
|
||||
<PackageReference Include="SSH.NET" Version="2024.2.0" />
|
||||
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.5.1" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1164" />
|
||||
<PackageReference Include="TencentCloudSDK.Sms" Version="3.0.1165" />
|
||||
<PackageReference Include="UAParser" Version="3.1.47" />
|
||||
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -33,7 +33,7 @@ public partial class SysConfig : EntityBase
|
||||
/// 属性值
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "属性值", Length = 512)]
|
||||
[MaxLength(256)]
|
||||
[MaxLength(512)]
|
||||
public string? Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -15,21 +15,21 @@ namespace Admin.NET.Core;
|
||||
public partial class SysConfigValue : EntityTenant
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置Id
|
||||
/// 系统配置Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "配置Id")]
|
||||
[SugarColumn(ColumnDescription = "系统配置Id")]
|
||||
public long ConfigId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 属性默认值
|
||||
/// </summary>
|
||||
[MaxLength(64)]
|
||||
[SugarColumn(ColumnDescription = "属性默认值", Length = 512)]
|
||||
public string? Value { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 配置
|
||||
/// 系统配置
|
||||
/// </summary>
|
||||
[Navigate(NavigateType.OneToOne, nameof(ConfigId))]
|
||||
public SysConfig Config { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 参数默认值
|
||||
/// </summary>
|
||||
[MaxLength(64)]
|
||||
[SugarColumn(ColumnDescription = "参数默认值", Length = 512)]
|
||||
public string? Value { get; set; }
|
||||
}
|
||||
@ -34,15 +34,14 @@ public class AddConfigInput : SysConfig
|
||||
|
||||
public class UpdateConfigInput : AddConfigInput
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class UpdateDefaultValueInput : BaseIdInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 默认属性值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; }
|
||||
/// <summary>
|
||||
/// 默认属性值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteConfigInput : BaseIdInput
|
||||
|
||||
@ -257,7 +257,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
if (config == null) return;
|
||||
|
||||
config.Value = value;
|
||||
await UpdateConfig(config.Adapt<UpdateConfigInput>());
|
||||
await UpdateConfig(config.Adapt<UpdateConfigInput>());
|
||||
|
||||
RemoveConfigCache(config);
|
||||
}
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Npgsql;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
"name": "admin.net.pro",
|
||||
"type": "module",
|
||||
"version": "2.4.33",
|
||||
"lastBuildTime": "2025.01.15",
|
||||
"lastBuildTime": "2025.01.17",
|
||||
"description": "Admin.NET 站在巨人肩膀上的 .NET 通用权限开发框架",
|
||||
"author": "zuohuaijun",
|
||||
"license": "MIT",
|
||||
@ -74,7 +74,7 @@
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-signature-pad": "^3.0.2",
|
||||
"vue3-tree-org": "^4.2.2",
|
||||
"vxe-pc-ui": "^4.3.73",
|
||||
"vxe-pc-ui": "^4.3.74",
|
||||
"vxe-table": "^4.10.0",
|
||||
"vxe-table-plugin-element": "^4.0.4",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.7",
|
||||
@ -83,7 +83,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@iconify/vue": "^4.3.0",
|
||||
"@plugin-web-update-notification/vite": "^1.8.0",
|
||||
"@plugin-web-update-notification/vite": "^2.0.0",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.17.12",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
|
||||
@ -79,16 +79,16 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="Name字段" prop="treeName">
|
||||
<template v-slot:label>
|
||||
<el-form-item label="Name字段" prop="treeName">
|
||||
<template v-slot:label>
|
||||
<div>
|
||||
Name字段
|
||||
<el-tooltip raw-content content="本表作为树控件的树属性Name字段。" placement="top">
|
||||
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"><ele-QuestionFilled /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<el-select v-model="state.ruleForm.treeName" @change="treeNameChanged" value-key="value" filterable clearable class="w100">
|
||||
</template>
|
||||
<el-select v-model="state.ruleForm.treeName" @change="treeNameChanged" value-key="value" filterable clearable class="w100">
|
||||
<el-option v-for="item in state.columnData" :key="item.columnName" :label="item.columnName + ' ( ' + item.columnName + ' ) [' + item.columnComment + ']'" :value="item" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -108,15 +108,17 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
|
||||
<el-form-item label="父级菜单" prop="menuPid">
|
||||
<el-cascader :options="state.menuData"
|
||||
:props="cascaderProps"
|
||||
placeholder="请选择上级菜单"
|
||||
:disabled="!state.ruleForm.generateMenu"
|
||||
filterable
|
||||
clearable
|
||||
class="w100"
|
||||
v-model="state.ruleForm.menuPid"
|
||||
@change="menuChange">
|
||||
<el-cascader
|
||||
:options="state.menuData"
|
||||
:props="cascaderProps"
|
||||
placeholder="请选择上级菜单"
|
||||
:disabled="!state.ruleForm.generateMenu"
|
||||
filterable
|
||||
clearable
|
||||
class="w100"
|
||||
v-model="state.ruleForm.menuPid"
|
||||
@change="menuChange"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span>{{ data.title }}</span>
|
||||
<span v-if="!node.isLeaf"> ({{ data.children.length }}) </span>
|
||||
|
||||
@ -93,10 +93,10 @@
|
||||
|
||||
<script lang="ts" setup name="sysEditConfig">
|
||||
import { reactive, ref } from 'vue';
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysConfigApi } from '/@/api-services/api';
|
||||
import { ConfigOutput } from "/@/api-services/models";
|
||||
import { ConfigOutput } from '/@/api-services/models';
|
||||
|
||||
const props = defineProps({
|
||||
title: String,
|
||||
@ -128,12 +128,14 @@ const cancel = () => {
|
||||
|
||||
// 更新默认值
|
||||
const updateDefault = () => {
|
||||
getAPI(SysConfigApi).apiSysConfigUpdateDefaultPost({
|
||||
id: state.ruleForm.id,
|
||||
defaultValue: state.ruleForm.value
|
||||
} as any).then((res: any) => {
|
||||
if (res.data.code == 200) ElMessage.success('更新成功');
|
||||
});
|
||||
getAPI(SysConfigApi)
|
||||
.apiSysConfigUpdateDefaultPost({
|
||||
id: state.ruleForm.id,
|
||||
defaultValue: state.ruleForm.value,
|
||||
} as any)
|
||||
.then((res: any) => {
|
||||
if (res.data.code == 200) ElMessage.success('更新成功');
|
||||
});
|
||||
};
|
||||
|
||||
// 提交
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card shadow="hover" v-loading="state.isLoading">
|
||||
<el-descriptions title="系统信息配置" :column="2" :border="true" size="default">
|
||||
<el-descriptions title="系统信息配置" :column="2" :border="true" >
|
||||
<template #title>
|
||||
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Setting /> </el-icon> 系统信息配置
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user