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