Merge branch 'master' into dev_qiaofei
# Conflicts: # src/pages/system/launchPage/launchPage.vue
This commit is contained in:
commit
ca8b6e0880
14797
src/api/base/ChinaCitys.json
Normal file
14797
src/api/base/ChinaCitys.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -66,3 +66,6 @@ export const updateUserApi = async (param: any) => {
|
|||||||
export const findJsByPhoneApi = async (param: any) => {
|
export const findJsByPhoneApi = async (param: any) => {
|
||||||
return await get("/api/js/findJsByPhone", param);
|
return await get("/api/js/findJsByPhone", param);
|
||||||
};
|
};
|
||||||
|
export const findJsAllByPhoneApi = async (param: any) => {
|
||||||
|
return await get("/api/js/findJsAllByPhone", param);
|
||||||
|
};
|
||||||
|
|||||||
@ -91,7 +91,7 @@ function confirm(e: any) {
|
|||||||
newValue.value = dayjs(value).format("YYYY-MM");
|
newValue.value = dayjs(value).format("YYYY-MM");
|
||||||
}
|
}
|
||||||
if (attrs.componentProps.ok && typeof attrs.componentProps.ok == "function") {
|
if (attrs.componentProps.ok && typeof attrs.componentProps.ok == "function") {
|
||||||
attrs.componentProps.ok(e);
|
attrs.componentProps.ok(e, attrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -139,6 +139,13 @@
|
|||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/view/routine/JiaoXueZiYuan/indexList",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "资源类型",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/view/routine/HuoDongZiYuan/index",
|
"path": "pages/view/routine/HuoDongZiYuan/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -168,12 +175,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/view/routine/JiFenPingJia",
|
"path": "pages/view/routine/JiFenPingJia/JiFenPingJia",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "积分评价",
|
"navigationBarTitleText": "积分评价",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/view/routine/JiFenPingJia/detail",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "评价详情",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/view/routine/kefuxuncha/KeFuXunCha",
|
"path": "pages/view/routine/kefuxuncha/KeFuXunCha",
|
||||||
"style": {
|
"style": {
|
||||||
@ -383,6 +397,20 @@
|
|||||||
"navigationBarTitleText": "zhujiaoDetails"
|
"navigationBarTitleText": "zhujiaoDetails"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/view/routine/RengJiaoRengZhi/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "任教任职",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/view/routine/GongZuoLiang/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "工作量",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/base/groupTeaching/studentRollCall",
|
"path": "pages/base/groupTeaching/studentRollCall",
|
||||||
"style": {
|
"style": {
|
||||||
@ -420,13 +448,13 @@
|
|||||||
"pagePath": "pages/base/service/index",
|
"pagePath": "pages/base/service/index",
|
||||||
"iconPath": "static/tabBar/x2.png",
|
"iconPath": "static/tabBar/x2.png",
|
||||||
"selectedIconPath": "static/tabBar/2.png"
|
"selectedIconPath": "static/tabBar/2.png"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"text": "我的",
|
||||||
|
"pagePath": "pages/base/mine/index",
|
||||||
|
"iconPath": "static/tabBar/x3.png",
|
||||||
|
"selectedIconPath": "static/tabBar/3.png"
|
||||||
}
|
}
|
||||||
// {
|
|
||||||
// "text": "我的",
|
|
||||||
// "pagePath": "pages/base/mine/index",
|
|
||||||
// "iconPath": "static/tabBar/x3.png",
|
|
||||||
// "selectedIconPath": "static/tabBar/3.png"
|
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,977 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="mine-page">
|
<view class="mine-page">
|
||||||
|
<!-- 1. 顶部 Header - 复制自service页面 -->
|
||||||
|
<view class="header-section">
|
||||||
|
<view class="header-gradient"></view>
|
||||||
|
|
||||||
|
<!-- 退出按钮 -->
|
||||||
|
<view class="logout-btn" @click="handleLogout">
|
||||||
|
<text class="logout-text">退出</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 老师信息 -->
|
||||||
|
<view class="teacher-info">
|
||||||
|
<view class="teacher-avatar">
|
||||||
|
<image
|
||||||
|
class="avatar-image"
|
||||||
|
:src="teacherData.avatar || '/static/base/default-avatar.png'"
|
||||||
|
mode="aspectFill"
|
||||||
|
></image>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="teacher-details">
|
||||||
|
<view class="teacher-name">{{ teacherData.name }}</view>
|
||||||
|
<view class="teacher-position">{{ teacherData.position }}</view>
|
||||||
|
<view class="teacher-class">{{ teacherData.className }}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 统计信息 -->
|
||||||
|
<view class="stats-info">
|
||||||
|
<view class="stat-item">
|
||||||
|
<text class="stat-label">积分:</text>
|
||||||
|
<text class="stat-value">{{ teacherData.score }}分</text>
|
||||||
|
</view>
|
||||||
|
<view class="stat-divider">|</view>
|
||||||
|
<view class="stat-item">
|
||||||
|
<text class="stat-label">工作量:</text>
|
||||||
|
<text class="stat-value">{{ teacherData.workload }}课时</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 介绍文字 -->
|
||||||
|
<view class="teacher-intro">
|
||||||
|
{{ teacherData.introduction }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 2. 日程管理区域 -->
|
||||||
|
<view class="main-content">
|
||||||
|
<!-- 近期日程标题 -->
|
||||||
|
<view class="schedule-header">
|
||||||
|
<text class="schedule-title">近期日程</text>
|
||||||
|
<view class="schedule-link" @click="goToSchedule">
|
||||||
|
<text class="link-text">查看日程</text>
|
||||||
|
<text class="link-arrow">></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 日期选择器 -->
|
||||||
|
<view class="date-selector">
|
||||||
|
<view class="date-container">
|
||||||
|
<view
|
||||||
|
class="date-item"
|
||||||
|
v-for="(date, index) in weekDates"
|
||||||
|
:key="index"
|
||||||
|
:class="{ active: selectedDateIndex === index }"
|
||||||
|
@click="selectDate(index)"
|
||||||
|
>
|
||||||
|
<text class="date-day">{{ date.day }}</text>
|
||||||
|
<text class="date-number">{{ date.number }}</text>
|
||||||
|
<view v-if="date.hasEvent" class="date-dot"></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 日程列表 -->
|
||||||
|
<scroll-view class="schedule-list" scroll-y="true" show-scrollbar="false" enhanced="true">
|
||||||
|
<view class="schedule-content">
|
||||||
|
<view
|
||||||
|
class="schedule-item"
|
||||||
|
v-for="(item, index) in getCurrentSchedule"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<view class="time-column">
|
||||||
|
<text class="start-time">{{ item.startTime }}</text>
|
||||||
|
<text class="end-time" v-if="item.endTime">{{ item.endTime }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="content-column">
|
||||||
|
<view class="event-header">
|
||||||
|
<view
|
||||||
|
class="event-tag"
|
||||||
|
:class="item.type"
|
||||||
|
v-if="item.tag"
|
||||||
|
>
|
||||||
|
<text class="tag-text">{{ item.tag }}</text>
|
||||||
|
</view>
|
||||||
|
<text class="event-title">{{ item.title }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="event-details" v-if="item.details">
|
||||||
|
<view class="event-location" v-if="item.location">
|
||||||
|
<text class="location-icon">📍</text>
|
||||||
|
<text class="location-text">{{ item.location }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="event-description" v-if="item.description">
|
||||||
|
<text class="description-icon">📝</text>
|
||||||
|
<text class="description-text">{{ item.description }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 无日程时的提示 -->
|
||||||
|
<view class="no-schedule" v-if="getCurrentSchedule.length === 0">
|
||||||
|
<text class="no-schedule-text">暂无日程安排</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { useUserStore } from "@/store/modules/user";
|
||||||
|
import { imagUrl } from "@/utils";
|
||||||
|
import { reactive, ref, computed, onMounted } from "vue";
|
||||||
|
|
||||||
|
// 定义老师数据接口
|
||||||
|
interface TeacherData {
|
||||||
|
name: string;
|
||||||
|
position: string;
|
||||||
|
className: string;
|
||||||
|
score: number;
|
||||||
|
workload: number;
|
||||||
|
introduction: string;
|
||||||
|
avatar?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日程数据接口
|
||||||
|
interface ScheduleItem {
|
||||||
|
startTime: string;
|
||||||
|
endTime?: string;
|
||||||
|
title: string;
|
||||||
|
type: string;
|
||||||
|
tag?: string;
|
||||||
|
location?: string;
|
||||||
|
description?: string;
|
||||||
|
details?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日期数据接口
|
||||||
|
interface DateItem {
|
||||||
|
day: string;
|
||||||
|
number: string;
|
||||||
|
hasEvent: boolean;
|
||||||
|
date: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { logout, getUser } = useUserStore();
|
||||||
|
|
||||||
|
// 老师数据
|
||||||
|
const teacherData = reactive<TeacherData>({
|
||||||
|
name: getUser.loginName,
|
||||||
|
position: "教研组长",
|
||||||
|
className: "2014级1班班主任",
|
||||||
|
score: 48,
|
||||||
|
workload: 20,
|
||||||
|
introduction: "北冥有鱼,其名为鲲。鲲之大,不知其几千里也。",
|
||||||
|
avatar: imagUrl(getUser.profilePhoto),
|
||||||
|
});
|
||||||
|
|
||||||
|
// 退出登录
|
||||||
|
const handleLogout = () => {
|
||||||
|
uni.showModal({
|
||||||
|
title: "确认退出",
|
||||||
|
content: "确定要退出登录吗?",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
logout();
|
||||||
|
uni.reLaunch({
|
||||||
|
url: "/pages/system/login/login",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// 日程相关数据
|
||||||
|
const selectedDateIndex = ref(0); // 默认选中第一天
|
||||||
|
|
||||||
|
// 生成一周的日期
|
||||||
|
const weekDates = ref<DateItem[]>([]);
|
||||||
|
|
||||||
|
// 生成假数据的函数
|
||||||
|
const generateScheduleData = () => {
|
||||||
|
const today = new Date();
|
||||||
|
const currentDay = today.getDay();
|
||||||
|
const mondayOffset = currentDay === 0 ? -6 : 1 - currentDay;
|
||||||
|
const startOfWeek = new Date(today);
|
||||||
|
startOfWeek.setDate(today.getDate() + mondayOffset);
|
||||||
|
|
||||||
|
const data: Record<string, ScheduleItem[]> = {};
|
||||||
|
|
||||||
|
for (let i = 0; i < 7; i++) {
|
||||||
|
const date = new Date(startOfWeek);
|
||||||
|
date.setDate(startOfWeek.getDate() + i);
|
||||||
|
const dateStr = date.getDate().toString();
|
||||||
|
|
||||||
|
// 为每天生成不同的假数据
|
||||||
|
switch (i) {
|
||||||
|
case 0: // 周一
|
||||||
|
data[dateStr] = [
|
||||||
|
{
|
||||||
|
startTime: '08:30',
|
||||||
|
endTime: '10:00',
|
||||||
|
title: '语文课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '课程',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '高一(3)班语文课',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '14:00',
|
||||||
|
endTime: '15:30',
|
||||||
|
title: '班主任会议',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '会议',
|
||||||
|
location: '会议室B302',
|
||||||
|
description: '讨论期中考试安排',
|
||||||
|
details: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 1: // 周二
|
||||||
|
data[dateStr] = [
|
||||||
|
{
|
||||||
|
startTime: '09:00',
|
||||||
|
endTime: '10:30',
|
||||||
|
title: '教研活动',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '教研',
|
||||||
|
location: '教研室',
|
||||||
|
description: '语文组教研活动',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '15:00',
|
||||||
|
endTime: '16:30',
|
||||||
|
title: '家长会准备',
|
||||||
|
type: 'preparation',
|
||||||
|
tag: '准备',
|
||||||
|
location: '办公室',
|
||||||
|
description: '准备家长会材料',
|
||||||
|
details: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 2: // 周三
|
||||||
|
data[dateStr] = [
|
||||||
|
{
|
||||||
|
startTime: '08:00',
|
||||||
|
endTime: '09:30',
|
||||||
|
title: '早读辅导',
|
||||||
|
type: 'tutoring',
|
||||||
|
tag: '辅导',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '高一(3)班早读辅导',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '10:00',
|
||||||
|
endTime: '12:00',
|
||||||
|
title: '教研英语无痕计划(OMO)',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '会议',
|
||||||
|
location: 'POHCSOO007',
|
||||||
|
description: '智慧校园211楼会议室',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '14:00',
|
||||||
|
endTime: '16:00',
|
||||||
|
title: '德法内科学习课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '课程',
|
||||||
|
location: 'POHCSOO007',
|
||||||
|
description: '智慧校园211楼会议室',
|
||||||
|
details: true
|
||||||
|
} , {
|
||||||
|
startTime: '08:00',
|
||||||
|
endTime: '09:30',
|
||||||
|
title: '早读辅导',
|
||||||
|
type: 'tutoring',
|
||||||
|
tag: '辅导',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '高一(3)班早读辅导',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '10:00',
|
||||||
|
endTime: '12:00',
|
||||||
|
title: '教研英语无痕计划(OMO)',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '会议',
|
||||||
|
location: 'POHCSOO007',
|
||||||
|
description: '智慧校园211楼会议室',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '14:00',
|
||||||
|
endTime: '16:00',
|
||||||
|
title: '德法内科学习课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '课程',
|
||||||
|
location: 'POHCSOO007',
|
||||||
|
description: '智慧校园211楼会议室',
|
||||||
|
details: true
|
||||||
|
}, {
|
||||||
|
startTime: '08:00',
|
||||||
|
endTime: '09:30',
|
||||||
|
title: '早读辅导',
|
||||||
|
type: 'tutoring',
|
||||||
|
tag: '辅导',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '高一(3)班早读辅导',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '10:00',
|
||||||
|
endTime: '12:00',
|
||||||
|
title: '教研英语无痕计划(OMO)',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '会议',
|
||||||
|
location: 'POHCSOO007',
|
||||||
|
description: '智慧校园211楼会议室',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '14:00',
|
||||||
|
endTime: '16:00',
|
||||||
|
title: '德法内科学习课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '课程',
|
||||||
|
location: 'POHCSOO007',
|
||||||
|
description: '智慧校园211楼会议室',
|
||||||
|
details: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 3: // 周四
|
||||||
|
data[dateStr] = [
|
||||||
|
{
|
||||||
|
startTime: '08:30',
|
||||||
|
endTime: '10:00',
|
||||||
|
title: '语文课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '课程',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '高一(3)班语文课',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '10:30',
|
||||||
|
endTime: '12:00',
|
||||||
|
title: '作文批改',
|
||||||
|
type: 'preparation',
|
||||||
|
tag: '批改',
|
||||||
|
location: '办公室',
|
||||||
|
description: '批改学生作文',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '14:00',
|
||||||
|
endTime: '15:30',
|
||||||
|
title: '课程设计',
|
||||||
|
type: 'preparation',
|
||||||
|
tag: '备课',
|
||||||
|
location: '办公室',
|
||||||
|
description: '准备下周课程内容',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '16:00',
|
||||||
|
endTime: '17:00',
|
||||||
|
title: '学生谈话',
|
||||||
|
type: 'counseling',
|
||||||
|
tag: '谈话',
|
||||||
|
location: '办公室',
|
||||||
|
description: '与学生张三谈话',
|
||||||
|
details: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 4: // 周五
|
||||||
|
data[dateStr] = [
|
||||||
|
{
|
||||||
|
startTime: '08:00',
|
||||||
|
endTime: '09:30',
|
||||||
|
title: '晨会',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '晨会',
|
||||||
|
location: '办公室',
|
||||||
|
description: '教师晨会',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '09:00',
|
||||||
|
endTime: '10:30',
|
||||||
|
title: '公开课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '公开课',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '语文公开课展示',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '11:00',
|
||||||
|
endTime: '12:00',
|
||||||
|
title: '课后辅导',
|
||||||
|
type: 'tutoring',
|
||||||
|
tag: '辅导',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '学困生辅导',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '14:30',
|
||||||
|
endTime: '16:00',
|
||||||
|
title: '周总结会议',
|
||||||
|
type: 'meeting',
|
||||||
|
tag: '会议',
|
||||||
|
location: '会议室B302',
|
||||||
|
description: '本周工作总结',
|
||||||
|
details: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startTime: '16:30',
|
||||||
|
endTime: '17:30',
|
||||||
|
title: '家长沟通',
|
||||||
|
type: 'counseling',
|
||||||
|
tag: '沟通',
|
||||||
|
location: '办公室',
|
||||||
|
description: '与家长电话沟通',
|
||||||
|
details: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 5: // 周六
|
||||||
|
data[dateStr] = [
|
||||||
|
{
|
||||||
|
startTime: '09:00',
|
||||||
|
endTime: '11:00',
|
||||||
|
title: '补课',
|
||||||
|
type: 'class',
|
||||||
|
tag: '补课',
|
||||||
|
location: '教学楼A201',
|
||||||
|
description: '高一(3)班语文补课',
|
||||||
|
details: true
|
||||||
|
}
|
||||||
|
];
|
||||||
|
break;
|
||||||
|
case 6: // 周日
|
||||||
|
data[dateStr] = []; // 周日休息,无安排
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 日程数据
|
||||||
|
const scheduleData = reactive<Record<string, ScheduleItem[]>>(generateScheduleData());
|
||||||
|
|
||||||
|
// 获取当前选中日期的日程
|
||||||
|
const getCurrentSchedule = computed(() => {
|
||||||
|
const currentDate = weekDates.value[selectedDateIndex.value];
|
||||||
|
if (!currentDate) return [];
|
||||||
|
return scheduleData[currentDate.number] || [];
|
||||||
|
});
|
||||||
|
|
||||||
|
// 初始化日期
|
||||||
|
const initDates = () => {
|
||||||
|
const days = ['一', '二', '三', '四', '五', '六', '日'];
|
||||||
|
const today = new Date();
|
||||||
|
const currentDay = today.getDay(); // 0-6,0是周日
|
||||||
|
|
||||||
|
// 计算本周的开始日期(周一)
|
||||||
|
const startOfWeek = new Date(today);
|
||||||
|
const mondayOffset = currentDay === 0 ? -6 : 1 - currentDay; // 如果是周日,往前推6天;否则推到周一
|
||||||
|
startOfWeek.setDate(today.getDate() + mondayOffset);
|
||||||
|
|
||||||
|
weekDates.value = [];
|
||||||
|
for (let i = 0; i < 7; i++) {
|
||||||
|
const date = new Date(startOfWeek);
|
||||||
|
date.setDate(startOfWeek.getDate() + i);
|
||||||
|
|
||||||
|
const dateStr = date.getDate().toString();
|
||||||
|
const hasEvent = scheduleData[dateStr] && scheduleData[dateStr].length > 0;
|
||||||
|
|
||||||
|
weekDates.value.push({
|
||||||
|
day: days[i],
|
||||||
|
number: dateStr,
|
||||||
|
hasEvent,
|
||||||
|
date: date.toISOString().split('T')[0]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 选择日期
|
||||||
|
const selectDate = (index: number) => {
|
||||||
|
selectedDateIndex.value = index;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 跳转到日程页面
|
||||||
|
const goToSchedule = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/view/schedule/index'
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
initDates();
|
||||||
|
// 默认选中今天
|
||||||
|
const today = new Date();
|
||||||
|
const currentDay = today.getDay();
|
||||||
|
const todayIndex = currentDay === 0 ? 6 : currentDay - 1; // 周日是6,其他是day-1
|
||||||
|
selectedDateIndex.value = todayIndex;
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.mine-page {
|
||||||
|
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||||
|
min-height: 100vh;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 顶部 Header - 复制自service页面
|
||||||
|
.header-section {
|
||||||
|
position: relative;
|
||||||
|
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
|
||||||
|
color: #ffffff;
|
||||||
|
overflow: hidden;
|
||||||
|
padding: 40rpx 30rpx 30rpx;
|
||||||
|
height: auto;
|
||||||
|
min-height: 320rpx;
|
||||||
|
|
||||||
|
.header-gradient {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: linear-gradient(
|
||||||
|
45deg,
|
||||||
|
rgba(255, 255, 255, 0.1) 0%,
|
||||||
|
rgba(255, 255, 255, 0.05) 100%
|
||||||
|
);
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logout-btn {
|
||||||
|
position: absolute;
|
||||||
|
top: 40rpx;
|
||||||
|
right: 30rpx;
|
||||||
|
z-index: 3;
|
||||||
|
background: rgba(255, 255, 255, 0.2);
|
||||||
|
border-radius: 20rpx;
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
|
||||||
|
.logout-text {
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.teacher-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
z-index: 2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.teacher-avatar {
|
||||||
|
width: 120rpx;
|
||||||
|
height: 120rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 3px solid rgba(255, 255, 255, 0.3);
|
||||||
|
margin-right: 20rpx;
|
||||||
|
|
||||||
|
.avatar-image {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.teacher-details {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.teacher-name {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 5rpx;
|
||||||
|
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.teacher-position {
|
||||||
|
font-size: 14px;
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
margin-bottom: 5rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.teacher-class {
|
||||||
|
font-size: 12px;
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.stats-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
z-index: 2;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
.stat-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.stat-label {
|
||||||
|
font-size: 14px;
|
||||||
|
color: rgba(255, 255, 255, 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-value {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-divider {
|
||||||
|
margin: 0 30rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.teacher-intro {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 12px;
|
||||||
|
color: rgba(255, 255, 255, 0.8);
|
||||||
|
margin-top: 20rpx;
|
||||||
|
line-height: 1.4;
|
||||||
|
z-index: 2;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 主要内容区域
|
||||||
|
.main-content {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 20px 12px 0px 12px; // 减少左右padding
|
||||||
|
position: relative;
|
||||||
|
background: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
rgba(255, 255, 255, 0.95) 0%,
|
||||||
|
rgba(248, 250, 252, 0.98) 100%
|
||||||
|
);
|
||||||
|
border-radius: 20px 20px 0 0;
|
||||||
|
margin-top: -20px;
|
||||||
|
z-index: 3;
|
||||||
|
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
|
||||||
|
height: calc(100vh - 340rpx); // 固定高度
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden; // 防止内容溢出
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日程标题
|
||||||
|
.schedule-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
flex-shrink: 0; // 不压缩
|
||||||
|
|
||||||
|
.schedule-title {
|
||||||
|
font-size: 17px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1f2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
.schedule-link {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
.link-text {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #6b7280;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.link-arrow {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #6b7280;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日期选择器
|
||||||
|
.date-selector {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
background: #ffffff;
|
||||||
|
border-radius: 12px;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||||
|
flex-shrink: 0; // 不压缩
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
|
.date-container {
|
||||||
|
display: flex;
|
||||||
|
padding: 8px 4px;
|
||||||
|
justify-content: space-around; // 使用space-around确保更好的分布
|
||||||
|
width: 100%; // 占满宽度
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
padding: 6px 2px;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
position: relative;
|
||||||
|
flex: 1; // 平均分配空间
|
||||||
|
max-width: calc((100% - 32px) / 7); // 减去padding后平均分配
|
||||||
|
min-width: 0; // 允许压缩
|
||||||
|
|
||||||
|
.date-day {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #6b7280;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
white-space: nowrap; // 防止换行
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-number {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #374151;
|
||||||
|
white-space: nowrap; // 防止换行
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-dot {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 1px;
|
||||||
|
width: 3px;
|
||||||
|
height: 3px;
|
||||||
|
background: #10b981;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background: #10b981;
|
||||||
|
color: #ffffff;
|
||||||
|
transform: scale(1.02); // 减少放大倍数,避免超出
|
||||||
|
z-index: 1; // 确保选中项在最上层
|
||||||
|
margin: 0 -1px; // 轻微负边距补偿放大效果
|
||||||
|
|
||||||
|
.date-day,
|
||||||
|
.date-number {
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-dot {
|
||||||
|
background: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 日程列表
|
||||||
|
.schedule-list {
|
||||||
|
flex: 1; // 占据剩余空间
|
||||||
|
height: 0; // 配合flex使用,确保滚动正常
|
||||||
|
padding-bottom: 20px;
|
||||||
|
|
||||||
|
.schedule-content {
|
||||||
|
padding-bottom: 35px; // 底部留白
|
||||||
|
}
|
||||||
|
|
||||||
|
.schedule-item {
|
||||||
|
display: flex;
|
||||||
|
padding: 14px 0;
|
||||||
|
border-bottom: 1px solid #f3f4f6;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.time-column {
|
||||||
|
width: 60px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
margin-right: 15px;
|
||||||
|
|
||||||
|
.start-time {
|
||||||
|
display: block;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #374151;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.end-time {
|
||||||
|
display: block;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #6b7280;
|
||||||
|
margin-top: 2px;
|
||||||
|
line-height: 1.2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-column {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0; // 允许内容压缩
|
||||||
|
|
||||||
|
.event-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
.event-tag {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-right: 8px;
|
||||||
|
flex-shrink: 0; // 标签不压缩
|
||||||
|
|
||||||
|
&.meeting {
|
||||||
|
background: #10b981;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.class {
|
||||||
|
background: #3b82f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.tutoring {
|
||||||
|
background: #f59e0b;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.preparation {
|
||||||
|
background: #8b5cf6;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.counseling {
|
||||||
|
background: #ef4444;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-text {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #ffffff;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.event-title {
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #1f2937;
|
||||||
|
flex: 1;
|
||||||
|
line-height: 1.3;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap; // 单行显示,超出省略
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.event-details {
|
||||||
|
.event-location,
|
||||||
|
.event-description {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
|
||||||
|
.location-icon,
|
||||||
|
.description-icon {
|
||||||
|
font-size: 13px;
|
||||||
|
margin-right: 4px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.location-text,
|
||||||
|
.description-text {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #6b7280;
|
||||||
|
line-height: 1.3;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap; // 单行显示,超出省略
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-schedule {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
min-height: 200px;
|
||||||
|
|
||||||
|
.no-schedule-text {
|
||||||
|
font-size: 15px;
|
||||||
|
color: #9ca3af;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 动画定义
|
||||||
|
@keyframes fadeInUp {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateY(30px);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 小屏幕适配
|
||||||
|
@media (max-width: 375px) {
|
||||||
|
.main-content {
|
||||||
|
padding: 20px 8px 0px 8px; // 进一步减少padding
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-selector {
|
||||||
|
.date-container {
|
||||||
|
padding: 8px 2px; // 减少内边距
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-item {
|
||||||
|
padding: 5px 1px; // 减少项目内边距
|
||||||
|
|
||||||
|
.date-day {
|
||||||
|
font-size: 9px; // 稍微减小字体
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-number {
|
||||||
|
font-size: 13px; // 稍微减小字体
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
transform: scale(1.01); // 进一步减少放大倍数
|
||||||
|
margin: 0; // 移除负边距
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -88,8 +88,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import { findJsAllByPhoneApi } from "@/api/system/login";
|
||||||
|
import { useDataStore } from "@/store/modules/data";
|
||||||
import { useUserStore } from "@/store/modules/user";
|
import { useUserStore } from "@/store/modules/user";
|
||||||
import { imagUrl } from "@/utils";
|
import { imagUrl } from "@/utils";
|
||||||
|
import { hideLoading, showLoading } from "@/utils/uniapp";
|
||||||
|
import { set } from "lodash";
|
||||||
import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
|
|
||||||
interface GridItem {
|
interface GridItem {
|
||||||
@ -153,13 +157,13 @@ const sections = reactive<Section[]>([
|
|||||||
id: "routine",
|
id: "routine",
|
||||||
title: "常规",
|
title: "常规",
|
||||||
items: [
|
items: [
|
||||||
{
|
// {
|
||||||
id: 10,
|
// id: 10,
|
||||||
text: "一师一策",
|
// text: "一师一策",
|
||||||
icon: "clipboardfill",
|
// icon: "clipboardfill",
|
||||||
path: "/pages/view/routine/yishiyice/index",
|
// path: "/pages/view/routine/yishiyice/index",
|
||||||
show: true,
|
// show: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
id: "r2",
|
id: "r2",
|
||||||
icon: "stack-fill",
|
icon: "stack-fill",
|
||||||
@ -167,27 +171,42 @@ const sections = reactive<Section[]>([
|
|||||||
show: true,
|
show: true,
|
||||||
path: "/pages/view/routine/JiaoXueZiYuan/index",
|
path: "/pages/view/routine/JiaoXueZiYuan/index",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "r3",
|
|
||||||
icon: "file-list-3-fil",
|
|
||||||
text: "活动资源",
|
|
||||||
show: true,
|
|
||||||
path: "/pages/view/routine/HuoDongZiYuan/index",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "r4",
|
|
||||||
icon: "file-paper-2-fill",
|
|
||||||
text: "公文流转",
|
|
||||||
show: true,
|
|
||||||
path: "/pages/view/routine/GongWenLiuZhuan/index",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "r5",
|
id: "r5",
|
||||||
icon: "file-mark-fill",
|
icon: "file-mark-fill",
|
||||||
text: "积分评价",
|
text: "积分评价",
|
||||||
show: true,
|
show: true,
|
||||||
path: "/pages/view/routine/JiFenPingJia",
|
path: "/pages/view/routine/JiFenPingJia/JiFenPingJia",
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// id: "r3",
|
||||||
|
// icon: "file-list-3-fil",
|
||||||
|
// text: "活动资源",
|
||||||
|
// show: true,
|
||||||
|
// path: "/pages/view/routine/HuoDongZiYuan/index",
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
id: "r3",
|
||||||
|
icon: "file-list-3-fil",
|
||||||
|
text: "工作量",
|
||||||
|
show: true,
|
||||||
|
path: "/pages/view/routine/GongZuoLiang/index",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// id: "r4",
|
||||||
|
// icon: "file-paper-2-fill",
|
||||||
|
// text: "公文流转",
|
||||||
|
// show: true,
|
||||||
|
// path: "/pages/view/routine/GongWenLiuZhuan/index",
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
id: "r4",
|
||||||
|
icon: "file-paper-2-fill",
|
||||||
|
text: "任教任职",
|
||||||
|
show: true,
|
||||||
|
path: "/pages/view/routine/RengJiaoRengZhi/index",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
id: "r6",
|
id: "r6",
|
||||||
icon: "pass-pending-fill",
|
icon: "pass-pending-fill",
|
||||||
@ -282,15 +301,25 @@ const getIconBgColor = (index: number) => {
|
|||||||
];
|
];
|
||||||
return colors[index % colors.length];
|
return colors[index % colors.length];
|
||||||
};
|
};
|
||||||
|
const { setFile, getFile } = useDataStore();
|
||||||
// 处理网格项点击事件
|
// 处理网格项点击事件
|
||||||
const handleGridItemClick = (item: GridItem) => {
|
const handleGridItemClick = async (item: GridItem) => {
|
||||||
console.log("Clicked item:", item);
|
console.log("Clicked item:", item);
|
||||||
if (item.path) {
|
if (item.text == "教师档案") {
|
||||||
uni.navigateTo({ url: item.path });
|
showLoading("加载中...");
|
||||||
} else {
|
const res = await findJsAllByPhoneApi({
|
||||||
uni.showToast({ title: `功能 ${item.text} 暂未开放`, icon: "none" });
|
phone: getUser.telephone,
|
||||||
|
});
|
||||||
|
hideLoading();
|
||||||
|
setFile(res.result);
|
||||||
}
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
if (item.path) {
|
||||||
|
uni.navigateTo({ url: item.path });
|
||||||
|
} else {
|
||||||
|
uni.showToast({ title: `功能 ${item.text} 暂未开放`, icon: "none" });
|
||||||
|
}
|
||||||
|
}, 200);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -54,14 +54,14 @@ import {cloneDeep, map} from "lodash";
|
|||||||
|
|
||||||
const schema = reactive<FormsSchema[]>([
|
const schema = reactive<FormsSchema[]>([
|
||||||
{
|
{
|
||||||
field: "gztime",
|
field: "gzkstime",
|
||||||
label: "开始时间",
|
label: "开始时间",
|
||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
field: "jssj",
|
field: "gzjstime",
|
||||||
label: "结束时间",
|
label: "结束时间",
|
||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
|
|||||||
@ -32,14 +32,8 @@
|
|||||||
<template #bottom>
|
<template #bottom>
|
||||||
<view class="flex-row items-center pb-10 pt-5">
|
<view class="flex-row items-center pb-10 pt-5">
|
||||||
<u-button
|
<u-button
|
||||||
text="上一步"
|
text="提交"
|
||||||
class="ml-15 mr-7"
|
class="mx-15"
|
||||||
:plain="true"
|
|
||||||
@click="navigateBack"
|
|
||||||
/>
|
|
||||||
<u-button
|
|
||||||
text="下一步"
|
|
||||||
class="mr-15 mr-7"
|
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="submit"
|
@click="submit"
|
||||||
/>
|
/>
|
||||||
@ -258,36 +252,32 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
|
|
||||||
// 提交数据
|
// 提交数据
|
||||||
function submit() {
|
function submit() {
|
||||||
setFile({
|
const grRyList = map(education.xl, (item) => {
|
||||||
...getFile,
|
return { ...item.value, hjlxId: "GRRY" };
|
||||||
grRyList: map(education.xl, (item) => {
|
|
||||||
return { ...item.value, hjlxId: "GRRY" };
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
navigateTo("/pages/view/hr/teacherProfile/PublicClassAwards");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化数据
|
|
||||||
const { getFile, setFile } = useDataStore();
|
|
||||||
|
|
||||||
// 处理回显数据
|
|
||||||
if (getFile.grRyList && getFile.grRyList.length > 0) {
|
|
||||||
education.xl = map(getFile.grRyList, (item) => {
|
|
||||||
return { value: item };
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// // 初始化数据
|
||||||
|
// const { getFile, setFile } = useDataStore();
|
||||||
|
|
||||||
|
// // 处理回显数据
|
||||||
|
// if (getFile.grRyList && getFile.grRyList.length > 0) {
|
||||||
|
// education.xl = map(getFile.grRyList, (item) => {
|
||||||
|
// return { value: item };
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
// 页面加载时初始化
|
// 页面加载时初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (getFile.grRyList && getFile.grRyList.length > 0) {
|
// if (getFile.grRyList && getFile.grRyList.length > 0) {
|
||||||
// 有回显数据时,延迟初始化确保数据正确加载
|
// // 有回显数据时,延迟初始化确保数据正确加载
|
||||||
nextTick(() => {
|
// nextTick(() => {
|
||||||
initEchoData();
|
// initEchoData();
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
// 无回显数据时,只需要初始化荣誉类别
|
// // 无回显数据时,只需要初始化荣誉类别
|
||||||
initHonorCategories();
|
// initHonorCategories();
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,14 @@
|
|||||||
<template v-for="(item, index) in education.xl" :key="index">
|
<template v-for="(item, index) in education.xl" :key="index">
|
||||||
<view class="po-re mb-15">
|
<view class="po-re mb-15">
|
||||||
<BasicForm
|
<BasicForm
|
||||||
|
:index="index"
|
||||||
v-model="item.value"
|
v-model="item.value"
|
||||||
:schema="schema"
|
:schema="schema"
|
||||||
|
:key="`form-${index}-${forceUpdateKey}`"
|
||||||
:formsProps="{ labelWidth: 100 }"
|
:formsProps="{ labelWidth: 100 }"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
@click="deleteMemberFamily(index as number, item.value)"
|
@click="deleteMemberFamily(index, item.value)"
|
||||||
class="delete-icon"
|
class="delete-icon"
|
||||||
>
|
>
|
||||||
<BasicIcon type="clear" size="30" />
|
<BasicIcon type="clear" size="30" />
|
||||||
@ -47,25 +49,38 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {dicApi} from "@/api/system/dic";
|
import { dicApi } from "@/api/system/dic";
|
||||||
import {useDataStore} from "@/store/modules/data";
|
import { useDataStore } from "@/store/modules/data";
|
||||||
import {navigateBack, navigateTo} from "@/utils/uniapp";
|
import { navigateBack, navigateTo } from "@/utils/uniapp";
|
||||||
import {cloneDeep, map} from "lodash";
|
import { cloneDeep, map } from "lodash";
|
||||||
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
|
// 计算任岗年限
|
||||||
|
const calculatePositionYears = (startDate: string, endDate?: string) => {
|
||||||
|
if (!startDate) return "";
|
||||||
|
const start = dayjs(startDate);
|
||||||
|
const end = endDate ? dayjs(endDate) : dayjs();
|
||||||
|
const years = end.diff(start, "year");
|
||||||
|
console.log("计算任岗年限:", { startDate, endDate, years });
|
||||||
|
// 确保0值也能显示,转换为字符串
|
||||||
|
return years.toString();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 强制重新渲染的键
|
||||||
|
const forceUpdateKey = ref(0);
|
||||||
|
|
||||||
|
// 更新指定项的任岗年限
|
||||||
|
const updatePositionYears = (itemValue: any) => {
|
||||||
|
const { gwrztime, gwpyjssj } = itemValue;
|
||||||
|
if (gwrztime) {
|
||||||
|
const years = calculatePositionYears(gwrztime, gwpyjssj);
|
||||||
|
itemValue.gwrznx = years;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const schema = reactive<FormsSchema[]>([
|
const schema = reactive<FormsSchema[]>([
|
||||||
// {
|
|
||||||
// field: "xj",
|
|
||||||
// label: "薪级",
|
|
||||||
// component: "BasicPicker",
|
|
||||||
// componentProps: {
|
|
||||||
// api: dicApi,
|
|
||||||
// param: { pid: 434953981 },
|
|
||||||
// rangeKey: "dictionaryValue",
|
|
||||||
// savaKey: "dictionaryCode",
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
field: "gwjbId",
|
field: "gwlbId",
|
||||||
label: "岗位类别",
|
label: "岗位类别",
|
||||||
component: "BasicPicker",
|
component: "BasicPicker",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
@ -76,30 +91,80 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "gwrztime",
|
field: "gwjbId",
|
||||||
|
label: "岗位级别",
|
||||||
|
component: "BasicPicker",
|
||||||
|
componentProps: {
|
||||||
|
api: dicApi,
|
||||||
|
param: { pid: 434953981 },
|
||||||
|
rangeKey: "dictionaryValue",
|
||||||
|
savaKey: "dictionaryCode",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "gwrzkstime",
|
||||||
label: "岗位聘用开始时间",
|
label: "岗位聘用开始时间",
|
||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
ok: (e: any, attrs: any) => {
|
||||||
|
console.log("岗位聘用开始时间选择:", e, attrs);
|
||||||
|
const formIndex = attrs.index;
|
||||||
|
if (formIndex !== undefined && education.xl[formIndex]) {
|
||||||
|
// 获取当前表单项的结束时间
|
||||||
|
const endTime = education.xl[formIndex].value.gwrzjstime;
|
||||||
|
console.log("当前表单项数据:", education.xl[formIndex].value);
|
||||||
|
// 计算任岗年限
|
||||||
|
const years = calculatePositionYears(e.value, endTime);
|
||||||
|
// 更新任岗年限
|
||||||
|
education.xl[formIndex].value.gwrznx = years;
|
||||||
|
console.log(
|
||||||
|
"更新后的任岗年限:",
|
||||||
|
education.xl[formIndex].value.gwrznx
|
||||||
|
);
|
||||||
|
// 强制重新渲染
|
||||||
|
forceUpdateKey.value++;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}, {
|
},
|
||||||
field: "gwpyjssj",
|
{
|
||||||
|
field: "gwrzjstime",
|
||||||
label: "岗位聘用结束时间",
|
label: "岗位聘用结束时间",
|
||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
|
ok: (e: any, attrs: any) => {
|
||||||
|
console.log("岗位聘用结束时间选择:", e, attrs);
|
||||||
|
const formIndex = attrs.index;
|
||||||
|
if (formIndex !== undefined && education.xl[formIndex]) {
|
||||||
|
// 获取当前表单项的开始时间
|
||||||
|
const startTime = education.xl[formIndex].value.gwrzkstime;
|
||||||
|
console.log("当前表单项数据:", education.xl[formIndex].value);
|
||||||
|
if (startTime) {
|
||||||
|
// 计算任岗年限
|
||||||
|
const years = calculatePositionYears(startTime, e.value);
|
||||||
|
// 更新任岗年限
|
||||||
|
education.xl[formIndex].value.gwrznx = years;
|
||||||
|
console.log(
|
||||||
|
"更新后的任岗年限:",
|
||||||
|
education.xl[formIndex].value.gwrznx
|
||||||
|
);
|
||||||
|
// 强制重新渲染
|
||||||
|
forceUpdateKey.value++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}, {
|
|
||||||
field: "gwpyjssj",
|
|
||||||
label: "当时时间-岗位聘用开始时间",
|
|
||||||
component: "BasicDateTimes",
|
|
||||||
componentProps: {},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "gwrznx",
|
field: "gwrznx",
|
||||||
label: "岗位任职年限",
|
label: "岗位任职年限",
|
||||||
component: "BasicInput",
|
component: "BasicInput",
|
||||||
componentProps: {},
|
componentProps: {
|
||||||
|
disabled: true,
|
||||||
|
placeholder: "请选择岗位聘用时间",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// field: "zrxk",
|
// field: "zrxk",
|
||||||
@ -123,7 +188,7 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
// savaKey: "key",
|
// savaKey: "key",
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
{
|
/*{
|
||||||
field: "dzzw",
|
field: "dzzw",
|
||||||
label: "职务",
|
label: "职务",
|
||||||
component: "BasicPicker",
|
component: "BasicPicker",
|
||||||
@ -133,7 +198,7 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
rangeKey: "dictionaryValue",
|
rangeKey: "dictionaryValue",
|
||||||
savaKey: "dictionaryCode",
|
savaKey: "dictionaryCode",
|
||||||
},
|
},
|
||||||
},
|
},*/
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const education = reactive<any>({
|
const education = reactive<any>({
|
||||||
@ -145,16 +210,57 @@ if (getFile.rgqkList && getFile.rgqkList.length > 0) {
|
|||||||
education.xl = map(getFile.rgqkList, (item) => {
|
education.xl = map(getFile.rgqkList, (item) => {
|
||||||
return { value: item };
|
return { value: item };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 回显数据后,直接使用数据库返回的gwrznx值,不重新计算
|
||||||
|
nextTick(() => {
|
||||||
|
education.xl.forEach((item: any, index: number) => {
|
||||||
|
console.log(`回显数据-表单项${index}数据:`, {
|
||||||
|
gwrzkstime: item.value.gwrzkstime,
|
||||||
|
gwrzjstime: item.value.gwrzjstime,
|
||||||
|
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
||||||
|
来源: "数据库回显",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
// 强制重新渲染确保界面更新
|
||||||
|
forceUpdateKey.value++;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 手动触发计算所有项目的任岗年限
|
||||||
|
const calculateAllPositionYears = () => {
|
||||||
|
education.xl.forEach((item: any, index: number) => {
|
||||||
|
if (item.value.gwrzkstime) {
|
||||||
|
const years = calculatePositionYears(
|
||||||
|
item.value.gwrzkstime,
|
||||||
|
item.value.gwrzjstime
|
||||||
|
);
|
||||||
|
item.value.gwrznx = years;
|
||||||
|
console.log(`表单项${index}计算结果:`, {
|
||||||
|
gwrzkstime: item.value.gwrzkstime,
|
||||||
|
gwrzjstime: item.value.gwrzjstime,
|
||||||
|
gwrznx: years,
|
||||||
|
是否为0: years === "0",
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 没有开始时间时,清空任岗年限
|
||||||
|
item.value.gwrznx = "";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
forceUpdateKey.value++;
|
||||||
|
};
|
||||||
|
|
||||||
function addEducation() {
|
function addEducation() {
|
||||||
education.xl.push({ value: {} });
|
education.xl.push({ value: {} });
|
||||||
|
// 强制重新渲染
|
||||||
|
forceUpdateKey.value++;
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteMemberFamily(index: number, item: any) {
|
function deleteMemberFamily(index: number, item: any) {
|
||||||
const list = cloneDeep(education.xl);
|
const list = cloneDeep(education.xl);
|
||||||
list.splice(index, 1);
|
list.splice(index, 1);
|
||||||
education.xl = list;
|
education.xl = list;
|
||||||
|
// 强制重新渲染
|
||||||
|
forceUpdateKey.value++;
|
||||||
}
|
}
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
@ -165,8 +271,26 @@ function submit() {
|
|||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
navigateTo("/pages/view/hr/teacherProfile/ExperienceInfo");
|
navigateTo("/pages/view/hr/teacherProfile/ExperienceInfo");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 组件挂载完成后处理回显数据
|
||||||
|
onMounted(() => {
|
||||||
|
// 如果有回显数据,直接使用数据库返回的gwrznx值,不重新计算
|
||||||
|
if (getFile.rgqkList && getFile.rgqkList.length > 0) {
|
||||||
|
nextTick(() => {
|
||||||
|
console.log("组件挂载后处理回显数据,直接使用数据库返回的gwrznx值");
|
||||||
|
education.xl.forEach((item: any, index: number) => {
|
||||||
|
console.log(`挂载后-表单项${index}数据:`, {
|
||||||
|
gwrzkstime: item.value.gwrzkstime,
|
||||||
|
gwrzjstime: item.value.gwrzjstime,
|
||||||
|
gwrznx: item.value.gwrznx, // 直接使用数据库返回的值
|
||||||
|
来源: "数据库回显-挂载后",
|
||||||
|
});
|
||||||
|
});
|
||||||
|
forceUpdateKey.value++;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.delete-icon {
|
.delete-icon {
|
||||||
|
|||||||
@ -31,18 +31,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<template #bottom>
|
<template #bottom>
|
||||||
<view class="flex-row items-center pb-10 pt-5">
|
<view class="flex-row items-center pb-10 pt-5">
|
||||||
<u-button
|
<u-button text="提交" class="mx-15" type="primary" @click="submit" />
|
||||||
text="上一步"
|
|
||||||
class="ml-15 mr-7"
|
|
||||||
:plain="true"
|
|
||||||
@click="navigateBack"
|
|
||||||
/>
|
|
||||||
<u-button
|
|
||||||
text="提交"
|
|
||||||
class="mr-15 mr-7"
|
|
||||||
type="primary"
|
|
||||||
@click="submit"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</BasicLayout>
|
</BasicLayout>
|
||||||
@ -89,15 +78,15 @@ const baseSchema = [
|
|||||||
ok: (selectedIndex: number, form: any, list: any, attrs: any) => {
|
ok: (selectedIndex: number, form: any, list: any, attrs: any) => {
|
||||||
const selectedCategory = list[selectedIndex];
|
const selectedCategory = list[selectedIndex];
|
||||||
const formIndex = attrs.index;
|
const formIndex = attrs.index;
|
||||||
|
|
||||||
// 更新当前表单项的获奖级别选项
|
// 更新当前表单项的获奖级别选项
|
||||||
updateAwardLevels(formIndex, selectedCategory);
|
updateAwardLevels(formIndex, selectedCategory);
|
||||||
|
|
||||||
// 清空已选择的获奖级别(如果之前有选择的话)
|
// 清空已选择的获奖级别(如果之前有选择的话)
|
||||||
if (education.xl[formIndex].value.xm) {
|
if (education.xl[formIndex].value.xm) {
|
||||||
education.xl[formIndex].value.xm = "";
|
education.xl[formIndex].value.xm = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 强制重新渲染
|
// 强制重新渲染
|
||||||
forceUpdateKey.value++;
|
forceUpdateKey.value++;
|
||||||
},
|
},
|
||||||
@ -113,7 +102,7 @@ const baseSchema = [
|
|||||||
savaKey: "id",
|
savaKey: "id",
|
||||||
open: (value: any, attrs: any, model: any) => {
|
open: (value: any, attrs: any, model: any) => {
|
||||||
const formIndex = attrs.index;
|
const formIndex = attrs.index;
|
||||||
|
|
||||||
// 检查是否已选择荣誉类别
|
// 检查是否已选择荣誉类别
|
||||||
if (!model?.hilb_id) {
|
if (!model?.hilb_id) {
|
||||||
showToast({
|
showToast({
|
||||||
@ -122,10 +111,10 @@ const baseSchema = [
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查是否有对应的获奖级别数据
|
// 检查是否有对应的获奖级别数据
|
||||||
const awardLevels = awardLevelsMap[formIndex] || [];
|
const awardLevels = awardLevelsMap[formIndex] || [];
|
||||||
|
|
||||||
if (awardLevels.length === 0) {
|
if (awardLevels.length === 0) {
|
||||||
showToast({
|
showToast({
|
||||||
title: "该荣誉类别暂无获奖级别数据",
|
title: "该荣誉类别暂无获奖级别数据",
|
||||||
@ -133,7 +122,7 @@ const baseSchema = [
|
|||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -171,13 +160,13 @@ const baseSchema = [
|
|||||||
// 为每个表单项生成动态的schema
|
// 为每个表单项生成动态的schema
|
||||||
const getSchemaForIndex = (index: number) => {
|
const getSchemaForIndex = (index: number) => {
|
||||||
const schema = cloneDeep(baseSchema);
|
const schema = cloneDeep(baseSchema);
|
||||||
|
|
||||||
// 更新获奖级别的选项数据
|
// 更新获奖级别的选项数据
|
||||||
const hjjbField = schema.find((item) => item.field === "xm");
|
const hjjbField = schema.find((item) => item.field === "xm");
|
||||||
if (hjjbField) {
|
if (hjjbField) {
|
||||||
hjjbField.componentProps.range = awardLevelsMap[index] || [];
|
hjjbField.componentProps.range = awardLevelsMap[index] || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return schema;
|
return schema;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -203,14 +192,14 @@ const initHonorCategories = async () => {
|
|||||||
// 初始化回显数据
|
// 初始化回显数据
|
||||||
const initEchoData = async () => {
|
const initEchoData = async () => {
|
||||||
await initHonorCategories();
|
await initHonorCategories();
|
||||||
|
|
||||||
// 为每个已有数据的表单项初始化获奖级别选项
|
// 为每个已有数据的表单项初始化获奖级别选项
|
||||||
education.xl.forEach((formItem: any, index: number) => {
|
education.xl.forEach((formItem: any, index: number) => {
|
||||||
if (formItem.value?.hilb_id) {
|
if (formItem.value?.hilb_id) {
|
||||||
const category = honorCategories.value.find(
|
const category = honorCategories.value.find(
|
||||||
(cat: any) => cat.id === formItem.value.hilb_id
|
(cat: any) => cat.id === formItem.value.hilb_id
|
||||||
);
|
);
|
||||||
|
|
||||||
if (category) {
|
if (category) {
|
||||||
// 更新获奖级别选项
|
// 更新获奖级别选项
|
||||||
updateAwardLevels(index, category);
|
updateAwardLevels(index, category);
|
||||||
@ -219,7 +208,7 @@ const initEchoData = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 强制重新渲染以确保获奖级别能正确显示
|
// 强制重新渲染以确保获奖级别能正确显示
|
||||||
forceUpdateKey.value++;
|
forceUpdateKey.value++;
|
||||||
};
|
};
|
||||||
@ -228,7 +217,7 @@ const initEchoData = async () => {
|
|||||||
function addEducation() {
|
function addEducation() {
|
||||||
const newIndex = education.xl.length;
|
const newIndex = education.xl.length;
|
||||||
education.xl.push({ value: {} });
|
education.xl.push({ value: {} });
|
||||||
|
|
||||||
// 为新项初始化空的获奖级别选项
|
// 为新项初始化空的获奖级别选项
|
||||||
awardLevelsMap[newIndex] = [];
|
awardLevelsMap[newIndex] = [];
|
||||||
}
|
}
|
||||||
@ -237,7 +226,7 @@ function addEducation() {
|
|||||||
function deleteMemberFamily(index: number, item: any) {
|
function deleteMemberFamily(index: number, item: any) {
|
||||||
// 删除对应的获奖级别数据
|
// 删除对应的获奖级别数据
|
||||||
delete awardLevelsMap[index];
|
delete awardLevelsMap[index];
|
||||||
|
|
||||||
// 重新整理awardLevelsMap的键值
|
// 重新整理awardLevelsMap的键值
|
||||||
const newAwardLevelsMap: Record<number, any[]> = {};
|
const newAwardLevelsMap: Record<number, any[]> = {};
|
||||||
education.xl.forEach((_: any, i: number) => {
|
education.xl.forEach((_: any, i: number) => {
|
||||||
@ -247,10 +236,10 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
newAwardLevelsMap[i - 1] = awardLevelsMap[i] || [];
|
newAwardLevelsMap[i - 1] = awardLevelsMap[i] || [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 删除表单项
|
// 删除表单项
|
||||||
education.xl.splice(index, 1);
|
education.xl.splice(index, 1);
|
||||||
|
|
||||||
// 更新awardLevelsMap
|
// 更新awardLevelsMap
|
||||||
Object.keys(awardLevelsMap).forEach(
|
Object.keys(awardLevelsMap).forEach(
|
||||||
(key: string) => delete awardLevelsMap[Number(key)]
|
(key: string) => delete awardLevelsMap[Number(key)]
|
||||||
@ -260,36 +249,32 @@ function deleteMemberFamily(index: number, item: any) {
|
|||||||
|
|
||||||
// 提交数据
|
// 提交数据
|
||||||
function submit() {
|
function submit() {
|
||||||
setFile({
|
const gkkRyList = map(education.xl, (item) => {
|
||||||
...getFile,
|
return { ...item.value, hjlxId: "GKKHJQK" };
|
||||||
gkkRyList: map(education.xl, (item) => {
|
|
||||||
return { ...item.value, hjlxId: "GKKHJQK" };
|
|
||||||
}),
|
|
||||||
});
|
|
||||||
navigateTo("/pages/view/hr/teacherProfile/RecordMaterials");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始化数据
|
|
||||||
const { getFile, setFile } = useDataStore();
|
|
||||||
|
|
||||||
// 处理回显数据
|
|
||||||
if (getFile.gkkRyList && getFile.gkkRyList.length > 0) {
|
|
||||||
education.xl = map(getFile.gkkRyList, (item) => {
|
|
||||||
return { value: item };
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// // 初始化数据
|
||||||
|
// const { getFile, setFile } = useDataStore();
|
||||||
|
|
||||||
|
// // 处理回显数据
|
||||||
|
// if (getFile.gkkRyList && getFile.gkkRyList.length > 0) {
|
||||||
|
// education.xl = map(getFile.gkkRyList, (item) => {
|
||||||
|
// return { value: item };
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
// 页面加载时初始化
|
// 页面加载时初始化
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (getFile.gkkRyList && getFile.gkkRyList.length > 0) {
|
// if (getFile.gkkRyList && getFile.gkkRyList.length > 0) {
|
||||||
// 有回显数据时,延迟初始化确保数据正确加载
|
// // 有回显数据时,延迟初始化确保数据正确加载
|
||||||
nextTick(() => {
|
// nextTick(() => {
|
||||||
initEchoData();
|
// initEchoData();
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
// 无回显数据时,只需要初始化荣誉类别
|
// // 无回显数据时,只需要初始化荣誉类别
|
||||||
initHonorCategories();
|
// initHonorCategories();
|
||||||
}
|
// }
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@ -121,8 +121,10 @@ const schema = reactive<FormsSchema[]>([
|
|||||||
{
|
{
|
||||||
field: "qqtime",
|
field: "qqtime",
|
||||||
label: "起聘时间",
|
label: "起聘时间",
|
||||||
component: "BasicDateTimes",
|
component: "BasicDateTime",
|
||||||
componentProps: {},
|
componentProps: {
|
||||||
|
mode: "year-month",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "pywjh",
|
field: "pywjh",
|
||||||
|
|||||||
@ -5,24 +5,19 @@
|
|||||||
</view>
|
</view>
|
||||||
<template #bottom>
|
<template #bottom>
|
||||||
<view class="flex-row items-center pb-10 pt-5">
|
<view class="flex-row items-center pb-10 pt-5">
|
||||||
<u-button
|
<u-button text="下一步" class="mx-15" type="primary" @click="submit" />
|
||||||
text="下一步"
|
|
||||||
class="mx-15 "
|
|
||||||
type="primary"
|
|
||||||
@click="submit"
|
|
||||||
/>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</BasicLayout>
|
</BasicLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {navigateTo} from "@/utils/uniapp";
|
import { navigateTo } from "@/utils/uniapp";
|
||||||
|
|
||||||
import {useForm} from "@/components/BasicForm/hooks/useForm";
|
import { useForm } from "@/components/BasicForm/hooks/useForm";
|
||||||
import {dicApi, findDicTreeByPidApi} from "@/api/system/dic";
|
import { dicApi, findDicTreeByPidApi } from "@/api/system/dic";
|
||||||
import {useDataStore} from "@/store/modules/data";
|
import { useDataStore } from "@/store/modules/data";
|
||||||
import {map} from "lodash";
|
import { map } from "lodash";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
const { getFile, setFile } = useDataStore();
|
const { getFile, setFile } = useDataStore();
|
||||||
@ -46,9 +41,7 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
field: "jsdah",
|
field: "jsdah",
|
||||||
label: "档案号",
|
label: "档案号",
|
||||||
component: "BasicInput",
|
component: "BasicInput",
|
||||||
componentProps: {
|
componentProps: {},
|
||||||
disabled: true,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "jsxm",
|
field: "jsxm",
|
||||||
@ -73,7 +66,7 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicDataPicker",
|
component: "BasicDataPicker",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
api: findDicTreeByPidApi,
|
api: findDicTreeByPidApi,
|
||||||
param: { pid: 3701 },
|
param: { pid: 100 },
|
||||||
rangeKey: "dictionaryValue",
|
rangeKey: "dictionaryValue",
|
||||||
savaKey: "dictionaryCode",
|
savaKey: "dictionaryCode",
|
||||||
onChange: (e: any) => {
|
onChange: (e: any) => {
|
||||||
@ -164,13 +157,13 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "jsTime",
|
field: "jltime",
|
||||||
label: "任教开始时间",
|
label: "教龄计算时间",
|
||||||
component: "BasicDateTime",
|
component: "BasicDateTime",
|
||||||
componentProps: {
|
componentProps: {
|
||||||
mode: "year-month",
|
mode: "year-month",
|
||||||
ok: (e: any) => {
|
ok: (e: any) => {
|
||||||
const yearDiff = calculateYearDiff(e);
|
const yearDiff = calculateYearDiff(e.value);
|
||||||
setValue({ jl: yearDiff });
|
setValue({ jl: yearDiff });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -256,7 +249,7 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
component: "BasicInput",
|
component: "BasicInput",
|
||||||
componentProps: {},
|
componentProps: {},
|
||||||
},
|
},
|
||||||
{
|
/* {
|
||||||
field: "gwjbId",
|
field: "gwjbId",
|
||||||
label: "岗位级别",
|
label: "岗位级别",
|
||||||
component: "BasicPicker",
|
component: "BasicPicker",
|
||||||
@ -277,7 +270,7 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
rangeKey: "dictionaryValue",
|
rangeKey: "dictionaryValue",
|
||||||
savaKey: "dictionaryCode",
|
savaKey: "dictionaryCode",
|
||||||
},
|
},
|
||||||
},
|
},*/
|
||||||
{
|
{
|
||||||
field: "sbkh",
|
field: "sbkh",
|
||||||
label: "社保卡号",
|
label: "社保卡号",
|
||||||
@ -287,6 +280,14 @@ const [register, { getValue, setValue, setSchema }] = useForm({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
setValue(getFile);
|
setValue(getFile);
|
||||||
|
if (getFile.zdqkId == "调出") {
|
||||||
|
setSchema([
|
||||||
|
{
|
||||||
|
field: "dcyy",
|
||||||
|
ifShow: false,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -130,11 +130,30 @@ const [register, { getValue, setValue }] = useForm({
|
|||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
setValue(getFile);
|
if (getFile.dzzw && typeof getFile.dzzw == "string") {
|
||||||
|
setValue({
|
||||||
|
...getFile,
|
||||||
|
dzzw: getFile.dzzw.split(","),
|
||||||
|
qtzw: getFile.qtzw && typeof getFile.qtzw == "string" ? getFile.qtzw.split(",") : []
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setValue({
|
||||||
|
...getFile,
|
||||||
|
dzzw: [],
|
||||||
|
qtzw: getFile.qtzw && typeof getFile.qtzw == "string" ? getFile.qtzw.split(",") : []
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
async function submit() {
|
async function submit() {
|
||||||
try {
|
try {
|
||||||
const value = await getValue();
|
const value = await getValue();
|
||||||
|
// 处理 dzzw 和 qtzw 字段,将数组转换为字符串
|
||||||
|
if (Array.isArray(value.dzzw)) {
|
||||||
|
value.dzzw = value.dzzw.join(',');
|
||||||
|
}
|
||||||
|
if (Array.isArray(value.qtzw)) {
|
||||||
|
value.qtzw = value.qtzw.join(',');
|
||||||
|
}
|
||||||
setFile({ ...getFile, ...value });
|
setFile({ ...getFile, ...value });
|
||||||
navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
|
navigateTo("/pages/view/hr/teacherProfile/TitleInfo");
|
||||||
} catch (error) {}
|
} catch (error) {}
|
||||||
|
|||||||
11
src/pages/view/routine/GongZuoLiang/index.vue
Normal file
11
src/pages/view/routine/GongZuoLiang/index.vue
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@ -1,128 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view class="container">
|
|
||||||
<uni-card :is-shadow="false" is-full>
|
|
||||||
<view class="header">
|
|
||||||
<text class="score">我的得分: 84</text>
|
|
||||||
<view class="status">
|
|
||||||
<text>我的状态: </text>
|
|
||||||
<view class="status-indicator"></view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</uni-card>
|
|
||||||
|
|
||||||
<uni-card :is-shadow="false" is-full margin="10px 0 0 0">
|
|
||||||
<view class="list-header">
|
|
||||||
<text class="category-header">分类</text>
|
|
||||||
<text class="value-header">分值</text>
|
|
||||||
</view>
|
|
||||||
<view class="list-item" v-for="(item, index) in evaluationItems" :key="index">
|
|
||||||
<text class="category-name">{{ item.category }}</text>
|
|
||||||
<text class="value">{{ item.value }}</text>
|
|
||||||
</view>
|
|
||||||
</uni-card>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
|
|
||||||
const evaluationItems = ref([
|
|
||||||
{ category: '师德师风', value: 8 },
|
|
||||||
{ category: '考勤管理', value: 4 },
|
|
||||||
{ category: '资料上交', value: 1 },
|
|
||||||
{ category: '教学质量', value: 1 },
|
|
||||||
{ category: '教育科研课题', value: 8 },
|
|
||||||
{ category: '个人材料发表和获奖', value: 9 },
|
|
||||||
{ category: '展示交流和比赛', value: 4 },
|
|
||||||
{ category: '工作室活动', value: 5 },
|
|
||||||
{ category: '荣誉', value: 6 },
|
|
||||||
{ category: '辅导学生', value: 7 },
|
|
||||||
{ category: '安全管理', value: 2 },
|
|
||||||
{ category: '班级常规管理', value: 7 },
|
|
||||||
]);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
.container {
|
|
||||||
background-color: #f8f8f8;
|
|
||||||
min-height: 100vh;
|
|
||||||
padding: 15px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
.header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 10px 0; // Adjusted padding
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.score {
|
|
||||||
color: #333;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-indicator {
|
|
||||||
width: 12px;
|
|
||||||
height: 12px;
|
|
||||||
background-color: #4caf50; // Green color from the image
|
|
||||||
margin-left: 8px;
|
|
||||||
border-radius: 2px; // Slightly rounded corners
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove default card padding if needed
|
|
||||||
::v-deep .uni-card .uni-card__content {
|
|
||||||
padding: 10px 15px !important; // Overwrite default padding
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.list-header {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 10px 0; // Adjust padding as needed
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
color: #666;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-header {
|
|
||||||
flex: 3; // Give more space to category
|
|
||||||
}
|
|
||||||
|
|
||||||
.value-header {
|
|
||||||
flex: 1;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.list-item {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
padding: 12px 0; // Vertical padding for spacing
|
|
||||||
border-bottom: 1px solid #eee;
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
&:last-child {
|
|
||||||
border-bottom: none; // Remove border for the last item
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.category-name {
|
|
||||||
flex: 3; // Corresponds to header
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
flex: 1; // Corresponds to header
|
|
||||||
text-align: right;
|
|
||||||
color: #333;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
225
src/pages/view/routine/JiFenPingJia/JiFenPingJia.vue
Normal file
225
src/pages/view/routine/JiFenPingJia/JiFenPingJia.vue
Normal file
@ -0,0 +1,225 @@
|
|||||||
|
<template>
|
||||||
|
<BasicLayout>
|
||||||
|
<view class="container">
|
||||||
|
<uni-card :is-shadow="false" is-full>
|
||||||
|
<view class="header">
|
||||||
|
<text class="score">我的得分: 84</text>
|
||||||
|
<view class="status">
|
||||||
|
<text>我的状态: </text>
|
||||||
|
<view class="status-indicator"></view>
|
||||||
|
<view class="review-count" v-if="reviewingCount > 0">
|
||||||
|
{{ reviewingCount }}项在审核
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-card>
|
||||||
|
|
||||||
|
<uni-card :is-shadow="false" is-full margin="10px 0 0 0">
|
||||||
|
<view class="list-header">
|
||||||
|
<text class="category-header">分类</text>
|
||||||
|
<text class="value-header">分值</text>
|
||||||
|
</view>
|
||||||
|
<view
|
||||||
|
class="list-item"
|
||||||
|
v-for="(item, index) in evaluationItems"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="flex-row items-center justify-between w-full"
|
||||||
|
@click="handleItemClick(item)"
|
||||||
|
>
|
||||||
|
<view class="category-name">{{ item.category }}</view>
|
||||||
|
<view class="flex-row items-center">
|
||||||
|
<text class="value">{{ item.value }}</text>
|
||||||
|
<view class="review-badge" v-if="item.isUnderReview">审</view>
|
||||||
|
<u-icon name="arrow-right" size="16" color="#999"></u-icon
|
||||||
|
></view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-card>
|
||||||
|
</view>
|
||||||
|
<template #bottom>
|
||||||
|
<view class="white-bg-color py-5">
|
||||||
|
<view class="flex-row items-center pb-10 pt-5">
|
||||||
|
<u-button
|
||||||
|
text="上传个人荣誉"
|
||||||
|
class="ml-15 mr-7"
|
||||||
|
:plain="true"
|
||||||
|
@click="scgrry"
|
||||||
|
/>
|
||||||
|
<u-button
|
||||||
|
text="上传公开课获奖"
|
||||||
|
class="mr-15 mr-7"
|
||||||
|
type="primary"
|
||||||
|
@click="scgkkhj"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
</BasicLayout>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, computed } from "vue";
|
||||||
|
|
||||||
|
const evaluationItems = ref([
|
||||||
|
{ category: "师德师风", value: 8, isUnderReview: false },
|
||||||
|
{ category: "考勤管理", value: 4, isUnderReview: true },
|
||||||
|
{ category: "资料上交", value: 1, isUnderReview: false },
|
||||||
|
{ category: "教学质量", value: 1, isUnderReview: true },
|
||||||
|
{ category: "教育科研课题", value: 8, isUnderReview: false },
|
||||||
|
{ category: "个人材料发表和获奖", value: 9, isUnderReview: true },
|
||||||
|
{ category: "展示交流和比赛", value: 4, isUnderReview: false },
|
||||||
|
{ category: "工作室活动", value: 5, isUnderReview: false },
|
||||||
|
{ category: "荣誉", value: 6, isUnderReview: true },
|
||||||
|
{ category: "辅导学生", value: 7, isUnderReview: false },
|
||||||
|
{ category: "安全管理", value: 2, isUnderReview: false },
|
||||||
|
{ category: "班级常规管理", value: 7, isUnderReview: true },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 计算正在审核的项目数量
|
||||||
|
const reviewingCount = computed(() => {
|
||||||
|
return evaluationItems.value.filter(item => item.isUnderReview).length;
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleItemClick(item: any) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/view/routine/JiFenPingJia/detail?id=${item.id}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function scgrry() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/view/hr/teacherProfile/PersonalHonor`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function scgkkhj() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/view/hr/teacherProfile/PublicClassAwards`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
background-color: #f8f8f8;
|
||||||
|
min-height: 100vh;
|
||||||
|
padding: 15px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 10px 0; // Adjusted padding
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.score {
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-indicator {
|
||||||
|
width: 12px;
|
||||||
|
height: 12px;
|
||||||
|
background-color: #4caf50; // Green color from the image
|
||||||
|
margin-left: 8px;
|
||||||
|
border-radius: 2px; // Slightly rounded corners
|
||||||
|
}
|
||||||
|
|
||||||
|
.review-count {
|
||||||
|
background-color: #fff2e8;
|
||||||
|
color: #ff6b35;
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-left: 12px;
|
||||||
|
border: 1px solid #ff6b35;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove default card padding if needed
|
||||||
|
::v-deep .uni-card .uni-card__content {
|
||||||
|
padding: 10px 15px !important; // Overwrite default padding
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 0; // Adjust padding as needed
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
color: #666;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-header {
|
||||||
|
flex: 3; // Give more space to category
|
||||||
|
}
|
||||||
|
|
||||||
|
.value-header {
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 12px 0; // Vertical padding for spacing
|
||||||
|
border-bottom: 1px solid #eee;
|
||||||
|
font-size: 14px;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none; // Remove border for the last item
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.category-name {
|
||||||
|
flex: 3; // Corresponds to header
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
flex: 1; // Corresponds to header
|
||||||
|
text-align: right;
|
||||||
|
color: #333;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.review-badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: #ff6b35;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-right: 8px;
|
||||||
|
animation: pulse 2s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0% {
|
||||||
|
box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
|
||||||
|
}
|
||||||
|
70% {
|
||||||
|
box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
277
src/pages/view/routine/JiFenPingJia/detail.vue
Normal file
277
src/pages/view/routine/JiFenPingJia/detail.vue
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
<template>
|
||||||
|
<view class="detail-container">
|
||||||
|
<view class="content-wrapper">
|
||||||
|
<!-- 评分标准 -->
|
||||||
|
<view class="form-section">
|
||||||
|
<view class="section-title">评分标准</view>
|
||||||
|
<view class="standard-text">
|
||||||
|
1.一二年级考核语文、数学两个学科。平行班教学质量评价差距均在2分内的,按一...
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 考核评价 -->
|
||||||
|
<view class="detail-item">
|
||||||
|
<text class="detail-label">考核评价</text>
|
||||||
|
<text class="detail-value">{{ detailData.evaluationType }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 积分类型 -->
|
||||||
|
<view class="detail-item">
|
||||||
|
<text class="detail-label">积分类型</text>
|
||||||
|
<text class="detail-value">{{ detailData.scoreType }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 积分分值 -->
|
||||||
|
<view class="detail-item">
|
||||||
|
<text class="detail-label">积分分值</text>
|
||||||
|
<text class="detail-value">{{ detailData.scoreValue }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 考核处室 -->
|
||||||
|
<view class="detail-item">
|
||||||
|
<text class="detail-label">考核处室</text>
|
||||||
|
<text class="detail-value">{{ detailData.department }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 考核时间 -->
|
||||||
|
<view class="detail-item">
|
||||||
|
<text class="detail-label">考核时间</text>
|
||||||
|
<text class="detail-value">{{ detailData.evaluationDate }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 考核打分 -->
|
||||||
|
<view class="detail-item">
|
||||||
|
<text class="detail-label">考核打分</text>
|
||||||
|
<text class="detail-value">{{ detailData.score }}</text>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 证明材料 -->
|
||||||
|
<view class="detail-item file-section" v-if="detailData.files.length > 0">
|
||||||
|
<text class="detail-label">证明材料</text>
|
||||||
|
<view class="file-list">
|
||||||
|
<view
|
||||||
|
class="file-item"
|
||||||
|
v-for="(file, index) in detailData.files"
|
||||||
|
:key="index"
|
||||||
|
@click="previewFile(file)"
|
||||||
|
>
|
||||||
|
<uni-icons type="paperplane" size="16" color="#409eff" />
|
||||||
|
<text class="file-name">{{ file.name }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 转手机端按钮 -->
|
||||||
|
<view class="bottom-actions">
|
||||||
|
<button class="mobile-btn" @click="goBack">返回</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, onMounted } from "vue";
|
||||||
|
|
||||||
|
interface DetailData {
|
||||||
|
evaluationType: string;
|
||||||
|
scoreType: string;
|
||||||
|
scoreValue: number | string;
|
||||||
|
department: string;
|
||||||
|
evaluationDate: string;
|
||||||
|
score: number | string;
|
||||||
|
files: Array<{ name: string; url: string }>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 详情数据
|
||||||
|
const detailData = ref<DetailData>({
|
||||||
|
evaluationType: "考核评价",
|
||||||
|
scoreType: "加分",
|
||||||
|
scoreValue: 1,
|
||||||
|
department: "教科处",
|
||||||
|
evaluationDate: "2025-06-08",
|
||||||
|
score: 90,
|
||||||
|
files: [
|
||||||
|
{ name: "教学成果证明.pdf", url: "/files/certificate.pdf" },
|
||||||
|
{ name: "获奖证书.jpg", url: "/files/award.jpg" },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
// 返回上一页
|
||||||
|
const goBack = () => {
|
||||||
|
uni.navigateBack();
|
||||||
|
};
|
||||||
|
|
||||||
|
// 预览文件
|
||||||
|
const previewFile = (file: { name: string; url: string }) => {
|
||||||
|
// 根据文件类型进行预览
|
||||||
|
const ext = file.name.split(".").pop()?.toLowerCase();
|
||||||
|
|
||||||
|
if (["jpg", "jpeg", "png", "gif"].includes(ext || "")) {
|
||||||
|
// 图片预览
|
||||||
|
uni.previewImage({
|
||||||
|
urls: [file.url],
|
||||||
|
current: file.url,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// 其他文件类型提示下载
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: `是否下载文件: ${file.name}?`,
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
// TODO: 实现文件下载逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: "开始下载",
|
||||||
|
icon: "success",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 转手机端
|
||||||
|
const transferToMobile = () => {
|
||||||
|
uni.showModal({
|
||||||
|
title: "提示",
|
||||||
|
content: "确定要转到手机端处理吗?",
|
||||||
|
success: (res) => {
|
||||||
|
if (res.confirm) {
|
||||||
|
// TODO: 实现转手机端逻辑
|
||||||
|
uni.showToast({
|
||||||
|
title: "已转至手机端",
|
||||||
|
icon: "success",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 页面加载时可以获取详情数据
|
||||||
|
console.log("页面加载完成");
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.detail-container {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content-wrapper {
|
||||||
|
padding: 30rpx 30rpx 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-section {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.standard-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
|
.detail-label {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
width: 160rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-value {
|
||||||
|
flex: 1;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-section {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
|
||||||
|
.detail-label {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-list {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.file-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 15rpx 20rpx;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #e6f7ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
uni-icons {
|
||||||
|
margin-right: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-name {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #333;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom-actions {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
padding-bottom: calc(20rpx + env(safe-area-inset-bottom));
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-top: 1rpx solid #eee;
|
||||||
|
|
||||||
|
.mobile-btn {
|
||||||
|
width: 100%;
|
||||||
|
height: 88rpx;
|
||||||
|
background-color: #ff4757;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 44rpx;
|
||||||
|
border: none;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
background-color: #ff3742;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,396 +1,393 @@
|
|||||||
<template>
|
<template>
|
||||||
<BasicListLayout
|
<view class="teaching-resource-page">
|
||||||
:show-nav-bar="true"
|
<!-- 主要内容区域 -->
|
||||||
:nav-bar-props="{ title: '教学资源' }"
|
<view class="main-content">
|
||||||
@register="register"
|
<!-- 左侧课程列表 -->
|
||||||
>
|
<view class="left-panel">
|
||||||
<template #top>
|
<scroll-view class="subject-list" scroll-y="true" show-scrollbar="false">
|
||||||
<view class="filter-section">
|
<view
|
||||||
<!-- Directory Filter -->
|
class="subject-item"
|
||||||
<view class="filter-item" @click="openFilterPopup('directory')">
|
v-for="(subject, index) in subjectList"
|
||||||
<text>{{ selectedDirectory?.name || '目录' }}</text>
|
:key="subject.id"
|
||||||
<uni-icons type="bottom" size="14"></uni-icons>
|
:class="{ active: selectedSubjectIndex === index }"
|
||||||
</view>
|
@click="selectSubject(index)"
|
||||||
<!-- Type Filter 1 -->
|
>
|
||||||
<view class="filter-item" @click="openFilterPopup('type1')">
|
<text class="subject-name">{{ subject.name }}</text>
|
||||||
<text>{{ selectedType1?.name || '类型' }}</text>
|
|
||||||
<uni-icons type="bottom" size="14"></uni-icons>
|
|
||||||
</view>
|
|
||||||
<!-- Type Filter 2 -->
|
|
||||||
<view class="filter-item" @click="openFilterPopup('type2')">
|
|
||||||
<text>{{ selectedType2?.name || '类型' }}</text>
|
|
||||||
<uni-icons type="bottom" size="14"></uni-icons>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #default="{ list }">
|
|
||||||
<view class="list-container">
|
|
||||||
<!-- Add @click handler to navigate -->
|
|
||||||
<view class="resource-item" v-for="item in list" :key="item.id" @click="goToDetail(item.id)">
|
|
||||||
<view class="item-icon-container">
|
|
||||||
<view class="item-icon">{{ item.iconLetter }}</view>
|
|
||||||
<text class="item-pages">-{{ item.pages }}页-</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-details">
|
</scroll-view>
|
||||||
<text class="item-title">{{ item.title }}</text>
|
</view>
|
||||||
<view class="item-meta">
|
|
||||||
<text class="meta-text">{{ item.publishDate }}</text>
|
<!-- 右侧内容区域 -->
|
||||||
<text class="meta-text">浏览量: {{ item.views }}</text>
|
<view class="right-panel">
|
||||||
<text class="meta-text">下载量: {{ item.downloads }}</text>
|
<!-- 资源类型 -->
|
||||||
|
<view class="resource-section" v-if="currentSubject.resourceTypes && currentSubject.resourceTypes.length > 0">
|
||||||
|
<view class="section-title">资源类型</view>
|
||||||
|
<view class="type-grid">
|
||||||
|
<view
|
||||||
|
class="type-item"
|
||||||
|
v-for="(type, index) in currentSubject.resourceTypes"
|
||||||
|
:key="index"
|
||||||
|
@click="goToResourceList('type', type)"
|
||||||
|
>
|
||||||
|
<text class="type-text">{{ type }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 年级选择 -->
|
||||||
|
<view class="grade-section" v-if="currentSubject.grades && currentSubject.grades.length > 0">
|
||||||
|
<view class="section-title">年级</view>
|
||||||
|
<view class="grade-grid">
|
||||||
|
<view
|
||||||
|
class="grade-item"
|
||||||
|
v-for="(grade, index) in currentSubject.grades"
|
||||||
|
:key="index"
|
||||||
|
@click="goToResourceList('grade', grade)"
|
||||||
|
>
|
||||||
|
<text class="grade-text">{{ grade }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 空状态 -->
|
||||||
|
<view class="empty-state" v-if="!currentSubject.name">
|
||||||
|
<text class="empty-text">请从左侧选择学科</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</view>
|
||||||
|
</view>
|
||||||
</BasicListLayout>
|
|
||||||
|
|
||||||
<!-- Filter Popup -->
|
|
||||||
<uni-popup ref="filterPopupRef" type="bottom" background-color="#fff">
|
|
||||||
<view class="popup-content">
|
|
||||||
<view class="popup-header">
|
|
||||||
<text>{{ currentFilterTitle }}</text>
|
|
||||||
<uni-icons type="closeempty" size="20" @click="closeFilterPopup"></uni-icons>
|
|
||||||
</view>
|
|
||||||
<scroll-view scroll-y class="popup-options">
|
|
||||||
<view
|
|
||||||
class="option-item"
|
|
||||||
v-for="option in currentFilterOptions"
|
|
||||||
:key="option.id"
|
|
||||||
:class="{ active: isOptionSelected(option) }"
|
|
||||||
@click="selectFilterOption(option)"
|
|
||||||
>
|
|
||||||
{{ option.name }}
|
|
||||||
</view>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</uni-popup>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, computed } from "vue";
|
import { reactive, ref, computed, onMounted } from "vue";
|
||||||
import { useLayout } from "@/components/BasicListLayout/hooks/useLayout";
|
|
||||||
|
|
||||||
interface Resource {
|
// 定义数据接口
|
||||||
id: number;
|
interface Subject {
|
||||||
iconLetter: string;
|
id: string;
|
||||||
title: string;
|
|
||||||
pages: number;
|
|
||||||
publishDate: string;
|
|
||||||
views: number;
|
|
||||||
downloads: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FilterOption {
|
|
||||||
id: string | number | null;
|
|
||||||
name: string;
|
name: string;
|
||||||
|
description: string;
|
||||||
|
resourceTypes?: string[];
|
||||||
|
grades?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Filter Data (Mock) ---
|
// 响应式数据
|
||||||
const directories = ref<FilterOption[]>([
|
const selectedSubjectIndex = ref(1); // 默认选中数学
|
||||||
{ id: null, name: '全部目录' },
|
|
||||||
{ id: 'd1', name: '数学教案' },
|
|
||||||
{ id: 'd2', name: '语文课件' },
|
|
||||||
{ id: 'd3', name: '英语练习' },
|
|
||||||
{ id: 'd4', name: '科学实验' },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const types1 = ref<FilterOption[]>([
|
// 模拟课程数据
|
||||||
{ id: null, name: '全部类型1' },
|
const subjectList = reactive<Subject[]>([
|
||||||
{ id: 't1-1', name: '课件PPT' },
|
{
|
||||||
{ id: 't1-2', name: '教学视频' },
|
id: 'chinese',
|
||||||
{ id: 't1-3', name: 'Word文档' },
|
name: '语文',
|
||||||
]);
|
description: '语言文字运用与文学鉴赏',
|
||||||
|
resourceTypes: ['课件', '教案', '学案', '作业', '试卷'],
|
||||||
const types2 = ref<FilterOption[]>([
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
{ id: null, name: '全部类型2' },
|
|
||||||
{ id: 't2-1', name: '期中' },
|
|
||||||
{ id: 't2-2', name: '期末' },
|
|
||||||
{ id: 't2-3', name: '单元测试' },
|
|
||||||
]);
|
|
||||||
|
|
||||||
// --- Filter State ---
|
|
||||||
const selectedDirectory = ref<FilterOption | null>(directories.value[0]);
|
|
||||||
const selectedType1 = ref<FilterOption | null>(types1.value[0]);
|
|
||||||
const selectedType2 = ref<FilterOption | null>(types2.value[0]);
|
|
||||||
const filterPopupRef = ref<any>(null);
|
|
||||||
const currentFilterType = ref<'directory' | 'type1' | 'type2' | null>(null);
|
|
||||||
|
|
||||||
// --- Computed Properties for Popup ---
|
|
||||||
const currentFilterOptions = computed(() => {
|
|
||||||
switch (currentFilterType.value) {
|
|
||||||
case 'directory': return directories.value;
|
|
||||||
case 'type1': return types1.value;
|
|
||||||
case 'type2': return types2.value;
|
|
||||||
default: return [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const currentFilterTitle = computed(() => {
|
|
||||||
switch (currentFilterType.value) {
|
|
||||||
case 'directory': return '选择目录';
|
|
||||||
case 'type1': return '选择类型1';
|
|
||||||
case 'type2': return '选择类型2';
|
|
||||||
default: return '选择选项';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const isOptionSelected = (option: FilterOption) => {
|
|
||||||
switch (currentFilterType.value) {
|
|
||||||
case 'directory': return selectedDirectory.value?.id === option.id;
|
|
||||||
case 'type1': return selectedType1.value?.id === option.id;
|
|
||||||
case 'type2': return selectedType2.value?.id === option.id;
|
|
||||||
default: return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- Mock API (Changed return type to Promise<any>) ---
|
|
||||||
const testList = async (params: any): Promise<any> => {
|
|
||||||
console.log('API called with params:', params);
|
|
||||||
const page = params.page || 1;
|
|
||||||
const pageSize = params.pageSize || 10;
|
|
||||||
|
|
||||||
const allItems: Resource[] = Array.from({ length: 50 }).map((_, index) => {
|
|
||||||
const id = index + 1;
|
|
||||||
const directoryFilter = params.directoryId ? `[目录${params.directoryId}]` : '';
|
|
||||||
const type1Filter = params.type1Id ? `[类型1-${params.type1Id}]` : '';
|
|
||||||
const type2Filter = params.type2Id ? `[类型2-${params.type2Id}]` : '';
|
|
||||||
return {
|
|
||||||
id: id,
|
|
||||||
iconLetter: 'W',
|
|
||||||
title: `专题${String(id).padStart(2, '0')}${directoryFilter}${type1Filter}${type2Filter} (突破)`,
|
|
||||||
pages: 30 + (id % 15),
|
|
||||||
publishDate: `0${1 + (id % 9)}月${10 + (id % 20)}日发布`,
|
|
||||||
views: 1500 + (id * 17 % 500),
|
|
||||||
downloads: 50 + (id * 7 % 40),
|
|
||||||
};
|
|
||||||
});
|
|
||||||
|
|
||||||
let filteredItems = allItems;
|
|
||||||
if (params.directoryId) {
|
|
||||||
filteredItems = filteredItems.filter(item => item.title.includes(`[目录${params.directoryId}]`));
|
|
||||||
}
|
|
||||||
if (params.type1Id) {
|
|
||||||
filteredItems = filteredItems.filter(item => item.title.includes(`[类型1-${params.type1Id}]`));
|
|
||||||
}
|
|
||||||
if (params.type2Id) {
|
|
||||||
filteredItems = filteredItems.filter(item => item.title.includes(`[类型2-${params.type2Id}]`));
|
|
||||||
}
|
|
||||||
|
|
||||||
const totalFilteredItems = filteredItems.length;
|
|
||||||
const paginatedItems = filteredItems.slice((page - 1) * pageSize, page * pageSize);
|
|
||||||
|
|
||||||
return new Promise((resolve) => {
|
|
||||||
setTimeout(() => {
|
|
||||||
// Return structure expected by useLayout
|
|
||||||
resolve({ message: "成功", resultCode: 200, rows: paginatedItems, total: totalFilteredItems });
|
|
||||||
}, 300);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// --- Layout Hook (Removed 'immediate' from componentProps) ---
|
|
||||||
const [register, { reload, setParam }] = useLayout({
|
|
||||||
api: testList,
|
|
||||||
componentProps: {
|
|
||||||
// No problematic props
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'math',
|
||||||
|
name: '数学',
|
||||||
|
description: '数学思维与逻辑推理',
|
||||||
|
resourceTypes: ['题集', '素材', '备课综合'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'english',
|
||||||
|
name: '英语',
|
||||||
|
description: '英语听说读写综合能力',
|
||||||
|
resourceTypes: ['课件', '音频', '视频', '练习'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'moral',
|
||||||
|
name: '道德与法治',
|
||||||
|
description: '品德修养与法律意识',
|
||||||
|
resourceTypes: [],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'science',
|
||||||
|
name: '科学',
|
||||||
|
description: '科学探究与实验操作',
|
||||||
|
resourceTypes: ['实验', '课件', '视频'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'it',
|
||||||
|
name: '信息科技',
|
||||||
|
description: '信息技术与编程思维',
|
||||||
|
resourceTypes: ['软件', '教程', '项目'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'music',
|
||||||
|
name: '音乐',
|
||||||
|
description: '音乐欣赏与艺术表现',
|
||||||
|
resourceTypes: ['音频', '乐谱', '视频'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'art',
|
||||||
|
name: '美术',
|
||||||
|
description: '美术创作与艺术鉴赏',
|
||||||
|
resourceTypes: ['图片', '视频', '作品'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'pe',
|
||||||
|
name: '体育',
|
||||||
|
description: '体育运动与健康生活',
|
||||||
|
resourceTypes: ['视频', '规则', '训练'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'labor',
|
||||||
|
name: '劳动技术',
|
||||||
|
description: '劳动实践与技能培养',
|
||||||
|
resourceTypes: ['教程', '工具', '项目'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'expand',
|
||||||
|
name: '拓展',
|
||||||
|
description: '综合素质拓展活动',
|
||||||
|
resourceTypes: ['活动', '方案', '素材'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'psychology',
|
||||||
|
name: '心理健康',
|
||||||
|
description: '心理健康与情感教育',
|
||||||
|
resourceTypes: ['课件', '测试', '案例'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'practice',
|
||||||
|
name: '综合实践',
|
||||||
|
description: '综合实践活动课程',
|
||||||
|
resourceTypes: ['方案', '案例', '工具'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'calligraphy',
|
||||||
|
name: '书法',
|
||||||
|
description: '书法艺术与汉字文化',
|
||||||
|
resourceTypes: ['字帖', '视频', '作品'],
|
||||||
|
grades: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级']
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 计算属性
|
||||||
|
const currentSubject = computed(() => {
|
||||||
|
return subjectList[selectedSubjectIndex.value] || {};
|
||||||
});
|
});
|
||||||
|
|
||||||
// --- Navigation ---
|
|
||||||
const goToDetail = (id: number) => {
|
|
||||||
|
// 方法
|
||||||
|
const selectSubject = (index: number) => {
|
||||||
|
selectedSubjectIndex.value = index;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 跳转到资源列表页面
|
||||||
|
const goToResourceList = (filterType: string, filterValue: string) => {
|
||||||
|
const subject = currentSubject.value;
|
||||||
|
const params = {
|
||||||
|
subjectId: subject.id,
|
||||||
|
subjectName: subject.name,
|
||||||
|
filterType: filterType,
|
||||||
|
filterValue: filterValue
|
||||||
|
};
|
||||||
|
|
||||||
|
const queryString = Object.entries(params).map(([key, value]) => `${key}=${encodeURIComponent(value)}`).join('&');
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `./detail?id=${id}` // Navigate to detail page in the same directory
|
url: `/pages/view/routine/JiaoXueZiYuan/indexList?${queryString}`
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// --- Filter Popup Methods ---
|
|
||||||
const openFilterPopup = (type: 'directory' | 'type1' | 'type2') => {
|
|
||||||
currentFilterType.value = type;
|
|
||||||
filterPopupRef.value?.open();
|
|
||||||
};
|
|
||||||
|
|
||||||
const closeFilterPopup = () => {
|
|
||||||
filterPopupRef.value?.close();
|
|
||||||
};
|
|
||||||
|
|
||||||
const selectFilterOption = (option: FilterOption) => {
|
|
||||||
switch (currentFilterType.value) {
|
|
||||||
case 'directory':
|
|
||||||
selectedDirectory.value = option;
|
|
||||||
setParam({ directoryId: option.id });
|
|
||||||
break;
|
|
||||||
case 'type1':
|
|
||||||
selectedType1.value = option;
|
|
||||||
setParam({ type1Id: option.id });
|
|
||||||
break;
|
|
||||||
case 'type2':
|
|
||||||
selectedType2.value = option;
|
|
||||||
setParam({ type2Id: option.id });
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
closeFilterPopup();
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
// 页面加载完成后的初始化操作
|
||||||
|
console.log('教学资源页面加载完成');
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.filter-section {
|
.teaching-resource-page {
|
||||||
|
min-height: 100vh;
|
||||||
|
background: #f5f5f5;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
flex-direction: column;
|
||||||
align-items: center;
|
}
|
||||||
padding: 20rpx 30rpx;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-bottom: 1rpx solid #e0e0e0;
|
|
||||||
position: sticky;
|
|
||||||
// Adjust top based on your actual NavBar height if needed
|
|
||||||
// Consider using var(--status-bar-height) + 44px (uni-app standard NavBar)
|
|
||||||
top: 0;
|
|
||||||
z-index: 10;
|
|
||||||
|
|
||||||
.filter-item {
|
// 主要内容区域
|
||||||
display: flex;
|
.main-content {
|
||||||
align-items: center;
|
flex: 1;
|
||||||
font-size: 28rpx;
|
display: flex;
|
||||||
color: #666;
|
height: 100vh;
|
||||||
padding: 10rpx; // Add padding for better click area
|
}
|
||||||
|
|
||||||
|
// 左侧面板
|
||||||
|
.left-panel {
|
||||||
|
width: 280rpx;
|
||||||
|
background: #ffffff;
|
||||||
|
border-right: 1px solid #e5e5e5;
|
||||||
|
|
||||||
|
.subject-list {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subject-item {
|
||||||
|
padding: 30rpx 20rpx;
|
||||||
|
border-bottom: 1px solid #f0f0f0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
text {
|
text-align: center;
|
||||||
margin-right: 8rpx;
|
|
||||||
white-space: nowrap;
|
.subject-name {
|
||||||
overflow: hidden;
|
font-size: 28rpx;
|
||||||
text-overflow: ellipsis;
|
color: #666666;
|
||||||
max-width: 150rpx; // Limit text width
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
uni-icons {
|
&.active {
|
||||||
color: #999;
|
background: #fff3e0;
|
||||||
}
|
|
||||||
}
|
.subject-name {
|
||||||
}
|
color: #ff9800;
|
||||||
|
font-weight: 600;
|
||||||
.list-container {
|
|
||||||
background-color: #f4f5f7;
|
|
||||||
/* Add padding-top to prevent content from hiding behind sticky filter */
|
|
||||||
/* Adjust value based on filter-section height */
|
|
||||||
}
|
|
||||||
|
|
||||||
.resource-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 16rpx;
|
|
||||||
padding: 25rpx 20rpx;
|
|
||||||
margin-bottom: 20rpx;
|
|
||||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
|
||||||
cursor: pointer; // Add cursor pointer to indicate clickability
|
|
||||||
|
|
||||||
.item-icon-container {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
margin-right: 25rpx;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.item-icon {
|
|
||||||
width: 80rpx;
|
|
||||||
height: 80rpx;
|
|
||||||
line-height: 80rpx;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
background-color: #409eff;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 40rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-pages {
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #999;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-details {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.item-title {
|
|
||||||
font-size: 30rpx;
|
|
||||||
color: #333;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 15rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-meta {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #999;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
.meta-text {
|
|
||||||
margin-right: 15rpx;
|
|
||||||
white-space: nowrap;
|
|
||||||
&:last-child {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover:not(.active) {
|
||||||
|
background: #f8f9fa;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Popup Styles
|
// 右侧面板
|
||||||
.popup-content {
|
.right-panel {
|
||||||
background-color: #fff;
|
flex: 1;
|
||||||
border-top-left-radius: 20rpx;
|
background: #ffffff;
|
||||||
border-top-right-radius: 20rpx;
|
padding: 40rpx;
|
||||||
padding: 20rpx;
|
overflow: hidden;
|
||||||
padding-bottom: 40rpx; // Add space at the bottom
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-header {
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
flex-direction: column;
|
||||||
align-items: center;
|
|
||||||
padding: 15rpx 10rpx;
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
border-bottom: 1rpx solid #eee;
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-options {
|
// 资源类型和年级区域
|
||||||
max-height: 60vh; // Limit popup height
|
.resource-section,
|
||||||
|
.grade-section {
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.option-item {
|
// 资源类型网格
|
||||||
padding: 25rpx 20rpx;
|
.type-grid {
|
||||||
font-size: 28rpx;
|
display: flex;
|
||||||
color: #333;
|
flex-wrap: wrap;
|
||||||
border-bottom: 1rpx solid #f5f5f5;
|
gap: 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.type-item {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
background: #f8f9fa;
|
||||||
|
border: 1px solid #e9ecef;
|
||||||
|
border-radius: 8rpx;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
&:last-child {
|
|
||||||
border-bottom: none;
|
.type-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active {
|
|
||||||
color: #409eff; // Highlight selected item
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #f9f9f9; // Subtle hover effect
|
border-color: #ff9800;
|
||||||
|
background: #fff3e0;
|
||||||
|
|
||||||
|
.type-text {
|
||||||
|
color: #ff9800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 年级网格
|
||||||
|
.grade-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
gap: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grade-item {
|
||||||
|
padding: 25rpx 20rpx;
|
||||||
|
background: #f8f9fa;
|
||||||
|
border: 1px solid #e9ecef;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
.grade-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: #ff9800;
|
||||||
|
background: #fff3e0;
|
||||||
|
|
||||||
|
.grade-text {
|
||||||
|
color: #ff9800;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 空状态
|
||||||
|
.empty-state {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 响应式适配
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.left-panel {
|
||||||
|
width: 150rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subject-item {
|
||||||
|
padding: 20rpx 10rpx;
|
||||||
|
|
||||||
|
.subject-name {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right-panel {
|
||||||
|
padding: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-item {
|
||||||
|
padding: 10rpx 18rpx;
|
||||||
|
|
||||||
|
.tag-text {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
468
src/pages/view/routine/JiaoXueZiYuan/indexList.vue
Normal file
468
src/pages/view/routine/JiaoXueZiYuan/indexList.vue
Normal file
@ -0,0 +1,468 @@
|
|||||||
|
<template>
|
||||||
|
<BasicListLayout
|
||||||
|
:show-nav-bar="true"
|
||||||
|
:nav-bar-props="{ title: '教学资源' }"
|
||||||
|
@register="register"
|
||||||
|
>
|
||||||
|
<template #top>
|
||||||
|
<view class="search-section">
|
||||||
|
<view class="search-box">
|
||||||
|
<uni-icons type="search" size="18" color="#999"></uni-icons>
|
||||||
|
<input
|
||||||
|
class="search-input"
|
||||||
|
type="text"
|
||||||
|
placeholder="搜索教学资源..."
|
||||||
|
v-model="searchKeyword"
|
||||||
|
@input="onSearchInput"
|
||||||
|
@confirm="onSearchConfirm"
|
||||||
|
/>
|
||||||
|
<view class="search-clear" v-if="searchKeyword" @click="clearSearch">
|
||||||
|
<uni-icons type="clear" size="16" color="#999"></uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #default="{ list }">
|
||||||
|
<view class="list-container">
|
||||||
|
<!-- Add @click handler to navigate -->
|
||||||
|
<view class="resource-item" v-for="item in list" :key="item.id" @click="goToDetail(item.id)">
|
||||||
|
<view class="item-icon-container">
|
||||||
|
<view class="item-icon">{{ item.iconLetter }}</view>
|
||||||
|
<text class="item-pages">-{{ item.pages }}页-</text>
|
||||||
|
</view>
|
||||||
|
<view class="item-details">
|
||||||
|
<text class="item-title">{{ item.title }}</text>
|
||||||
|
<!-- 标签区域 -->
|
||||||
|
<view class="tags-container" v-if="item.tags && item.tags.length > 0">
|
||||||
|
<view class="tag-item" v-for="tag in item.tags" :key="tag">{{ tag }}</view>
|
||||||
|
</view>
|
||||||
|
<view class="item-meta">
|
||||||
|
<text class="meta-text">{{ item.publishDate }}</text>
|
||||||
|
<text class="meta-text">浏览量: {{ item.views }}</text>
|
||||||
|
<text class="meta-text">下载量: {{ item.downloads }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</BasicListLayout>
|
||||||
|
|
||||||
|
<!-- Filter Popup -->
|
||||||
|
<uni-popup ref="filterPopupRef" type="bottom" background-color="#fff">
|
||||||
|
<view class="popup-content">
|
||||||
|
<view class="popup-header">
|
||||||
|
<text>{{ currentFilterTitle }}</text>
|
||||||
|
<uni-icons type="closeempty" size="20" @click="closeFilterPopup"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<scroll-view scroll-y class="popup-options">
|
||||||
|
<view
|
||||||
|
class="option-item"
|
||||||
|
v-for="option in currentFilterOptions"
|
||||||
|
:key="option.id ?? 'null'"
|
||||||
|
:class="{ active: isOptionSelected(option) }"
|
||||||
|
@click="selectFilterOption(option)"
|
||||||
|
>
|
||||||
|
{{ option.name }}
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, computed } from "vue";
|
||||||
|
import { useLayout } from "@/components/BasicListLayout/hooks/useLayout";
|
||||||
|
|
||||||
|
interface Resource {
|
||||||
|
id: number;
|
||||||
|
iconLetter: string;
|
||||||
|
title: string;
|
||||||
|
pages: number;
|
||||||
|
publishDate: string;
|
||||||
|
views: number;
|
||||||
|
downloads: number;
|
||||||
|
tags: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
interface FilterOption {
|
||||||
|
id: string | number | null;
|
||||||
|
name: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Filter Data (Mock) ---
|
||||||
|
const directories = ref<FilterOption[]>([
|
||||||
|
{ id: null, name: '全部目录' },
|
||||||
|
{ id: 'd1', name: '数学教案' },
|
||||||
|
{ id: 'd2', name: '语文课件' },
|
||||||
|
{ id: 'd3', name: '英语练习' },
|
||||||
|
{ id: 'd4', name: '科学实验' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const types1 = ref<FilterOption[]>([
|
||||||
|
{ id: null, name: '全部类型1' },
|
||||||
|
{ id: 't1-1', name: '课件PPT' },
|
||||||
|
{ id: 't1-2', name: '教学视频' },
|
||||||
|
{ id: 't1-3', name: 'Word文档' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
const types2 = ref<FilterOption[]>([
|
||||||
|
{ id: null, name: '全部类型2' },
|
||||||
|
{ id: 't2-1', name: '期中' },
|
||||||
|
{ id: 't2-2', name: '期末' },
|
||||||
|
{ id: 't2-3', name: '单元测试' },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// --- Search State ---
|
||||||
|
const searchKeyword = ref<string>('');
|
||||||
|
|
||||||
|
// --- Filter State ---
|
||||||
|
const selectedDirectory = ref<FilterOption | null>(directories.value[0]);
|
||||||
|
const selectedType1 = ref<FilterOption | null>(types1.value[0]);
|
||||||
|
const selectedType2 = ref<FilterOption | null>(types2.value[0]);
|
||||||
|
const filterPopupRef = ref<any>(null);
|
||||||
|
const currentFilterType = ref<'directory' | 'type1' | 'type2' | null>(null);
|
||||||
|
|
||||||
|
// --- Computed Properties for Popup ---
|
||||||
|
const currentFilterOptions = computed(() => {
|
||||||
|
switch (currentFilterType.value) {
|
||||||
|
case 'directory': return directories.value;
|
||||||
|
case 'type1': return types1.value;
|
||||||
|
case 'type2': return types2.value;
|
||||||
|
default: return [];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const currentFilterTitle = computed(() => {
|
||||||
|
switch (currentFilterType.value) {
|
||||||
|
case 'directory': return '选择目录';
|
||||||
|
case 'type1': return '选择类型1';
|
||||||
|
case 'type2': return '选择类型2';
|
||||||
|
default: return '选择选项';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const isOptionSelected = (option: FilterOption) => {
|
||||||
|
switch (currentFilterType.value) {
|
||||||
|
case 'directory': return selectedDirectory.value?.id === option.id;
|
||||||
|
case 'type1': return selectedType1.value?.id === option.id;
|
||||||
|
case 'type2': return selectedType2.value?.id === option.id;
|
||||||
|
default: return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Mock API (Changed return type to Promise<any>) ---
|
||||||
|
const testList = async (params: any): Promise<any> => {
|
||||||
|
console.log('API called with params:', params);
|
||||||
|
const page = params.page || 1;
|
||||||
|
const pageSize = params.pageSize || 10;
|
||||||
|
|
||||||
|
const allItems: Resource[] = Array.from({ length: 50 }).map((_, index) => {
|
||||||
|
const id = index + 1;
|
||||||
|
const directoryFilter = params.directoryId ? `[目录${params.directoryId}]` : '';
|
||||||
|
const type1Filter = params.type1Id ? `[类型1-${params.type1Id}]` : '';
|
||||||
|
const type2Filter = params.type2Id ? `[类型2-${params.type2Id}]` : '';
|
||||||
|
|
||||||
|
// 生成随机标签
|
||||||
|
const subjectTags = ['语文', '数学', '英语', '科学', '历史'];
|
||||||
|
const gradeTags = ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级'];
|
||||||
|
const termTags = ['上册', '下册'];
|
||||||
|
const typeTags = ['练习题', '课件', '教案', '测试卷'];
|
||||||
|
|
||||||
|
const tags = [
|
||||||
|
subjectTags[id % subjectTags.length],
|
||||||
|
gradeTags[id % gradeTags.length],
|
||||||
|
termTags[id % termTags.length],
|
||||||
|
...(id % 3 === 0 ? [typeTags[id % typeTags.length]] : [])
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: id,
|
||||||
|
iconLetter: 'W',
|
||||||
|
title: `专题${String(id).padStart(2, '0')}${directoryFilter}${type1Filter}${type2Filter} (突破)`,
|
||||||
|
pages: 30 + (id % 15),
|
||||||
|
publishDate: `0${1 + (id % 9)}月${10 + (id % 20)}日发布`,
|
||||||
|
views: 1500 + (id * 17 % 500),
|
||||||
|
downloads: 50 + (id * 7 % 40),
|
||||||
|
tags: tags,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let filteredItems = allItems;
|
||||||
|
|
||||||
|
// 搜索关键词过滤
|
||||||
|
if (params.keyword) {
|
||||||
|
filteredItems = filteredItems.filter(item =>
|
||||||
|
item.title.toLowerCase().includes(params.keyword.toLowerCase())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.directoryId) {
|
||||||
|
filteredItems = filteredItems.filter(item => item.title.includes(`[目录${params.directoryId}]`));
|
||||||
|
}
|
||||||
|
if (params.type1Id) {
|
||||||
|
filteredItems = filteredItems.filter(item => item.title.includes(`[类型1-${params.type1Id}]`));
|
||||||
|
}
|
||||||
|
if (params.type2Id) {
|
||||||
|
filteredItems = filteredItems.filter(item => item.title.includes(`[类型2-${params.type2Id}]`));
|
||||||
|
}
|
||||||
|
|
||||||
|
const totalFilteredItems = filteredItems.length;
|
||||||
|
const paginatedItems = filteredItems.slice((page - 1) * pageSize, page * pageSize);
|
||||||
|
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
setTimeout(() => {
|
||||||
|
// Return structure expected by useLayout
|
||||||
|
resolve({ message: "成功", resultCode: 200, rows: paginatedItems, total: totalFilteredItems });
|
||||||
|
}, 300);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Layout Hook (Removed 'immediate' from componentProps) ---
|
||||||
|
const [register, { reload, setParam }] = useLayout({
|
||||||
|
api: testList,
|
||||||
|
componentProps: {
|
||||||
|
// No problematic props
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// --- Search Methods ---
|
||||||
|
const onSearchInput = () => {
|
||||||
|
setParam({ keyword: searchKeyword.value });
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSearchConfirm = () => {
|
||||||
|
setParam({ keyword: searchKeyword.value });
|
||||||
|
};
|
||||||
|
|
||||||
|
const clearSearch = () => {
|
||||||
|
searchKeyword.value = '';
|
||||||
|
setParam({ keyword: '' });
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Navigation ---
|
||||||
|
const goToDetail = (id: number) => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `./detail?id=${id}` // Navigate to detail page in the same directory
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// --- Filter Popup Methods ---
|
||||||
|
const openFilterPopup = (type: 'directory' | 'type1' | 'type2') => {
|
||||||
|
currentFilterType.value = type;
|
||||||
|
filterPopupRef.value?.open();
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeFilterPopup = () => {
|
||||||
|
filterPopupRef.value?.close();
|
||||||
|
};
|
||||||
|
|
||||||
|
const selectFilterOption = (option: FilterOption) => {
|
||||||
|
switch (currentFilterType.value) {
|
||||||
|
case 'directory':
|
||||||
|
selectedDirectory.value = option;
|
||||||
|
setParam({ directoryId: option.id });
|
||||||
|
break;
|
||||||
|
case 'type1':
|
||||||
|
selectedType1.value = option;
|
||||||
|
setParam({ type1Id: option.id });
|
||||||
|
break;
|
||||||
|
case 'type2':
|
||||||
|
selectedType2.value = option;
|
||||||
|
setParam({ type2Id: option.id });
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
closeFilterPopup();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.search-section {
|
||||||
|
padding: 20rpx 30rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-bottom: 1rpx solid #e0e0e0;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 50rpx;
|
||||||
|
padding: 0 20rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
|
||||||
|
uni-icons {
|
||||||
|
margin-right: 15rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-input {
|
||||||
|
flex: 1;
|
||||||
|
height: 100%;
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
&::placeholder {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-clear {
|
||||||
|
margin-left: 15rpx;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-container {
|
||||||
|
background-color: #f4f5f7;
|
||||||
|
/* Add padding-top to prevent content from hiding behind sticky filter */
|
||||||
|
/* Adjust value based on filter-section height */
|
||||||
|
}
|
||||||
|
|
||||||
|
.resource-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
padding: 25rpx 20rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||||
|
cursor: pointer; // Add cursor pointer to indicate clickability
|
||||||
|
|
||||||
|
.item-icon-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: 25rpx;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.item-icon {
|
||||||
|
width: 80rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
line-height: 80rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
background-color: #409eff;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 40rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-pages {
|
||||||
|
font-size: 22rpx;
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-details {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.item-title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10rpx;
|
||||||
|
margin-bottom: 15rpx;
|
||||||
|
|
||||||
|
.tag-item {
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
color: #666;
|
||||||
|
font-size: 22rpx;
|
||||||
|
padding: 8rpx 16rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
border: 1rpx solid #e0e0e0;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
background-color: #e7f4ff;
|
||||||
|
color: #1890ff;
|
||||||
|
border-color: #91d5ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-meta {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #999;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.meta-text {
|
||||||
|
margin-right: 15rpx;
|
||||||
|
white-space: nowrap;
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Popup Styles
|
||||||
|
.popup-content {
|
||||||
|
background-color: #fff;
|
||||||
|
border-top-left-radius: 20rpx;
|
||||||
|
border-top-right-radius: 20rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
padding-bottom: 40rpx; // Add space at the bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 15rpx 10rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
border-bottom: 1rpx solid #eee;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popup-options {
|
||||||
|
max-height: 60vh; // Limit popup height
|
||||||
|
}
|
||||||
|
|
||||||
|
.option-item {
|
||||||
|
padding: 25rpx 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
border-bottom: 1rpx solid #f5f5f5;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
color: #409eff; // Highlight selected item
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #f9f9f9; // Subtle hover effect
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
174
src/pages/view/routine/RengJiaoRengZhi/index.vue
Normal file
174
src/pages/view/routine/RengJiaoRengZhi/index.vue
Normal file
@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="content">
|
||||||
|
<!-- 党政职务 -->
|
||||||
|
<view class="section">
|
||||||
|
<view class="section-title">党政职务:</view>
|
||||||
|
<view class="position-display">
|
||||||
|
<text class="position-text" v-for="item in partyPositions" :key="item.id">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 其他职务 -->
|
||||||
|
<view class="section">
|
||||||
|
<view class="section-title">其他职务</view>
|
||||||
|
<view class="position-display">
|
||||||
|
<text class="position-text" v-for="item in otherPositions" :key="item.id">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- 任职信息列表 -->
|
||||||
|
<view class="info-list">
|
||||||
|
<view class="info-item" v-for="item in teachingInfo" :key="item.key">
|
||||||
|
<view class="info-label">{{ item.label }}</view>
|
||||||
|
<view class="info-value">
|
||||||
|
<text :class="{ empty: item.isEmpty }">{{ item.value }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
|
||||||
|
// 党政职务数据
|
||||||
|
const partyPositions = ref([
|
||||||
|
{ id: 1, name: "党委(总支)书记" },
|
||||||
|
{ id: 2, name: "党委(总支)副书记" },
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 其他职务数据
|
||||||
|
const otherPositions = ref([{ id: 1, name: "党支部支委" }]);
|
||||||
|
|
||||||
|
// 任教任职信息
|
||||||
|
const teachingInfo = ref([
|
||||||
|
{
|
||||||
|
key: "mainSubject",
|
||||||
|
label: "主任学科",
|
||||||
|
value: "音乐",
|
||||||
|
isEmpty: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "mainClass",
|
||||||
|
label: "主任班级",
|
||||||
|
value: "未填写",
|
||||||
|
isEmpty: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "partTimeSubject",
|
||||||
|
label: "兼任学科",
|
||||||
|
value: "未填写",
|
||||||
|
isEmpty: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "partTimeClass",
|
||||||
|
label: "兼任班级",
|
||||||
|
value: "未填写",
|
||||||
|
isEmpty: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "grade",
|
||||||
|
label: "所属年级",
|
||||||
|
value: "一年级(2024级)",
|
||||||
|
isEmpty: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "headTeacherClass",
|
||||||
|
label: "所任班主任班级",
|
||||||
|
value: "8班",
|
||||||
|
isEmpty: false,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
// 返回上一页
|
||||||
|
const goBack = () => {
|
||||||
|
uni.navigateBack();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.container {
|
||||||
|
min-height: 100vh;
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding-bottom: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section {
|
||||||
|
background-color: #ffffff;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 职务展示
|
||||||
|
.position-display {
|
||||||
|
.position-text {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
|
||||||
|
&:not(:last-child)::after {
|
||||||
|
content: '、';
|
||||||
|
margin-left: 0;
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 信息列表
|
||||||
|
.info-list {
|
||||||
|
background-color: #ffffff;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
overflow: hidden;
|
||||||
|
margin: 0 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 30rpx;
|
||||||
|
border-bottom: 1rpx solid #f0f0f0;
|
||||||
|
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-label {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-value {
|
||||||
|
flex: 1;
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
|
||||||
|
&.empty {
|
||||||
|
color: #999;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -1,17 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<!-- 1. 顶部 Banner -->
|
<!-- 1. 顶部 Banner -->
|
||||||
<view class="header-banner mx-15 mt-15 r-md" style="box-sizing: border-box">
|
<!-- <view class="header-banner mx-15 mt-15 r-md" style="box-sizing: border-box">
|
||||||
<view class="banner-text">
|
<view class="banner-text">
|
||||||
<text class="banner-title">上课巡查</text>
|
<text class="banner-title">上课巡查</text>
|
||||||
<text class="banner-subtitle">泸州市实验小学城西学校</text>
|
<text class="banner-subtitle">泸州市实验小学城西学校</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 右侧图片区域,暂时留空或用占位符 -->
|
|
||||||
<view class="banner-image-placeholder"></view>
|
<view class="banner-image-placeholder"></view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 2. 我的应用 -->
|
<!-- 2. 我的应用 -->
|
||||||
<view class="section my-apps mt-15 px-15">
|
<!-- <view class="section my-apps mt-15 px-15">
|
||||||
<view class="section-title-bar">
|
<view class="section-title-bar">
|
||||||
<view class="decorator"></view>
|
<view class="decorator"></view>
|
||||||
<text class="title-text">我的应用</text>
|
<text class="title-text">我的应用</text>
|
||||||
@ -20,19 +19,17 @@
|
|||||||
<view class="app-grid">
|
<view class="app-grid">
|
||||||
<view class="app-item" @click="goToRecord">
|
<view class="app-item" @click="goToRecord">
|
||||||
<view class="app-icon-wrapper record-icon">
|
<view class="app-icon-wrapper record-icon">
|
||||||
<!-- 暂时用背景色代替图标 -->
|
|
||||||
</view>
|
</view>
|
||||||
<text class="app-text">巡查记录</text>
|
<text class="app-text">巡查记录</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="app-item" @click="goToSummary">
|
<view class="app-item" @click="goToSummary">
|
||||||
<view class="app-icon-wrapper summary-icon">
|
<view class="app-icon-wrapper summary-icon">
|
||||||
<!-- 暂时用背景色代替图标 -->
|
|
||||||
</view>
|
</view>
|
||||||
<text class="app-text">巡查汇总</text>
|
<text class="app-text">巡查汇总</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<!-- 3. 巡检情况 -->
|
<!-- 3. 巡检情况 -->
|
||||||
<view class="section inspection-status flex-1 flex-col mt-15">
|
<view class="section inspection-status flex-1 flex-col mt-15">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user