Merge branch 'main' of ssh://18.167.251.121:10002/aidlab/FiDA_Front

This commit is contained in:
2026-03-24 15:45:31 +08:00
5 changed files with 11 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ export class StateManager {
this.nodes.value.forEach((node, index) => { this.nodes.value.forEach((node, index) => {
const superiorID = node.data.superiorID; const superiorID = node.data.superiorID;
const isSuperior = this.nodes.value.some((v) => v.id === superiorID) const isSuperior = this.nodes.value.some((v) => v.id === superiorID)
if (superiorID && isSuperior) { if (isSuperior) {
const source = node.data.superiorID const source = node.data.superiorID
const target = node.id const target = node.id
arr.push({ arr.push({
@@ -101,7 +101,7 @@ export class StateManager {
source: source, source: source,
target: target, target: target,
selectable: false, selectable: false,
visible: (node.data.isActive), visible: (node.data.type == NODE_DATATYPE.RESULT_IMAGE && node.data.isActive) || node.data.type !== NODE_DATATYPE.RESULT_IMAGE,
type: 'default' type: 'default'
}) })
} }
@@ -148,6 +148,7 @@ export class StateManager {
if (node.data.disableDelete) return ElMessage.error(t('flowCanvas.initialNodeProhibited')) if (node.data.disableDelete) return ElMessage.error(t('flowCanvas.initialNodeProhibited'))
const result = [node] const result = [node]
const findChildren = (parentId: string) => { const findChildren = (parentId: string) => {
const children = this.nodes.value.filter(item => item.data.superiorID === parentId) const children = this.nodes.value.filter(item => item.data.superiorID === parentId)
children.forEach(child => { children.forEach(child => {
@@ -157,11 +158,12 @@ export class StateManager {
findChildren(child.id) findChildren(child.id)
}) })
} }
findChildren(id)
let deletePromise: any = true let deletePromise: any = true
if (isElMessageBox && result.length > 1) { if (isElMessageBox) {
deletePromise = await new Promise<void>((resolve, reject) => { deletePromise = await new Promise<void>((resolve, reject) => {
ElMessageBox.confirm( ElMessageBox.confirm(
t('flowCanvas.deleteSubordinateCard'), result.length > 1 ? t('flowCanvas.deleteSubordinateCard') : t('flowCanvas.deleteCardConfirm'),
'', '',
{ {
confirmButtonText: t('flowCanvas.confirm'), confirmButtonText: t('flowCanvas.confirm'),

View File

@@ -86,8 +86,8 @@
} }
} }
.fullscreen-dialog { .fullscreen-dialog {
--size: 0.25rem; --size: 0.125rem;
--width: 4rem; --width: 2rem;
--color: #bfbfbf; --color: #bfbfbf;
background-color: #fffcf4; background-color: #fffcf4;
background-image: repeating-radial-gradient( background-image: repeating-radial-gradient(

View File

@@ -178,6 +178,7 @@ export default {
export: 'Export', export: 'Export',
}, },
flowCanvas: { flowCanvas: {
deleteCardConfirm: 'Are you sure you want to delete this function card?',
confirm: 'Confirm', confirm: 'Confirm',
cancel: 'Cancel', cancel: 'Cancel',
confirmLeave: 'Are you sure you want to leave? You may have unsaved changes.', confirmLeave: 'Are you sure you want to leave? You may have unsaved changes.',

View File

@@ -179,6 +179,7 @@ export default {
edit: '编辑' edit: '编辑'
}, },
flowCanvas: { flowCanvas: {
deleteCardConfirm: '确定要删除该功能卡片吗?',
confirm: '确认', confirm: '确认',
cancel: '取消', cancel: '取消',
confirmLeave: '您可能有未保存的更改,确定要离开吗?', confirmLeave: '您可能有未保存的更改,确定要离开吗?',

View File

@@ -237,7 +237,7 @@ defineExpose({push})
margin-bottom: 0; margin-bottom: 0;
} }
> .icon{ > .icon{
margin-right: .4rem; margin-right: .8rem;
color: rgba(0, 0, 0, 0.5); color: rgba(0, 0, 0, 0.5);
} }
> span{ > span{