This commit is contained in:
zlwu committed 2026-06-29 11:15:39 +08:00
1 parent 493f8d6756
commit d84f4b944c
406 files changed
+58954 -10376

No files matched your search

@@ -64,7 +64,13 @@
<el-button class="btn-op-item" @click="openEditDialog(row)">
<el-icon><EditPen /></el-icon>编辑
</el-button>
<el-button class="btn-op-item" :loading="loadingMap.rowDelete" @click="deleteNode(row)">
<el-button
class="btn-op-item"
:disabled="!canDeleteByCreator(row)"
:title="canDeleteByCreator(row) ? '' : CREATOR_DELETE_TIP"
:loading="loadingMap.rowDelete"
@click="deleteNode(row)"
>
<el-icon><Delete /></el-icon>删除
</el-button>
<el-button class="btn-op-item" @click="moveUp(row)">
@@ -180,6 +186,7 @@
<script setup lang="ts">
import { reactive, ref, computed, onMounted } from 'vue'
import { canDeleteByCreator, filterDeletableByCreator, allRowsDeletableByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance } from 'element-plus'
import {
@@ -365,6 +372,10 @@ async function submitEditNode() {
}
async function deleteNode(node: Record<string, any>) {
if (!canDeleteByCreator(node)) {
ElMessage.warning(CREATOR_DELETE_TIP)
return
}
await ElMessageBox.confirm(`确定要删除节点「${node.nodeName}」吗?`, '删除确认', {
confirmButtonText: '确定删除',
cancelButtonText: '取消',
@@ -64,7 +64,13 @@
<el-button class="btn-op-item" @click="openEditDialog(row)">
<el-icon><EditPen /></el-icon>编辑
</el-button>
<el-button class="btn-op-item" :loading="loadingMap.rowDelete" @click="deleteNode(row)">
<el-button
class="btn-op-item"
:disabled="!canDeleteByCreator(row)"
:title="canDeleteByCreator(row) ? '' : CREATOR_DELETE_TIP"
:loading="loadingMap.rowDelete"
@click="deleteNode(row)"
>
<el-icon><Delete /></el-icon>删除
</el-button>
<el-button class="btn-op-item" @click="moveUp(row)">
@@ -180,6 +186,7 @@
<script setup lang="ts">
import { reactive, ref, computed, onMounted } from 'vue'
import { canDeleteByCreator, filterDeletableByCreator, allRowsDeletableByCreator, CREATOR_DELETE_TIP } from '@/utils/creator-delete'
import { ElMessage, ElMessageBox } from 'element-plus'
import type { FormInstance } from 'element-plus'
import {
@@ -365,6 +372,10 @@ async function submitEditNode() {
}
async function deleteNode(node: Record<string, any>) {
if (!canDeleteByCreator(node)) {
ElMessage.warning(CREATOR_DELETE_TIP)
return
}
await ElMessageBox.confirm(`确定要删除节点「${node.nodeName}」吗?`, '删除确认', {
confirmButtonText: '确定删除',
cancelButtonText: '取消',