|
@@ -136,8 +136,22 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
- <el-dialog title="上传文件" :visible.sync="showUploadDialog" width="90%" custom-class="mobile-center-dialog" append-to-body>
|
|
|
|
|
- <uploader v-if="options" :options="options" :auto-start="true" @file-added="onFileAdded" @file-success="onFileSuccess" @complete="onUploadComplete">
|
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
|
+ title="上传文件"
|
|
|
|
|
+ :visible.sync="showUploadDialog"
|
|
|
|
|
+ width="90%"
|
|
|
|
|
+ custom-class="mobile-center-dialog"
|
|
|
|
|
+ append-to-body
|
|
|
|
|
+ >
|
|
|
|
|
+ <uploader
|
|
|
|
|
+ v-if="options"
|
|
|
|
|
+ :options="options"
|
|
|
|
|
+ :auto-start="true"
|
|
|
|
|
+ @file-added="onFileAdded"
|
|
|
|
|
+ @file-success="onFileSuccess"
|
|
|
|
|
+ @file-error="onFileError"
|
|
|
|
|
+ @complete="onUploadComplete"
|
|
|
|
|
+ >
|
|
|
<uploader-drop class="m-upload-drop">
|
|
<uploader-drop class="m-upload-drop">
|
|
|
<i class="el-icon-cloudy" />
|
|
<i class="el-icon-cloudy" />
|
|
|
<p><uploader-btn :attrs="attrs" class="m-select-link">点击选择手机文件上传</uploader-btn></p>
|
|
<p><uploader-btn :attrs="attrs" class="m-select-link">点击选择手机文件上传</uploader-btn></p>
|
|
@@ -315,7 +329,9 @@ export default {
|
|
|
})
|
|
})
|
|
|
}).catch(() => {})
|
|
}).catch(() => {})
|
|
|
},
|
|
},
|
|
|
- // ***************** Simple Uploader 移动桥接 *****************
|
|
|
|
|
|
|
+ // ****************************************************************************************************************
|
|
|
|
|
+ // Simple Uploader 文件上传
|
|
|
|
|
+ // ****************************************************************************************************************
|
|
|
onClickUpload() {
|
|
onClickUpload() {
|
|
|
this.uploadForm.pid = this.currentPid
|
|
this.uploadForm.pid = this.currentPid
|
|
|
getDiskChannelInfo().then(resp => {
|
|
getDiskChannelInfo().then(resp => {
|
|
@@ -352,10 +368,14 @@ export default {
|
|
|
addFile(this.uploadForm)
|
|
addFile(this.uploadForm)
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ onFileError(rootFile, file, response, chunk) {
|
|
|
|
|
+ this.$message.error('文件上传错误')
|
|
|
|
|
+ },
|
|
|
onUploadComplete() {
|
|
onUploadComplete() {
|
|
|
this.$message.success('上传处理完成')
|
|
this.$message.success('上传处理完成')
|
|
|
setTimeout(() => { this.showUploadDialog = false; this.changeDirectory(this.queryForm.path) }, 800)
|
|
setTimeout(() => { this.showUploadDialog = false; this.changeDirectory(this.queryForm.path) }, 800)
|
|
|
},
|
|
},
|
|
|
|
|
+ // ****************************************************************************************************************
|
|
|
handleDownload(file) { if (file && file.url) window.open(file.url, '_blank') },
|
|
handleDownload(file) { if (file && file.url) window.open(file.url, '_blank') },
|
|
|
onSearchFile() { this.$message.info('搜索触发') },
|
|
onSearchFile() { this.$message.info('搜索触发') },
|
|
|
addToAlbum() {}, moveToFolder() {} // 后续逻辑类似
|
|
addToAlbum() {}, moveToFolder() {} // 后续逻辑类似
|