Procházet zdrojové kódy

fix: 修复参数配置分页排序失效,优化参数配置界面,更好地显示长值

许俊杰 před 3 roky
rodič
revize
5dee1a8fad

+ 1 - 1
Admin.NET/Admin.NET.Core/Service/Config/SysConfigService.cs

@@ -28,7 +28,7 @@ public class SysConfigService : IDynamicApiController, ITransient
             .WhereIF(!string.IsNullOrWhiteSpace(input.Name?.Trim()), u => u.Name.Contains(input.Name))
             .WhereIF(!string.IsNullOrWhiteSpace(input.Code?.Trim()), u => u.Code.Contains(input.Code))
             .WhereIF(!string.IsNullOrWhiteSpace(input.GroupCode?.Trim()), u => u.GroupCode.Equals(input.GroupCode))
-            .OrderBy(u => u.OrderNo).ToPagedListAsync(input.Page, input.PageSize);
+            .OrderBuilder(input).ToPagedListAsync(input.Page, input.PageSize);
     }
 
     /// <summary>

+ 2 - 2
Web/src/views/system/config/component/editConfig.vue

@@ -19,7 +19,7 @@
 							<el-input v-model="state.ruleForm.code" placeholder="配置编码" clearable :disabled="state.ruleForm.sysFlag == 1" />
 						</el-form-item>
 					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 						<el-form-item label="值" prop="value" :rules="[{ required: true, message: '值不能为空', trigger: 'blur' }]">
 							<el-select v-model="state.ruleForm.value" placeholder="值" clearable filterable allow-create default-first-option style="width: 100%">
 								<el-option label="True" value="True" />
@@ -27,7 +27,7 @@
 							</el-select>
 						</el-form-item>
 					</el-col>
-					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20">
 						<el-form-item label="内置参数" prop="sysFlag" :rules="[{ required: true, message: '内置参数不能为空', trigger: 'blur' }]">
 							<el-radio-group v-model="state.ruleForm.sysFlag" :disabled="state.ruleForm.sysFlag == 1 && state.ruleForm.id != undefined">
 								<el-radio :label="1">是</el-radio>

+ 7 - 7
Web/src/views/system/config/index.vue

@@ -51,14 +51,14 @@ const tb = reactive<TableDemoState>({
 	tableData: {
 		// 表头内容(必传,注意格式)
 		columns: [
-			{ prop: 'name', width: 160, label: '配置名称', align: 'center', sortable: 'custom', isCheck: true, hideCheck: true },
-			{ prop: 'code', width: 120, label: '配置编码', align: 'center', toolTip: true, sortable: 'custom', isCheck: true },
-			{ prop: 'value', width: 120, label: '属性值', align: 'center', sortable: 'custom', isCheck: true },
-			{ prop: 'sysFlag', width: 120, label: '内置参数', align: 'center', sortable: 'custom', isCheck: true },
-			{ prop: 'groupCode', width: 120, label: '分组编码', align: 'center', sortable: 'custom', isCheck: true },
+			{ prop: 'name', width: 200, label: '配置名称', align: 'left', sortable: 'custom', isCheck: true, hideCheck: true },
+			{ prop: 'code', width: 200, label: '配置编码', align: 'left', toolTip: true, sortable: 'custom', isCheck: true },
+			{ prop: 'value', width: 200, label: '属性值', align: 'left', isCheck: true },
+			{ prop: 'sysFlag', width: 100, label: '内置参数', align: 'center', isCheck: true },
+			{ prop: 'groupCode', width: 110, label: '分组编码', align: 'center', sortable: 'custom', isCheck: true },
 			{ prop: 'orderNo', width: 80, label: '排序', align: 'center', sortable: 'custom', isCheck: true },
-			{ prop: 'remark', label: '备注', align: '', headerAlign: 'center', sortable: 'custom', showOverflowTooltip: true, isCheck: true },
-			{ prop: 'action', width: 150, label: '操作', type: 'action', align: 'center', isCheck: true, fixed: 'right', hideCheck: true },
+			{ prop: 'remark', label: '备注', align: '', headerAlign: 'center', showOverflowTooltip: true, isCheck: true },
+			{ prop: 'action', width: 120, label: '操作', type: 'action', align: 'center', isCheck: true, fixed: 'right', hideCheck: true },
 		],
 		// 配置项(必传)
 		config: {