scorpio 2 жил өмнө
parent
commit
4c2216d792

+ 7 - 1
src/views/home/component/current.vue

@@ -130,6 +130,7 @@ export default {
   },
   data() {
     return {
+      dispatchParams: null,
       authorizeShow: false,
       addShow: false,
       show: false,
@@ -162,6 +163,7 @@ export default {
     return { permissions, user }
   },
   created() {
+    this.dispatchParams = this.$route.query
     this.folderName = this.$route.query.folderName
     this.folderNumber = this.$route.query.folderNumber
     this.isAccess = this.$route.query.isAccess
@@ -215,7 +217,11 @@ export default {
       })
     },
     addFile() {
-      this.$api.project.fileAdd(this.fileList).then(res => {
+      let data = { files: this.fileList }
+      if (this.dispatchParams) {
+        data = Object.assign(data, this.dispatchParams)
+      }
+      this.$api.project.fileAdd(data).then(res => {
         if (res.code === 200) {
           this.show = false
           this.$emit('reFiles')

+ 6 - 1
src/views/home/component/files_list.vue

@@ -220,6 +220,7 @@ export default {
   },
   data() {
     return {
+      dispatchParams: null,
       show: false,
       applyShow: false,
       files: [],
@@ -355,7 +356,11 @@ export default {
       })
     },
     addFile() {
-      this.$api.project.fileAdd(this.fileList).then(res => {
+      let data = { files: this.fileList }
+      if (this.query) {
+        data = Object.assign(data, this.query)
+      }
+      this.$api.project.fileAdd(data).then(res => {
         if (res.code === 200) {
           this.show = false
           this.$emit('reFiles')