|
@@ -138,7 +138,7 @@
|
|
|
<!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
|
|
|
<!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
|
|
|
<!-- <el-button size="small">点击上传</el-button> -->
|
|
|
- <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
+ <el-button slot="trigger" size="small" type="primary" @click="createdDis">选取文件</el-button>
|
|
|
<el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
@@ -236,7 +236,8 @@ export default {
|
|
|
accessory: '',
|
|
|
userInformation: localStorage.getItem('username'),
|
|
|
userNames: localStorage.getItem('realname'),
|
|
|
- fileDbList: []
|
|
|
+ fileDbList: [],
|
|
|
+ dis: false
|
|
|
// fileDbList: [{ name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }, { name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }]
|
|
|
}
|
|
|
},
|
|
@@ -245,8 +246,12 @@ export default {
|
|
|
this.forkDown()
|
|
|
},
|
|
|
methods: {
|
|
|
+ createdDis() {
|
|
|
+ this.dis = true
|
|
|
+ },
|
|
|
submitUpload() {
|
|
|
this.$refs.upload.submit()
|
|
|
+ this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
|
|
|
},
|
|
|
handleChange(response, file, fileList) {
|
|
|
// setTimeout(function() {
|
|
@@ -256,8 +261,8 @@ export default {
|
|
|
this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
|
|
|
}
|
|
|
this.accessory = JSON.stringify(this.fileDbList)
|
|
|
- console.log(this.accessory)
|
|
|
- // this.$set(this.form, 'accessory', JSON.stringify(this.fileDbList))
|
|
|
+ this.dis = false
|
|
|
+ this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
|
|
|
// }, 500)
|
|
|
},
|
|
|
async bugListSelect() {
|