fix: workflow multi-selection
parent
e17bb8f5dd
commit
8ecb6a855c
|
|
@ -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',
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
])
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { useRoute } from 'vue-router'
|
||||||
import SelectKnowledgeDocument from '@/components/select-knowledge-document/index.vue'
|
import SelectKnowledgeDocument from '@/components/select-knowledge-document/index.vue'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
|
@ -94,13 +94,24 @@ const apiType = computed(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const postKnowledgeHandler = (knowledgeList: Array<any>) => {
|
const postKnowledgeHandler = (knowledgeList: Array<any>) => {
|
||||||
return knowledgeList.filter(item => {
|
return knowledgeList.filter((item) => {
|
||||||
if (apiType.value === 'workspace') {
|
if (apiType.value === 'workspace') {
|
||||||
return hasPermission([RoleConst.WORKSPACE_MANAGE.getWorkspaceRole(),
|
return hasPermission(
|
||||||
new Permission("KNOWLEDGE_DOCUMENT:READ+EDIT").getWorkspacePermissionWorkspaceManageRole,
|
[
|
||||||
new Permission("KNOWLEDGE_DOCUMENT:READ+EDIT").getWorkspaceResourcePermission('KNOWLEDGE', item.id)], 'OR')
|
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') {
|
} 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',
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -202,6 +213,7 @@ function changeDocument(document_id: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = (data: any) => {
|
const open = (data: any) => {
|
||||||
|
getDetail()
|
||||||
form.value.chat_id = data.chat_id
|
form.value.chat_id = data.chat_id
|
||||||
form.value.record_id = data.id
|
form.value.record_id = data.id
|
||||||
form.value.problem_text = data.problem_text ? data.problem_text.substring(0, 256) : ''
|
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 })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -218,12 +218,19 @@ function openCreateTagDialog(row?: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function batchDelete() {
|
function batchDelete() {
|
||||||
|
MsgConfirm(t('views.document.tag.deleteConfirm'), t('views.document.tag.deleteTip'), {
|
||||||
|
confirmButtonText: t('common.delete'),
|
||||||
|
confirmButtonClass: 'danger',
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
const tagsToDelete = multipleSelection.value.map((item) => item.id)
|
const tagsToDelete = multipleSelection.value.map((item) => item.id)
|
||||||
loadSharedApi({ type: 'knowledge', systemType: apiType.value })
|
loadSharedApi({ type: 'knowledge', systemType: apiType.value })
|
||||||
.delMulTag(id, tagsToDelete)
|
.delMulTag(id, tagsToDelete)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
}
|
}
|
||||||
|
|
||||||
const editTagDialogRef = ref()
|
const editTagDialogRef = ref()
|
||||||
|
|
|
||||||
|
|
@ -132,11 +132,6 @@ const handleSelectionChange = (val: any[]) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function batchDelete() {
|
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) => {
|
const tagsToDelete = multipleSelection.value.reduce((acc, item) => {
|
||||||
// 找出当前选中项的key对应的所有value id
|
// 找出当前选中项的key对应的所有value id
|
||||||
const sameKeyItems = tableData.value.filter((data) => data.key === item.key)
|
const sameKeyItems = tableData.value.filter((data) => data.key === item.key)
|
||||||
|
|
@ -149,27 +144,14 @@ function batchDelete() {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function delTagValue(row: any) {
|
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',
|
|
||||||
},
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
loadSharedApi({ type: 'document', systemType: apiType.value })
|
loadSharedApi({ type: 'document', systemType: apiType.value })
|
||||||
.delMulDocumentTag(id, document_id.value, [row.id], loading)
|
.delMulDocumentTag(id, document_id.value, [row.id], loading)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getList() {
|
function getList() {
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,6 @@
|
||||||
ref="SelectDocumentDialogRef"
|
ref="SelectDocumentDialogRef"
|
||||||
@refresh="refreshMigrateParagraph"
|
@refresh="refreshMigrateParagraph"
|
||||||
:apiType="apiType"
|
:apiType="apiType"
|
||||||
:workspace-id="knowledgeDetail.workspace_id"
|
|
||||||
/>
|
/>
|
||||||
<GenerateRelatedDialog ref="GenerateRelatedDialogRef" @refresh="refresh" :apiType="apiType" />
|
<GenerateRelatedDialog ref="GenerateRelatedDialogRef" @refresh="refresh" :apiType="apiType" />
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
@ -195,7 +194,6 @@ const emit = defineEmits([
|
||||||
])
|
])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const changeStateloading = ref(false)
|
const changeStateloading = ref(false)
|
||||||
const knowledgeDetail = ref<any>({})
|
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
// card上面存在dropdown菜单
|
// card上面存在dropdown菜单
|
||||||
const subHovered = ref(false)
|
const subHovered = ref(false)
|
||||||
|
|
@ -222,13 +220,6 @@ async function changeState(row: any) {
|
||||||
return false
|
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>>()
|
const GenerateRelatedDialogRef = ref<InstanceType<typeof GenerateRelatedDialog>>()
|
||||||
function openGenerateDialog(row: any) {
|
function openGenerateDialog(row: any) {
|
||||||
|
|
@ -304,10 +295,6 @@ const dialogVisible = computed(
|
||||||
GenerateRelatedDialogRef.value?.dialogVisible,
|
GenerateRelatedDialogRef.value?.dialogVisible,
|
||||||
)
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getDetail()
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(dialogVisible, (val: boolean) => {
|
watch(dialogVisible, (val: boolean) => {
|
||||||
emit('dialogVisibleChange', val)
|
emit('dialogVisibleChange', val)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<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 { useRoute } from 'vue-router'
|
||||||
import SelectKnowledgeDocument from '@/components/select-knowledge-document/index.vue'
|
import SelectKnowledgeDocument from '@/components/select-knowledge-document/index.vue'
|
||||||
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
import { loadSharedApi } from '@/utils/dynamics-api/shared-api'
|
||||||
|
|
@ -60,6 +60,7 @@ watch(dialogVisible, (bool) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
const open = (list: any) => {
|
const open = (list: any) => {
|
||||||
|
getDetail()
|
||||||
paragraphList.value = list
|
paragraphList.value = list
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
@ -92,11 +93,6 @@ function getDetail() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getDetail()
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
function changeKnowledge(dataset_id: string) {
|
function changeKnowledge(dataset_id: string) {
|
||||||
localStorage.setItem(id + 'chat_dataset_id', dataset_id)
|
localStorage.setItem(id + 'chat_dataset_id', dataset_id)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -269,8 +269,8 @@ const mousedown = (event?: any) => {
|
||||||
if (!event?.shiftKey) {
|
if (!event?.shiftKey) {
|
||||||
props.nodeModel.graphModel.clearSelectElements()
|
props.nodeModel.graphModel.clearSelectElements()
|
||||||
}
|
}
|
||||||
set(props.nodeModel, 'isSelected', true)
|
set(props.nodeModel, 'isSelected', !props.nodeModel.isSelected)
|
||||||
set(props.nodeModel, 'isHovered', true)
|
set(props.nodeModel, 'isHovered', !props.nodeModel.isSelected)
|
||||||
props.nodeModel.graphModel.toFront(props.nodeModel.id)
|
props.nodeModel.graphModel.toFront(props.nodeModel.id)
|
||||||
}
|
}
|
||||||
const showicon = ref<number | null>(null)
|
const showicon = ref<number | null>(null)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,20 @@
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="always" style="--el-card-padding: 8px 12px; --el-card-border-radius: 8px">
|
<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-button link @click="zoomOut" style="border: none">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
effect="dark"
|
effect="dark"
|
||||||
|
|
@ -78,10 +93,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
lf: Object || String || null,
|
lf: Object || String || null,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const isDrag = ref(false)
|
||||||
|
|
||||||
function zoomIn() {
|
function zoomIn() {
|
||||||
props.lf?.zoom(true, [0, 0])
|
props.lf?.zoom(true, [0, 0])
|
||||||
}
|
}
|
||||||
|
|
@ -106,5 +124,22 @@ const extend = () => {
|
||||||
element.properties.showNode = true
|
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>
|
</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>
|
||||||
|
|
|
||||||
|
|
@ -109,6 +109,7 @@ const renderGraphData = (data?: any) => {
|
||||||
data.nodeModel.clear_next_node_field(false)
|
data.nodeModel.clear_next_node_field(false)
|
||||||
})
|
})
|
||||||
// lf.value.openSelectionSelect()
|
// lf.value.openSelectionSelect()
|
||||||
|
// lf.value.extension.selectionSelect.setSelectionSense(true, false)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
lf.value?.fitView()
|
lf.value?.fitView()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,11 @@
|
||||||
:before-close="close"
|
:before-close="close"
|
||||||
append-to-body
|
append-to-body
|
||||||
width="800"
|
width="800"
|
||||||
|
align-center
|
||||||
|
class="scrollbar-dialog"
|
||||||
>
|
>
|
||||||
|
<el-scrollbar max-height="550">
|
||||||
|
<div class="p-8">
|
||||||
<el-form
|
<el-form
|
||||||
label-position="top"
|
label-position="top"
|
||||||
ref="fieldFormRef"
|
ref="fieldFormRef"
|
||||||
|
|
@ -51,14 +55,14 @@
|
||||||
>
|
>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<img class="mr-12" src="@/assets/workflow/icon_file-doc.svg" alt=""/>
|
<img class="mr-12" src="@/assets/workflow/icon_file-doc.svg" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<p class="line-height-22 mt-4">
|
<p class="line-height-22 mt-4">
|
||||||
{{ $t('common.fileUpload.document') }}
|
{{ $t('common.fileUpload.document') }}
|
||||||
<el-text class="color-secondary"
|
<el-text class="color-secondary"
|
||||||
>{{
|
>{{
|
||||||
$t(
|
$t(
|
||||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.documentText'
|
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.documentText',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</el-text>
|
</el-text>
|
||||||
|
|
@ -81,14 +85,14 @@
|
||||||
>
|
>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<img class="mr-12" src="@/assets/workflow/icon_file-image.svg" alt=""/>
|
<img class="mr-12" src="@/assets/workflow/icon_file-image.svg" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<p class="line-height-22 mt-4">
|
<p class="line-height-22 mt-4">
|
||||||
{{ $t('common.fileUpload.image') }}
|
{{ $t('common.fileUpload.image') }}
|
||||||
<el-text class="color-secondary"
|
<el-text class="color-secondary"
|
||||||
>{{
|
>{{
|
||||||
$t(
|
$t(
|
||||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.imageText'
|
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.imageText',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</el-text>
|
</el-text>
|
||||||
|
|
@ -96,7 +100,10 @@
|
||||||
<p>{{ imageExtensions.join('、') }}</p>
|
<p>{{ imageExtensions.join('、') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox v-model="form_data.image" @change="form_data.image = !form_data.image"/>
|
<el-checkbox
|
||||||
|
v-model="form_data.image"
|
||||||
|
@change="form_data.image = !form_data.image"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
@ -109,14 +116,14 @@
|
||||||
>
|
>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<img class="mr-12" src="@/assets/workflow/icon_file-audio.svg" alt=""/>
|
<img class="mr-12" src="@/assets/workflow/icon_file-audio.svg" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<p class="line-height-22 mt-4">
|
<p class="line-height-22 mt-4">
|
||||||
{{ $t('common.fileUpload.audio') }}
|
{{ $t('common.fileUpload.audio') }}
|
||||||
<el-text class="color-secondary"
|
<el-text class="color-secondary"
|
||||||
>{{
|
>{{
|
||||||
$t(
|
$t(
|
||||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.audioText'
|
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.audioText',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</el-text>
|
</el-text>
|
||||||
|
|
@ -124,7 +131,10 @@
|
||||||
<p>{{ audioExtensions.join('、') }}</p>
|
<p>{{ audioExtensions.join('、') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox v-model="form_data.audio" @change="form_data.audio = !form_data.audio"/>
|
<el-checkbox
|
||||||
|
v-model="form_data.audio"
|
||||||
|
@change="form_data.audio = !form_data.audio"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card
|
<el-card
|
||||||
|
|
@ -136,14 +146,19 @@
|
||||||
>
|
>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<img class="mr-12" width="32" src="@/assets/workflow/icon_file-video.svg" alt=""/>
|
<img
|
||||||
|
class="mr-12"
|
||||||
|
width="32"
|
||||||
|
src="@/assets/workflow/icon_file-video.svg"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
<div>
|
<div>
|
||||||
<p class="line-height-22 mt-4">
|
<p class="line-height-22 mt-4">
|
||||||
{{ $t('common.fileUpload.video') }}
|
{{ $t('common.fileUpload.video') }}
|
||||||
<el-text class="color-secondary"
|
<el-text class="color-secondary"
|
||||||
>{{
|
>{{
|
||||||
$t(
|
$t(
|
||||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.videoText'
|
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.videoText',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</el-text>
|
</el-text>
|
||||||
|
|
@ -151,7 +166,10 @@
|
||||||
<p>{{ videoExtensions.join('、') }}</p>
|
<p>{{ videoExtensions.join('、') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox v-model="form_data.video" @change="form_data.video = !form_data.video"/>
|
<el-checkbox
|
||||||
|
v-model="form_data.video"
|
||||||
|
@change="form_data.video = !form_data.video"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card
|
<el-card
|
||||||
|
|
@ -163,14 +181,14 @@
|
||||||
>
|
>
|
||||||
<div class="flex-between">
|
<div class="flex-between">
|
||||||
<div class="flex align-center">
|
<div class="flex align-center">
|
||||||
<img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt=""/>
|
<img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt="" />
|
||||||
<div>
|
<div>
|
||||||
<p class="line-height-22 mt-4">
|
<p class="line-height-22 mt-4">
|
||||||
{{ $t('common.fileUpload.other') }}
|
{{ $t('common.fileUpload.other') }}
|
||||||
<el-text class="color-secondary"
|
<el-text class="color-secondary"
|
||||||
>{{
|
>{{
|
||||||
$t(
|
$t(
|
||||||
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.otherText'
|
'views.applicationWorkflow.nodes.baseNode.FileUploadSetting.fileUploadType.otherText',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</el-text>
|
</el-text>
|
||||||
|
|
@ -206,11 +224,16 @@
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-checkbox v-model="form_data.other" @change="form_data.other = !form_data.other"/>
|
<el-checkbox
|
||||||
|
v-model="form_data.other"
|
||||||
|
@change="form_data.other = !form_data.other"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-scrollbar>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button @click.prevent="close"> {{ $t('common.cancel') }} </el-button>
|
<el-button @click.prevent="close"> {{ $t('common.cancel') }} </el-button>
|
||||||
|
|
@ -223,11 +246,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {nextTick, ref} from 'vue'
|
import { nextTick, ref } from 'vue'
|
||||||
import type {InputInstance} from 'element-plus'
|
import type { InputInstance } from 'element-plus'
|
||||||
import {cloneDeep} from 'lodash'
|
import { cloneDeep } from 'lodash'
|
||||||
import {MsgWarning} from '@/utils/message'
|
import { MsgWarning } from '@/utils/message'
|
||||||
import {t} from '@/locales'
|
import { t } from '@/locales'
|
||||||
|
|
||||||
const emit = defineEmits(['refresh'])
|
const emit = defineEmits(['refresh'])
|
||||||
const props = defineProps<{ nodeModel: any }>()
|
const props = defineProps<{ nodeModel: any }>()
|
||||||
|
|
@ -252,13 +275,13 @@ const form_data = ref({
|
||||||
audio: false,
|
audio: false,
|
||||||
video: false,
|
video: false,
|
||||||
other: false,
|
other: false,
|
||||||
otherExtensions: ['PPT', 'DOC']
|
otherExtensions: ['PPT', 'DOC'],
|
||||||
})
|
})
|
||||||
|
|
||||||
function open(data: any) {
|
function open(data: any) {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
form_data.value = {...form_data.value, ...data}
|
form_data.value = { ...form_data.value, ...data }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -309,7 +332,7 @@ async function submit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open
|
open,
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue