dedsudiyu 1 day ago
parent
commit
ae02b712e2

+ 0 - 722
pages_safetyEducationExamination/component/workbench/BindLabModal.vue

@@ -1,722 +0,0 @@
-<!-- 绑定实验室弹窗 -->
-<template>
-	<view class="bind-lab-modal" v-if="visible">
-		<!-- 遮罩层点击不关闭(强制绑定模式),offType=true时可关闭 -->
-		<view class="bind-lab-overlay" v-if="offType" @tap="handleClose"></view>
-		<view class="bind-lab-overlay no-close" v-else></view>
-
-		<!-- 主弹窗 -->
-		<view class="bind-lab-content" @tap.stop>
-			<!-- 标题栏 -->
-			<view class="modal-header">
-				<text class="modal-title">绑定实验室</text>
-				<text v-if="offType" class="modal-close" @tap="handleClose">✕</text>
-			</view>
-
-			<scroll-view scroll-y class="modal-scroll" :style="scrollStyle">
-				<view class="modal-body">
-					<!-- 无需进入实验室 勾选区 -->
-					<view class="no-lab-box">
-						<view class="checkbox-row" @tap="toggleNoLab">
-							<view class="custom-checkbox" :class="{ checked: isEnter }"></view>
-							<text class="no-lab-title">无需进入实验室</text>
-						</view>
-						<view class="no-lab-desc">
-							<text>人文、体育等相关学院无需进入实验室的新研究生可选择此项,选择后学时要求为4小时,需通过应知应会考试。</text>
-						</view>
-					</view>
-
-					<!-- 选择实验室(未勾选"无需进入"时显示) -->
-					<view v-if="!isEnter">
-						<!-- 选择实验室按钮 -->
-						<view class="select-lab-btn" @tap="openSelectLab">
-							<text v-if="!selectedLab" class="select-lab-placeholder">点击选择实验室</text>
-							<text v-else class="select-lab-value">{{ selectedLabLabel }}</text>
-							<text class="select-lab-arrow">›</text>
-						</view>
-						<text class="search-tip">此处请选择需要后续进入的科研实验室的名称,输入实验室名称、房号或楼栋关键词,再从检索结果中选择目标实验室。</text>
-
-						<!-- 实验室信息表 -->
-						<view class="lab-info-table" v-if="selectedLab">
-							<view class="info-row">
-								<view class="info-cell label-cell">实验室名称</view>
-								<view class="info-cell value-cell">{{ selectedLab.subName }}{{ selectedLab.roomNum ? '(' + selectedLab.roomNum + ')' : '' }}</view>
-							</view>
-							<view class="info-row">
-								<view class="info-cell label-cell">实验室类型</view>
-								<view class="info-cell value-cell">{{ selectedLab.moldName }}</view>
-							</view>
-							<view class="info-row">
-								<view class="info-cell label-cell">负责人</view>
-								<view class="info-cell value-cell">{{ selectedLab.adminName }}</view>
-							</view>
-							<view class="info-row">
-								<view class="info-cell label-cell">实验室分级</view>
-								<view class="info-cell value-cell" :style="'color:' + (selectedLab.classLevelColor || '#333')">{{ selectedLab.classLevelName }}</view>
-							</view>
-							<view class="info-row">
-								<view class="info-cell label-cell">所属学院</view>
-								<view class="info-cell value-cell">{{ selectedLab.deptName }}</view>
-							</view>
-							<view class="info-row">
-								<view class="info-cell label-cell">实验室分类</view>
-								<view class="info-cell value-cell">{{ selectedLab.classTypeNames }}</view>
-							</view>
-							<view class="info-row no-border">
-								<view class="info-cell label-cell">所在位置</view>
-								<view class="info-cell value-cell">{{ selectedLab.buildName }}{{ selectedLab.floorName }}</view>
-							</view>
-						</view>
-
-						<!-- 本科生:进入原因(educationType=2) -->
-						<view class="reason-box" v-if="educationType == 2">
-							<textarea
-								class="reason-input"
-								v-model="reason"
-								placeholder="请填写进入实验室原因(必填)"
-								maxlength="100"
-								:auto-height="false"
-							></textarea>
-							<text class="reason-tip">毕业论文或毕业设计,科创等相关需要在具体的实验室开展业务的情况可申请绑定实验室,绑定完毕后需要完成对应的分级考试。</text>
-						</view>
-					</view>
-
-					<!-- 协议勾选 -->
-					<view class="agree-row" @tap="onAgreeTap">
-						<view class="custom-checkbox" :class="{ checked: checkType }"></view>
-						<view class="agree-text">
-							<text>我已阅读并同意</text>
-							<text class="agree-link" @tap.stop="openNotice">《新生绑定实验室须知及责任说明》</text>
-						</view>
-					</view>
-
-					<!-- 底部按钮 -->
-					<view class="modal-footer">
-						<view v-if="offType" class="btn-cancel" @tap="handleClose">取消</view>
-						<view class="btn-confirm" @tap="handleConfirm">确认绑定</view>
-					</view>
-				</view>
-			</scroll-view>
-		</view>
-
-		<!-- 须知弹窗 -->
-		<view class="notice-modal" v-if="showNotice" @tap.stop>
-			<view class="notice-content">
-				<view class="notice-header">
-					<text class="notice-title">新生绑定实验室须知及责任说明</text>
-				</view>
-				<scroll-view scroll-y class="notice-scroll">
-					<view class="notice-body">
-						<text class="notice-p">1. 保证进入的实验室为导师实际使用实验室或属于当前实验室所属课题组。</text>
-						<text class="notice-p">2. 研究生期间涉及到操作实验室内重要危险源,必须绑定实验室。</text>
-					</view>
-				</scroll-view>
-				<view class="notice-footer">
-					<view class="btn-cancel" @tap="cancelNotice">取消</view>
-					<view class="btn-confirm" @tap="confirmNotice">我已知晓</view>
-				</view>
-			</view>
-		</view>
-
-		<!-- 选择实验室弹窗 -->
-		<view class="select-lab-modal" v-if="showSelectLab" @tap="closeSelectLab">
-			<view class="select-lab-content" @tap.stop>
-				<view class="select-lab-header">
-					<text class="select-lab-title">选择实验室</text>
-					<text class="modal-close" @tap="closeSelectLab">✕</text>
-				</view>
-				<!-- 搜索框 -->
-				<view class="search-bar">
-					<input
-						class="search-input"
-						type="text"
-						v-model="searchKeyword"
-						placeholder="输入实验室名称、房间或楼栋关键词搜索"
-						@input="onSearchInput"
-					/>
-				</view>
-				<!-- 列表 -->
-				<scroll-view
-					scroll-y
-					class="lab-list-scroll"
-					:style="labListScrollStyle"
-					@scrolltolower="onScrollLower"
-				>
-					<view v-if="labList.length === 0 && !labLoading" class="lab-list-empty">暂无数据</view>
-					<view
-						v-for="(lab, idx) in labList"
-						:key="idx"
-						class="lab-list-item"
-						:data-idx="idx"
-						@tap="onLabItemTap"
-					>
-						<text class="lab-item-name">{{ lab.subName }}{{ lab.roomNum ? '(' + lab.roomNum + ')' : '' }}</text>
-						<text class="lab-item-sub">{{ lab.deptName }} · {{ lab.buildName }}{{ lab.floorName }}</text>
-					</view>
-					<view v-if="labLoading" class="lab-list-loading">加载中...</view>
-					<view v-if="labNoMore" class="lab-list-loading">没有更多了</view>
-				</scroll-view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import {
-		examElLabEduRelationLabLists,
-		examElLabEduRelationBind,
-	} from '@/pages_safetyEducationExamination/api/index.js'
-
-	export default {
-		name: 'BindLabModal',
-		props: {
-			visible: {
-				type: Boolean,
-				default: false
-			},
-			// 是否可关闭(true=去绑定时点击可关闭,false=强制绑定)
-			offType: {
-				type: Boolean,
-				default: true
-			},
-			// 用户教育类型:1=本科生,2=研究生(来自 bindStatus 接口)
-			educationType: {
-				type: [Number, String],
-				default: 1
-			},
-		},
-		data() {
-			return {
-				// 表单
-				isEnter: false,      // 无需进入实验室
-				checkType: false,    // 已同意协议
-				reason: '',          // 进入原因(本科生必填)
-				selectedLab: null,   // 选中的实验室对象
-
-				// 须知弹窗
-				showNotice: false,
-
-				// 选择实验室弹窗
-				showSelectLab: false,
-				searchKeyword: '',
-				searchTimer: null,
-				labList: [],
-				labLoading: false,
-				labNoMore: false,
-				labPage: 1,
-				labPageSize: 15,
-				labTotal: 0,
-			}
-		},
-		computed: {
-			selectedLabLabel() {
-				if (!this.selectedLab) return '';
-				const lab = this.selectedLab;
-				return (lab.deptName || '') + ' - ' + (lab.subName || '') +
-					(lab.roomNum ? '(' + lab.roomNum + ')' : '') +
-					' - ' + (lab.buildName || '') + (lab.floorName || '');
-			},
-			scrollStyle() {
-				const sys = uni.getSystemInfoSync();
-				const h = sys.windowHeight - 100;
-				return 'height:' + (h > 300 ? h : 300) + 'px;';
-			},
-			labListScrollStyle() {
-				const sys = uni.getSystemInfoSync();
-				const h = sys.windowHeight * 0.5;
-				return 'height:' + h + 'px;';
-			},
-		},
-		watch: {
-			visible(val) {
-				if (val) this.resetState();
-			}
-		},
-		methods: {
-			resetState() {
-				this.isEnter = false;
-				this.checkType = false;
-				this.reason = '';
-				this.selectedLab = null;
-				this.showNotice = false;
-				this.showSelectLab = false;
-				this.searchKeyword = '';
-				this.labList = [];
-				this.labPage = 1;
-				this.labTotal = 0;
-				this.labNoMore = false;
-			},
-			handleClose() {
-				if (!this.offType) return;
-				this.$emit('close');
-			},
-			toggleNoLab() {
-				this.isEnter = !this.isEnter;
-			},
-			onAgreeTap() {
-				// 点击文字区域时切换,但点链接时单独处理
-				this.checkType = !this.checkType;
-			},
-
-			// ---- 须知弹窗 ----
-			openNotice() {
-				this.showNotice = true;
-			},
-			cancelNotice() {
-				this.checkType = false;
-				this.showNotice = false;
-			},
-			confirmNotice() {
-				this.checkType = true;
-				this.showNotice = false;
-			},
-
-			// ---- 选择实验室弹窗 ----
-			openSelectLab() {
-				this.showSelectLab = true;
-				this.searchKeyword = '';
-				this.labList = [];
-				this.labPage = 1;
-				this.labTotal = 0;
-				this.labNoMore = false;
-				this.fetchLabList(true);
-			},
-			closeSelectLab() {
-				this.showSelectLab = false;
-				clearTimeout(this.searchTimer);
-			},
-			onSearchInput() {
-				clearTimeout(this.searchTimer);
-				this.searchTimer = setTimeout(() => {
-					this.labPage = 1;
-					this.labList = [];
-					this.labNoMore = false;
-					this.fetchLabList(true);
-				}, 300);
-			},
-			onScrollLower() {
-				if (this.labNoMore || this.labLoading) return;
-				this.labPage++;
-				this.fetchLabList(false);
-			},
-			fetchLabList(reset) {
-				if (this.labLoading) return;
-				this.labLoading = true;
-				examElLabEduRelationLabLists({
-					searchValue: this.searchKeyword.trim(),
-					page: this.labPage,
-					pageSize: this.labPageSize,
-				}).then(res => {
-					const resp = res.data || {};
-					if (resp.code === 200) {
-						const records = Array.isArray(resp.data) ? resp.data : ((resp.data || {}).records || []);
-						const total = typeof resp.data === 'object' && !Array.isArray(resp.data) ? (resp.data.total || records.length) : records.length;
-						if (reset) {
-							this.labList = records;
-						} else {
-							this.labList = [...this.labList, ...records];
-						}
-						this.labTotal = total;
-						this.labNoMore = this.labList.length >= this.labTotal;
-					}
-				}).catch(() => {}).finally(() => {
-					this.labLoading = false;
-				});
-			},
-			onLabItemTap(e) {
-				const idx = Number(e.currentTarget.dataset.idx);
-				const lab = this.labList[idx];
-				if (!lab) return;
-				this.selectedLab = lab;
-				this.showSelectLab = false;
-			},
-
-			// ---- 提交 ----
-			handleConfirm() {
-				if (!this.isEnter && !this.selectedLab) {
-					return uni.showToast({ title: '请选择实验室或勾选无需进入', icon: 'none' });
-				}
-				if (this.educationType == 2 && !this.isEnter && !this.reason.trim()) {
-					return uni.showToast({ title: '请填写进入实验室原因', icon: 'none' });
-				}
-				if (!this.checkType) {
-					return uni.showToast({ title: '请阅读并确认勾选《新生绑定实验室须知及责任说明》', icon: 'none' });
-				}
-				uni.showLoading({ title: '提交中...' });
-				const obj = {
-					subId: this.isEnter ? '' : (this.selectedLab ? this.selectedLab.subId : ''),
-					reason: this.reason || '',
-					isEnter: this.isEnter ? '0' : '1',
-				};
-				examElLabEduRelationBind(obj).then(res => {
-					uni.hideLoading();
-					const resp = res.data || {};
-					if (resp.code === 200) {
-						uni.showToast({ title: resp.message || '绑定成功', icon: 'success' });
-						this.$emit('bind-success');
-						this.$emit('close');
-					} else {
-						uni.showToast({ title: resp.message || '绑定失败', icon: 'none' });
-					}
-				}).catch(() => {
-					uni.hideLoading();
-					uni.showToast({ title: '绑定失败', icon: 'none' });
-				});
-			},
-		}
-	}
-</script>
-
-<style lang="stylus" scoped>
-	.bind-lab-modal
-		position fixed
-		top 0
-		left 0
-		right 0
-		bottom 0
-		z-index 800
-		display flex
-		align-items center
-		justify-content center
-
-	.bind-lab-overlay
-		position absolute
-		top 0
-		left 0
-		right 0
-		bottom 0
-		background rgba(0,0,0,0.5)
-
-	.no-close
-		pointer-events none
-
-	.bind-lab-content
-		position relative
-		z-index 1
-		background #fff
-		border-radius 24rpx
-		width 90%
-		max-width 680rpx
-		box-shadow 0 16rpx 64rpx rgba(0,0,0,0.2)
-		overflow hidden
-
-	.modal-header
-		display flex
-		align-items center
-		justify-content space-between
-		padding 32rpx 40rpx 24rpx
-		border-bottom 1rpx solid #f0f0f0
-		flex-shrink 0
-
-	.modal-title
-		font-size 32rpx
-		font-weight 700
-		color #1a1a1a
-
-	.modal-close
-		font-size 36rpx
-		color #999
-		padding 8rpx
-
-	.modal-scroll
-		overflow hidden
-
-	.modal-body
-		padding 28rpx 36rpx 32rpx
-
-	// 无需进入实验室
-	.no-lab-box
-		background #f6f8ff
-		border-radius 16rpx
-		padding 24rpx 28rpx
-		margin-bottom 28rpx
-
-	.checkbox-row
-		display flex
-		align-items center
-		gap 16rpx
-
-	.custom-checkbox
-		width 36rpx
-		height 36rpx
-		border-radius 6rpx
-		border 2rpx solid #ccc
-		flex-shrink 0
-		box-sizing border-box
-		position relative
-
-	.custom-checkbox.checked
-		background #1677ff
-		border-color #1677ff
-
-	.custom-checkbox.checked::after
-		content ''
-		position absolute
-		top 44%
-		left 20%
-		width 10rpx
-		height 20rpx
-		border solid #fff
-		border-width 0 3rpx 3rpx 0
-		transform rotate(45deg) translate(-50%,-50%)
-
-	.no-lab-title
-		font-size 28rpx
-		font-weight 600
-		color #1a1a1a
-
-	.no-lab-desc
-		font-size 22rpx
-		color #888
-		margin-top 10rpx
-		line-height 1.6
-		padding-left 52rpx
-
-	// 选择实验室按钮
-	.select-lab-btn
-		display flex
-		align-items center
-		border 1rpx solid #d9d9d9
-		border-radius 12rpx
-		padding 0 24rpx
-		height 80rpx
-		background #fafafa
-		margin-bottom 12rpx
-
-	.select-lab-placeholder
-		flex 1
-		font-size 26rpx
-		color #bbb
-
-	.select-lab-value
-		flex 1
-		font-size 26rpx
-		color #333
-
-	.select-lab-arrow
-		font-size 36rpx
-		color #bbb
-		margin-left 8rpx
-
-	.search-tip
-		font-size 22rpx
-		color #1677ff
-		line-height 1.5
-		margin-bottom 20rpx
-		display block
-
-	// 实验室信息表
-	.lab-info-table
-		border 1rpx solid #e8e8e8
-		border-radius 12rpx
-		overflow hidden
-		margin-bottom 24rpx
-
-	.info-row
-		display flex
-		border-bottom 1rpx solid #f0f0f0
-
-	.info-row.no-border
-		border-bottom none
-
-	.info-cell
-		padding 18rpx 20rpx
-		font-size 24rpx
-
-	.label-cell
-		width 160rpx
-		color #888
-		background #fafafa
-		flex-shrink 0
-
-	.value-cell
-		flex 1
-		color #333
-
-	// 原因输入框(本科生)
-	.reason-box
-		margin-bottom 20rpx
-
-	.reason-input
-		width 100%
-		box-sizing border-box
-		height 120rpx
-		border 1rpx solid #d9d9d9
-		border-radius 12rpx
-		padding 16rpx 20rpx
-		font-size 26rpx
-		color #333
-		background #fafafa
-
-	.reason-tip
-		font-size 22rpx
-		color #9ba7ba
-		line-height 1.5
-		margin-top 8rpx
-		display block
-
-	// 协议
-	.agree-row
-		display flex
-		align-items flex-start
-		gap 16rpx
-		margin-bottom 32rpx
-		margin-top 16rpx
-
-	.agree-text
-		display flex
-		flex-wrap wrap
-		font-size 24rpx
-		color #555
-		line-height 1.6
-
-	.agree-link
-		color #1677ff
-
-	// 底部按钮
-	.modal-footer
-		display flex
-		gap 20rpx
-		justify-content flex-end
-
-	.btn-cancel
-		padding 16rpx 44rpx
-		border-radius 12rpx
-		font-size 26rpx
-		border 1rpx solid #d9d9d9
-		background #fff
-		color #555
-
-	.btn-confirm
-		padding 16rpx 44rpx
-		border-radius 12rpx
-		font-size 26rpx
-		background #1677ff
-		color #fff
-		font-weight 600
-
-	// 须知弹窗
-	.notice-modal
-		position fixed
-		top 0
-		left 0
-		right 0
-		bottom 0
-		z-index 900
-		background rgba(0,0,0,0.5)
-		display flex
-		align-items center
-		justify-content center
-
-	.notice-content
-		background #fff
-		border-radius 20rpx
-		width 85%
-		max-width 640rpx
-		overflow hidden
-
-	.notice-header
-		padding 28rpx 36rpx
-		border-bottom 1rpx solid #f0f0f0
-
-	.notice-title
-		font-size 30rpx
-		font-weight 700
-		color #1a1a1a
-
-	.notice-scroll
-		height 300rpx
-
-	.notice-body
-		padding 24rpx 36rpx
-
-	.notice-p
-		display block
-		font-size 26rpx
-		color #333
-		line-height 1.8
-		margin-bottom 12rpx
-
-	.notice-footer
-		display flex
-		gap 20rpx
-		justify-content flex-end
-		padding 20rpx 36rpx
-		border-top 1rpx solid #f0f0f0
-
-	// 选择实验室弹窗
-	.select-lab-modal
-		position fixed
-		top 0
-		left 0
-		right 0
-		bottom 0
-		z-index 900
-		background rgba(0,0,0,0.5)
-		display flex
-		align-items flex-end
-
-	.select-lab-content
-		background #fff
-		border-radius 32rpx 32rpx 0 0
-		width 100%
-		overflow hidden
-
-	.select-lab-header
-		display flex
-		align-items center
-		justify-content space-between
-		padding 28rpx 36rpx 20rpx
-		border-bottom 1rpx solid #f0f0f0
-
-	.select-lab-title
-		font-size 30rpx
-		font-weight 700
-		color #1a1a1a
-
-	.search-bar
-		padding 16rpx 28rpx
-		background #fff
-
-	.search-input
-		width 100%
-		box-sizing border-box
-		height 76rpx
-		border 1rpx solid #e0e0e0
-		border-radius 38rpx
-		padding 0 28rpx
-		font-size 26rpx
-		color #333
-		background #f5f5f5
-
-	.lab-list-scroll
-		overflow hidden
-
-	.lab-list-item
-		padding 24rpx 36rpx
-		border-bottom 1rpx solid #f5f5f5
-
-	.lab-item-name
-		display block
-		font-size 28rpx
-		color #222
-		font-weight 600
-		margin-bottom 6rpx
-
-	.lab-item-sub
-		display block
-		font-size 22rpx
-		color #999
-
-	.lab-list-empty
-		text-align center
-		padding 60rpx 0
-		color #bbb
-		font-size 26rpx
-
-	.lab-list-loading
-		text-align center
-		padding 24rpx 0
-		color #bbb
-		font-size 24rpx
-</style>

+ 0 - 41
pages_safetyEducationExamination/component/workbench/index.vue

@@ -1,41 +0,0 @@
-<template>
-	<view class='safetyEducationExamination-workbench'>
-		<user-info-card></user-info-card>
-		<Workbench-stats-cards></Workbench-stats-cards>
-	</view>
-</template>
-
-<script>
-	import {
-		userInfoCard
-	} from '@/pages_safetyEducationExamination/component/workbench/userInfoCard'
-	import {
-		workbenchStatsCards
-	} from '@/pages_safetyEducationExamination/component/workbench/workbenchStatsCards.vue'
-	export default {
-		components: {
-			userInfoCard,
-			workbenchStatsCards,
-		},
-		data() {
-			return {
-				
-			}
-		},
-		created() {
-			
-		},
-		methods: {
-			
-		}
-	}
-</script>
-
-<style lang="stylus" scoped>
-	.safetyEducationExamination-workbench {
-		flex:1;
-		display: flex;
-		flex-direction: column;
-		overflow-y:scroll;
-	}
-</style>

+ 0 - 476
pages_safetyEducationExamination/component/workbench/userInfoCard.vue

@@ -1,476 +0,0 @@
-<template>
-	<view class='safetyEducationExamination-workbench-userInfoCard'>
-		<!-- 顶部用户信息卡片 -->
-		<view class="top-max-big-box">
-			<img v-if="userInfo.avatar" class="avatar-img" :src="baseUrl+userInfo.avatar">
-			<img v-else class="avatar-img" :src="imagesUrl('commonality/icon_01.png')">
-			<view class="center-info-box">
-				<view class="name-box">
-					<view>{{userInfo.userName}}</view>
-					<view>奖励分 {{userInfo.totalPoints}}</view>
-					<view>信用分 {{userInfo.totalPoints}}</view>
-				</view>
-				<view class="account-box">
-					<view>{{userInfo.userType == 2?userInfo.educationName:(userInfo.userType == 1?'教职工':'系统用户')}}</view>
-					<view> · </view>
-					<view>{{userInfo.account}}</view>
-				</view>
-				<view class="dept-box">
-					<view>{{userInfo.deptName}}</view>
-				</view>
-			</view>
-			<!-- <view class="right-type-box">
-				<view></view>
-				<view>正常</view>
-			</view> -->
-		</view>
-
-		<!-- 底部详情卡片 -->
-		<view class="bottom-max-big-box">
-			<!-- 1. 绑定实验室 -->
-			<view class="lab-bind-box" v-if="userInfo.userType == 2">
-				<view class="lab-title">{{userInfo.bound?'实验室信息':'绑定实验室'}}</view>
-				<view class="lab-info-row">
-					<view class="dot dot-green" v-if="userInfo.bound"></view>
-					<view class="dot dot-green" style="background-color: #999;" v-if="!userInfo.bound"></view>
-					<text class="lab-name" v-if="userInfo.bound">{{ userInfo.labName }}</text>
-					<text class="lab-name" style="color:#999;" v-if="!userInfo.bound&&userInfo.educationType == 1">暂无绑定实验室</text>
-					<text class="lab-name" style="color:#999;" v-if="!userInfo.bound&&userInfo.educationType == 2">{{userInfo.isFinishExam?'暂无绑定实验室':'请先完成入学考试'}}</text>
-					<text class="tag" style="color:#1857d4;font-size:28rpx;font-weight:600;" v-if="(!userInfo.bound&&userInfo.educationType == 1)||(!userInfo.bound&&userInfo.educationType == 2&&userInfo.isFinishExam)" @click="shadeButton(4)">去绑定</text>
-					<text class="tag tag-green" v-if="userInfo.bound">{{userInfo.bindStatus}}</text>
-				</view>
-			</view>
-
-			<!-- 2. 学年进度 -->
-			<view class="year-progress-card">
-				<view class="card-header">
-					<view class="tags-group">
-						<text class="tag tag-blue">{{userInfo.gradeRange}}</text>
-						<text class="tag" :style="'color:'+userInfo.levelColor+';border:1rpx solid '+userInfo.levelColor+';'"
-							v-if="userInfo.levelName">{{userInfo.levelName}}</text>
-						<text class="tag tag-gray" v-if="userInfo.typeName">{{userInfo.typeName}}</text>
-					</view>
-				</view>
-				<view class="progress-info" v-if="userInfo.totalStudyHours>0">
-					<view class="info-row">
-						<text class="label">当前学年学时完成进度</text>
-						<text class="value text-blue text-bold">{{ userInfo.completedStudyHours }} / {{ userInfo.totalStudyHours }} 学时</text>
-					</view>
-					<view class="progress-wrap">
-						<view class="progress-bar" :style="{ width: (userInfo.studyHourRate) + '%' }"></view>
-					</view>
-				</view>
-				<view class="card-footer">
-					<view class="footer-left">
-						<text class="text-sm text-gray">{{userInfo.totalStudyHours>0?'学时完成度':'学时要求'}}</text>
-						<text class="text-bold text-blue">{{userInfo.totalStudyHours>0?userInfo.studyHourRate+'%':'无'}}</text>
-					</view>
-				</view>
-				<view class="card-footer" style="margin-top:10rpx;">
-					<view class="footer-right">
-						<text class="text-sm text-gray">目标考试</text>
-						<text class="exam-link"
-							@click="handleExamClick">{{userInfo.targetExamName?userInfo.targetExamName:'无'}}</text>
-					</view>
-				</view>
-			</view>
-
-			<!-- 3. 任务状态 -->
-			<view class="task-status-box">
-				<view class="task-title">当前学年任务状态</view>
-				<view class="task-grid">
-					<view class="task-item">
-						<view class="task-label" :class="userInfo.examPassStatus==1?'task-item-active':''">考试状态</view>
-						<text class="tag" :class="!userInfo.examPassStatus||userInfo.examPassStatus==1?'tag-gray':(userInfo.examPassStatus==2?'tag-green':(userInfo.examPassStatus==3||userInfo.examPassStatus==4?'tag-error':''))">
-						{{!userInfo.examPassStatus?'暂无':(userInfo.examPassStatus==1?'考试中':((userInfo.examPassStatus==2?'已通过':(userInfo.examPassStatus==3?'未通过':(userInfo.examPassStatus==4?'缺考':'')))))}}
-						</text>
-					</view>
-					<view class="task-item" :class="userInfo.certificateStatus==1?'task-item-active':''">
-						<view class="task-label">证书状态</view>
-						<text class="tag" :class="!userInfo.certificateStatus?'tag-gray':(userInfo.certificateStatus==1?'tag-green':(userInfo.certificateStatus==2||userInfo.certificateStatus==3||userInfo.certificateStatus==4?'tag-error':''))">
-						{{!userInfo.certificateStatus?'暂无':(userInfo.certificateStatus==1?'已通过':(userInfo.certificateStatus==2?'失效':(userInfo.certificateStatus==3?'已撤销':(userInfo.certificateStatus==4?'未签发':''))))}}
-						</text>
-					</view>
-					<view class="task-item" :class="userInfo.approvalStatus==1?'task-item-active':''" v-if="userInfo.approvalStatus!=3&&userInfo.userType == 2">
-						<view class="task-label">审批状态</view>
-						<text class="tag" :class="userInfo.approvalStatus==0?'tag-gray':(userInfo.approvalStatus==1?'tag-green':(userInfo.approvalStatus==2?'tag-error':'tag-gray'))">
-						{{userInfo.bound&&userInfo.approvalStatus==0?'待审批':(userInfo.approvalStatus==1?'已通过':(userInfo.approvalStatus==2?'未通过':'待绑定'))}}
-						</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<BindLabModal
-			:visible="showBindLabModal"
-			:off-type="bindLabOffType"
-			:education-type="userInfo.educationType"
-			@close="showBindLabModal = false"
-			@bind-success="refreshPageData"
-		/>
-	</view>
-</template>
-
-<script>
-	import {
-		examElLabEduRelationBindStatus
-	} from '@/pages_safetyEducationExamination/api/index.js'
-	import BindLabModal from './BindLabModal.vue'
-	export default {
-		components: { BindLabModal },
-		data() {
-			return {
-				userInfo: {
-					userType: '',
-					userName: '',
-					account: '',
-					educationName: '',
-					deptName: '',
-					labName: '',
-					bound: '',
-					approvalStatus: '',
-					certificateStatus: '',
-					examPassStatus: '',
-					gradeRange: '',
-					typeName: '',
-					completedStudyHours: '',
-					totalStudyHours: '',
-					studyHourRate: '',
-					targetExamName: '',
-				},
-				showBindLabModal: false,
-				bindLabOffType: true,
-			}
-		},
-		mounted() {
-			this.loadUserInfo();
-		},
-		methods: {
-			refreshPageData() {
-				this.loadUserInfo();
-			},
-			handleExamClick() {
-				uni.navigateTo({
-					url: '/pages_safetyEducationExamination/views/exam/index',
-				});
-			},
-			async loadUserInfo() {
-				const { data } = await examElLabEduRelationBindStatus({});
-				if (data.code == 200) {
-					this.$set(this, 'userInfo', data.data);
-					if (data.data.isPopup) {
-						this.bindLabOffType = false;
-						this.showBindLabModal = true;
-					}
-				}
-			},
-			shadeButton(type) {
-				if (type == 4) {
-					this.bindLabOffType = true;
-					this.showBindLabModal = true;
-				} else if (type == 5) {
-					this.bindLabOffType = false;
-					this.showBindLabModal = true;
-				}
-			},
-		}
-	}
-</script>
-
-<style lang="stylus" scoped>
-	.safetyEducationExamination-workbench-userInfoCard {
-		.top-max-big-box {
-			z-index: 0;
-			height: 200rpx;
-			background-color: #1959D5;
-			overflow: hidden;
-			display: flex;
-
-			.avatar-img {
-				border: 4rpx solid #87A8E9;
-				border-radius: 50%;
-				width: 98rpx;
-				height: 98rpx;
-				margin: 32rpx 32rpx 0 32rpx;
-			}
-
-			.center-info-box {
-				flex: 1;
-
-				.name-box {
-					display: flex;
-					margin-top: 18rpx;
-
-					view:nth-child(1) {
-						font-size: 34rpx;
-						font-weight: 700;
-						color: #fff;
-						margin-right: 20rpx;
-					}
-
-					view:nth-child(2) {
-						background: rgba(255, 215, 0, .2);
-						color: #ffe066;
-						font-size: 22rpx;
-						padding: 4rpx 16rpx;
-						border-radius: 40rpx;
-						border: 2rpx solid rgba(255, 215, 0, .35);
-						margin-right: 20rpx;
-					}
-
-					view:nth-child(3) {
-						background: rgba(0, 210, 140, .18);
-						color: #7fffd4;
-						font-size: 22rpx;
-						padding: 4rpx 16rpx;
-						border-radius: 40rpx;
-						border: 2rpx solid rgba(0, 210, 140, .4);
-						margin-right: 20rpx;
-					}
-				}
-
-				.account-box {
-					display: flex;
-					margin-top: 10rpx;
-
-					view {
-						color: rgba(255, 255, 255, .8);
-						font-size: 24rpx;
-					}
-
-					view:nth-child(2) {
-						margin: 0 10rpx;
-					}
-				}
-
-				.dept-box {
-					display: flex;
-					margin-top: 10rpx;
-
-					view {
-						color: rgba(255, 255, 255, .8);
-						font-size: 24rpx;
-					}
-				}
-			}
-
-			.right-type-box {
-				width: 70rpx;
-				height: 30rpx;
-				background: rgba(0, 210, 140, .18);
-				color: #7fffd4;
-				font-size: 22rpx;
-				padding: 4rpx 16rpx;
-				border-radius: 40rpx;
-				border: 2rpx solid rgba(0, 210, 140, .4);
-				display: flex;
-				margin: 60rpx 20rpx 0 0;
-
-				view:nth-child(1) {
-					width: 10rpx;
-					height: 10rpx;
-					border-radius: 50%;
-					background-color: rgba(0, 210, 140, 1);
-					text-align: center;
-					margin: 10rpx 10rpx 0 0;
-				}
-			}
-		}
-
-		.bottom-max-big-box {
-			z-index: 1;
-			position: relative;
-			border-radius: 32rpx;
-			padding: 32rpx;
-			margin: -36rpx 24rpx 24rpx;
-			background-color: #fff;
-
-			// 1. 绑定实验室样式
-			.lab-bind-box {
-				background: #eef3fd;
-				border-radius: 16rpx;
-				padding: 20rpx;
-				margin-bottom: 28rpx;
-
-				.lab-title {
-					font-size: 24rpx;
-					color: #8896a7;
-					margin-bottom: 16rpx;
-				}
-
-				.lab-info-row {
-					display: flex;
-					align-items: center;
-					gap: 12rpx;
-
-					.dot-green {
-						width: 12rpx;
-						height: 12rpx;
-						border-radius: 50%;
-						background-color: #0d8f6f;
-					}
-
-					.lab-name {
-						font-weight: 500;
-						color: #1857d4;
-						font-size: 28rpx;
-					}
-				}
-			}
-
-			// 2. 学年进度样式
-			.year-progress-card {
-				background-color: #f4f6fa;
-				border-radius: 20rpx;
-				padding: 28rpx;
-				margin-bottom: 24rpx;
-
-				.card-header {
-					margin-bottom: 24rpx;
-				}
-
-				.tags-group {
-					display: flex;
-					align-items: center;
-					gap: 16rpx;
-				}
-
-				.progress-info {
-					margin-bottom: 16rpx;
-				}
-
-				.info-row {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-					margin-bottom: 8rpx;
-				}
-
-				.label {
-					font-size: 24rpx;
-					color: #8896a7;
-				}
-
-				.value {
-					font-size: 24rpx;
-				}
-
-				.progress-wrap {
-					background-color: #e8edf6;
-					border-radius: 8rpx;
-					height: 14rpx;
-					overflow: hidden;
-				}
-
-				.progress-bar {
-					height: 100%;
-					border-radius: 8rpx;
-					background: linear-gradient(90deg, #2e6fe0, #1857d4);
-					transition: width 0.4s;
-				}
-
-				.card-footer {
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-				}
-
-				.footer-left,
-				.footer-right {
-					display: flex;
-					align-items: center;
-					gap: 8rpx;
-				}
-
-				.exam-link {
-					color: #1857d4;
-					font-weight: 600;
-					background-color: #eef3fd;
-					padding: 4rpx 16rpx;
-					border-radius: 12rpx;
-					border: 1px solid rgba(24, 87, 212, 0.25);
-					font-size: 24rpx;
-				}
-			}
-
-			// 3. 任务状态样式
-			.task-status-box {
-				.task-title {
-					font-size: 28rpx;
-					color: #8896a7;
-					font-weight: 700;
-					margin-bottom: 16rpx;
-				}
-
-				.task-grid {
-					display: grid;
-					grid-template-columns: 1fr 1fr 1fr;
-					gap: 16rpx;
-
-					.task-item {
-						border: 1px solid #e8edf6;
-						border-radius: 16rpx;
-						padding: 20rpx;
-						text-align: center;
-
-						.task-label {
-							font-size: 24rpx;
-							color: #8896a7;
-							margin-bottom: 8rpx;
-						}
-					}
-
-					.task-item-active {
-						border: 1px solid #e0ffc1;
-						background-color: #f6ffed;
-					}
-				}
-			}
-		}
-
-		// 全局标签样式
-		.tag {
-			display: inline-flex;
-			align-items: center;
-			padding: 4rpx 16rpx;
-			border-radius: 40rpx;
-			font-size: 22rpx;
-			font-weight: 500;
-		}
-
-		.tag-blue {
-			background-color: #eef3fd;
-			color: #1857d4;
-		}
-
-		.tag-green {
-			background-color: #edfaf6;
-			color: #0d8f6f;
-		}
-
-		.tag-gray {
-			background-color: #f4f6fa;
-			color: #8896a7;
-		}
-		
-		.tag-error {
-			background-color: #fff7d8;
-			color: #e67e22;
-		}
-
-		.text-sm {
-			font-size: 24rpx;
-		}
-
-		.text-bold {
-			font-weight: 600;
-		}
-
-		.text-blue {
-			color: #1857d4;
-		}
-
-		.text-gray {
-			color: #8896a7;
-		}
-	}
-</style>

+ 0 - 346
pages_safetyEducationExamination/component/workbench/workbenchStatsCards.vue

@@ -1,346 +0,0 @@
-<template>
-	<view class="workbench-stats-cards">
-		<!-- 1. 学年数据统计 -->
-		<view class="card">
-			<view class="card-header">
-				<text class="card-title">📊 学年数据统计</text>
-				<view class="btn-outline" @click="handleShowReport">毕业报告</view>
-			</view>
-			<view class="card-body">
-				<view class="year-row" v-for="(item, index) in yearStatsList" :key="index">
-					<text class="year-label">{{ item.year }}</text>
-					<text :class="['year-status', item.statusClass]">{{ item.statusText }}</text>
-				</view>
-				<view v-if="!yearStatsList.length" class="empty-tip">暂无统计数据</view>
-			</view>
-		</view>
-
-		<!-- 2. 学习任务 -->
-		<view class="card">
-			<view class="card-header">
-				<view class="header-left">
-					<text class="card-title">📚 学习任务 <text class="badge" v-if="taskListTotal">{{ taskListTotal }}</text></text>
-					<text class="header-subtitle">待完成的学习任务</text>
-				</view>
-				<text class="header-link" @click="goToPage('/pages_safetyEducationExamination/screen-knowledge-list/screen-knowledge-list?tab=2')">更多 ›</text>
-			</view>
-			<view class="card-body">
-				<view class="list-item" v-for="(item, index) in taskList" :key="index" @click="goToPage('/pages_safetyEducationExamination/screen-study-detail/screen-study-detail?id=' + item.id)">
-					<view class="list-left">
-						<text class="item-title">{{ item.courseName }}</text>
-						<text class="item-desc">{{ item.deptName }}下发 · <text class="text-orange">待完成</text></text>
-					</view>
-					<text class="list-arrow">›</text>
-				</view>
-				<view v-if="!taskList.length" class="empty-tip">暂无待完成任务</view>
-			</view>
-		</view>
-
-		<!-- 3. 模拟考试 -->
-		<view class="card">
-			<view class="card-header">
-				<view class="header-left">
-					<text class="card-title">📝 模拟考试 <text class="badge" v-if="mockExamListTotal">{{ mockExamListTotal }}</text></text>
-					<text class="header-subtitle">待完成的模拟练习</text>
-				</view>
-				<text class="header-link" @click="goToPage('/pages_safetyEducationExamination/screen-exam-list/screen-exam-list?tab=1')">更多 ›</text>
-			</view>
-			<view class="card-body">
-				<view class="list-item" v-for="(item, index) in mockExamList" :key="index" @click="goToPage('/pages_safetyEducationExamination/screen-mock-detail/screen-mock-detail?id=' + item.id)">
-					<view class="list-left">
-						<text class="item-title">{{ item.examName }}</text>
-						<text class="item-desc">最高成绩: <text class="text-orange">{{ item.maxScore?item.maxScore:0 }} 分</text> · 及格: {{ item.passScore }}分</text>
-					</view>
-					<text class="list-arrow">›</text>
-				</view>
-				<view v-if="!mockExamList.length" class="empty-tip">暂无模拟考试</view>
-			</view>
-		</view>
-
-		<!-- 4. 在线考试 -->
-		<view class="card">
-			<view class="card-header">
-				<view class="header-left">
-					<text class="card-title">🎓 在线考试</text>
-					<text class="header-subtitle">待完成的在线考试</text>
-				</view>
-				<text class="header-link" @click="goToPage('/pages_safetyEducationExamination/screen-exam-list/screen-exam-list?tab=0')">更多 ›</text>
-			</view>
-			<view class="card-body">
-				<view 
-					class="exam-task-card" 
-					:class="{ 'active-exam': item.isActive }" 
-					v-for="(item, index) in onlineExamList" 
-					:key="index"
-					@click="goToPage('/pages_safetyEducationExamination/screen-exam-detail/screen-exam-detail?id=' + item.id)"
-				>
-					<view class="exam-header-row">
-						<view class="exam-tag-row">
-							<text class="tag" :class="item.isActive ? 'tag-blue' : 'tag-orange'">{{ item.examTypeName }}</text>
-							<view class="dot dot-orange" v-if="item.isActive"></view>
-							<text class="text-orange text-xs" v-if="item.isActive">进行中</text>
-						</view>
-						<text class="list-arrow" :class="item.isActive ? 'text-blue' : ''">›</text>
-					</view>
-					<text class="exam-title">{{ item.title }}</text>
-				</view>
-				<view v-if="!onlineExamList[0]" class="empty-tip">暂无在线考试</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	import { 
-		examElLabEduRelationAcademicYearProgress, 
-		examUserCourseLearningList, 
-		examUserExamMockList, 
-		examUserExamStudyTaskList 
-	} from '@/pages_safetyEducationExamination/api/index.js'
-
-	export default {
-		name: 'WorkbenchStatsCards',
-		data() {
-			return {
-				yearStatsList: [],
-				taskList: [],
-				taskListTotal:0,
-				mockExamList: [],
-				mockExamListTotal: 0,
-				onlineExamList: [],
-			}
-		},
-		created() {
-			this.fetchAllData();
-		},
-		methods: {
-			async fetchAllData() {
-				// 并行请求所有数据,提升加载速度
-				await Promise.all([
-					this.examElLabEduRelationAcademicYearProgress(),
-					this.examUserCourseLearningList(),
-					this.examUserExamMockList(),
-					this.examUserExamStudyTaskList(),
-				]);
-			},
-			//年度数据
-			async examElLabEduRelationAcademicYearProgress() {
-				try {
-					const { data } = await examElLabEduRelationAcademicYearProgress();
-					if (data.code === 200) {
-						this.yearStatsList = (data.data || []).map(item => ({
-							year: item.academicYear,
-							statusText: item.statusCode == '0' ? `未开始` : (item.statusCode == '2' ? `通过丨`+item.score : (item.statusCode == '1' ? `进行中` : '未通过')),
-							statusClass: item.statusCode == '2' ? 'year-status-pass' : (item.statusCode == '1' ? 'year-status-going' : 'year-status-text')
-						}));
-					}
-				} catch (e) { console.error('获取学年统计失败', e); }
-			},
-			//学习任务
-			async examUserCourseLearningList() {
-				try {
-					const { data } = await examUserCourseLearningList({page:1,pageSize:2,learnStatus:'01'});
-					if (data.code === 200) {
-						this.taskList = data.data.records || [];
-						this.taskListTotal = data.data.total || 0;
-					}
-				} catch (e) { console.error('获取学习任务失败', e); }
-			},
-			//模拟考试
-			async examUserExamMockList() {
-				try {
-					const { data } = await examUserExamMockList({page:1,pageSize:1});
-					if (data.code === 200){
-						this.mockExamList = data.data.records || [];
-						this.mockExamListTotal = data.data.total || 0;
-					}
-				} catch (e) { console.error('获取模拟考试失败', e); }
-			},
-			//在线考试(查询1条特殊考试1条普通考试并组合数据)
-			async examUserExamStudyTaskList() {
-				try {
-        const [res1, res2] = await Promise.all([
-					examUserExamStudyTaskList({ page: 1, pageSize: 1, examStatus: 2, isSpecialExam: true }),
-					examUserExamStudyTaskList({ page: 1, pageSize: 1, examStatus: 2, isSpecialExam: false })
-        ]);
-        let list = [];
-        if (res1.data.code === 200) {
-					list = [...list, ...(res1.data.data.records || [])];
-        }
-        if (res2.data.code === 200) {
-					list = [...list, ...(res2.data.data.records || [])];
-        }
-				console.log('res1',res1)
-				console.log('res2',res2)
-				console.log('list',list)
-				this.$set(this,'onlineExamList',list);
-				} catch (e) { console.error('获取在线考试失败', e); }
-			},
-
-			// 根据考试类型动态生成底部信息字段
-			buildExamFields(item) {
-				const fields = [];
-				if (item.requiredHours !== undefined) {
-					fields.push({
-						label: '学时要求',
-						value: `${item.completedHours || 0}/${item.requiredHours} 学时`,
-						valueClass: item.hoursMet ? '' : 'text-orange',
-						extra: item.hoursMet ? '' : '未达标'
-					});
-				}
-				if (item.taskStatus) {
-					fields.push({ label: '学习任务', value: item.taskStatus, valueClass: item.taskStatus === '已完成' ? '' : 'text-orange' });
-				}
-				if (item.mockStatus) {
-					fields.push({ label: '模拟考试', value: item.mockStatus, valueClass: item.mockStatus === '已完成' ? '' : 'text-orange' });
-				}
-				if (item.examConfirmStatus) {
-					fields.push({ label: '考试状态', value: item.examConfirmStatus, valueClass: 'text-gray' });
-				}
-				return fields;
-			},
-
-			goToPage(url) {
-				uni.navigateTo({ url });
-			},
-			
-			handleShowReport() {
-				// 触发事件让父组件处理弹窗,或直接在组件内处理
-				uni.navigateTo({ url: '/pages_safetyEducationExamination/graduation-report/graduation-report' });
-			},
-		}
-	}
-</script>
-
-<style lang="stylus" scoped>
-	.workbench-stats-cards {
-		padding:0 32rpx;
-		.card {
-			background: #fff;
-			border-radius: 24rpx;
-			overflow: hidden;
-			margin-bottom: 24rpx;
-			box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.03);
-			border:1px solid #dde3ed;
-		}
-
-		.card-header {
-			background: #f4f6fa;
-			padding: 20rpx 28rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-		}
-
-		.header-left {
-			display: flex;
-			align-items: center;
-			gap: 12rpx;
-		}
-
-		.card-title {
-			font-size: 28rpx;
-			font-weight: 700;
-			color: #333;
-		}
-
-		.header-subtitle {
-			font-size: 22rpx;
-			color: #8896a7;
-		}
-
-		.header-link {
-			font-size: 24rpx;
-			color: #1857d4;
-		}
-
-		.btn-outline {
-			font-size: 22rpx;
-			color: #1857d4;
-			border: 1px solid rgba(24, 87, 212, 0.3);
-			padding: 6rpx 16rpx;
-			border-radius: 8rpx;
-		}
-
-		.badge {
-			background: #ff4d4f;
-			color: #fff;
-			font-size: 20rpx;
-			padding: 2rpx 10rpx;
-			border-radius: 20rpx;
-			margin-left: 8rpx;
-			font-weight: 400;
-		}
-
-		.card-body {
-			padding: 16rpx 28rpx 24rpx;
-		}
-
-		// 学年统计样式
-		.year-row {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding: 12rpx 0;
-			border-bottom: 1px solid #f4f6fa;
-			&:last-child { border-bottom: none; }
-		}
-		.year-label { font-size: 26rpx; color: #333; font-weight: 500; }
-		.year-status { font-size: 24rpx; font-weight: 500; }
-		.year-status-pass { color: #0d8f6f; }
-		.year-status-going { color: #1857d4; }
-		.year-status-text { color: #333; }
-
-		// 列表项样式
-		.list-item {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			padding: 16rpx 0;
-			border-bottom: 1px solid #f4f6fa;
-			&:last-child { border-bottom: none; }
-		}
-		.item-title { font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 8rpx; display: block; }
-		.item-desc { font-size: 22rpx; color: #8896a7; }
-		.list-arrow { font-size: 32rpx; color: #ccc; }
-
-		// 在线考试卡片样式
-		.exam-task-card {
-			background: #f4f6fa;
-			border-radius: 16rpx;
-			padding: 20rpx;
-			margin-bottom: 16rpx;
-			&:last-child { margin-bottom: 0; }
-		}
-		.active-exam {
-			background: #eef3fd;
-			border: 1px solid rgba(24, 87, 212, 0.15);
-		}
-		.exam-header-row {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			margin-bottom: 12rpx;
-		}
-		.exam-tag-row { display: flex; align-items: center; gap: 8rpx; }
-		.exam-title { font-size: 28rpx; font-weight: 500; color: #333; margin-bottom: 16rpx; display: block; }
-		
-		// 通用工具类
-		.tag {
-			display: inline-flex;
-			padding: 4rpx 12rpx;
-			border-radius: 8rpx;
-			font-size: 22rpx;
-			font-weight: 500;
-		}
-		.tag-blue { background: #eef3fd; color: #1857d4; }
-		.tag-orange { background: #fef6ec; color: #e67e22; }
-		.dot { width: 12rpx; height: 12rpx; border-radius: 50%; }
-		.dot-orange { background: #e67e22; }
-		.text-xs { font-size: 22rpx; }
-		.text-orange { color: #e67e22; }
-		.text-blue { color: #1857d4; }
-		.text-gray { color: #8896a7; }
-		.empty-tip { text-align: center; padding: 30rpx 0; color: #ccc; font-size: 24rpx; }
-	}
-</style>

+ 5 - 4
pages_safetyEducationExamination/views/exam/onlineExamPlay.vue

@@ -3,7 +3,8 @@
 	<view class="exam-screen">
 		<!-- 顶部栏 -->
 		<view class="topbar">
-			<view class="topbar-left" @click="requestSubmit(false)">‹ 交卷</view>
+			<!-- <view class="topbar-left" @click="requestSubmit(false)">‹ 交卷</view> -->
+			<view class="topbar-left"></view>
 			<view class="topbar-title">{{ examInfo.examName || '考试中' }}</view>
 			<view class="topbar-right" @click="toggleQuestionNav">题号</view>
 		</view>
@@ -148,12 +149,12 @@
 					<!-- <view v-if="resultData.canRetake" class="result-btn result-btn-primary" @click="retakeExam">重新考试</view> -->
 					<view class="result-btn result-btn-primary" @click="closeResult">返回</view>
 				</view>
-				<view class="result-cert">
+				<view class="result-cert" v-if="resultData.certificatePath">
 					<text class="result-cert-icon">🏆</text>
 					<view class="result-cert-info">
 						<view class="result-cert-title">您已获得证书!</view>
-						<view class="result-cert-name">{{ resultData.certName }}</view>
-						<view class="result-cert-btn" @click="goCertificate(resultData.certUrl)">查看证书</view>
+						<view class="result-cert-name">{{ resultData.certificateName }}</view>
+						<view class="result-cert-btn" @click="goCertificate(resultData.certificatePath)">查看证书</view>
 					</view>
 				</view>
 			</view>

+ 0 - 101
pages_safetyEducationExamination/views/home.vue

@@ -1,101 +0,0 @@
-<!-- 教育考试首页 -->
-<template>
-	<view class="safetyEducationExamination-home">
-		<view class="safetyEducationExamination-home-page">
-			<workbench class="safetyEducationExamination-content" v-show="currentTab == 1"></workbench>
-			<learning class="safetyEducationExamination-content" v-show="currentTab == 2"></learning>
-			<online-exams class="safetyEducationExamination-content" v-show="currentTab == 3"></online-exams>
-			<practice class="safetyEducationExamination-content" v-show="currentTab == 4"></practice>
-		</view>
-		<tab-bar></tab-bar>
-	</view>
-</template>
-
-<script>
-	import {
-		systemMineUserEdit
-	} from '@/pages_safetyEducationExamination/api/index.js'
-	import {
-		workbench
-	} from '@/pages_safetyEducationExamination/component/workbench/index'
-	import {
-		learning
-	} from '@/pages_safetyEducationExamination/component/learning/index'
-	import {
-		onlineExams
-	} from '@/pages_safetyEducationExamination/component/onlineExams/index'
-	import {
-		practice
-	} from '@/pages_safetyEducationExamination/component/practice/index'
-	import {
-		tabBar
-	} from '@/pages_safetyEducationExamination/component/tabBar'
-	export default {
-		components: {
-			workbench,
-			learning,
-			onlineExams,
-			practice,
-			tabBar,
-		},
-		data() {
-			return {
-				currentTab: 1 ,
-				tabTitles: {
-					1: { title: '安全教育考试', bgColor: '#1857d4', frontColor: '#ffffff' },
-					2: { title: '学习培训', bgColor: '#10a37f', frontColor: '#ffffff' },
-					3: { title: '在线考试', bgColor: '#e67e22', frontColor: '#ffffff' },
-					4: { title: '刷题练习', bgColor: '#ffffff', frontColor: '#000000' }
-				}
-			}
-		},
-		created() {
-			uni.$on('update-tab-bar', (type) => {
-				this.currentTab = type;
-				const style = this.tabTitles[type];
-				uni.setNavigationBarTitle({
-					title: style.title
-				});
-				uni.setNavigationBarColor({
-					frontColor: style.frontColor,      // 仅支持 #ffffff 和 #000000
-					backgroundColor: style.bgColor,    // 必须是十六进制颜色
-					animation: {
-						duration: 200,                 // 设置 200ms 的过渡动画,体验更丝滑
-						timingFunc: 'easeIn'
-					}
-				});
-			});
-		},
-		onShow() {
-			uni.$emit('update-tab-bar', this.currentTab);
-		},
-		methods: {
-
-		},
-		beforeDestroy() {
-			uni.$off('update-tab-bar');
-		}
-	}
-</script>
-
-<style lang="stylus" scoped>
-	.safetyEducationExamination-home {
-		height: 100%;
-		display: flex;
-		flex-direction: column;
-		overflow: hidden;
-		background-color: #f0f4fb;
-		.safetyEducationExamination-home-page{
-			flex:1;
-			display: flex;
-			flex-direction: column;
-			overflow: hidden;
-			.safetyEducationExamination-content{
-				flex:1;
-				display: flex;
-				flex-direction: column;
-				overflow: hidden;
-			}
-		}
-	}
-</style>

+ 2 - 0
pages_safetyEducationExamination/views/home/component/userInfoCard.vue

@@ -407,8 +407,10 @@
 					display: grid;
 					grid-template-columns: 1fr 1fr 1fr;
 					gap: 16rpx;
+					display: flex;
 
 					.task-item {
+						flex:1;
 						border: 1px solid #e8edf6;
 						border-radius: 16rpx;
 						padding: 20rpx;