| | |
| | | </el-tooltip> |
| | | |
| | | <!-- 文件上传 --> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | :disabled="!DataStackPool.selectedDir.id" |
| | | @click="handleUpload" |
| | | > |
| | | 上传 |
| | | <i class="el-icon-upload el-icon--right"></i> |
| | | </el-button> |
| | | <template v-for="stack in DataStackPool.dirs"> |
| | | <el-button |
| | | :class="`uploader_${stack.id}`" |
| | | :key="stack.id" |
| | | type="primary" |
| | | size="small" |
| | | v-show="stack.id == DataStackPool.selectedDir.id" |
| | | :disabled="!DataStackPool.selectedDir.id" |
| | | @click="handleUpload" |
| | | > |
| | | 上传 |
| | | <i class="el-icon-upload el-icon--right"></i> |
| | | </el-button> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <!-- 分页 --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | v-show="activeName=='uploaded'" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleRefrashFileList" |
| | | :current-page="page" |
| | |
| | | ></el-pagination> |
| | | </div> |
| | | |
| | | <!-- 文件上传组件 --> |
| | | <file-uploader ref="uploader" v-show="activeName === 'uploading'" :attrs="attrs" /> |
| | | <!-- <file-uploader ref="uploader" v-show="activeName === 'uploading'" /> --> |
| | | |
| | | <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" v-show="activeName === 'uploading'" /> --> |
| | | </template> |
| | | <!-- 文件预览 --> |
| | | <el-dialog title="查看文件" :visible.sync="previewDialog" width="500px"> |
| | | <video v-if="videoUrl" :src="videoUrl" controls style="margin-top: 12px;">您的浏览器不支持 video 标签。</video> |
| | |
| | | handler (n, o) { |
| | | //数据栈文件数量变更 |
| | | //更新独立场景数据栈文件 |
| | | console.log(this.$root.$children[0].$children[1].$refs['sepRule']); |
| | | this.$root.$children[0].$children[1].$refs['sepRule'].getStackFiles(); |
| | | } |
| | | }, |
| | |
| | | if (n == 1) { |
| | | //仅支持上传视频 |
| | | this.$set(this.attrs, 'accept', ".mp4"); |
| | | }else if (n == 2) { |
| | | } else if (n == 2) { |
| | | //图片 |
| | | this.$set(this.attrs, 'accept', ".jpg,.jpeg,.png"); |
| | | } |
| | |
| | | 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()) |
| | | debugger |
| | | console.log(this.$refs[`uploader_${this.DataStackPool.selectedDir.id}`][0].$refs.button.$refs.btn.click()) |
| | | }, |
| | | handleRefrashFileList (val) { |
| | | this.page = val; |