mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 16:22:57 +08:00
perf: 新增异常兜底处理
This commit is contained in:
parent
9ea4858770
commit
9aca371e9c
@ -594,6 +594,8 @@ export const useChartEditStore = defineStore({
|
||||
},
|
||||
// * 创建分组
|
||||
setGroup() {
|
||||
try {
|
||||
loadingStart()
|
||||
const groupClass = new PublicGroupConfigClass()
|
||||
this.getTargetChart.selectId.forEach((id: string) => {
|
||||
// 获取目标数据并从 list 中移除 (成组后不可再次成组, 断言处理)
|
||||
@ -601,11 +603,17 @@ export const useChartEditStore = defineStore({
|
||||
groupClass.groupList.push(item)
|
||||
})
|
||||
this.addComponentList(groupClass)
|
||||
loadingFinish()
|
||||
} catch (error) {
|
||||
window['$message'].error('创建分组失败,请联系管理员!')
|
||||
loadingFinish()
|
||||
}
|
||||
},
|
||||
// * 解除分组
|
||||
setUnGroup() {
|
||||
try {
|
||||
loadingStart()
|
||||
const selectGroupIdArr = this.getTargetChart.selectId
|
||||
|
||||
// 解组
|
||||
const unGroup = (targetIndex: number) => {
|
||||
const targetGroup = this.getComponentList[targetIndex] as CreateComponentGroupType
|
||||
@ -624,6 +632,11 @@ export const useChartEditStore = defineStore({
|
||||
} else {
|
||||
window['$message'].error('解除分组失败,请联系管理员!')
|
||||
}
|
||||
loadingFinish()
|
||||
} catch (error) {
|
||||
window['$message'].error('解除分组失败,请联系管理员!')
|
||||
loadingFinish()
|
||||
}
|
||||
},
|
||||
// ----------------
|
||||
// * 设置页面大小
|
||||
|
Loading…
Reference in New Issue
Block a user