Procházet zdrojové kódy

培训/演练页面调整

jingyuanchao před 2 roky
rodič
revize
cd591eabb5

+ 0 - 1
src/components/orgTree/index.vue

@@ -121,7 +121,6 @@ export default {
       const resizeObserver = new ResizeObserver(entries => {
         for (let entry of entries) {
           orgTree.style.height = entry.contentRect.height + 'px';
-          console.log(entry,'entry')
         }
       });
       resizeObserver.observe(document.querySelector('.main-right-box'));

+ 15 - 2
src/views/core/edu/plan/index.vue

@@ -683,10 +683,23 @@ export default {
     fileSelected(list) {
       if (!list) return;
       let tempArry = [];
+      let fileNameList=[]
+      let addFileNameList=[]
+      this.form.fileList.forEach(x => {
+        let fileObj= JSON.parse(x);
+        fileNameList.push(fileObj.name);
+      })
       list.forEach(x => {
-        tempArry = tempArry.concat(x.fileList);
+        tempArry.forEach(s => {
+          addFileNameList.push(JSON.parse(s).name);
+        })
+        x.fileList.forEach(y => {
+         let fileObj= JSON.parse(y);
+          if (fileNameList.indexOf(fileObj.name) == -1&&addFileNameList.indexOf(fileObj.name) == -1) {
+            tempArry.push(y);
+          }
+        })
       })
-      console.log("tempArry", tempArry, this.form.fileList);
       if (this.form.fileList) {
         this.formFileListDefualtValue = this.form.fileList.concat(tempArry);
       } else {