CN:936 fix:报告、知识库、管理模块点击删除或编辑时,点击右上角X及cancel,报错

This commit is contained in:
hyx
2023-03-27 11:11:00 +08:00
parent 5433006ebd
commit 43102c94c4
5 changed files with 13 additions and 13 deletions

View File

@@ -660,7 +660,7 @@ export default {
this.$message.error(response.msg) this.$message.error(response.msg)
} }
}) })
}) }).catch(() => {})
}, },
pageJump (val) { pageJump (val) {
this.pageObj.pageNo = val this.pageObj.pageNo = val

View File

@@ -126,7 +126,7 @@ export default {
this.$message.error(response.msg) this.$message.error(response.msg)
} }
}) })
}) }).catch(e => {})
}, },
delBatch () { delBatch () {
const ids = [] const ids = []
@@ -139,7 +139,7 @@ export default {
this.$alert(this.$t('tip.pleaseSelect'), { this.$alert(this.$t('tip.pleaseSelect'), {
confirmButtonText: this.$t('tip.yes'), confirmButtonText: this.$t('tip.yes'),
type: 'warning' type: 'warning'
}) }).catch(() => {})
} else { } else {
this.$confirm(this.$t('tip.confirmDelete'), { this.$confirm(this.$t('tip.confirmDelete'), {
confirmButtonText: this.$t('tip.yes'), confirmButtonText: this.$t('tip.yes'),
@@ -158,7 +158,7 @@ export default {
}).finally(() => { }).finally(() => {
this.tools.loading = false this.tools.loading = false
}) })
}) }).catch(() => {})
} }
}, },
newObject () { newObject () {
@@ -204,7 +204,7 @@ export default {
this.$alert(this.$t('tip.pleaseSelectForEdit'), { this.$alert(this.$t('tip.pleaseSelectForEdit'), {
confirmButtonText: this.$t('tip.yes'), confirmButtonText: this.$t('tip.yes'),
type: 'warning' type: 'warning'
}) }).catch(() => {})
} else { } else {
get(`${this.url}/${this.batchDeleteObjs[0].id}`).then(response => { get(`${this.url}/${this.batchDeleteObjs[0].id}`).then(response => {
if (response.code === 200) { if (response.code === 200) {

View File

@@ -91,12 +91,12 @@ export default {
}, },
methods: { methods: {
edit () { edit () {
if(this.batchDeleteObjs.length === 0){ if (this.batchDeleteObjs.length === 0) {
this.$alert(this.$t('tip.pleaseSelectForEdit'),{ this.$alert(this.$t('tip.pleaseSelectForEdit'), {
confirmButtonText: this.$t('tip.yes'), confirmButtonText: this.$t('tip.yes'),
type:'warning' type: 'warning'
}) }).catch(() => {})
}else { } else {
get(`${this.url}`, { ids: this.batchDeleteObjs[0].id }).then(response => { get(`${this.url}`, { ids: this.batchDeleteObjs[0].id }).then(response => {
if (response.code === 200) { if (response.code === 200) {
this.object = response.data.list[0] this.object = response.data.list[0]

View File

@@ -299,7 +299,7 @@ export default {
this.$alert(this.$t('tip.pleaseSelectForEdit'), { this.$alert(this.$t('tip.pleaseSelectForEdit'), {
confirmButtonText: this.$t('tip.yes'), confirmButtonText: this.$t('tip.yes'),
type: 'warning' type: 'warning'
}) }).catch(() => {})
} else { } else {
const curRecord = this.batchDeleteObjs[0] const curRecord = this.batchDeleteObjs[0]
this.initConfig(curRecord) this.initConfig(curRecord)

View File

@@ -92,7 +92,7 @@ export default {
this.$alert(this.$t('tip.pleaseSelectForEdit'), { this.$alert(this.$t('tip.pleaseSelectForEdit'), {
confirmButtonText: this.$t('tip.yes'), confirmButtonText: this.$t('tip.yes'),
type: 'warning' type: 'warning'
}) }).catch(() => {})
} else { } else {
this.jumpToEditPage(this.batchDeleteObjs[0].id) this.jumpToEditPage(this.batchDeleteObjs[0].id)
} }
@@ -122,7 +122,7 @@ export default {
}).finally(() => { }).finally(() => {
this.tools.loading = false this.tools.loading = false
}) })
}) }).catch(() => {})
}, },
jumpToEditPage (id) { jumpToEditPage (id) {
this.$router.push({ this.$router.push({