|
|
@@ -150,6 +150,7 @@ import Upload from '@/components/upload/index.vue'
|
|
|
import { gettrainingInfo, edittrainingInfo } from '@/api/training.js'
|
|
|
import { newDateTime } from '@/utils/date.js'
|
|
|
import { Dialog, Toast } from 'vant'
|
|
|
+import { uniqBy } from 'lodash'
|
|
|
import PDFAndImgLook from '@/components/imgAndPDF/index.vue'
|
|
|
export default {
|
|
|
name: 'SocAppAddTraining',
|
|
|
@@ -432,16 +433,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
dataList(list) {
|
|
|
- console.log(list)
|
|
|
- let copyList = JSON.parse(JSON.stringify(this.studyList)).map(item=>item.name)
|
|
|
- let ArrItem=[]
|
|
|
- for (let index = 0; index < copyList.length; index++) {
|
|
|
- const element = copyList[index];
|
|
|
-
|
|
|
- ArrItem.push(...list.filter(item => item.name !== element));
|
|
|
- }
|
|
|
- this.studyList=ArrItem
|
|
|
- console.log(this.studyList);
|
|
|
+ this.studyList.push(...list)
|
|
|
+ this.studyList=uniqBy(this.studyList, 'name')
|
|
|
|
|
|
},
|
|
|
tagHandler(i) {
|