Merge branch 'bjxz-cjw' into bjxz-dev

This commit is contained in:
Vce 2024-05-24 22:54:39 +08:00
commit 593ea4ced6
2 changed files with 16 additions and 32 deletions

View File

@ -859,15 +859,15 @@ export default {
}) })
} else { } else {
// this.examForm.questions = this.$refs.questionListTable.selection; // this.examForm.questions = this.$refs.questionListTable.selection;
console.log(this.examForm.questions,886633)
if(this.$refs.questionListTable){ if(this.$refs.questionListTable){
this.examForm.questions = this.$refs.questionListTable.selection; this.examForm.questions = this.$refs.questionListTable.selection;
} else { } else {
let arr = []; let arr = [];
this.questionList.map(item => { this.questionList.map(item => {
this.examForm.questions.split(',').map(item2 => { this.examForm.questions.split(',').map(item2 => {
if(item.id === item){ if(item.id === item2){
arr.push({id: item,type: item2.type}) // arr.push({id: item.id,type: item.type})
arr.push(item)
} }
}) })
}) })

View File

@ -387,6 +387,7 @@ export default {
this.$refs.examForm.resetFields() this.$refs.examForm.resetFields()
} }
this.selectWorkerList = [] this.selectWorkerList = []
this.selectedWorkerList = []
} }
}, },
// subjectId(newV,oldV){ // subjectId(newV,oldV){
@ -443,42 +444,24 @@ export default {
this.$message.success('删除成功!'); this.$message.success('删除成功!');
} }
}, },
addlocal(){ async addlocal(){
this.getWorkerInfoList(); await this.getWorkerInfoList();
setTimeout(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
for(let i=0;i<this.workerList.length;i++ ){
// for(let i=0;i<this.workerList.length;i++ ){ for(let j=0;j<this.selectedWorkerList.length;j++){
// for(let j=0;i<this.selectedWorkerList.length;j++){ if(this.workerList[i].id == this.selectedWorkerList[j].id){
// if(this.workerList[i].id == this.selectedWorkerList[j].id){ console.log(this.workerList[i])
// console.log(this.workerList[i]) console.log(this.selectedWorkerList[j])
// console.log(this.selectedWorkerList[j]) this.$refs.multipleTable.toggleRowSelection(this.workerList[i],true)
// this.$refs.multipleTable.toggleRowSelection(this.workerList[i],true) }
// } }
// } }
// }
// this.workerList.map((item,index) => {
// this.selectedWorkerList.map((item2,index2) => {
// if(item.id === item2.id){
// this.$refs.multipleTable.toggleRowSelection(this.workerList[index],true)
// }
// })
// })
}) })
},10) },10)
this.dialogVisible3 = true; this.dialogVisible3 = true;
// this.$nextTick(() => {
// for(let i=0;i<this.questionList.length;i++){
// for(let j = 0;j<tempStr.length;j++){
// if(tempStr[j] == this.questionList[i].id){
// this.$refs.questionListTable.toggleRowSelection(this.questionList[i],true)
// }
// }
// }
// })
}, },
localSubmitBtn(){ localSubmitBtn(){
this.selectedWorkerList = this.$refs.multipleTable.selection this.selectedWorkerList = this.$refs.multipleTable.selection
@ -801,6 +784,7 @@ export default {
this.dialogVisible = false this.dialogVisible = false
this.getRecordList() this.getRecordList()
this.selectWorkerList = [] this.selectWorkerList = []
this.selectedWorkerList = []
}) })
} else { } else {
// upSubdivisionProjectApi(this.workerInfo).then((res) => { // upSubdivisionProjectApi(this.workerInfo).then((res) => {