bug 78470
This commit is contained in:
@@ -256,7 +256,9 @@ export const ConfigurableTableMixin = {
|
|||||||
this.loading = true
|
this.loading = true
|
||||||
// 把知道了这个按钮去掉
|
// 把知道了这个按钮去掉
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
if (document.getElementsByClassName('ant-modal-confirm-btns')[0]) {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display:none'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (info.file.status !== 'uploading') {
|
if (info.file.status !== 'uploading') {
|
||||||
console.log(info.file, info.fileList)
|
console.log(info.file, info.fileList)
|
||||||
@@ -286,6 +288,8 @@ export const ConfigurableTableMixin = {
|
|||||||
} else {
|
} else {
|
||||||
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
|
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
|
||||||
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
||||||
|
} else if (info.file.response.message.indexOf('</br>') !== -1) {
|
||||||
|
this.messageLineFeedByBr(this.$t('fileImportError'), info.file.response.message)
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(`${info.file.name} ${info.file.response.message}`)
|
this.$message.warning(`${info.file.name} ${info.file.response.message}`)
|
||||||
}
|
}
|
||||||
@@ -532,6 +536,31 @@ export const ConfigurableTableMixin = {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 对包含<br/>的后端错误信息进行处理
|
||||||
|
* @param title
|
||||||
|
* @param content
|
||||||
|
*/
|
||||||
|
messageLineFeedByBr (title, content) {
|
||||||
|
// 可以用分号和<br/>换行
|
||||||
|
content = content.replaceAll(`</br>`, ';')
|
||||||
|
const messageArr = content.split(';')
|
||||||
|
const htmlDom = []
|
||||||
|
messageArr.map(tt => {
|
||||||
|
if (tt) {
|
||||||
|
htmlDom.push((<div>{tt}</div>))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$warning({
|
||||||
|
title: title,
|
||||||
|
content: () => <div>
|
||||||
|
{htmlDom}
|
||||||
|
</div>
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -433,6 +433,8 @@ export const JeroListMixin = {
|
|||||||
} else {
|
} else {
|
||||||
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
|
if (Array.isArray(info.file.response.result) && info.file.response.result.length > 0) {
|
||||||
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
this.messageLineFeed(this.$t('fileImportError'), info.file.response.result)
|
||||||
|
} else if (info.file.response.message.indexOf('</br>') !== -1) {
|
||||||
|
this.messageLineFeedByBr(this.$t('fileImportError'), info.file.response.message)
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(`${info.file.name} ${info.file.response.message}`)
|
this.$message.warning(`${info.file.name} ${info.file.response.message}`)
|
||||||
}
|
}
|
||||||
@@ -531,6 +533,31 @@ export const JeroListMixin = {
|
|||||||
filterTreeOption (input, option) {
|
filterTreeOption (input, option) {
|
||||||
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
const text = option.componentOptions.propsData.title || option.componentOptions.propsData.label
|
||||||
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
return text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 对包含<br/>的后端错误信息进行处理
|
||||||
|
* @param title
|
||||||
|
* @param content
|
||||||
|
*/
|
||||||
|
messageLineFeedByBr (title, content) {
|
||||||
|
// 可以用分号和<br/>换行
|
||||||
|
content = content.replaceAll(`</br>`, ';')
|
||||||
|
const messageArr = content.split(';')
|
||||||
|
const htmlDom = []
|
||||||
|
messageArr.map(tt => {
|
||||||
|
if (tt) {
|
||||||
|
htmlDom.push((<div>{tt}</div>))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$warning({
|
||||||
|
title: title,
|
||||||
|
content: () => <div>
|
||||||
|
{htmlDom}
|
||||||
|
</div>
|
||||||
|
})
|
||||||
|
this.$nextTick(() => {
|
||||||
|
document.getElementsByClassName('ant-modal-confirm-btns')[0].style = 'display: inline-block'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user