Kaynağa Gözat

fix(views): 修复表格操作列固定和宽度问题

统一多个视图表格操作列的固定位置和宽度设置
调整部分表格列的宽度和滚动设置
移除不必要的排序属性
tanshanming 6 ay önce
ebeveyn
işleme
ec4f43012d

+ 2 - 1
src/views/course/key_word/index.vue

@@ -54,7 +54,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		}
 	]
 	// // 操作栏通过权限判断是否显示

+ 2 - 1
src/views/course/resource_file_format/index.vue

@@ -50,7 +50,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		}
 	]
 	// // 操作栏通过权限判断是否显示

+ 9 - 14
src/views/courseManagement/components/ListView.vue

@@ -8,6 +8,7 @@
 		:expand-row-by-click="true"
 		:pagination="false"
 		size="small"
+		:scroll="{ x: 1500, y: 300 }"
 	>
 		<template #bodyCell="{ column, text, record }">
 			<template v-if="column.dataIndex === 'publishTime'">{{ formatTimestamp(text) }}</template>
@@ -95,33 +96,27 @@
 	const columns = [
 		{
 			title: '课程名称',
-			dataIndex: 'courseName',
-			sorter: true
+			dataIndex: 'courseName'
 		},
 		{
 			title: '状态',
-			dataIndex: 'putawayStatusName',
-			sorter: true
+			dataIndex: 'putawayStatusName'
 		},
 		{
 			title: '院系',
-			dataIndex: 'collegeTwoIdName',
-			sorter: true
+			dataIndex: 'collegeTwoIdName'
 		},
 		{
 			title: '课程类型',
-			dataIndex: 'courseTypeName',
-			sorter: true
+			dataIndex: 'courseTypeName'
 		},
 		{
 			title: '课时数量',
-			dataIndex: 'hourCount',
-			sorter: true
+			dataIndex: 'hourCount'
 		},
 		{
 			title: '发布时间',
-			dataIndex: 'publishTime',
-			sorter: true
+			dataIndex: 'publishTime'
 		},
 		{
 			title: '开设课程数',
@@ -138,9 +133,9 @@
 		{
 			title: '操作',
 			dataIndex: 'action',
-			sorter: true,
 			width: '290px',
-			align: 'center'
+			align: 'center',
+			fixed: 'right'
 		}
 	]
 	// tool.formatTimestamp()

+ 26 - 13
src/views/courseOpen/components/ListView.vue

@@ -8,6 +8,7 @@
 		:expand-row-by-click="true"
 		:pagination="false"
 		size="small"
+		:scroll="{ x: 1500 }"
 	>
 		<template #bodyCell="{ column, record, text }">
 			<template v-if="column.dataIndex === 'startTime' || column.dataIndex === 'endTime'">
@@ -68,47 +69,58 @@
 	const columns = [
 		{
 			title: '班级',
-			dataIndex: 'room'
+			dataIndex: 'room',
+			width: 120
 		},
 		{
 			title: '班级名称',
-			dataIndex: 'gradesIdName'
+			dataIndex: 'gradesIdName',
+			width: 120
 		},
 		{
 			title: '学期',
-			dataIndex: 'semesterIdName'
+			dataIndex: 'semesterIdName',
+			width: 120
 		},
 		{
 			title: '开始节次',
-			dataIndex: 'startPeriod'
+			dataIndex: 'startPeriod',
+			width: 80
 		},
 		{
 			title: '结束节次',
-			dataIndex: 'endPeriod'
+			dataIndex: 'endPeriod',
+			width: 80
 		},
 		{
 			title: '开始时间',
-			dataIndex: 'startTime'
+			dataIndex: 'startTime',
+			width: 120
 		},
 		{
 			title: '结束时间',
-			dataIndex: 'endTime'
+			dataIndex: 'endTime',
+			width: 120
 		},
 		{
 			title: '上课周期',
-			dataIndex: 'scheduleTimeName'
+			dataIndex: 'scheduleTimeName',
+			width: 120
 		},
 		{
 			title: '单双周',
-			dataIndex: 'weekTypeName'
+			dataIndex: 'weekTypeName',
+			width: 80
 		},
 		{
 			title: '老师',
-			dataIndex: 'teacherIdName'
+			dataIndex: 'teacherIdName',
+			width: 120
 		},
 		{
 			title: '状态',
-			dataIndex: 'statusName'
+			dataIndex: 'statusName',
+			width: 80
 		},
 		// {
 		// 	title: '发布时间',
@@ -119,8 +131,9 @@
 		{
 			title: '操作',
 			dataIndex: 'action',
-			width: '130px',
-			align: 'center'
+			width: 120,
+			align: 'center',
+			fixed: 'right'
 		}
 	]
 	// tool.formatTimestamp()

+ 18 - 9
src/views/forum/postinfo/index.vue

@@ -89,7 +89,8 @@
 	const columns = [
 		{
 			title: '用户',
-			dataIndex: 'userNickName'
+			dataIndex: 'userNickName',
+			width: 120
 		},
 		{
 			title: '帖子标题',
@@ -104,23 +105,28 @@
 		},
 		{
 			title: '状态',
-			dataIndex: 'postStatus'
+			dataIndex: 'postStatus',
+			width: 70
 		},
 		{
 			title: '是否置顶',
-			dataIndex: 'isTop'
+			dataIndex: 'isTop',
+			width: 80
 		},
 		{
 			title: '浏览次数',
-			dataIndex: 'viewCount'
+			dataIndex: 'viewCount',
+			width: 80
 		},
 		{
 			title: '回复次数',
-			dataIndex: 'replyCount'
+			dataIndex: 'replyCount',
+			width: 80
 		},
 		{
 			title: '点赞次数',
-			dataIndex: 'likeCount'
+			dataIndex: 'likeCount',
+			width: 80
 		},
 		{
 			title: '最后回复用户',
@@ -134,11 +140,13 @@
 		},
 		{
 			title: '帖子类型',
-			dataIndex: 'postType'
+			dataIndex: 'postType',
+			width: 80
 		},
 		{
 			title: '定向用户',
-			dataIndex: 'appointUser'
+			dataIndex: 'appointUser',
+			width: 120
 		}
 	]
 
@@ -154,7 +162,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		})
 	}
 	const selectedRowKeys = ref([])

+ 2 - 1
src/views/forum/posttype/index.vue

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

+ 2 - 1
src/views/forum/reportinfo/index.vue

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

+ 2 - 1
src/views/forum/sensitivity/index.vue

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

+ 2 - 1
src/views/forum/sensitivityrecord/index.vue

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

+ 7 - 5
src/views/notice/index.vue

@@ -38,6 +38,7 @@
 			:pagination="pagination"
 			row-key="noticeId"
 			@change="handleTableChange"
+			:scroll="{ x: 1500, y: 300 }"
 		>
 			<template #bodyCell="{ column, record }">
 				<template v-if="column.key === 'platform'">
@@ -177,30 +178,31 @@
 			title: '标题',
 			dataIndex: 'title',
 			key: 'title',
-			ellipsis: true
+			ellipsis: true,
+			width: '100px'
 		},
 		{
 			title: '平台',
 			dataIndex: 'platform',
 			key: 'platform',
-			width: 100
+			width: '50px'
 		},
 		{
 			title: '状态',
 			dataIndex: 'noticeStatus',
 			key: 'noticeStatus',
-			width: 100
+			width: '50px'
 		},
 		{
 			title: '创建时间',
 			dataIndex: 'createTime',
 			key: 'createTime',
-			width: 180
+			width: '100px'
 		},
 		{
 			title: '操作',
 			key: 'action',
-			width: 250,
+			width: '60px',
 			fixed: 'right'
 		}
 	]

+ 2 - 1
src/views/semester/index.vue

@@ -62,7 +62,8 @@
 			title: '操作',
 			dataIndex: 'action',
 			align: 'center',
-			width: '150px'
+			width: '150px',
+			fixed: 'right'
 		}
 	]
 	// 操作栏通过权限判断是否显示