| | |
| | | </div> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button v-if="selectOne.attachment && selectOne.attachment != ''" type="primary" @click="download">下 载</el-button> |
| | | <el-button v-if="selectOne.attachment && selectOne.attachment != ''" type="primary" @click="download(selectOne)">下 载</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | :limit="3" |
| | | :auto-upload='false' |
| | | ref="upload" |
| | | :on-change="onChange" |
| | | :on-exceed="handleExceed" |
| | | :file-list="fileList"> |
| | | :on-success="uploadSuccess" |
| | | > |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip">不超过50M</div> |
| | | </el-upload> |
| | |
| | | <el-button type="primary" @click="createTopic">确 定</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <div style="width: 0px; height: 0px;"> |
| | | <iframe ref="frame_export" style="width: 0px; height: 0px;"></iframe> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | this.getData(); |
| | | }, |
| | | methods: { |
| | | download(val) { |
| | | if(val) { |
| | | this.$refs.frame_export.src = "/api/api/file/download/" + val.id; |
| | | }else { |
| | | this.$message({message:'获取地址失败', type: 'warning'}); |
| | | } |
| | | |
| | | }, |
| | | uploadSuccess() { |
| | | this.dialogFormVisible = false; |
| | | }, |
| | | onChange(file, fileList) { |
| | | this.fileList = []; |
| | | this.fileList = fileList; |
| | | }, |
| | | createTopic() { |
| | | let me = this; |
| | | var userId = localStorage.getItem('userId'); |