现象是这样:
代码如下:
<el-dialog
title="提交资料"
:visible.sync="dialogImmediateOrder"
size="tiny"
:show-close="false">
<el-form :model="submitForm" ref="submitForm" label-width="80px" v-for="(i, index) in submitForm.detail" :key="index">
<span class="title" >重要调查资料</span><span class="delete" @click.prevent="deleteData(index)" style="color: #8F8E94">删除</span>
<el-form-item label="调查路径" class="m-y-t-2">
<el-select v-model="i.pathWay" placeholder="请选择调查路径" style="width: 100%" size="small">
<el-option
v-for="p in pathList"
:label="p.codeName"
:value="p.codeValue"
:key="p.codeValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="调查描述">
<el-input type="textarea" v-model="i.description" :rows="4" size="small" placeholder="请输入调查描述"></el-input>
</el-form-item>
<el-form-item label="调查描述">
<el-upload
class="upload-demo"
action="ias-web/file/fileUpload"
:file-list="i.uploadFileList"
:on-remove="removeFile"
:on-success="successUpload">
<el-button size="" type="text" class="upLink" @click="recordIndex(index)"><i class="el-icon-plus"></i>上传资料</el-button>
</el-upload >
</el-form-item>
</el-form>
<a @click="addData()" class="add"><i class="el-icon-plus"></i>继续添加资料</a>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogImmediateOrder = false">取 消</el-button>
<el-button type="primary" @click="submitImmediateOrder(submitForm)">确 定</el-button>
</span>
</el-dialog>
submitForm: {
receivTaskId: '',
index: 1,
detail: [{
description: '',
uploadFileList: [],
pathWay: '',
index: 1
}]
},
本来这个upload是没问题的,但是我放在循环里就出问题了,这是为什么?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…