fix: workflow multi-selection

v3.2
wangdan-fit2cloud 2025-10-27 17:47:49 +08:00
parent e17bb8f5dd
commit 8ecb6a855c
10 changed files with 332 additions and 272 deletions

View File

@ -740,4 +740,25 @@ export default {
])
},
},
'app-raisehand': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 1024 1024',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M919.466667 347.733333c0-64-53.333333-117.333333-117.333334-117.333333-12.8 0-23.466667 2.133333-34.133333 4.266667-12.8-51.2-57.6-89.6-115.2-89.6-10.666667 0-21.333333 2.133333-32 4.266666v-14.933333C620.8 70.4 567.466667 17.066667 503.466667 17.066667S386.133333 70.4 386.133333 134.4v14.933333c-10.666667-2.133333-21.333333-4.266667-32-4.266666-64 0-117.333333 53.333333-117.333333 117.333333v174.933333l-4.266667-2.133333c-53.333333-34.133333-110.933333-21.333333-151.466666 4.266667-40.533333 25.6-51.2 83.2-21.333334 121.6l232.533334 300.8c61.866667 87.466667 166.4 142.933333 283.733333 142.933333 91.733333 0 177.066667-25.6 241.066667-83.2s102.4-140.8 102.4-247.466667V347.733333zM836.266667 422.4V674.133333c0 85.333333-32 145.066667-76.8 183.466667-44.8 40.533333-108.8 61.866667-185.6 61.866667-89.6 0-168.533333-42.666667-215.466667-108.8v-2.133334l-230.4-298.666666c23.466667-14.933333 42.666667-14.933333 59.733333-4.266667 2.133333 0 2.133333 2.133333 4.266667 2.133333L260.266667 554.666667c12.8 6.4 29.866667 6.4 42.666666 0 12.8-8.533333 21.333333-21.333333 21.333334-36.266667V264.533333c0-17.066667 14.933333-32 32-32s32 14.933333 32 32v234.666667c0 23.466667 19.2 42.666667 42.666666 42.666667s42.666667-19.2 42.666667-42.666667V134.4c0-17.066667 14.933333-32 32-32s32 14.933333 32 32v362.666667c0 23.466667 19.2 42.666667 42.666667 42.666666s42.666667-19.2 42.666666-42.666666v-234.666667c0-17.066667 14.933333-32 32-32s32 14.933333 32 32v236.8c0 23.466667 19.2 42.666667 42.666667 42.666667s42.666667-19.2 42.666667-42.666667V349.866667c0-17.066667 14.933333-32 32-32s32 14.933333 32 32v72.533333z',
fill: 'currentColor',
}),
],
),
])
},
},
}

View File

@ -70,7 +70,7 @@
</el-dialog>
</template>
<script setup lang="ts">
import {ref, watch, reactive, computed, onMounted} from 'vue'
import { ref, watch, reactive, computed, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import SelectKnowledgeDocument from '@/components/select-knowledge-document/index.vue'
import type { FormInstance, FormRules } from 'element-plus'
@ -93,16 +93,27 @@ const apiType = computed(() => {
}
})
const postKnowledgeHandler = (knowledgeList: Array<any>) => {
return knowledgeList.filter(item => {
const postKnowledgeHandler = (knowledgeList: Array<any>) => {
return knowledgeList.filter((item) => {
if (apiType.value === 'workspace') {
return hasPermission([RoleConst.WORKSPACE_MANAGE.getWorkspaceRole(),
new Permission("KNOWLEDGE_DOCUMENT:READ+EDIT").getWorkspacePermissionWorkspaceManageRole,
new Permission("KNOWLEDGE_DOCUMENT:READ+EDIT").getWorkspaceResourcePermission('KNOWLEDGE', item.id)], 'OR')
return hasPermission(
[
RoleConst.WORKSPACE_MANAGE.getWorkspaceRole(),
new Permission('KNOWLEDGE_DOCUMENT:READ+EDIT').getWorkspacePermissionWorkspaceManageRole,
new Permission('KNOWLEDGE_DOCUMENT:READ+EDIT').getWorkspaceResourcePermission(
'KNOWLEDGE',
item.id,
),
],
'OR',
)
} else if (apiType.value === 'systemManage') {
return hasPermission([RoleConst.ADMIN, PermissionConst.RESOURCE_KNOWLEDGE_DOCUMENT_EDIT],'OR')
return hasPermission(
[RoleConst.ADMIN, PermissionConst.RESOURCE_KNOWLEDGE_DOCUMENT_EDIT],
'OR',
)
}
})
})
}
const emit = defineEmits(['refresh'])
@ -202,6 +213,7 @@ function changeDocument(document_id: string) {
}
const open = (data: any) => {
getDetail()
form.value.chat_id = data.chat_id
form.value.record_id = data.id
form.value.problem_text = data.problem_text ? data.problem_text.substring(0, 256) : ''
@ -246,10 +258,6 @@ function getDetail(isLoading = false) {
})
}
onMounted(()=>{
getDetail()
})
defineExpose({ open })
</script>
<style lang="scss" scoped></style>

View File

@ -218,12 +218,19 @@ function openCreateTagDialog(row?: any) {
}
function batchDelete() {
const tagsToDelete = multipleSelection.value.map((item) => item.id)
loadSharedApi({ type: 'knowledge', systemType: apiType.value })
.delMulTag(id, tagsToDelete)
MsgConfirm(t('views.document.tag.deleteConfirm'), t('views.document.tag.deleteTip'), {
confirmButtonText: t('common.delete'),
confirmButtonClass: 'danger',
})
.then(() => {
getList()
const tagsToDelete = multipleSelection.value.map((item) => item.id)
loadSharedApi({ type: 'knowledge', systemType: apiType.value })
.delMulTag(id, tagsToDelete)
.then(() => {
getList()
})
})
.catch(() => {})
}
const editTagDialogRef = ref()

View File

@ -132,44 +132,26 @@ const handleSelectionChange = (val: any[]) => {
}
function batchDelete() {
MsgConfirm(t('views.document.tag.deleteConfirm'), t('views.document.tag.deleteTip'), {
confirmButtonText: t('common.delete'),
confirmButtonClass: 'danger',
})
.then(() => {
const tagsToDelete = multipleSelection.value.reduce((acc, item) => {
// keyvalue id
const sameKeyItems = tableData.value.filter((data) => data.key === item.key)
const sameKeyIds = sameKeyItems.map((data) => data.id)
return [...acc, ...sameKeyIds]
}, [] as string[])
const tagsToDelete = multipleSelection.value.reduce((acc, item) => {
// keyvalue id
const sameKeyItems = tableData.value.filter((data) => data.key === item.key)
const sameKeyIds = sameKeyItems.map((data) => data.id)
return [...acc, ...sameKeyIds]
}, [] as string[])
loadSharedApi({ type: 'document', systemType: apiType.value })
.delMulDocumentTag(id, document_id.value, tagsToDelete, loading)
.then(() => {
getList()
})
loadSharedApi({ type: 'document', systemType: apiType.value })
.delMulDocumentTag(id, document_id.value, tagsToDelete, loading)
.then(() => {
getList()
})
.catch(() => {})
}
function delTagValue(row: any) {
MsgConfirm(
t('views.document.tag.deleteConfirm') + row.key + '-' + row.value,
t('views.document.tag.deleteTip'),
{
confirmButtonText: t('common.delete'),
confirmButtonClass: 'danger',
},
)
loadSharedApi({ type: 'document', systemType: apiType.value })
.delMulDocumentTag(id, document_id.value, [row.id], loading)
.then(() => {
loadSharedApi({ type: 'document', systemType: apiType.value })
.delMulDocumentTag(id, document_id.value, [row.id], loading)
.then(() => {
getList()
})
getList()
})
.catch(() => {})
}
function getList() {

View File

@ -140,7 +140,6 @@
ref="SelectDocumentDialogRef"
@refresh="refreshMigrateParagraph"
:apiType="apiType"
:workspace-id="knowledgeDetail.workspace_id"
/>
<GenerateRelatedDialog ref="GenerateRelatedDialogRef" @refresh="refresh" :apiType="apiType" />
</el-card>
@ -195,7 +194,6 @@ const emit = defineEmits([
])
const loading = ref(false)
const changeStateloading = ref(false)
const knowledgeDetail = ref<any>({})
const show = ref(false)
// carddropdown
const subHovered = ref(false)
@ -222,13 +220,6 @@ async function changeState(row: any) {
return false
})
}
function getDetail() {
loadSharedApi({ type: 'knowledge', systemType: apiType.value, isShared: shareDisabled.value })
.getKnowledgeDetail(id, loading)
.then((res: any) => {
knowledgeDetail.value = res.data
})
}
const GenerateRelatedDialogRef = ref<InstanceType<typeof GenerateRelatedDialog>>()
function openGenerateDialog(row: any) {
@ -304,10 +295,6 @@ const dialogVisible = computed(
GenerateRelatedDialogRef.value?.dialogVisible,
)
onMounted(() => {
getDetail()
})
watch(dialogVisible, (val: boolean) => {
emit('dialogVisibleChange', val)
})

View File

@ -26,7 +26,7 @@
</el-dialog>
</template>
<script setup lang="ts">
import {ref, watch, reactive, computed, onMounted} from 'vue'
import { ref, watch, reactive, computed, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import SelectKnowledgeDocument from '@/components/select-knowledge-document/index.vue'
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
@ -60,6 +60,7 @@ watch(dialogVisible, (bool) => {
})
const open = (list: any) => {
getDetail()
paragraphList.value = list
dialogVisible.value = true
}
@ -92,11 +93,6 @@ function getDetail() {
})
}
onMounted(() => {
getDetail()
})
function changeKnowledge(dataset_id: string) {
localStorage.setItem(id + 'chat_dataset_id', dataset_id)
}

View File

@ -269,8 +269,8 @@ const mousedown = (event?: any) => {
if (!event?.shiftKey) {
props.nodeModel.graphModel.clearSelectElements()
}
set(props.nodeModel, 'isSelected', true)
set(props.nodeModel, 'isHovered', true)
set(props.nodeModel, 'isSelected', !props.nodeModel.isSelected)
set(props.nodeModel, 'isHovered', !props.nodeModel.isSelected)
props.nodeModel.graphModel.toFront(props.nodeModel.id)
}
const showicon = ref<number | null>(null)

View File

@ -1,5 +1,20 @@
<template>
<el-card shadow="always" style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px">
<el-button
@click="changeCursor(true)"
style="border: none; padding: 4px; height: 24px"
:class="{ 'is-drag-active': isDrag }"
>
<el-icon :size="16"><Position /></el-icon>
</el-button>
<el-button
@click="changeCursor(false)"
style="border: none; padding: 4px; height: 24px;margin-left: 8px;"
:class="{ 'is-drag-active': !isDrag }"
>
<AppIcon iconName="app-raisehand" :size="16"></AppIcon>
</el-button>
<el-divider direction="vertical" />
<el-button link @click="zoomOut" style="border: none">
<el-tooltip
effect="dark"
@ -78,10 +93,13 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
const props = defineProps({
lf: Object || String || null,
})
const isDrag = ref(false)
function zoomIn() {
props.lf?.zoom(true, [0, 0])
}
@ -106,5 +124,22 @@ const extend = () => {
element.properties.showNode = true
})
}
const changeCursor = (bool: boolean) => {
const element: HTMLElement = document.querySelector('.lf-drag-able') as HTMLElement
isDrag.value = bool
if (bool) {
element.style.cursor = 'default'
props.lf?.openSelectionSelect()
props.lf?.extension.selectionSelect.setSelectionSense(true, false)
} else {
element.style.cursor = 'pointer'
props.lf?.closeSelectionSelect()
}
}
</script>
<style scoped></style>
<style scoped lang="scss">
.is-drag-active {
background-color: var(--el-color-primary-light-9);
color: var(--el-color-primary);
}
</style>

View File

@ -109,6 +109,7 @@ const renderGraphData = (data?: any) => {
data.nodeModel.clear_next_node_field(false)
})
// lf.value.openSelectionSelect()
// lf.value.extension.selectionSelect.setSelectionSense(true, false)
setTimeout(() => {
lf.value?.fitView()
}, 500)

View File

@ -8,209 +8,232 @@
:before-close="close"
append-to-body
width="800"
align-center
class="scrollbar-dialog"
>
<el-form
label-position="top"
ref="fieldFormRef"
:model="form_data"
require-asterisk-position="right"
>
<el-form-item
:label="$t('views.applicationWorkflow.nodes.baseNode.FileUploadSetting.maxFiles')"
>
<el-slider
v-model="form_data.maxFiles"
show-input
:show-input-controls="false"
:min="1"
:max="100"
/>
</el-form-item>
<el-form-item
:label="$t('views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileLimit')"
>
<el-slider
v-model="form_data.fileLimit"
show-input
:show-input-controls="false"
:min="1"
:max="1000"
/>
</el-form-item>
<el-form-item
:label="
$t('views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.label')
"
>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.document ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.document = !form_data.document"
<el-scrollbar max-height="550">
<div class="p-8">
<el-form
label-position="top"
ref="fieldFormRef"
:model="form_data"
require-asterisk-position="right"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" src="@/assets/workflow/icon_file-doc.svg" alt=""/>
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.document') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.documentText'
)
}}
</el-text>
</p>
<p>{{ documentExtensions.join('、') }}</p>
</div>
</div>
<el-checkbox
v-model="form_data.document"
@change="form_data.document = !form_data.document"
<el-form-item
:label="$t('views.applicationWorkflow.nodes.baseNode.FileUploadSetting.maxFiles')"
>
<el-slider
v-model="form_data.maxFiles"
show-input
:show-input-controls="false"
:min="1"
:max="100"
/>
</div>
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.image ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.image = !form_data.image"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" src="@/assets/workflow/icon_file-image.svg" alt=""/>
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.image') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.imageText'
)
}}
</el-text>
</p>
<p>{{ imageExtensions.join('、') }}</p>
</el-form-item>
<el-form-item
:label="$t('views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileLimit')"
>
<el-slider
v-model="form_data.fileLimit"
show-input
:show-input-controls="false"
:min="1"
:max="1000"
/>
</el-form-item>
<el-form-item
:label="
$t('views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.label')
"
>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.document ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.document = !form_data.document"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" src="@/assets/workflow/icon_file-doc.svg" alt="" />
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.document') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.documentText',
)
}}
</el-text>
</p>
<p>{{ documentExtensions.join('、') }}</p>
</div>
</div>
<el-checkbox
v-model="form_data.document"
@change="form_data.document = !form_data.document"
/>
</div>
</div>
<el-checkbox v-model="form_data.image" @change="form_data.image = !form_data.image"/>
</div>
</el-card>
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.image ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.image = !form_data.image"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" src="@/assets/workflow/icon_file-image.svg" alt="" />
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.image') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.imageText',
)
}}
</el-text>
</p>
<p>{{ imageExtensions.join('、') }}</p>
</div>
</div>
<el-checkbox
v-model="form_data.image"
@change="form_data.image = !form_data.image"
/>
</div>
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.audio ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.audio = !form_data.audio"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" src="@/assets/workflow/icon_file-audio.svg" alt=""/>
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.audio') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.audioText'
)
}}
</el-text>
</p>
<p>{{ audioExtensions.join('、') }}</p>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.audio ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.audio = !form_data.audio"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" src="@/assets/workflow/icon_file-audio.svg" alt="" />
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.audio') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.audioText',
)
}}
</el-text>
</p>
<p>{{ audioExtensions.join('、') }}</p>
</div>
</div>
<el-checkbox
v-model="form_data.audio"
@change="form_data.audio = !form_data.audio"
/>
</div>
</div>
<el-checkbox v-model="form_data.audio" @change="form_data.audio = !form_data.audio"/>
</div>
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.video ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.video = !form_data.video"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" width="32" src="@/assets/workflow/icon_file-video.svg" alt=""/>
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.video') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.videoText'
)
}}
</el-text>
</p>
<p>{{ videoExtensions.join('、') }}</p>
</div>
</div>
<el-checkbox v-model="form_data.video" @change="form_data.video = !form_data.video"/>
</div>
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.other ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.other = !form_data.other"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt=""/>
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.other') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.otherText'
)
}}
</el-text>
</p>
<el-space wrap :size="2" class="mt-4">
<el-tag
v-for="tag in form_data.otherExtensions"
:key="tag"
closable
:disable-transitions="false"
@close="handleClose(tag)"
type="info"
class="mr-4"
effect="plain"
style="
--el-tag-border-radius: 4px;
--el-tag-border-color: var(--el-border-color);
"
>
{{ tag }}
</el-tag>
<el-input
v-if="inputVisible"
ref="InputRef"
v-model="inputValue"
size="small"
@keyup.enter="handleInputConfirm"
@blur="handleInputConfirm"
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.video ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.video = !form_data.video"
>
<div class="flex-between">
<div class="flex align-center">
<img
class="mr-12"
width="32"
src="@/assets/workflow/icon_file-video.svg"
alt=""
/>
<el-button v-else class="button-new-tag" size="small" @click.stop="showInput">
+ {{ $t('common.fileUpload.addExtensions') }}
</el-button>
</el-space>
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.video') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.videoText',
)
}}
</el-text>
</p>
<p>{{ videoExtensions.join('、') }}</p>
</div>
</div>
<el-checkbox
v-model="form_data.video"
@change="form_data.video = !form_data.video"
/>
</div>
</div>
<el-checkbox v-model="form_data.other" @change="form_data.other = !form_data.other"/>
</div>
</el-card>
</el-form-item>
</el-form>
</el-card>
<el-card
shadow="hover"
class="card-checkbox cursor w-full mb-8"
:class="form_data.other ? 'active' : ''"
style="--el-card-padding: 8px 16px"
@click.stop="form_data.other = !form_data.other"
>
<div class="flex-between">
<div class="flex align-center">
<img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt="" />
<div>
<p class="line-height-22 mt-4">
{{ $t('common.fileUpload.other') }}
<el-text class="color-secondary"
>{{
$t(
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.otherText',
)
}}
</el-text>
</p>
<el-space wrap :size="2" class="mt-4">
<el-tag
v-for="tag in form_data.otherExtensions"
:key="tag"
closable
:disable-transitions="false"
@close="handleClose(tag)"
type="info"
class="mr-4"
effect="plain"
style="
--el-tag-border-radius: 4px;
--el-tag-border-color: var(--el-border-color);
"
>
{{ tag }}
</el-tag>
<el-input
v-if="inputVisible"
ref="InputRef"
v-model="inputValue"
size="small"
@keyup.enter="handleInputConfirm"
@blur="handleInputConfirm"
/>
<el-button v-else class="button-new-tag" size="small" @click.stop="showInput">
+ {{ $t('common.fileUpload.addExtensions') }}
</el-button>
</el-space>
</div>
</div>
<el-checkbox
v-model="form_data.other"
@change="form_data.other = !form_data.other"
/>
</div>
</el-card>
</el-form-item>
</el-form>
</div>
</el-scrollbar>
<template #footer>
<span class="dialog-footer">
<el-button @click.prevent="close"> {{ $t('common.cancel') }} </el-button>
@ -223,11 +246,11 @@
</template>
<script setup lang="ts">
import {nextTick, ref} from 'vue'
import type {InputInstance} from 'element-plus'
import {cloneDeep} from 'lodash'
import {MsgWarning} from '@/utils/message'
import {t} from '@/locales'
import { nextTick, ref } from 'vue'
import type { InputInstance } from 'element-plus'
import { cloneDeep } from 'lodash'
import { MsgWarning } from '@/utils/message'
import { t } from '@/locales'
const emit = defineEmits(['refresh'])
const props = defineProps<{ nodeModel: any }>()
@ -252,13 +275,13 @@ const form_data = ref({
audio: false,
video: false,
other: false,
otherExtensions: ['PPT', 'DOC']
otherExtensions: ['PPT', 'DOC'],
})
function open(data: any) {
dialogVisible.value = true
nextTick(() => {
form_data.value = {...form_data.value, ...data}
form_data.value = { ...form_data.value, ...data }
})
}
@ -309,7 +332,7 @@ async function submit() {
}
defineExpose({
open
open,
})
</script>