|
@@ -126,18 +126,21 @@
|
|
|
<el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" style="margin: 20px 0;" />
|
|
|
<div>
|
|
|
<el-upload
|
|
|
+ ref="upload"
|
|
|
class="upload-demo"
|
|
|
multiple
|
|
|
accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
|
|
|
:file-list="fileList"
|
|
|
action="http://star.xiaojukeji.com/upload/img.node"
|
|
|
- :on-success="handleChange"
|
|
|
- :on-change="handleChange1"
|
|
|
+ :on-success="test"
|
|
|
+ :auto-upload="false"
|
|
|
>
|
|
|
<!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
|
|
|
<!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
|
|
|
<!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
|
|
|
- <el-button size="small">点击上传</el-button>
|
|
|
+ <!-- <el-button size="small">点击上传</el-button> -->
|
|
|
+ <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
|
|
+ <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
<el-form-item class="submit">
|
|
@@ -241,6 +244,12 @@ export default {
|
|
|
this.forkDown()
|
|
|
},
|
|
|
methods: {
|
|
|
+ submitUpload() {
|
|
|
+ this.$refs.upload.submit()
|
|
|
+ },
|
|
|
+ test() {
|
|
|
+ console.log('测试')
|
|
|
+ },
|
|
|
handleChange(response, file, fileList) {
|
|
|
// setTimeout(function() {
|
|
|
console.log(response)
|
|
@@ -254,18 +263,6 @@ export default {
|
|
|
console.log(this.fileDbList)
|
|
|
// }, 500)
|
|
|
},
|
|
|
- handleChange1(file, fileList) {
|
|
|
- setTimeout(function() {
|
|
|
- console.log(fileList)
|
|
|
- console.log(fileList[0].response.url)
|
|
|
- this.fileDbList = []
|
|
|
- this.fileList = fileList.slice(-3)
|
|
|
- for (var a of this.fileList) {
|
|
|
- this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
|
|
|
- }
|
|
|
- console.log(this.fileDbList)
|
|
|
- }, 500)
|
|
|
- },
|
|
|
async bugListSelect() {
|
|
|
await bugGetEnum().then(res => {
|
|
|
this.bugStatusStr = res.data.bugEnumList
|