| | |
| | | |
| | | <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> |
| | | <!-- 文件预览 --> |
| | |
| | | timer: 0, |
| | | targetDir: "", |
| | | targetFile: "", |
| | | attrs: { |
| | | accept: "" |
| | | } |
| | | |
| | | }; |
| | | }, |
| | | mounted () { |
| | |
| | | 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) { |
| | |
| | | this.fileList = []; |
| | | }, |
| | | selectDir (node) { |
| | | |
| | | if (node.id === "") { |
| | | return |
| | | } |
| | | |
| | | this.isDisabled = false; |
| | | this.isAdd = false; |
| | | this.videoItem = null; |
| | |
| | | if (uid !== this.taskUid || this.form.id === "") { |
| | | return; |
| | | } |
| | | |
| | | this.fetchFileList(); |
| | | |
| | | let _this = this; |
| | | this.timer = setTimeout(() => { |
| | | _this.timingtask(uid); |
| | |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | |
| | | }, |
| | | |
| | | // 保存 |
| | |
| | | }, |
| | | 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) { |