From 1e1e5f612f252d66b0d0386cf52873bb1f3f7d7b Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 01 九月 2023 16:10:37 +0800 Subject: [PATCH] 系统维护+系统监控器+调试工具的app 增加 --- src/components/subComponents/FileUpload/index.vue | 36 ++++++++++++++++++++++++------------ 1 files changed, 24 insertions(+), 12 deletions(-) diff --git a/src/components/subComponents/FileUpload/index.vue b/src/components/subComponents/FileUpload/index.vue index 97c4562..796d99f 100644 --- a/src/components/subComponents/FileUpload/index.vue +++ b/src/components/subComponents/FileUpload/index.vue @@ -10,7 +10,7 @@ @complete="onComplete" > <el-input :placeholder="uploadPlaceholder" size="small" :readonly="true" v-model="fileName"> - <uploader-btn slot="suffix" > + <uploader-btn slot="suffix"> <el-tooltip :content="tipWords" placement="top" v-if="tip"> <i class="el-icon-upload2" style="font-size:18px; color:#0088ff"></i> </el-tooltip> @@ -31,7 +31,7 @@ @complete="onComplete" @close="closeHandle" > - <uploader-btn ref="button"> + <uploader-btn ref="button" :sourceType="sourceType"> <i class="el-icon-upload2" style="font-size:18px; color:#0088ff"></i> 涓婁紶 </uploader-btn> @@ -53,6 +53,9 @@ UploaderList }, props: { + sourceType: { + type: Number, + }, tip: { type: Boolean, default: false @@ -73,14 +76,22 @@ type: String, default: "/data/api-f/file/upload" //"//192.168.20.10:3000/upload" }, + attrs: { + type: Object, + default () { + return { + + } + } + } }, data() { return { fileName: "", fileMd5: "", - attrs: { - accept: 'image/*' - }, + // attrs: { + // accept: 'image/*' + // }, statusText: { success: '涓婁紶鎴愬姛', error: '涓婁紶澶辫触', @@ -148,8 +159,8 @@ } }, computeMD5Success(md5, file) { - // 灏嗚嚜瀹氫箟鍙傛暟鐩存帴鍔犺浇uploader瀹炰緥鐨刼pts涓� - if (this.$route.path.indexOf("VideoManage") >= 0) { + //灏嗚嚜瀹氫箟鍙傛暟鐩存帴鍔犺浇uploader瀹炰緥鐨刼pts涓� + if (location.href.indexOf("dataStack") >= 0) { Object.assign(this.uploader.opts, { query: { stackId: this.DataStackPool.selectedDir.id @@ -162,7 +173,6 @@ this.statusText.paused = "鏆傚仠涓�"; }, onComplete() { - debugger this.$emit("complete", { filename: this.fileName, identifier: this.fileMd5 }); }, fileComplete() { @@ -174,6 +184,7 @@ }, mounted() { this.$nextTick(() => { + console.log(this.sourceType) window.uploader = this.$refs.uploader.uploader }) } @@ -182,10 +193,11 @@ <style lang="scss"> .file-uploader { - .el-input__suffix,.el-input__suffix-inner{ - outline: none!important; + .el-input__suffix, + .el-input__suffix-inner { + outline: none !important; } - .el-tooltip.focusing{ + .el-tooltip.focusing { outline: none; } .uploader-example { @@ -214,7 +226,7 @@ display: none; } .uploader-btn { - border: 0px; + border: 0px; } .uploader-file { height: 2px; -- Gitblit v1.8.0