|
@@ -11,6 +11,7 @@
|
|
:on-error="handleUploadError"
|
|
:on-error="handleUploadError"
|
|
:on-exceed="handleExceed"
|
|
:on-exceed="handleExceed"
|
|
:on-success="handleUploadSuccess"
|
|
:on-success="handleUploadSuccess"
|
|
|
|
+ :on-change="handleChange"
|
|
:show-file-list="false"
|
|
:show-file-list="false"
|
|
:headers="headers"
|
|
:headers="headers"
|
|
class="upload-file-uploader"
|
|
class="upload-file-uploader"
|
|
@@ -22,7 +23,7 @@
|
|
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
|
<div class="el-upload__tip" slot="tip" v-if="showTip">
|
|
请上传
|
|
请上传
|
|
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b></template>
|
|
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b></template>
|
|
-<!-- <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b></template>-->
|
|
|
|
|
|
+ <!-- <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b></template>-->
|
|
的文件
|
|
的文件
|
|
</div>
|
|
</div>
|
|
</el-upload>
|
|
</el-upload>
|
|
@@ -32,7 +33,7 @@
|
|
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content"
|
|
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content"
|
|
v-for="(file, index) in fileList">
|
|
v-for="(file, index) in fileList">
|
|
<el-link :href="file.webUrl" :underline="false" target="_blank">
|
|
<el-link :href="file.webUrl" :underline="false" target="_blank">
|
|
- <span class="el-icon-document"> {{ file.webName}} </span>
|
|
|
|
|
|
+ <span class="el-icon-document"> {{ file.webName }} </span>
|
|
</el-link>
|
|
</el-link>
|
|
<div class="ele-upload-list__item-content-action">
|
|
<div class="ele-upload-list__item-content-action">
|
|
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
|
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
|
|
@@ -150,6 +151,18 @@ export default {
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ handleChange(file, fileList) {
|
|
|
|
+ var _this = this;
|
|
|
|
+ if (file.raw) {
|
|
|
|
+ let reader = new FileReader()
|
|
|
|
+ reader.onload = function (e) {
|
|
|
|
+ _this.contentHtml = e.target.result;
|
|
|
|
+ };
|
|
|
|
+ reader.readAsText(file.raw,'gb2312');
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ console.log(file, fileList);
|
|
|
|
+ },
|
|
eventLogUpload(eventCode) {
|
|
eventLogUpload(eventCode) {
|
|
this.eventCode=eventCode
|
|
this.eventCode=eventCode
|
|
//上传页面弹出
|
|
//上传页面弹出
|