Bläddra i källkod

1、字段设为允许为空
2、优化操作界面

yzp 2 år sedan
förälder
incheckning
79c1794649

+ 4 - 4
Admin.NET/Admin.NET.Core/Entity/SysDictData.cs

@@ -45,21 +45,21 @@ public class SysDictData : EntityBase
     /// <summary>
     /// 标签颜色
     /// </summary>
-    [SugarColumn(ColumnDescription = "标签颜色", Length = 12)]
+    [SugarColumn(ColumnDescription = "标签颜色", Length = 12, IsNullable = true)]
     [MaxLength(12)]
     public string TagType { get; set; }
 
     /// <summary>
     /// Style(允许在字典中直接控制显示样式)
     /// </summary>
-    [SugarColumn(ColumnDescription = "Style", Length = 512)]
+    [SugarColumn(ColumnDescription = "Style", Length = 512, IsNullable = true)]
     [MaxLength(512)]
     public string StyleSetting { get; set; }
 
     /// <summary>
     /// Class(允许在字典中直接控制显示样式)
     /// </summary>
-    [SugarColumn(ColumnDescription = "Class", Length = 512)]
+    [SugarColumn(ColumnDescription = "Class", Length = 512, IsNullable = true)]
     [MaxLength(512)]
     public string ClassSetting { get; set; }
 
@@ -79,7 +79,7 @@ public class SysDictData : EntityBase
     /// <summary>
     /// 拓展数据(可用于保存一些业务功能的配置项)
     /// </summary>
-    [SugarColumn(ColumnDescription = "拓展数据(可用于保存一些业务功能的配置项)", ColumnDataType = SqlSugar.StaticConfig.CodeFirst_BigString)]
+    [SugarColumn(ColumnDescription = "拓展数据(可用于保存一些业务功能的配置项)", IsNullable = true, ColumnDataType = SqlSugar.StaticConfig.CodeFirst_BigString)]
     public string ExtData { get; set; }
 
     /// <summary>

+ 1 - 1
Admin.NET/Admin.NET.Core/Entity/SysOrg.cs

@@ -52,7 +52,7 @@ public class SysOrg : EntityTenant
     /// <summary>
     /// 负责人Id
     /// </summary>
-    [SugarColumn(ColumnDescription = "负责人Id")]
+    [SugarColumn(ColumnDescription = "负责人Id", IsNullable = true)]
     public long? DirectorId { get; set; }
 
     /// <summary>

+ 6 - 1
Web/src/views/system/dict/component/dictDataDialog.vue

@@ -45,7 +45,12 @@
 					<el-table-column prop="orderNo" label="排序" width="70" align="center" show-overflow-tooltip />
 					<el-table-column prop="createTime" label="修改时间" width="120" align="center" show-overflow-tooltip />
 					<el-table-column prop="remark" label="备注" header-align="center" show-overflow-tooltip />
-					<el-table-column prop="extData" label="拓展数据" header-align="center" show-overflow-tooltip />
+					<el-table-column prop="extData" label="拓展数据" width="90" header-align="center">
+						<template #default="scope">
+							<el-tag type="warning" v-if="scope.row.extData == null || scope.row.extData == ''">空</el-tag>
+							<el-tag type="success" v-else>有值</el-tag>
+						</template>
+					</el-table-column>
 					<el-table-column label="操作" width="140" fixed="right" align="center" show-overflow-tooltip>
 						<template #default="scope">
 							<el-button icon="ele-Edit" size="small" text type="primary" @click="openEditDictData(scope.row)"> 编辑 </el-button>