src/pages/cameraAccess/components/DataStackInfo.vue
@@ -271,7 +271,7 @@
    <template v-for="stack in DataStackPool.dirs">
      <!-- 文件上传组件 -->
      <file-uploader :ref="`uploader_${stack.id}`" :key="stack.id" v-show="activeName === 'uploading' && stack.id == DataStackPool.selectedDir.id" :attrs="attrs" />
      <file-uploader :ref="`uploader_${stack.id}`" :key="stack.id" v-show="activeName === 'uploading' && stack.id == DataStackPool.selectedDir.id" :sourceType="stack.type" />
      <!-- <file-uploader ref="uploader" v-show="activeName === 'uploading'" /> -->
    </template>
    <!-- 文件预览 -->
@@ -416,9 +416,7 @@
      timer: 0,
      targetDir: "",
      targetFile: "",
      attrs: {
        accept: ""
      }
    };
  },
  mounted () {
@@ -437,18 +435,7 @@
        this.$root.$children[0].$children[1].$refs['sepRule'].getStackFiles();
      }
    },
    'form.type': {
      handler (n, o) {
        console.log(n, o)
        if (n == 1) {
          //仅支持上传视频
          this.$set(this.attrs, 'accept', ".mp4");
        } else if (n == 2) {
          //图片
          this.$set(this.attrs, 'accept', ".jpg,.jpeg,.png");
        }
      }
    }
  },
  methods: {
    preview (row) {
@@ -482,11 +469,9 @@
      this.fileList = [];
    },
    selectDir (node) {
      if (node.id === "") {
        return
      }
      this.isDisabled = false;
      this.isAdd = false;
      this.videoItem = null;
@@ -517,9 +502,7 @@
      if (uid !== this.taskUid || this.form.id === "") {
        return;
      }
      this.fetchFileList();
      let _this = this;
      this.timer = setTimeout(() => {
        _this.timingtask(uid);
@@ -545,7 +528,6 @@
      }).catch(err => {
        console.log(err)
      })
    },
    // 保存
@@ -612,7 +594,6 @@
    },
    handleUpload () {
      console.log(this.DataStackPool.selectedDir.id)
      debugger
      console.log(this.$refs[`uploader_${this.DataStackPool.selectedDir.id}`][0].$refs.button.$refs.btn.click())
    },
    handleRefrashFileList (val) {