| | |
| | | dialogVisible: false, |
| | | invitee: "", |
| | | teacherEvaluated: false, |
| | | evaluated: false |
| | | evaluated: false, |
| | | rowCol: [{ |
| | | width: '50%', |
| | | }, |
| | | { |
| | | width: '100%' |
| | | }, |
| | | { |
| | | width: '80%' |
| | | }, |
| | | { |
| | | width: '100%' |
| | | }, { |
| | | width: '100%' |
| | | }, |
| | | ], |
| | | }, |
| | | onShow() { |
| | | var that = this; |
| | |
| | | this.setData({ |
| | | bookId: options.bookId, |
| | | cmsPath: options.cmsPath, |
| | | taskId: options.bookId, |
| | | taskId: options.taskId, |
| | | consumer: options.consumer, |
| | | userId: options.userId, |
| | | userName: JSON.parse(wx.getStorageSync(app.config.userInfoKey)).nickName |
| | |
| | | this.setData({ |
| | | cmsPath: options.cmsPath, |
| | | bookId: options.bookId, |
| | | taskId: options.bookId, |
| | | taskId: options.taskId, |
| | | consumer: options.consumer, |
| | | userId: options.userId, |
| | | disabled: true |
| | |
| | | disabled: false |
| | | }); |
| | | } |
| | | console.log(options.consumer, 77) |
| | | this.getResourceData() |
| | | this.getLearnTime() |
| | | } |
| | |
| | | app.MG.identity |
| | | .getUserKey({ |
| | | domain: 'cloudLearningTime', |
| | | keys: [this.data.bookId + ''] |
| | | keys: [this.data.bookId] |
| | | }) |
| | | .then((res) => { |
| | | if (res.length > 0 && JSON.parse(res[0].value) && JSON.parse(res[0].value).length > 0) { |
| | |
| | | }, 500) |
| | | } |
| | | } |
| | | this.getTasksList() |
| | | setTimeout(() => { |
| | | this.getTasksList() |
| | | }, 500) |
| | | }) |
| | | }, |
| | | getTask(e) { |
| | | console.log(e) |
| | | let item = e.currentTarget.dataset.item |
| | | this.taskSelect(item) |
| | | }, |
| | |
| | | name: content.userName, |
| | | school: content.school, |
| | | class: content.class, |
| | | learnTime: content.learnTime, |
| | | taskShow: true, |
| | | learnTime: this.data.learnTime, |
| | | }); |
| | | this.getChildTasksList() |
| | | if (content.evaluate.length > 0) { |
| | | // content.evaluate.forEach((element) => { |
| | | // if (this.data.consumer == 'classmate') { |
| | | // element.mateEvaluation = '' |
| | | // } |
| | | // if (this.data.consumer == 'teacher') { |
| | | // element.teacherEvaluation = '' |
| | | // } |
| | | // }) |
| | | if (this.data.name && this.data.school && this.data.class) { |
| | | this.setData({ |
| | | dataList: content.evaluate, |
| | | }); |
| | | taskShow: true, |
| | | }) |
| | | this.getChildTasksList() |
| | | if (content.evaluate.length > 0) { |
| | | this.setData({ |
| | | dataList: content.evaluate, |
| | | }); |
| | | } |
| | | } else { |
| | | wx.showToast({ |
| | | title: "请先填写个人信息", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | } |
| | | } else { |
| | |
| | | } |
| | | }) |
| | | } |
| | | if (this.data.dataList.length == 0) { |
| | | this.goDetail(item) |
| | | } |
| | | } |
| | | if (this.data.dataList.length == 0) { |
| | | this.goDetail(item) |
| | | } |
| | | |
| | | }, |
| | | goDetail(item) { |
| | | this.setData({ |
| | |
| | | item.teacherEvaluation = '' |
| | | }) |
| | | } |
| | | this.setData({ |
| | | dataList: res.datas.cmsDatas[0].datas, |
| | | taskShow: true, |
| | | }); |
| | | if (this.data.name && this.data.school && this.data.class) { |
| | | this.setData({ |
| | | dataList: res.datas.cmsDatas[0].datas, |
| | | taskShow: true, |
| | | }) |
| | | } else { |
| | | wx.showToast({ |
| | | title: "请先填写个人信息", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | getChildTasksList() { |
| | |
| | | if (content.teacherComment.length > 0) { |
| | | content.teacherComment.forEach((item2) => { |
| | | if (item.id == item2.childTaskId) { |
| | | item.mateEvaluation = [item2] |
| | | item.teacherEvaluation = [item2] |
| | | if (this.data.consumer == 'teacher') { |
| | | this.setData({ |
| | | evaluated: true |
| | |
| | | content.mateComment.forEach((item3) => { |
| | | if (item.id == item3.childTaskId) { |
| | | item.mateEvaluation = [...item.mateEvaluation, item3] |
| | | console.log(item.mateEvaluation, 123) |
| | | if (this.data.consumer == 'classmate') { |
| | | if (item.mateEvaluation && item.mateEvaluation.length > 0) { |
| | | let data = item.mateEvaluation.find( |
| | |
| | | dataList: list |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 个人信息填写 |
| | | bindTnputBlur(e) { |
| | | this.setData({ |
| | | name: e.detail.value |
| | | }) |
| | | }, |
| | | onSchoolInput(e) { |
| | | this.setData({ |
| | | school: e.detail.value |
| | | }) |
| | | }, |
| | | bindClassBlur(e) { |
| | | this.setData({ |
| | | class: e.detail.value |
| | | }) |
| | | }, |
| | | |
| | |
| | | //提交自己填写 |
| | | inviteBtn() { |
| | | let empty = false |
| | | console.log(this.data.dataList, 123) |
| | | this.data.dataList.forEach((item) => { |
| | | if (item.introspection == '' || item.completion == '' || item.selfEvaluation == '') { |
| | | empty = true |
| | |
| | | }, |
| | | updateSubmit() { |
| | | let evaluate = [] |
| | | console.log(this.data.dataList, 211) |
| | | this.data.dataList.forEach((item) => { |
| | | evaluate.push({ |
| | | id: item.id, |
| | |
| | | }, |
| | | |
| | | confirmBtn() { |
| | | if (this.data.invitee == 'teacher' && this.data.teacherEvaluated) { |
| | | wx.showToast({ |
| | | title: "教师已经评价,不能再邀请教师评价!", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | return false |
| | | } |
| | | wx.showShareMenu({ |
| | | withShareTicket: true |
| | | }); |
| | | }, |
| | | confirmBtn1() { |
| | | wx.showToast({ |
| | | title: "教师已经评价,不能再邀请教师评价!", |
| | | icon: 'none', |
| | | duration: 1000 |
| | | }) |
| | | }, |
| | | submitComment() { |
| | | let mateEvaluationList = [] |
| | | let teacherEvaluationList = [] |