瀏覽代碼

fix: 修复多个视图中的字段和逻辑问题

- 修正课程专业视图中学院字段的dataIndex
- 移除学期视图中的季度字段
- 更新用户视图中学生ID的字段名
- 仅在教育身份为2时显示学号字段
- 为消息列表和详情添加时间格式化处理
- 禁止删除内置角色
tanshanming 6 月之前
父節點
當前提交
412523b219

+ 1 - 1
src/views/course/major/index.vue

@@ -53,7 +53,7 @@
 		},
 		{
 			title: '学院',
-			dataIndex: 'majorName'
+			dataIndex: 'collegeName'
 		},
 		{
 			title: '创建时间',

+ 5 - 0
src/views/index/components/miniMessage.vue

@@ -58,6 +58,7 @@
 	import indexApi from '@/api/sys/indexApi'
 	import { onMounted } from 'vue'
 	import router from '@/router'
+	import dayjs from 'dayjs'
 	const miniMessageLoading = ref(false)
 	const messageList = ref([])
 	const miniMessageBodyStyle = ref({
@@ -73,6 +74,10 @@
 		indexApi
 			.indexMessageList()
 			.then((data) => {
+				// 处理时间
+				data.forEach((item) => {
+					item.createTime = dayjs(item.createTime).format('YYYY-MM-DD HH:mm:ss')
+				})
 				messageList.value = data
 			})
 			.finally(() => {

+ 0 - 4
src/views/semester/index.vue

@@ -46,10 +46,6 @@
 			title: '年度',
 			dataIndex: 'mulityear'
 		},
-		{
-			title: '季度',
-			dataIndex: 'quater'
-		},
 		{
 			title: '开始时间',
 			dataIndex: 'startTime'

+ 6 - 3
src/views/sys/role/index.vue

@@ -50,7 +50,10 @@
 				>
 					<template #operator class="table-operator">
 						<a-space>
-							<a-button type="primary" @click="formRef.onOpen(undefined, searchFormState.category, searchFormState.orgId)">
+							<a-button
+								type="primary"
+								@click="formRef.onOpen(undefined, searchFormState.category, searchFormState.orgId)"
+							>
 								<template #icon><plus-outlined /></template>
 								新增角色
 							</a-button>
@@ -64,8 +67,8 @@
 						<template v-if="column.dataIndex === 'action'">
 							<a @click="formRef.onOpen(record)">编辑</a>
 							<a-divider type="vertical" />
-							<a-popconfirm title="确定删除此角色?" @confirm="removeOrg(record)">
-								<a-button type="link" danger size="small">删除</a-button>
+							<a-popconfirm title="确定删除此角色?" :disabled="record.isBuiltin === '1'" @confirm="removeOrg(record)">
+								<a-button type="link" danger :disabled="record.isBuiltin === '1'" size="small">删除</a-button>
 							</a-popconfirm>
 							<a-divider type="vertical" />
 							<a-dropdown>

+ 1 - 1
src/views/sys/user/form.vue

@@ -52,7 +52,7 @@
 								<a-date-picker v-model:value="formData.birthday" value-format="YYYY-MM-DD" style="width: 100%" />
 							</a-form-item>
 						</a-col>
-						<a-col :span="12">
+						<a-col :span="12" v-if="formData.eduIdentity === '2'">
 							<a-form-item label="学号:" name="studentNum">
 								<a-input v-model:value="formData.studentNum" placeholder="请输入学号" allow-clear />
 							</a-form-item>

+ 1 - 1
src/views/sys/user/index.vue

@@ -27,7 +27,7 @@
 							</a-form-item>
 						</a-col>
 						<a-col :span="5">
-							<a-form-item name="searchKey" :label="$t('common.StudentID')">
+							<a-form-item name="studentNum" :label="$t('common.StudentID')">
 								<a-input v-model:value="searchFormState.studentNum" :placeholder="$t('user.placeholderStudentID')" />
 							</a-form-item>
 						</a-col>

+ 3 - 0
src/views/sys/user/userTab/userMessage/detail.vue

@@ -32,6 +32,7 @@
 
 <script setup name="messageDetail">
 	import userCenterApi from '@/api/sys/userCenterApi'
+	import dayjs from 'dayjs'
 	const emits = defineEmits(['refresh'])
 	const receiveInfoList = ref([])
 
@@ -64,6 +65,8 @@
 		}
 		userCenterApi.userLoginUnreadMessageDetail(param).then((data) => {
 			Object.assign(record, data)
+			// 处理时间
+			record.createTime = dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss')
 			formData.value = record
 			receiveInfoList.value = data.receiveInfoList
 			table.value.refresh(true)