merge
This commit is contained in:
@@ -62,7 +62,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
isInitial: false,
|
||||
modelValue: false,
|
||||
});
|
||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emits('update:modelValue', val),
|
||||
@@ -103,7 +103,7 @@ const onConfirmFun = async () => {
|
||||
}
|
||||
await formRef.value.validate((valid, fields) => {
|
||||
if (valid) {
|
||||
emits('ok', form);
|
||||
emits('confirm', form);
|
||||
} else {
|
||||
console.log('error submit!', fields);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
poolList: () => [],
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||
const form = ref({
|
||||
name: '',
|
||||
});
|
||||
@@ -110,7 +110,7 @@ const onConfirmFun = async () => {
|
||||
}
|
||||
await formRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
emits('ok', form.value);
|
||||
emits('confirm', form.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -38,7 +38,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
modelValue: false,
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
@@ -64,7 +64,7 @@ const onDelPoolFun = async (pool: Pool) => {
|
||||
if (res.code === 200) {
|
||||
ElMessage.success(res.message);
|
||||
queryListFun();
|
||||
emits('ok');
|
||||
emits('confirm');
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
poolList: () => [],
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||
const form = ref<{
|
||||
fileList: any[];
|
||||
file: any | null;
|
||||
@@ -144,7 +144,7 @@ const onConfirmFun = async () => {
|
||||
if (form.value.fileList && form.value.fileList.length > 0) {
|
||||
form.value.file = form.value.fileList[0];
|
||||
}
|
||||
emits('ok', form.value);
|
||||
emits('confirm', form.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -169,20 +169,20 @@
|
||||
<addApprove
|
||||
v-model="dialogApproveUserVisible"
|
||||
:isInitial="isEmptyPool"
|
||||
@ok="onConfirmFun"
|
||||
@confirm="onAddApproveConfirmFun"
|
||||
></addApprove>
|
||||
<add-pool-modal
|
||||
v-model="addPoolModalVisible"
|
||||
mode="add"
|
||||
:poolList="poolList"
|
||||
detail="{}"
|
||||
@ok="onAddPoolOkFun"
|
||||
@confirm="onAddPoolConfirmFun"
|
||||
/>
|
||||
<del-pool-modal v-model="delPoolModalVisible" @ok="onDelPoolOkFun" />
|
||||
<del-pool-modal v-model="delPoolModalVisible" @confirm="onDelPoolConfirmFun" />
|
||||
<import-pool-modal
|
||||
v-model="importPoolModalVisible"
|
||||
:poolList="poolList"
|
||||
@ok="onImportPoolOkFun"
|
||||
@confirm="onImportPoolConfirmFun"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -303,7 +303,7 @@ const onTableTypeChangeFun = (type: string) => {
|
||||
mergeListTableColumnsFun();
|
||||
}
|
||||
};
|
||||
const onConfirmFun = async (formData: any) => {
|
||||
const onAddApproveConfirmFun = async (formData: any) => {
|
||||
dialogApproveUserVisible.value = false;
|
||||
if (isEmptyPool.value) {
|
||||
await createTaskPoolFun(formData);
|
||||
@@ -865,7 +865,7 @@ const addPoolModalVisible = ref(false);
|
||||
const addPoolFun = () => {
|
||||
addPoolModalVisible.value = true;
|
||||
};
|
||||
const onAddPoolOkFun = (formData: any) => {
|
||||
const onAddPoolConfirmFun = (formData: any) => {
|
||||
const newPool = {
|
||||
tenantId,
|
||||
poolName: formData.name,
|
||||
@@ -882,7 +882,7 @@ const delPoolModalVisible = ref(false);
|
||||
const openDelPoolFun = () => {
|
||||
delPoolModalVisible.value = true;
|
||||
};
|
||||
const onDelPoolOkFun = () => {
|
||||
const onDelPoolConfirmFun = () => {
|
||||
refreshPoolFun();
|
||||
};
|
||||
const importPoolModalVisible = ref(false);
|
||||
@@ -934,7 +934,7 @@ const dict = computed(() => ({
|
||||
section: taskPoolDictOptions.value.sectionListOptions,
|
||||
group: taskPoolDictOptions.value.groupListOptions,
|
||||
}));
|
||||
const onImportPoolOkFun = async (formData: any) => {
|
||||
const onImportPoolConfirmFun = async (formData: any) => {
|
||||
importPoolModalVisible.value = false;
|
||||
const req = {
|
||||
poolName: formData.poolName,
|
||||
|
||||
@@ -43,7 +43,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
mode: 'add',
|
||||
});
|
||||
|
||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||
const form = ref({
|
||||
name: '',
|
||||
});
|
||||
@@ -91,7 +91,7 @@ const onConfirmFun = async () => {
|
||||
}
|
||||
await formRef.value.validate((valid) => {
|
||||
if (valid) {
|
||||
emits('ok', form.value);
|
||||
emits('confirm', form.value);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -63,7 +63,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
folder: null,
|
||||
tableName: '',
|
||||
});
|
||||
const emits = defineEmits(['update:modelValue', 'ok']);
|
||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => emits('update:modelValue', val),
|
||||
@@ -100,19 +100,21 @@ const form = ref<RuleForm>({
|
||||
|
||||
const onShowFun = () => {
|
||||
resetFun();
|
||||
initData();
|
||||
if (props.detail && props.detail.id) {
|
||||
initData();
|
||||
}
|
||||
};
|
||||
const initData = () => {
|
||||
const file = [{
|
||||
name: props.detail.originalName,
|
||||
name: props.detail?.originalName,
|
||||
}];
|
||||
tableFormRef.value?.setFormDataFun({ ...props.detail, ...{ originalName: file } });
|
||||
form.value.projectId = props.detail.projectId;
|
||||
form.value.analysisDirectionId = props.detail.analysisDirectionId;
|
||||
form.value.projectId = props.detail?.projectId;
|
||||
form.value.analysisDirectionId = props.detail?.analysisDirectionId;
|
||||
};
|
||||
watchEffect(() => {
|
||||
nextTick(() => {
|
||||
if (props.detail) {
|
||||
if (props.detail && props.detail.id) {
|
||||
initData();
|
||||
}
|
||||
});
|
||||
@@ -143,9 +145,14 @@ const onConfirmFun = async () => {
|
||||
if (valid) {
|
||||
const formData = tableFormRef.value?.getFormDataFun();
|
||||
if (formData.originalName && formData.originalName.length > 0) {
|
||||
formData.file = formData.originalName[0] || {};
|
||||
formData.file = formData.originalName.map((item:any) => {
|
||||
return {
|
||||
fileName: item.raw?.name,
|
||||
size: item.raw?.size,
|
||||
};
|
||||
});
|
||||
}
|
||||
emits('ok', formData);
|
||||
emits('confirm', formData);
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
|
||||
@@ -104,9 +104,14 @@
|
||||
:detail="currentRow"
|
||||
:folder="currentFolder"
|
||||
tableName="SIMULATION_KNOWLEDGE"
|
||||
@ok="onOkFun"
|
||||
@confirm="onConfirmFun"
|
||||
/>
|
||||
<folderModal
|
||||
v-model="folderModalVisible"
|
||||
:detail="currentFolder"
|
||||
:mode="currentFolderMode"
|
||||
@confirm="onFolderConfirmFun"
|
||||
/>
|
||||
<folderModal v-model="folderModalVisible" :detail="currentFolder" :mode="currentFolderMode" @ok="onFolderOkFun" />
|
||||
<FilePreview v-model="previewVisible" :fileId="currentRow?.id" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -118,7 +123,7 @@ import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import FileTree from '@/components/common/fileTree/index.vue';
|
||||
import knowledgeDetailModal from './components/knowledgeDetailModal.vue';
|
||||
import folderModal from './components/folderDetailModal.vue';
|
||||
import { dataCreateDirApi, dataListDirApi, dataRenameDirApi, dataUploadFilesApi, dataDelDirApi, dataQueryDirApi, dataFileSearchApi, dataDelFileApi, dataUpdateFileApi } from '@/api/data/data';
|
||||
import { dataCreateDirApi, dataListDirApi, dataRenameDirApi, dataUploadFilesApi, dataDelDirApi, dataQueryDirApi, dataFileSearchApi, dataDelFileApi, dataUpdateFileApi, batchAddFileInfoApi } from '@/api/data/data';
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import type { RenderContentContext } from 'element-plus';
|
||||
import { formatFileSize } from '@/utils/file';
|
||||
@@ -130,6 +135,7 @@ import { useDict } from '@/utils/useDict';
|
||||
import ApprovalProcess from '@/components/common/approvalProcess/index.vue';
|
||||
import i18n from '@/utils/i18n';
|
||||
import FilePreview from '@/components/common/filePreview/index.vue';
|
||||
import emitter from '@/utils/eventBus';
|
||||
|
||||
const { KNOWLEDGE_APPROVE_STATUS, KNOWLEDGE_APPROVE_TYPE } = useDict('KNOWLEDGE_APPROVE_STATUS', 'KNOWLEDGE_APPROVE_TYPE');
|
||||
const env = import.meta.env;
|
||||
@@ -180,20 +186,41 @@ const removeFun = async (data: Data) => {
|
||||
};
|
||||
const res: any = await dataDelDirApi(req);
|
||||
if (res.code === 200) {
|
||||
refreshTreeFun(data.parentId);
|
||||
refreshTreeAfterModifyOrRemove(data);
|
||||
ElMessage.success(res.message);
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
};
|
||||
const refreshTreeFun = (parentId?: number) => {
|
||||
if (parentId) {
|
||||
fileTreeRef.value?.openDirFun(parentId);
|
||||
} else {
|
||||
fileTreeRef.value?.reloadFun();
|
||||
}
|
||||
const refreshTreeRoot = () => {
|
||||
fileTreeRef.value?.reloadFun();
|
||||
baseTableRef.value?.resetFun();
|
||||
};
|
||||
const refreshTreeOpenDir = (dirId: number) => {
|
||||
fileTreeRef.value?.openDirFun(dirId);
|
||||
baseTableRef.value?.resetFun();
|
||||
};
|
||||
const refreshTreeAfterAdd = (parentNode?: any | null) => {
|
||||
if (parentNode && typeof parentNode.id === 'number') {
|
||||
refreshTreeOpenDir(parentNode.id);
|
||||
} else {
|
||||
refreshTreeRoot();
|
||||
}
|
||||
};
|
||||
const isTopLevel = (node: any) => {
|
||||
if (!node || !node.objectKey) return false;
|
||||
const key = String(node.objectKey).replace(/\/$/, '');
|
||||
const parts = key.split('/');
|
||||
return parts.length === 2;
|
||||
};
|
||||
const refreshTreeAfterModifyOrRemove = (node?: any | null) => {
|
||||
if (isTopLevel(node)) {
|
||||
refreshTreeRoot();
|
||||
} else {
|
||||
refreshTreeOpenDir(node.parentId);
|
||||
}
|
||||
|
||||
};
|
||||
const isSearching = ref(false);
|
||||
const searchParams = ref<any>({
|
||||
fileId: currentFolder.value?.id || '',
|
||||
@@ -264,21 +291,19 @@ const resetFun = (data: object) => {
|
||||
const refreshTableFun = async () => {
|
||||
baseTableRef.value?.resetFun();
|
||||
};
|
||||
const onFolderOkFun = async (formData: any) => {
|
||||
const onFolderConfirmFun = async (formData: any) => {
|
||||
if (currentFolderMode.value === 'add') {
|
||||
const req = {
|
||||
dirType: DIR_TYPE.KNOWLEDGE,
|
||||
parDirId: currentFolder.value.id,
|
||||
parDirId: currentFolder.value?.id,
|
||||
dirName: formData.name,
|
||||
type: 0,
|
||||
};
|
||||
const res: any = await dataCreateDirApi(req);
|
||||
if (res.code === 200) {
|
||||
refreshTreeFun(currentFolder.value.id);
|
||||
refreshTreeAfterAdd(currentFolder.value);
|
||||
folderModalVisible.value = false;
|
||||
ElMessage.success(res.message);
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
|
||||
} else if (currentFolderMode.value === 'edit') {
|
||||
@@ -290,11 +315,9 @@ const onFolderOkFun = async (formData: any) => {
|
||||
};
|
||||
const res: any = await dataRenameDirApi(req);
|
||||
if (res.code === 200) {
|
||||
refreshTreeFun(currentFolder.value.parentId);
|
||||
refreshTreeAfterModifyOrRemove(currentFolder.value);
|
||||
folderModalVisible.value = false;
|
||||
ElMessage.success(res.message);
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -305,7 +328,7 @@ const openModalFun = () => {
|
||||
visible.value = true;
|
||||
currentRow.value = null;
|
||||
};
|
||||
const onOkFun = async (formData: any) => {
|
||||
const onConfirmFun = async (formData: any) => {
|
||||
const req = {
|
||||
...currentRow.value,
|
||||
templateId: formData.templateId,
|
||||
@@ -328,7 +351,30 @@ const onOkFun = async (formData: any) => {
|
||||
if (currentRow.value && currentRow.value.id) {
|
||||
res = await dataUpdateFileApi(req);
|
||||
} else {
|
||||
res = await dataUploadFilesApi(req);
|
||||
const req = {
|
||||
sourceFiles: formData.file,
|
||||
uploadTaskId: new Date().getTime(),
|
||||
dirId: currentFolder.value.id,
|
||||
projectId: formData.projectId,
|
||||
analysisDirectionId: formData.analysisDirectionId,
|
||||
templateId: formData.templateId,
|
||||
templateName: formData.templateName,
|
||||
remarks: formData.remarks,
|
||||
type: 0,
|
||||
};
|
||||
res = await batchAddFileInfoApi(req);
|
||||
if (res.code === 200) {
|
||||
res.data.forEach((item: any, index: number) => {
|
||||
emitter.emit('ADD_UPLOAD_FILE', {
|
||||
file: formData.originalName[index].raw, // 文件对象
|
||||
data: { // 接口返回的文件目录信息,包括配置信息
|
||||
...item,
|
||||
isApprove: 1, // 0否 1是
|
||||
taskType: 2, // 2知识库
|
||||
},
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
if (res.code === 200) {
|
||||
visible.value = false;
|
||||
@@ -381,8 +427,6 @@ const delFileFun = async (row: any) => {
|
||||
if (res.code === 200) {
|
||||
refreshTableFun();
|
||||
ElMessage.success(res.message);
|
||||
} else {
|
||||
ElMessage.error(res.message);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
data: {},
|
||||
});
|
||||
const env = import.meta.env;
|
||||
const knowledgeDetail = ref<any>(null);
|
||||
const knowledgeList = ref<any[]>([]);
|
||||
const contents = ref<string>('');
|
||||
const approveAction = ref<any>();
|
||||
const tagTypeMap:any = {
|
||||
@@ -55,12 +55,11 @@ const baseTableRef = ref<any>(null);
|
||||
watchEffect(() => {
|
||||
if (props.data) {
|
||||
const approveContents = JSON.parse(props.data?.approveContents || '{}');
|
||||
knowledgeDetail.value = approveContents.afterData || approveContents.beforeData || null;
|
||||
knowledgeList.value = approveContents.afterData || approveContents.beforeData || null;
|
||||
contents.value = approveContents.contents || '';
|
||||
approveAction.value = props.data?.approveAction || '';
|
||||
if (baseTableRef.value && knowledgeDetail.value) {
|
||||
// TODO 临时写法 后期支持多个
|
||||
baseTableRef.value?.setDataFun([knowledgeDetail.value]);
|
||||
if (baseTableRef.value && knowledgeList.value) {
|
||||
baseTableRef.value?.setDataFun(knowledgeList.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,62 +1,11 @@
|
||||
export const keyboardEvents = (graph:any) => {
|
||||
window.addEventListener('keydown', (e) => {
|
||||
console.log('e', e);
|
||||
keyDownFun(e);
|
||||
});
|
||||
window.addEventListener('keyup', (e) => {
|
||||
keyUpFun(e);
|
||||
});
|
||||
const keyDownFun = (event: KeyboardEvent) => {
|
||||
// 2. 阻止浏览器的默认保存行为
|
||||
// 判断是否按下了 Ctrl + c (Windows) 或 Cmd + c (Mac)
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'c') {
|
||||
// ctrl+c
|
||||
const cells = graph.getSelectedCells();
|
||||
if (cells.length) {
|
||||
graph.copy(cells);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
// 判断是否按下了 Ctrl + v (Windows) 或 Cmd + v (Mac)
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'v') {
|
||||
// ctrl+v
|
||||
if (!graph.isClipboardEmpty()) {
|
||||
const cells = graph.paste({ offset: 20 });
|
||||
graph.cleanSelection();
|
||||
graph.select(cells);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
// 判断是否按下了 Ctrl + z (Windows) 或 Cmd + z (Mac)
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'z') {
|
||||
// ctrl+z
|
||||
graph.undo();
|
||||
event.preventDefault();
|
||||
}
|
||||
// 判断是否按下了空格键
|
||||
if ( event.key.toLowerCase() === ' ') {
|
||||
console.log('space keyDownFun');
|
||||
graph.enablePanning();
|
||||
graph.disableSelection();
|
||||
event.preventDefault();
|
||||
}
|
||||
if ( event.key.toLowerCase() === 'delete' || event.key.toLowerCase() === 'backspace') {
|
||||
const cells = graph.getSelectedCells();
|
||||
console.log('cells', cells);
|
||||
if (cells.length) {
|
||||
graph.removeCells(cells);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
const keyUpFun = (event: KeyboardEvent) => {
|
||||
// 判断是否按下了空格键
|
||||
if ( event.key.toLowerCase() === ' ') {
|
||||
console.log('space keyUpFun');
|
||||
graph.disablePanning();
|
||||
graph.enableSelection();
|
||||
}
|
||||
};
|
||||
let graph:any = null;
|
||||
export const keyboardEvents = (graph1:any) => {
|
||||
graph = graph1;
|
||||
window.addEventListener('keydown',
|
||||
keyDownFun
|
||||
);
|
||||
window.addEventListener('keyup', keyUpFun);
|
||||
|
||||
// graph.bindKey('ctrl+c', () => {
|
||||
// const cells = graph.getSelectedCells();
|
||||
// if (cells.length) {
|
||||
@@ -101,3 +50,60 @@ export const keyboardEvents = (graph:any) => {
|
||||
// return false;
|
||||
// });
|
||||
};
|
||||
|
||||
export const cancelKeyboardEvents = () => {
|
||||
graph = null;
|
||||
window.removeEventListener('keydown', keyDownFun);
|
||||
window.removeEventListener('keyup', keyUpFun);
|
||||
};
|
||||
const keyDownFun = (event: KeyboardEvent) => {
|
||||
// 2. 阻止浏览器的默认保存行为
|
||||
// 判断是否按下了 Ctrl + c (Windows) 或 Cmd + c (Mac)
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'c') {
|
||||
// ctrl+c
|
||||
const cells = graph.getSelectedCells();
|
||||
if (cells.length) {
|
||||
graph.copy(cells);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
// 判断是否按下了 Ctrl + v (Windows) 或 Cmd + v (Mac)
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'v') {
|
||||
// ctrl+v
|
||||
if (!graph.isClipboardEmpty()) {
|
||||
const cells = graph.paste({ offset: 20 });
|
||||
graph.cleanSelection();
|
||||
graph.select(cells);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
// 判断是否按下了 Ctrl + z (Windows) 或 Cmd + z (Mac)
|
||||
if ((event.ctrlKey || event.metaKey) && event.key.toLowerCase() === 'z') {
|
||||
// ctrl+z
|
||||
graph.undo();
|
||||
event.preventDefault();
|
||||
}
|
||||
// 判断是否按下了空格键
|
||||
if ( event.key.toLowerCase() === ' ') {
|
||||
console.log('space keyDownFun');
|
||||
graph.enablePanning();
|
||||
graph.disableSelection();
|
||||
event.preventDefault();
|
||||
}
|
||||
if ( event.key.toLowerCase() === 'delete' || event.key.toLowerCase() === 'backspace') {
|
||||
const cells = graph.getSelectedCells();
|
||||
console.log('cells', cells);
|
||||
if (cells.length) {
|
||||
graph.removeCells(cells);
|
||||
}
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
const keyUpFun = (event: KeyboardEvent) => {
|
||||
// 判断是否按下了空格键
|
||||
if ( event.key.toLowerCase() === ' ') {
|
||||
console.log('space keyUpFun');
|
||||
graph.disablePanning();
|
||||
graph.enableSelection();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import { onMounted, reactive, ref } from 'vue';
|
||||
import { onMounted, onUnmounted, reactive, ref } from 'vue';
|
||||
import { getTeleport } from '@antv/x6-vue-shape';
|
||||
import { useNodeAttribute, useNodeEvents } from './components/nodeEvents';
|
||||
import ConfigPage from './components/configPage.vue';
|
||||
@@ -61,6 +61,7 @@ import { FLOW_CREATE_ID, initGraph } from './components/initGraph';
|
||||
import ApproveDialog from './components/approveDialog.vue';
|
||||
import { FLOW_APPROVE_MAP } from '@/utils/enum/flow';
|
||||
import { getRelationNodeAndVerifyFlowFun } from './components/flow';
|
||||
import { cancelKeyboardEvents } from './components/keyboard';
|
||||
|
||||
const props = defineProps({
|
||||
flowUuid: {
|
||||
@@ -189,6 +190,11 @@ onMounted(async() => {
|
||||
// });
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
console.log('onUnmounted', onUnmounted);
|
||||
cancelKeyboardEvents();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" src="./index.scss">
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user