|
@@ -58,7 +58,7 @@ import { getArchiveTreeLazyTree, initTree } from '~api/other'
|
|
import { getArrValue, getObjValue, isArrItem, isNullES } from 'js-fast-way'
|
|
import { getArrValue, getObjValue, isArrItem, isNullES } from 'js-fast-way'
|
|
import EditNodeDialog from '~src/components/dialog/EditNodeDialog.vue'
|
|
import EditNodeDialog from '~src/components/dialog/EditNodeDialog.vue'
|
|
import SortNodeDialog from '~src/components/dialog/SortNodeDialog.vue'
|
|
import SortNodeDialog from '~src/components/dialog/SortNodeDialog.vue'
|
|
-import { delMessage } from '~uti/tools'
|
|
|
|
|
|
+import { delMessageV2 } from '~com/message/index.js'
|
|
|
|
|
|
//参数
|
|
//参数
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -399,14 +399,21 @@ const sortDialogHide = ()=>{
|
|
|
|
|
|
//删除节点
|
|
//删除节点
|
|
const delNodeMoadl = (node)=>{
|
|
const delNodeMoadl = (node)=>{
|
|
- delMessage(async () => {
|
|
|
|
- const { code } = await remove({
|
|
|
|
- id:node.data.id,
|
|
|
|
- })
|
|
|
|
- if (code == 200) {
|
|
|
|
- window.$message?.success('删除成功')
|
|
|
|
- ElTreeRef.value.remove(node)
|
|
|
|
- }
|
|
|
|
|
|
+ delMessageV2(async (action, instance, done) => {
|
|
|
|
+ if (action === 'confirm') {
|
|
|
|
+ instance.confirmButtonLoading = true
|
|
|
|
+ const { code } = await remove({
|
|
|
|
+ id:node.data.id,
|
|
|
|
+ })
|
|
|
|
+ if (code === 200) {
|
|
|
|
+ window.$message?.success('删除成功')
|
|
|
|
+ ElTreeRef.value.remove(node)
|
|
|
|
+ }
|
|
|
|
+ instance.confirmButtonLoading = false
|
|
|
|
+ done()
|
|
|
|
+ } else {
|
|
|
|
+ done()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|