|
|
@@ -189,6 +189,8 @@ export default {
|
|
|
list.forEach(item => {
|
|
|
item.type=1,
|
|
|
item.userId=item.id
|
|
|
+ item.userName=item.username
|
|
|
+ delete item.username
|
|
|
});
|
|
|
|
|
|
this.userPeopleList=(list)
|
|
|
@@ -196,7 +198,9 @@ export default {
|
|
|
lackUserListHandler(list){
|
|
|
list.forEach(item => {
|
|
|
item.type=2
|
|
|
- item.userId=item.id
|
|
|
+ item.userId=item.id,
|
|
|
+ item.userName=item.username
|
|
|
+ delete item.username
|
|
|
});
|
|
|
|
|
|
this.lackPeopleList=(list)
|
|
|
@@ -206,7 +210,7 @@ export default {
|
|
|
listHandler(list){
|
|
|
|
|
|
console.log(list,'ssss');
|
|
|
- this.form.imageList=list
|
|
|
+ this.form.imageList.push(list)
|
|
|
},
|
|
|
|
|
|
//表单提交
|
|
|
@@ -218,13 +222,14 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
let obj=JSON.parse(JSON.stringify(this.form))
|
|
|
+ obj.imageList=obj.imageList.join(',')
|
|
|
// obj.trainingStartDateTime=obj.trainingStartDateTime+' 00:00:00'
|
|
|
- this.form.taskUserList.push(...this.userPeopleList,...this.lackPeopleList)
|
|
|
+ obj.taskUserList.push(...this.userPeopleList,...this.lackPeopleList)
|
|
|
edittrainingInfo({
|
|
|
id:this.trainingData.id,
|
|
|
type:this.trainingData.type,
|
|
|
submitType:2,
|
|
|
- ...this.form
|
|
|
+ ...obj
|
|
|
}).then(res=>{
|
|
|
let { code ,msg}=res
|
|
|
Toast('登记成功')
|