Forráskód Böngészése

feat: 统一表格操作列样式并优化布局

- 为多个表格的操作列添加fixed:right属性保持右侧固定
- 调整用户管理页面搜索表单的列宽比例
- 为树形控件添加block-node属性确保节点占满宽度
- 为按钮添加统一圆角样式
- 在组织表单中添加parentId必填校验
tanshanming 6 hónapja
szülő
commit
998049e4e4

+ 4 - 0
src/style/default.less

@@ -396,3 +396,7 @@
   --title-text-color: fade(@white, 85%);
   --border-color: var(--border-color-split);
 }
+
+.ant-btn{
+  border-radius: 4px;
+}

+ 2 - 1
src/views/dev/message/index.vue

@@ -83,7 +83,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		}
 	]
 	const selectedRowKeys = ref([])

+ 2 - 1
src/views/sys/org/form.vue

@@ -157,7 +157,8 @@
 	const formRules = {
 		name: [required('请输入组织名称')],
 		category: [required('请选择组织分类')],
-		sortCode: [required('请选择排序')]
+		sortCode: [required('请选择排序')],
+		parentId: [required('请选择上级组织')]
 	}
 	// 机构分类字典
 	const orgCategoryOptions = tool.dictList('ORG_CATEGORY')

+ 5 - 2
src/views/sys/org/index.vue

@@ -8,6 +8,7 @@
 					:tree-data="treeData"
 					:field-names="treeFieldNames"
 					@select="treeSelect"
+					:block-node="true"
 				/>
 				<a-empty v-else :image="Empty.PRESENTED_IMAGE_SIMPLE" />
 			</a-card>
@@ -86,7 +87,8 @@
 		},
 		{
 			title: '分类',
-			dataIndex: 'category'
+			dataIndex: 'category',
+			width: 100
 		},
 		{
 			title: '排序',
@@ -97,7 +99,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		}
 	]
 	const selectedRowKeys = ref([])

+ 3 - 1
src/views/sys/position/index.vue

@@ -8,6 +8,7 @@
 					:tree-data="treeData"
 					:field-names="treeFieldNames"
 					@select="treeSelect"
+					:block-node="true"
 				>
 				</a-tree>
 				<a-empty v-else :image="Empty.PRESENTED_IMAGE_SIMPLE" />
@@ -99,7 +100,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		}
 	]
 	const selectedRowKeys = ref([])

+ 1 - 0
src/views/sys/resource/menu/index.vue

@@ -171,6 +171,7 @@
 			title: '操作',
 			dataIndex: 'action',
 			width: '200px',
+			fixed: 'right',
 			scopedSlots: { customRender: 'action' }
 		}
 	]

+ 2 - 1
src/views/sys/resource/module/index.vue

@@ -86,7 +86,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '200px'
+			width: '200px',
+			fixed: 'right'
 		}
 	]
 	let selectedRowKeys = ref([])

+ 5 - 2
src/views/sys/role/index.vue

@@ -8,6 +8,7 @@
 					:tree-data="treeData"
 					:field-names="treeFieldNames"
 					@select="treeSelect"
+					:block-node="true"
 				>
 				</a-tree>
 				<a-empty v-else :image="Empty.PRESENTED_IMAGE_SIMPLE" />
@@ -129,7 +130,8 @@
 		},
 		{
 			title: '分类',
-			dataIndex: 'category'
+			dataIndex: 'category',
+			width: 100
 		},
 		{
 			title: '排序',
@@ -140,7 +142,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '200px'
+			width: 100,
+			fixed: 'right'
 		}
 	]
 	const selectedRowKeys = ref([])

+ 6 - 4
src/views/sys/user/index.vue

@@ -8,6 +8,7 @@
 					:tree-data="treeData"
 					:field-names="treeFieldNames"
 					@select="treeSelect"
+					:block-node="true"
 				>
 				</a-tree>
 				<a-empty v-else :image="Empty.PRESENTED_IMAGE_SIMPLE" />
@@ -17,7 +18,7 @@
 			<a-card :bordered="false" style="margin-bottom: 10px">
 				<a-form ref="searchFormRef" name="advanced_search" class="ant-advanced-search-form" :model="searchFormState">
 					<a-row :gutter="24">
-						<a-col :span="4">
+						<a-col :span="5">
 							<a-form-item name="searchKey" :label="$t('common.searchKey')">
 								<a-input
 									v-model:value="searchFormState.searchKey"
@@ -25,12 +26,12 @@
 								/>
 							</a-form-item>
 						</a-col>
-						<a-col :span="4">
+						<a-col :span="5">
 							<a-form-item name="searchKey" :label="$t('common.StudentID')">
 								<a-input v-model:value="searchFormState.studentNum" :placeholder="$t('user.placeholderStudentID')" />
 							</a-form-item>
 						</a-col>
-						<a-col :span="4">
+						<a-col :span="6">
 							<a-form-item name="userStatus" :label="$t('user.userStatus')">
 								<a-select v-model:value="searchFormState.userStatus" :placeholder="$t('user.placeholderUserStatus')">
 									<a-select-option v-for="item in statusData" :key="item.value" :value="item.value">{{
@@ -217,7 +218,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '220px'
+			width: '170px',
+			fixed: 'right'
 		}
 	]
 	const statusData = tool.dictList('COMMON_STATUS')