fix 80746
This commit is contained in:
@@ -157,6 +157,7 @@ import StandardSelectionModal from '../../../components/selection/StandardSelect
|
||||
import { StandardSource, EvaluateProcessStatus } from '../../../enums/commonEnums'
|
||||
import VehicleProjectSelectionDrawer from '../../../components/selection/VehicleProjectSelectionDrawer'
|
||||
import { mapGetters } from 'vuex'
|
||||
import { postAction } from '../../../api/manage'
|
||||
|
||||
export default {
|
||||
name: 'VehicleItemLibraryDetail',
|
||||
@@ -373,6 +374,7 @@ export default {
|
||||
this.$message.success(res.message)
|
||||
this.loading = false
|
||||
this.loadData()
|
||||
this.loadProjectRiskOverview()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.loading = false
|
||||
@@ -393,6 +395,7 @@ export default {
|
||||
this.$message.success(res.message)
|
||||
this.loading = false
|
||||
this.loadData()
|
||||
this.loadProjectRiskOverview()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.loading = false
|
||||
@@ -466,7 +469,33 @@ export default {
|
||||
projectId: this.$route.query.id
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
if (!this.url.delete) {
|
||||
this.$message.warning('请设置url.delete属性!')
|
||||
return
|
||||
}
|
||||
const that = this
|
||||
this.$confirm({
|
||||
title: this.$t('confirmDeletion'),
|
||||
content: this.$t('areYouSure'),
|
||||
onOk: function () {
|
||||
postAction(that.url.delete, { id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
that.loadData()
|
||||
that.loadProjectRiskOverview()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user