|
@@ -1037,6 +1037,7 @@ export default {
|
|
|
handleImportTableActionEvent(file, options) {
|
|
handleImportTableActionEvent(file, options) {
|
|
|
if (this.importList.length > 0) {
|
|
if (this.importList.length > 0) {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
|
|
+ const regex = /^importData.*/
|
|
|
const formData = this.setValue(this.importValue)
|
|
const formData = this.setValue(this.importValue)
|
|
|
IbpsImport.xlsx(file, options).then(({ header, results }) => {
|
|
IbpsImport.xlsx(file, options).then(({ header, results }) => {
|
|
|
const list = []
|
|
const list = []
|
|
@@ -1047,7 +1048,7 @@ export default {
|
|
|
data[this.importValue[key]] = item[key]
|
|
data[this.importValue[key]] = item[key]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (this.actionCode === 'importData') {
|
|
|
|
|
|
|
+ if (this.actionCode === 'importData' || regex.test(this.actionCode)) {
|
|
|
list.push(data)
|
|
list.push(data)
|
|
|
} else {
|
|
} else {
|
|
|
this.dataModel.push(data)
|
|
this.dataModel.push(data)
|
|
@@ -1056,7 +1057,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
// 后置事件
|
|
// 后置事件
|
|
|
let importCallBack = null
|
|
let importCallBack = null
|
|
|
- if (this.actionCode === 'importData') {
|
|
|
|
|
|
|
+ if (this.actionCode === 'importData' || regex.test(this.actionCode)) {
|
|
|
this.afterScript(this.actionCode, this.actionPosition, {
|
|
this.afterScript(this.actionCode, this.actionPosition, {
|
|
|
button: this.actionButton,
|
|
button: this.actionButton,
|
|
|
importList: list,
|
|
importList: list,
|