Commit 292ad4cc by 张权

上传缺陷修复

1 parent 86c40647
...@@ -42,7 +42,7 @@ ...@@ -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"> <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"> <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> </span>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
...@@ -308,8 +308,7 @@ export default { ...@@ -308,8 +308,7 @@ export default {
{ {
label: '店面名称', label: '店面名称',
prop: 'merchantName', prop: 'merchantName',
width: '160px', width: '200px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.merchantName || '-' return cellValue.merchantName || '-'
} }
...@@ -568,7 +567,9 @@ export default { ...@@ -568,7 +567,9 @@ export default {
message: res.code == '0' ? '删除成功' : res.message, message: res.code == '0' ? '删除成功' : res.message,
type: res.code == '0' ? 'success' : 'error' 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() { getCountNoData() {
...@@ -759,7 +760,9 @@ export default { ...@@ -759,7 +760,9 @@ export default {
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' 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') { if (res.code == '0') {
this.uploadForm[targetItem.name].push(imgUrl) this.uploadForm[targetItem.name].push(imgUrl)
//this.$set(this.uploadForm, targetItem.name, imgUrl) //this.$set(this.uploadForm, targetItem.name, imgUrl)
......
...@@ -266,8 +266,7 @@ export default { ...@@ -266,8 +266,7 @@ export default {
{ {
label: '店面名称', label: '店面名称',
prop: 'merchantName', prop: 'merchantName',
width: '160px', width: '200px',
line: 1,
formatter: cellValue => { formatter: cellValue => {
return cellValue.merchantName || '-' return cellValue.merchantName || '-'
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!