mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): 移动工作流组件位置
This commit is contained in:
@ -35,20 +35,22 @@ UPDATE `sys_menu` SET `component` = 'FrameView', `query_param` = 'https://previe
|
|||||||
UPDATE `sys_menu` SET `path` = 'https://gitee.com/xlsea/ruoyi-plus-soybean', `component` = 'FrameView', `icon` = 'local-icon-gitee', `menu_name` = 'RuoYi-Plus-Soybean' WHERE `menu_id` = 4;
|
UPDATE `sys_menu` SET `path` = 'https://gitee.com/xlsea/ruoyi-plus-soybean', `component` = 'FrameView', `icon` = 'local-icon-gitee', `menu_name` = 'RuoYi-Plus-Soybean' WHERE `menu_id` = 4;
|
||||||
|
|
||||||
-- plus-ui 需要禁用的页面
|
-- plus-ui 需要禁用的页面
|
||||||
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` IN ( '116', '130', '131', '132', '11700', '11701' );
|
UPDATE `sys_menu` SET `status` = '1' WHERE `menu_id` IN ( '116', '130', '131', '132' );
|
||||||
|
-- 工作流要启用的页面
|
||||||
|
UPDATE `sys_menu` SET `status` = '0' WHERE `menu_id` IN ( '11616', '11618', '11700', '11701' );
|
||||||
|
|
||||||
-- 工作流菜单
|
-- 工作流菜单
|
||||||
UPDATE sys_menu SET component = 'Layout', icon = 'hugeicons:flow-square' WHERE menu_id = 11616;
|
UPDATE `sys_menu` SET `component` = 'Layout', `icon` = 'hugeicons:flow-square' WHERE `menu_id` = 11616;
|
||||||
UPDATE sys_menu SET component = 'Layout', icon = 'fluent:notepad-person-16-regular' WHERE menu_id = 11618;
|
UPDATE `sys_menu` SET `component` = 'Layout', `icon` = 'fluent:notepad-person-16-regular' WHERE `menu_id` = 11618;
|
||||||
UPDATE sys_menu SET component = 'workflow/task/taskWaiting/index', icon = 'ri:todo-line' WHERE menu_id = 11619;
|
UPDATE `sys_menu` SET `component` = 'workflow/task/taskWaiting/index', `icon` = 'ri:todo-line' WHERE `menu_id` = 11619;
|
||||||
UPDATE sys_menu SET icon = 'weui:setting-outlined' WHERE menu_id = 11620;
|
UPDATE `sys_menu` SET `icon` = 'weui:setting-outlined' WHERE `menu_id` = 11620;
|
||||||
UPDATE sys_menu SET icon = 'ri:instance-line' WHERE menu_id = 11621;
|
UPDATE `sys_menu` SET `icon` = 'ri:instance-line' WHERE `menu_id` = 11621;
|
||||||
UPDATE sys_menu SET icon = 'carbon:category' WHERE menu_id = 11622;
|
UPDATE `sys_menu` SET `icon` = 'carbon:category' WHERE `menu_id` = 11622;
|
||||||
UPDATE sys_menu SET component = 'workflow/task/myDocument/index', icon = 'hugeicons:start-up-02' WHERE menu_id = 11629;
|
UPDATE `sys_menu` SET `component` = 'workflow/task/myDocument/index', `icon` = 'hugeicons:start-up-02' WHERE `menu_id` = 11629;
|
||||||
UPDATE sys_menu SET component = 'Layout', icon = 'lucide:monitor-cog' WHERE menu_id = 11630;
|
UPDATE `sys_menu` SET `component` = 'Layout', `icon` = 'lucide:monitor-cog' WHERE `menu_id` = 11630;
|
||||||
UPDATE sys_menu SET component = 'workflow/task/allTaskWaiting/index', icon = 'ri:todo-line' WHERE menu_id = 11631;
|
UPDATE `sys_menu` SET `component` = 'workflow/task/allTaskWaiting/index', `icon` = 'ri:todo-line' WHERE `menu_id` = 11631;
|
||||||
UPDATE sys_menu SET component = 'workflow/task/taskFinish/index', icon = 'hugeicons:task-done-01' WHERE menu_id = 11632;
|
UPDATE `sys_menu` SET `component` = 'workflow/task/taskFinish/index', `icon` = 'hugeicons:task-done-01' WHERE `menu_id` = 11632;
|
||||||
UPDATE sys_menu SET path = 'taskCopy', component = 'workflow/task/taskCopy/index', icon = 'mynaui:copy' WHERE menu_id = 11633;
|
UPDATE `sys_menu` SET `path` = 'taskCopy', `component` = 'workflow/task/taskCopy/index', `icon` = 'mynaui:copy' WHERE `menu_id` = 11633;
|
||||||
UPDATE sys_menu SET icon = 'pepicons-pencil:leave' WHERE menu_id = 11638;
|
UPDATE `sys_menu` SET `icon` = 'ic:twotone-time-to-leave' WHERE `menu_id` = 11638;
|
||||||
UPDATE sys_menu SET path = 'design', component = 'workflow/design/index' WHERE menu_id = 11700;
|
UPDATE `sys_menu` SET `icon` = 'material-symbols:design-services-outline', `path` = 'design', `component` = 'workflow/design/index' WHERE `menu_id` = 11700;
|
||||||
|
UPDATE `sys_menu` SET `icon` = 'ic:twotone-time-to-leave' WHERE `menu_id` = 11701;
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import { fetchCreateLeave, fetchGetLeaveDetail, fetchStartWorkflow, fetchUpdateL
|
|||||||
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
||||||
import { useDict } from '@/hooks/business/dict';
|
import { useDict } from '@/hooks/business/dict';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import ApprovalInfoPanel from '@/components/custom/workflow/approval-info-panel.vue';
|
import ApprovalInfoPanel from '@/components/workflow/approval-info-panel.vue';
|
||||||
import FlowTaskApprovalModal from '@/components/custom/workflow/flow-task-approval-modal.vue';
|
import FlowTaskApprovalModal from '@/components/workflow/flow-task-approval-modal.vue';
|
||||||
import FlowDrawer from '@/components/custom/workflow/flow-drawer.vue';
|
import FlowDrawer from '@/components/workflow/flow-drawer.vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'LeaveEdit'
|
name: 'LeaveEdit'
|
||||||
18
src/typings/components.d.ts
vendored
18
src/typings/components.d.ts
vendored
@ -9,8 +9,8 @@ export {}
|
|||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
AppProvider: typeof import('./../components/common/app-provider.vue')['default']
|
AppProvider: typeof import('./../components/common/app-provider.vue')['default']
|
||||||
ApprovalInfoPanel: typeof import('./../components/custom/workflow/approval-info-panel.vue')['default']
|
ApprovalInfoPanel: typeof import('./../components/workflow/approval-info-panel.vue')['default']
|
||||||
BackTaskModal: typeof import('./../components/custom/workflow/back-task-modal.vue')['default']
|
BackTaskModal: typeof import('./../components/workflow/back-task-modal.vue')['default']
|
||||||
BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
|
BetterScroll: typeof import('./../components/custom/better-scroll.vue')['default']
|
||||||
BooleanTag: typeof import('./../components/custom/boolean-tag.vue')['default']
|
BooleanTag: typeof import('./../components/custom/boolean-tag.vue')['default']
|
||||||
ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
|
ButtonIcon: typeof import('./../components/custom/button-icon.vue')['default']
|
||||||
@ -24,11 +24,11 @@ declare module 'vue' {
|
|||||||
DictTag: typeof import('./../components/custom/dict-tag.vue')['default']
|
DictTag: typeof import('./../components/custom/dict-tag.vue')['default']
|
||||||
ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
|
ExceptionBase: typeof import('./../components/common/exception-base.vue')['default']
|
||||||
FileUpload: typeof import('./../components/custom/file-upload.vue')['default']
|
FileUpload: typeof import('./../components/custom/file-upload.vue')['default']
|
||||||
FlowCategorySelect: typeof import('./../components/custom/workflow/flow-category-select.vue')['default']
|
FlowCategorySelect: typeof import('./../components/workflow/flow-category-select.vue')['default']
|
||||||
FlowDrawer: typeof import('./../components/custom/workflow/flow-drawer.vue')['default']
|
FlowDrawer: typeof import('./../components/workflow/flow-drawer.vue')['default']
|
||||||
FlowInterveneModal: typeof import('./../components/custom/workflow/flow-intervene-modal.vue')['default']
|
FlowInterveneModal: typeof import('./../components/workflow/flow-intervene-modal.vue')['default']
|
||||||
FlowPreview: typeof import('./../components/custom/workflow/flow-preview.vue')['default']
|
FlowPreview: typeof import('./../components/workflow/flow-preview.vue')['default']
|
||||||
FlowTaskApprovalModal: typeof import('./../components/custom/workflow/flow-task-approval-modal.vue')['default']
|
FlowTaskApprovalModal: typeof import('./../components/workflow/flow-task-approval-modal.vue')['default']
|
||||||
FormTip: typeof import('./../components/custom/form-tip.vue')['default']
|
FormTip: typeof import('./../components/custom/form-tip.vue')['default']
|
||||||
FullScreen: typeof import('./../components/common/full-screen.vue')['default']
|
FullScreen: typeof import('./../components/common/full-screen.vue')['default']
|
||||||
GroupTag: typeof import('./../components/custom/group-tag.vue')['default']
|
GroupTag: typeof import('./../components/custom/group-tag.vue')['default']
|
||||||
@ -66,7 +66,7 @@ declare module 'vue' {
|
|||||||
IconUilSearch: typeof import('~icons/uil/search')['default']
|
IconUilSearch: typeof import('~icons/uil/search')['default']
|
||||||
JsonPreview: typeof import('./../components/custom/json-preview.vue')['default']
|
JsonPreview: typeof import('./../components/custom/json-preview.vue')['default']
|
||||||
LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
|
LangSwitch: typeof import('./../components/common/lang-switch.vue')['default']
|
||||||
LeaveEdit: typeof import('./../components/custom/workflow/leave-edit/index.vue')['default']
|
LeaveEdit: typeof import('./../components/workflow/form/leave-edit/index.vue')['default']
|
||||||
LookForward: typeof import('./../components/custom/look-forward.vue')['default']
|
LookForward: typeof import('./../components/custom/look-forward.vue')['default']
|
||||||
MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default']
|
MenuToggler: typeof import('./../components/common/menu-toggler.vue')['default']
|
||||||
MenuTree: typeof import('./../components/custom/menu-tree.vue')['default']
|
MenuTree: typeof import('./../components/custom/menu-tree.vue')['default']
|
||||||
@ -145,7 +145,7 @@ declare module 'vue' {
|
|||||||
OssUpload: typeof import('./../components/custom/oss-upload.vue')['default']
|
OssUpload: typeof import('./../components/custom/oss-upload.vue')['default']
|
||||||
PinToggler: typeof import('./../components/common/pin-toggler.vue')['default']
|
PinToggler: typeof import('./../components/common/pin-toggler.vue')['default']
|
||||||
PostSelect: typeof import('./../components/custom/post-select.vue')['default']
|
PostSelect: typeof import('./../components/custom/post-select.vue')['default']
|
||||||
ReduceSignatureModal: typeof import('./../components/custom/workflow/reduce-signature-modal.vue')['default']
|
ReduceSignatureModal: typeof import('./../components/workflow/reduce-signature-modal.vue')['default']
|
||||||
ReloadButton: typeof import('./../components/common/reload-button.vue')['default']
|
ReloadButton: typeof import('./../components/common/reload-button.vue')['default']
|
||||||
RoleSelect: typeof import('./../components/custom/role-select.vue')['default']
|
RoleSelect: typeof import('./../components/custom/role-select.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
|
|||||||
@ -85,7 +85,8 @@ export async function loadDynamicComponent(
|
|||||||
{ delay = 2000, timeout = 3000 } = {}
|
{ delay = 2000, timeout = 3000 } = {}
|
||||||
) {
|
) {
|
||||||
const suffix = `${humpToLine(formPath)}.vue`;
|
const suffix = `${humpToLine(formPath)}.vue`;
|
||||||
const matched = Object.entries(modules).find(([path]) => path.endsWith(suffix));
|
const componentPath = suffix.replace('/workflow', '/workflow/form');
|
||||||
|
const matched = Object.entries(modules).find(([path]) => path.endsWith(componentPath));
|
||||||
|
|
||||||
if (!matched) {
|
if (!matched) {
|
||||||
window.$message?.error(`组件不存在: ${suffix}`);
|
window.$message?.error(`组件不存在: ${suffix}`);
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import { useDict } from '@/hooks/business/dict';
|
|||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
import DictTag from '@/components/custom/dict-tag.vue';
|
import DictTag from '@/components/custom/dict-tag.vue';
|
||||||
import ButtonIcon from '@/components/custom/button-icon.vue';
|
import ButtonIcon from '@/components/custom/button-icon.vue';
|
||||||
import LeaveEdit from '@/components/custom/workflow/leave-edit/index.vue';
|
import LeaveEdit from '@/components/workflow/form/leave-edit/index.vue';
|
||||||
import LeaveSearch from './modules/leave-search.vue';
|
import LeaveSearch from './modules/leave-search.vue';
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, reactive, watch } from 'vue';
|
import { computed, reactive, ref, watch } from 'vue';
|
||||||
|
import type { SelectOption } from 'naive-ui';
|
||||||
import { fetchCreateDefinition, fetchUpdateDefinition } from '@/service/api/workflow/definition';
|
import { fetchCreateDefinition, fetchUpdateDefinition } from '@/service/api/workflow/definition';
|
||||||
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
import { useFormRules, useNaiveForm } from '@/hooks/common/form';
|
||||||
import { $t } from '@/locales';
|
import { $t } from '@/locales';
|
||||||
@ -38,6 +39,14 @@ const title = computed(() => {
|
|||||||
return titles[props.operateType];
|
return titles[props.operateType];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const formPaths = ref<SelectOption[]>([]);
|
||||||
|
const modules = import.meta.glob('@/components/workflow/form/**/*.vue');
|
||||||
|
Object.keys(modules).forEach(key => {
|
||||||
|
const label = key.replace('/src/components/workflow/form/', '');
|
||||||
|
const value = key.replace('/src/components/workflow/form', '/workflow');
|
||||||
|
formPaths.value.push({ label, value });
|
||||||
|
});
|
||||||
|
|
||||||
type Model = Api.Workflow.DefinitionOperateParams;
|
type Model = Api.Workflow.DefinitionOperateParams;
|
||||||
|
|
||||||
const model: Model = reactive(createDefaultModel());
|
const model: Model = reactive(createDefaultModel());
|
||||||
@ -47,7 +56,7 @@ function createDefaultModel(): Model {
|
|||||||
flowCode: '',
|
flowCode: '',
|
||||||
flowName: '',
|
flowName: '',
|
||||||
category: '',
|
category: '',
|
||||||
formPath: ''
|
formPath: undefined
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +126,13 @@ watch(visible, () => {
|
|||||||
<NInput v-model:value="model.flowName" placeholder="请输入流程名称" />
|
<NInput v-model:value="model.flowName" placeholder="请输入流程名称" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem label="审批表单路径" path="formPath">
|
<NFormItem label="审批表单路径" path="formPath">
|
||||||
<NInput v-model:value="model.formPath" placeholder="请输入审批表单路径" />
|
<template #label>
|
||||||
|
<div class="flex-center">
|
||||||
|
<FormTip content="需要在 /src/components/workflow/form 路径下创建组件" />
|
||||||
|
<span class="pl-3px">审批表单路径</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<NSelect v-model:value="model.formPath" :options="formPaths" placeholder="请选择审批表单路径" />
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
</NForm>
|
</NForm>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|||||||
@ -316,7 +316,7 @@ async function handleShowVariable(id: CommonType.IdType) {
|
|||||||
showVariableDrawer();
|
showVariableDrawer();
|
||||||
}
|
}
|
||||||
|
|
||||||
const modules = import.meta.glob('@/components/custom/workflow/**/*.vue');
|
const modules = import.meta.glob('@/components/workflow/form/**/*.vue');
|
||||||
const businessId = ref<CommonType.IdType>();
|
const businessId = ref<CommonType.IdType>();
|
||||||
|
|
||||||
/** 流程预览,动态加载组件 */
|
/** 流程预览,动态加载组件 */
|
||||||
|
|||||||
@ -208,7 +208,7 @@ function handleResetSearch() {
|
|||||||
resetSearchParams();
|
resetSearchParams();
|
||||||
selectedKeys.value = [];
|
selectedKeys.value = [];
|
||||||
}
|
}
|
||||||
const modules = import.meta.glob('@/components/custom/workflow/**/*.vue');
|
const modules = import.meta.glob('@/components/workflow/**/*.vue');
|
||||||
const businessId = ref<CommonType.IdType>();
|
const businessId = ref<CommonType.IdType>();
|
||||||
|
|
||||||
async function handleView(row: Api.Workflow.TaskOrHisTask) {
|
async function handleView(row: Api.Workflow.TaskOrHisTask) {
|
||||||
|
|||||||
@ -214,7 +214,7 @@ function handleResetSearch() {
|
|||||||
resetSearchParams();
|
resetSearchParams();
|
||||||
selectedKeys.value = [];
|
selectedKeys.value = [];
|
||||||
}
|
}
|
||||||
const modules = import.meta.glob('@/components/custom/workflow/**/*.vue');
|
const modules = import.meta.glob('@/components/workflow/**/*.vue');
|
||||||
const businessId = ref<CommonType.IdType>();
|
const businessId = ref<CommonType.IdType>();
|
||||||
const operateType = ref<CommonType.WorkflowTableOperateType>();
|
const operateType = ref<CommonType.WorkflowTableOperateType>();
|
||||||
|
|
||||||
|
|||||||
@ -163,7 +163,7 @@ function handleResetSearch() {
|
|||||||
resetSearchParams();
|
resetSearchParams();
|
||||||
selectedKeys.value = [];
|
selectedKeys.value = [];
|
||||||
}
|
}
|
||||||
const modules = import.meta.glob('@/components/custom/workflow/**/*.vue');
|
const modules = import.meta.glob('@/components/workflow/**/*.vue');
|
||||||
const businessId = ref<CommonType.IdType>();
|
const businessId = ref<CommonType.IdType>();
|
||||||
const taskId = ref<CommonType.IdType>();
|
const taskId = ref<CommonType.IdType>();
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,7 @@ function handleResetSearch() {
|
|||||||
resetSearchParams();
|
resetSearchParams();
|
||||||
selectedKeys.value = [];
|
selectedKeys.value = [];
|
||||||
}
|
}
|
||||||
const modules = import.meta.glob('@/components/custom/workflow/**/*.vue');
|
const modules = import.meta.glob('@/components/workflow/**/*.vue');
|
||||||
const businessId = ref<CommonType.IdType>();
|
const businessId = ref<CommonType.IdType>();
|
||||||
const taskId = ref<CommonType.IdType>();
|
const taskId = ref<CommonType.IdType>();
|
||||||
|
|
||||||
|
|||||||
@ -157,7 +157,7 @@ function handleResetSearch() {
|
|||||||
resetSearchParams();
|
resetSearchParams();
|
||||||
selectedKeys.value = [];
|
selectedKeys.value = [];
|
||||||
}
|
}
|
||||||
const modules = import.meta.glob('@/components/custom/workflow/**/*.vue');
|
const modules = import.meta.glob('@/components/workflow/**/*.vue');
|
||||||
const businessId = ref<CommonType.IdType>();
|
const businessId = ref<CommonType.IdType>();
|
||||||
const taskId = ref<CommonType.IdType>();
|
const taskId = ref<CommonType.IdType>();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user