字典树ok
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<template v-if="node.level === 1">
|
||||
<div class="ml5">({{ data.children.length }})</div>
|
||||
<div style="flex: 1"></div>
|
||||
<el-popconfirm title="确定删除该分组吗?" @confirm="deleteStatisticalGroup(data)">
|
||||
<el-popconfirm title="确定删除该分组吗?" @confirm="dicDeleteGroup(data)">
|
||||
<template #reference>
|
||||
<Icon name="el-icon-Delete" class="ml10" style="cursor: pointer"></Icon>
|
||||
</template>
|
||||
@@ -88,7 +88,7 @@ import { ref, inject } from 'vue'
|
||||
import { CascaderValue, ElMessage } from 'element-plus'
|
||||
import { addStatistical, queryStatistical } from '@/api/system-boot/csstatisticalset'
|
||||
import PopupAdd from './add.vue'
|
||||
import { deleteStatistical } from '@/api/system-boot/dic'
|
||||
import { dicDelete } from '@/api/system-boot/dic'
|
||||
defineOptions({
|
||||
name: 'govern/setting/statisticalType/binding'
|
||||
})
|
||||
@@ -225,11 +225,11 @@ const rightCheckChange = () => {
|
||||
})
|
||||
}
|
||||
|
||||
const deleteStatisticalGroup = (data: any) => {
|
||||
const dicDeleteGroup = (data: any) => {
|
||||
if (data.children.length) {
|
||||
return ElMessage.warning('该分组下有指标,不能删除')
|
||||
}
|
||||
deleteStatistical(data.value).then(res => {
|
||||
dicDelete(data.value).then(res => {
|
||||
ElMessage.success('删除成功')
|
||||
toData.value = toData.value.filter(item => item.value !== data.value)
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ import TableHeader from '@/components/table/header/index.vue'
|
||||
import PopupBinding from './binding.vue'
|
||||
import PopupAdd from './add.vue'
|
||||
import { queryByCode, queryCsDictTree } from '@/api/system-boot/dictTree'
|
||||
import { deleteStatistical } from '@/api/system-boot/dic'
|
||||
import { dicDelete } from '@/api/system-boot/dic'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/setting/statisticalType'
|
||||
@@ -73,7 +73,7 @@ const tableStore = new TableStore({
|
||||
title: '确定删除该菜单吗?'
|
||||
},
|
||||
click: row => {
|
||||
deleteStatistical(row.id).then(() => {
|
||||
dicDelete(row.id).then(() => {
|
||||
init()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user