| | |
| | | </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> |
| | | |
| | |
| | | @select="handleSelect" |
| | | @select-all="handleSelect" |
| | | > |
| | | <el-table-column type="selection" width="50" align="center" :selectable="isSelectable"></el-table-column> |
| | | <el-table-column type="selection" align="center" :selectable="isSelectable"></el-table-column> |
| | | <el-table-column prop="name" label="文件名"> |
| | | <template slot-scope="{row}"> |
| | | <div :class="snapshotClass"> |
| | |
| | | >{{row.name}}</a> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="fileSize" label="大小" width="120"> |
| | | <el-table-column prop="fileSize" label="大小" > |
| | | <template slot-scope="scope">{{scope.row.size | readFileSizeUnit}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="duration" label="时长" show-overflow-tooltip align="center"></el-table-column> |
| | |
| | | <!-- 分页 --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | v-show="activeName=='uploaded'" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleRefrashFileList" |
| | | :current-page="page" |
| | | :page-sizes="[5, 10, 15, 20]" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | :page-size="size" |
| | | style="position:absolute;right:10px;bottom:5px" |
| | | :total="total" |
| | |
| | | ></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"); |
| | | } |
| | |
| | | }, |
| | | fetchFileList () { |
| | | findAllFileByStackId({ name: this.searchInput, stackId: this.form.id, page: this.page, size: this.size, type: 0 }).then(rsp => { |
| | | if (rsp && rsp.success && rsp.data.total > 0) { |
| | | if (rsp && rsp.success && rsp.data.total >= 0) { |
| | | this.fileList = rsp.data.dataList; |
| | | |
| | | this.total = rsp.data.total; |
| | |
| | | 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; |