| | |
| | | width: 85vw; |
| | | height: 180px; |
| | | border-radius: 10rpx; |
| | | position: relative; |
| | | } |
| | | |
| | | .block-select-title { |
| | |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | padding: 70rpx 20rpx; |
| | | padding: 50rpx 20rpx; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | 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; |
| | | } |
| | | |
| | | |
| | |
| | | }, |
| | | // 处理数据结构 |
| | | chageData(arr, zrr) { |
| | | let newData = [] |
| | | // 题库题目类型 |
| | | const questionTypeList = [{ |
| | | name: '单选题', |
| | |
| | | ] |
| | | 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++) { |
| | |
| | | } |
| | | 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 |
| | |
| | | updateCourse: false, |
| | | currentCourse: null, |
| | | submitLoading: false, |
| | | showContentOnly: false, |
| | | // 加载参数 |
| | | bottomLoading: false, |
| | | isMoreData: false, |
| | |
| | | this.getData() |
| | | }, |
| | | |
| | | showDialog() { |
| | | this.setData({ |
| | | showContentOnly: true, |
| | | }); |
| | | }, |
| | | |
| | | closeDialog() { |
| | | this.setData({ |
| | | showContentOnly: false |
| | | }); |
| | | }, |
| | | |
| | | // 课程详情 |
| | | todetail(e) { |
| | | const { |
| | |
| | | "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" |
| | | } |
| | | } |
| | |
| | | </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> |
| | |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | box-sizing: border-box; |
| | | height: 300rpx; |
| | | min-height: 300rpx; |
| | | border-bottom: 1rpx solid #eee; |
| | | } |
| | | |
| | |
| | | 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 { |
| | |
| | | .courseInfo .reason { |
| | | font-size: 24rpx; |
| | | color: red; |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | } |
| | | |
| | | .courseInfo .desc { |
| | |
| | | ] |
| | | 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) |
| | |
| | | <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> |
| | |
| | | <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> |