|
|
@@ -161,7 +161,7 @@ export default {
|
|
|
}
|
|
|
this.startTime = this.authorizeDate[0]
|
|
|
this.endTime = this.authorizeDate[1]
|
|
|
- const fileTmps = list.filter(sub => sub.type === '1').map(sub => {
|
|
|
+ const fileTmps = list.map(sub => {
|
|
|
const item = { fileId: sub.id, startTime: this.startTime, endTime: this.endTime, status: sub.check }
|
|
|
return item
|
|
|
})
|
|
|
@@ -171,13 +171,14 @@ export default {
|
|
|
endTime: this.endTime,
|
|
|
status: this.check
|
|
|
}]
|
|
|
- const folderTmp = list.filter(sub => sub.type === '2').map(sub => {
|
|
|
+
|
|
|
+ const folderTmp = list.map(sub => {
|
|
|
const item = { folderId: sub.id, startTime: this.startTime, endTime: this.endTime, status: sub.check }
|
|
|
return item
|
|
|
})
|
|
|
this.$api.project.initCode({
|
|
|
files: fileTmps,
|
|
|
- folders: folder.concat(folderTmp),
|
|
|
+ folders: type === 1 ? folderTmp : folder.concat(folderTmp),
|
|
|
type: 1,
|
|
|
projectId: this.projectId
|
|
|
}).then(res => {
|