Commit 292ad4cc by 张权

上传缺陷修复

1 parent 86c40647
......@@ -42,7 +42,7 @@
<glsx-combi-form labelWidth="300px" :isBlock="isBlock" @handleImgDelete="handleDelImg(arguments)" ref="uploadFormRef" formRef="uploadChildRef" :formRules="uploadRule" :formObj.sync="uploadForm" :formData="uploadFormData">
<span class="upload-slot" slot="uploadSlot" slot-scope="item">
上传
<input class="upload-input" type="file" :id="item.name + 'file'" ref="file" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
<input class="upload-input" type="file" :id="item.scope.name + 'file'" :ref="item.scope.name+'file'" accept="image/png, image/jpeg, image/gif, image/jpg" @change="e => handleUploadChange(e, item)" />
</span>
</glsx-combi-form>
</div>
......@@ -308,8 +308,7 @@ export default {
{
label: '店面名称',
prop: 'merchantName',
width: '160px',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
......@@ -568,7 +567,9 @@ export default {
message: res.code == '0' ? '删除成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$refs.file.value = null;
if(event[0].name && this.$refs[event[0].name+'file']){
this.$refs[event[0].name+'file'].value = null;
}
})
},
getCountNoData() {
......@@ -759,7 +760,9 @@ export default {
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
this.$refs.file.value = null;
if(this.$refs[targetItem.name+'file']){
this.$refs[targetItem.name+'file'].value = null;
}
if (res.code == '0') {
this.uploadForm[targetItem.name].push(imgUrl)
//this.$set(this.uploadForm, targetItem.name, imgUrl)
......
......@@ -266,8 +266,7 @@ export default {
{
label: '店面名称',
prop: 'merchantName',
width: '160px',
line: 1,
width: '200px',
formatter: cellValue => {
return cellValue.merchantName || '-'
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!