hanbaoshan
2020-10-27 da98d2a8a686cde09b20345e4a2b55a85410fde4
src/pages/cameraAccess/components/DataStackInfo.vue
@@ -105,7 +105,12 @@
        </el-tooltip>
        <!-- 文件上传 -->
        <el-button type="primary" size="small" :disabled="!DataStackPool.selectedDir.id" @click="handleUpload">
        <el-button
          type="primary"
          size="small"
          :disabled="!DataStackPool.selectedDir.id"
          @click="handleUpload"
        >
          上传
          <i class="el-icon-upload el-icon--right"></i>
        </el-button>
@@ -118,7 +123,6 @@
      v-show="activeName === 'uploaded' "
      :data="fileList"
      tooltip-effect="dark"
      border
      :header-cell-style="{background:'#f8f8f8', color:'#222222', textAlign:'center'}"
      @select="handleSelect"
@@ -260,6 +264,7 @@
    </div>
    <!-- 文件上传组件 -->
    <!-- <file-uploader ref="uploader" v-show="activeName === 'uploading'" :attrs="attrs" /> -->
    <file-uploader ref="uploader" v-show="activeName === 'uploading'" />
    <!-- 文件预览 -->
@@ -403,12 +408,16 @@
      editRowId: "",
      timer: 0,
      targetDir: "",
      targetFile: ""
      targetFile: "",
      attrs: {
        accept: ""
      }
    };
  },
  mounted() {
    this.initFormData();
    console.log(this.PollData.barCharts)
  },
  beforeDestroy() {
    this.taskUid = 0;
@@ -418,8 +427,20 @@
      handler(n,o){
        //数据栈文件数量变更
        //更新独立场景数据栈文件
        console.log(this.$root.$children[0].$children[1].$refs['sepRule'])
        console.log(this.$root.$children[0].$children[1].$refs['sepRule']);
        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', "image/jpg,image/jpeg,image/png");
        }
      }
    }
  },
@@ -584,7 +605,9 @@
      this.multipleSelection = [];
    },
    handleUpload() {
      console.log(this.DataStackPool.selectedDir.id)
      console.log(this.$refs.uploader.$refs.button.attrs)
      console.log(this.$refs.uploader.$refs.button.$refs.btn.click())
    },
    handleRefrashFileList(val) {
@@ -843,19 +866,19 @@
    vertical-align: middle;
  }
  .snapshot-video {
    background: url("/images/cameraAccess/video.png");
    background: url('/images/cameraAccess/video.png');
    background-repeat: round;
  }
  .snapshot-image {
    background: url("/images/cameraAccess/image.png");
    background: url('/images/cameraAccess/image.png');
    background-repeat: round;
  }
  .snapshot-audio {
    background: url("/images/cameraAccess/audio.png");
    background: url('/images/cameraAccess/audio.png');
    background-repeat: round;
  }
  .snapshot-files {
    background: url("/images/cameraAccess/files.png");
    background: url('/images/cameraAccess/files.png');
    background-repeat: round;
  }
}