# gantt **Repository Path**: brujie/gantt ## Basic Information - **Project Name**: gantt - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-01-05 - **Last Updated**: 2024-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # vue-gant ## 项目 目前使用本地缓存进行处理实现增删改查持久化 node版本: 14.20 ## 登录接口 ``` // 新增登录接口 [post] 示例url:/gantt/api/v1/login post参数 { username:'admin', password:'12346' } 响应内容 { code:200, msg:'success' userId:1454687, role:'admin', // user token:'94872beddc768....' } ``` ## 接口 (请求头携带token判断用户登录状态) -2014-1-11 列表接口添加flag字段 flag字段,标记当前任务开启状态 ``` // 新增任务接口 [post] 示例url:/gantt/api/v1/taskAdd post 参数 { userId:1454687, // 用户id id:1703827939422, // id Number parent:1703827939422, // 父级id 数值Number text:item.text, // 任务名称 String start_date: '2023-12-28', // 开始日期 String end_date: '2023-12-29', // 开始日期 String duration: 2, // 持续时间 Number progress:0 // 执行进度 数值小数例如0.1 } // 修改任务接口 [post] 示例url:/gantt/api/v1/taskEdit post 参数 { userId:1454687, // 用户id id:1703827939422, // id Number parent:1703827939422, // 父级id 数值Number text:item.text, // 任务名称 String start_date: '2023-12-28', // 开始日期 String end_date: '2023-12-29', // 开始日期 String duration: 2, // 持续时间 Number progress:0 // 执行进度 数值小数例如0.1 } // 删除任务接口 [post] 示例url:/gantt/api/v1/taskDel post 参数 { userId:1454687, // 用户id id:1703827939422, // id Number } // 查询列表接口 [get] 示例url:/gantt/api/v1/taskList 返回数据 [ { "userId":1454687, // 用户id "id": 1703827887099, "parent": 0, "text": "新任務", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703827893521, "parent": 0, "text": "新任務2", "start_date": "2023-12-28", "end_date": "2024-01-01", "duration": 4, "open": false }, { "id": 1703827939422, "parent": 0, "text": "新任務3", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703827939437, "parent": 0, "text": "新任務4", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828011400, "parent": 0, "text": "新任務5", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828078670, "parent": 1703827887099, "text": "新任務11", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828227843, "parent": "1703827887099", "text": "新任務22", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828235421, "parent": 0, "text": "新任務6666", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828242915, "parent": "1703828235421", "text": "新任務3333", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828653523, "parent": 0, "text": "新任務3", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828653528, "parent": "1703828653523", "text": "新任務33", "start_date": "2023-12-28", "end_date": "2023-12-29", "duration": 1, "open": false }, { "id": 1703828653529, "parent": "1703828653528", "text": "新任務333", "start_date": "2023-12-28", "end_date": "2023-12-30", "duration": 2, "open": false } ] // 新增任务link接口 [post] 示例url:/gantt/api/v1/linkAdd post 参数 { "userId":"123456", "source": "1704164550402", // 源id "target": "1704164550404", // 目标id "type": "2", // 自动生成 "id": 1704182087335 // 唯一id } // 删除link 示例url:/gantt/api/v1/linkDel [post] post 参数 { "userId":"123456", "id": 1704182087335 // 唯一id } // 获取link列表 示例url:/gantt/api/v1/linkList [get] 返回数据 [ { "userId":"123456", "source": "1704164550402", "target": "1704164550404", "type": "2", "id": 1704182087335 }, { "userId":"123456", "source": "1704164550405", "target": "1704164550406", "type": "2", "id": 1704182087336 }, { "userId":"123456", "source": "1704164550403", "target": "1704164550409", "type": "2", "id": 1704182087337 }, { "userId":"123456", "source": "1704164550403", "target": "1704164550407", "type": "3", "id": 1704182087338 }, { "source": "1704164550404", "target": "1704164550397", "type": "1", "id": 1704182087339 }, { "source": "1704164550397", "target": "1704164550408", "type": "2", "id": 1704182087340 }, { "source": "1704164550408", "target": "1704164550405", "type": "1", "id": 1704182087341 }, { "source": "1704164550405", "target": "1704164550409", "type": "2", "id": 1704182087342 } ] ```