kllay hai 1 semana
pai
achega
443b0b9941

+ 47 - 0
src/views/system/allusers/api.ts

@@ -0,0 +1,47 @@
+import { AddReq, UserPageQuery } from '@fast-crud/fast-crud';
+import { request } from '/@/utils/service';
+
+export const apiPrefix = '/api/system/app_user/';
+export function GetList(query: UserPageQuery) {
+	return request({
+		url: apiPrefix,
+		method: 'get',
+		params: query,
+	});
+}
+export function GetObj(id: InfoReq) {
+	return request({
+		url: apiPrefix + id+ '/',
+		method: 'get',
+	});
+}
+
+export function AddObj(obj: AddReq) {
+	return request({
+		url: apiPrefix,
+		method: 'post',
+		data: obj,
+	});
+}
+
+// export function UpdateObj(obj: EditReq) {
+// 	return request({
+// 		url: apiPrefix + obj.id + '/',
+// 		method: 'put',
+// 		data: obj,
+// 	});
+// }
+
+// export function DelObj(id: DelReq) {
+// 	return request({
+// 		url: apiPrefix + id + '/',
+// 		method: 'delete',
+// 		data: { id },
+// 	});
+// }
+export function GetPermission() {
+    return request({
+        url: apiPrefix,
+        method: 'get',
+    });
+}

+ 233 - 0
src/views/system/allusers/crud.tsx

@@ -0,0 +1,233 @@
+import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, dict, UserPageQuery } from '@fast-crud/fast-crud';
+import * as api from './api';
+import { auth } from '/@/utils/authFunction';
+
+export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
+	const pageRequest = async (query: UserPageQuery) => {
+		return await api.GetList(query);
+	};
+
+		const getDetail = async ({ row }: InfoReq) => {
+		return await api.GetObj(row.id);
+	};
+
+	// const editRequest = async ({ form, row }: EditReq) => {
+	// 	form.id = row.id;
+	// 	return await api.UpdateObj(form);
+	// };
+	// const delRequest = async ({ row }: DelReq) => {
+	// 	return await api.DelObj(row.id);
+	// };
+	const addRequest = async ({ form }: AddReq) => {
+		return await api.AddObj(form);
+	};
+
+	/**
+	 * 懒加载
+	 * @param row
+	 * @returns {Promise<unknown>}
+	 */
+	// const loadContentMethod = (tree: any, treeNode: any, resolve: Function) => {
+	// 	pageRequest({ pcode: tree.code }).then((res: APIResponseData) => {
+	// 		resolve(res.data);
+	// 	});
+	// };
+
+	return {
+		crudOptions: {
+			request: {
+				pageRequest,
+				addRequest,
+				getDetail,
+			},
+			actionbar: {
+				buttons: {
+					add: {
+						show: auth('area:Create'),
+					},
+				},
+			},
+			pagination: {
+				show: false,
+			},		
+			columns: {
+				_index: {
+					title: '序号',
+					form: { show: false },
+					column: {
+						type: 'index',
+						align: 'center',
+						width: '70px',
+						columnSetDisabled: true, //禁止在列设置中选择
+					},
+				},
+				user_code:{
+					title:'学号',
+					type:'input',
+					column: {
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写学号' },
+						rules: [{ required: true, message: '请填写学号' }],
+					},
+				},
+				username:{
+					title:'昵称',
+					type:'input',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写昵称' },
+						rules: [{ required: true, message: '请填写昵称' }],
+					},
+				},
+				name: {
+					title: '名称',
+					search: {
+						show: true,
+					},
+					treeNode: true,
+					type: 'input',
+					column: {
+						minWidth: 120,
+					},
+					form: {
+						rules: [
+							// 表单校验规则
+							{ required: true, message: '名称必填项' },
+						],
+						component: {
+							placeholder: '请输入名称',
+						},
+					},
+				},
+				password:{
+					title: '密码',
+					type: 'input',
+					column: {
+						minWidth: 120,
+						show: false,
+					},
+					form: {
+						component: { placeholder: '请填写密码' },
+						rules: [{ required: true, message: '请填写密码' }],
+					},
+				},
+				email:{
+					title: '邮箱',
+					type: 'input',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写邮箱' },
+						rules: [{ required: false, message: '请填写邮箱' }],
+					},
+				},
+				mobile:{
+					title: '手机号',
+					type: 'input',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写手机号' },
+						rules: [{ required: true, message: '请填写手机号' }],
+					},
+				},
+				gender:{
+					title: '性别',
+					type: 'dict-select',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					dict: dict({
+						data: [
+							{ label: '男', value: 1 },
+							{ label: '女', value: 2 },
+						],
+					}),
+					form: {
+						component: { placeholder: '请选择性别' },
+						rules: [{ required: true, message: '请选择性别' }],
+					},
+				},
+				user_type:{
+					title: '用户类型',
+					type: 'dict-select',
+					column: {
+						minWidth: 120,
+					},
+					dict: dict({
+						data: [
+							{ label: '学生', value: 0 },
+							{ label: '教师', value: 1 },
+							{ label: '校外团体', value: 2 },
+						],
+					}),
+					form: {
+						component: { placeholder: '请填写租户' },
+						rules: [{ required: false, message: '请填写租户' }],
+					},
+				},
+				organization:{
+					title: '学院',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写学院' },
+						rules: [{ required: false, message: '请填写学院' }],
+					},
+				},
+				sub_organization:{
+					title: '专业',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写专业' },
+						rules: [{ required: false, message: '请填写专业' }],
+					},
+				},
+				grade_or_level:{
+					title: '年级',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写年级' },
+						rules: [{ required: false, message: '请填写年级' }],
+					},
+				},
+				class_or_group:{
+					title: '班级',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写班级' },
+						rules: [{ required: false, message: '请填写班级' }],
+					},
+				},
+
+
+
+			},
+		},
+	};
+};

+ 25 - 0
src/views/system/allusers/index.vue

@@ -0,0 +1,25 @@
+<template>
+	<fs-page>
+		<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
+	</fs-page>
+</template>
+
+<script lang="ts" setup name="allusers">
+import { useFs } from '@fast-crud/fast-crud';
+import { onMounted } from 'vue';
+import { GetPermission } from './api';
+import { createCrudOptions } from './crud';
+import { handleColumnPermission } from '/@/utils/columnPermission';
+
+const { crudBinding, crudRef, crudExpose, crudOptions, resetCrudOptions } = useFs({ createCrudOptions });
+
+// 页面打开后获取列表数据
+onMounted(async () => {
+	// 设置列权限
+	const newOptions = await handleColumnPermission(GetPermission, crudOptions);
+	//重置crudBinding
+	resetCrudOptions(newOptions);
+	// 刷新
+	crudExpose.doRefresh();
+});
+</script>

+ 1 - 1
src/views/system/studentInfo/api.ts

@@ -4,7 +4,7 @@ import { request } from '/@/utils/service';
 export const apiPrefix = '/api/system/app_user/';
 export function GetList(query: UserPageQuery) {
 	return request({
-		url: apiPrefix,
+		url: apiPrefix+'?user_type=0',
 		method: 'get',
 		params: query,
 	});

+ 47 - 0
src/views/system/teacherInfor/api.ts

@@ -0,0 +1,47 @@
+import { AddReq, UserPageQuery } from '@fast-crud/fast-crud';
+import { request } from '/@/utils/service';
+
+export const apiPrefix = '/api/system/app_user/';
+export function GetList(query: UserPageQuery) {
+	return request({
+		url: apiPrefix+'?user_type=1',
+		method: 'get',
+		params: query,
+	});
+}
+export function GetObj(id: InfoReq) {
+	return request({
+		url: apiPrefix + id+ '/',
+		method: 'get',
+	});
+}
+
+export function AddObj(obj: AddReq) {
+	return request({
+		url: apiPrefix,
+		method: 'post',
+		data: obj,
+	});
+}
+
+// export function UpdateObj(obj: EditReq) {
+// 	return request({
+// 		url: apiPrefix + obj.id + '/',
+// 		method: 'put',
+// 		data: obj,
+// 	});
+// }
+
+// export function DelObj(id: DelReq) {
+// 	return request({
+// 		url: apiPrefix + id + '/',
+// 		method: 'delete',
+// 		data: { id },
+// 	});
+// }
+export function GetPermission() {
+    return request({
+        url: apiPrefix,
+        method: 'get',
+    });
+}

+ 233 - 0
src/views/system/teacherInfor/crud.tsx

@@ -0,0 +1,233 @@
+import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, dict, UserPageQuery } from '@fast-crud/fast-crud';
+import * as api from './api';
+import { auth } from '/@/utils/authFunction';
+
+export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
+	const pageRequest = async (query: UserPageQuery) => {
+		return await api.GetList(query);
+	};
+
+		const getDetail = async ({ row }: InfoReq) => {
+		return await api.GetObj(row.id);
+	};
+
+	// const editRequest = async ({ form, row }: EditReq) => {
+	// 	form.id = row.id;
+	// 	return await api.UpdateObj(form);
+	// };
+	// const delRequest = async ({ row }: DelReq) => {
+	// 	return await api.DelObj(row.id);
+	// };
+	const addRequest = async ({ form }: AddReq) => {
+		return await api.AddObj(form);
+	};
+
+	/**
+	 * 懒加载
+	 * @param row
+	 * @returns {Promise<unknown>}
+	 */
+	// const loadContentMethod = (tree: any, treeNode: any, resolve: Function) => {
+	// 	pageRequest({ pcode: tree.code }).then((res: APIResponseData) => {
+	// 		resolve(res.data);
+	// 	});
+	// };
+
+	return {
+		crudOptions: {
+			request: {
+				pageRequest,
+				addRequest,
+				getDetail,
+			},
+			actionbar: {
+				buttons: {
+					add: {
+						show: auth('area:Create'),
+					},
+				},
+			},
+			pagination: {
+				show: false,
+			},		
+			columns: {
+				_index: {
+					title: '序号',
+					form: { show: false },
+					column: {
+						type: 'index',
+						align: 'center',
+						width: '70px',
+						columnSetDisabled: true, //禁止在列设置中选择
+					},
+				},
+				user_code:{
+					title:'学号',
+					type:'input',
+					column: {
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写学号' },
+						rules: [{ required: true, message: '请填写学号' }],
+					},
+				},
+				username:{
+					title:'昵称',
+					type:'input',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写昵称' },
+						rules: [{ required: true, message: '请填写昵称' }],
+					},
+				},
+				name: {
+					title: '名称',
+					search: {
+						show: true,
+					},
+					treeNode: true,
+					type: 'input',
+					column: {
+						minWidth: 120,
+					},
+					form: {
+						rules: [
+							// 表单校验规则
+							{ required: true, message: '名称必填项' },
+						],
+						component: {
+							placeholder: '请输入名称',
+						},
+					},
+				},
+				password:{
+					title: '密码',
+					type: 'input',
+					column: {
+						minWidth: 120,
+						show: false,
+					},
+					form: {
+						component: { placeholder: '请填写密码' },
+						rules: [{ required: true, message: '请填写密码' }],
+					},
+				},
+				email:{
+					title: '邮箱',
+					type: 'input',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写邮箱' },
+						rules: [{ required: false, message: '请填写邮箱' }],
+					},
+				},
+				mobile:{
+					title: '手机号',
+					type: 'input',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写手机号' },
+						rules: [{ required: true, message: '请填写手机号' }],
+					},
+				},
+				gender:{
+					title: '性别',
+					type: 'dict-select',
+					column: {
+						show: false,
+						minWidth: 120,
+					},
+					dict: dict({
+						data: [
+							{ label: '男', value: 1 },
+							{ label: '女', value: 2 },
+						],
+					}),
+					form: {
+						component: { placeholder: '请选择性别' },
+						rules: [{ required: true, message: '请选择性别' }],
+					},
+				},
+				user_type:{
+					title: '用户类型',
+					type: 'dict-select',
+					column: {
+						minWidth: 120,
+					},
+					dict: dict({
+						data: [
+							{ label: '学生', value: 0 },
+							{ label: '教师', value: 1 },
+							{ label: '校外团体', value: 2 },
+						],
+					}),
+					form: {
+						component: { placeholder: '请填写租户' },
+						rules: [{ required: false, message: '请填写租户' }],
+					},
+				},
+				organization:{
+					title: '学院',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写学院' },
+						rules: [{ required: false, message: '请填写学院' }],
+					},
+				},
+				sub_organization:{
+					title: '专业',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写专业' },
+						rules: [{ required: false, message: '请填写专业' }],
+					},
+				},
+				grade_or_level:{
+					title: '年级',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写年级' },
+						rules: [{ required: false, message: '请填写年级' }],
+					},
+				},
+				class_or_group:{
+					title: '班级',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写班级' },
+						rules: [{ required: false, message: '请填写班级' }],
+					},
+				},
+
+
+
+			},
+		},
+	};
+};

+ 25 - 0
src/views/system/teacherInfor/index.vue

@@ -0,0 +1,25 @@
+<template>
+	<fs-page>
+		<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
+	</fs-page>
+</template>
+
+<script lang="ts" setup name="teacherInfor">
+import { useFs } from '@fast-crud/fast-crud';
+import { onMounted } from 'vue';
+import { GetPermission } from './api';
+import { createCrudOptions } from './crud';
+import { handleColumnPermission } from '/@/utils/columnPermission';
+
+const { crudBinding, crudRef, crudExpose, crudOptions, resetCrudOptions } = useFs({ createCrudOptions });
+
+// 页面打开后获取列表数据
+onMounted(async () => {
+	// 设置列权限
+	const newOptions = await handleColumnPermission(GetPermission, crudOptions);
+	//重置crudBinding
+	resetCrudOptions(newOptions);
+	// 刷新
+	crudExpose.doRefresh();
+});
+</script>

+ 72 - 0
src/views/system/timetablemanage/api.ts

@@ -0,0 +1,72 @@
+import { AddReq, UserPageQuery } from '@fast-crud/fast-crud';
+import { request } from '/@/utils/service';
+
+export const apiPrefix = '/api/system/manageclass/';
+export function GetList(query: UserPageQuery) {
+	return request({
+		url: apiPrefix+'?user_type=1',
+		method: 'get',
+		params: query,
+	});
+}
+export function GetObj(id: InfoReq) {
+	return request({
+		url: apiPrefix + id+ '/',
+		method: 'get',
+	});
+}
+
+export function AddObj(obj: AddReq) {
+	return request({
+		url: apiPrefix,
+		method: 'post',
+		data: obj,
+	});
+}
+
+// export function UpdateObj(obj: EditReq) {
+// 	return request({
+// 		url: apiPrefix + obj.id + '/',
+// 		method: 'put',
+// 		data: obj,
+// 	});
+// }
+
+// export function DelObj(id: DelReq) {
+// 	return request({
+// 		url: apiPrefix + id + '/',
+// 		method: 'delete',
+// 		data: { id },
+// 	});
+// }
+export function GetPermission() {
+    return request({
+        url: apiPrefix,
+        method: 'get',
+    });
+}
+
+
+export function getScheduleData(weekNum: number): Promise<any[]> {
+	// 模拟请求课程数据,根据 weekNum 返回当前周数据
+	return new Promise((resolve) => {
+	const data = Array.from({ length: 5 }, (_, rowIndex) => {
+	return {
+		id: rowIndex,
+		day1: `课程 A-${weekNum}`,
+		day2: `课程 B-${weekNum}`,
+		day3: `课程 C-${weekNum}`,
+		day4: `课程 D-${weekNum}`,
+		day5: `课程 E-${weekNum}`
+		}
+	})
+	setTimeout(() => resolve(data), 500)
+	})
+  }
+  
+  export function saveCourse(data: any) {
+	// 保存课程(模拟)
+	// console.log('保存成功', data)
+	return Promise.resolve({ success: true })
+}
+  

+ 172 - 0
src/views/system/timetablemanage/crud.tsx

@@ -0,0 +1,172 @@
+import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, UserPageQuery } from '@fast-crud/fast-crud';
+import * as api from './api';
+
+export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
+	const pageRequest = async (query: UserPageQuery) => {
+		return await api.GetList(query);
+	};
+
+		const getDetail = async ({ row }: InfoReq) => {
+		return await api.GetObj(row.id);
+	};
+
+	
+	// const savekebiao = async ({ form }) => {
+    //     await api.saveCourse(form)
+    //     return { success: true }
+    //   };
+
+	// const editRequest = async ({ form, row }: EditReq) => {
+	// 	form.id = row.id;
+	// 	return await api.UpdateObj(form);
+	// };
+	// const delRequest = async ({ row }: DelReq) => {
+	// 	return await api.DelObj(row.id);
+	// };
+	const addRequest = async ({ form }: AddReq) => {
+		return await api.AddObj(form);
+	};
+
+	let a="test";
+
+	/**
+	 * 懒加载
+	 * @param row
+	 * @returns {Promise<unknown>}
+	 */
+	// const loadContentMethod = (tree: any, treeNode: any, resolve: Function) => {
+	// 	pageRequest({ pcode: tree.code }).then((res: APIResponseData) => {
+	// 		resolve(res.data);
+	// 	});
+	// };
+
+	return {
+		crudOptions: {
+			request: {
+				pageRequest,
+				addRequest,
+				getDetail,
+			},
+			search:{
+				show: false,
+			},
+			toolbar:{
+				show: false,
+			},
+			rowHandle:{
+				show: false,
+			},
+			// table:{
+			// 	show:false,
+			// },
+			actionbar: {
+				show:false,
+				buttons: {
+					add: {
+						show:false,
+						// show: auth('area:Create'),
+					},
+				},
+			},
+			pagination: {
+				show: false,
+			},		
+			columns: {
+				// _index: {
+				// 	title: '序号',
+				// 	form: { show: false },
+				// 	column: {
+				// 		type: 'index',
+				// 		align: 'center',
+				// 		width: '70px',
+				// 		columnSetDisabled: true, //禁止在列设置中选择
+				// 	},
+				// },
+				classroom:{
+					title:'教室',
+					type:'input',
+					column: {
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写教室' },
+						rules: [{ required: true, message: '请填写教室' }],
+					},
+				},
+				teacher_name:{
+					title:'教师名字'+a,
+					type:'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写教师名字' },
+						rules: [{ required: true, message: '请填写教师名字' }],
+					},
+				},
+				datetime_label: {
+					title: '星期',
+					search: {
+						show: true,
+					},
+					treeNode: true,
+					type: 'input',
+					column: {
+						minWidth: 120,
+					},
+					form: {
+						rules: [
+							// 表单校验规则
+							{ required: true, message: '名称必填项' },
+						],
+						component: {
+							placeholder: '请输入名称',
+						},
+					},
+				},
+				time_label:{
+					title: '上下午',
+					type: 'input',
+					column: {
+						minWidth: 120,
+						show: true,
+					},
+					form: {
+						component: { placeholder: '请填写密码' },
+						rules: [{ required: true, message: '请填写密码' }],
+					},
+				},
+				semester_label:{
+					title: '学期',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写邮箱' },
+						rules: [{ required: false, message: '请填写邮箱' }],
+					},
+				},
+				classdetail:{
+					title: '课程名称',
+					type: 'input',
+					column: {
+						show: true,
+						minWidth: 120,
+					},
+					form: {
+						component: { placeholder: '请填写手机号' },
+						rules: [{ required: true, message: '请填写手机号' }],
+					},
+				},
+				
+				
+
+
+
+			},
+		},
+	};
+};

+ 147 - 0
src/views/system/timetablemanage/index.vue

@@ -0,0 +1,147 @@
+<template>
+	<fs-page>
+	
+		<div class="schedule-wrapper">
+			<div class="header">
+				<div class="header-bar">
+				<el-button type="primary" icon="el-icon-arrow-left" @click="prevWeek" circle ><</el-button>
+				<span class="week-display">{{ displayWeek }} 周</span>
+				<el-button type="primary" icon="el-icon-arrow-right" @click="nextWeek" circle
+							:disabled="currentWeek + weekOffset >= totalWeeks" >></el-button>
+				</div>
+			</div>
+
+				<el-table
+				:data="scheduleData"
+				style="width: 100%; background-color: white"
+				:header-cell-style="headerStyle"
+				>
+				<!-- 节次列 -->
+				<el-table-column label="节次" width="80">
+					<template #default="scope">
+					<!-- {{ getPeriodLabel(scope.$index) }} -->
+					</template>
+				</el-table-column>
+
+				<!-- 时间段列 -->
+				<el-table-column label="时间" width="140">
+					<template #default="scope">
+					<!-- {{ getTimeSlot(scope.$index) }} -->
+					</template>
+				</el-table-column>
+
+				<!-- 周一至周日列 -->
+				<el-table-column
+					v-for="(day, index) in weekDates"
+					:key="index"
+					:label="day"
+					min-width="120">
+					<template #default="scope">
+					{{ getSchedule(scope.row, index) }}
+					</template>
+				</el-table-column>
+
+				</el-table>
+
+
+
+		</div>
+		<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
+		
+	</fs-page>
+</template>
+
+<script lang="ts" setup name="timetablemanage">
+import { useFs } from '@fast-crud/fast-crud';
+import dayjs from 'dayjs';
+import isLeapYear from 'dayjs/plugin/isLeapYear';
+import isoWeek from 'dayjs/plugin/isoWeek';
+import isoWeeksInYear from 'dayjs/plugin/isoWeeksInYear';
+import weekOfYear from 'dayjs/plugin/weekOfYear';
+import { computed, onMounted, ref } from 'vue';
+import { GetPermission } from './api';
+import { createCrudOptions } from './crud';
+import { handleColumnPermission } from '/@/utils/columnPermission';
+
+
+
+const { crudBinding, crudRef, crudExpose, crudOptions, resetCrudOptions } = useFs({ createCrudOptions });
+
+dayjs.extend(weekOfYear)
+dayjs.extend(isoWeek)
+dayjs.extend(isLeapYear)
+dayjs.extend(isoWeeksInYear)
+
+const currentWeek = ref(dayjs().isoWeek())
+const totalWeeks = ref(dayjs().isoWeeksInYear())
+const weekOffset = ref(0)
+
+
+const displayWeek = computed(() => currentWeek.value + weekOffset.value)
+
+
+const weekDates = computed(() => {
+  // 使用 ISO 标准周一作为本周开始
+  const monday = dayjs().startOf('isoWeek').add(weekOffset.value, 'week')
+  return Array.from({ length: 7 }, (_, i) => {
+    const date = monday.add(i, 'day')
+    return `${['周一','周二','周三','周四','周五','周六','周日'][i]} (${date.format('MM.DD')})`
+  })
+})
+
+function nextWeek() {
+  if (currentWeek.value + weekOffset.value < totalWeeks.value) weekOffset.value++
+}
+function prevWeek() {
+	weekOffset.value--
+}
+
+const headerStyle = {
+  backgroundColor: '#f5f5f5', // 浅灰色背景
+  fontWeight: 'bold',         // 加粗文字
+  color: '#333'               // 字体颜色稍深
+}
+
+
+const scheduleData = ref<any[]>([])
+// async function loadData() {
+//   scheduleData.value = await getScheduleData(currentWeek + weekOffset.value)
+// }
+
+function getSchedule(row: any, index: number) {
+  return row[`day${index + 1}`] || ''
+}
+
+// 页面打开后获取列表数据
+onMounted(async () => {
+	// 设置列权限
+	const newOptions = await handleColumnPermission(GetPermission, crudOptions);
+	//重置crudBinding
+	resetCrudOptions(newOptions);
+	// 刷新
+	crudExpose.doRefresh();
+});
+</script>
+
+
+
+<style scoped>
+   .header-bar {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  gap: 20px;
+  margin: 16px auto;       /* 顶部/底部间距 + 自动居中 */
+  width: fit-content;      /* 宽度以内容为准 */
+}
+
+.week-display {
+  font-size: 16px;
+  font-weight: bold;
+  padding: 0 12px;
+  min-width: 80px;
+  text-align: center;
+}
+
+
+</style>