From dec2426232d0d1f2e796fd59dae8d4aaf052e961 Mon Sep 17 00:00:00 2001 From: ye1023 <12588209+ye1023@user.noreply.gitee.com> Date: Fri, 17 Apr 2026 14:28:53 +0800 Subject: [PATCH] =?UTF-8?q?yxk-20260417-=E6=B5=81=E7=A8=8B=E8=A1=A8?= =?UTF-8?q?=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/taskProcess/TaskTask.api.ts | 72 ++++ src/views/taskProcess/TaskTask.data.ts | 257 +++++++++++ src/views/taskProcess/TaskTaskList.vue | 341 +++++++++++++++ .../V20260417_1__menu_insert_TaskTask.sql | 26 ++ .../taskProcess/components/TaskTaskForm.vue | 404 ++++++++++++++++++ .../taskProcess/components/TaskTaskModal.vue | 81 ++++ 6 files changed, 1181 insertions(+) create mode 100644 src/views/taskProcess/TaskTask.api.ts create mode 100644 src/views/taskProcess/TaskTask.data.ts create mode 100644 src/views/taskProcess/TaskTaskList.vue create mode 100644 src/views/taskProcess/V20260417_1__menu_insert_TaskTask.sql create mode 100644 src/views/taskProcess/components/TaskTaskForm.vue create mode 100644 src/views/taskProcess/components/TaskTaskModal.vue diff --git a/src/views/taskProcess/TaskTask.api.ts b/src/views/taskProcess/TaskTask.api.ts new file mode 100644 index 0000000..a587572 --- /dev/null +++ b/src/views/taskProcess/TaskTask.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/tasktask/taskTask/list', + save='/tasktask/taskTask/add', + edit='/tasktask/taskTask/edit', + deleteOne = '/tasktask/taskTask/delete', + deleteBatch = '/tasktask/taskTask/deleteBatch', + importExcel = '/tasktask/taskTask/importExcel', + exportXls = '/tasktask/taskTask/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/src/views/taskProcess/TaskTask.data.ts b/src/views/taskProcess/TaskTask.data.ts new file mode 100644 index 0000000..5d6b23d --- /dev/null +++ b/src/views/taskProcess/TaskTask.data.ts @@ -0,0 +1,257 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +import { getWeekMonthQuarterYear } from '/@/utils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '流程编码', + align: "center", + dataIndex: 'flowCode' + }, + { + title: '流程名称', + align: "center", + dataIndex: 'flowName' + }, + { + title: '流程实例ID', + align: "center", + dataIndex: 'processInstId' + }, + { + title: '流程类型', + align: "center", + dataIndex: 'processType' + }, + { + title: '流程状态', + align: "center", + dataIndex: 'bpmStatus' + }, + { + title: '关联台账事项ID', + align: "center", + dataIndex: 'businessId' + }, + { + title: '关联台账根节点id', + align: "center", + dataIndex: 'parentBusinessId' + }, + { + title: '关联台账表名', + align: "center", + dataIndex: 'businessTablename' + }, + { + title: '外部来源 ID', + align: "center", + dataIndex: 'sourceId' + }, + { + title: '任务标题', + align: "center", + dataIndex: 'title' + }, + { + title: '任务内容', + align: "center", + dataIndex: 'content' + }, + { + title: '紧急程度(一般/紧急/特急)', + align: "center", + dataIndex: 'urgencyLevel_dictText' + }, + { + title: '自定义分组', + align: "center", + dataIndex: 'customGroup' + }, + { + title: '所属任务清单 ID', + align: "center", + dataIndex: 'taskListId' + }, + { + title: '所属任务清单名称', + align: "center", + dataIndex: 'taskListName' + }, + { + title: '是否为里程碑节点', + align: "center", + dataIndex: 'milestone' + }, + { + title: '任务完成方式', + align: "center", + dataIndex: 'finishMethod' + }, + { + title: '被督办部门id', + align: "center", + dataIndex: 'deptId' + }, + { + title: '被督办部门名称(冗余)', + align: "center", + dataIndex: 'deptName' + }, + { + title: '部门负责人id', + align: "center", + dataIndex: 'deptLeaderId_dictText' + }, + { + title: '部门负责人姓名(冗余)', + align: "center", + dataIndex: 'deptLeaderName' + }, + { + title: '部门经办人id(负责人指派后填入)', + align: "center", + dataIndex: 'deptHandlerId_dictText' + }, + { + title: '部门经办人姓名(冗余)', + align: "center", + dataIndex: 'deptHandlerName' + }, + { + title: '关注人 ID 列表', + align: "center", + dataIndex: 'followerIds' + }, + { + title: '关注人姓名列表,冗余', + align: "center", + dataIndex: 'followerNames' + }, + { + title: '要求完成日期(业务层面的硬性要求)', + align: "center", + dataIndex: 'requireFinishDate', + customRender:({text}) =>{ + text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text); + return text; + }, + }, + { + title: '督办开始时间', + align: "center", + dataIndex: 'startTime' + }, + { + title: '截止时间(精确到时分,与 require_finish_date 互补)', + align: "center", + sorter: true, + dataIndex: 'deadline' + }, + { + title: '实际完成时间', + align: "center", + dataIndex: 'actualFinishTime' + }, + { + title: '是否已逾期', + align: "center", + dataIndex: 'isOverdue' + }, + { + title: '逾期时长', + align: "center", + dataIndex: 'overdueDuration' + }, + { + title: '持续时长', + align: "center", + dataIndex: 'duration' + }, + { + title: '子任务完成进度(0.00~100.00,参考飞书子任务进度)', + align: "center", + dataIndex: 'subTaskProgress' + }, + { + title: '父任务 ID', + align: "center", + dataIndex: 'parentTaskId' + }, + { + title: '前置任务 ID 列表,逗号分隔', + align: "center", + dataIndex: 'preTaskIds' + }, + { + title: '后置任务 ID 列表,逗号分隔', + align: "center", + dataIndex: 'nextTaskIds' + }, + { + title: '子任务数', + align: "center", + dataIndex: 'subTaskCount' + }, + { + title: '流程序列号', + align: "center", + dataIndex: 'processCodenumber' + }, + { + title: '表单组件路径', + align: "center", + dataIndex: 'formUrl' + }, + { + title: '流程变量', + align: "center", + dataIndex: 'jsonDataString' + }, +]; + +// 高级查询数据 +export const superQuerySchema = { + flowCode: {title: '流程编码',order: 0,view: 'text', type: 'string',}, + flowName: {title: '流程名称',order: 1,view: 'text', type: 'string',}, + processInstId: {title: '流程实例ID',order: 2,view: 'text', type: 'string',}, + processType: {title: '流程类型',order: 3,view: 'text', type: 'string',}, + bpmStatus: {title: '流程状态',order: 4,view: 'text', type: 'string',}, + businessId: {title: '关联台账事项ID',order: 5,view: 'text', type: 'string',}, + parentBusinessId: {title: '关联台账根节点id',order: 6,view: 'text', type: 'string',}, + businessTablename: {title: '关联台账表名',order: 7,view: 'text', type: 'string',}, + sourceId: {title: '外部来源 ID',order: 8,view: 'text', type: 'string',}, + title: {title: '任务标题',order: 9,view: 'text', type: 'string',}, + content: {title: '任务内容',order: 10,view: 'text', type: 'string',}, + urgencyLevel: {title: '紧急程度(一般/紧急/特急)',order: 11,view: 'list', type: 'string',dictCode: 'urgency_level',}, + customGroup: {title: '自定义分组',order: 12,view: 'text', type: 'string',}, + taskListId: {title: '所属任务清单 ID',order: 13,view: 'text', type: 'string',}, + taskListName: {title: '所属任务清单名称',order: 14,view: 'text', type: 'string',}, + milestone: {title: '是否为里程碑节点',order: 15,view: 'text', type: 'string',}, + finishMethod: {title: '任务完成方式',order: 16,view: 'text', type: 'string',}, + deptId: {title: '被督办部门id',order: 17,view: 'text', type: 'string',}, + deptName: {title: '被督办部门名称(冗余)',order: 18,view: 'text', type: 'string',}, + deptLeaderId: {title: '部门负责人id',order: 19,view: 'sel_user', type: 'string',}, + deptLeaderName: {title: '部门负责人姓名(冗余)',order: 20,view: 'text', type: 'string',}, + deptHandlerId: {title: '部门经办人id(负责人指派后填入)',order: 21,view: 'sel_depart', type: 'string',}, + deptHandlerName: {title: '部门经办人姓名(冗余)',order: 22,view: 'text', type: 'string',}, + followerIds: {title: '关注人 ID 列表',order: 23,view: 'text', type: 'string',}, + followerNames: {title: '关注人姓名列表,冗余',order: 24,view: 'text', type: 'string',}, + requireFinishDate: {title: '要求完成日期(业务层面的硬性要求)',order: 25,view: 'date', type: 'string',}, + startTime: {title: '督办开始时间',order: 26,view: 'datetime', type: 'string',}, + deadline: {title: '截止时间(精确到时分,与 require_finish_date 互补)',order: 27,view: 'datetime', type: 'string',}, + actualFinishTime: {title: '实际完成时间',order: 28,view: 'datetime', type: 'string',}, + isOverdue: {title: '是否已逾期',order: 29,view: 'text', type: 'string',}, + overdueDuration: {title: '逾期时长',order: 30,view: 'number', type: 'number',}, + duration: {title: '持续时长',order: 31,view: 'number', type: 'number',}, + subTaskProgress: {title: '子任务完成进度(0.00~100.00,参考飞书子任务进度)',order: 32,view: 'number', type: 'number',}, + parentTaskId: {title: '父任务 ID',order: 33,view: 'text', type: 'string',}, + preTaskIds: {title: '前置任务 ID 列表,逗号分隔',order: 34,view: 'text', type: 'string',}, + nextTaskIds: {title: '后置任务 ID 列表,逗号分隔',order: 35,view: 'text', type: 'string',}, + subTaskCount: {title: '子任务数',order: 36,view: 'number', type: 'number',}, + processCodenumber: {title: '流程序列号',order: 37,view: 'text', type: 'string',}, + formUrl: {title: '表单组件路径',order: 38,view: 'text', type: 'string',}, + jsonData: {title: '流程变量',order: 39,view: 'text', type: 'string',}, +}; diff --git a/src/views/taskProcess/TaskTaskList.vue b/src/views/taskProcess/TaskTaskList.vue new file mode 100644 index 0000000..1663193 --- /dev/null +++ b/src/views/taskProcess/TaskTaskList.vue @@ -0,0 +1,341 @@ + + + + + diff --git a/src/views/taskProcess/V20260417_1__menu_insert_TaskTask.sql b/src/views/taskProcess/V20260417_1__menu_insert_TaskTask.sql new file mode 100644 index 0000000..f4c7645 --- /dev/null +++ b/src/views/taskProcess/V20260417_1__menu_insert_TaskTask.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/tasktask文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2026041701599730510', NULL, '事项任务计划表(发起流程)', '/taskProcess/taskTaskList', 'taskProcess/TaskTaskList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2026041701599730511', '2026041701599730510', '添加事项任务计划表(发起流程)', NULL, NULL, 0, NULL, NULL, 2, 'tasktask:task_task:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2026041701599730512', '2026041701599730510', '编辑事项任务计划表(发起流程)', NULL, NULL, 0, NULL, NULL, 2, 'tasktask:task_task:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2026041701599730513', '2026041701599730510', '删除事项任务计划表(发起流程)', NULL, NULL, 0, NULL, NULL, 2, 'tasktask:task_task:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2026041701599730514', '2026041701599730510', '批量删除事项任务计划表(发起流程)', NULL, NULL, 0, NULL, NULL, 2, 'tasktask:task_task:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2026041701599730515', '2026041701599730510', '导出excel_事项任务计划表(发起流程)', NULL, NULL, 0, NULL, NULL, 2, 'tasktask:task_task:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2026041701599730516', '2026041701599730510', '导入excel_事项任务计划表(发起流程)', NULL, NULL, 0, NULL, NULL, 2, 'tasktask:task_task:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2026-04-17 13:59:51', NULL, NULL, 0, 0, '1', 0); diff --git a/src/views/taskProcess/components/TaskTaskForm.vue b/src/views/taskProcess/components/TaskTaskForm.vue new file mode 100644 index 0000000..277de5c --- /dev/null +++ b/src/views/taskProcess/components/TaskTaskForm.vue @@ -0,0 +1,404 @@ + + + + + diff --git a/src/views/taskProcess/components/TaskTaskModal.vue b/src/views/taskProcess/components/TaskTaskModal.vue new file mode 100644 index 0000000..74724db --- /dev/null +++ b/src/views/taskProcess/components/TaskTaskModal.vue @@ -0,0 +1,81 @@ + + + + + +