fix(标准跟踪清单): 导入后关闭弹窗,文件未清空
This commit is contained in:
@@ -146,6 +146,8 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.fileList = fileList
|
this.fileList = fileList
|
||||||
|
} else {
|
||||||
|
this.fileList = []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onClose () {
|
onClose () {
|
||||||
|
|||||||
@@ -38,12 +38,14 @@
|
|||||||
<el-button size="small" type="primary" :loading="loading" @click="visible = false">关闭</el-button>
|
<el-button size="small" type="primary" :loading="loading" @click="visible = false">关闭</el-button>
|
||||||
</div>
|
</div>
|
||||||
<Import
|
<Import
|
||||||
|
ref="importRef"
|
||||||
accept=".xls, .XLS, .xlsx, .XLSX"
|
accept=".xls, .XLS, .xlsx, .XLSX"
|
||||||
:visible.sync="importModalShowFlag"
|
:visible.sync="importModalShowFlag"
|
||||||
:action="url.uploadNew"
|
:action="url.uploadNew"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
:ids.sync="form.templateId"
|
:ids.sync="form.templateId"
|
||||||
:names.sync="form.templateName"
|
:names.sync="form.templateName"
|
||||||
|
@onSuccess="onSuccess"
|
||||||
/>
|
/>
|
||||||
<!-- 导入失败-->
|
<!-- 导入失败-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@@ -115,7 +117,10 @@ export default {
|
|||||||
openModel () {
|
openModel () {
|
||||||
Object.keys(this.form).forEach(key => this.form[key] = '')
|
Object.keys(this.form).forEach(key => this.form[key] = '')
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.formRef.clearValidate()
|
this.$nextTick(() => {
|
||||||
|
this.$refs.formRef.clearValidate()
|
||||||
|
this.$refs.importRef.initFileList()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
this.visible = true
|
this.visible = true
|
||||||
},
|
},
|
||||||
@@ -143,6 +148,9 @@ export default {
|
|||||||
onPreview (id) {
|
onPreview (id) {
|
||||||
this.$preview(id)
|
this.$preview(id)
|
||||||
},
|
},
|
||||||
|
onSuccess () {
|
||||||
|
this.$refs.formRef.validateField('templateName')
|
||||||
|
},
|
||||||
downTemplate () {
|
downTemplate () {
|
||||||
window.open(`${this.url.exportTemplateFile}?fileName=标准跟踪清单导入模板`)
|
window.open(`${this.url.exportTemplateFile}?fileName=标准跟踪清单导入模板`)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user