From 563c107d00a8f355eef2bf484126c1be572c2cd1 Mon Sep 17 00:00:00 2001 From: hebo Date: Sat, 13 Sep 2025 18:25:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E8=AF=BE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/BasicNjBjSelect/demo.vue | 2 + src/components/BasicNjBjSelect/index.vue | 17 +- src/pages.json | 8 +- .../view/routine/kefuxuncha/kyRecord.vue | 289 +++++++++++ .../view/routine/kefuxuncha/kyXkList.vue | 2 +- .../view/routine/kefuxuncha/kyXkkcDetail.vue | 35 +- .../view/routine/kefuxuncha/xcXkList.vue | 20 +- .../view/routine/kefuxuncha/xcXkkcDetail.vue | 485 +++++++++++++++++- 8 files changed, 815 insertions(+), 43 deletions(-) create mode 100644 src/pages/view/routine/kefuxuncha/kyRecord.vue diff --git a/src/components/BasicNjBjSelect/demo.vue b/src/components/BasicNjBjSelect/demo.vue index 6d2c3a2..b7af54c 100644 --- a/src/components/BasicNjBjSelect/demo.vue +++ b/src/components/BasicNjBjSelect/demo.vue @@ -153,3 +153,5 @@ const setDefaultValue = () => { + + diff --git a/src/components/BasicNjBjSelect/index.vue b/src/components/BasicNjBjSelect/index.vue index 7213c5b..17086dc 100644 --- a/src/components/BasicNjBjSelect/index.vue +++ b/src/components/BasicNjBjSelect/index.vue @@ -25,7 +25,7 @@ - + { .selector-popup { background-color: #fff; border-radius: 16px 16px 0 0; - max-height: 60vh; + max-height: 80vh; + min-height: 50vh; + display: flex; + flex-direction: column; .popup-header { display: flex; @@ -501,6 +504,7 @@ onMounted(() => { justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid #eee; + flex-shrink: 0; .popup-title { font-size: 16px; @@ -529,12 +533,19 @@ onMounted(() => { } .popup-content { + flex: 1; + display: flex; + flex-direction: column; + min-height: 0; + .tree-scroll { - height: 600px; + flex: 1; background-color: #fff; + min-height: 0; .tree-container { padding: 0; + min-height: 100%; .tree-node { .tree-item { diff --git a/src/pages.json b/src/pages.json index 980b39e..3b6a22a 100644 --- a/src/pages.json +++ b/src/pages.json @@ -564,7 +564,13 @@ { "path": "pages/view/routine/kefuxuncha/xcRecord", "style": { - "navigationBarTitleText": "巡查记录" + "navigationBarTitleText": "选课巡查记录" + } + }, + { + "path": "pages/view/routine/kefuxuncha/kyRecord", + "style": { + "navigationBarTitleText": "课业巡查记录" } }, { diff --git a/src/pages/view/routine/kefuxuncha/kyRecord.vue b/src/pages/view/routine/kefuxuncha/kyRecord.vue new file mode 100644 index 0000000..3e5fd0a --- /dev/null +++ b/src/pages/view/routine/kefuxuncha/kyRecord.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/src/pages/view/routine/kefuxuncha/kyXkList.vue b/src/pages/view/routine/kefuxuncha/kyXkList.vue index a7ad647..33f442c 100644 --- a/src/pages/view/routine/kefuxuncha/kyXkList.vue +++ b/src/pages/view/routine/kefuxuncha/kyXkList.vue @@ -332,7 +332,7 @@ const goRecord = (xkkc: any) => { }; dataStore.setData(combinedData); uni.navigateTo({ - url: `/pages/view/routine/kefuxuncha/xcRecord`, + url: `/pages/view/routine/kefuxuncha/kyRecord`, }); }; diff --git a/src/pages/view/routine/kefuxuncha/kyXkkcDetail.vue b/src/pages/view/routine/kefuxuncha/kyXkkcDetail.vue index 69fedd8..a42043e 100644 --- a/src/pages/view/routine/kefuxuncha/kyXkkcDetail.vue +++ b/src/pages/view/routine/kefuxuncha/kyXkkcDetail.vue @@ -205,7 +205,14 @@ v-if="canInspect" class="submit-btn-wrap py-10 px-20 bg-white" > - + @@ -264,6 +271,9 @@ const videoList = ref([]); const inspectionStatusText = ref(""); const canInspect = ref(true); // 是否可以巡查 +// 提交状态控制 +const isSubmitting = ref(false); + // 加载巡查项目 const loadCheckItems = async () => { try { @@ -459,6 +469,16 @@ const checkInspectionTime = () => { // 提交数据 const submit = async () => { + // 防抖动:如果正在提交,直接返回 + if (isSubmitting.value) { + uni.showToast({ + title: "正在提交中,请勿重复点击", + icon: "none", + duration: 1500, + }); + return; + } + if (!canInspect.value) { uni.showToast({ title: inspectionStatusText.value, @@ -479,6 +499,9 @@ const submit = async () => { return; } + // 设置提交状态 + isSubmitting.value = true; + try { // 构建巡查项目列表 const xkXcXmList = checkItems.value.map((item: any) => { @@ -526,6 +549,9 @@ const submit = async () => { title: "提交失败", icon: "none", }); + } finally { + // 重置提交状态 + isSubmitting.value = false; } }; @@ -789,6 +815,13 @@ onMounted(async () => { display: flex; align-items: center; justify-content: center; + transition: all 0.3s ease; +} + +.submit-btn-disabled { + background-color: #d9d9d9 !important; + color: #999 !important; + cursor: not-allowed; } .cor-primary { diff --git a/src/pages/view/routine/kefuxuncha/xcXkList.vue b/src/pages/view/routine/kefuxuncha/xcXkList.vue index b926609..5b09ae1 100644 --- a/src/pages/view/routine/kefuxuncha/xcXkList.vue +++ b/src/pages/view/routine/kefuxuncha/xcXkList.vue @@ -43,12 +43,6 @@ 开课年级: {{ xkkc.njname || '暂无' }} - - 上课人数: - {{ xkkc.hasNum || 0 }} | {{ xkkc.maxNum || 0 }} - 巡查 @@ -214,7 +208,9 @@ const loadXcCourseList = async (pbData: any) => { maxNum: item.maxNum || 0, skzqlx: item.skzqlx, skzq: item.skzq, - jsName: item.jsName + jsName: item.jsName, + jxjh: item.jxjh, // 添加教学计划字段 + jxll: item.jxll // 添加教学理论字段 })); } else if (pbData.xclx === 'B') { // 类型B:直接使用返回的课程数据 @@ -230,7 +226,9 @@ const loadXcCourseList = async (pbData: any) => { maxNum: item.maxNum || 0, skzqlx: item.skzqlx, skzq: item.skzq, - jsName: item.jsName + jsName: item.jsName, + jxjh: item.jxjh, // 添加教学计划字段 + jxll: item.jxll // 添加教学理论字段 })); } @@ -315,7 +313,8 @@ const goXc = (xkkc: any) => { const pbData = dataStore.getGlobal; // 检查排班数据是否有效 - if (!pbData || !pbData.xcbt || !pbData.xcbt.includes('排班计划')) { + if (!pbData || !pbData.id || !pbData.xcbt) { + console.log('排班数据检查失败:', pbData); uni.showToast({ title: '数据异常,请重新选择排班', icon: 'none' @@ -345,7 +344,8 @@ const goRecord = (xkkc: any) => { const pbData = dataStore.getGlobal; // 检查排班数据是否有效 - if (!pbData || !pbData.xcbt || !pbData.xcbt.includes('排班计划')) { + if (!pbData || !pbData.id || !pbData.xcbt) { + console.log('排班数据检查失败:', pbData); uni.showToast({ title: '数据异常,请重新选择排班', icon: 'none' diff --git a/src/pages/view/routine/kefuxuncha/xcXkkcDetail.vue b/src/pages/view/routine/kefuxuncha/xcXkkcDetail.vue index 909d8b4..daf6dc0 100644 --- a/src/pages/view/routine/kefuxuncha/xcXkkcDetail.vue +++ b/src/pages/view/routine/kefuxuncha/xcXkkcDetail.vue @@ -44,14 +44,91 @@ - - - - {{ inspectionStatusText }} - - + + + + + + 点名情况 + + + + {{ xkkc.kcmc }} + + {{ rollCallData.dmStatus === 'A' ? '已点名' : '未点名' }} + + + + + {{ rollCallData.totalCount || 0 }} + 总人数 + + + {{ rollCallData.presentCount || 0 }} + 实到 + + + {{ rollCallData.leaveCount || 0 }} + 请假 + + + {{ rollCallData.absentCount || 0 }} + 缺勤 + + + + {{ rollCallData.remark || '点名记录' }} + {{ rollCallData.dmTime || '暂无' }} + + + + + + + + + 教学计划 + + + + + {{ plan.jhjd }} + + + 时间: + {{ plan.jhsj }} + + + 地点: + {{ plan.jhdd }} + + + 内容: + {{ plan.jhnr }} + + + + + + + + {{ teachingPlanExpanded ? '收起' : `更多(${parsedTeachingPlan.length - maxDisplayItems})` }} + + {{ teachingPlanExpanded ? '▲' : '▼' }} + + + + 暂无教学计划 + + + + @@ -207,11 +284,15 @@ @@ -220,6 +301,7 @@ @@ -824,6 +1052,13 @@ onMounted(async () => { display: flex; align-items: center; justify-content: center; + transition: all 0.3s ease; +} + +.submit-btn-disabled { + background-color: #d9d9d9 !important; + color: #999 !important; + cursor: not-allowed; } .cor-primary { @@ -845,4 +1080,200 @@ onMounted(async () => { .cor-999 { color: #999; } + +/* 点名情况卡片样式 */ +.roll-call-card { + background-color: white; + border-radius: 8px; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); +} + +.roll-call-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 15px; + padding-bottom: 10px; + border-bottom: 1px solid #f0f0f0; +} + +.course-title { + font-size: 16px; + font-weight: bold; + color: #333; + flex: 1; +} + +.roll-call-status { + font-size: 12px; + padding: 4px 12px; + border-radius: 12px; + font-weight: 500; + background-color: #fff2f0; + color: #ff4d4f; + border: 1px solid #ffccc7; + + &.completed { + background-color: #f6ffed; + color: #52c41a; + border: 1px solid #b7eb8f; + } +} + +.roll-call-stats { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 10px; + margin-bottom: 15px; +} + +.stat-item { + text-align: center; + padding: 12px 5px; + border-radius: 8px; + background: #f8f9fa; +} + +.stat-value { + font-size: 20px; + font-weight: bold; + color: #333; + display: block; + margin-bottom: 4px; + + &.present { + color: #2879ff; + } + + &.leave { + color: #ff9900; + } + + &.absent { + color: #ff4d4f; + } +} + +.stat-label { + font-size: 12px; + color: #666; +} + +.roll-call-footer { + display: flex; + justify-content: space-between; + align-items: center; + padding-top: 10px; + border-top: 1px solid #f0f0f0; + font-size: 12px; + color: #666; +} + +.footer-label { + flex: 1; +} + +.footer-time { + color: #999; + font-weight: 500; +} + +/* 教学计划卡片样式 */ +.teaching-plan-card { + background-color: white; + border-radius: 8px; + box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); +} + +.plan-content { + background-color: #f8f9fa; + border-radius: 6px; + min-height: 60px; +} + +.plan-text { + font-size: 14px; + color: #333; + line-height: 1.6; + display: block; + word-wrap: break-word; + white-space: pre-wrap; +} + +.plan-item { + margin-bottom: 20px; + padding: 15px; + background-color: #fff; + border-radius: 8px; + border: 1px solid #e0e0e0; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + + &:last-child { + margin-bottom: 0; + } +} + +.plan-stage { + font-size: 16px; + font-weight: bold; + color: #4080ff; + margin-bottom: 12px; + padding-bottom: 8px; + border-bottom: 2px solid #4080ff; + display: inline-block; +} + +.plan-details { + display: flex; + flex-direction: column; + gap: 8px; +} + +.plan-detail-item { + display: flex; + align-items: flex-start; + font-size: 14px; + line-height: 1.5; +} + +.detail-label { + color: #666; + font-weight: 500; + min-width: 50px; + flex-shrink: 0; +} + +.detail-value { + color: #333; + flex: 1; + word-wrap: break-word; +} + +.plan-toggle-btn { + display: flex; + align-items: center; + justify-content: center; + margin-top: 12px; + padding: 8px 16px; + background-color: #f0f2f5; + border-radius: 4px; + cursor: pointer; + transition: all 0.3s ease; +} + +.plan-toggle-btn:hover { + background-color: #e6f7ff; +} + +.toggle-text { + font-size: 14px; + color: #1890ff; + margin-right: 4px; +} + +.toggle-icon { + font-size: 12px; + color: #1890ff; + transition: transform 0.3s ease; +}