|
@@ -341,36 +341,48 @@
|
|
|
setTimeout(async () => {
|
|
|
if(this.$route.params.ac){
|
|
|
let item = this.$route.params.ac
|
|
|
- let fullItem = item.id ? await this.getVoteDetails(item) : item
|
|
|
- this.currentVote = fullItem
|
|
|
- this.activeVoteIndex = 0
|
|
|
- this.voteList = [fullItem]
|
|
|
- /* 如果是区级的活动 则需要根据recordUrl去换取区级活动的作答数据 */
|
|
|
- if (this.isAreaVote && item.id) {
|
|
|
- this.areaVoteTeachers = []
|
|
|
- this.areaSchIndex = 0
|
|
|
- this.areaSchList = this.areaRecord.map(i => i.name)
|
|
|
- this.areaRecord.length && this.getAreaRecord(0)
|
|
|
- }else{
|
|
|
- /* 其余类型活动则需要去根据发布对象获取对应的作答数据 */
|
|
|
- if (item.id && item.progress !== 'pending'){
|
|
|
- if(fullItem.targetType === 'research'){
|
|
|
- this.getVoteTeachers(fullItem, fullItem.tchLists)
|
|
|
- }else{
|
|
|
- this.getVoteStudents(fullItem, fullItem.classes)
|
|
|
- }
|
|
|
- }
|
|
|
+ try{
|
|
|
+ let fullItem = item.id ? await this.getVoteDetails(item) : item
|
|
|
+ this.currentVote = fullItem
|
|
|
+ this.activeVoteIndex = 0
|
|
|
+ this.voteList = [fullItem]
|
|
|
+ /* 如果是区级的活动 则需要根据recordUrl去换取区级活动的作答数据 */
|
|
|
+ if (this.isAreaVote && item.id) {
|
|
|
+ this.areaVoteTeachers = []
|
|
|
+ this.areaSchIndex = 0
|
|
|
+ this.areaSchList = this.areaRecord.map(i => i.name)
|
|
|
+ this.areaRecord.length && this.getAreaRecord(0)
|
|
|
+ }else{
|
|
|
+ /* 其余类型活动则需要去根据发布对象获取对应的作答数据 */
|
|
|
+ if (item.id && item.progress !== 'pending'){
|
|
|
+ if(fullItem.targetType === 'research'){
|
|
|
+ this.getVoteTeachers(fullItem, fullItem.tchLists)
|
|
|
+ }else{
|
|
|
+ this.getVoteStudents(fullItem, fullItem.classes)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.voteForm && (this.$refs.voteForm.voteFormEdit = false)
|
|
|
+ this.$refs.voteFormScroll.scrollTo({
|
|
|
+ y: 0,
|
|
|
+ },
|
|
|
+ 200,
|
|
|
+ "easeInQuad"
|
|
|
+ );
|
|
|
+ this.hasNewAdd = false
|
|
|
+ this.isOptionView = true
|
|
|
+ this.isAddActivity = false
|
|
|
+ }catch(e){
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: this.$t('survey.questionaire.confirmTitle'),
|
|
|
+ content: this.$t('survey.noFoundAc'),
|
|
|
+ cancelText: ' ',
|
|
|
+ onOk: () => {
|
|
|
+ this.goBackRecord(item.id)
|
|
|
+ },
|
|
|
+ onCancel: () => {}
|
|
|
+ });
|
|
|
}
|
|
|
- this.$refs.voteForm && (this.$refs.voteForm.voteFormEdit = false)
|
|
|
- this.$refs.voteFormScroll.scrollTo({
|
|
|
- y: 0,
|
|
|
- },
|
|
|
- 200,
|
|
|
- "easeInQuad"
|
|
|
- );
|
|
|
- this.hasNewAdd = false
|
|
|
- this.isOptionView = true
|
|
|
- this.isAddActivity = false
|
|
|
}else{
|
|
|
this.getVoteList(index === 0 ? 'school' : 'private')
|
|
|
}
|