QYF-GitLab1
2024-12-20 69b3b282b6398b22d65601a4d9dc94bdde557f31
····
8个文件已修改
103 ■■■■ 已修改文件
packageCourse/components/studentManage/index.wxss 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/teaching/index.js 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.js 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.wxml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/course/index.wxss 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/teachClass/detail/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/pages/teachClass/index.wxml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packageCourse/components/studentManage/index.wxss
@@ -86,6 +86,7 @@
  width: 85vw;
  height: 180px;
  border-radius: 10rpx;
  position: relative;
}
.block-select-title {
@@ -99,7 +100,7 @@
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 70rpx 20rpx;
  padding: 50rpx 20rpx;
  box-sizing: border-box;
}
@@ -111,7 +112,12 @@
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 20rpx;
  min-height: 120rpx;
  padding: 0rpx 20rpx;
  box-sizing: border-box;
  position: absolute;
  bottom: 0;
  right: 0;
}
packageCourse/components/teaching/index.js
@@ -214,7 +214,6 @@
    },
    // 处理数据结构
    chageData(arr, zrr) {
      let newData = []
      // 题库题目类型
      const questionTypeList = [{
          name: '单选题',
@@ -259,22 +258,30 @@
      ]
      for (let i = 0; i < arr.length; i++) {
        const item = arr[i]
        item.questionTypeList = questionTypeList
        for (let j = 0; j < zrr.length; j++) {
          const ele = zrr[j]
          const qusObj = item.question.find((citem) => citem.cmsItemId == ele.id)
          if (qusObj?.cmsItemId) {
            ele.userAnswer = qusObj.answer
            const index = findIndexByValue(questionTypeList, ele.questionType)
        item.questionTypeList = JSON.parse(JSON.stringify(questionTypeList));
        item.other = []
        for (let j = 0; j < item.question.length; j++) {
          const ele = item.question[j]
          const data = zrr.find((sitem) => sitem.id == ele.cmsItemId)
          const index = findIndexById(zrr, ele.cmsItemId)
            if (index > -1) {
              item.questionTypeList[index].data.push(ele)
            item.other[index] = {
              ...data,
              userAnswer: ele.answer
            }
          }
        }
        item.questionTypeList = item.questionTypeList.filter((item) => item.data.length > 0)
        newData.push(item)
        if (item.other.length > 0) {
          item.other.forEach((aitem) => {
            const index = findIndexByValue(item.questionTypeList, aitem.questionType)
            if (index > -1) {
              item.questionTypeList[index].data.push(aitem)
      }
      return newData.filter((item) => item.questionTypeList.length > 0)
          })
        }
        item.questionTypeList = item.questionTypeList.filter((xitem) => xitem.data.length > 0)
      }
      return arr
    },
    findIndexByValue(res, type) {
      for (let i = 0; i < res.length; i++) {
@@ -284,6 +291,16 @@
      }
      return -1 // 如果未找到,则返回 -1
    },
    findIndexById(res, id) {
      for (let i = 0; i < res.length; i++) {
        if (res[i].id == id) {
          return i
        }
      }
      return -1 // 如果未找到,则返回 -1
    },
    toDetail(e) {
      const {
        item
packageCourse/pages/course/index.js
@@ -34,6 +34,7 @@
    updateCourse: false,
    currentCourse: null,
    submitLoading: false,
    showContentOnly: false,
    // 加载参数
    bottomLoading: false,
    isMoreData: false,
@@ -50,6 +51,18 @@
    this.getData()
  },
  showDialog() {
    this.setData({
      showContentOnly: true,
    });
  },
  closeDialog() {
    this.setData({
      showContentOnly: false
    });
  },
  // 课程详情
  todetail(e) {
    const {
packageCourse/pages/course/index.json
@@ -13,6 +13,7 @@
    "t-icon": "tdesign-miniprogram/icon/icon",
    "t-back-top": "tdesign-miniprogram/back-top/back-top",
    "t-tag": "tdesign-miniprogram/tag/tag",
    "t-loading": "tdesign-miniprogram/loading/loading"
    "t-loading": "tdesign-miniprogram/loading/loading",
    "t-dialog": "tdesign-miniprogram/dialog/dialog"
  }
}
packageCourse/pages/course/index.wxml
@@ -28,7 +28,18 @@
            </view>
            <t-tag class="margin-16" wx:if="{{item.applyState == 'Normal'}}" variant="light" theme="success">使用中</t-tag>
          </view>
          <view wx:if="{{item.applyState == 'Reject'}}" class="reason">拒绝原因: {{item.reason}}</view>
          <view wx:if="{{item.applyState == 'Reject'}}" class="reason">
            <text> 拒绝原因:</text>
            <t-tag style="margin-left: 0;" bind:tap="showDialog" class="margin-16 replay" theme="danger">点击查看</t-tag>
            <t-dialog visible="{{showContentOnly}}" bind:confirm="closeDialog" close-on-overlay-click>
              <view slot="content" class="reasonContent">
                {{item.reason}}
              </view>
              <view slot="confirm-btn" style="width: 100%;">
                <t-button theme="primary" variant="text" bindtap="closeDialog" size="large" block t-class="external-class">知道了</t-button>
              </view>
            </t-dialog>
          </view>
          <view class="desc">描述:{{item.description}}</view>
        </view>
      </view>
packageCourse/pages/course/index.wxss
@@ -71,7 +71,7 @@
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  height: 300rpx;
  min-height: 300rpx;
  border-bottom: 1rpx solid #eee;
}
@@ -79,8 +79,16 @@
  margin-left: 20rpx;
  background-color: red !important;
  border: 0 !important;
  position: relative;
  z-index: 999999;
}
.reasonContent {
  color: #666;
  font-size: 26rpx;
  line-height: 44rpx;
}
.external-class {
  border-radius: 0 !important;
}
.courseIcon {
@@ -116,6 +124,9 @@
.courseInfo .reason {
  font-size: 24rpx;
  color: red;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.courseInfo .desc {
packageCourse/pages/teachClass/detail/index.js
@@ -231,7 +231,7 @@
    ]
    for (let i = 0; i < arr.length; i++) {
      const item = arr[i]
      item.questionTypeList = questionTypeList
      item.questionTypeList = JSON.parse(JSON.stringify(questionTypeList))
      for (let j = 0; j < zrr.length; j++) {
        const ele = zrr[j]
        const qusObj = item.question.find((citem) => citem.cmsItemId == ele.id)
packageCourse/pages/teachClass/index.wxml
@@ -10,7 +10,7 @@
      <studentManage classId="{{classId}}" bookRefCode="{{defaultCmsPath}}" />
    </view>
    <!-- 教学互动 -->
    <view class="teachBox" wx:if="{{tabVal == 'teach'}}">
    <view class="teachBox" wx:if="{{tabVal == 'teach'&& userData.role == 'Teacher'}}">
      <Teach classId="{{classId}}" bookId="{{bookId}}" rootCmsItemId="{{rootCmsItemId}}" />
    </view>
  </view>
@@ -23,7 +23,7 @@
      <t-icon class="tabIcon" name="file-setting" size="24px" />
      <text class="text">学生管理</text>
    </view>
    <view class="{{tabVal == 'teach'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="teach" bindtap="tabActive">
    <view wx:if="{{ userData.role == 'Teacher'}}" class="{{tabVal == 'teach'?'tab-pubItem activeTab':'tab-pubItem'}}" data-str="teach" bindtap="tabActive">
      <t-icon class="tabIcon" name="system-setting" size="24px" />
      <text class="text">教学互动</text>
    </view>