|
@@ -260,11 +260,12 @@
|
|
|
this.voteForm.repeat = []
|
|
|
}
|
|
|
console.log(this.voteForm)
|
|
|
+ let classSelectScope = this.$refs.classSelectRef.evaluationInfo.scope
|
|
|
let params = Object.assign({}, this.defaultParams)
|
|
|
let target = []
|
|
|
let fileName = this.$tools.guid()
|
|
|
let isReset = this.voteForm.isReset.length > 0
|
|
|
- let isPersonal = this.$route.name === 'personalVote' && this.$refs.classSelectRef.evaluationInfo.scope === 'private'
|
|
|
+ let isPersonal = this.$route.name === 'personalVote' && classSelectScope === 'private'
|
|
|
params.code = this.getCurCode
|
|
|
params.scope = isPersonal ? 'private' : 'school'
|
|
|
params.name = this.voteForm.name
|
|
@@ -286,8 +287,13 @@
|
|
|
if (this.isEdit && this.editInfo.id && this.editInfo.code) {
|
|
|
params.id = this.editInfo.id
|
|
|
}
|
|
|
- params.classes = this.voteForm.classes
|
|
|
- console.log(params)
|
|
|
+ if(classSelectScope === 'school'){
|
|
|
+ params.classes = this.voteForm.classes
|
|
|
+ }else{
|
|
|
+ params.stuLists = this.voteForm.classes
|
|
|
+ }
|
|
|
+ console.log('提交的投票对象',params)
|
|
|
+ // return
|
|
|
/* 保存BLOB以及COSMOS */
|
|
|
this.saveorUpdateVote(params).then(res => {
|
|
|
this.$Message.success((this.isEdit && this.editInfo.id) ? this.$t('vote.form.editSuc') : this.$t(
|
|
@@ -523,9 +529,10 @@
|
|
|
// if(!this.classRooms.length){
|
|
|
// this.classRooms = await this.getClassrooms(this.userInfo.TEAMModelId)
|
|
|
// }
|
|
|
- if(item.classes.length){
|
|
|
- this.classNameArr = await this.getClassNameByIds(item.classes)
|
|
|
+ if(item.id){
|
|
|
+ this.classNameArr = item.classes.length ? await this.getClassNameByIds(item.classes) : await this.getClassNameByIds(item.stuLists)
|
|
|
}
|
|
|
+ console.log(this.classNameArr)
|
|
|
this.voteForm = null
|
|
|
this.voteOptionsContent = []
|
|
|
this.voteOptions = []
|