Compare commits
	
		
			2 Commits
		
	
	
		
			e1b7b58210
			...
			1130a25608
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 1130a25608 | ||
| ace2b71073 | 
| @ -276,7 +276,11 @@ public class WfProcessController extends BaseController { | |||||||
|     public R detail(String procInsId, String taskId) { |     public R detail(String procInsId, String taskId) { | ||||||
|         return R.ok(processService.queryProcessDetail(procInsId, taskId)); |         return R.ok(processService.queryProcessDetail(procInsId, taskId)); | ||||||
|     } |     } | ||||||
| 
 |     /** | ||||||
|  |      * zqjia: 批量查询流程实例详情 | ||||||
|  |      * | ||||||
|  |      * @param procInsIds 流程实例ID列表 | ||||||
|  |      */ | ||||||
|     @PostMapping("/details") |     @PostMapping("/details") | ||||||
|     public TableDataInfo<WfDetailVo>  details(@RequestBody List<String> procInsIds) { |     public TableDataInfo<WfDetailVo>  details(@RequestBody List<String> procInsIds) { | ||||||
|         List<WfDetailVo> processDetails = new ArrayList<>(); |         List<WfDetailVo> processDetails = new ArrayList<>(); | ||||||
|  | |||||||
| @ -49,7 +49,7 @@ spring: | |||||||
|           driverClassName: com.mysql.cj.jdbc.Driver |           driverClassName: com.mysql.cj.jdbc.Driver | ||||||
|           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 |           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562 | ||||||
|           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) |           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题) | ||||||
|           url: jdbc:mysql://localhost:3306/ry-flowable-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true |           url: jdbc:mysql://192.168.31.120:3306/ry-flowable-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true | ||||||
|           username: root |           username: root | ||||||
|           password: jyzbyj306 |           password: jyzbyj306 | ||||||
|         # 从库数据源 |         # 从库数据源 | ||||||
|  | |||||||
| @ -1222,16 +1222,37 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | |||||||
|             WfDetailVo detailVo = queryProcessDetail(task.getProcInsId(), ""); |             WfDetailVo detailVo = queryProcessDetail(task.getProcInsId(), ""); | ||||||
|             // 获取表单列表 |             // 获取表单列表 | ||||||
|             List<FormConf> processFormList = detailVo.getProcessFormList(); |             List<FormConf> processFormList = detailVo.getProcessFormList(); | ||||||
|             // 获取项目名字 | 
 | ||||||
|  |             // 这里获得是流程信息的Title名字, 但是不同的流程可能的Title的字段名可能不一样,可能是一个数组 | ||||||
|  |             // 并按照逗号进行分隔 | ||||||
|  |             // @author zhanli 2024/07/31 | ||||||
|             if(pageQuery.getDetailTitleName() != null){ |             if(pageQuery.getDetailTitleName() != null){ | ||||||
|                 String res = getFormData(processFormList, pageQuery.getDetailTitleName(), pageQuery); |                 // getDetailTitleName可能是一个数组,先进行分割 | ||||||
|                 taskVo.setProcessTitle(res); |                 String[] queryTitleList = pageQuery.getDetailTitleName().split(","); | ||||||
|  |                 // 遍历结果数组, 依次请求流程的中字段的关键信息,如果查询不为空就返回 | ||||||
|  |                 for (String queryTitle : queryTitleList) { | ||||||
|  |                     String res = getFormData(processFormList, queryTitle, pageQuery); | ||||||
|  |                     if(!res.equals("")){ | ||||||
|  |                         taskVo.setProcessTitle(res); | ||||||
|  |                         break; | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|  | 
 | ||||||
|             // 获取项目负责人名字 |             // 获取项目负责人名字 | ||||||
|             if(pageQuery.getDetailDirectorName() != null){ |             if(pageQuery.getDetailDirectorName() != null){ | ||||||
|                 String director = getFormData(processFormList, pageQuery.getDetailDirectorName(), pageQuery); |                 String[] queryTitleList = pageQuery.getDetailDirectorName().split(","); | ||||||
|                 taskVo.setDirector(director); |                 // 遍历结果数组, 依次请求流程的中字段的关键信息,如果查询不为空就返回 | ||||||
|  |                 for (String queryTitle : queryTitleList) { | ||||||
|  |                     String res = getFormData(processFormList, queryTitle, pageQuery); | ||||||
|  |                     if(!res.equals("")){ | ||||||
|  |                         taskVo.setDirector(res); | ||||||
|  |                         break; | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|             targetList.add(taskVo); |             targetList.add(taskVo); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
| @ -1272,4 +1293,6 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce | |||||||
|         } |         } | ||||||
|         return ""; |         return ""; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -84,9 +84,17 @@ public class WfTaskServiceImpl extends FlowServiceFactory implements IWfTaskServ | |||||||
|                 // 获取模型信息 |                 // 获取模型信息 | ||||||
|                 String localScopeValue = ModelUtils.getUserTaskAttributeValue(bpmnModel, task.getTaskDefinitionKey(), ProcessConstants.PROCESS_FORM_LOCAL_SCOPE); |                 String localScopeValue = ModelUtils.getUserTaskAttributeValue(bpmnModel, task.getTaskDefinitionKey(), ProcessConstants.PROCESS_FORM_LOCAL_SCOPE); | ||||||
|                 boolean localScope = Convert.toBool(localScopeValue, false); |                 boolean localScope = Convert.toBool(localScopeValue, false); | ||||||
|                 taskService.complete(taskBo.getTaskId(), taskBo.getVariables(), localScope); |                 Map<String, Object> mapTmp = taskBo.getVariables(); | ||||||
|  |                 mapTmp.put("review", "1"); | ||||||
|  |                 if (!StringUtils.isNotBlank(taskBo.getNextUserIds())) { | ||||||
|  |                     taskService.complete(taskBo.getTaskId(), mapTmp, localScope); | ||||||
|  |                 } | ||||||
|             } else { |             } else { | ||||||
|                 taskService.complete(taskBo.getTaskId()); |                 Map<String, Object> mapTmp = new HashMap<>(); | ||||||
|  |                 mapTmp.put("review", "1"); | ||||||
|  |                 if (!StringUtils.isNotBlank(taskBo.getNextUserIds())) { | ||||||
|  |                     taskService.complete(taskBo.getTaskId(), mapTmp); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         // 设置任务节点名称 |         // 设置任务节点名称 | ||||||
|  | |||||||
| @ -50,4 +50,11 @@ export function confirmFundsReceived(data) { | |||||||
|     method: 'post', |     method: 'post', | ||||||
|     data: data |     data: data | ||||||
|   }) |   }) | ||||||
|  | } | ||||||
|  | // 查询已申报项目
 | ||||||
|  | export function listDeclaredApplications() { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/application/declared', | ||||||
|  |     method: 'get' | ||||||
|  |   }) | ||||||
| } | } | ||||||
							
								
								
									
										44
									
								
								ruoyi-ui/src/api/scientific/department.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								ruoyi-ui/src/api/scientific/department.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,44 @@ | |||||||
|  | import request from '@/utils/request' | ||||||
|  | 
 | ||||||
|  | // 查询department列表
 | ||||||
|  | export function listDepartment(query) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/department/list', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 查询department详细
 | ||||||
|  | export function getDepartment(departmentId) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/department/' + departmentId, | ||||||
|  |     method: 'get' | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 新增department
 | ||||||
|  | export function addDepartment(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/department', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 修改department
 | ||||||
|  | export function updateDepartment(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/department', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 删除department
 | ||||||
|  | export function delDepartment(departmentId) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/department/' + departmentId, | ||||||
|  |     method: 'delete' | ||||||
|  |   }) | ||||||
|  | } | ||||||
| @ -1,6 +1,6 @@ | |||||||
| import request from '@/utils/request' | import request from '@/utils/request' | ||||||
| 
 | 
 | ||||||
| // 查询项目申报v2列表
 | // 查询项目申报指南列表
 | ||||||
| export function listHandbook(query) { | export function listHandbook(query) { | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/scientific/handbook/list', |     url: '/scientific/handbook/list', | ||||||
| @ -9,7 +9,7 @@ export function listHandbook(query) { | |||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 查询项目申报v2详细
 | // 查询项目申报指南详细
 | ||||||
| export function getHandbook(handbookId) { | export function getHandbook(handbookId) { | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/scientific/handbook/' + handbookId, |     url: '/scientific/handbook/' + handbookId, | ||||||
| @ -17,7 +17,7 @@ export function getHandbook(handbookId) { | |||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 新增项目申报v2
 | // 新增项目申报指南
 | ||||||
| export function addHandbook(data) { | export function addHandbook(data) { | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/scientific/handbook', |     url: '/scientific/handbook', | ||||||
| @ -26,7 +26,7 @@ export function addHandbook(data) { | |||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 修改项目申报v2
 | // 修改项目申报指南
 | ||||||
| export function updateHandbook(data) { | export function updateHandbook(data) { | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/scientific/handbook', |     url: '/scientific/handbook', | ||||||
| @ -35,7 +35,7 @@ export function updateHandbook(data) { | |||||||
|   }) |   }) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 删除项目申报v2
 | // 删除项目申报指南
 | ||||||
| export function delHandbook(handbookId) { | export function delHandbook(handbookId) { | ||||||
|   return request({ |   return request({ | ||||||
|     url: '/scientific/handbook/' + handbookId, |     url: '/scientific/handbook/' + handbookId, | ||||||
|  | |||||||
							
								
								
									
										64
									
								
								ruoyi-ui/src/api/scientific/project_application_plan.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								ruoyi-ui/src/api/scientific/project_application_plan.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,64 @@ | |||||||
|  | import request from '@/utils/request' | ||||||
|  | 
 | ||||||
|  | // 查询项目申报v2列表
 | ||||||
|  | export function listPlan(query) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/plan/list', | ||||||
|  |     method: 'get', | ||||||
|  |     params: query | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 查询项目申报v2详细
 | ||||||
|  | export function getPlan(handbookId) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/plan/' + handbookId, | ||||||
|  |     method: 'get' | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 新增项目申报v2
 | ||||||
|  | export function addPlan(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/plan', | ||||||
|  |     method: 'post', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 修改项目申报v2
 | ||||||
|  | export function updatePlan(data) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/plan', | ||||||
|  |     method: 'put', | ||||||
|  |     data: data | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 删除项目申报计划
 | ||||||
|  | export function delPlan(planId) { | ||||||
|  |   return request({ | ||||||
|  |     url: '/scientific/plan/' + planId, | ||||||
|  |     method: 'delete' | ||||||
|  |   }) | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | // 封装寻找最新 表单 的函数,返回 Promise
 | ||||||
|  | export function findLatestDeploymentTimeIndex(response) { | ||||||
|  |   return new Promise((resolve, reject) => { | ||||||
|  |     let latestIndex = 0; | ||||||
|  |     let latestTime = new Date(response.rows[0].deploymentTime); | ||||||
|  | 
 | ||||||
|  |     response.rows.forEach((row, index) => { | ||||||
|  |       const currentTime = new Date(row.deploymentTime); | ||||||
|  | 
 | ||||||
|  |       if (currentTime > latestTime) { | ||||||
|  |         latestTime = currentTime; | ||||||
|  |         latestIndex = index; | ||||||
|  |       } | ||||||
|  |     }); | ||||||
|  | 
 | ||||||
|  |     // 返回最新的索引
 | ||||||
|  |     resolve(latestIndex); | ||||||
|  |   }); | ||||||
|  | } | ||||||
| @ -206,28 +206,179 @@ export const dynamicRoutes = [ | |||||||
|         component: () => import('@/views/workflow/work/proj_update'), |         component: () => import('@/views/workflow/work/proj_update'), | ||||||
|         name: 'ProjectInfoUpdate', |         name: 'ProjectInfoUpdate', | ||||||
|         meta: { title: '项目信息变更', icon: ''} |         meta: { title: '项目信息变更', icon: ''} | ||||||
|  |       }, | ||||||
|  |       // logzhan:这里用于项目的申报
 | ||||||
|  |       { | ||||||
|  |         path: 'declare_details/:deployId([\\w|\\-]+)', | ||||||
|  |         component: () => import('@/views/workflow/work/declare_details'), | ||||||
|  |         name: 'ProjecDeclareInfo', | ||||||
|  |         meta: { title: '项目信息申报', icon: ''} | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         path: 'proj_app/:deployId([\\w|\\-]+)', | ||||||
|  |         component: () => import('@/views/workflow/work/proj_app'), | ||||||
|  |         name: 'ProjectInfoApp', | ||||||
|  |         meta: { title: '项目立项', icon: ''} | ||||||
|       } |       } | ||||||
|     ] |     ] | ||||||
|   }, |   }, | ||||||
|  |   // zqjia:用三级路由会出问题,就通过这种形式区分不同模块吧
 | ||||||
|  |   // 申报计划路由
 | ||||||
|   { |   { | ||||||
|     path: '/scientific', |     path: '/scientific/project_application_plan', | ||||||
|     component: Layout, |     component: Layout, | ||||||
|     hidden: true, |     hidden: true, | ||||||
|     permissions: ['scientific:projectApply'], |     permissions: ['scientific:plan'], | ||||||
|     children: [ |     children: [ | ||||||
|  |       // zqjia:这个路由是菜单管理里的起作用
 | ||||||
|  |       // {
 | ||||||
|  |       //   path: 'list',
 | ||||||
|  |       //   component: () => import('@/views/scientific/project_application_plan/index'),
 | ||||||
|  |       //   name: 'planList',
 | ||||||
|  |       //   meta: { title: '项目申报计划', icon: '' }
 | ||||||
|  |       // },
 | ||||||
|       { |       { | ||||||
|         path: 'projectApply/:deployId([\\w|\\-]+)', |         path: 'detail/:planProcId([\\w|\\-]+)', | ||||||
|         component: () => import('@/views/scientific/projectApply'), |         component: () => import('@/views/scientific/project_application_plan/detail'), | ||||||
|  |         name: 'planDetail', | ||||||
|  |         meta: { title: '申报计划详情' } | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         path: 'planApply', | ||||||
|  |         component: () => import('@/views/scientific/project_application_plan/planApply'), | ||||||
|  |         name: 'planApply', | ||||||
|  |         meta: { title: '项目申报', icon: '' } | ||||||
|  |       }, | ||||||
|  |     ] | ||||||
|  |   }, | ||||||
|  |   // 项目路由
 | ||||||
|  |   { | ||||||
|  |     path: '/scientific/project', | ||||||
|  |     component: Layout, | ||||||
|  |     hidden: true, | ||||||
|  |     permissions: ['scientific:project'], | ||||||
|  |     children: [ | ||||||
|  |       // zqjia:这个路由是菜单管理里的起作用
 | ||||||
|  |       // {
 | ||||||
|  |       //   path: 'list',
 | ||||||
|  |       //   component: () => import('@/views/scientific/project/index'),
 | ||||||
|  |       //   name: 'projectList',
 | ||||||
|  |       //   meta: { title: '项目', icon: '' }
 | ||||||
|  |       // },
 | ||||||
|  |       // zqjia:项目详情还没写
 | ||||||
|  |       { | ||||||
|  |         path: 'detail/:planProcId([\\w|\\-]+)', | ||||||
|  |         component: () => import('@/views/scientific/project_application_plan/detail'), | ||||||
|  |         name: 'planDetail', | ||||||
|  |         meta: { title: '申报计划详情' } | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         path: 'planProjectQuery/:planId([\\w|\\-]+)', | ||||||
|  |         // permissions: ['scientific:application:list'],
 | ||||||
|  |         component: () => import('@/views/scientific/project/index'), | ||||||
|  |         name: 'planProjectQuery', | ||||||
|  |         meta: { title: '已申报项目' } | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         path: 'projectApply', | ||||||
|  |         component: () => import('@/views/scientific/project/projectApply'), | ||||||
|         name: 'ProjectApply', |         name: 'ProjectApply', | ||||||
|         meta: { title: '项目申报', icon: '' } |         meta: { title: '项目申报', icon: '' } | ||||||
|       }, |       }, | ||||||
|  |     ] | ||||||
|  |   }, | ||||||
|  |   // 指南路由
 | ||||||
|  |   { | ||||||
|  |     path: '/scientific/handbook', | ||||||
|  |     component: Layout, | ||||||
|  |     hidden: true, | ||||||
|  |     permissions: ['scientific:handbook'], | ||||||
|  |     children: [ | ||||||
|  |       // zqjia:这个路由是菜单管理里的起作用
 | ||||||
|  |       // {
 | ||||||
|  |       //   path: 'list',
 | ||||||
|  |       //   component: () => import('@/views/scientific/project/index'),
 | ||||||
|  |       //   name: 'projectList',
 | ||||||
|  |       //   meta: { title: '项目', icon: '' }
 | ||||||
|  |       // },
 | ||||||
|  |       // zqjia:项目详情还没写
 | ||||||
|       { |       { | ||||||
|         path: 'handbookProjectQuery/:handbookId([\\w|\\-]+)', |         path: 'detail/:planProcId([\\w|\\-]+)', | ||||||
|         component: () => import('@/views/scientific/handbookProject_query'), |         component: () => import('@/views/scientific/handbook/detail'), | ||||||
|         name: 'handbookProjectQuery', |         name: 'handbookDetail', | ||||||
|         meta: { title: '已申报项目' } |         meta: { title: '申报计划详情' } | ||||||
|         // meta: { title: '已申报项目', activeMenu: '/work/own' }
 |       }, | ||||||
|       } |       // {
 | ||||||
|  |       //   path: 'planProjectQuery/:planId([\\w|\\-]+)',
 | ||||||
|  |       //   // permissions: ['scientific:application:list'],
 | ||||||
|  |       //   component: () => import('@/views/scientific/project/index'),
 | ||||||
|  |       //   name: 'planProjectQuery',
 | ||||||
|  |       //   meta: { title: '已申报项目' }
 | ||||||
|  |       // },
 | ||||||
|  |       // {
 | ||||||
|  |       //   path: 'projectApply/:deployId([\\w|\\-]+)',
 | ||||||
|  |       //   component: () => import('@/views/scientific/project/projectApply.vue'),
 | ||||||
|  |       //   name: 'ProjectApply',
 | ||||||
|  |       //   meta: { title: '项目申报', icon: '' }
 | ||||||
|  |       // },
 | ||||||
|  |     ] | ||||||
|  |   }, | ||||||
|  |   // // 申报路由
 | ||||||
|  |   // {
 | ||||||
|  |   //   path: '/project/application',
 | ||||||
|  |   //   component: Layout,
 | ||||||
|  |   //   hidden: true,
 | ||||||
|  |   //   //permissions: ['scientific:handbook'],
 | ||||||
|  |   //   children: [
 | ||||||
|  |   //     // zqjia:这个路由是菜单管理里的起作用
 | ||||||
|  |   //     // {
 | ||||||
|  |   //     //   path: 'list',
 | ||||||
|  |   //     //   component: () => import('@/views/scientific/project/index'),
 | ||||||
|  |   //     //   name: 'projectList',
 | ||||||
|  |   //     //   meta: { title: '项目', icon: '' }
 | ||||||
|  |   //     // },
 | ||||||
|  |   //     // zqjia:项目详情还没写
 | ||||||
|  |   //     {
 | ||||||
|  |   //       path: 'detail/:planProcId([\\w|\\-]+)',
 | ||||||
|  |   //       component: () => import('@/views/scientific/handbook/detail'),
 | ||||||
|  |   //       name: 'handbookDetail',
 | ||||||
|  |   //       meta: { title: '申报计划详情' }
 | ||||||
|  |   //     },
 | ||||||
|  |   //   ]
 | ||||||
|  |   // },
 | ||||||
|  | 
 | ||||||
|  |   // 合作单位路由
 | ||||||
|  |   { | ||||||
|  |     path: '/scientific/department', | ||||||
|  |     component: Layout, | ||||||
|  |     hidden: true, | ||||||
|  |     permissions: ['scientific:department'], | ||||||
|  |     children: [ | ||||||
|  |       { | ||||||
|  |         path: 'list', | ||||||
|  |         component: () => import('@/views/scientific/department/index'), | ||||||
|  |         name: 'departmentList', | ||||||
|  |         meta: { title: '合作单位列表', icon: '' } | ||||||
|  |       }, | ||||||
|  |       { | ||||||
|  |         path: 'detail/:departmentProcId([\\w|\\-]+)', | ||||||
|  |         component: () => import('@/views/scientific/department/detail'), | ||||||
|  |         name: 'departmentDetail', | ||||||
|  |         meta: { title: '合作单位详情' } | ||||||
|  |       }, | ||||||
|  |       // {
 | ||||||
|  |       //   path: 'planProjectQuery/:planId([\\w|\\-]+)',
 | ||||||
|  |       //   // permissions: ['scientific:application:list'],
 | ||||||
|  |       //   component: () => import('@/views/scientific/project/index'),
 | ||||||
|  |       //   name: 'planProjectQuery',
 | ||||||
|  |       //   meta: { title: '已申报项目' }
 | ||||||
|  |       // },
 | ||||||
|  |       { | ||||||
|  |         path: 'departmentApply', | ||||||
|  |         component: () => import('@/views/scientific/department/departmentApply'), | ||||||
|  |         name: 'departmentApply', | ||||||
|  |         meta: { title: '合作单位录入', icon: '' } | ||||||
|  |       }, | ||||||
|     ] |     ] | ||||||
|   }, |   }, | ||||||
| ] | ] | ||||||
|  | |||||||
| @ -143,36 +143,33 @@ | |||||||
|        |        | ||||||
|       <el-table-column label="项目预算(万)" align="center" prop="projectBudget" :min-width="180" width="180"/> |       <el-table-column label="项目预算(万)" align="center" prop="projectBudget" :min-width="180" width="180"/> | ||||||
|       <el-table-column label="负责人电话" align="center" prop="projectLeaderPhone" :min-width="150" width="150"/> |       <el-table-column label="负责人电话" align="center" prop="projectLeaderPhone" :min-width="150" width="150"/> | ||||||
|       <el-table-column label="操作" align="center" :min-width="280" width="280"> |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" :min-width="240"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope" > | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="primary" | ||||||
|             icon="el-icon-top" |             icon="el-icon-top" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="declareProject(scope.row)" | ||||||
|             v-hasPermi="['project:application:remove']" |             v-hasPermi="['project:application:remove']" | ||||||
|           >申报项目</el-button> |             style="width: 80px" | ||||||
|  |           >提交申报</el-button> | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="success" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="handleUpdate(scope.row)" | ||||||
|             v-hasPermi="['scientific:application:edit']" |             v-hasPermi="['scientific:application:edit']" | ||||||
|  |             style="width: 80px" | ||||||
|           >信息修改</el-button> |           >信息修改</el-button> | ||||||
|           <el-button |           <el-button  | ||||||
|             size="mini" |             type="danger"  | ||||||
|             type="text" |  | ||||||
|             icon="el-icon-edit" |  | ||||||
|             @click="handleUpdateBudget(scope.row)" |  | ||||||
|             v-hasPermi="['scientific:application:edit']" |  | ||||||
|           >预算追加</el-button> |  | ||||||
|           <el-button |  | ||||||
|             size="mini" |  | ||||||
|             type="text" |  | ||||||
|             icon="el-icon-delete" |             icon="el-icon-delete" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handleDelete(scope.row)"  | ||||||
|  |             size="mini" | ||||||
|  |             style="width: 80px" | ||||||
|             v-hasPermi="['scientific:application:remove']" |             v-hasPermi="['scientific:application:remove']" | ||||||
|           >删除</el-button> |           >删除申报</el-button> | ||||||
|  |            | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|     </el-table> |     </el-table> | ||||||
| @ -279,6 +276,13 @@ export default { | |||||||
|         processName: "项目预算追加表", |         processName: "项目预算追加表", | ||||||
|         category: "001" |         category: "001" | ||||||
|       }, |       }, | ||||||
|  |       queryDeclareProcParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "项目申报审核", | ||||||
|  |         category: "002" | ||||||
|  |       }, | ||||||
|       // 表单参数 |       // 表单参数 | ||||||
|       form: {}, |       form: {}, | ||||||
|       // 表单校验 |       // 表单校验 | ||||||
| @ -390,7 +394,23 @@ export default { | |||||||
|      * 根据填写的项目信息进行申报  |      * 根据填写的项目信息进行申报  | ||||||
|      */ |      */ | ||||||
|     declareProject(row){ |     declareProject(row){ | ||||||
|  |       // 获取申报项目的Id | ||||||
|  |       const upProjectId = row.projectId || this.ids | ||||||
| 
 | 
 | ||||||
|  |       // 查询项目申报流程 | ||||||
|  |       listProcess(this.queryDeclareProcParams).then(response => { | ||||||
|  |         this.processParams = response.rows[0]; | ||||||
|  |         this.deploymentId = this.processParams.deploymentId; | ||||||
|  |         this.definitionId = this.processParams.definitionId; | ||||||
|  |         // 流程名称暂时没有太大作用 | ||||||
|  |         // this.processName = this.processParams.processName; | ||||||
|  |         this.$router.push({ | ||||||
|  |           path: `/workflow/process/declare_details/${this.deploymentId}?definitionId=${this.definitionId}`, | ||||||
|  |           query: { | ||||||
|  |             projectId: upProjectId | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|     }, |     }, | ||||||
|     /** 修改按钮操作 */ |     /** 修改按钮操作 */ | ||||||
|     handleUpdateBudget(row) { |     handleUpdateBudget(row) { | ||||||
| @ -492,11 +512,13 @@ export default { | |||||||
|     formatProjectDeclareStatus(cellValue) { |     formatProjectDeclareStatus(cellValue) { | ||||||
|       switch (cellValue) { |       switch (cellValue) { | ||||||
|         case '0': |         case '0': | ||||||
|           return "草稿"; |           return "未审核"; | ||||||
|         case '1': |         case '1': | ||||||
|           return "审核中"; |           return "审核中"; | ||||||
|         case '2': |         case '2': | ||||||
|           return "申报通过"; |           return "审核失败"; | ||||||
|  |         case '3': | ||||||
|  |           return "审核通过"; | ||||||
|         default: |         default: | ||||||
|           return "未知状态"; |           return "未知状态"; | ||||||
|       } |       } | ||||||
|  | |||||||
| @ -121,12 +121,8 @@ | |||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
| 
 | 
 | ||||||
|       <el-table-column label="项目负责人" align="center" prop="projectLeader" width="100"/> |       <el-table-column label="项目负责人" align="center" prop="projectLeader" width="100"/>  | ||||||
|       <el-table-column label="申报状态" align="center" width="100px" :min-width="100"> | 
 | ||||||
|         <template slot-scope="scope"> |  | ||||||
|           <el-tag size="medium">{{ formatProjectDeclareStatus(scope.row.projectDeclareStatus) }}</el-tag> |  | ||||||
|         </template> |  | ||||||
|       </el-table-column> |  | ||||||
|       <el-table-column label="立项状态" align="center" width="100px" :min-width="100"> |       <el-table-column label="立项状态" align="center" width="100px" :min-width="100"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-tag size="medium">{{ formatProjectAppStatus(scope.row.projectAppStaus) }}</el-tag> |           <el-tag size="medium">{{ formatProjectAppStatus(scope.row.projectAppStaus) }}</el-tag> | ||||||
| @ -148,20 +144,6 @@ | |||||||
|       <el-table-column label="负责人电话" align="center" prop="projectLeaderPhone" :min-width="150" width="150"/> |       <el-table-column label="负责人电话" align="center" prop="projectLeaderPhone" :min-width="150" width="150"/> | ||||||
|       <el-table-column label="操作" align="center" :min-width="280" width="280"> |       <el-table-column label="操作" align="center" :min-width="280" width="280"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-button |  | ||||||
|             size="mini" |  | ||||||
|             type="text" |  | ||||||
|             icon="el-icon-top" |  | ||||||
|             @click="handleUpdate(scope.row)" |  | ||||||
|             v-hasPermi="['project:application:remove']" |  | ||||||
|           >申请立项</el-button> |  | ||||||
|           <el-button |  | ||||||
|             size="mini" |  | ||||||
|             type="text" |  | ||||||
|             icon="el-icon-edit" |  | ||||||
|             @click="handleUpdate(scope.row)" |  | ||||||
|             v-hasPermi="['scientific:application:edit']" |  | ||||||
|           >信息修改</el-button> |  | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
| @ -169,13 +151,13 @@ | |||||||
|             @click="handleUpdateBudget(scope.row)" |             @click="handleUpdateBudget(scope.row)" | ||||||
|             v-hasPermi="['scientific:application:edit']" |             v-hasPermi="['scientific:application:edit']" | ||||||
|           >预算追加</el-button> |           >预算追加</el-button> | ||||||
|           <el-button |           <!-- <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-delete" |             icon="el-icon-delete" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handleDelete(scope.row)" | ||||||
|             v-hasPermi="['scientific:application:remove']" |             v-hasPermi="['scientific:application:remove']" | ||||||
|           >删除</el-button> |           >删除</el-button> --> | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|     </el-table> |     </el-table> | ||||||
| @ -328,7 +310,7 @@ export default { | |||||||
|     getList() { |     getList() { | ||||||
|       this.loading = true; |       this.loading = true; | ||||||
|       listApplication(this.queryParams).then(response => { |       listApplication(this.queryParams).then(response => { | ||||||
|         this.applicationList = response.rows; |         this.applicationList = response.rows.filter(item => item.projectAppStaus === '3') | ||||||
|         this.total = response.total; |         this.total = response.total; | ||||||
|         this.loading = false; |         this.loading = false; | ||||||
|       }); |       }); | ||||||
| @ -388,6 +370,12 @@ export default { | |||||||
|         this.title = "修改项目申报"; |         this.title = "修改项目申报"; | ||||||
|         console.log(this.form) |         console.log(this.form) | ||||||
|       }); |       }); | ||||||
|  |     }, | ||||||
|  |     /** | ||||||
|  |      * 根据填写的项目信息进行申报  | ||||||
|  |      */ | ||||||
|  |     declareProject(row){ | ||||||
|  | 
 | ||||||
|     }, |     }, | ||||||
|     /** 修改按钮操作 */ |     /** 修改按钮操作 */ | ||||||
|     handleUpdateBudget(row) { |     handleUpdateBudget(row) { | ||||||
| @ -476,14 +464,16 @@ export default { | |||||||
|      * @returns {string} 转换后的字符串 |      * @returns {string} 转换后的字符串 | ||||||
|      * @author  zhanli |      * @author  zhanli | ||||||
|      */ |      */ | ||||||
|     formatProjectAppStatus(cellValue) { |     formatProjectDeclareStatus(cellValue) { | ||||||
|       switch (cellValue) { |       switch (cellValue) { | ||||||
|         case '0': |         case '0': | ||||||
|           return "未立项"; |           return "草稿"; | ||||||
|         case '1': |         case '1': | ||||||
|           return "审核中"; |           return "未申报"; | ||||||
|         case '2': |         case '2': | ||||||
|           return "已立项"; |           return "申报中"; | ||||||
|  |         case '3': | ||||||
|  |           return "已申报"; | ||||||
|         default: |         default: | ||||||
|           return "未知状态"; |           return "未知状态"; | ||||||
|       } |       } | ||||||
| @ -494,14 +484,16 @@ export default { | |||||||
|      * @returns {string} 转换后的字符串 |      * @returns {string} 转换后的字符串 | ||||||
|      * @author  zhanli |      * @author  zhanli | ||||||
|      */ |      */ | ||||||
|     formatProjectDeclareStatus(cellValue) { |     formatProjectAppStatus(cellValue) { | ||||||
|       switch (cellValue) { |       switch (cellValue) { | ||||||
|         case '0': |         case '0': | ||||||
|           return "未申报"; |           return "草稿"; | ||||||
|         case '1': |         case '1': | ||||||
|           return "审核中"; |           return "未立项"; | ||||||
|         case '2': |         case '2': | ||||||
|           return "申报通过"; |           return "立项中"; | ||||||
|  |         case '3': | ||||||
|  |           return "已立项"; | ||||||
|         default: |         default: | ||||||
|           return "未知状态"; |           return "未知状态"; | ||||||
|       } |       } | ||||||
|  | |||||||
							
								
								
									
										151
									
								
								ruoyi-ui/src/views/scientific/department/departmentApply.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										151
									
								
								ruoyi-ui/src/views/scientific/department/departmentApply.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,151 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-card class="box-card"> | ||||||
|  |       <div slot="header" class="clearfix"> | ||||||
|  |         <span>合作单位录入</span> | ||||||
|  |       </div> | ||||||
|  | 
 | ||||||
|  |       <el-col :span="18" :offset="3"> | ||||||
|  |         <div class="form-conf" v-if="formOpen"> | ||||||
|  |           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { listProcess, startProcess_ } from '@/api/workflow/process' | ||||||
|  | import { listAllCategory } from '@/api/workflow/category' | ||||||
|  | import { getProcessForm, startProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import {findLatestDeploymentTimeIndex } from '@/api/scientific/project_application_plan' | ||||||
|  | import { addHandbook } from '@/api/scientific/handbook' | ||||||
|  | import {addDepartment} from "@/api/scientific/department"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: 'departmentApply', | ||||||
|  |   components: { | ||||||
|  |     Parser | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       definitionId: null, | ||||||
|  |       deployId: null, | ||||||
|  |       procInsId: null, | ||||||
|  |       formOpen: false, | ||||||
|  |       formData: {}, | ||||||
|  | 
 | ||||||
|  |       processName: '', | ||||||
|  |       categoryOptions: [], | ||||||
|  |       // 流程定义表格数据 | ||||||
|  |       processParams: null, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "", | ||||||
|  |         category: "008" | ||||||
|  |       }, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       /** 查询流程定义列表 */ | ||||||
|  |       listProcess(this.queryParams).then(response => { | ||||||
|  |         findLatestDeploymentTimeIndex(response).then((latestIndex) => { | ||||||
|  |           this.processParams = response.rows[latestIndex]; | ||||||
|  |           this.processName = this.processParams.processName; | ||||||
|  |           this.definitionId = this.processParams.definitionId; | ||||||
|  |           getProcessForm({ | ||||||
|  |             definitionId: this.processParams.definitionId, | ||||||
|  |             deployId: this.processParams.deploymentId, | ||||||
|  |             procInsId: undefined | ||||||
|  |           }).then(res => { | ||||||
|  |             if (res.data) { | ||||||
|  |               this.formData = res.data; | ||||||
|  |               this.formOpen = true; | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submit(data) { | ||||||
|  |       if (data && this.definitionId) { | ||||||
|  |         console.log(data.valData) | ||||||
|  |         // 启动流程并将表单数据加入流程变量 | ||||||
|  |         startProcess_(this.definitionId, JSON.stringify(data.valData)).then(res => { | ||||||
|  |           if (res.code !== 200) { | ||||||
|  |             this.$modal.msgError("操作失败"); | ||||||
|  |             return; | ||||||
|  |           } | ||||||
|  |           let departmentData = data.valData; | ||||||
|  |           departmentData.departmentProcId = res.msg; | ||||||
|  |           // zqjia:默认刚录入指南时状态为审核中,但后端会改为未审核 | ||||||
|  |           departmentData.departmentStatus = 1; | ||||||
|  | 
 | ||||||
|  |           // zqjia:解析handbookFile,不然无法存到数据库中 | ||||||
|  |           const files = departmentData.departmentFile; | ||||||
|  | 
 | ||||||
|  |           if (files !== null && files !== undefined) { | ||||||
|  |             let formatedFiles = {}; | ||||||
|  |             files.forEach(file => { | ||||||
|  |               if(file.response.code === 200 && file.ossId) { | ||||||
|  |                 formatedFiles[file.name] = file.ossId; | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |             departmentData.departmentFile = JSON.stringify(formatedFiles); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           addDepartment(JSON.stringify(departmentData)).then(resp => { | ||||||
|  |             if (res.code !== 200) { | ||||||
|  |               this.$modal.msgError("操作失败"); | ||||||
|  |               return; | ||||||
|  |             } | ||||||
|  |             this.$modal.msgSuccess(resp.msg); | ||||||
|  |             this.$tab.closeOpenPage({ | ||||||
|  |               path: '/scientific/department/list' | ||||||
|  |             }) | ||||||
|  |           }); | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .form-conf { | ||||||
|  |   margin: 15px auto; | ||||||
|  |   width: 80%; | ||||||
|  |   padding: 15px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										476
									
								
								ruoyi-ui/src/views/scientific/department/detail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										476
									
								
								ruoyi-ui/src/views/scientific/department/detail.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,476 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-tabs tab-position="top" :value="processed === true ? 'approval' : 'form'"> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-tab-pane label="表单信息" name="form"> | ||||||
|  |         <div v-if="formOpen"> | ||||||
|  |           <el-card class="box-card" shadow="never" v-for="(formInfo, index) in processFormList" :key="index"> | ||||||
|  |             <div slot="header" class="clearfix"> | ||||||
|  |               <!--              <span>{{ formInfo.title }}</span>--> | ||||||
|  |               <span> 合作单位详情 </span> | ||||||
|  |             </div> | ||||||
|  | 
 | ||||||
|  |             <!--流程处理表单模块--> | ||||||
|  |             <el-col :span="20" :offset="2"> | ||||||
|  |               <parser :form-conf="formInfo"/> | ||||||
|  |             </el-col> | ||||||
|  |           </el-card> | ||||||
|  |         </div> | ||||||
|  |       </el-tab-pane > | ||||||
|  | 
 | ||||||
|  |     </el-tabs> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { detailProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { complete, delegate, transfer, rejectTask, returnList, returnTask } from '@/api/workflow/task' | ||||||
|  | import { selectUser, deptTreeSelect } from '@/api/system/user' | ||||||
|  | import ProcessViewer from '@/components/ProcessViewer' | ||||||
|  | import '@riophae/vue-treeselect/dist/vue-treeselect.css' | ||||||
|  | import Treeselect from '@riophae/vue-treeselect' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "WorkDetail", | ||||||
|  |   components: { | ||||||
|  |     ProcessViewer, | ||||||
|  |     Parser, | ||||||
|  |     Treeselect | ||||||
|  |   }, | ||||||
|  |   props: {}, | ||||||
|  |   computed: { | ||||||
|  |     commentType() { | ||||||
|  |       return val => { | ||||||
|  |         switch (val) { | ||||||
|  |           case '1': return '通过' | ||||||
|  |           case '2': return '退回' | ||||||
|  |           case '3': return '驳回' | ||||||
|  |           case '4': return '委派' | ||||||
|  |           case '5': return '转办' | ||||||
|  |           case '6': return '终止' | ||||||
|  |           case '7': return '撤回' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     approveTypeTag() { | ||||||
|  |       return val => { | ||||||
|  |         switch (val) { | ||||||
|  |           case '1': return 'success' | ||||||
|  |           case '2': return 'warning' | ||||||
|  |           case '3': return 'danger' | ||||||
|  |           case '4': return 'primary' | ||||||
|  |           case '5': return 'success' | ||||||
|  |           case '6': return 'danger' | ||||||
|  |           case '7': return 'info' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       height: document.documentElement.clientHeight - 205 + 'px;', | ||||||
|  |       // 模型xml数据 | ||||||
|  |       loadIndex: 0, | ||||||
|  |       xmlData: undefined, | ||||||
|  |       finishedInfo: { | ||||||
|  |         finishedSequenceFlowSet: [], | ||||||
|  |         finishedTaskSet: [], | ||||||
|  |         unfinishedTaskSet: [], | ||||||
|  |         rejectedTaskSet: [] | ||||||
|  |       }, | ||||||
|  |       historyProcNodeList: [], | ||||||
|  |       // 部门名称 | ||||||
|  |       deptName: undefined, | ||||||
|  |       // 部门树选项 | ||||||
|  |       deptOptions: undefined, | ||||||
|  |       userLoading: false, | ||||||
|  |       // 用户表格数据 | ||||||
|  |       userList: null, | ||||||
|  |       deptProps: { | ||||||
|  |         children: "children", | ||||||
|  |         label: "label" | ||||||
|  |       }, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         deptId: undefined | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       // 遮罩层 | ||||||
|  |       loading: true, | ||||||
|  |       taskForm:{ | ||||||
|  |         comment:"", // 意见内容 | ||||||
|  |         procInsId: "", // 流程实例编号 | ||||||
|  |         taskId: "" ,// 流程任务编号 | ||||||
|  |         copyUserIds: "", // 抄送人Id | ||||||
|  |         vars: "", | ||||||
|  |         targetKey:"" | ||||||
|  |       }, | ||||||
|  |       rules: { | ||||||
|  |         comment: [{ required: true, message: '请输入审批意见', trigger: 'blur' }], | ||||||
|  |       }, | ||||||
|  |       currentUserId: null, | ||||||
|  |       variables: [], // 流程变量数据 | ||||||
|  |       taskFormOpen: false, | ||||||
|  |       taskFormData: {}, // 流程变量数据 | ||||||
|  |       processFormList: [], // 流程变量数据 | ||||||
|  |       formOpen: false, // 是否加载流程变量数据 | ||||||
|  |       returnTaskList: [],  // 回退列表数据 | ||||||
|  |       processed: false, | ||||||
|  |       returnTitle: null, | ||||||
|  |       returnOpen: false, | ||||||
|  |       rejectOpen: false, | ||||||
|  |       rejectTitle: null, | ||||||
|  |       userData: { | ||||||
|  |         title: '', | ||||||
|  |         type: '', | ||||||
|  |         open: false, | ||||||
|  |       }, | ||||||
|  |       copyUser: [], | ||||||
|  |       nextUser: [], | ||||||
|  |       userMultipleSelection: [], | ||||||
|  |       userDialogTitle: '', | ||||||
|  |       userOpen: false | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       this.taskForm.procInsId = this.$route.params && this.$route.params.departmentProcId; | ||||||
|  |       this.taskForm.taskId  = this.$route.query && this.$route.query.taskId; | ||||||
|  |       this.processed = this.$route.query && eval(this.$route.query.processed || false); | ||||||
|  | 
 | ||||||
|  |       // 流程任务重获取变量表单 | ||||||
|  |       this.getProcessDetails(this.taskForm.procInsId, this.taskForm.taskId); | ||||||
|  |       this.loadIndex = this.taskForm.procInsId; | ||||||
|  |     }, | ||||||
|  |     /** 查询部门下拉树结构 */ | ||||||
|  |     getTreeSelect() { | ||||||
|  |       deptTreeSelect().then(response => { | ||||||
|  |         this.deptOptions = response.data; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 查询用户列表 */ | ||||||
|  |     getList() { | ||||||
|  |       this.userLoading = true; | ||||||
|  |       selectUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => { | ||||||
|  |         this.userList = response.rows; | ||||||
|  |         this.total = response.total; | ||||||
|  |         this.toggleSelection(this.userMultipleSelection); | ||||||
|  |         this.userLoading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     // 筛选节点 | ||||||
|  |     filterNode(value, data) { | ||||||
|  |       if (!value) return true; | ||||||
|  |       return data.label.indexOf(value) !== -1; | ||||||
|  |     }, | ||||||
|  |     // 节点单击事件 | ||||||
|  |     handleNodeClick(data) { | ||||||
|  |       this.queryParams.deptId = data.id; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     setIcon(val) { | ||||||
|  |       if (val) { | ||||||
|  |         return "el-icon-check"; | ||||||
|  |       } else { | ||||||
|  |         return "el-icon-time"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     setColor(val) { | ||||||
|  |       if (val) { | ||||||
|  |         return "#2bc418"; | ||||||
|  |       } else { | ||||||
|  |         return "#b3bdbb"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     // 多选框选中数据 | ||||||
|  |     handleSelectionChange(selection) { | ||||||
|  |       this.userMultipleSelection = selection | ||||||
|  |     }, | ||||||
|  |     toggleSelection(selection) { | ||||||
|  |       if (selection && selection.length > 0) { | ||||||
|  |         this.$nextTick(()=> { | ||||||
|  |           selection.forEach(item => { | ||||||
|  |             let row = this.userList.find(k => k.userId === item.userId); | ||||||
|  |             this.$refs.userTable.toggleRowSelection(row); | ||||||
|  |           }) | ||||||
|  |         }) | ||||||
|  |       } else { | ||||||
|  |         this.$nextTick(() => { | ||||||
|  |           this.$refs.userTable.clearSelection(); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     // 关闭标签 | ||||||
|  |     handleClose(type, tag) { | ||||||
|  |       let userObj = this.userMultipleSelection.find(item => item.userId === tag.id); | ||||||
|  |       this.userMultipleSelection.splice(this.userMultipleSelection.indexOf(userObj), 1); | ||||||
|  |       if (type === 'copy') { | ||||||
|  |         this.copyUser = this.userMultipleSelection; | ||||||
|  |         // 设置抄送人ID | ||||||
|  |         if (this.copyUser && this.copyUser.length > 0) { | ||||||
|  |           const val = this.copyUser.map(item => item.id); | ||||||
|  |           this.taskForm.copyUserIds = val instanceof Array ? val.join(',') : val; | ||||||
|  |         } else { | ||||||
|  |           this.taskForm.copyUserIds = ''; | ||||||
|  |         } | ||||||
|  |       } else if (type === 'next') { | ||||||
|  |         this.nextUser = this.userMultipleSelection; | ||||||
|  |         // 设置抄送人ID | ||||||
|  |         if (this.nextUser && this.nextUser.length > 0) { | ||||||
|  |           const val = this.nextUser.map(item => item.id); | ||||||
|  |           this.taskForm.nextUserIds = val instanceof Array ? val.join(',') : val; | ||||||
|  |         } else { | ||||||
|  |           this.taskForm.nextUserIds = ''; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     /** 流程变量赋值 */ | ||||||
|  |     handleCheckChange(val) { | ||||||
|  |       if (val instanceof Array) { | ||||||
|  |         this.taskForm.values = { | ||||||
|  |           "approval": val.join(',') | ||||||
|  |         } | ||||||
|  |       } else { | ||||||
|  |         this.taskForm.values = { | ||||||
|  |           "approval": val | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     getProcessDetails(procInsId, taskId) { | ||||||
|  |       const params = {procInsId: procInsId, taskId: taskId} | ||||||
|  |       detailProcess(params).then(res => { | ||||||
|  |         const data = res.data; | ||||||
|  |         this.xmlData = data.bpmnXml; | ||||||
|  |         this.processFormList = data.processFormList; | ||||||
|  |         this.taskFormOpen = data.existTaskForm; | ||||||
|  |         if (this.taskFormOpen) { | ||||||
|  |           this.taskFormData = data.taskFormData; | ||||||
|  |         } | ||||||
|  |         this.historyProcNodeList = data.historyProcNodeList; | ||||||
|  |         this.finishedInfo = data.flowViewer; | ||||||
|  |         this.formOpen = true; | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     onSelectCopyUsers() { | ||||||
|  |       this.userMultipleSelection = this.copyUser; | ||||||
|  |       this.onSelectUsers('添加抄送人', 'copy') | ||||||
|  |     }, | ||||||
|  |     onSelectNextUsers() { | ||||||
|  |       this.userMultipleSelection = this.nextUser; | ||||||
|  |       this.onSelectUsers('指定审批人', 'next') | ||||||
|  |     }, | ||||||
|  |     onSelectUsers(title, type) { | ||||||
|  |       this.userData.title = title; | ||||||
|  |       this.userData.type = type; | ||||||
|  |       this.getTreeSelect(); | ||||||
|  |       this.getList() | ||||||
|  |       this.userData.open = true; | ||||||
|  |     }, | ||||||
|  |     /** 通过任务 */ | ||||||
|  |     handleComplete() { | ||||||
|  |       // 校验表单 | ||||||
|  |       const taskFormRef = this.$refs.taskFormParser; | ||||||
|  |       const isExistTaskForm = taskFormRef !== undefined; | ||||||
|  |       // 若无任务表单,则 taskFormPromise 为 true,即不需要校验 | ||||||
|  |       const taskFormPromise = !isExistTaskForm ? true : new Promise((resolve, reject) => { | ||||||
|  |         taskFormRef.$refs[taskFormRef.formConfCopy.formRef].validate(valid => { | ||||||
|  |           valid ? resolve() : reject() | ||||||
|  |         }) | ||||||
|  |       }); | ||||||
|  |       const approvalPromise = new Promise((resolve, reject) => { | ||||||
|  |         this.$refs['taskForm'].validate(valid => { | ||||||
|  |           valid ? resolve() : reject() | ||||||
|  |         }) | ||||||
|  |       }); | ||||||
|  |       Promise.all([taskFormPromise, approvalPromise]).then(() => { | ||||||
|  |         if (isExistTaskForm) { | ||||||
|  |           this.taskForm.variables = taskFormRef[taskFormRef.formConfCopy.formModel] | ||||||
|  |         } | ||||||
|  |         complete(this.taskForm).then(response => { | ||||||
|  |           this.$modal.msgSuccess(response.msg); | ||||||
|  |           this.goBack(); | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 委派任务 */ | ||||||
|  |     handleDelegate() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.userData.type = 'delegate'; | ||||||
|  |           this.userData.title = '委派任务' | ||||||
|  |           this.userData.open = true; | ||||||
|  |           this.getTreeSelect(); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 转办任务 */ | ||||||
|  |     handleTransfer(){ | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.userData.type = 'transfer'; | ||||||
|  |           this.userData.title = '转办任务'; | ||||||
|  |           this.userData.open = true; | ||||||
|  |           this.getTreeSelect(); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 拒绝任务 */ | ||||||
|  |     handleReject() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           const _this = this; | ||||||
|  |           this.$modal.confirm('拒绝审批单流程会终止,是否继续?').then(function() { | ||||||
|  |             return rejectTask(_this.taskForm); | ||||||
|  |           }).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     changeCurrentUser(val) { | ||||||
|  |       this.currentUserId = val.userId | ||||||
|  |     }, | ||||||
|  |     /** 返回页面 */ | ||||||
|  |     goBack() { | ||||||
|  |       // 关闭当前标签页并返回上个页面 | ||||||
|  |       this.$tab.closePage(this.$route) | ||||||
|  |       this.$router.back() | ||||||
|  |     }, | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submitUserData() { | ||||||
|  |       let type = this.userData.type; | ||||||
|  |       if (type === 'copy' || type === 'next') { | ||||||
|  |         if (!this.userMultipleSelection || this.userMultipleSelection.length <= 0) { | ||||||
|  |           this.$modal.msgError("请选择用户"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         let userIds = this.userMultipleSelection.map(k => k.userId); | ||||||
|  |         if (type === 'copy') { | ||||||
|  |           // 设置抄送人ID信息 | ||||||
|  |           this.copyUser = this.userMultipleSelection; | ||||||
|  |           this.taskForm.copyUserIds = userIds instanceof Array ? userIds.join(',') : userIds; | ||||||
|  |         } else if (type === 'next') { | ||||||
|  |           // 设置下一级审批人ID信息 | ||||||
|  |           this.nextUser = this.userMultipleSelection; | ||||||
|  |           this.taskForm.nextUserIds = userIds instanceof Array ? userIds.join(',') : userIds; | ||||||
|  |         } | ||||||
|  |         this.userData.open = false; | ||||||
|  |       } else { | ||||||
|  |         if (!this.taskForm.comment) { | ||||||
|  |           this.$modal.msgError("请输入审批意见"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         if (!this.currentUserId) { | ||||||
|  |           this.$modal.msgError("请选择用户"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         this.taskForm.userId = this.currentUserId; | ||||||
|  |         if (type === 'delegate') { | ||||||
|  |           delegate(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |         if (type === 'transfer') { | ||||||
|  |           transfer(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 可退回任务列表 */ | ||||||
|  |     handleReturn() { | ||||||
|  |       this.$refs['taskForm'].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.returnTitle = "退回流程"; | ||||||
|  |           returnList(this.taskForm).then(res => { | ||||||
|  |             this.returnTaskList = res.data; | ||||||
|  |             this.taskForm.values = null; | ||||||
|  |             this.returnOpen = true; | ||||||
|  |           }) | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 提交退回任务 */ | ||||||
|  |     submitReturn() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           if (!this.taskForm.targetKey) { | ||||||
|  |             this.$modal.msgError("请选择退回节点!"); | ||||||
|  |           } | ||||||
|  |           returnTask(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack() | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .clearfix:before, | ||||||
|  | .clearfix:after { | ||||||
|  |   display: table; | ||||||
|  |   content: ""; | ||||||
|  | } | ||||||
|  | .clearfix:after { | ||||||
|  |   clear: both | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .box-card { | ||||||
|  |   width: 100%; | ||||||
|  |   margin-bottom: 20px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-tag + .el-tag { | ||||||
|  |   margin-left: 10px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-row { | ||||||
|  |   margin-bottom: 20px; | ||||||
|  |   &:last-child { | ||||||
|  |     margin-bottom: 0; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | .el-col { | ||||||
|  |   border-radius: 4px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .button-new-tag { | ||||||
|  |   margin-left: 10px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										377
									
								
								ruoyi-ui/src/views/scientific/department/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										377
									
								
								ruoyi-ui/src/views/scientific/department/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,377 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|  | 
 | ||||||
|  |       <el-form-item label="单位名称" prop="departmentName"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.departmentName" | ||||||
|  |           placeholder="请输入单位名称" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  | 
 | ||||||
|  |       <el-form-item label="单位性质" prop="departmentCategory"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.departmentCategory" | ||||||
|  |           placeholder="请输入单位性质" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="联系人" prop="departmentPerson"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.departmentPerson" | ||||||
|  |           placeholder="请输入单位联系人姓名" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  | 
 | ||||||
|  |       <el-form-item> | ||||||
|  |         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||||
|  |         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||||
|  |       </el-form-item> | ||||||
|  |     </el-form> | ||||||
|  | 
 | ||||||
|  |     <el-row :gutter="10" class="mb8"> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="primary" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-plus" | ||||||
|  |           size="mini" | ||||||
|  |           @click="handleAdd" | ||||||
|  |           v-hasPermi="['scientific:department:add']" | ||||||
|  |         >新增</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="success" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-edit" | ||||||
|  |           size="mini" | ||||||
|  |           :disabled="single" | ||||||
|  |           @click="handleUpdate" | ||||||
|  |           v-hasPermi="['scientific:department:edit']" | ||||||
|  |         >修改</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="danger" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-delete" | ||||||
|  |           size="mini" | ||||||
|  |           :disabled="multiple" | ||||||
|  |           @click="handleDelete" | ||||||
|  |           v-hasPermi="['scientific:department:remove']" | ||||||
|  |         >删除</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="warning" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-download" | ||||||
|  |           size="mini" | ||||||
|  |           @click="handleExport" | ||||||
|  |           v-hasPermi="['scientific:department:export']" | ||||||
|  |         >导出</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |     </el-row> | ||||||
|  | 
 | ||||||
|  |     <el-table v-loading="loading" :data="departmentList" @selection-change="handleSelectionChange"> | ||||||
|  |       <el-table-column type="selection" width="55" align="center" /> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="单位名称" align="center" prop="departmentName" /> | ||||||
|  |       <el-table-column label="单位地址" align="center" prop="departmentAddress" /> | ||||||
|  |       <el-table-column label="单位性质" align="center" prop="departmentCategory" :formatter="formatDepartmentCategory"/> | ||||||
|  |       <el-table-column label="单位联系人姓名" align="center" prop="departmentPerson" /> | ||||||
|  |       <el-table-column label="单位联系人电话" align="center" prop="departmentPhone" /> | ||||||
|  |       <el-table-column label="单位联系人邮件" align="center" prop="departmentEmail" /> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-button | ||||||
|  |             size="mini" | ||||||
|  |             type="text" | ||||||
|  |             icon="el-icon-edit" | ||||||
|  |             @click="handleDepartmentDetail(scope.row)" | ||||||
|  |             v-hasPermi="['scientific:department:list']" | ||||||
|  |           >详情</el-button> | ||||||
|  | 
 | ||||||
|  |           <el-button | ||||||
|  |             size="mini" | ||||||
|  |             type="text" | ||||||
|  |             icon="el-icon-delete" | ||||||
|  |             @click="handleDelete(scope.row)" | ||||||
|  |             v-hasPermi="['scientific:department:remove']" | ||||||
|  |           >删除</el-button> | ||||||
|  | 
 | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |     </el-table> | ||||||
|  | 
 | ||||||
|  |     <pagination | ||||||
|  |       v-show="total>0" | ||||||
|  |       :total="total" | ||||||
|  |       :page.sync="queryParams.pageNum" | ||||||
|  |       :limit.sync="queryParams.pageSize" | ||||||
|  |       @pagination="getList" | ||||||
|  |     /> | ||||||
|  | 
 | ||||||
|  |     <!-- 添加或修改department对话框 --> | ||||||
|  |     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||||||
|  |       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||||
|  |         <el-form-item label="单位名称" prop="departmentName"> | ||||||
|  |           <el-input v-model="form.departmentName" placeholder="请输入单位名称" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="单位地址" prop="departmentAddress"> | ||||||
|  |           <el-input v-model="form.departmentAddress" placeholder="请输入单位地址" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="单位性质,1企业,2科研机构,3高校" prop="departmentCategory"> | ||||||
|  |           <el-input v-model="form.departmentCategory" placeholder="请输入单位性质,1企业,2科研机构,3高校" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="单位联系人姓名" prop="departmentPerson"> | ||||||
|  |           <el-input v-model="form.departmentPerson" placeholder="请输入单位联系人姓名" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="单位联系人电话" prop="departmentPhone"> | ||||||
|  |           <el-input v-model="form.departmentPhone" placeholder="请输入单位联系人电话" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="单位联系人邮件" prop="departmentEmail"> | ||||||
|  |           <el-input v-model="form.departmentEmail" placeholder="请输入单位联系人邮件" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="相关文件" prop="departmentFile"> | ||||||
|  |           <file-upload v-model="form.departmentFile"/> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="其他备注信息" prop="departmentNote"> | ||||||
|  |           <el-input v-model="form.departmentNote" placeholder="请输入其他备注信息" /> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |       <div slot="footer" class="dialog-footer"> | ||||||
|  |         <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |         <el-button @click="cancel">取 消</el-button> | ||||||
|  |       </div> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { listDepartment, getDepartment, delDepartment, addDepartment, updateDepartment } from "@/api/scientific/department"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "Department", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       // 按钮loading | ||||||
|  |       buttonLoading: false, | ||||||
|  |       // 遮罩层 | ||||||
|  |       loading: true, | ||||||
|  |       // 选中数组 | ||||||
|  |       ids: [], | ||||||
|  |       // 非单个禁用 | ||||||
|  |       single: true, | ||||||
|  |       // 非多个禁用 | ||||||
|  |       multiple: true, | ||||||
|  |       // 显示搜索条件 | ||||||
|  |       showSearch: true, | ||||||
|  |       // 总条数 | ||||||
|  |       total: 0, | ||||||
|  |       // department表格数据 | ||||||
|  |       departmentList: [], | ||||||
|  |       // 弹出层标题 | ||||||
|  |       title: "", | ||||||
|  |       // 是否显示弹出层 | ||||||
|  |       open: false, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         departmentId: undefined, | ||||||
|  |         departmentName: undefined, | ||||||
|  |         departmentAddress: undefined, | ||||||
|  |         departmentCategory: undefined, | ||||||
|  |         departmentPerson: undefined, | ||||||
|  |         departmentPhone: undefined, | ||||||
|  |         departmentEmail: undefined, | ||||||
|  |         departmentFile: undefined, | ||||||
|  |         departmentNote: undefined, | ||||||
|  |         departmentStatus: '3', | ||||||
|  |       }, | ||||||
|  |       // 表单参数 | ||||||
|  |       form: {}, | ||||||
|  |       // 表单校验 | ||||||
|  |       rules: { | ||||||
|  |         departmentId: [ | ||||||
|  |           { required: true, message: "单位ID不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentName: [ | ||||||
|  |           { required: true, message: "单位名称不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentAddress: [ | ||||||
|  |           { required: true, message: "单位地址不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentCategory: [ | ||||||
|  |           { required: true, message: "单位性质,1企业,2科研机构,3高校不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentPerson: [ | ||||||
|  |           { required: true, message: "单位联系人姓名不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentPhone: [ | ||||||
|  |           { required: true, message: "单位联系人电话不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentEmail: [ | ||||||
|  |           { required: true, message: "单位联系人邮件不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentFile: [ | ||||||
|  |           { required: true, message: "相关文件不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         departmentNote: [ | ||||||
|  |           { required: true, message: "其他备注信息不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     /** 查询department列表 */ | ||||||
|  |     getList() { | ||||||
|  |       this.loading = true; | ||||||
|  |       listDepartment(this.queryParams).then(response => { | ||||||
|  |         this.departmentList = response.rows; | ||||||
|  |         this.total = response.total; | ||||||
|  |         this.loading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     // 取消按钮 | ||||||
|  |     cancel() { | ||||||
|  |       this.open = false; | ||||||
|  |       this.reset(); | ||||||
|  |     }, | ||||||
|  |     // 表单重置 | ||||||
|  |     reset() { | ||||||
|  |       this.form = { | ||||||
|  |         departmentId: undefined, | ||||||
|  |         departmentName: undefined, | ||||||
|  |         departmentAddress: undefined, | ||||||
|  |         departmentCategory: undefined, | ||||||
|  |         departmentPerson: undefined, | ||||||
|  |         departmentPhone: undefined, | ||||||
|  |         departmentEmail: undefined, | ||||||
|  |         departmentFile: undefined, | ||||||
|  |         departmentNote: undefined, | ||||||
|  |         createBy: undefined, | ||||||
|  |         createTime: undefined, | ||||||
|  |         updateBy: undefined, | ||||||
|  |         updateTime: undefined | ||||||
|  |       }; | ||||||
|  |       this.resetForm("form"); | ||||||
|  |     }, | ||||||
|  |     /** 搜索按钮操作 */ | ||||||
|  |     handleQuery() { | ||||||
|  |       this.queryParams.pageNum = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     /** 重置按钮操作 */ | ||||||
|  |     resetQuery() { | ||||||
|  |       this.resetForm("queryForm"); | ||||||
|  |       this.handleQuery(); | ||||||
|  |     }, | ||||||
|  |     // 多选框选中数据 | ||||||
|  |     handleSelectionChange(selection) { | ||||||
|  |       this.ids = selection.map(item => item.departmentId) | ||||||
|  |       this.single = selection.length!==1 | ||||||
|  |       this.multiple = !selection.length | ||||||
|  |     }, | ||||||
|  |     /** 新增按钮操作 */ | ||||||
|  |     handleAdd() { | ||||||
|  |       this.reset(); | ||||||
|  |       this.open = true; | ||||||
|  |       this.title = "添加department"; | ||||||
|  |     }, | ||||||
|  |     /** 修改按钮操作 */ | ||||||
|  |     handleUpdate(row) { | ||||||
|  |       this.loading = true; | ||||||
|  |       this.reset(); | ||||||
|  |       const departmentId = row.departmentId || this.ids | ||||||
|  |       getDepartment(departmentId).then(response => { | ||||||
|  |         this.loading = false; | ||||||
|  |         this.form = response.data; | ||||||
|  |         this.open = true; | ||||||
|  |         this.title = "修改department"; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 提交按钮 */ | ||||||
|  |     submitForm() { | ||||||
|  |       this.$refs["form"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.buttonLoading = true; | ||||||
|  |           if (this.form.departmentId != null) { | ||||||
|  |             updateDepartment(this.form).then(response => { | ||||||
|  |               this.$modal.msgSuccess("修改成功"); | ||||||
|  |               this.open = false; | ||||||
|  |               this.getList(); | ||||||
|  |             }).finally(() => { | ||||||
|  |               this.buttonLoading = false; | ||||||
|  |             }); | ||||||
|  |           } else { | ||||||
|  |             addDepartment(this.form).then(response => { | ||||||
|  |               this.$modal.msgSuccess("新增成功"); | ||||||
|  |               this.open = false; | ||||||
|  |               this.getList(); | ||||||
|  |             }).finally(() => { | ||||||
|  |               this.buttonLoading = false; | ||||||
|  |             }); | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 删除按钮操作 */ | ||||||
|  |     handleDelete(row) { | ||||||
|  |       const departmentIds = row.departmentId || this.ids; | ||||||
|  |       this.$modal.confirm('是否确认删除department编号为"' + departmentIds + '"的数据项?').then(() => { | ||||||
|  |         this.loading = true; | ||||||
|  |         return delDepartment(departmentIds); | ||||||
|  |       }).then(() => { | ||||||
|  |         this.loading = false; | ||||||
|  |         this.getList(); | ||||||
|  |         this.$modal.msgSuccess("删除成功"); | ||||||
|  |       }).catch(() => { | ||||||
|  |       }).finally(() => { | ||||||
|  |         this.loading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 导出按钮操作 */ | ||||||
|  |     handleExport() { | ||||||
|  |       this.download('scientific/department/export', { | ||||||
|  |         ...this.queryParams | ||||||
|  |       }, `department_${new Date().getTime()}.xlsx`) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     formatDepartmentCategory(row, column, cellValue) { | ||||||
|  |       switch (cellValue) { | ||||||
|  |         case '1': | ||||||
|  |           return '企业'; | ||||||
|  |         case '2': | ||||||
|  |           return '科研机构'; | ||||||
|  |         case '3': | ||||||
|  |           return '高校'; | ||||||
|  |         default: | ||||||
|  |           return '未知'; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     handleDepartmentDetail(row) { | ||||||
|  |       console.log(row); | ||||||
|  |       this.$router.push({ | ||||||
|  |         path: '/scientific/department/detail/' + row.departmentProcId, | ||||||
|  |         query: { | ||||||
|  |           processed: false, | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
							
								
								
									
										476
									
								
								ruoyi-ui/src/views/scientific/handbook/detail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										476
									
								
								ruoyi-ui/src/views/scientific/handbook/detail.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,476 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-tabs tab-position="top" :value="processed === true ? 'approval' : 'form'"> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-tab-pane label="表单信息" name="form"> | ||||||
|  |         <div v-if="formOpen"> | ||||||
|  |           <el-card class="box-card" shadow="never" v-for="(formInfo, index) in processFormList" :key="index"> | ||||||
|  |             <div slot="header" class="clearfix"> | ||||||
|  |               <!--              <span>{{ formInfo.title }}</span>--> | ||||||
|  |               <span> 指南详情 </span> | ||||||
|  |             </div> | ||||||
|  | 
 | ||||||
|  |             <!--流程处理表单模块--> | ||||||
|  |             <el-col :span="20" :offset="2"> | ||||||
|  |               <parser :form-conf="formInfo"/> | ||||||
|  |             </el-col> | ||||||
|  |           </el-card> | ||||||
|  |         </div> | ||||||
|  |       </el-tab-pane > | ||||||
|  | 
 | ||||||
|  |     </el-tabs> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { detailProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { complete, delegate, transfer, rejectTask, returnList, returnTask } from '@/api/workflow/task' | ||||||
|  | import { selectUser, deptTreeSelect } from '@/api/system/user' | ||||||
|  | import ProcessViewer from '@/components/ProcessViewer' | ||||||
|  | import '@riophae/vue-treeselect/dist/vue-treeselect.css' | ||||||
|  | import Treeselect from '@riophae/vue-treeselect' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "WorkDetail", | ||||||
|  |   components: { | ||||||
|  |     ProcessViewer, | ||||||
|  |     Parser, | ||||||
|  |     Treeselect | ||||||
|  |   }, | ||||||
|  |   props: {}, | ||||||
|  |   computed: { | ||||||
|  |     commentType() { | ||||||
|  |       return val => { | ||||||
|  |         switch (val) { | ||||||
|  |           case '1': return '通过' | ||||||
|  |           case '2': return '退回' | ||||||
|  |           case '3': return '驳回' | ||||||
|  |           case '4': return '委派' | ||||||
|  |           case '5': return '转办' | ||||||
|  |           case '6': return '终止' | ||||||
|  |           case '7': return '撤回' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     approveTypeTag() { | ||||||
|  |       return val => { | ||||||
|  |         switch (val) { | ||||||
|  |           case '1': return 'success' | ||||||
|  |           case '2': return 'warning' | ||||||
|  |           case '3': return 'danger' | ||||||
|  |           case '4': return 'primary' | ||||||
|  |           case '5': return 'success' | ||||||
|  |           case '6': return 'danger' | ||||||
|  |           case '7': return 'info' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       height: document.documentElement.clientHeight - 205 + 'px;', | ||||||
|  |       // 模型xml数据 | ||||||
|  |       loadIndex: 0, | ||||||
|  |       xmlData: undefined, | ||||||
|  |       finishedInfo: { | ||||||
|  |         finishedSequenceFlowSet: [], | ||||||
|  |         finishedTaskSet: [], | ||||||
|  |         unfinishedTaskSet: [], | ||||||
|  |         rejectedTaskSet: [] | ||||||
|  |       }, | ||||||
|  |       historyProcNodeList: [], | ||||||
|  |       // 部门名称 | ||||||
|  |       deptName: undefined, | ||||||
|  |       // 部门树选项 | ||||||
|  |       deptOptions: undefined, | ||||||
|  |       userLoading: false, | ||||||
|  |       // 用户表格数据 | ||||||
|  |       userList: null, | ||||||
|  |       deptProps: { | ||||||
|  |         children: "children", | ||||||
|  |         label: "label" | ||||||
|  |       }, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         deptId: undefined | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       // 遮罩层 | ||||||
|  |       loading: true, | ||||||
|  |       taskForm:{ | ||||||
|  |         comment:"", // 意见内容 | ||||||
|  |         procInsId: "", // 流程实例编号 | ||||||
|  |         taskId: "" ,// 流程任务编号 | ||||||
|  |         copyUserIds: "", // 抄送人Id | ||||||
|  |         vars: "", | ||||||
|  |         targetKey:"" | ||||||
|  |       }, | ||||||
|  |       rules: { | ||||||
|  |         comment: [{ required: true, message: '请输入审批意见', trigger: 'blur' }], | ||||||
|  |       }, | ||||||
|  |       currentUserId: null, | ||||||
|  |       variables: [], // 流程变量数据 | ||||||
|  |       taskFormOpen: false, | ||||||
|  |       taskFormData: {}, // 流程变量数据 | ||||||
|  |       processFormList: [], // 流程变量数据 | ||||||
|  |       formOpen: false, // 是否加载流程变量数据 | ||||||
|  |       returnTaskList: [],  // 回退列表数据 | ||||||
|  |       processed: false, | ||||||
|  |       returnTitle: null, | ||||||
|  |       returnOpen: false, | ||||||
|  |       rejectOpen: false, | ||||||
|  |       rejectTitle: null, | ||||||
|  |       userData: { | ||||||
|  |         title: '', | ||||||
|  |         type: '', | ||||||
|  |         open: false, | ||||||
|  |       }, | ||||||
|  |       copyUser: [], | ||||||
|  |       nextUser: [], | ||||||
|  |       userMultipleSelection: [], | ||||||
|  |       userDialogTitle: '', | ||||||
|  |       userOpen: false | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       this.taskForm.procInsId = this.$route.params && this.$route.params.planProcId; | ||||||
|  |       this.taskForm.taskId  = this.$route.query && this.$route.query.taskId; | ||||||
|  |       this.processed = this.$route.query && eval(this.$route.query.processed || false); | ||||||
|  | 
 | ||||||
|  |       // 流程任务重获取变量表单 | ||||||
|  |       this.getProcessDetails(this.taskForm.procInsId, this.taskForm.taskId); | ||||||
|  |       this.loadIndex = this.taskForm.procInsId; | ||||||
|  |     }, | ||||||
|  |     /** 查询部门下拉树结构 */ | ||||||
|  |     getTreeSelect() { | ||||||
|  |       deptTreeSelect().then(response => { | ||||||
|  |         this.deptOptions = response.data; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 查询用户列表 */ | ||||||
|  |     getList() { | ||||||
|  |       this.userLoading = true; | ||||||
|  |       selectUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => { | ||||||
|  |         this.userList = response.rows; | ||||||
|  |         this.total = response.total; | ||||||
|  |         this.toggleSelection(this.userMultipleSelection); | ||||||
|  |         this.userLoading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     // 筛选节点 | ||||||
|  |     filterNode(value, data) { | ||||||
|  |       if (!value) return true; | ||||||
|  |       return data.label.indexOf(value) !== -1; | ||||||
|  |     }, | ||||||
|  |     // 节点单击事件 | ||||||
|  |     handleNodeClick(data) { | ||||||
|  |       this.queryParams.deptId = data.id; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     setIcon(val) { | ||||||
|  |       if (val) { | ||||||
|  |         return "el-icon-check"; | ||||||
|  |       } else { | ||||||
|  |         return "el-icon-time"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     setColor(val) { | ||||||
|  |       if (val) { | ||||||
|  |         return "#2bc418"; | ||||||
|  |       } else { | ||||||
|  |         return "#b3bdbb"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     // 多选框选中数据 | ||||||
|  |     handleSelectionChange(selection) { | ||||||
|  |       this.userMultipleSelection = selection | ||||||
|  |     }, | ||||||
|  |     toggleSelection(selection) { | ||||||
|  |       if (selection && selection.length > 0) { | ||||||
|  |         this.$nextTick(()=> { | ||||||
|  |           selection.forEach(item => { | ||||||
|  |             let row = this.userList.find(k => k.userId === item.userId); | ||||||
|  |             this.$refs.userTable.toggleRowSelection(row); | ||||||
|  |           }) | ||||||
|  |         }) | ||||||
|  |       } else { | ||||||
|  |         this.$nextTick(() => { | ||||||
|  |           this.$refs.userTable.clearSelection(); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     // 关闭标签 | ||||||
|  |     handleClose(type, tag) { | ||||||
|  |       let userObj = this.userMultipleSelection.find(item => item.userId === tag.id); | ||||||
|  |       this.userMultipleSelection.splice(this.userMultipleSelection.indexOf(userObj), 1); | ||||||
|  |       if (type === 'copy') { | ||||||
|  |         this.copyUser = this.userMultipleSelection; | ||||||
|  |         // 设置抄送人ID | ||||||
|  |         if (this.copyUser && this.copyUser.length > 0) { | ||||||
|  |           const val = this.copyUser.map(item => item.id); | ||||||
|  |           this.taskForm.copyUserIds = val instanceof Array ? val.join(',') : val; | ||||||
|  |         } else { | ||||||
|  |           this.taskForm.copyUserIds = ''; | ||||||
|  |         } | ||||||
|  |       } else if (type === 'next') { | ||||||
|  |         this.nextUser = this.userMultipleSelection; | ||||||
|  |         // 设置抄送人ID | ||||||
|  |         if (this.nextUser && this.nextUser.length > 0) { | ||||||
|  |           const val = this.nextUser.map(item => item.id); | ||||||
|  |           this.taskForm.nextUserIds = val instanceof Array ? val.join(',') : val; | ||||||
|  |         } else { | ||||||
|  |           this.taskForm.nextUserIds = ''; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     /** 流程变量赋值 */ | ||||||
|  |     handleCheckChange(val) { | ||||||
|  |       if (val instanceof Array) { | ||||||
|  |         this.taskForm.values = { | ||||||
|  |           "approval": val.join(',') | ||||||
|  |         } | ||||||
|  |       } else { | ||||||
|  |         this.taskForm.values = { | ||||||
|  |           "approval": val | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     getProcessDetails(procInsId, taskId) { | ||||||
|  |       const params = {procInsId: procInsId, taskId: taskId} | ||||||
|  |       detailProcess(params).then(res => { | ||||||
|  |         const data = res.data; | ||||||
|  |         this.xmlData = data.bpmnXml; | ||||||
|  |         this.processFormList = data.processFormList; | ||||||
|  |         this.taskFormOpen = data.existTaskForm; | ||||||
|  |         if (this.taskFormOpen) { | ||||||
|  |           this.taskFormData = data.taskFormData; | ||||||
|  |         } | ||||||
|  |         this.historyProcNodeList = data.historyProcNodeList; | ||||||
|  |         this.finishedInfo = data.flowViewer; | ||||||
|  |         this.formOpen = true; | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     onSelectCopyUsers() { | ||||||
|  |       this.userMultipleSelection = this.copyUser; | ||||||
|  |       this.onSelectUsers('添加抄送人', 'copy') | ||||||
|  |     }, | ||||||
|  |     onSelectNextUsers() { | ||||||
|  |       this.userMultipleSelection = this.nextUser; | ||||||
|  |       this.onSelectUsers('指定审批人', 'next') | ||||||
|  |     }, | ||||||
|  |     onSelectUsers(title, type) { | ||||||
|  |       this.userData.title = title; | ||||||
|  |       this.userData.type = type; | ||||||
|  |       this.getTreeSelect(); | ||||||
|  |       this.getList() | ||||||
|  |       this.userData.open = true; | ||||||
|  |     }, | ||||||
|  |     /** 通过任务 */ | ||||||
|  |     handleComplete() { | ||||||
|  |       // 校验表单 | ||||||
|  |       const taskFormRef = this.$refs.taskFormParser; | ||||||
|  |       const isExistTaskForm = taskFormRef !== undefined; | ||||||
|  |       // 若无任务表单,则 taskFormPromise 为 true,即不需要校验 | ||||||
|  |       const taskFormPromise = !isExistTaskForm ? true : new Promise((resolve, reject) => { | ||||||
|  |         taskFormRef.$refs[taskFormRef.formConfCopy.formRef].validate(valid => { | ||||||
|  |           valid ? resolve() : reject() | ||||||
|  |         }) | ||||||
|  |       }); | ||||||
|  |       const approvalPromise = new Promise((resolve, reject) => { | ||||||
|  |         this.$refs['taskForm'].validate(valid => { | ||||||
|  |           valid ? resolve() : reject() | ||||||
|  |         }) | ||||||
|  |       }); | ||||||
|  |       Promise.all([taskFormPromise, approvalPromise]).then(() => { | ||||||
|  |         if (isExistTaskForm) { | ||||||
|  |           this.taskForm.variables = taskFormRef[taskFormRef.formConfCopy.formModel] | ||||||
|  |         } | ||||||
|  |         complete(this.taskForm).then(response => { | ||||||
|  |           this.$modal.msgSuccess(response.msg); | ||||||
|  |           this.goBack(); | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 委派任务 */ | ||||||
|  |     handleDelegate() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.userData.type = 'delegate'; | ||||||
|  |           this.userData.title = '委派任务' | ||||||
|  |           this.userData.open = true; | ||||||
|  |           this.getTreeSelect(); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 转办任务 */ | ||||||
|  |     handleTransfer(){ | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.userData.type = 'transfer'; | ||||||
|  |           this.userData.title = '转办任务'; | ||||||
|  |           this.userData.open = true; | ||||||
|  |           this.getTreeSelect(); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 拒绝任务 */ | ||||||
|  |     handleReject() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           const _this = this; | ||||||
|  |           this.$modal.confirm('拒绝审批单流程会终止,是否继续?').then(function() { | ||||||
|  |             return rejectTask(_this.taskForm); | ||||||
|  |           }).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     changeCurrentUser(val) { | ||||||
|  |       this.currentUserId = val.userId | ||||||
|  |     }, | ||||||
|  |     /** 返回页面 */ | ||||||
|  |     goBack() { | ||||||
|  |       // 关闭当前标签页并返回上个页面 | ||||||
|  |       this.$tab.closePage(this.$route) | ||||||
|  |       this.$router.back() | ||||||
|  |     }, | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submitUserData() { | ||||||
|  |       let type = this.userData.type; | ||||||
|  |       if (type === 'copy' || type === 'next') { | ||||||
|  |         if (!this.userMultipleSelection || this.userMultipleSelection.length <= 0) { | ||||||
|  |           this.$modal.msgError("请选择用户"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         let userIds = this.userMultipleSelection.map(k => k.userId); | ||||||
|  |         if (type === 'copy') { | ||||||
|  |           // 设置抄送人ID信息 | ||||||
|  |           this.copyUser = this.userMultipleSelection; | ||||||
|  |           this.taskForm.copyUserIds = userIds instanceof Array ? userIds.join(',') : userIds; | ||||||
|  |         } else if (type === 'next') { | ||||||
|  |           // 设置下一级审批人ID信息 | ||||||
|  |           this.nextUser = this.userMultipleSelection; | ||||||
|  |           this.taskForm.nextUserIds = userIds instanceof Array ? userIds.join(',') : userIds; | ||||||
|  |         } | ||||||
|  |         this.userData.open = false; | ||||||
|  |       } else { | ||||||
|  |         if (!this.taskForm.comment) { | ||||||
|  |           this.$modal.msgError("请输入审批意见"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         if (!this.currentUserId) { | ||||||
|  |           this.$modal.msgError("请选择用户"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         this.taskForm.userId = this.currentUserId; | ||||||
|  |         if (type === 'delegate') { | ||||||
|  |           delegate(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |         if (type === 'transfer') { | ||||||
|  |           transfer(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 可退回任务列表 */ | ||||||
|  |     handleReturn() { | ||||||
|  |       this.$refs['taskForm'].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.returnTitle = "退回流程"; | ||||||
|  |           returnList(this.taskForm).then(res => { | ||||||
|  |             this.returnTaskList = res.data; | ||||||
|  |             this.taskForm.values = null; | ||||||
|  |             this.returnOpen = true; | ||||||
|  |           }) | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 提交退回任务 */ | ||||||
|  |     submitReturn() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           if (!this.taskForm.targetKey) { | ||||||
|  |             this.$modal.msgError("请选择退回节点!"); | ||||||
|  |           } | ||||||
|  |           returnTask(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack() | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .clearfix:before, | ||||||
|  | .clearfix:after { | ||||||
|  |   display: table; | ||||||
|  |   content: ""; | ||||||
|  | } | ||||||
|  | .clearfix:after { | ||||||
|  |   clear: both | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .box-card { | ||||||
|  |   width: 100%; | ||||||
|  |   margin-bottom: 20px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-tag + .el-tag { | ||||||
|  |   margin-left: 10px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-row { | ||||||
|  |   margin-bottom: 20px; | ||||||
|  |   &:last-child { | ||||||
|  |     margin-bottom: 0; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | .el-col { | ||||||
|  |   border-radius: 4px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .button-new-tag { | ||||||
|  |   margin-left: 10px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										164
									
								
								ruoyi-ui/src/views/scientific/handbook/handbookApply.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										164
									
								
								ruoyi-ui/src/views/scientific/handbook/handbookApply.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,164 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-card class="box-card"> | ||||||
|  |       <div slot="header" class="clearfix"> | ||||||
|  |         <span>{{ processName }}</span> | ||||||
|  |       </div> | ||||||
|  | 
 | ||||||
|  |       <el-col :span="18" :offset="3"> | ||||||
|  |         <div class="form-conf" v-if="formOpen"> | ||||||
|  |           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { listProcess, startProcess_ } from '@/api/workflow/process' | ||||||
|  | import { listAllCategory } from '@/api/workflow/category' | ||||||
|  | import { getProcessForm, startProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import {findLatestDeploymentTimeIndex } from '@/api/scientific/project_application_plan' | ||||||
|  | import { addHandbook } from '@/api/scientific/handbook' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: 'handbookApply', | ||||||
|  |   components: { | ||||||
|  |     Parser | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       definitionId: null, | ||||||
|  |       deployId: null, | ||||||
|  |       procInsId: null, | ||||||
|  |       formOpen: false, | ||||||
|  |       formData: {}, | ||||||
|  | 
 | ||||||
|  |       processName: '', | ||||||
|  |       categoryOptions: [], | ||||||
|  |       // 流程定义表格数据 | ||||||
|  |       processParams: null, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "", | ||||||
|  |         category: "010" | ||||||
|  |       }, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       /** 查询流程定义列表 */ | ||||||
|  |       listProcess(this.queryParams).then(response => { | ||||||
|  |         findLatestDeploymentTimeIndex(response).then((latestIndex) => { | ||||||
|  |           this.processParams = response.rows[latestIndex]; | ||||||
|  |           this.processName = this.processParams.processName; | ||||||
|  |           this.definitionId = this.processParams.definitionId; | ||||||
|  |           getProcessForm({ | ||||||
|  |             definitionId: this.processParams.definitionId, | ||||||
|  |             deployId: this.processParams.deploymentId, | ||||||
|  |             procInsId: undefined | ||||||
|  |           }).then(res => { | ||||||
|  |             if (res.data) { | ||||||
|  |               this.formData = res.data; | ||||||
|  |               this.formOpen = true; | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submit(data) { | ||||||
|  |       if (data && this.definitionId) { | ||||||
|  |         console.log(data.valData) | ||||||
|  |         // 启动流程并将表单数据加入流程变量 | ||||||
|  |         startProcess_(this.definitionId, JSON.stringify(data.valData)).then(res => { | ||||||
|  |           if (res.code !== 200) { | ||||||
|  |             this.$modal.msgError("操作失败"); | ||||||
|  |             return; | ||||||
|  |           } | ||||||
|  |           let handbookData = data.valData; | ||||||
|  |           handbookData.handbookProcId = res.msg; | ||||||
|  |           // zqjia:默认刚录入指南时状态为审核中,但后端会改为未审核 | ||||||
|  |           handbookData.handbookStatus = 1; | ||||||
|  |           // zqjia:现在表单里的日期选择没有精确到小时,所以需要处理日期格式,后续要去掉 | ||||||
|  |           const date = new Date(handbookData.handbookDate); | ||||||
|  |           handbookData.handbookDate = this.formatDateTime(date); | ||||||
|  | 
 | ||||||
|  |           // zqjia:解析handbookFile,不然无法存到数据库中 | ||||||
|  |           const files = handbookData.handbookFile; | ||||||
|  |           if (files !== null) { | ||||||
|  |             let formatedFiles = {}; | ||||||
|  |             files.forEach(file => { | ||||||
|  |               if(file.response.code === 200 && file.ossId) { | ||||||
|  |                 formatedFiles[file.name] = file.ossId; | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |             handbookData.handbookFile = JSON.stringify(formatedFiles); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           addHandbook(JSON.stringify(handbookData)).then(resp => { | ||||||
|  |             if (res.code !== 200) { | ||||||
|  |               this.$modal.msgError("操作失败"); | ||||||
|  |               return; | ||||||
|  |             } | ||||||
|  |             this.$modal.msgSuccess(resp.msg); | ||||||
|  |             this.$tab.closeOpenPage({ | ||||||
|  |               // zqjia:这个路径由菜单管理里设置的路由决定 | ||||||
|  |               path: '/scientific/handbook/list' | ||||||
|  |             }) | ||||||
|  |           }); | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     formatDateTime(date) { | ||||||
|  |       const padZero = (num) => (num < 10 ? '0' + num : num); | ||||||
|  | 
 | ||||||
|  |       const year = date.getFullYear(); | ||||||
|  |       const month = padZero(date.getMonth() + 1); // getMonth() 返回值的范围是 0-11,所以需要加 1 | ||||||
|  |       const day = padZero(date.getDate()); | ||||||
|  |       const hours = padZero(date.getHours()); | ||||||
|  |       const minutes = padZero(date.getMinutes()); | ||||||
|  |       const seconds = padZero(date.getSeconds()); | ||||||
|  | 
 | ||||||
|  |       return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .form-conf { | ||||||
|  |   margin: 15px auto; | ||||||
|  |   width: 80%; | ||||||
|  |   padding: 15px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @ -1,46 +1,39 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|       <el-form-item label="申报信息名称" prop="handbookName" label-width="100px" > |       <el-form-item label="指南名称" prop="handbookName"> | ||||||
|         <el-input |         <el-input | ||||||
|           v-model="queryParams.handbookName" |           v-model="queryParams.handbookName" | ||||||
|           placeholder="请输入申报信息名称" |           placeholder="请输入指南名称" | ||||||
|           clearable |           clearable | ||||||
|           @keyup.enter.native="handleQuery" |           @keyup.enter.native="handleQuery" | ||||||
|         /> |         /> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|       <el-form-item label="项目指南级别" prop="handbookLevel" label-width="100px"> |       <el-form-item label="指南分类" prop="handbookCategory"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.handbookCategory" | ||||||
|  |           placeholder="请输入指南分类" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="指南级别" prop="handbookLevel"> | ||||||
|         <el-input |         <el-input | ||||||
|           v-model="queryParams.handbookLevel" |           v-model="queryParams.handbookLevel" | ||||||
|           placeholder="请输入项目指南级别" |           placeholder="请输入指南级别" | ||||||
|           clearable |           clearable | ||||||
|           @keyup.enter.native="handleQuery" |           @keyup.enter.native="handleQuery" | ||||||
|         /> |         /> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|       <el-form-item label="申报开始日期" prop="projectAppStTime" label-width="100px"> |       <el-form-item label="发布时间" prop="handbookDate"> | ||||||
|         <el-date-picker clearable |         <el-date-picker clearable | ||||||
|           v-model="queryParams.projectAppStTime" |           v-model="queryParams.handbookDate" | ||||||
|           type="date" |           type="date" | ||||||
|           value-format="yyyy-MM-dd" |           value-format="yyyy-MM-dd" | ||||||
|           placeholder="请选择申报开始日期"> |           placeholder="请选择发布时间"> | ||||||
|         </el-date-picker> |         </el-date-picker> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|       <el-form-item label="申报结束日期" prop="projectAppEndTime" label-width="100px"> | 
 | ||||||
|         <el-date-picker clearable |  | ||||||
|           v-model="queryParams.projectAppEndTime" |  | ||||||
|           type="date" |  | ||||||
|           value-format="yyyy-MM-dd" |  | ||||||
|           placeholder="请选择申报结束日期"> |  | ||||||
|         </el-date-picker> |  | ||||||
|       </el-form-item> |  | ||||||
|       <el-form-item label="指南负责人" prop="handbookLeader" label-width="100px"> |  | ||||||
|         <el-input |  | ||||||
|           v-model="queryParams.handbookLeader" |  | ||||||
|           placeholder="请输入指南负责人" |  | ||||||
|           clearable |  | ||||||
|           @keyup.enter.native="handleQuery" |  | ||||||
|         /> |  | ||||||
|       </el-form-item> |  | ||||||
|       <el-form-item> |       <el-form-item> | ||||||
|         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||||
|         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||||
| @ -55,7 +48,7 @@ | |||||||
|           icon="el-icon-plus" |           icon="el-icon-plus" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleAdd" |           @click="handleAdd" | ||||||
|           v-hasPermi="['scientific:handbook:add']" |           v-hasPermi="['scientific:project_application_plan:add']" | ||||||
|         >新增</el-button> |         >新增</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="1.5"> |       <el-col :span="1.5"> | ||||||
| @ -66,7 +59,7 @@ | |||||||
|           size="mini" |           size="mini" | ||||||
|           :disabled="single" |           :disabled="single" | ||||||
|           @click="handleUpdate" |           @click="handleUpdate" | ||||||
|           v-hasPermi="['scientific:handbook:edit']" |           v-hasPermi="['scientific:project_application_plan:edit']" | ||||||
|         >修改</el-button> |         >修改</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="1.5"> |       <el-col :span="1.5"> | ||||||
| @ -77,7 +70,7 @@ | |||||||
|           size="mini" |           size="mini" | ||||||
|           :disabled="multiple" |           :disabled="multiple" | ||||||
|           @click="handleDelete" |           @click="handleDelete" | ||||||
|           v-hasPermi="['scientific:handbook:remove']" |           v-hasPermi="['scientific:project_application_plan:remove']" | ||||||
|         >删除</el-button> |         >删除</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="1.5"> |       <el-col :span="1.5"> | ||||||
| @ -87,7 +80,7 @@ | |||||||
|           icon="el-icon-download" |           icon="el-icon-download" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleExport" |           @click="handleExport" | ||||||
|           v-hasPermi="['scientific:handbook:export']" |           v-hasPermi="['scientific:project_application_plan:export']" | ||||||
|         >导出</el-button> |         >导出</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||||
| @ -96,12 +89,21 @@ | |||||||
|     <el-table v-loading="loading" :data="handbookList" @selection-change="handleSelectionChange"> |     <el-table v-loading="loading" :data="handbookList" @selection-change="handleSelectionChange"> | ||||||
|       <el-table-column type="selection" width="55" align="center" /> |       <el-table-column type="selection" width="55" align="center" /> | ||||||
|       <el-table-column label="序号" type="index" width="50"></el-table-column> |       <el-table-column label="序号" type="index" width="50"></el-table-column> | ||||||
|       <!-- <el-table-column label="项目ID" align="center" prop="handbookId" v-if="true"/> --> |       <el-table-column label="指南名称" align="center"  :min-width="150"> | ||||||
|       <el-table-column label="申报信息名称" align="center" prop="handbookName" :min-width="180"/> |         <template slot-scope="scope"> | ||||||
|       <!-- <el-table-column label="项目审核状态" align="center" prop="handbookStatus" /> --> |           <el-tag size="medium" :type="info"> | ||||||
|       <el-table-column label="项目指南类型" align="center" prop="handbookType" /> |             {{ scope.row.handbookName }} | ||||||
|  |           </el-tag> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |       <el-table-column label="发布人" prop="directorName" width="80"></el-table-column> | ||||||
|  |       <el-table-column label="指南分类" align="center" :min-width="150"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |             {{ formatHandbookType(scope.row.handbookLevel) }} | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
| 
 | 
 | ||||||
|       <el-table-column label="项目指南级别" align="center" width="100px" :min-width="100"> |       <el-table-column label="指南级别" align="center" :min-width="100"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-tag size="medium" :type="getTagLevelType(scope.row.handbookLevel)"> |           <el-tag size="medium" :type="getTagLevelType(scope.row.handbookLevel)"> | ||||||
|             {{ formatHandbookLevel(scope.row.handbookLevel) }} |             {{ formatHandbookLevel(scope.row.handbookLevel) }} | ||||||
| @ -109,44 +111,44 @@ | |||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
| 
 | 
 | ||||||
|       <el-table-column label="申报状态" align="center" width="100px" :min-width="100"> |       <el-table-column label="发布时间" align="center" prop="handbookDate" width="180"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-tag size="medium" :type="getTagType(scope.row.declareStatus)"> |           <span>{{ parseTime(scope.row.handbookDate, '{y}-{m}-{d}') }}</span> | ||||||
|             {{ formatHandbookStatus(scope.row.declareStatus) }} |  | ||||||
|           </el-tag> |  | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
| 
 | 
 | ||||||
| 
 | <!--      <el-table-column label="指南文件" align="center" prop="handbookFile" />--> | ||||||
| 
 | <!--      <el-table-column label="指南录入流程状态" align="center" prop="handbookStatus" />--> | ||||||
|       <el-table-column label="申报开始日期" align="center" prop="projectAppStTime" width="180"> |  | ||||||
|         <template slot-scope="scope"> |  | ||||||
|           <span>{{ parseTime(scope.row.projectAppStTime, '{y}-{m}-{d}') }}</span> |  | ||||||
|         </template> |  | ||||||
|       </el-table-column> |  | ||||||
|       <el-table-column label="申报结束日期" align="center" prop="projectAppEndTime" width="180"> |  | ||||||
|         <template slot-scope="scope"> |  | ||||||
|           <span>{{ parseTime(scope.row.projectAppEndTime, '{y}-{m}-{d}') }}</span> |  | ||||||
|         </template> |  | ||||||
|       </el-table-column> |  | ||||||
|       <el-table-column label="指南负责人" align="center" prop="handbookLeader" /> |  | ||||||
|       <el-table-column label="指南负责人电话" align="center" prop="projectLeaderPhone" /> |  | ||||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|  | <!--          <el-button--> | ||||||
|  | <!--            size="mini"--> | ||||||
|  | <!--            type="text"--> | ||||||
|  | <!--            icon="el-icon-edit"--> | ||||||
|  | <!--            @click="handleUpdate(scope.row)"--> | ||||||
|  | <!--            v-hasPermi="['scientific:project_application_plan:edit']"--> | ||||||
|  | <!--          >修改</el-button>--> | ||||||
|  | <!--          <el-button--> | ||||||
|  | <!--            size="mini"--> | ||||||
|  | <!--            type="text"--> | ||||||
|  | <!--            icon="el-icon-delete"--> | ||||||
|  | <!--            @click="handleDelete(scope.row)"--> | ||||||
|  | <!--            v-hasPermi="['scientific:project_application_plan:remove']"--> | ||||||
|  | <!--          >删除</el-button>--> | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="handleHandbookDetail(scope.row)" | ||||||
|             v-hasPermi="['scientific:handbook:edit']" |             v-hasPermi="['scientific:project_application_plan:edit']" | ||||||
|           >修改</el-button> |           >详情</el-button> | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-delete" |             icon="el-icon-top" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handlePlanApply(scope.row)" | ||||||
|             v-hasPermi="['scientific:handbook:remove']" |             v-hasPermi="['scientific:project_application_plan:remove']" | ||||||
|           >删除</el-button> |           >发布计划</el-button> | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|     </el-table> |     </el-table> | ||||||
| @ -159,39 +161,34 @@ | |||||||
|       @pagination="getList" |       @pagination="getList" | ||||||
|     /> |     /> | ||||||
| 
 | 
 | ||||||
|     <!-- 添加或修改项目申报v2对话框 --> |     <!-- 添加或修改项目申报指南对话框 --> | ||||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||||
|         <el-form-item label="申报信息名称" prop="handbookName"> |         <el-form-item label="指南名称" prop="handbookName"> | ||||||
|           <el-input v-model="form.handbookName" placeholder="请输入申报信息名称" /> |           <el-input v-model="form.handbookName" placeholder="请输入指南名称" /> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="项目立项流程实例Id" prop="handbookProcId"> |         <el-form-item label="指南分类" prop="handbookCategory"> | ||||||
|           <el-input v-model="form.handbookProcId" placeholder="请输入项目立项流程实例Id" /> |           <el-input v-model="form.handbookCategory" placeholder="请输入指南分类" /> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="项目指南级别(0市级 1区级 3省级 4国家级)" prop="handbookLevel"> |         <el-form-item label="指南级别(4院级 3市级 2省级 1国家级)" prop="handbookLevel"> | ||||||
|           <el-input v-model="form.handbookLevel" placeholder="请输入项目指南级别(0市级 1区级 3省级 4国家级)" /> |           <el-input v-model="form.handbookLevel" placeholder="请输入指南级别(4院级 3市级 2省级 1国家级)" /> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="申报开始日期" prop="projectAppStTime"> |         <el-form-item label="发布时间" prop="handbookDate"> | ||||||
|           <el-date-picker clearable |           <el-date-picker clearable | ||||||
|             v-model="form.projectAppStTime" |             v-model="form.handbookDate" | ||||||
|             type="datetime" |             type="datetime" | ||||||
|             value-format="yyyy-MM-dd HH:mm:ss" |             value-format="yyyy-MM-dd HH:mm:ss" | ||||||
|             placeholder="请选择申报开始日期"> |             placeholder="请选择发布时间"> | ||||||
|           </el-date-picker> |           </el-date-picker> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="申报结束日期" prop="projectAppEndTime"> |         <el-form-item label="备注" prop="handbookNote"> | ||||||
|           <el-date-picker clearable |           <el-input v-model="form.handbookNote" type="textarea" placeholder="请输入内容" /> | ||||||
|             v-model="form.projectAppEndTime" |  | ||||||
|             type="datetime" |  | ||||||
|             value-format="yyyy-MM-dd HH:mm:ss" |  | ||||||
|             placeholder="请选择申报结束日期"> |  | ||||||
|           </el-date-picker> |  | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="指南负责人" prop="handbookLeader"> |         <el-form-item label="指南文件" prop="handbookFile"> | ||||||
|           <el-input v-model="form.handbookLeader" placeholder="请输入指南负责人" /> |           <file-upload v-model="form.handbookFile"/> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="指南负责人电话" prop="projectLeaderPhone"> |         <el-form-item label="指南录入流程实例Id" prop="handbookProcId"> | ||||||
|           <el-input v-model="form.projectLeaderPhone" placeholder="请输入指南负责人电话" /> |           <el-input v-model="form.handbookProcId" placeholder="请输入指南录入流程实例Id" /> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|       </el-form> |       </el-form> | ||||||
|       <div slot="footer" class="dialog-footer"> |       <div slot="footer" class="dialog-footer"> | ||||||
| @ -204,9 +201,16 @@ | |||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import { listHandbook, getHandbook, delHandbook, addHandbook, updateHandbook } from "@/api/scientific/handbook"; | import { listHandbook, getHandbook, delHandbook, addHandbook, updateHandbook } from "@/api/scientific/handbook"; | ||||||
|  | import planApply from '@/views/scientific/project_application_plan/planApply.vue' | ||||||
|  | import { listProcess } from '@/api/workflow/process' | ||||||
| 
 | 
 | ||||||
| export default { | export default { | ||||||
|   name: "Handbook", |   name: "Handbook", | ||||||
|  |   computed: { | ||||||
|  |     planApply() { | ||||||
|  |       return planApply | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       // 按钮loading |       // 按钮loading | ||||||
| @ -223,7 +227,7 @@ export default { | |||||||
|       showSearch: true, |       showSearch: true, | ||||||
|       // 总条数 |       // 总条数 | ||||||
|       total: 0, |       total: 0, | ||||||
|       // 项目申报v2表格数据 |       // 项目申报指南表格数据 | ||||||
|       handbookList: [], |       handbookList: [], | ||||||
|       // 弹出层标题 |       // 弹出层标题 | ||||||
|       title: "", |       title: "", | ||||||
| @ -233,16 +237,15 @@ export default { | |||||||
|       queryParams: { |       queryParams: { | ||||||
|         pageNum: 1, |         pageNum: 1, | ||||||
|         pageSize: 10, |         pageSize: 10, | ||||||
|  |         handbookId: undefined, | ||||||
|         handbookName: undefined, |         handbookName: undefined, | ||||||
|         handbookProcId: undefined, |         handbookCategory: undefined, | ||||||
|         handbookStatus: undefined, |  | ||||||
|         handbookType: undefined, |  | ||||||
|         handbookLevel: undefined, |         handbookLevel: undefined, | ||||||
|         declareStatus: undefined, |         handbookDate: undefined, | ||||||
|         projectAppStTime: undefined, |         handbookNote: undefined, | ||||||
|         projectAppEndTime: undefined, |         handbookFile: undefined, | ||||||
|         handbookLeader: undefined, |         handbookProcId: undefined, | ||||||
|         projectLeaderPhone: undefined, |         handbookStatus: 3, | ||||||
|       }, |       }, | ||||||
|       // 表单参数 |       // 表单参数 | ||||||
|       form: {}, |       form: {}, | ||||||
| @ -252,34 +255,28 @@ export default { | |||||||
|           { required: true, message: "项目ID不能为空", trigger: "blur" } |           { required: true, message: "项目ID不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         handbookName: [ |         handbookName: [ | ||||||
|           { required: true, message: "申报信息名称不能为空", trigger: "blur" } |           { required: true, message: "指南名称不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         handbookProcId: [ |         handbookCategory: [ | ||||||
|           { required: true, message: "项目立项流程实例Id不能为空", trigger: "blur" } |           { required: true, message: "指南分类不能为空", trigger: "blur" } | ||||||
|         ], |  | ||||||
|         handbookStatus: [ |  | ||||||
|           { required: true, message: "项目审核状态(0未审核 1审核中 3审核通过)不能为空", trigger: "change" } |  | ||||||
|         ], |  | ||||||
|         handbookType: [ |  | ||||||
|           { required: true, message: "项目指南类型(0 科技计划 1 研发计划)不能为空", trigger: "change" } |  | ||||||
|         ], |         ], | ||||||
|         handbookLevel: [ |         handbookLevel: [ | ||||||
|           { required: true, message: "项目指南级别(0市级 1区级 3省级 4国家级)不能为空", trigger: "blur" } |           { required: true, message: "指南级别(4院级 3市级 2省级 1国家级)不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         declareStatus: [ |         handbookDate: [ | ||||||
|           { required: true, message: "申报状态(0 停止申报 1 申报中)不能为空", trigger: "change" } |           { required: true, message: "发布时间不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         projectAppStTime: [ |         handbookNote: [ | ||||||
|           { required: true, message: "申报开始日期不能为空", trigger: "blur" } |           { required: true, message: "备注不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         projectAppEndTime: [ |         handbookFile: [ | ||||||
|           { required: true, message: "申报结束日期不能为空", trigger: "blur" } |           { required: true, message: "指南文件不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         handbookLeader: [ |         handbookProcId: [ | ||||||
|           { required: true, message: "指南负责人不能为空", trigger: "blur" } |           { required: true, message: "指南录入流程实例Id不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         projectLeaderPhone: [ |         handbookStatus: [ | ||||||
|           { required: true, message: "指南负责人电话不能为空", trigger: "blur" } |           { required: true, message: "指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过)不能为空", trigger: "change" } | ||||||
|         ], |         ], | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
| @ -288,7 +285,7 @@ export default { | |||||||
|     this.getList(); |     this.getList(); | ||||||
|   }, |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     /** 查询项目申报v2列表 */ |     /** 查询项目申报指南列表 */ | ||||||
|     getList() { |     getList() { | ||||||
|       this.loading = true; |       this.loading = true; | ||||||
|       listHandbook(this.queryParams).then(response => { |       listHandbook(this.queryParams).then(response => { | ||||||
| @ -307,15 +304,13 @@ export default { | |||||||
|       this.form = { |       this.form = { | ||||||
|         handbookId: undefined, |         handbookId: undefined, | ||||||
|         handbookName: undefined, |         handbookName: undefined, | ||||||
|  |         handbookCategory: undefined, | ||||||
|  |         handbookLevel: undefined, | ||||||
|  |         handbookDate: undefined, | ||||||
|  |         handbookNote: undefined, | ||||||
|  |         handbookFile: undefined, | ||||||
|         handbookProcId: undefined, |         handbookProcId: undefined, | ||||||
|         handbookStatus: undefined, |         handbookStatus: undefined, | ||||||
|         handbookType: undefined, |  | ||||||
|         handbookLevel: undefined, |  | ||||||
|         declareStatus: undefined, |  | ||||||
|         projectAppStTime: undefined, |  | ||||||
|         projectAppEndTime: undefined, |  | ||||||
|         handbookLeader: undefined, |  | ||||||
|         projectLeaderPhone: undefined, |  | ||||||
|         createBy: undefined, |         createBy: undefined, | ||||||
|         createTime: undefined, |         createTime: undefined, | ||||||
|         updateBy: undefined, |         updateBy: undefined, | ||||||
| @ -343,7 +338,7 @@ export default { | |||||||
|     handleAdd() { |     handleAdd() { | ||||||
|       this.reset(); |       this.reset(); | ||||||
|       this.open = true; |       this.open = true; | ||||||
|       this.title = "添加项目申报v2"; |       this.title = "添加项目申报指南"; | ||||||
|     }, |     }, | ||||||
|     /** 修改按钮操作 */ |     /** 修改按钮操作 */ | ||||||
|     handleUpdate(row) { |     handleUpdate(row) { | ||||||
| @ -354,7 +349,7 @@ export default { | |||||||
|         this.loading = false; |         this.loading = false; | ||||||
|         this.form = response.data; |         this.form = response.data; | ||||||
|         this.open = true; |         this.open = true; | ||||||
|         this.title = "修改项目申报v2"; |         this.title = "修改项目申报指南"; | ||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|     /** 提交按钮 */ |     /** 提交按钮 */ | ||||||
| @ -385,7 +380,7 @@ export default { | |||||||
|     /** 删除按钮操作 */ |     /** 删除按钮操作 */ | ||||||
|     handleDelete(row) { |     handleDelete(row) { | ||||||
|       const handbookIds = row.handbookId || this.ids; |       const handbookIds = row.handbookId || this.ids; | ||||||
|       this.$modal.confirm('是否确认删除项目申报v2编号为"' + handbookIds + '"的数据项?').then(() => { |       this.$modal.confirm('是否确认删除项目申报指南编号为"' + handbookIds + '"的数据项?').then(() => { | ||||||
|         this.loading = true; |         this.loading = true; | ||||||
|         return delHandbook(handbookIds); |         return delHandbook(handbookIds); | ||||||
|       }).then(() => { |       }).then(() => { | ||||||
| @ -399,78 +394,69 @@ export default { | |||||||
|     }, |     }, | ||||||
|     /** 导出按钮操作 */ |     /** 导出按钮操作 */ | ||||||
|     handleExport() { |     handleExport() { | ||||||
|       this.download('scientific/handbook/export', { |       this.download('scientific/project_application_plan/export', { | ||||||
|         ...this.queryParams |         ...this.queryParams | ||||||
|       }, `handbook_${new Date().getTime()}.xlsx`) |       }, `handbook_${new Date().getTime()}.xlsx`) | ||||||
|     }, |     }, | ||||||
|         /** |     handleHandbookDetail(row) { | ||||||
|      * 把项目状态的申报code转换为文字: 0 : 未申报  1: 审核中  2: 已申报   |       this.$router.push({ | ||||||
|      * @param   {number|string} cellValue - 原始数值 |         path: '/scientific/handbook/detail/' + row.handbookProcId, | ||||||
|      * @returns {string} 转换后的字符串 |         query: { | ||||||
|      * @author  zhanli |           processed: false, | ||||||
|      */ |         } | ||||||
|      formatHandbookStatus(cellValue) { |       }) | ||||||
|       switch (cellValue) { |     }, | ||||||
|         case '0': |     handlePlanApply(row) { | ||||||
|           return "暂未开始"; |       // 跳转到申报计划录入 | ||||||
|         case '1': |       this.$router.push({ | ||||||
|           return "申报中"; |         name: 'planApply', | ||||||
|         case '2': |         params: { | ||||||
|           return "停止申报"; |           handbook: row | ||||||
|         default: |         } | ||||||
|           return "未知状态"; |       }) | ||||||
|       } |  | ||||||
|     }, |     }, | ||||||
|     formatHandbookLevel(cellValue) { |     formatHandbookLevel(cellValue) { | ||||||
|       switch (cellValue) { |       switch (cellValue) { | ||||||
|         case '0': |  | ||||||
|           return "市级"; |  | ||||||
|         case '1': |         case '1': | ||||||
|           return "区级"; |           return "国家级"; | ||||||
|         case '2': |         case '2': | ||||||
|           return "省级"; |           return "省级"; | ||||||
|         case '3': |         case '3': | ||||||
|           return "国家级"; |           return "市级"; | ||||||
|  |         case '4': | ||||||
|  |           return "院级"; | ||||||
|         default: |         default: | ||||||
|           return "未知"; |           return "未知"; | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     getTagType(status) { |  | ||||||
|       switch (status) { |  | ||||||
|         case '2': |  | ||||||
|           // 显示红色 停止申报 |  | ||||||
|           return 'danger'; |  | ||||||
|         case '1': |  | ||||||
|           // 审核中 显示绿色 |  | ||||||
|           return 'success'; |  | ||||||
|         case '0': |  | ||||||
|           // 未申报, 灰色 |  | ||||||
|           return 'info'; |  | ||||||
|         case '4': |  | ||||||
|           // 其他状态 灰色 |  | ||||||
|           return 'primary'; |  | ||||||
|         default: |  | ||||||
|           return ''; |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     getTagLevelType(status) { |     getTagLevelType(status) { | ||||||
|       switch (status) { |       switch (status) { | ||||||
|         case '2': |         case '2': | ||||||
|           // 省级 蓝色 |           // 省级 蓝色 | ||||||
|           return 'primary'; |           return 'primary'; | ||||||
|         case '1': |         case '3': | ||||||
|           // 市级 显示绿色 |           // 市级 显示绿色 | ||||||
|           return 'success'; |           return 'success'; | ||||||
|         case '0': |         case '4': | ||||||
|           // 区级, 灰色 |           // 院级, 灰色 | ||||||
|           return 'info'; |           return 'info'; | ||||||
|         case '3': |         case '1': | ||||||
|           // 国家级 红色 |           // 国家级 红色 | ||||||
|           return 'danger'; |           return 'danger'; | ||||||
|         default: |         default: | ||||||
|           return ''; |           return ''; | ||||||
|       } |       } | ||||||
|     } |     }, | ||||||
|  |     formatHandbookType(cellValue) { | ||||||
|  |       switch (cellValue) { | ||||||
|  |         case '1': | ||||||
|  |           return "科技计划"; | ||||||
|  |         case '2': | ||||||
|  |           return "研发计划"; | ||||||
|  |         default: | ||||||
|  |           return "未知"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
|  | |||||||
| @ -1,117 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="app-container"> |  | ||||||
|     <el-card class="box-card"> |  | ||||||
|       <div slot="header" class="clearfix"> |  | ||||||
|         <span>{{ processName }}</span> |  | ||||||
|       </div> |  | ||||||
| 
 |  | ||||||
|       <el-col :span="18" :offset="3"> |  | ||||||
|         <div class="form-conf" v-if="formOpen"> |  | ||||||
|           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> |  | ||||||
|         </div> |  | ||||||
|       </el-col> |  | ||||||
|     </el-card> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
| 
 |  | ||||||
| <script> |  | ||||||
| import { listProcess} from "@/api/workflow/process"; |  | ||||||
| import { listAllCategory } from '@/api/workflow/category' |  | ||||||
| import { getProcessForm, startProcess } from '@/api/workflow/process' |  | ||||||
| import Parser from '@/utils/generator/parser' |  | ||||||
| 
 |  | ||||||
| export default { |  | ||||||
|   name: 'handbookApply', |  | ||||||
|   components: { |  | ||||||
|     Parser |  | ||||||
|   }, |  | ||||||
|   data() { |  | ||||||
|     return { |  | ||||||
|       definitionId: null, |  | ||||||
|       deployId: null, |  | ||||||
|       procInsId: null, |  | ||||||
|       formOpen: false, |  | ||||||
|       formData: {}, |  | ||||||
| 
 |  | ||||||
|       processName: '', |  | ||||||
|       categoryOptions: [], |  | ||||||
|       // 流程定义表格数据 |  | ||||||
|       processParams: null, |  | ||||||
|       // 查询参数 |  | ||||||
|       queryParams: { |  | ||||||
|         pageNum: 1, |  | ||||||
|         pageSize: 10, |  | ||||||
|         processKey: undefined, |  | ||||||
|         processName: "项目指南录入", |  | ||||||
|         category: "007" |  | ||||||
|       }, |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   created() { |  | ||||||
|     this.initData(); |  | ||||||
|   }, |  | ||||||
|   methods: { |  | ||||||
|     initData() { |  | ||||||
|       /** 查询流程定义列表 */ |  | ||||||
|       listProcess(this.queryParams).then(response => { |  | ||||||
|         this.processParams = response.rows[0]; |  | ||||||
|         this.processName = this.processParams.processName; |  | ||||||
|         this.definitionId = this.processParams.definitionId; |  | ||||||
| 
 |  | ||||||
|         getProcessForm({ |  | ||||||
|           definitionId: this.processParams.definitionId, |  | ||||||
|           deployId: this.processParams.deploymentId, |  | ||||||
|           procInsId: undefined |  | ||||||
|         }).then(res => { |  | ||||||
|           if (res.data) { |  | ||||||
|             this.formData = res.data; |  | ||||||
|             this.formOpen = true; |  | ||||||
|           } |  | ||||||
|         }) |  | ||||||
|       }) |  | ||||||
|     }, |  | ||||||
| 
 |  | ||||||
|     /** 接收子组件传的值 */ |  | ||||||
|     getData(data) { |  | ||||||
|       if (data) { |  | ||||||
|         const variables = []; |  | ||||||
|         data.fields.forEach(item => { |  | ||||||
|           let variableData = {}; |  | ||||||
|           variableData.label = item.__config__.label |  | ||||||
|           // 表单值为多个选项时 |  | ||||||
|           if (item.__config__.defaultValue instanceof Array) { |  | ||||||
|             const array = []; |  | ||||||
|             item.__config__.defaultValue.forEach(val => { |  | ||||||
|               array.push(val) |  | ||||||
|             }) |  | ||||||
|             variableData.val = array; |  | ||||||
|           } else { |  | ||||||
|             variableData.val = item.__config__.defaultValue |  | ||||||
|           } |  | ||||||
|           variables.push(variableData) |  | ||||||
|         }) |  | ||||||
|         this.variables = variables; |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     submit(data) { |  | ||||||
|       if (data && this.definitionId) { |  | ||||||
|         // 启动流程并将表单数据加入流程变量 |  | ||||||
|         startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => { |  | ||||||
|           this.$modal.msgSuccess(res.msg); |  | ||||||
|           this.$tab.closeOpenPage({ |  | ||||||
|             path: '/work/own' |  | ||||||
|           }) |  | ||||||
|         }) |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
| 
 |  | ||||||
| <style lang="scss" scoped> |  | ||||||
| .form-conf { |  | ||||||
|   margin: 15px auto; |  | ||||||
|   width: 80%; |  | ||||||
|   padding: 15px; |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
| @ -1,46 +1,64 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|       <el-form-item label="项目id" prop="projectId"> |       <el-form-item label="项目名称" prop="projectName"> | ||||||
|         <el-input |         <el-input | ||||||
|           v-model="queryParams.projectId" |           v-model="queryParams.projectName" | ||||||
|           placeholder="请输入项目id" |  | ||||||
|           clearable |  | ||||||
|           @keyup.enter.native="handleQuery" |  | ||||||
|         /> |  | ||||||
|       </el-form-item> |  | ||||||
|       <el-form-item label="指南id" prop="handbookId"> |  | ||||||
|         <el-input |  | ||||||
|           v-model="queryParams.handbookId" |  | ||||||
|           placeholder="请输入指南id" |  | ||||||
|           clearable |  | ||||||
|           @keyup.enter.native="handleQuery" |  | ||||||
|         /> |  | ||||||
|       </el-form-item> |  | ||||||
|       <el-form-item label="项目类别" prop="category"> |  | ||||||
|         <el-input |  | ||||||
|           v-model="queryParams.category" |  | ||||||
|           placeholder="请输入项目类别" |  | ||||||
|           clearable |  | ||||||
|           @keyup.enter.native="handleQuery" |  | ||||||
|         /> |  | ||||||
|       </el-form-item> |  | ||||||
|       <el-form-item label="项目名称" prop="name"> |  | ||||||
|         <el-input |  | ||||||
|           v-model="queryParams.name" |  | ||||||
|           placeholder="请输入项目名称" |           placeholder="请输入项目名称" | ||||||
|           clearable |           clearable | ||||||
|           @keyup.enter.native="handleQuery" |           @keyup.enter.native="handleQuery" | ||||||
|         /> |         /> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|       <el-form-item label="项目创建时间" prop="createTime"> |       <el-form-item label="状态" prop="projectStatus"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.projectStatus" | ||||||
|  |           placeholder="请输入状态" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="申报开始日期" prop="projectAppStTime" label-width="140px"> | ||||||
|         <el-date-picker clearable |         <el-date-picker clearable | ||||||
|           v-model="queryParams.createTime" |                         v-model="queryParams.projectAppStTime" | ||||||
|           type="date" |                         type="date" | ||||||
|           value-format="yyyy-MM-dd" |                         value-format="yyyy-MM-dd" | ||||||
|           placeholder="请选择项目创建时间"> |                         placeholder="请选择申报开始日期"> | ||||||
|         </el-date-picker> |         </el-date-picker> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|  |       <el-form-item label="申报结束日期" prop="projectAppEndTime" label-width="140px"> | ||||||
|  |         <el-date-picker clearable | ||||||
|  |                         v-model="queryParams.projectAppEndTime" | ||||||
|  |                         type="date" | ||||||
|  |                         value-format="yyyy-MM-dd" | ||||||
|  |                         placeholder="请选择申报结束日期"> | ||||||
|  |         </el-date-picker> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="项目负责人" prop="projectLeader" label-width="140px"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.projectLeader" | ||||||
|  |           placeholder="请输入项目负责人" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  | 
 | ||||||
|  |       <el-form-item label="项目预算(万)" prop="projectBudget" label-width="100px"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.projectBudget" | ||||||
|  |           placeholder="请输入项目预算(万)" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="项目负责人联系电话" prop="projectLeaderPhone" label-width="140px"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.projectLeaderPhone" | ||||||
|  |           placeholder="请输入联系电话" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  | 
 | ||||||
|       <el-form-item> |       <el-form-item> | ||||||
|         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||||
|         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||||
| @ -55,8 +73,8 @@ | |||||||
|           icon="el-icon-plus" |           icon="el-icon-plus" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleAdd" |           @click="handleAdd" | ||||||
|           v-hasPermi="['scientific:project:add']" |           v-hasPermi="['scientific:application:add']" | ||||||
|         >新增</el-button> |         >项目填写</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="1.5"> |       <el-col :span="1.5"> | ||||||
|         <el-button |         <el-button | ||||||
| @ -66,7 +84,7 @@ | |||||||
|           size="mini" |           size="mini" | ||||||
|           :disabled="single" |           :disabled="single" | ||||||
|           @click="handleUpdate" |           @click="handleUpdate" | ||||||
|           v-hasPermi="['scientific:project:edit']" |           v-hasPermi="['scientific:application:edit']" | ||||||
|         >修改</el-button> |         >修改</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="1.5"> |       <el-col :span="1.5"> | ||||||
| @ -77,7 +95,7 @@ | |||||||
|           size="mini" |           size="mini" | ||||||
|           :disabled="multiple" |           :disabled="multiple" | ||||||
|           @click="handleDelete" |           @click="handleDelete" | ||||||
|           v-hasPermi="['scientific:project:remove']" |           v-hasPermi="['scientific:application:remove']" | ||||||
|         >删除</el-button> |         >删除</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <el-col :span="1.5"> |       <el-col :span="1.5"> | ||||||
| @ -87,39 +105,73 @@ | |||||||
|           icon="el-icon-download" |           icon="el-icon-download" | ||||||
|           size="mini" |           size="mini" | ||||||
|           @click="handleExport" |           @click="handleExport" | ||||||
|           v-hasPermi="['scientific:project:export']" |           v-hasPermi="['scientific:application:export']" | ||||||
|         >导出</el-button> |         >导出</el-button> | ||||||
|       </el-col> |       </el-col> | ||||||
|       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|     </el-row> |     </el-row> | ||||||
| 
 | 
 | ||||||
|     <el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange"> |     <el-table v-loading="loading" :data="applicationList" @selection-change="handleSelectionChange"> | ||||||
|       <el-table-column type="selection" width="55" align="center" /> |       <el-table-column type="selection" width="55" align="center" /> | ||||||
|       <el-table-column label="" align="center" prop="id" v-if="true"/> |       <el-table-column label="序号" type="index" width="50"></el-table-column> | ||||||
|       <el-table-column label="项目id" align="center" prop="projectId" /> |       <!-- <el-table-column label="项目ID" align="center" prop="projectId" v-if="true" width="180"/> --> | ||||||
|       <el-table-column label="指南id" align="center" prop="handbookId" /> |       <el-table-column label="项目名称" align="center" :min-width="280"> | ||||||
|       <el-table-column label="项目类别" align="center" prop="category" /> |  | ||||||
|       <el-table-column label="项目名称" align="center" prop="name" /> |  | ||||||
|       <el-table-column label="项目创建时间" align="center" prop="createTime" width="180"> |  | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> |           <el-tag size="medium">{{ scope.row.projectName }}</el-tag> | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | 
 | ||||||
|  |       <el-table-column label="项目负责人" align="center" prop="projectLeader" width="100"/> | ||||||
|  |       <el-table-column label="申报状态" align="center" width="100px" :min-width="100"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|  |           <el-tag size="medium" :type="getTagType(scope.row.projectDeclareStatus)"> | ||||||
|  |             {{ formatProjectDeclareStatus(scope.row.projectDeclareStatus) }} | ||||||
|  |           </el-tag> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="申报开始日期" align="center" prop="projectAppStTime" :min-width="140" width="140"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <span>{{ parseTime(scope.row.projectAppStTime, '{y}-{m}-{d}') }}</span> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |       <el-table-column label="申报结束日期" align="center" prop="projectAppEndTime" width="140"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <span>{{ parseTime(scope.row.projectAppEndTime, '{y}-{m}-{d}') }}</span> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="项目预算(万)" align="center" prop="projectBudget" :min-width="180" width="180"/> | ||||||
|  |       <el-table-column label="负责人电话" align="center" prop="projectLeaderPhone" :min-width="150" width="150"/> | ||||||
|  |       <el-table-column label="操作" align="center" :min-width="280" width="280"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-button | ||||||
|  |             size="mini" | ||||||
|  |             type="text" | ||||||
|  |             icon="el-icon-top" | ||||||
|  |             @click="handleUpdate(scope.row)" | ||||||
|  |             v-hasPermi="['project:application:remove']" | ||||||
|  |           >申报项目</el-button> | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-edit" |             icon="el-icon-edit" | ||||||
|             @click="handleUpdate(scope.row)" |             @click="handleUpdate(scope.row)" | ||||||
|             v-hasPermi="['scientific:project:edit']" |             v-hasPermi="['scientific:application:edit']" | ||||||
|           >修改</el-button> |           >信息修改</el-button> | ||||||
|  |           <el-button | ||||||
|  |             size="mini" | ||||||
|  |             type="text" | ||||||
|  |             icon="el-icon-edit" | ||||||
|  |             @click="handleUpdateBudget(scope.row)" | ||||||
|  |             v-hasPermi="['scientific:application:edit']" | ||||||
|  |           >预算追加</el-button> | ||||||
|           <el-button |           <el-button | ||||||
|             size="mini" |             size="mini" | ||||||
|             type="text" |             type="text" | ||||||
|             icon="el-icon-delete" |             icon="el-icon-delete" | ||||||
|             @click="handleDelete(scope.row)" |             @click="handleDelete(scope.row)" | ||||||
|             v-hasPermi="['scientific:project:remove']" |             v-hasPermi="['scientific:application:remove']" | ||||||
|           >删除</el-button> |           >删除</el-button> | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
| @ -133,29 +185,43 @@ | |||||||
|       @pagination="getList" |       @pagination="getList" | ||||||
|     /> |     /> | ||||||
| 
 | 
 | ||||||
|     <!-- 添加或修改科研管理对话框 --> |     <!-- 添加或修改项目申报对话框, 采用open字段控制是否 --> | ||||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |     <!-- 这是提交或者详细信息的表单显示框  --> | ||||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |     <!-- 这个表单的名字为form: | ||||||
|         <el-form-item label="项目id" prop="projectId"> |          在form.projectName这种方式配置参数 --> | ||||||
|           <el-input v-model="form.projectId" placeholder="请输入项目id" /> |     <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> | ||||||
|  |       <el-form ref="form" :model="form" :rules="rules" label-width="150px" > | ||||||
|  |         <el-form-item label="项目名称" prop="projectName" > | ||||||
|  |           <el-input v-model="form.projectName" placeholder="请输入项目名称" :style="{ width: '400px' }"/> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="指南id" prop="handbookId"> |         <el-form-item label="项目负责人" prop="projectLeader"> | ||||||
|           <el-input v-model="form.handbookId" placeholder="请输入指南id" /> |           <el-input v-model="form.projectLeader" placeholder="请输入项目负责人" :style="{ width: '100px'}"/> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="项目类别" prop="category"> |         <el-form-item label="状态" prop="projectStatus" > | ||||||
|           <el-input v-model="form.category" placeholder="请输入项目类别" /> |           <el-input v-model="form.projectStatus" placeholder="请输入状态" :style="{ width: '50px' }"/> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|         <el-form-item label="项目名称" prop="name"> |         <el-form-item label="申报开始日期" prop="projectAppStTime" > | ||||||
|           <el-input v-model="form.name" placeholder="请输入项目名称" /> |  | ||||||
|         </el-form-item> |  | ||||||
|         <el-form-item label="项目创建时间" prop="createTime"> |  | ||||||
|           <el-date-picker clearable |           <el-date-picker clearable | ||||||
|             v-model="form.createTime" |                           v-model="form.projectAppStTime" | ||||||
|             type="datetime" |                           type="datetime" | ||||||
|             value-format="yyyy-MM-dd HH:mm:ss" |                           value-format="yyyy-MM-dd HH:mm:ss" | ||||||
|             placeholder="请选择项目创建时间"> |                           placeholder="请选择申报开始日期"> | ||||||
|           </el-date-picker> |           </el-date-picker> | ||||||
|         </el-form-item> |         </el-form-item> | ||||||
|  |         <el-form-item label="申报结束日期" prop="projectAppEndTime"> | ||||||
|  |           <el-date-picker clearable | ||||||
|  |                           v-model="form.projectAppEndTime" | ||||||
|  |                           type="datetime" | ||||||
|  |                           value-format="yyyy-MM-dd HH:mm:ss" | ||||||
|  |                           placeholder="请选择申报结束日期"> | ||||||
|  |           </el-date-picker> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目预算(万)" prop="projectBudget"> | ||||||
|  |           <el-input v-model="form.projectBudget" placeholder="请输入项目预算(万)" :style="{ width: '100px'}"/> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目负责人电话" prop="projectLeaderPhone"> | ||||||
|  |           <el-input v-model="form.projectLeaderPhone" placeholder="请输入项目负责人联系电话" :style="{ width: '140px'}" /> | ||||||
|  |         </el-form-item> | ||||||
|       </el-form> |       </el-form> | ||||||
|       <div slot="footer" class="dialog-footer"> |       <div slot="footer" class="dialog-footer"> | ||||||
|         <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> |         <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||||||
| @ -166,10 +232,10 @@ | |||||||
| </template> | </template> | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import { listProject, getProject, delProject, addProject, updateProject } from "@/api/scientific/project"; | import { listApplication, getApplication, delApplication, addApplication, updateApplication } from "@/api/scientific/application"; | ||||||
| 
 | import { listProcess} from "@/api/workflow/process"; | ||||||
| export default { | export default { | ||||||
|   name: "Project", |   name: "Application", | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       // 按钮loading |       // 按钮loading | ||||||
| @ -186,8 +252,8 @@ export default { | |||||||
|       showSearch: true, |       showSearch: true, | ||||||
|       // 总条数 |       // 总条数 | ||||||
|       total: 0, |       total: 0, | ||||||
|       // 科研管理表格数据 |       // 项目申报表格数据 | ||||||
|       projectList: [], |       applicationList: [], | ||||||
|       // 弹出层标题 |       // 弹出层标题 | ||||||
|       title: "", |       title: "", | ||||||
|       // 是否显示弹出层 |       // 是否显示弹出层 | ||||||
| @ -196,43 +262,75 @@ export default { | |||||||
|       queryParams: { |       queryParams: { | ||||||
|         pageNum: 1, |         pageNum: 1, | ||||||
|         pageSize: 10, |         pageSize: 10, | ||||||
|         projectId: undefined, |         projectName: undefined, | ||||||
|         handbookId: undefined, |         projectStatus: undefined, | ||||||
|         category: undefined, |         projectAppProcId: undefined, | ||||||
|         name: undefined, |         projectAppStaus: undefined, | ||||||
|         createTime: undefined |         projectAppStTime: undefined, | ||||||
|  |         projectAppEndTime: undefined, | ||||||
|  |         projectLeader: undefined, | ||||||
|  |         projectBudget: undefined, | ||||||
|  |         projectLeaderPhone: undefined, | ||||||
|  |       }, | ||||||
|  |       queryProcParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "项目预算追加表", | ||||||
|  |         category: "001" | ||||||
|       }, |       }, | ||||||
|       // 表单参数 |       // 表单参数 | ||||||
|       form: {}, |       form: {}, | ||||||
|       // 表单校验 |       // 表单校验 | ||||||
|       rules: { |       rules: { | ||||||
|         id: [ |  | ||||||
|           { required: true, message: "不能为空", trigger: "blur" } |  | ||||||
|         ], |  | ||||||
|         projectId: [ |         projectId: [ | ||||||
|           { required: true, message: "项目id不能为空", trigger: "blur" } |           { required: true, message: "项目ID不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|         handbookId: [ |         projectName: [ | ||||||
|           { required: true, message: "指南id不能为空", trigger: "blur" } |  | ||||||
|         ], |  | ||||||
|         category: [ |  | ||||||
|           { required: true, message: "项目类别不能为空", trigger: "blur" } |  | ||||||
|         ], |  | ||||||
|         name: [ |  | ||||||
|           { required: true, message: "项目名称不能为空", trigger: "blur" } |           { required: true, message: "项目名称不能为空", trigger: "blur" } | ||||||
|         ], |         ], | ||||||
|  |         projectStatus: [ | ||||||
|  |           { required: true, message: "状态不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         projectAppStTime: [ | ||||||
|  |           { required: true, message: "申报开始日期不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         projectAppEndTime: [ | ||||||
|  |           { required: true, message: "申报结束日期不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         projectLeader: [ | ||||||
|  |           { required: true, message: "项目负责人不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         projectBudget: [ | ||||||
|  |           { required: true, message: "项目预算(万)不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         projectLeaderPhone: [ | ||||||
|  |           { required: true, message: "项目负责人联系电话不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|       } |       } | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   created() { |   created() { | ||||||
|     this.getList(); |     this.getList(); | ||||||
|   }, |   }, | ||||||
|  |   // logzhan : 当我们跳转到其他路由页面,例如预算变更的时候,再次回来时 | ||||||
|  |   // 需要用这个函数刷新列表,否则列表将处于刷新状态不显示信息 | ||||||
|  |   beforeRouteEnter(to, from, next) { | ||||||
|  |     next(vm => { | ||||||
|  |       vm.getList() | ||||||
|  |     }) | ||||||
|  |   }, | ||||||
|   methods: { |   methods: { | ||||||
|     /** 查询科研管理列表 */ |     /** 查询项目申报列表 */ | ||||||
|     getList() { |     getList() { | ||||||
|       this.loading = true; |       this.loading = true; | ||||||
|       listProject(this.queryParams).then(response => { |       const queryParams = this.$route.params && this.$route.params.queryParams; | ||||||
|         this.projectList = response.rows; |       if (queryParams !== undefined) { | ||||||
|  |         this.queryParams = queryParams; | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       listApplication(this.queryParams).then(response => { | ||||||
|  |         this.applicationList = response.rows; | ||||||
|         this.total = response.total; |         this.total = response.total; | ||||||
|         this.loading = false; |         this.loading = false; | ||||||
|       }); |       }); | ||||||
| @ -245,12 +343,16 @@ export default { | |||||||
|     // 表单重置 |     // 表单重置 | ||||||
|     reset() { |     reset() { | ||||||
|       this.form = { |       this.form = { | ||||||
|         id: undefined, |  | ||||||
|         projectId: undefined, |         projectId: undefined, | ||||||
|         handbookId: undefined, |         projectName: undefined, | ||||||
|         category: undefined, |         projectStatus: undefined, | ||||||
|         name: undefined, |         projectAppProcId: undefined, | ||||||
|         createTime: undefined |         projectAppStaus: undefined, | ||||||
|  |         projectAppStTime: undefined, | ||||||
|  |         projectAppEndTime: undefined, | ||||||
|  |         projectLeader: undefined, | ||||||
|  |         projectBudget: undefined, | ||||||
|  |         projectLeaderPhone: undefined | ||||||
|       }; |       }; | ||||||
|       this.resetForm("form"); |       this.resetForm("form"); | ||||||
|     }, |     }, | ||||||
| @ -266,7 +368,7 @@ export default { | |||||||
|     }, |     }, | ||||||
|     // 多选框选中数据 |     // 多选框选中数据 | ||||||
|     handleSelectionChange(selection) { |     handleSelectionChange(selection) { | ||||||
|       this.ids = selection.map(item => item.id) |       this.ids = selection.map(item => item.projectId) | ||||||
|       this.single = selection.length!==1 |       this.single = selection.length!==1 | ||||||
|       this.multiple = !selection.length |       this.multiple = !selection.length | ||||||
|     }, |     }, | ||||||
| @ -274,35 +376,69 @@ export default { | |||||||
|     handleAdd() { |     handleAdd() { | ||||||
|       this.reset(); |       this.reset(); | ||||||
|       this.open = true; |       this.open = true; | ||||||
|       this.title = "添加科研管理"; |       this.title = "添加项目申报"; | ||||||
|     }, |     }, | ||||||
|     /** 修改按钮操作 */ |     /** 修改按钮操作 */ | ||||||
|     handleUpdate(row) { |     handleUpdate(row) { | ||||||
|       this.loading = true; |       this.loading = true; | ||||||
|       this.reset(); |       this.reset(); | ||||||
|       const id = row.id || this.ids |       const projectId = row.projectId || this.ids | ||||||
|       getProject(id).then(response => { |       getApplication(projectId).then(response => { | ||||||
|         this.loading = false; |         this.loading = false; | ||||||
|         this.form = response.data; |         this.form = response.data; | ||||||
|         this.open = true; |         this.open = true; | ||||||
|         this.title = "修改科研管理"; |         this.title = "修改项目申报"; | ||||||
|  |         console.log(this.form) | ||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|  |     /** | ||||||
|  |      * 根据填写的项目信息进行申报 | ||||||
|  |      */ | ||||||
|  |     declareProject(row){ | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 修改按钮操作 */ | ||||||
|  |     handleUpdateBudget(row) { | ||||||
|  |       this.loading = true; | ||||||
|  |       this.reset(); | ||||||
|  |       const upProjectId = row.projectId || this.ids | ||||||
|  | 
 | ||||||
|  |       // 查询项目经费追加流程 | ||||||
|  |       listProcess(this.queryProcParams).then(response => { | ||||||
|  |         this.processParams = response.rows[0]; | ||||||
|  |         this.deploymentId = this.processParams.deploymentId; | ||||||
|  |         this.definitionId = this.processParams.definitionId; | ||||||
|  |         // 流程名称暂时没有太大作用 | ||||||
|  |         // this.processName = this.processParams.processName; | ||||||
|  |         this.$router.push({ | ||||||
|  |           path: `/workflow/process/proj_update/${this.deploymentId}?definitionId=${this.definitionId}`, | ||||||
|  |           query: { | ||||||
|  |             projectId: upProjectId | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|     /** 提交按钮 */ |     /** 提交按钮 */ | ||||||
|     submitForm() { |     submitForm() { | ||||||
|  |       // $refs["form"].validate(valid => 验证表单是否有效 | ||||||
|       this.$refs["form"].validate(valid => { |       this.$refs["form"].validate(valid => { | ||||||
|         if (valid) { |         if (valid) { | ||||||
|           this.buttonLoading = true; |           this.buttonLoading = true; | ||||||
|           if (this.form.id != null) { |           // 判断是修改还是新增 | ||||||
|             updateProject(this.form).then(response => { |           if (this.form.projectId != null) { | ||||||
|  |             console.log(this.form) | ||||||
|  |             updateApplication(this.form).then(response => { | ||||||
|               this.$modal.msgSuccess("修改成功"); |               this.$modal.msgSuccess("修改成功"); | ||||||
|               this.open = false; |               this.open = false; | ||||||
|  |               // 提交成功后刷新列表 | ||||||
|               this.getList(); |               this.getList(); | ||||||
|             }).finally(() => { |             }).finally(() => { | ||||||
|               this.buttonLoading = false; |               this.buttonLoading = false; | ||||||
|             }); |             }); | ||||||
|           } else { |           } else { | ||||||
|             addProject(this.form).then(response => { | 
 | ||||||
|  |             addApplication(this.form).then(response => { | ||||||
|               this.$modal.msgSuccess("新增成功"); |               this.$modal.msgSuccess("新增成功"); | ||||||
|               this.open = false; |               this.open = false; | ||||||
|               this.getList(); |               this.getList(); | ||||||
| @ -315,10 +451,10 @@ export default { | |||||||
|     }, |     }, | ||||||
|     /** 删除按钮操作 */ |     /** 删除按钮操作 */ | ||||||
|     handleDelete(row) { |     handleDelete(row) { | ||||||
|       const ids = row.id || this.ids; |       const projectIds = row.projectId || this.ids; | ||||||
|       this.$modal.confirm('是否确认删除科研管理编号为"' + ids + '"的数据项?').then(() => { |       this.$modal.confirm('是否确认删除项目申报编号为"' + projectIds + '"的数据项?').then(() => { | ||||||
|         this.loading = true; |         this.loading = true; | ||||||
|         return delProject(ids); |         return delApplication(projectIds); | ||||||
|       }).then(() => { |       }).then(() => { | ||||||
|         this.loading = false; |         this.loading = false; | ||||||
|         this.getList(); |         this.getList(); | ||||||
| @ -330,9 +466,63 @@ export default { | |||||||
|     }, |     }, | ||||||
|     /** 导出按钮操作 */ |     /** 导出按钮操作 */ | ||||||
|     handleExport() { |     handleExport() { | ||||||
|       this.download('scientific/project/export', { |       this.download('scientific/application/export', { | ||||||
|         ...this.queryParams |         ...this.queryParams | ||||||
|       }, `project_${new Date().getTime()}.xlsx`) |       }, `application_${new Date().getTime()}.xlsx`) | ||||||
|  |     }, | ||||||
|  |     /** | ||||||
|  |      * 把项目状态的code转换未文字: 0 : 未立项  1: 审核中  2: 已立项 | ||||||
|  |      * @param   {number|string} cellValue - 原始数值 | ||||||
|  |      * @returns {string} 转换后的字符串 | ||||||
|  |      * @author  zhanli | ||||||
|  |      */ | ||||||
|  |     formatProjectAppStatus(cellValue) { | ||||||
|  |       switch (cellValue) { | ||||||
|  |         case '0': | ||||||
|  |           return "未立项"; | ||||||
|  |         case '1': | ||||||
|  |           return "审核中"; | ||||||
|  |         case '2': | ||||||
|  |           return "已立项"; | ||||||
|  |         default: | ||||||
|  |           return "未知状态"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     /** | ||||||
|  |      * 把项目状态的申报code转换为文字: 0 : 未申报  1: 审核中  2: 已申报 | ||||||
|  |      * @param   {number|string} cellValue - 原始数值 | ||||||
|  |      * @returns {string} 转换后的字符串 | ||||||
|  |      * @author  zhanli | ||||||
|  |      */ | ||||||
|  |     formatProjectDeclareStatus(cellValue) { | ||||||
|  |       switch (cellValue) { | ||||||
|  |         case '0': | ||||||
|  |           return "草稿"; | ||||||
|  |         case '1': | ||||||
|  |           return "审核中"; | ||||||
|  |         case '2': | ||||||
|  |           return "申报通过"; | ||||||
|  |         default: | ||||||
|  |           return "未知状态"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     getTagType(status) { | ||||||
|  |       switch (status) { | ||||||
|  |         case '2': | ||||||
|  |           // 显示绿色 审核通过绿色 | ||||||
|  |           return 'success'; | ||||||
|  |         case '1': | ||||||
|  |           // 审核中 显示黄色 | ||||||
|  |           return 'warning'; | ||||||
|  |         case '0': | ||||||
|  |           // 未申报, 灰色 | ||||||
|  |           return 'primary'; | ||||||
|  |         case '4': | ||||||
|  |           // 其他状态 灰色 | ||||||
|  |           return 'info'; | ||||||
|  |         default: | ||||||
|  |           return ''; | ||||||
|  |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
|  | |||||||
							
								
								
									
										163
									
								
								ruoyi-ui/src/views/scientific/project/projectApply.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										163
									
								
								ruoyi-ui/src/views/scientific/project/projectApply.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,163 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-card class="box-card"> | ||||||
|  |       <div slot="header" class="clearfix"> | ||||||
|  |         <span>{{ this.plan.planName }}</span> | ||||||
|  |       </div> | ||||||
|  | 
 | ||||||
|  |       <el-col :span="18" :offset="3"> | ||||||
|  |         <div class="form-conf" v-if="formOpen"> | ||||||
|  |           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { getProcessForm, listProcess, startProcess_ } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { findLatestDeploymentTimeIndex } from '@/api/scientific/project_application_plan' | ||||||
|  | import { addApplication } from '@/api/scientific/application' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: 'WorkStart', | ||||||
|  |   components: { | ||||||
|  |     Parser | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       definitionId: null, | ||||||
|  |       deployId: null, | ||||||
|  | 
 | ||||||
|  |       formOpen: false, | ||||||
|  |       formData: {}, | ||||||
|  | 
 | ||||||
|  |       plan: {}, | ||||||
|  | 
 | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "", | ||||||
|  |         category: "002" | ||||||
|  |       }, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       this.plan = this.$route.params && this.$route.params.plan; | ||||||
|  |       listProcess(this.queryParams).then(response => { | ||||||
|  |         findLatestDeploymentTimeIndex(response).then((latestIndex) => { | ||||||
|  |           this.processParams = response.rows[latestIndex]; | ||||||
|  |           this.processName = this.processParams.processName; | ||||||
|  |           this.definitionId = this.processParams.definitionId; | ||||||
|  |           getProcessForm({ | ||||||
|  |             definitionId: this.processParams.definitionId, | ||||||
|  |             deployId: this.processParams.deploymentId, | ||||||
|  |             procInsId: undefined | ||||||
|  |           }).then(res => { | ||||||
|  |             if (res.data) { | ||||||
|  |               this.formData = res.data; | ||||||
|  |               this.formOpen = true; | ||||||
|  |             } | ||||||
|  |           }) | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  | 
 | ||||||
|  |       // getProcessForm({ | ||||||
|  |       //   definitionId: this.definitionId, | ||||||
|  |       //   deployId: this.deployId, | ||||||
|  |       //   procInsId: undefined, | ||||||
|  |       // }).then(res => { | ||||||
|  |       //   if (res.data) { | ||||||
|  |       //     this.formData = res.data; | ||||||
|  |       //     this.formOpen = true | ||||||
|  |       //   } | ||||||
|  |       // }) | ||||||
|  |     }, | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submit(data) { | ||||||
|  |       if (data && this.definitionId) { | ||||||
|  |         // 启动流程并将表单数据加入流程变量 | ||||||
|  |         //startProcess_(this.definitionId, JSON.stringify(data.valData)).then(res => { | ||||||
|  |           const ori_data = data.valData; | ||||||
|  |           // zqjia:项目申报表单确定后这些信息要改 | ||||||
|  |           let projectData = {}; | ||||||
|  |           projectData.projectName = ori_data.projectName; | ||||||
|  |           projectData.projectStatus = 1; | ||||||
|  |           // 这里返回的是流程的Id | ||||||
|  |           projectData.projectAppProcId = ""; | ||||||
|  |           projectData.projectDeclareStatus = 1; | ||||||
|  |           projectData.projectAppStTime = this.formatDateTime(new Date()); | ||||||
|  |           projectData.projectAppEndTime = this.formatDateTime(new Date()); | ||||||
|  |           projectData.projectLeader = ori_data.directorName; | ||||||
|  |           projectData.projectBudget = ori_data.budgetSum; | ||||||
|  |           projectData.projectPlanId = this.plan.planId; | ||||||
|  |           projectData.projectPlanName = this.plan.planName; | ||||||
|  |           projectData.projectLeaderPhone = ori_data.phoneNumber; | ||||||
|  |           projectData.projectCategory = this.plan.planLevel; | ||||||
|  |           projectData.projectContent = ori_data.projectContent; | ||||||
|  | 
 | ||||||
|  |           projectData.projectPlanId = this.plan.planId; | ||||||
|  |           projectData.projectPlanName = this.plan.planName; | ||||||
|  | 
 | ||||||
|  |           addApplication(JSON.stringify(projectData)).then(response => { | ||||||
|  |             this.$modal.msgSuccess("申报完成"); | ||||||
|  |           }) | ||||||
|  | 
 | ||||||
|  |           this.$tab.closeOpenPage({ | ||||||
|  |             path: '/work/own' | ||||||
|  |           }) | ||||||
|  |         //}) | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     formatDateTime(date) { | ||||||
|  |       const padZero = (num) => (num < 10 ? '0' + num : num); | ||||||
|  | 
 | ||||||
|  |       const year = date.getFullYear(); | ||||||
|  |       const month = padZero(date.getMonth() + 1); // getMonth() 返回值的范围是 0-11,所以需要加 1 | ||||||
|  |       const day = padZero(date.getDate()); | ||||||
|  |       const hours = padZero(date.getHours()); | ||||||
|  |       const minutes = padZero(date.getMinutes()); | ||||||
|  |       const seconds = padZero(date.getSeconds()); | ||||||
|  | 
 | ||||||
|  |       return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .form-conf { | ||||||
|  |   margin: 15px auto; | ||||||
|  |   width: 80%; | ||||||
|  |   padding: 15px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @ -1,116 +0,0 @@ | |||||||
| <template> |  | ||||||
|   <div class="app-container"> |  | ||||||
|     <el-card class="box-card"> |  | ||||||
|       <div slot="header" class="clearfix"> |  | ||||||
|         <span>{{ processName }}</span> |  | ||||||
|       </div> |  | ||||||
| 
 |  | ||||||
|       <el-col :span="18" :offset="3"> |  | ||||||
|         <div class="form-conf" v-if="formOpen"> |  | ||||||
|           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> |  | ||||||
|         </div> |  | ||||||
|       </el-col> |  | ||||||
|     </el-card> |  | ||||||
|   </div> |  | ||||||
| </template> |  | ||||||
| 
 |  | ||||||
| <script> |  | ||||||
| import { getProcessForm, startProcess_ } from '@/api/workflow/process' |  | ||||||
| import Parser from '@/utils/generator/parser' |  | ||||||
| import {addProject} from "@/api/scientific/project"; |  | ||||||
| 
 |  | ||||||
| export default { |  | ||||||
|   name: 'WorkStart', |  | ||||||
|   components: { |  | ||||||
|     Parser |  | ||||||
|   }, |  | ||||||
|   data() { |  | ||||||
|     return { |  | ||||||
|       definitionId: null, |  | ||||||
|       deployId: null, |  | ||||||
|       procInsId: null, |  | ||||||
|       formOpen: false, |  | ||||||
|       formData: {}, |  | ||||||
| 
 |  | ||||||
|       processName: null, |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   created() { |  | ||||||
|     this.initData(); |  | ||||||
|   }, |  | ||||||
|   methods: { |  | ||||||
|     initData() { |  | ||||||
|       this.deployId = this.$route.params && this.$route.params.deployId; |  | ||||||
|       this.definitionId = this.$route.query && this.$route.query.definitionId; |  | ||||||
|       this.procInsId = this.$route.query && this.$route.query.procInsId; |  | ||||||
|       this.processName = this.$route.query && this.$route.query.processName; |  | ||||||
|       this.handbookId = this.$route.query && this.$route.query.handbookId; |  | ||||||
| 
 |  | ||||||
|       getProcessForm({ |  | ||||||
|         definitionId: this.definitionId, |  | ||||||
|         deployId: this.deployId, |  | ||||||
|         procInsId: this.procInsId |  | ||||||
|       }).then(res => { |  | ||||||
|         if (res.data) { |  | ||||||
|           this.formData = res.data; |  | ||||||
|           this.formOpen = true |  | ||||||
|         } |  | ||||||
|       }) |  | ||||||
|     }, |  | ||||||
|     /** 接收子组件传的值 */ |  | ||||||
|     getData(data) { |  | ||||||
|       if (data) { |  | ||||||
|         const variables = []; |  | ||||||
|         data.fields.forEach(item => { |  | ||||||
|           let variableData = {}; |  | ||||||
|           variableData.label = item.__config__.label |  | ||||||
|           // 表单值为多个选项时 |  | ||||||
|           if (item.__config__.defaultValue instanceof Array) { |  | ||||||
|             const array = []; |  | ||||||
|             item.__config__.defaultValue.forEach(val => { |  | ||||||
|               array.push(val) |  | ||||||
|             }) |  | ||||||
|             variableData.val = array; |  | ||||||
|           } else { |  | ||||||
|             variableData.val = item.__config__.defaultValue |  | ||||||
|           } |  | ||||||
|           variables.push(variableData) |  | ||||||
|         }) |  | ||||||
|         this.variables = variables; |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     submit(data) { |  | ||||||
|       if (data && this.definitionId) { |  | ||||||
|         // 启动流程并将表单数据加入流程变量 |  | ||||||
|         // console.log(data); |  | ||||||
|         startProcess_(this.definitionId, JSON.stringify(data.valData)).then(res => { |  | ||||||
|           let projectData = {}; |  | ||||||
|           projectData.handbookId = this.handbookId; |  | ||||||
|           projectData.projectId = res.msg; |  | ||||||
|           // zqjia:项目申报表单确定后这些信息要改 |  | ||||||
|           projectData.category = 1; |  | ||||||
|           projectData.name = data.valData.field101; |  | ||||||
|           projectData.createTime = "2024-07-15 23:28:17"; |  | ||||||
|           projectData.id = undefined; |  | ||||||
|           console.log(data); |  | ||||||
|           addProject(projectData).then(response => { |  | ||||||
|             this.$modal.msgSuccess("申报完成"); |  | ||||||
|           }) |  | ||||||
| 
 |  | ||||||
|           this.$tab.closeOpenPage({ |  | ||||||
|             path: '/work/own' |  | ||||||
|           }) |  | ||||||
|         }) |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| } |  | ||||||
| </script> |  | ||||||
| 
 |  | ||||||
| <style lang="scss" scoped> |  | ||||||
| .form-conf { |  | ||||||
|   margin: 15px auto; |  | ||||||
|   width: 80%; |  | ||||||
|   padding: 15px; |  | ||||||
| } |  | ||||||
| </style> |  | ||||||
| @ -0,0 +1,476 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-tabs tab-position="top" :value="processed === true ? 'approval' : 'form'"> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-tab-pane label="表单信息" name="form"> | ||||||
|  |         <div v-if="formOpen"> | ||||||
|  |           <el-card class="box-card" shadow="never" v-for="(formInfo, index) in processFormList" :key="index"> | ||||||
|  |             <div slot="header" class="clearfix"> | ||||||
|  | <!--              <span>{{ formInfo.title }}</span>--> | ||||||
|  |               <span> 计划详情 </span> | ||||||
|  |             </div> | ||||||
|  | 
 | ||||||
|  |             <!--流程处理表单模块--> | ||||||
|  |             <el-col :span="20" :offset="2"> | ||||||
|  |               <parser :form-conf="formInfo"/> | ||||||
|  |             </el-col> | ||||||
|  |           </el-card> | ||||||
|  |         </div> | ||||||
|  |       </el-tab-pane > | ||||||
|  | 
 | ||||||
|  |     </el-tabs> | ||||||
|  | 
 | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { detailProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { complete, delegate, transfer, rejectTask, returnList, returnTask } from '@/api/workflow/task' | ||||||
|  | import { selectUser, deptTreeSelect } from '@/api/system/user' | ||||||
|  | import ProcessViewer from '@/components/ProcessViewer' | ||||||
|  | import '@riophae/vue-treeselect/dist/vue-treeselect.css' | ||||||
|  | import Treeselect from '@riophae/vue-treeselect' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "WorkDetail", | ||||||
|  |   components: { | ||||||
|  |     ProcessViewer, | ||||||
|  |     Parser, | ||||||
|  |     Treeselect | ||||||
|  |   }, | ||||||
|  |   props: {}, | ||||||
|  |   computed: { | ||||||
|  |     commentType() { | ||||||
|  |       return val => { | ||||||
|  |         switch (val) { | ||||||
|  |           case '1': return '通过' | ||||||
|  |           case '2': return '退回' | ||||||
|  |           case '3': return '驳回' | ||||||
|  |           case '4': return '委派' | ||||||
|  |           case '5': return '转办' | ||||||
|  |           case '6': return '终止' | ||||||
|  |           case '7': return '撤回' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     approveTypeTag() { | ||||||
|  |       return val => { | ||||||
|  |         switch (val) { | ||||||
|  |           case '1': return 'success' | ||||||
|  |           case '2': return 'warning' | ||||||
|  |           case '3': return 'danger' | ||||||
|  |           case '4': return 'primary' | ||||||
|  |           case '5': return 'success' | ||||||
|  |           case '6': return 'danger' | ||||||
|  |           case '7': return 'info' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       height: document.documentElement.clientHeight - 205 + 'px;', | ||||||
|  |       // 模型xml数据 | ||||||
|  |       loadIndex: 0, | ||||||
|  |       xmlData: undefined, | ||||||
|  |       finishedInfo: { | ||||||
|  |         finishedSequenceFlowSet: [], | ||||||
|  |         finishedTaskSet: [], | ||||||
|  |         unfinishedTaskSet: [], | ||||||
|  |         rejectedTaskSet: [] | ||||||
|  |       }, | ||||||
|  |       historyProcNodeList: [], | ||||||
|  |       // 部门名称 | ||||||
|  |       deptName: undefined, | ||||||
|  |       // 部门树选项 | ||||||
|  |       deptOptions: undefined, | ||||||
|  |       userLoading: false, | ||||||
|  |       // 用户表格数据 | ||||||
|  |       userList: null, | ||||||
|  |       deptProps: { | ||||||
|  |         children: "children", | ||||||
|  |         label: "label" | ||||||
|  |       }, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         deptId: undefined | ||||||
|  |       }, | ||||||
|  |       total: 0, | ||||||
|  |       // 遮罩层 | ||||||
|  |       loading: true, | ||||||
|  |       taskForm:{ | ||||||
|  |         comment:"", // 意见内容 | ||||||
|  |         procInsId: "", // 流程实例编号 | ||||||
|  |         taskId: "" ,// 流程任务编号 | ||||||
|  |         copyUserIds: "", // 抄送人Id | ||||||
|  |         vars: "", | ||||||
|  |         targetKey:"" | ||||||
|  |       }, | ||||||
|  |       rules: { | ||||||
|  |         comment: [{ required: true, message: '请输入审批意见', trigger: 'blur' }], | ||||||
|  |       }, | ||||||
|  |       currentUserId: null, | ||||||
|  |       variables: [], // 流程变量数据 | ||||||
|  |       taskFormOpen: false, | ||||||
|  |       taskFormData: {}, // 流程变量数据 | ||||||
|  |       processFormList: [], // 流程变量数据 | ||||||
|  |       formOpen: false, // 是否加载流程变量数据 | ||||||
|  |       returnTaskList: [],  // 回退列表数据 | ||||||
|  |       processed: false, | ||||||
|  |       returnTitle: null, | ||||||
|  |       returnOpen: false, | ||||||
|  |       rejectOpen: false, | ||||||
|  |       rejectTitle: null, | ||||||
|  |       userData: { | ||||||
|  |         title: '', | ||||||
|  |         type: '', | ||||||
|  |         open: false, | ||||||
|  |       }, | ||||||
|  |       copyUser: [], | ||||||
|  |       nextUser: [], | ||||||
|  |       userMultipleSelection: [], | ||||||
|  |       userDialogTitle: '', | ||||||
|  |       userOpen: false | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       this.taskForm.procInsId = this.$route.params && this.$route.params.planProcId; | ||||||
|  |       this.taskForm.taskId  = this.$route.query && this.$route.query.taskId; | ||||||
|  |       this.processed = this.$route.query && eval(this.$route.query.processed || false); | ||||||
|  | 
 | ||||||
|  |       // 流程任务重获取变量表单 | ||||||
|  |       this.getProcessDetails(this.taskForm.procInsId, this.taskForm.taskId); | ||||||
|  |       this.loadIndex = this.taskForm.procInsId; | ||||||
|  |     }, | ||||||
|  |     /** 查询部门下拉树结构 */ | ||||||
|  |     getTreeSelect() { | ||||||
|  |       deptTreeSelect().then(response => { | ||||||
|  |         this.deptOptions = response.data; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 查询用户列表 */ | ||||||
|  |     getList() { | ||||||
|  |       this.userLoading = true; | ||||||
|  |       selectUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => { | ||||||
|  |         this.userList = response.rows; | ||||||
|  |         this.total = response.total; | ||||||
|  |         this.toggleSelection(this.userMultipleSelection); | ||||||
|  |         this.userLoading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     // 筛选节点 | ||||||
|  |     filterNode(value, data) { | ||||||
|  |       if (!value) return true; | ||||||
|  |       return data.label.indexOf(value) !== -1; | ||||||
|  |     }, | ||||||
|  |     // 节点单击事件 | ||||||
|  |     handleNodeClick(data) { | ||||||
|  |       this.queryParams.deptId = data.id; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     setIcon(val) { | ||||||
|  |       if (val) { | ||||||
|  |         return "el-icon-check"; | ||||||
|  |       } else { | ||||||
|  |         return "el-icon-time"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     setColor(val) { | ||||||
|  |       if (val) { | ||||||
|  |         return "#2bc418"; | ||||||
|  |       } else { | ||||||
|  |         return "#b3bdbb"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     // 多选框选中数据 | ||||||
|  |     handleSelectionChange(selection) { | ||||||
|  |       this.userMultipleSelection = selection | ||||||
|  |     }, | ||||||
|  |     toggleSelection(selection) { | ||||||
|  |       if (selection && selection.length > 0) { | ||||||
|  |         this.$nextTick(()=> { | ||||||
|  |           selection.forEach(item => { | ||||||
|  |             let row = this.userList.find(k => k.userId === item.userId); | ||||||
|  |             this.$refs.userTable.toggleRowSelection(row); | ||||||
|  |           }) | ||||||
|  |         }) | ||||||
|  |       } else { | ||||||
|  |         this.$nextTick(() => { | ||||||
|  |           this.$refs.userTable.clearSelection(); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     // 关闭标签 | ||||||
|  |     handleClose(type, tag) { | ||||||
|  |       let userObj = this.userMultipleSelection.find(item => item.userId === tag.id); | ||||||
|  |       this.userMultipleSelection.splice(this.userMultipleSelection.indexOf(userObj), 1); | ||||||
|  |       if (type === 'copy') { | ||||||
|  |         this.copyUser = this.userMultipleSelection; | ||||||
|  |         // 设置抄送人ID | ||||||
|  |         if (this.copyUser && this.copyUser.length > 0) { | ||||||
|  |           const val = this.copyUser.map(item => item.id); | ||||||
|  |           this.taskForm.copyUserIds = val instanceof Array ? val.join(',') : val; | ||||||
|  |         } else { | ||||||
|  |           this.taskForm.copyUserIds = ''; | ||||||
|  |         } | ||||||
|  |       } else if (type === 'next') { | ||||||
|  |         this.nextUser = this.userMultipleSelection; | ||||||
|  |         // 设置抄送人ID | ||||||
|  |         if (this.nextUser && this.nextUser.length > 0) { | ||||||
|  |           const val = this.nextUser.map(item => item.id); | ||||||
|  |           this.taskForm.nextUserIds = val instanceof Array ? val.join(',') : val; | ||||||
|  |         } else { | ||||||
|  |           this.taskForm.nextUserIds = ''; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     /** 流程变量赋值 */ | ||||||
|  |     handleCheckChange(val) { | ||||||
|  |       if (val instanceof Array) { | ||||||
|  |         this.taskForm.values = { | ||||||
|  |           "approval": val.join(',') | ||||||
|  |         } | ||||||
|  |       } else { | ||||||
|  |         this.taskForm.values = { | ||||||
|  |           "approval": val | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     getProcessDetails(procInsId, taskId) { | ||||||
|  |       const params = {procInsId: procInsId, taskId: taskId} | ||||||
|  |       detailProcess(params).then(res => { | ||||||
|  |         const data = res.data; | ||||||
|  |         this.xmlData = data.bpmnXml; | ||||||
|  |         this.processFormList = data.processFormList; | ||||||
|  |         this.taskFormOpen = data.existTaskForm; | ||||||
|  |         if (this.taskFormOpen) { | ||||||
|  |           this.taskFormData = data.taskFormData; | ||||||
|  |         } | ||||||
|  |         this.historyProcNodeList = data.historyProcNodeList; | ||||||
|  |         this.finishedInfo = data.flowViewer; | ||||||
|  |         this.formOpen = true; | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     onSelectCopyUsers() { | ||||||
|  |       this.userMultipleSelection = this.copyUser; | ||||||
|  |       this.onSelectUsers('添加抄送人', 'copy') | ||||||
|  |     }, | ||||||
|  |     onSelectNextUsers() { | ||||||
|  |       this.userMultipleSelection = this.nextUser; | ||||||
|  |       this.onSelectUsers('指定审批人', 'next') | ||||||
|  |     }, | ||||||
|  |     onSelectUsers(title, type) { | ||||||
|  |       this.userData.title = title; | ||||||
|  |       this.userData.type = type; | ||||||
|  |       this.getTreeSelect(); | ||||||
|  |       this.getList() | ||||||
|  |       this.userData.open = true; | ||||||
|  |     }, | ||||||
|  |     /** 通过任务 */ | ||||||
|  |     handleComplete() { | ||||||
|  |       // 校验表单 | ||||||
|  |       const taskFormRef = this.$refs.taskFormParser; | ||||||
|  |       const isExistTaskForm = taskFormRef !== undefined; | ||||||
|  |       // 若无任务表单,则 taskFormPromise 为 true,即不需要校验 | ||||||
|  |       const taskFormPromise = !isExistTaskForm ? true : new Promise((resolve, reject) => { | ||||||
|  |         taskFormRef.$refs[taskFormRef.formConfCopy.formRef].validate(valid => { | ||||||
|  |           valid ? resolve() : reject() | ||||||
|  |         }) | ||||||
|  |       }); | ||||||
|  |       const approvalPromise = new Promise((resolve, reject) => { | ||||||
|  |         this.$refs['taskForm'].validate(valid => { | ||||||
|  |           valid ? resolve() : reject() | ||||||
|  |         }) | ||||||
|  |       }); | ||||||
|  |       Promise.all([taskFormPromise, approvalPromise]).then(() => { | ||||||
|  |         if (isExistTaskForm) { | ||||||
|  |           this.taskForm.variables = taskFormRef[taskFormRef.formConfCopy.formModel] | ||||||
|  |         } | ||||||
|  |         complete(this.taskForm).then(response => { | ||||||
|  |           this.$modal.msgSuccess(response.msg); | ||||||
|  |           this.goBack(); | ||||||
|  |         }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 委派任务 */ | ||||||
|  |     handleDelegate() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.userData.type = 'delegate'; | ||||||
|  |           this.userData.title = '委派任务' | ||||||
|  |           this.userData.open = true; | ||||||
|  |           this.getTreeSelect(); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 转办任务 */ | ||||||
|  |     handleTransfer(){ | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.userData.type = 'transfer'; | ||||||
|  |           this.userData.title = '转办任务'; | ||||||
|  |           this.userData.open = true; | ||||||
|  |           this.getTreeSelect(); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     /** 拒绝任务 */ | ||||||
|  |     handleReject() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           const _this = this; | ||||||
|  |           this.$modal.confirm('拒绝审批单流程会终止,是否继续?').then(function() { | ||||||
|  |             return rejectTask(_this.taskForm); | ||||||
|  |           }).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     changeCurrentUser(val) { | ||||||
|  |       this.currentUserId = val.userId | ||||||
|  |     }, | ||||||
|  |     /** 返回页面 */ | ||||||
|  |     goBack() { | ||||||
|  |       // 关闭当前标签页并返回上个页面 | ||||||
|  |       this.$tab.closePage(this.$route) | ||||||
|  |       this.$router.back() | ||||||
|  |     }, | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submitUserData() { | ||||||
|  |       let type = this.userData.type; | ||||||
|  |       if (type === 'copy' || type === 'next') { | ||||||
|  |         if (!this.userMultipleSelection || this.userMultipleSelection.length <= 0) { | ||||||
|  |           this.$modal.msgError("请选择用户"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         let userIds = this.userMultipleSelection.map(k => k.userId); | ||||||
|  |         if (type === 'copy') { | ||||||
|  |           // 设置抄送人ID信息 | ||||||
|  |           this.copyUser = this.userMultipleSelection; | ||||||
|  |           this.taskForm.copyUserIds = userIds instanceof Array ? userIds.join(',') : userIds; | ||||||
|  |         } else if (type === 'next') { | ||||||
|  |           // 设置下一级审批人ID信息 | ||||||
|  |           this.nextUser = this.userMultipleSelection; | ||||||
|  |           this.taskForm.nextUserIds = userIds instanceof Array ? userIds.join(',') : userIds; | ||||||
|  |         } | ||||||
|  |         this.userData.open = false; | ||||||
|  |       } else { | ||||||
|  |         if (!this.taskForm.comment) { | ||||||
|  |           this.$modal.msgError("请输入审批意见"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         if (!this.currentUserId) { | ||||||
|  |           this.$modal.msgError("请选择用户"); | ||||||
|  |           return false; | ||||||
|  |         } | ||||||
|  |         this.taskForm.userId = this.currentUserId; | ||||||
|  |         if (type === 'delegate') { | ||||||
|  |           delegate(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |         if (type === 'transfer') { | ||||||
|  |           transfer(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack(); | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 可退回任务列表 */ | ||||||
|  |     handleReturn() { | ||||||
|  |       this.$refs['taskForm'].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.returnTitle = "退回流程"; | ||||||
|  |           returnList(this.taskForm).then(res => { | ||||||
|  |             this.returnTaskList = res.data; | ||||||
|  |             this.taskForm.values = null; | ||||||
|  |             this.returnOpen = true; | ||||||
|  |           }) | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 提交退回任务 */ | ||||||
|  |     submitReturn() { | ||||||
|  |       this.$refs["taskForm"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           if (!this.taskForm.targetKey) { | ||||||
|  |             this.$modal.msgError("请选择退回节点!"); | ||||||
|  |           } | ||||||
|  |           returnTask(this.taskForm).then(res => { | ||||||
|  |             this.$modal.msgSuccess(res.msg); | ||||||
|  |             this.goBack() | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .clearfix:before, | ||||||
|  | .clearfix:after { | ||||||
|  |   display: table; | ||||||
|  |   content: ""; | ||||||
|  | } | ||||||
|  | .clearfix:after { | ||||||
|  |   clear: both | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .box-card { | ||||||
|  |   width: 100%; | ||||||
|  |   margin-bottom: 20px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-tag + .el-tag { | ||||||
|  |   margin-left: 10px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .el-row { | ||||||
|  |   margin-bottom: 20px; | ||||||
|  |   &:last-child { | ||||||
|  |     margin-bottom: 0; | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | .el-col { | ||||||
|  |   border-radius: 4px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | .button-new-tag { | ||||||
|  |   margin-left: 10px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										492
									
								
								ruoyi-ui/src/views/scientific/project_application_plan/index.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										492
									
								
								ruoyi-ui/src/views/scientific/project_application_plan/index.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,492 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|  |       <el-form-item label="申报计划名称" prop="planName" label-width="100px" > | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.planName" | ||||||
|  |           placeholder="请输入申报计划名称" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="申报计划级别" prop="planLevel" label-width="100px"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.planLevel" | ||||||
|  |           placeholder="请输入申报计划级别" | ||||||
|  |           clearable | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="申报开始日期" prop="projectAppStTime" label-width="100px"> | ||||||
|  |         <el-date-picker clearable | ||||||
|  |           v-model="queryParams.projectAppStTime" | ||||||
|  |           type="date" | ||||||
|  |           value-format="yyyy-MM-dd" | ||||||
|  |           placeholder="请选择申报开始日期"> | ||||||
|  |         </el-date-picker> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item label="申报结束日期" prop="projectAppEndTime" label-width="100px"> | ||||||
|  |         <el-date-picker clearable | ||||||
|  |           v-model="queryParams.projectAppEndTime" | ||||||
|  |           type="date" | ||||||
|  |           value-format="yyyy-MM-dd" | ||||||
|  |           placeholder="请选择申报结束日期"> | ||||||
|  |         </el-date-picker> | ||||||
|  |       </el-form-item> | ||||||
|  | 
 | ||||||
|  |       <el-form-item> | ||||||
|  |         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||||
|  |         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||||
|  |       </el-form-item> | ||||||
|  |     </el-form> | ||||||
|  | 
 | ||||||
|  |     <el-row :gutter="10" class="mb8"> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="primary" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-plus" | ||||||
|  |           size="mini" | ||||||
|  |           @click="handleAdd" | ||||||
|  |           v-hasPermi="['scientific:plan:add']" | ||||||
|  |         >新增</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="success" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-edit" | ||||||
|  |           size="mini" | ||||||
|  |           :disabled="single" | ||||||
|  |           @click="handleUpdate" | ||||||
|  |           v-hasPermi="['scientific:plan:edit']" | ||||||
|  |         >修改</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="danger" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-delete" | ||||||
|  |           size="mini" | ||||||
|  |           :disabled="multiple" | ||||||
|  |           @click="handleDelete" | ||||||
|  |           v-hasPermi="['scientific:plan:remove']" | ||||||
|  |         >删除</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="warning" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-download" | ||||||
|  |           size="mini" | ||||||
|  |           @click="handleExport" | ||||||
|  |           v-hasPermi="['scientific:plan:export']" | ||||||
|  |         >导出</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |     </el-row> | ||||||
|  | 
 | ||||||
|  |     <el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange"> | ||||||
|  |       <el-table-column type="selection" width="55" align="center" /> | ||||||
|  |       <el-table-column label="序号" type="index" width="50"></el-table-column> | ||||||
|  |       <el-table-column label="申报计划名称" align="center" prop="planName" :min-width="100"/> | ||||||
|  |       <el-table-column label="申报计划级别" align="center" width="100px" :min-width="100"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-tag size="medium" :type="getTagLevelType(scope.row.planLevel)"> | ||||||
|  |             {{ formatplanLevel(scope.row.planLevel) }} | ||||||
|  |           </el-tag> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="申报开始日期" align="center" prop="projectAppStTime" width="180"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <span>{{ parseTime(scope.row.projectAppStTime, '{y}-{m}-{d}') }}</span> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |       <el-table-column label="申报结束日期" align="center" prop="projectAppEndTime" width="180"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <span>{{ parseTime(scope.row.projectAppEndTime, '{y}-{m}-{d}') }}</span> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="已申报项目" align="center" prop="projectAppStTime" width="180"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-button plain | ||||||
|  |             size="mini" | ||||||
|  |             @click="listProjectInPlan(scope.row.planId)" | ||||||
|  |             v-hasPermi="['scientific:plan:list']" | ||||||
|  |           >{{ scope.row.nProject }}</el-button> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="申报状态" align="center" width="100px" :min-width="100"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-tag size="medium" :type="getTagType(isCurrentDateInRange(scope.row.projectAppStTime, scope.row.projectAppEndTime))"> | ||||||
|  |             {{ isCurrentDateInRange(scope.row.projectAppStTime, scope.row.projectAppEndTime) }} | ||||||
|  |           </el-tag> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-button | ||||||
|  |             type="primary" | ||||||
|  |             icon="el-icon-top" | ||||||
|  |             size="mini" | ||||||
|  |             @click="planDetail(scope.row)" | ||||||
|  |             v-hasPermi="['scientific:plan:list']" | ||||||
|  |             style="width: 80px" | ||||||
|  |           >查看计划</el-button> | ||||||
|  | 
 | ||||||
|  |           <el-button | ||||||
|  |             type="primary" | ||||||
|  |             icon="el-icon-top" | ||||||
|  |             size="mini" | ||||||
|  |             @click="projectApply(scope.row)" | ||||||
|  |             :disabled="isCurrentDateInRange(scope.row.projectAppStTime, scope.row.projectAppEndTime) !== '申报中'" | ||||||
|  |             v-hasPermi="['scientific:plan:list']" | ||||||
|  |             style="width: 80px" | ||||||
|  |           >进入申报</el-button> | ||||||
|  | 
 | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |     </el-table> | ||||||
|  | 
 | ||||||
|  |     <pagination | ||||||
|  |       v-show="total>0" | ||||||
|  |       :total="total" | ||||||
|  |       :page.sync="queryParams.pageNum" | ||||||
|  |       :limit.sync="queryParams.pageSize" | ||||||
|  |       @pagination="getList" | ||||||
|  |     /> | ||||||
|  | 
 | ||||||
|  |     <!-- 添加或修改项目申报v2对话框 --> | ||||||
|  |     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||||||
|  |       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||||
|  |         <el-form-item label="申报信息名称" prop="planName"> | ||||||
|  |           <el-input v-model="form.planName" placeholder="请输入申报信息名称" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目立项流程实例Id" prop="planProcId"> | ||||||
|  |           <el-input v-model="form.planProcId" placeholder="请输入项目立项流程实例Id" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目指南级别(0市级 1区级 3省级 4国家级)" prop="planLevel"> | ||||||
|  |           <el-input v-model="form.planLevel" placeholder="请输入项目指南级别(0市级 1区级 3省级 4国家级)" /> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="申报开始日期" prop="projectAppStTime"> | ||||||
|  |           <el-date-picker clearable | ||||||
|  |             v-model="form.projectAppStTime" | ||||||
|  |             type="datetime" | ||||||
|  |             value-format="yyyy-MM-dd HH:mm:ss" | ||||||
|  |             placeholder="请选择申报开始日期"> | ||||||
|  |           </el-date-picker> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="申报结束日期" prop="projectAppEndTime"> | ||||||
|  |           <el-date-picker clearable | ||||||
|  |             v-model="form.projectAppEndTime" | ||||||
|  |             type="datetime" | ||||||
|  |             value-format="yyyy-MM-dd HH:mm:ss" | ||||||
|  |             placeholder="请选择申报结束日期"> | ||||||
|  |           </el-date-picker> | ||||||
|  |         </el-form-item> | ||||||
|  | 
 | ||||||
|  |       </el-form> | ||||||
|  |       <div slot="footer" class="dialog-footer"> | ||||||
|  |         <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||||||
|  |         <el-button @click="cancel">取 消</el-button> | ||||||
|  |       </div> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { listPlan, getPlan, delPlan, addPlan, updatePlan } from "@/api/scientific/project_application_plan"; | ||||||
|  | import { listProcess } from '@/api/workflow/process' | ||||||
|  | import { listApplication } from '@/api/scientific/application' | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: "Plan", | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       // 按钮loading | ||||||
|  |       buttonLoading: false, | ||||||
|  |       // 遮罩层 | ||||||
|  |       loading: true, | ||||||
|  |       // 选中数组 | ||||||
|  |       ids: [], | ||||||
|  |       // 非单个禁用 | ||||||
|  |       single: true, | ||||||
|  |       // 非多个禁用 | ||||||
|  |       multiple: true, | ||||||
|  |       // 显示搜索条件 | ||||||
|  |       showSearch: true, | ||||||
|  |       // 总条数 | ||||||
|  |       total: 0, | ||||||
|  |       // 项目申报v2表格数据 | ||||||
|  |       planList: [], | ||||||
|  |       // 弹出层标题 | ||||||
|  |       title: "", | ||||||
|  |       // 是否显示弹出层 | ||||||
|  |       open: false, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         planName: undefined, | ||||||
|  |         planProcId: undefined, | ||||||
|  |         planStatus: "3", | ||||||
|  |         planCategory: undefined, | ||||||
|  |         planLevel: undefined, | ||||||
|  |       }, | ||||||
|  |       // 表单参数 | ||||||
|  |       form: {}, | ||||||
|  |       // 表单校验 | ||||||
|  |       rules: { | ||||||
|  |         planName: [ | ||||||
|  |           { required: true, message: "申报信息名称不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |         planLevel: [ | ||||||
|  |           { required: true, message: "项目指南级别(0市级 1区级 3省级 4国家级)不能为空", trigger: "blur" } | ||||||
|  |         ], | ||||||
|  |       } | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.getList(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     /** 查询项目申报v2列表 */ | ||||||
|  |     getList() { | ||||||
|  |       this.loading = true; | ||||||
|  |       listPlan(this.queryParams).then(response => { | ||||||
|  |         this.planList = response.rows; | ||||||
|  |         this.total = response.total; | ||||||
|  |         // 使用Promise.all来处理异步操作 | ||||||
|  |         const promises = this.planList.map(item => { | ||||||
|  |           const queryParams = { | ||||||
|  |             pageNum: 1, | ||||||
|  |               pageSize: 10, | ||||||
|  |               projectPlanId: item.planId, | ||||||
|  |           }; | ||||||
|  |           listApplication(queryParams).then(res => { | ||||||
|  |             // zqjia:后续考虑是否保存整个res的信息 | ||||||
|  |             this.$set(item, "nProject", res.total); | ||||||
|  |           }); | ||||||
|  |         }); | ||||||
|  | 
 | ||||||
|  |         Promise.all(promises).then(() => { | ||||||
|  |           // 所有异步操作完成后,更新loading状态 | ||||||
|  |           this.loading = false; | ||||||
|  |         }); | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     // 取消按钮 | ||||||
|  |     cancel() { | ||||||
|  |       this.open = false; | ||||||
|  |       this.reset(); | ||||||
|  |     }, | ||||||
|  |     // 表单重置 | ||||||
|  |     reset() { | ||||||
|  |       this.form = { | ||||||
|  |         planId: undefined, | ||||||
|  |         planName: undefined, | ||||||
|  |         planProcId: undefined, | ||||||
|  |         planStatus: undefined, | ||||||
|  |         planCategory: undefined, | ||||||
|  |         planLevel: undefined, | ||||||
|  |       }; | ||||||
|  |       this.resetForm("form"); | ||||||
|  |     }, | ||||||
|  |     /** 搜索按钮操作 */ | ||||||
|  |     handleQuery() { | ||||||
|  |       this.queryParams.pageNum = 1; | ||||||
|  |       this.getList(); | ||||||
|  |     }, | ||||||
|  |     /** 重置按钮操作 */ | ||||||
|  |     resetQuery() { | ||||||
|  |       this.resetForm("queryForm"); | ||||||
|  |       this.handleQuery(); | ||||||
|  |     }, | ||||||
|  |     // 多选框选中数据 | ||||||
|  |     handleSelectionChange(selection) { | ||||||
|  |       this.ids = selection.map(item => item.planId) | ||||||
|  |       this.single = selection.length!==1 | ||||||
|  |       this.multiple = !selection.length | ||||||
|  |     }, | ||||||
|  |     /** 新增按钮操作 */ | ||||||
|  |     handleAdd() { | ||||||
|  |       this.reset(); | ||||||
|  |       this.open = true; | ||||||
|  |       this.title = "添加项目申报v2"; | ||||||
|  |     }, | ||||||
|  |     /** 修改按钮操作 */ | ||||||
|  |     handleUpdate(row) { | ||||||
|  |       this.loading = true; | ||||||
|  |       this.reset(); | ||||||
|  |       const planId = row.planId || this.ids | ||||||
|  |       getPlan(planId).then(response => { | ||||||
|  |         this.loading = false; | ||||||
|  |         this.form = response.data; | ||||||
|  |         this.open = true; | ||||||
|  |         this.title = "修改项目申报v2"; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 提交按钮 */ | ||||||
|  |     submitForm() { | ||||||
|  |       this.$refs["form"].validate(valid => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.buttonLoading = true; | ||||||
|  |           if (this.form.planId != null) { | ||||||
|  |             updatePlan(this.form).then(response => { | ||||||
|  |               this.$modal.msgSuccess("修改成功"); | ||||||
|  |               this.open = false; | ||||||
|  |               this.getList(); | ||||||
|  |             }).finally(() => { | ||||||
|  |               this.buttonLoading = false; | ||||||
|  |             }); | ||||||
|  |           } else { | ||||||
|  |             addPlan(this.form).then(response => { | ||||||
|  |               this.$modal.msgSuccess("新增成功"); | ||||||
|  |               this.open = false; | ||||||
|  |               this.getList(); | ||||||
|  |             }).finally(() => { | ||||||
|  |               this.buttonLoading = false; | ||||||
|  |             }); | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 删除按钮操作 */ | ||||||
|  |     handleDelete(row) { | ||||||
|  |       const planIds = row.planId || this.ids; | ||||||
|  |       this.$modal.confirm('是否确认删除项目申报计划编号为"' + planIds + '"的数据项?').then(() => { | ||||||
|  |         this.loading = true; | ||||||
|  |         return delPlan(planIds); | ||||||
|  |       }).then(() => { | ||||||
|  |         this.loading = false; | ||||||
|  |         this.getList(); | ||||||
|  |         this.$modal.msgSuccess("删除成功"); | ||||||
|  |       }).catch(() => { | ||||||
|  |       }).finally(() => { | ||||||
|  |         this.loading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     /** 导出按钮操作 */ | ||||||
|  |     handleExport() { | ||||||
|  |       this.download('scientific/plan/export', { | ||||||
|  |         ...this.queryParams | ||||||
|  |       }, `plan_${new Date().getTime()}.xlsx`) | ||||||
|  |     }, | ||||||
|  |         /** | ||||||
|  |      * 把项目状态的申报code转换为文字: 0 : 未申报  1: 审核中  2: 已申报 | ||||||
|  |      * @param   {number|string} cellValue - 原始数值 | ||||||
|  |      * @returns {string} 转换后的字符串 | ||||||
|  |      * @author  zhanli | ||||||
|  |      */ | ||||||
|  | 
 | ||||||
|  |     formatplanLevel(cellValue) { | ||||||
|  |       switch (cellValue) { | ||||||
|  |         case '1': | ||||||
|  |           return "国家级"; | ||||||
|  |         case '2': | ||||||
|  |           return "省级"; | ||||||
|  |         case '3': | ||||||
|  |           return "市级"; | ||||||
|  |         case '4': | ||||||
|  |           return "院级"; | ||||||
|  |         default: | ||||||
|  |           return "未知"; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     getTagType(status) { | ||||||
|  |       switch (status) { | ||||||
|  |         case '已结束': | ||||||
|  |           // 显示红色 停止申报 | ||||||
|  |           return 'danger'; | ||||||
|  |         case '申报中': | ||||||
|  |           // 审核中 显示绿色 | ||||||
|  |           return 'success'; | ||||||
|  |         case '未开始': | ||||||
|  |           // 未申报, 灰色 | ||||||
|  |           return 'info'; | ||||||
|  |         default: | ||||||
|  |           return ''; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     getTagLevelType(status) { | ||||||
|  |       switch (status) { | ||||||
|  |         case '2': | ||||||
|  |           // 省级 蓝色 | ||||||
|  |           return 'primary'; | ||||||
|  |         case '3': | ||||||
|  |           // 市级 显示绿色 | ||||||
|  |           return 'success'; | ||||||
|  |         case '4': | ||||||
|  |           // 院级, 灰色 | ||||||
|  |           return 'info'; | ||||||
|  |         case '1': | ||||||
|  |           // 国家级 红色 | ||||||
|  |           return 'danger'; | ||||||
|  |         default: | ||||||
|  |           return ''; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     isCurrentDateInRange(startDate, endDate) { | ||||||
|  |       // 获取当前时间 | ||||||
|  |       const currentDate = new Date(); | ||||||
|  | 
 | ||||||
|  |       // 将字符串日期转换为Date对象 | ||||||
|  |       const start = new Date(startDate); | ||||||
|  |       const end = new Date(endDate); | ||||||
|  | 
 | ||||||
|  |       // 判断当前时间是否在范围内 | ||||||
|  |       if(currentDate >= start && currentDate <= end) { | ||||||
|  |         return "申报中"; | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         if(currentDate < start) { | ||||||
|  |           return "未开始"; | ||||||
|  |         } | ||||||
|  |         else { | ||||||
|  |           return "已结束"; | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     projectApply(row) { | ||||||
|  |       // 跳转到项目申报 | ||||||
|  |       this.$router.push({ | ||||||
|  |         name: 'ProjectApply', | ||||||
|  |         params: { | ||||||
|  |           plan: row | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     listProjectInPlan(planId) { | ||||||
|  |       if (planId === undefined) { | ||||||
|  |         planId = 1; | ||||||
|  |       } | ||||||
|  |       let queryParams = { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         projectPlanId: planId, | ||||||
|  |       }; | ||||||
|  |       this.$router.push({ | ||||||
|  |         name: 'planProjectQuery', | ||||||
|  |         params: { | ||||||
|  |           planId: planId, | ||||||
|  |           queryParams: queryParams, | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |     planDetail(row) { | ||||||
|  |       this.$router.push({ | ||||||
|  |         path: '/scientific/project_application_plan/detail/' + row.planProcId, | ||||||
|  |         query: { | ||||||
|  |           processed: false, | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
| @ -0,0 +1,175 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-card class="box-card"> | ||||||
|  |       <div slot="header" class="clearfix"> | ||||||
|  |         <span>{{ processName }}</span> | ||||||
|  |       </div> | ||||||
|  | 
 | ||||||
|  |       <el-col :span="18" :offset="3"> | ||||||
|  |         <div class="form-conf" v-if="formOpen"> | ||||||
|  |           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { listProcess, startProcess_ } from '@/api/workflow/process' | ||||||
|  | import { getProcessForm, startProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { addPlan, findLatestDeploymentTimeIndex } from '@/api/scientific/project_application_plan' | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   name: 'planApply', | ||||||
|  |   components: { | ||||||
|  |     Parser | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       definitionId: null, | ||||||
|  |       deployId: null, | ||||||
|  |       procInsId: null, | ||||||
|  |       formOpen: false, | ||||||
|  |       formData: {}, | ||||||
|  | 
 | ||||||
|  |       processName: '', | ||||||
|  |       categoryOptions: [], | ||||||
|  |       // 流程定义表格数据 | ||||||
|  |       processParams: null, | ||||||
|  |       // 查询参数 | ||||||
|  |       queryParams: { | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "", | ||||||
|  |         category: "007" | ||||||
|  |       }, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       this.handbook = this.$route.params && this.$route.params.handbook; | ||||||
|  | 
 | ||||||
|  |       /** 查询流程定义列表 */ | ||||||
|  |       listProcess(this.queryParams).then(response => { | ||||||
|  |         findLatestDeploymentTimeIndex(response).then((latestIndex) => { | ||||||
|  |           this.processParams = response.rows[latestIndex]; | ||||||
|  |           this.processName = this.processParams.processName; | ||||||
|  |           this.definitionId = this.processParams.definitionId; | ||||||
|  |           getProcessForm({ | ||||||
|  |             definitionId: this.processParams.definitionId, | ||||||
|  |             deployId: this.processParams.deploymentId, | ||||||
|  |             procInsId: undefined | ||||||
|  |             }).then(res => { | ||||||
|  |               if (res.data) { | ||||||
|  |                 this.formData = res.data; | ||||||
|  |                 this.formOpen = true; | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |           }); | ||||||
|  |       }) | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submit(data) { | ||||||
|  |       if (data && this.definitionId) { | ||||||
|  |         // 启动流程并将表单数据加入流程变量 | ||||||
|  |         startProcess_(this.definitionId, JSON.stringify(data.valData)).then(res => { | ||||||
|  |           if (res.code !== 200) { | ||||||
|  |             this.$modal.msgError("操作失败"); | ||||||
|  |             return; | ||||||
|  |           } | ||||||
|  |           let planData = data.valData; | ||||||
|  |           planData.planProcId = res.msg; | ||||||
|  |           // zqjia:默认刚录入指南时状态为审核中,但后端会改为未审核 | ||||||
|  |           planData.planStatus = 1; | ||||||
|  |           // zqjia:现在表单里的日期选择没有精确到小时,所以需要处理日期格式,后续要去掉 | ||||||
|  |           const date1 = new Date(planData.projectAppStTime); | ||||||
|  |           const date2 = new Date(planData.projectAppEndTime); | ||||||
|  |           planData.projectAppStTime = this.formatDateTime(date1); | ||||||
|  |           planData.projectAppEndTime = this.formatDateTime(date2); | ||||||
|  |           const date3 = new Date(planData.reviewStTime); | ||||||
|  |           const date4 = new Date(planData.reviewEndTime); | ||||||
|  |           planData.reviewStTime = this.formatDateTime(date3); | ||||||
|  |           planData.reviewEndTime = this.formatDateTime(date4); | ||||||
|  |           // zqjia:解析planFile,不然无法存到数据库中 | ||||||
|  |           const files = planData.planFile; | ||||||
|  |           if (files !== null) { | ||||||
|  |             let formatedFiles = {}; | ||||||
|  |             files.forEach(file => { | ||||||
|  |               if(file.response.code === 200 && file.ossId) { | ||||||
|  |                 formatedFiles[file.name] = file.ossId; | ||||||
|  |               } | ||||||
|  |             }) | ||||||
|  |             planData.planFile = JSON.stringify(formatedFiles); | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           if (this.handbook !== undefined) { | ||||||
|  |             planData.handbookId = this.handbook.handbookId | ||||||
|  |           } | ||||||
|  | 
 | ||||||
|  |           addPlan(JSON.stringify(planData)).then(resp => { | ||||||
|  |             if (res.code !== 200) { | ||||||
|  |               this.$modal.msgError("操作失败"); | ||||||
|  |               return; | ||||||
|  |             } | ||||||
|  |             this.$modal.msgSuccess(resp.msg); | ||||||
|  |             this.$tab.closeOpenPage({ | ||||||
|  |               // zqjia:这个路径由菜单管理里设置的路由决定 | ||||||
|  |               path: '/scientific/project_application_plan/list' | ||||||
|  |             }) | ||||||
|  |           }); | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     formatDateTime(date) { | ||||||
|  |       const padZero = (num) => (num < 10 ? '0' + num : num); | ||||||
|  | 
 | ||||||
|  |       const year = date.getFullYear(); | ||||||
|  |       const month = padZero(date.getMonth() + 1); // getMonth() 返回值的范围是 0-11,所以需要加 1 | ||||||
|  |       const day = padZero(date.getDate()); | ||||||
|  |       const hours = padZero(date.getHours()); | ||||||
|  |       const minutes = padZero(date.getMinutes()); | ||||||
|  |       const seconds = padZero(date.getSeconds()); | ||||||
|  | 
 | ||||||
|  |       return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .form-conf { | ||||||
|  |   margin: 15px auto; | ||||||
|  |   width: 80%; | ||||||
|  |   padding: 15px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
							
								
								
									
										297
									
								
								ruoyi-ui/src/views/workflow/work/approval2.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										297
									
								
								ruoyi-ui/src/views/workflow/work/approval2.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,297 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|  |       <el-form-item label="项目名称" prop="projectName"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.projectName" | ||||||
|  |           placeholder="请输入项目名称" | ||||||
|  |           clearable | ||||||
|  |           size="small" | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> | ||||||
|  |       <!-- <el-form-item label="状态" prop="status"> | ||||||
|  |         <el-input | ||||||
|  |           v-model="queryParams.status" | ||||||
|  |           placeholder="请输入状态" | ||||||
|  |           clearable | ||||||
|  |           size="small" | ||||||
|  |           @keyup.enter.native="handleQuery" | ||||||
|  |         /> | ||||||
|  |       </el-form-item> --> | ||||||
|  |       <el-form-item label="提交时间"> | ||||||
|  |         <el-date-picker | ||||||
|  |           v-model="dateRange" | ||||||
|  |           style="width: 240px" | ||||||
|  |           value-format="yyyy-MM-dd HH:mm:ss" | ||||||
|  |           type="daterange" | ||||||
|  |           range-separator="-" | ||||||
|  |           start-placeholder="开始日期" | ||||||
|  |           end-placeholder="结束日期" | ||||||
|  |           :default-time="['00:00:00', '23:59:59']" | ||||||
|  |         ></el-date-picker> | ||||||
|  |       </el-form-item> | ||||||
|  |       <el-form-item> | ||||||
|  |         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||||||
|  |         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||||||
|  |       </el-form-item> | ||||||
|  |     </el-form> | ||||||
|  | 
 | ||||||
|  |     <el-row :gutter="10" class="mb8"> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="danger" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-delete" | ||||||
|  |           size="mini" | ||||||
|  |           :disabled="multiple" | ||||||
|  |           @click="handleDelete" | ||||||
|  |         >删除</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <el-col :span="1.5"> | ||||||
|  |         <el-button | ||||||
|  |           type="warning" | ||||||
|  |           plain | ||||||
|  |           icon="el-icon-download" | ||||||
|  |           size="mini" | ||||||
|  |           v-hasPermi="['workflow:process:ownExport']" | ||||||
|  |           @click="handleExport" | ||||||
|  |         >导出</el-button> | ||||||
|  |       </el-col> | ||||||
|  |       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|  |     </el-row> | ||||||
|  | 
 | ||||||
|  |     <el-table v-loading="loading" :data="filteredProjectData" stripe style="width: 100%" @selection-change="handleSelectionChange"> | ||||||
|  |       <el-table-column type="selection" width="55" align="center" /> | ||||||
|  |       <el-table-column label="序号" type="index" width="50"></el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="项目申报名" align="center" :min-width="240"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-tag size="medium">{{ scope.row.projectName }}</el-tag> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column prop="projectLeader" label="项目负责人" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectAppStTime" label="申报开始日期" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectAppEndTime" label="申报结束日期" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectBudget" label="项目预算(万)" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectLeaderPhone" label="负责人电话" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="project_app_status" label="立项状态" align="center" width="180"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <span :class="statusClass(scope.row.projectAppStaus)"> | ||||||
|  |             {{ statusText(scope.row.projectAppStaus) }} | ||||||
|  |           </span> | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  | 
 | ||||||
|  |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220"> | ||||||
|  |         <template slot-scope="scope"> | ||||||
|  |           <el-button  | ||||||
|  |             icon="el-icon-top" | ||||||
|  |             type="primary" | ||||||
|  |             @click="handleApplication(scope.row)"  | ||||||
|  |             size="mini" | ||||||
|  |             style="width: 80px" | ||||||
|  |           >申请立项</el-button> | ||||||
|  |            | ||||||
|  |           <el-button  | ||||||
|  |             type="success"  | ||||||
|  |             icon="el-icon-tickets" | ||||||
|  |             @click="handleDetail(scope.row)"  | ||||||
|  |             size="mini" | ||||||
|  |             style="width: 80px" | ||||||
|  |           >查看详情</el-button> | ||||||
|  |            | ||||||
|  |         </template> | ||||||
|  |       </el-table-column> | ||||||
|  |     </el-table> | ||||||
|  | 
 | ||||||
|  |     <pagination | ||||||
|  |       v-show="totalProjects > 0" | ||||||
|  |       :total="totalProjects" | ||||||
|  |       :page.sync="currentPage" | ||||||
|  |       :limit.sync="pageSize" | ||||||
|  |       @pagination="filterData" | ||||||
|  |     /> | ||||||
|  | 
 | ||||||
|  |     <el-dialog title="项目详情" :visible.sync="detailDialogVisible"> | ||||||
|  |       <el-form :model="currentProject" label-width="120px"> | ||||||
|  |         <el-form-item label="项目名称"> | ||||||
|  |           <el-input v-model="currentProject.projectName" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目负责人"> | ||||||
|  |           <el-input v-model="currentProject.projectLeader" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="申报开始日期"> | ||||||
|  |           <el-input v-model="currentProject.projectAppStTime" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="申报结束日期"> | ||||||
|  |           <el-input v-model="currentProject.projectAppEndTime" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目预算(万)"> | ||||||
|  |           <el-input v-model="currentProject.projectBudget" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="负责人电话"> | ||||||
|  |           <el-input v-model="currentProject.projectLeaderPhone" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |     </el-dialog> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | <script> | ||||||
|  | import { listDeclaredApplications } from "@/api/scientific/application"; | ||||||
|  | import { listProcess } from "@/api/workflow/process"; | ||||||
|  | 
 | ||||||
|  | export default { | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       queryParams: { | ||||||
|  |         projectName: '', | ||||||
|  |         status: '', | ||||||
|  |         startDate: '', | ||||||
|  |         endDate: '', | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |         processKey: undefined, | ||||||
|  |         processName: "项目立项审批", | ||||||
|  |         category: "004" | ||||||
|  |       }, | ||||||
|  |       projectData: [], | ||||||
|  |       filteredProjectData: [], | ||||||
|  |       totalProjects: 0, | ||||||
|  |       currentPage: 1, | ||||||
|  |       pageSize: 10, | ||||||
|  |       detailDialogVisible: false, | ||||||
|  |       currentProject: {}, | ||||||
|  |       loading: false, | ||||||
|  |       showSearch: true, | ||||||
|  |       dateRange: [], | ||||||
|  |       deploymentId: '', | ||||||
|  |       definitionId: '', | ||||||
|  |       ids: null | ||||||
|  |     }; | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     handleQuery() { | ||||||
|  |       this.currentPage = 1; | ||||||
|  |       this.filterData(); | ||||||
|  |     }, | ||||||
|  |     resetQuery() { | ||||||
|  |       this.queryParams = { | ||||||
|  |         projectName: '', | ||||||
|  |         status: '', | ||||||
|  |         startDate: '', | ||||||
|  |         endDate: '', | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |       }; | ||||||
|  |       this.dateRange = []; | ||||||
|  |       this.filterData(); | ||||||
|  |     }, | ||||||
|  |     handlePageChange(page) { | ||||||
|  |       this.currentPage = page; | ||||||
|  |       this.filterData(); | ||||||
|  |     }, | ||||||
|  |     fetchProjectData() { | ||||||
|  |       this.loading = true; | ||||||
|  |       listDeclaredApplications() | ||||||
|  |         .then(response => { | ||||||
|  |           console.log('API response:', response); | ||||||
|  |           this.projectData = response.data; | ||||||
|  |           this.filterData(); | ||||||
|  |         }) | ||||||
|  |         .catch(error => { | ||||||
|  |           console.error('Error fetching project data:', error); | ||||||
|  |         }) | ||||||
|  |         .finally(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     filterData() { | ||||||
|  |       let filteredData = this.projectData; | ||||||
|  | 
 | ||||||
|  |       if (this.queryParams.projectName) { | ||||||
|  |         filteredData = filteredData.filter(project => | ||||||
|  |           project.projectName.includes(this.queryParams.projectName.trim()) | ||||||
|  |         ); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       if (this.queryParams.status) { | ||||||
|  |         filteredData = filteredData.filter(project => | ||||||
|  |           project.projectAppStaus === this.queryParams.status.trim() | ||||||
|  |         ); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       if (this.dateRange.length) { | ||||||
|  |         const [start, end] = this.dateRange; | ||||||
|  |         filteredData = filteredData.filter(project => { | ||||||
|  |           const projectStartTime = new Date(project.projectAppStTime); | ||||||
|  |           return projectStartTime >= new Date(start) && projectStartTime <= new Date(end); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       this.totalProjects = filteredData.length; | ||||||
|  |       this.filteredProjectData = filteredData.slice( | ||||||
|  |         (this.currentPage - 1) * this.pageSize, | ||||||
|  |         this.currentPage * this.pageSize | ||||||
|  |       ); | ||||||
|  |     }, | ||||||
|  |     handleApplication(row) { | ||||||
|  |       this.loading = true; | ||||||
|  |       this.reset(); | ||||||
|  |       const upProjectId = row.projectId || this.ids; | ||||||
|  | 
 | ||||||
|  |       listProcess(this.queryParams).then(response => { | ||||||
|  |         this.processParams = response.rows[0]; | ||||||
|  |         this.deploymentId = this.processParams.deploymentId; | ||||||
|  |         this.definitionId = this.processParams.definitionId; | ||||||
|  | 
 | ||||||
|  |         this.$router.push({ | ||||||
|  |           path: `/workflow/process/proj_app/${this.deploymentId}?definitionId=${this.definitionId}`, | ||||||
|  |           query: { | ||||||
|  |             projectId: upProjectId | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       }).catch(error => { | ||||||
|  |         console.error('Error fetching process data:', error); | ||||||
|  |       }).finally(() => { | ||||||
|  |         this.loading = false; | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|  |     handleDetail(row) { | ||||||
|  |       this.currentProject = row; | ||||||
|  |       this.detailDialogVisible = true; | ||||||
|  |     }, | ||||||
|  |     reset() { | ||||||
|  |       // Any additional reset logic | ||||||
|  |     }, | ||||||
|  |     statusClass(status) { | ||||||
|  |       switch (status) { | ||||||
|  |         case '0': | ||||||
|  |           return 'status-unapproved'; // 未立项 | ||||||
|  |         case '2': | ||||||
|  |           return 'status-under-review'; // 审核中 | ||||||
|  |         case '3': | ||||||
|  |           return 'status-approved'; // 已立项 | ||||||
|  |         default: | ||||||
|  |           return ''; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     statusText(status) { | ||||||
|  |       switch (status) { | ||||||
|  |         case '0': | ||||||
|  |           return '未立项'; | ||||||
|  |         case '2': | ||||||
|  |           return '审核中'; | ||||||
|  |         case '3': | ||||||
|  |           return '已立项'; | ||||||
|  |         default: | ||||||
|  |           return '未知状态'; | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   mounted() { | ||||||
|  |     this.fetchProjectData(); | ||||||
|  |   } | ||||||
|  | }; | ||||||
|  | </script> | ||||||
							
								
								
									
										149
									
								
								ruoyi-ui/src/views/workflow/work/declare_details.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								ruoyi-ui/src/views/workflow/work/declare_details.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,149 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-card class="box-card"> | ||||||
|  |       <div slot="header" class="clearfix"> | ||||||
|  |         <!-- 这个地方显示表单的标题 --> | ||||||
|  |         <span>{{ processName }}</span> | ||||||
|  |       </div> | ||||||
|  |       <!-- 这里定义栅格布局组件 --> | ||||||
|  |       <el-col :span="18" :offset="3"> | ||||||
|  |         <div class="form-conf" v-if="formOpen"> | ||||||
|  |           <!-- parser是一个自定义的组件,:form-conf="formData" 将 formData 对象作为属性传递给 parser 组件 --> | ||||||
|  |           <!-- 推测是通过getData获取数据, formData是表单的结构数据 --> | ||||||
|  |           <!-- formData是这个组件初始化的时候从后端接口得到的表单外观结构 --> | ||||||
|  |           <!-- formData是纯数据,getData是解析formData,这个函数默认是data作为参数 --> | ||||||
|  |           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { getProcessForm, startProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { getApplication} from "@/api/scientific/application"; | ||||||
|  | export default { | ||||||
|  |   name: 'WorkStart', | ||||||
|  |   components: { | ||||||
|  |     Parser | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       definitionId: null, | ||||||
|  |       deployId: null, | ||||||
|  |       procInsId: null, | ||||||
|  |       // 项目信息主表的Id,用于获取项目的各种信息 | ||||||
|  |       projectId: null, | ||||||
|  |       formOpen: false, | ||||||
|  |       formData: {}, | ||||||
|  |       projectData: {}, | ||||||
|  |       processName: null, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       // 发起地址请求的时候可以获得这个数据的信息 | ||||||
|  |       this.deployId = this.$route.params && this.$route.params.deployId; | ||||||
|  |       this.definitionId = this.$route.query && this.$route.query.definitionId; | ||||||
|  |       this.procInsId = this.$route.query && this.$route.query.procInsId; | ||||||
|  |       // 从地址的传递参数获取项目的Id信息 | ||||||
|  |       this.projectId = this.$route.query && this.$route.query.projectId; | ||||||
|  |       // 如果能够从路由获得流程名字就赋值,否则就默认名字 | ||||||
|  |       if(this.$route.query && this.$route.query.processName) { | ||||||
|  |         this.processName = this.$route.query && this.$route.query.processName; | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         this.processName = "更新流程"; | ||||||
|  |       } | ||||||
|  |       console.log(this.projectId) | ||||||
|  |       getApplication(this.projectId).then(response => { | ||||||
|  |         this.projectData = response.data; | ||||||
|  |         this.processName = this.projectData.projectName + "-提交申报信息"; | ||||||
|  |       }); | ||||||
|  |       // 获取流程的动态表单 | ||||||
|  |       getProcessForm({ | ||||||
|  |         definitionId: this.definitionId, | ||||||
|  |         deployId: this.deployId, | ||||||
|  |         procInsId: this.procInsId | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res.data) { | ||||||
|  |           // 赋值到表单 | ||||||
|  |           this.formData = res.data; | ||||||
|  |           this.formOpen = true; | ||||||
|  |           this.formData.fields.forEach(field => { | ||||||
|  |             if (field.__vModel__ === "projectName") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectName; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |             if (field.__vModel__ === "directorName") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectLeader; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |             if (field.__vModel__ === "phoneNumber") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectLeaderPhone; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |             if (field.__vModel__ === "budgetSum") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectBudget; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         console.log("get data"); | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           // 直接获得标签信息 | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             // 如果是单个信息,直接得到defaultValue | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submit(data) { | ||||||
|  |       if (data && this.definitionId) { | ||||||
|  |         // 将项目的Id加入到流程表达数据 | ||||||
|  |         data.valData.projectId = this.projectId; | ||||||
|  |         console.log("submit"); | ||||||
|  |         console.log(data.valData); | ||||||
|  |          | ||||||
|  |         startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => { | ||||||
|  |           this.$modal.msgSuccess(res.msg); | ||||||
|  |           this.$tab.closeOpenPage({ | ||||||
|  |             path: '/work/own' | ||||||
|  |           }) | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .form-conf { | ||||||
|  |   margin: 15px auto; | ||||||
|  |   width: 80%; | ||||||
|  |   padding: 15px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @ -1,34 +1,24 @@ | |||||||
| <template> | <template> | ||||||
|   <div class="app-container"> |   <div class="app-container"> | ||||||
|     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> |     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | ||||||
|       <el-form-item label="流程标识" prop="processKey"> |       <el-form-item label="项目名称" prop="projectName"> | ||||||
|         <el-input |         <el-input | ||||||
|           v-model="queryParams.processKey" |           v-model="queryParams.projectName" | ||||||
|           placeholder="请输入流程标识" |           placeholder="请输入项目名称" | ||||||
|           clearable |           clearable | ||||||
|           size="small" |           size="small" | ||||||
|           @keyup.enter.native="handleQuery" |           @keyup.enter.native="handleQuery" | ||||||
|         /> |         /> | ||||||
|       </el-form-item> |       </el-form-item> | ||||||
|       <el-form-item label="流程名称" prop="processName"> |       <!-- <el-form-item label="状态" prop="status"> | ||||||
|         <el-input |         <el-input | ||||||
|           v-model="queryParams.processName" |           v-model="queryParams.status" | ||||||
|           placeholder="请输入流程名称" |           placeholder="请输入状态" | ||||||
|           clearable |           clearable | ||||||
|           size="small" |           size="small" | ||||||
|           @keyup.enter.native="handleQuery" |           @keyup.enter.native="handleQuery" | ||||||
|         /> |         /> | ||||||
|       </el-form-item> |       </el-form-item> --> | ||||||
|       <el-form-item label="流程分类" prop="category"> |  | ||||||
|         <el-select v-model="queryParams.category" clearable placeholder="请选择" size="small"> |  | ||||||
|           <el-option |  | ||||||
|             v-for="item in categoryOptions" |  | ||||||
|             :key="item.categoryId" |  | ||||||
|             :label="item.categoryName" |  | ||||||
|             :value="item.code"> |  | ||||||
|           </el-option> |  | ||||||
|         </el-select> |  | ||||||
|       </el-form-item> |  | ||||||
|       <el-form-item label="提交时间"> |       <el-form-item label="提交时间"> | ||||||
|         <el-date-picker |         <el-date-picker | ||||||
|           v-model="dateRange" |           v-model="dateRange" | ||||||
| @ -71,239 +61,243 @@ | |||||||
|       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||||
|     </el-row> |     </el-row> | ||||||
| 
 | 
 | ||||||
|     <el-table v-loading="loading" :data="ownProcessList" @selection-change="handleSelectionChange"> |     <el-table v-loading="loading" :data="filteredProjectData" stripe style="width: 100%" @selection-change="handleSelectionChange"> | ||||||
|       <el-table-column type="selection" width="55" align="center" /> |       <el-table-column type="selection" width="55" align="center" /> | ||||||
|       <el-table-column label="序号" type="index" width="50"></el-table-column> |       <el-table-column label="序号" type="index" width="50"></el-table-column> | ||||||
|       <el-table-column label="项目申报名" align="center" width="280px" :min-width="280"> | 
 | ||||||
|  |       <el-table-column label="项目申报名" align="center" :min-width="240"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-tag size="medium">{{ scope.row.processTitle }}</el-tag> |           <el-tag size="medium">{{ scope.row.projectName }}</el-tag> | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|       <el-table-column label="项目负责人" align="center" prop="director"  width="140"/> | 
 | ||||||
|       <el-table-column label="计划(基金)中文名称" align="center" width="200px"> |       <el-table-column prop="projectLeader" label="项目负责人" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectAppStTime" label="申报开始日期" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectAppEndTime" label="申报结束日期" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectBudget" label="项目预算(万)" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="projectLeaderPhone" label="负责人电话" align="center" width="180"></el-table-column> | ||||||
|  |       <el-table-column prop="project_app_status" label="立项状态" align="center" width="180"> | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <el-tag size="medium" >{{ scope.row.procDefName }}</el-tag> |           <el-tag size="medium" :type="info"> | ||||||
|  |             <span :class="statusClass(scope.row.projectAppStaus)"> | ||||||
|  |               {{ statusText(scope.row.projectAppStaus) }} | ||||||
|  |             </span> | ||||||
|  |         </el-tag> | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|       <el-table-column label="审批类别" align="center" prop="category" :formatter="categoryFormat" width="180"/> | 
 | ||||||
|       <el-table-column label="提交时间" align="center" prop="createTime" :min-width="180"/> |       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="220"> | ||||||
|       <el-table-column label="项目审核状态" align="center" width="100"> |  | ||||||
|         <template slot-scope="scope"> |         <template slot-scope="scope"> | ||||||
|           <dict-tag :options="dict.type.wf_process_status" :value="scope.row.processStatus"/> |           <el-button  | ||||||
|         </template> |  | ||||||
|       </el-table-column> |  | ||||||
|       <!-- <el-table-column label="耗时" align="center" prop="duration" width="180"/> --> |  | ||||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240"> |  | ||||||
|         <template slot-scope="scope"> |  | ||||||
|           <el-button |  | ||||||
|             type="text" |  | ||||||
|             size="mini" |  | ||||||
|             icon="el-icon-tickets" |  | ||||||
|             @click="handleFlowRecord(scope.row)" |  | ||||||
|             v-hasPermi="['workflow:process:query']" |  | ||||||
|           >详情</el-button> |  | ||||||
|           <el-button |  | ||||||
|             type="text" |  | ||||||
|             size="mini" |  | ||||||
|             icon="el-icon-delete" |  | ||||||
|             @click="handleDelete(scope.row)" |  | ||||||
|             v-if="scope.row.finishTime" |  | ||||||
|             v-hasPermi="['workflow:process:remove']" |  | ||||||
|           >删除</el-button> |  | ||||||
|           <el-button |  | ||||||
|             type="text" |  | ||||||
|             size="mini" |  | ||||||
|             icon="el-icon-circle-close" |  | ||||||
|             @click="handleStop(scope.row)" |  | ||||||
|             v-hasPermi="['workflow:process:cancel']" |  | ||||||
|           >取消</el-button> |  | ||||||
|           <el-button |  | ||||||
|             type="text" |  | ||||||
|             size="mini" |  | ||||||
|             icon="el-icon-refresh-right" |             icon="el-icon-refresh-right" | ||||||
|             v-hasPermi="['workflow:process:start']" |             type="primary" | ||||||
|             @click="handleAgain(scope.row)" |             @click="handleApplication(scope.row)"  | ||||||
|  |             size="mini" | ||||||
|  |             style="width: 80px" | ||||||
|           >修改重审</el-button> |           >修改重审</el-button> | ||||||
|  |            | ||||||
|  |           <el-button  | ||||||
|  |             type="success"  | ||||||
|  |             icon="el-icon-tickets" | ||||||
|  |             @click="handleDetail(scope.row)"  | ||||||
|  |             size="mini" | ||||||
|  |             style="width: 80px" | ||||||
|  |           >查看详情</el-button> | ||||||
|  |            | ||||||
|         </template> |         </template> | ||||||
|       </el-table-column> |       </el-table-column> | ||||||
|     </el-table> |     </el-table> | ||||||
| 
 | 
 | ||||||
|     <pagination |     <pagination | ||||||
|       v-show="total>0" |       v-show="totalProjects > 0" | ||||||
|       :total="total" |       :total="totalProjects" | ||||||
|       :page.sync="queryParams.pageNum" |       :page.sync="currentPage" | ||||||
|       :limit.sync="queryParams.pageSize" |       :limit.sync="pageSize" | ||||||
|       @pagination="getList" |       @pagination="filterData" | ||||||
|     /> |     /> | ||||||
| 
 | 
 | ||||||
|  |     <el-dialog title="项目详情" :visible.sync="detailDialogVisible"> | ||||||
|  |       <el-form :model="currentProject" label-width="120px"> | ||||||
|  |         <el-form-item label="项目名称"> | ||||||
|  |           <el-input v-model="currentProject.projectName" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目负责人"> | ||||||
|  |           <el-input v-model="currentProject.projectLeader" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="申报开始日期"> | ||||||
|  |           <el-input v-model="currentProject.projectAppStTime" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="申报结束日期"> | ||||||
|  |           <el-input v-model="currentProject.projectAppEndTime" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="项目预算(万)"> | ||||||
|  |           <el-input v-model="currentProject.projectBudget" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |         <el-form-item label="负责人电话"> | ||||||
|  |           <el-input v-model="currentProject.projectLeaderPhone" disabled></el-input> | ||||||
|  |         </el-form-item> | ||||||
|  |       </el-form> | ||||||
|  |     </el-dialog> | ||||||
|   </div> |   </div> | ||||||
| </template> | </template> | ||||||
| 
 |  | ||||||
| <script> | <script> | ||||||
| import { listOwnInfoProcess, stopProcess, delProcess } from '@/api/workflow/process'; | import { listDeclaredApplications } from "@/api/scientific/application"; | ||||||
| import { listAllCategory } from '@/api/workflow/category'; | import { listProcess } from "@/api/workflow/process"; | ||||||
|  | 
 | ||||||
| export default { | export default { | ||||||
|   name: "Own", |  | ||||||
|   dicts: ['wf_process_status'], |  | ||||||
|   components: { |  | ||||||
|   }, |  | ||||||
|   data() { |   data() { | ||||||
|     return { |     return { | ||||||
|       // 遮罩层 |  | ||||||
|       loading: true, |  | ||||||
|       processLoading: true, |  | ||||||
|       // 选中数组 |  | ||||||
|       ids: [], |  | ||||||
|       // 非单个禁用 |  | ||||||
|       single: true, |  | ||||||
|       // 非多个禁用 |  | ||||||
|       multiple: true, |  | ||||||
|       // 显示搜索条件 |  | ||||||
|       showSearch: true, |  | ||||||
|       // 总条数 |  | ||||||
|       total: 0, |  | ||||||
|       categoryOptions: [], |  | ||||||
|       processTotal:0, |  | ||||||
|       // 我发起的流程列表数据 |  | ||||||
|       ownProcessList: [], |  | ||||||
|       // 弹出层标题 |  | ||||||
|       title: "", |  | ||||||
|       // 是否显示弹出层 |  | ||||||
|       open: false, |  | ||||||
|       src: "", |  | ||||||
|       definitionList:[], |  | ||||||
|       // 日期范围 |  | ||||||
|       dateRange: [], |  | ||||||
|       // 查询参数 |  | ||||||
|       queryParams: { |       queryParams: { | ||||||
|  |         projectName: '', | ||||||
|  |         status: '', | ||||||
|  |         startDate: '', | ||||||
|  |         endDate: '', | ||||||
|         pageNum: 1, |         pageNum: 1, | ||||||
|         pageSize: 10, |         pageSize: 10, | ||||||
|         processKey: undefined, |         processKey: undefined, | ||||||
|         processName: undefined, |         processName: "项目立项审批", | ||||||
|         category: undefined, |         category: "004" | ||||||
|         detailTitleName: 'proj_name', |  | ||||||
|         detailDirectorName: 'director' |  | ||||||
|       }, |  | ||||||
|       // 表单参数 |  | ||||||
|       form: {}, |  | ||||||
|       // 表单校验 |  | ||||||
|       rules: { |  | ||||||
|       }, |       }, | ||||||
|  |       projectData: [], | ||||||
|  |       filteredProjectData: [], | ||||||
|  |       totalProjects: 0, | ||||||
|  |       currentPage: 1, | ||||||
|  |       pageSize: 10, | ||||||
|  |       detailDialogVisible: false, | ||||||
|  |       currentProject: {}, | ||||||
|  |       loading: false, | ||||||
|  |       showSearch: true, | ||||||
|  |       dateRange: [], | ||||||
|  |       deploymentId: '', | ||||||
|  |       definitionId: '', | ||||||
|  |       ids: null | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|   created() { |  | ||||||
|     this.getCategoryList(); |  | ||||||
|   }, |  | ||||||
|   beforeRouteEnter(to, from, next) { |  | ||||||
|     next(vm => { |  | ||||||
|       vm.getList() |  | ||||||
|     }) |  | ||||||
|   }, |  | ||||||
|   methods: { |   methods: { | ||||||
|     /** 查询流程分类列表 */ |     handleQuery() { | ||||||
|     getCategoryList() { |       this.currentPage = 1; | ||||||
|       listAllCategory().then(response => this.categoryOptions = response.data) |       this.filterData(); | ||||||
|     }, |     }, | ||||||
|     /** 查询流程定义列表 */ |     resetQuery() { | ||||||
|     getList() { |       this.queryParams = { | ||||||
|  |         projectName: '', | ||||||
|  |         status: '', | ||||||
|  |         startDate: '', | ||||||
|  |         endDate: '', | ||||||
|  |         pageNum: 1, | ||||||
|  |         pageSize: 10, | ||||||
|  |       }; | ||||||
|  |       this.dateRange = []; | ||||||
|  |       this.filterData(); | ||||||
|  |     }, | ||||||
|  |     handlePageChange(page) { | ||||||
|  |       this.currentPage = page; | ||||||
|  |       this.filterData(); | ||||||
|  |     }, | ||||||
|  |     fetchProjectData() { | ||||||
|       this.loading = true; |       this.loading = true; | ||||||
|       listOwnInfoProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |       listDeclaredApplications() | ||||||
|         this.ownProcessList = response.rows.filter(item => item.category === '004'); |         .then(response => { | ||||||
|         //this.ownProcessList = response.rows; |           console.log('API response:', response); | ||||||
|         this.total = response.total; |           //  response.rows.filter(item => item.category === '002' && item.processStatus === 'completed'); | ||||||
|  |           this.projectData = response.data.filter(item => item.projectAppStaus === '3') | ||||||
|  | 
 | ||||||
|  |           let parseData = response.data.filter(item => item.projectAppStaus === '3') | ||||||
|  |           console.log(parseData) | ||||||
|  |           this.filterData(); | ||||||
|  |         }) | ||||||
|  |         .catch(error => { | ||||||
|  |           console.error('Error fetching project data:', error); | ||||||
|  |         }) | ||||||
|  |         .finally(() => { | ||||||
|  |           this.loading = false; | ||||||
|  |         }); | ||||||
|  |     }, | ||||||
|  |     filterData() { | ||||||
|  |       let filteredData = this.projectData; | ||||||
|  | 
 | ||||||
|  |       if (this.queryParams.projectName) { | ||||||
|  |         filteredData = filteredData.filter(project => | ||||||
|  |           project.projectName.includes(this.queryParams.projectName.trim()) | ||||||
|  |         ); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       if (this.queryParams.status) { | ||||||
|  |         filteredData = filteredData.filter(project => | ||||||
|  |           project.projectAppStaus === this.queryParams.status.trim() | ||||||
|  |         ); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       if (this.dateRange.length) { | ||||||
|  |         const [start, end] = this.dateRange; | ||||||
|  |         filteredData = filteredData.filter(project => { | ||||||
|  |           const projectStartTime = new Date(project.projectAppStTime); | ||||||
|  |           return projectStartTime >= new Date(start) && projectStartTime <= new Date(end); | ||||||
|  |         }); | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       this.totalProjects = filteredData.length; | ||||||
|  |       this.filteredProjectData = filteredData.slice( | ||||||
|  |         (this.currentPage - 1) * this.pageSize, | ||||||
|  |         this.currentPage * this.pageSize | ||||||
|  |       ); | ||||||
|  |     }, | ||||||
|  |     handleApplication(row) { | ||||||
|  |       this.loading = true; | ||||||
|  |       this.reset(); | ||||||
|  |       const upProjectId = row.projectId || this.ids; | ||||||
|  | 
 | ||||||
|  |       listProcess(this.queryParams).then(response => { | ||||||
|  |         this.processParams = response.rows[0]; | ||||||
|  |         this.deploymentId = this.processParams.deploymentId; | ||||||
|  |         this.definitionId = this.processParams.definitionId; | ||||||
|  | 
 | ||||||
|  |         this.$router.push({ | ||||||
|  |           path: `/workflow/process/proj_app/${this.deploymentId}?definitionId=${this.definitionId}`, | ||||||
|  |           query: { | ||||||
|  |             projectId: upProjectId | ||||||
|  |           } | ||||||
|  |         }); | ||||||
|  |       }).catch(error => { | ||||||
|  |         console.error('Error fetching process data:', error); | ||||||
|  |       }).finally(() => { | ||||||
|         this.loading = false; |         this.loading = false; | ||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|     // 取消按钮 |     handleDetail(row) { | ||||||
|     cancel() { |       this.currentProject = row; | ||||||
|       this.open = false; |       this.detailDialogVisible = true; | ||||||
|       this.reset(); |  | ||||||
|     }, |     }, | ||||||
|     // 表单重置 |  | ||||||
|     reset() { |     reset() { | ||||||
|       this.form = { |       // Any additional reset logic | ||||||
|         id: null, |  | ||||||
|         name: null, |  | ||||||
|         category: null, |  | ||||||
|         key: null, |  | ||||||
|         tenantId: null, |  | ||||||
|         deployTime: null, |  | ||||||
|         derivedFrom: null, |  | ||||||
|         derivedFromRoot: null, |  | ||||||
|         parentDeploymentId: null, |  | ||||||
|         engineVersion: null |  | ||||||
|       }; |  | ||||||
|       this.resetForm("form"); |  | ||||||
|     }, |     }, | ||||||
|     /** 搜索按钮操作 */ |     statusClass(status) { | ||||||
|     handleQuery() { |       switch (status) { | ||||||
|       this.queryParams.pageNum = 1; |         case '0': | ||||||
|       this.getList(); |           return 'status-unapproved'; // 未立项 | ||||||
|     }, |         case '2': | ||||||
|     /** 重置按钮操作 */ |           return 'status-under-review'; // 审核中 | ||||||
|     resetQuery() { |         case '3': | ||||||
|       this.dateRange = []; |           return 'status-approved'; // 已立项 | ||||||
|       this.resetForm("queryForm"); |         default: | ||||||
|       this.handleQuery(); |           return ''; | ||||||
|     }, |  | ||||||
|     // 多选框选中数据 |  | ||||||
|     handleSelectionChange(selection) { |  | ||||||
|       this.ids = selection.map(item => item.procInsId); |  | ||||||
|       this.single = selection.length !== 1; |  | ||||||
|       this.multiple = !selection.length; |  | ||||||
|     }, |  | ||||||
|     handleAgain(row) { |  | ||||||
|       this.$router.push({ |  | ||||||
|         path: '/workflow/process/update/' + row.deployId, |  | ||||||
|         query: { |  | ||||||
|           definitionId: row.procDefId, |  | ||||||
|           procInsId: row.procInsId |  | ||||||
|         } |  | ||||||
|       }) |  | ||||||
|       console.log(row); |  | ||||||
|     }, |  | ||||||
|     /**  取消流程申请 */ |  | ||||||
|     handleStop(row){ |  | ||||||
|       const params = { |  | ||||||
|         procInsId: row.procInsId |  | ||||||
|       } |       } | ||||||
|       stopProcess(params).then( res => { |  | ||||||
|         this.$modal.msgSuccess(res.msg); |  | ||||||
|         this.getList(); |  | ||||||
|       }); |  | ||||||
|     }, |     }, | ||||||
|     /** 流程流转记录 */ |     statusText(status) { | ||||||
|     handleFlowRecord(row) { |       switch (status) { | ||||||
|       this.$router.push({ |         case '0': | ||||||
|         path: '/workflow/process/detail/' + row.procInsId, |           return '未立项'; | ||||||
|         query: { |         case '2': | ||||||
|           processed: false |           return '审核中'; | ||||||
|         } |         case '3': | ||||||
|       }) |           return '已立项'; | ||||||
|     }, |         default: | ||||||
|     /** 删除按钮操作 */ |           return '未知状态'; | ||||||
|     handleDelete(row) { |       } | ||||||
|       const ids = row.procInsId || this.ids; |  | ||||||
|       this.$confirm('是否确认删除流程定义编号为"' + ids + '"的数据项?', "警告", { |  | ||||||
|         confirmButtonText: "确定", |  | ||||||
|         cancelButtonText: "取消", |  | ||||||
|         type: "warning" |  | ||||||
|       }).then(function() { |  | ||||||
|         return delProcess(ids); |  | ||||||
|       }).then(() => { |  | ||||||
|         this.getList(); |  | ||||||
|         this.$modal.msgSuccess("删除成功"); |  | ||||||
|       }) |  | ||||||
|     }, |  | ||||||
|     /** 导出按钮操作 */ |  | ||||||
|     handleExport() { |  | ||||||
|       this.download('workflow/process/ownExport', { |  | ||||||
|         ...this.queryParams |  | ||||||
|       }, `wf_own_process_${new Date().getTime()}.xlsx`) |  | ||||||
|     }, |  | ||||||
|     categoryFormat(row, column) { |  | ||||||
|       return this.categoryOptions.find(k => k.code === row.category)?.categoryName ?? ''; |  | ||||||
|     } |     } | ||||||
|  |   }, | ||||||
|  |   mounted() { | ||||||
|  |     this.fetchProjectData(); | ||||||
|   } |   } | ||||||
| }; | }; | ||||||
| </script> | </script> | ||||||
| @ -181,8 +181,8 @@ export default { | |||||||
|         processKey: undefined, |         processKey: undefined, | ||||||
|         processName: undefined, |         processName: undefined, | ||||||
|         category: undefined, |         category: undefined, | ||||||
|         detailTitleName: 'projectName', |         detailTitleName: 'projectName,handbookName,planName,proj_name', | ||||||
|         detailDirectorName: 'directorName' |         detailDirectorName: 'directorName,createName' | ||||||
|       }, |       }, | ||||||
|       // 表单参数 |       // 表单参数 | ||||||
|       form: {}, |       form: {}, | ||||||
|  | |||||||
							
								
								
									
										145
									
								
								ruoyi-ui/src/views/workflow/work/proj_app.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								ruoyi-ui/src/views/workflow/work/proj_app.vue
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,145 @@ | |||||||
|  | <template> | ||||||
|  |   <div class="app-container"> | ||||||
|  |     <el-card class="box-card"> | ||||||
|  |       <div slot="header" class="clearfix"> | ||||||
|  |         <!-- 这个地方显示表单的标题 --> | ||||||
|  |         <span>{{ processName }}</span> | ||||||
|  |       </div> | ||||||
|  |       <!-- 这里定义栅格布局组件 --> | ||||||
|  |       <el-col :span="18" :offset="3"> | ||||||
|  |         <div class="form-conf" v-if="formOpen"> | ||||||
|  |           <!-- parser是一个自定义的组件,:form-conf="formData" 将 formData 对象作为属性传递给 parser 组件 --> | ||||||
|  |           <!-- 推测是通过getData获取数据, formData是表单的结构数据 --> | ||||||
|  |           <!-- formData是这个组件初始化的时候从后端接口得到的表单外观结构 --> | ||||||
|  |           <!-- formData是纯数据,getData是解析formData,这个函数默认是data作为参数 --> | ||||||
|  |           <parser :key="new Date().getTime()" :form-conf="formData" @submit="submit" ref="parser" @getData="getData"/> | ||||||
|  |         </div> | ||||||
|  |       </el-col> | ||||||
|  |     </el-card> | ||||||
|  |   </div> | ||||||
|  | </template> | ||||||
|  | 
 | ||||||
|  | <script> | ||||||
|  | import { getProcessForm, startProcess } from '@/api/workflow/process' | ||||||
|  | import Parser from '@/utils/generator/parser' | ||||||
|  | import { getApplication} from "@/api/scientific/application"; | ||||||
|  | export default { | ||||||
|  |   name: 'WorkStart', | ||||||
|  |   components: { | ||||||
|  |     Parser | ||||||
|  |   }, | ||||||
|  |   data() { | ||||||
|  |     return { | ||||||
|  |       definitionId: null, | ||||||
|  |       deployId: null, | ||||||
|  |       procInsId: null, | ||||||
|  |       // 项目信息主表的Id,用于获取项目的各种信息 | ||||||
|  |       projectId: null, | ||||||
|  |       formOpen: false, | ||||||
|  |       formData: {}, | ||||||
|  |       projectData: {}, | ||||||
|  |       processName: null, | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   created() { | ||||||
|  |     this.initData(); | ||||||
|  |   }, | ||||||
|  |   methods: { | ||||||
|  |     initData() { | ||||||
|  |       // 发起地址请求的时候可以获得这个数据的信息 | ||||||
|  |       this.deployId = this.$route.params && this.$route.params.deployId; | ||||||
|  |       this.definitionId = this.$route.query && this.$route.query.definitionId; | ||||||
|  |       this.procInsId = this.$route.query && this.$route.query.procInsId; | ||||||
|  |       // 从地址的传递参数获取项目的Id信息 | ||||||
|  |       this.projectId = this.$route.query && this.$route.query.projectId; | ||||||
|  |       // 如果能够从路由获得流程名字就赋值,否则就默认名字 | ||||||
|  |       if(this.$route.query && this.$route.query.processName) { | ||||||
|  |         this.processName = this.$route.query && this.$route.query.processName; | ||||||
|  |       } | ||||||
|  |       else { | ||||||
|  |         this.processName = "更新流程"; | ||||||
|  |       } | ||||||
|  |       console.log(this.projectId) | ||||||
|  |       getApplication(this.projectId).then(response => { | ||||||
|  |         this.projectData = response.data; | ||||||
|  |         this.processName = this.projectData.projectName + "-项目立项"; | ||||||
|  |       }); | ||||||
|  |       // 获取流程的动态表单 | ||||||
|  |       getProcessForm({ | ||||||
|  |         definitionId: this.definitionId, | ||||||
|  |         deployId: this.deployId, | ||||||
|  |         procInsId: this.procInsId | ||||||
|  |       }).then(res => { | ||||||
|  |         if (res.data) { | ||||||
|  |           // 赋值到表单 | ||||||
|  |           this.formData = res.data; | ||||||
|  |           this.formOpen = true; | ||||||
|  |           this.formData.fields.forEach(field => { | ||||||
|  |             if (field.__vModel__ === "projectName") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectName; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |             if (field.__vModel__ === "oldBudget") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectBudget + "万"; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |             if (field.__vModel__ === "directorName") { | ||||||
|  |               field.__config__.defaultValue = this.projectData.projectLeader; | ||||||
|  |               field.readonly = true; | ||||||
|  |             } | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }) | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  |     /** 接收子组件传的值 */ | ||||||
|  |     getData(data) { | ||||||
|  |       if (data) { | ||||||
|  |         console.log("get data"); | ||||||
|  |         const variables = []; | ||||||
|  |         data.fields.forEach(item => { | ||||||
|  |           let variableData = {}; | ||||||
|  |           // 直接获得标签信息 | ||||||
|  |           variableData.label = item.__config__.label | ||||||
|  |           // 表单值为多个选项时 | ||||||
|  |           if (item.__config__.defaultValue instanceof Array) { | ||||||
|  |             const array = []; | ||||||
|  |             item.__config__.defaultValue.forEach(val => { | ||||||
|  |               array.push(val) | ||||||
|  |             }) | ||||||
|  |             variableData.val = array; | ||||||
|  |           } else { | ||||||
|  |             // 如果是单个信息,直接得到defaultValue | ||||||
|  |             variableData.val = item.__config__.defaultValue | ||||||
|  |           } | ||||||
|  |           variables.push(variableData) | ||||||
|  |         }) | ||||||
|  |         this.variables = variables; | ||||||
|  |       } | ||||||
|  |     }, | ||||||
|  |     submit(data) { | ||||||
|  |       if (data && this.definitionId) { | ||||||
|  |         // 启动流程并将表单数据加入流程变量 | ||||||
|  |         data.valData.projectId = this.projectId; | ||||||
|  |         console.log("submit"); | ||||||
|  |         console.log(data.valData); | ||||||
|  |          | ||||||
|  |         startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => { | ||||||
|  |           this.$modal.msgSuccess(res.msg); | ||||||
|  |           this.$tab.closeOpenPage({ | ||||||
|  |             path: '/work/own' | ||||||
|  |           }) | ||||||
|  |         }) | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  | </script> | ||||||
|  | 
 | ||||||
|  | <style lang="scss" scoped> | ||||||
|  | .form-conf { | ||||||
|  |   margin: 15px auto; | ||||||
|  |   width: 80%; | ||||||
|  |   padding: 15px; | ||||||
|  | } | ||||||
|  | </style> | ||||||
| @ -1,108 +0,0 @@ | |||||||
| package com.ruoyi.scientific.controller; |  | ||||||
| 
 |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Arrays; |  | ||||||
| import java.util.concurrent.TimeUnit; |  | ||||||
| 
 |  | ||||||
| import lombok.RequiredArgsConstructor; |  | ||||||
| import javax.servlet.http.HttpServletResponse; |  | ||||||
| import javax.validation.constraints.*; |  | ||||||
| import cn.dev33.satoken.annotation.SaCheckPermission; |  | ||||||
| import org.springframework.web.bind.annotation.*; |  | ||||||
| import org.springframework.validation.annotation.Validated; |  | ||||||
| import com.ruoyi.common.annotation.RepeatSubmit; |  | ||||||
| import com.ruoyi.common.annotation.Log; |  | ||||||
| import com.ruoyi.common.core.controller.BaseController; |  | ||||||
| import com.ruoyi.common.core.domain.PageQuery; |  | ||||||
| import com.ruoyi.common.core.domain.R; |  | ||||||
| import com.ruoyi.common.core.validate.AddGroup; |  | ||||||
| import com.ruoyi.common.core.validate.EditGroup; |  | ||||||
| import com.ruoyi.common.core.validate.QueryGroup; |  | ||||||
| import com.ruoyi.common.enums.BusinessType; |  | ||||||
| import com.ruoyi.common.utils.poi.ExcelUtil; |  | ||||||
| import com.ruoyi.scientific.domain.vo.ActProjectVo; |  | ||||||
| import com.ruoyi.scientific.domain.bo.ActProjectBo; |  | ||||||
| import com.ruoyi.scientific.service.IActProjectService; |  | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理 |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| @Validated |  | ||||||
| @RequiredArgsConstructor |  | ||||||
| @RestController |  | ||||||
| @RequestMapping("/scientific/project") |  | ||||||
| public class ActProjectController extends BaseController { |  | ||||||
| 
 |  | ||||||
|     private final IActProjectService iActProjectService; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理列表 |  | ||||||
|      */ |  | ||||||
|     @SaCheckPermission("scientific:project:list") |  | ||||||
|     @GetMapping("/list") |  | ||||||
|     public TableDataInfo<ActProjectVo> list(ActProjectBo bo, PageQuery pageQuery) { |  | ||||||
|         return iActProjectService.queryPageList(bo, pageQuery); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 导出科研管理列表 |  | ||||||
|      */ |  | ||||||
|     @SaCheckPermission("scientific:project:export") |  | ||||||
|     @Log(title = "科研管理", businessType = BusinessType.EXPORT) |  | ||||||
|     @PostMapping("/export") |  | ||||||
|     public void export(ActProjectBo bo, HttpServletResponse response) { |  | ||||||
|         List<ActProjectVo> list = iActProjectService.queryList(bo); |  | ||||||
|         ExcelUtil.exportExcel(list, "科研管理", ActProjectVo.class, response); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 获取科研管理详细信息 |  | ||||||
|      * |  | ||||||
|      * @param id 主键 |  | ||||||
|      */ |  | ||||||
|     @SaCheckPermission("scientific:project:query") |  | ||||||
|     @GetMapping("/{id}") |  | ||||||
|     public R<ActProjectVo> getInfo(@NotNull(message = "主键不能为空") |  | ||||||
|                                      @PathVariable String id) { |  | ||||||
|         return R.ok(iActProjectService.queryById(id)); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 新增科研管理 |  | ||||||
|      */ |  | ||||||
|     @SaCheckPermission("scientific:project:add") |  | ||||||
|     @Log(title = "科研管理", businessType = BusinessType.INSERT) |  | ||||||
|     @RepeatSubmit() |  | ||||||
|     @PostMapping() |  | ||||||
|     public R<Void> add(@Validated(AddGroup.class) @RequestBody ActProjectBo bo) { |  | ||||||
|         return toAjax(iActProjectService.insertByBo(bo)); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 修改科研管理 |  | ||||||
|      */ |  | ||||||
|     @SaCheckPermission("scientific:project:edit") |  | ||||||
|     @Log(title = "科研管理", businessType = BusinessType.UPDATE) |  | ||||||
|     @RepeatSubmit() |  | ||||||
|     @PutMapping() |  | ||||||
|     public R<Void> edit(@Validated(EditGroup.class) @RequestBody ActProjectBo bo) { |  | ||||||
|         return toAjax(iActProjectService.updateByBo(bo)); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 删除科研管理 |  | ||||||
|      * |  | ||||||
|      * @param ids 主键串 |  | ||||||
|      */ |  | ||||||
|     @SaCheckPermission("scientific:project:remove") |  | ||||||
|     @Log(title = "科研管理", businessType = BusinessType.DELETE) |  | ||||||
|     @DeleteMapping("/{ids}") |  | ||||||
|     public R<Void> remove(@NotEmpty(message = "主键不能为空") |  | ||||||
|                           @PathVariable String[] ids) { |  | ||||||
|         return toAjax(iActProjectService.deleteWithValidByIds(Arrays.asList(ids), true)); |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -0,0 +1,109 @@ | |||||||
|  | package com.ruoyi.scientific.controller; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Arrays; | ||||||
|  | import java.util.concurrent.TimeUnit; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.vo.DepartmentVo; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import javax.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import com.ruoyi.common.annotation.RepeatSubmit; | ||||||
|  | import com.ruoyi.common.annotation.Log; | ||||||
|  | import com.ruoyi.common.core.controller.BaseController; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.ruoyi.common.core.domain.R; | ||||||
|  | import com.ruoyi.common.core.validate.AddGroup; | ||||||
|  | import com.ruoyi.common.core.validate.EditGroup; | ||||||
|  | import com.ruoyi.common.core.validate.QueryGroup; | ||||||
|  | import com.ruoyi.common.enums.BusinessType; | ||||||
|  | import com.ruoyi.common.utils.poi.ExcelUtil; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.bo.DepartmentBo; | ||||||
|  | import com.ruoyi.scientific.service.IDepartmentService; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * department | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/scientific/department") | ||||||
|  | public class DepartmentController extends BaseController { | ||||||
|  | 
 | ||||||
|  |     private final IDepartmentService iDepartmentService; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:department:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<DepartmentVo> list(DepartmentBo bo, PageQuery pageQuery) { | ||||||
|  |         return iDepartmentService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 导出department列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:department:export") | ||||||
|  |     @Log(title = "department", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(DepartmentBo bo, HttpServletResponse response) { | ||||||
|  |         List<DepartmentVo> list = iDepartmentService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "department", DepartmentVo.class, response); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取department详细信息 | ||||||
|  |      * | ||||||
|  |      * @param departmentId 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:department:query") | ||||||
|  |     @GetMapping("/{departmentId}") | ||||||
|  |     public R<DepartmentVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable Long departmentId) { | ||||||
|  |         return R.ok(iDepartmentService.queryById(departmentId)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增department | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:department:add") | ||||||
|  |     @Log(title = "department", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody DepartmentBo bo) { | ||||||
|  |         return toAjax(iDepartmentService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 修改department | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:department:edit") | ||||||
|  |     @Log(title = "department", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody DepartmentBo bo) { | ||||||
|  |         return toAjax(iDepartmentService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 删除department | ||||||
|  |      * | ||||||
|  |      * @param departmentIds 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:department:remove") | ||||||
|  |     @Log(title = "department", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{departmentIds}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] departmentIds) { | ||||||
|  |         return toAjax(iDepartmentService.deleteWithValidByIds(Arrays.asList(departmentIds), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -43,7 +43,7 @@ public class ProjectApplicationController extends BaseController { | |||||||
|     /** |     /** | ||||||
|      * 查询项目申报列表 |      * 查询项目申报列表 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:application:list") | //    @SaCheckPermission("scientific:application:list") | ||||||
|     @GetMapping("/list") |     @GetMapping("/list") | ||||||
|     public TableDataInfo<ProjectApplicationVo> list(ProjectApplicationBo bo, PageQuery pageQuery) { |     public TableDataInfo<ProjectApplicationVo> list(ProjectApplicationBo bo, PageQuery pageQuery) { | ||||||
|         return iProjectApplicationService.queryPageList(bo, pageQuery); |         return iProjectApplicationService.queryPageList(bo, pageQuery); | ||||||
| @ -107,6 +107,7 @@ public class ProjectApplicationController extends BaseController { | |||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 修改项项目预算审批 |      * 修改项项目预算审批 | ||||||
|  | 	 * @author zhanli | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:application:edit") |     @SaCheckPermission("scientific:application:edit") | ||||||
|     @RepeatSubmit() |     @RepeatSubmit() | ||||||
| @ -128,4 +129,13 @@ public class ProjectApplicationController extends BaseController { | |||||||
|                           @PathVariable Long[] projectIds) { |                           @PathVariable Long[] projectIds) { | ||||||
|         return toAjax(iProjectApplicationService.deleteWithValidByIds(Arrays.asList(projectIds), true)); |         return toAjax(iProjectApplicationService.deleteWithValidByIds(Arrays.asList(projectIds), true)); | ||||||
|     } |     } | ||||||
|  |     /** | ||||||
|  |      * 获取已申报项目 | ||||||
|  |      * cyf | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:application:declared") | ||||||
|  |     @GetMapping("/declared") | ||||||
|  |     public R<List<ProjectApplicationVo>> getDeclaredProjects() { | ||||||
|  |         return R.ok(iProjectApplicationService.queryDeclaredProjects()); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -2,8 +2,9 @@ package com.ruoyi.scientific.controller; | |||||||
| 
 | 
 | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Arrays; | import java.util.Arrays; | ||||||
| import java.util.concurrent.TimeUnit; |  | ||||||
| 
 | 
 | ||||||
|  | import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; | ||||||
|  | import com.ruoyi.scientific.service.IProjectHandbookService; | ||||||
| import lombok.RequiredArgsConstructor; | import lombok.RequiredArgsConstructor; | ||||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||||
| import javax.validation.constraints.*; | import javax.validation.constraints.*; | ||||||
| @ -17,19 +18,16 @@ import com.ruoyi.common.core.domain.PageQuery; | |||||||
| import com.ruoyi.common.core.domain.R; | import com.ruoyi.common.core.domain.R; | ||||||
| import com.ruoyi.common.core.validate.AddGroup; | import com.ruoyi.common.core.validate.AddGroup; | ||||||
| import com.ruoyi.common.core.validate.EditGroup; | import com.ruoyi.common.core.validate.EditGroup; | ||||||
| import com.ruoyi.common.core.validate.QueryGroup; |  | ||||||
| import com.ruoyi.common.enums.BusinessType; | import com.ruoyi.common.enums.BusinessType; | ||||||
| import com.ruoyi.common.utils.poi.ExcelUtil; | import com.ruoyi.common.utils.poi.ExcelUtil; | ||||||
| import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; | import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; | ||||||
| import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; |  | ||||||
| import com.ruoyi.scientific.service.IProjectHandbookService; |  | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2 |  * 项目申报指南 | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| @Validated | @Validated | ||||||
| @RequiredArgsConstructor | @RequiredArgsConstructor | ||||||
| @ -40,7 +38,7 @@ public class ProjectHandbookController extends BaseController { | |||||||
|     private final IProjectHandbookService iProjectHandbookService; |     private final IProjectHandbookService iProjectHandbookService; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2列表 |      * 查询项目申报指南列表 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:handbook:list") |     @SaCheckPermission("scientific:handbook:list") | ||||||
|     @GetMapping("/list") |     @GetMapping("/list") | ||||||
| @ -49,18 +47,18 @@ public class ProjectHandbookController extends BaseController { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 导出项目申报v2列表 |      * 导出项目申报指南列表 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:handbook:export") |     @SaCheckPermission("scientific:handbook:export") | ||||||
|     @Log(title = "项目申报v2", businessType = BusinessType.EXPORT) |     @Log(title = "项目申报指南", businessType = BusinessType.EXPORT) | ||||||
|     @PostMapping("/export") |     @PostMapping("/export") | ||||||
|     public void export(ProjectHandbookBo bo, HttpServletResponse response) { |     public void export(ProjectHandbookBo bo, HttpServletResponse response) { | ||||||
|         List<ProjectHandbookVo> list = iProjectHandbookService.queryList(bo); |         List<ProjectHandbookVo> list = iProjectHandbookService.queryList(bo); | ||||||
|         ExcelUtil.exportExcel(list, "项目申报v2", ProjectHandbookVo.class, response); |         ExcelUtil.exportExcel(list, "项目申报指南", ProjectHandbookVo.class, response); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 获取项目申报v2详细信息 |      * 获取项目申报指南详细信息 | ||||||
|      * |      * | ||||||
|      * @param handbookId 主键 |      * @param handbookId 主键 | ||||||
|      */ |      */ | ||||||
| @ -72,10 +70,10 @@ public class ProjectHandbookController extends BaseController { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 新增项目申报v2 |      * 新增项目申报指南 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:handbook:add") |     @SaCheckPermission("scientific:handbook:add") | ||||||
|     @Log(title = "项目申报v2", businessType = BusinessType.INSERT) |     @Log(title = "项目申报指南", businessType = BusinessType.INSERT) | ||||||
|     @RepeatSubmit() |     @RepeatSubmit() | ||||||
|     @PostMapping() |     @PostMapping() | ||||||
|     public R<Void> add(@Validated(AddGroup.class) @RequestBody ProjectHandbookBo bo) { |     public R<Void> add(@Validated(AddGroup.class) @RequestBody ProjectHandbookBo bo) { | ||||||
| @ -83,10 +81,10 @@ public class ProjectHandbookController extends BaseController { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 修改项目申报v2 |      * 修改项目申报指南 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:handbook:edit") |     @SaCheckPermission("scientific:handbook:edit") | ||||||
|     @Log(title = "项目申报v2", businessType = BusinessType.UPDATE) |     @Log(title = "项目申报指南", businessType = BusinessType.UPDATE) | ||||||
|     @RepeatSubmit() |     @RepeatSubmit() | ||||||
|     @PutMapping() |     @PutMapping() | ||||||
|     public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProjectHandbookBo bo) { |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProjectHandbookBo bo) { | ||||||
| @ -94,12 +92,12 @@ public class ProjectHandbookController extends BaseController { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 删除项目申报v2 |      * 删除项目申报指南 | ||||||
|      * |      * | ||||||
|      * @param handbookIds 主键串 |      * @param handbookIds 主键串 | ||||||
|      */ |      */ | ||||||
|     @SaCheckPermission("scientific:handbook:remove") |     @SaCheckPermission("scientific:handbook:remove") | ||||||
|     @Log(title = "项目申报v2", businessType = BusinessType.DELETE) |     @Log(title = "项目申报指南", businessType = BusinessType.DELETE) | ||||||
|     @DeleteMapping("/{handbookIds}") |     @DeleteMapping("/{handbookIds}") | ||||||
|     public R<Void> remove(@NotEmpty(message = "主键不能为空") |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|                           @PathVariable Long[] handbookIds) { |                           @PathVariable Long[] handbookIds) { | ||||||
|  | |||||||
| @ -0,0 +1,106 @@ | |||||||
|  | package com.ruoyi.scientific.controller; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Arrays; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.bo.ProjectPlanBo; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import javax.servlet.http.HttpServletResponse; | ||||||
|  | import javax.validation.constraints.*; | ||||||
|  | import cn.dev33.satoken.annotation.SaCheckPermission; | ||||||
|  | import org.springframework.web.bind.annotation.*; | ||||||
|  | import org.springframework.validation.annotation.Validated; | ||||||
|  | import com.ruoyi.common.annotation.RepeatSubmit; | ||||||
|  | import com.ruoyi.common.annotation.Log; | ||||||
|  | import com.ruoyi.common.core.controller.BaseController; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.ruoyi.common.core.domain.R; | ||||||
|  | import com.ruoyi.common.core.validate.AddGroup; | ||||||
|  | import com.ruoyi.common.core.validate.EditGroup; | ||||||
|  | import com.ruoyi.common.enums.BusinessType; | ||||||
|  | import com.ruoyi.common.utils.poi.ExcelUtil; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectPlanVo; | ||||||
|  | import com.ruoyi.scientific.service.IProjectPlanService; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2 | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | @Validated | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @RestController | ||||||
|  | @RequestMapping("/scientific/plan") | ||||||
|  | public class ProjectPlanController extends BaseController { | ||||||
|  | 
 | ||||||
|  |     private final IProjectPlanService iProjectHandbookService; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:project_application_plan:list") | ||||||
|  |     @GetMapping("/list") | ||||||
|  |     public TableDataInfo<ProjectPlanVo> list(ProjectPlanBo bo, PageQuery pageQuery) { | ||||||
|  |         return iProjectHandbookService.queryPageList(bo, pageQuery); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 导出项目申报计划列表 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:plan:export") | ||||||
|  |     @Log(title = "项目申报v2", businessType = BusinessType.EXPORT) | ||||||
|  |     @PostMapping("/export") | ||||||
|  |     public void export(ProjectPlanBo bo, HttpServletResponse response) { | ||||||
|  |         List<ProjectPlanVo> list = iProjectHandbookService.queryList(bo); | ||||||
|  |         ExcelUtil.exportExcel(list, "项目申报v2", ProjectPlanVo.class, response); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 获取项目申报计划详细信息 | ||||||
|  |      * | ||||||
|  |      * @param planId 主键 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:plan:query") | ||||||
|  |     @GetMapping("/{planId}") | ||||||
|  |     public R<ProjectPlanVo> getInfo(@NotNull(message = "主键不能为空") | ||||||
|  |                                      @PathVariable Long planId) { | ||||||
|  |         return R.ok(iProjectHandbookService.queryById(planId)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增项目申报计划 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:plan:add") | ||||||
|  |     @Log(title = "项目申报计划", businessType = BusinessType.INSERT) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PostMapping() | ||||||
|  |     public R<Void> add(@Validated(AddGroup.class) @RequestBody ProjectPlanBo bo) { | ||||||
|  |         return toAjax(iProjectHandbookService.insertByBo(bo)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 修改项目申报计划 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:plan:edit") | ||||||
|  |     @Log(title = "项目申报计划", businessType = BusinessType.UPDATE) | ||||||
|  |     @RepeatSubmit() | ||||||
|  |     @PutMapping() | ||||||
|  |     public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProjectPlanBo bo) { | ||||||
|  |         return toAjax(iProjectHandbookService.updateByBo(bo)); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 删除项目申报计划 | ||||||
|  |      * | ||||||
|  |      * @param planIds 主键串 | ||||||
|  |      */ | ||||||
|  |     @SaCheckPermission("scientific:plan:remove") | ||||||
|  |     @Log(title = "项目申报计划", businessType = BusinessType.DELETE) | ||||||
|  |     @DeleteMapping("/{planIds}") | ||||||
|  |     public R<Void> remove(@NotEmpty(message = "主键不能为空") | ||||||
|  |                           @PathVariable Long[] planIds) { | ||||||
|  |         return toAjax(iProjectHandbookService.deleteWithValidByIds(Arrays.asList(planIds), true)); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,49 +0,0 @@ | |||||||
| package com.ruoyi.scientific.domain; |  | ||||||
| 
 |  | ||||||
| import com.alibaba.excel.annotation.ExcelProperty; |  | ||||||
| import com.baomidou.mybatisplus.annotation.*; |  | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; |  | ||||||
| import java.io.Serializable; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.math.BigDecimal; |  | ||||||
| 
 |  | ||||||
| import com.ruoyi.common.core.domain.BaseEntity; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理对象 act_project |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| @Data |  | ||||||
| //@EqualsAndHashCode(callSuper = true) |  | ||||||
| @TableName("act_project") |  | ||||||
| public class ActProject implements Serializable { |  | ||||||
| 
 |  | ||||||
|     private static final long serialVersionUID=1L; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * |  | ||||||
|      */ |  | ||||||
|     @TableId(value = "id") |  | ||||||
|     private String id; |  | ||||||
|     /** |  | ||||||
|      * 项目id |  | ||||||
|      */ |  | ||||||
|     private String projectId; |  | ||||||
|     /** |  | ||||||
|      * 指南id |  | ||||||
|      */ |  | ||||||
|     private String handbookId; |  | ||||||
|     /** |  | ||||||
|      * 项目类别 |  | ||||||
|      */ |  | ||||||
|     private Long category; |  | ||||||
|     /** |  | ||||||
|      * 项目名称 |  | ||||||
|      */ |  | ||||||
|     private String name; |  | ||||||
| 
 |  | ||||||
|     private Date createTime; |  | ||||||
| } |  | ||||||
| @ -0,0 +1,72 @@ | |||||||
|  | package com.ruoyi.scientific.domain; | ||||||
|  | 
 | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import java.io.Serializable; | ||||||
|  | import java.util.Date; | ||||||
|  | import java.math.BigDecimal; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.core.domain.BaseEntity; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * department对象 department | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("department") | ||||||
|  | public class Department extends BaseEntity { | ||||||
|  | 
 | ||||||
|  |     private static final long serialVersionUID=1L; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位ID | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "department_id") | ||||||
|  |     private Long departmentId; | ||||||
|  |     /** | ||||||
|  |      * 单位名称 | ||||||
|  |      */ | ||||||
|  |     private String departmentName; | ||||||
|  |     /** | ||||||
|  |      * 单位地址 | ||||||
|  |      */ | ||||||
|  |     private String departmentAddress; | ||||||
|  |     /** | ||||||
|  |      * 单位性质,1企业,2科研机构,3高校 | ||||||
|  |      */ | ||||||
|  |     private String departmentCategory; | ||||||
|  |     /** | ||||||
|  |      * 单位联系人姓名 | ||||||
|  |      */ | ||||||
|  |     private String departmentPerson; | ||||||
|  |     /** | ||||||
|  |      * 单位联系人电话 | ||||||
|  |      */ | ||||||
|  |     private String departmentPhone; | ||||||
|  |     /** | ||||||
|  |      * 单位联系人邮件 | ||||||
|  |      */ | ||||||
|  |     private String departmentEmail; | ||||||
|  |     /** | ||||||
|  |      * 相关文件 | ||||||
|  |      */ | ||||||
|  |     private String departmentFile; | ||||||
|  |     /** | ||||||
|  |      * 其他备注信息 | ||||||
|  |      */ | ||||||
|  |     private String departmentNote; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程实例Id | ||||||
|  |      */ | ||||||
|  |     private String departmentProcId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过) | ||||||
|  |      */ | ||||||
|  |     private String departmentStatus; | ||||||
|  | } | ||||||
| @ -71,6 +71,21 @@ public class ProjectApplication extends BaseEntity { | |||||||
|     private String projectLeaderPhone; |     private String projectLeaderPhone; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|  |      * 项目关联计划ID | ||||||
|  |      */ | ||||||
|  |     private Long projectPlanId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目关联计划名称 | ||||||
|  |      */ | ||||||
|  |     private String projectPlanName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目类别(0纵向 1横向 2院级 ) | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  | 	 | ||||||
|  | 	/** | ||||||
|      * 项目到账情况 0:未到账  1:已到账 |      * 项目到账情况 0:未到账  1:已到账 | ||||||
|      */ |      */ | ||||||
|     private String projectFundsReceived; |     private String projectFundsReceived; | ||||||
| @ -79,4 +94,9 @@ public class ProjectApplication extends BaseEntity { | |||||||
|      * 项目到账情况备注说明 |      * 项目到账情况备注说明 | ||||||
|      */ |      */ | ||||||
|     private String projectFundsRemark; |     private String projectFundsRemark; | ||||||
|  | 	 | ||||||
|  |     /** | ||||||
|  |      * 项目表单内容 | ||||||
|  |      */ | ||||||
|  |     private String projectContent; | ||||||
| } | } | ||||||
|  | |||||||
| @ -3,19 +3,16 @@ package com.ruoyi.scientific.domain; | |||||||
| import com.baomidou.mybatisplus.annotation.*; | import com.baomidou.mybatisplus.annotation.*; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||||
| import java.io.Serializable; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.math.BigDecimal; |  | ||||||
| 
 | 
 | ||||||
| import java.util.Date; | import java.util.Date; | ||||||
| import com.fasterxml.jackson.annotation.JsonFormat; | 
 | ||||||
| import com.ruoyi.common.core.domain.BaseEntity; | import com.ruoyi.common.core.domain.BaseEntity; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2对象 project_handbook |  * 项目申报指南对象 handbook | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| @Data | @Data | ||||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||||
| @ -30,44 +27,40 @@ public class ProjectHandbook extends BaseEntity { | |||||||
|     @TableId(value = "handbook_id") |     @TableId(value = "handbook_id") | ||||||
|     private Long handbookId; |     private Long handbookId; | ||||||
|     /** |     /** | ||||||
|      * 申报信息名称 |      * 指南名称 | ||||||
|      */ |      */ | ||||||
|     private String handbookName; |     private String handbookName; | ||||||
|     /** |     /** | ||||||
|      * 项目立项流程实例Id |      * 指南分类 | ||||||
|      */ |      */ | ||||||
|     private String handbookProcId; |     private String handbookCategory; | ||||||
|     /** |     /** | ||||||
|      * 项目审核状态(0未审核 1审核中 3审核通过) |      * 指南级别(4院级 3市级 2省级 1国家级) | ||||||
|      */ |  | ||||||
|     private String handbookStatus; |  | ||||||
|     /** |  | ||||||
|      * 项目指南类型(0 科技计划 1 研发计划) |  | ||||||
|      */ |  | ||||||
|     private String handbookType; |  | ||||||
|     /** |  | ||||||
|      * 项目指南级别(0市级 1区级 3省级 4国家级) |  | ||||||
|      */ |      */ | ||||||
|     private String handbookLevel; |     private String handbookLevel; | ||||||
|     /** |     /** | ||||||
|      * 申报状态(0 停止申报 1 申报中) |      * 发布时间 | ||||||
|      */ |      */ | ||||||
|     private String declareStatus; |     private Date handbookDate; | ||||||
|     /** |     /** | ||||||
|      * 申报开始日期 |      * 备注 | ||||||
|      */ |      */ | ||||||
|     private Date projectAppStTime; |     private String handbookNote; | ||||||
|     /** |     /** | ||||||
|      * 申报结束日期 |      * 指南文件 | ||||||
|      */ |      */ | ||||||
|     private Date projectAppEndTime; |     private String handbookFile; | ||||||
|     /** |     /** | ||||||
|      * 指南负责人 |      * 指南录入流程实例Id | ||||||
|      */ |      */ | ||||||
|     private String handbookLeader; |     private String handbookProcId; | ||||||
|     /** |     /** | ||||||
|      * 指南负责人电话 |      * 指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过) | ||||||
|      */ |      */ | ||||||
|     private String projectLeaderPhone; |     private String handbookStatus; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南发布人姓名 | ||||||
|  |      */ | ||||||
|  |     private String directorName; | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,105 @@ | |||||||
|  | package com.ruoyi.scientific.domain; | ||||||
|  | 
 | ||||||
|  | import com.baomidou.mybatisplus.annotation.*; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.core.domain.BaseEntity; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2对象 project_handbook | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | @TableName("project_plan") | ||||||
|  | public class ProjectPlan extends BaseEntity { | ||||||
|  | 
 | ||||||
|  |     private static final long serialVersionUID=1L; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目ID | ||||||
|  |      */ | ||||||
|  |     @TableId(value = "plan_id") | ||||||
|  |     private Long planId; | ||||||
|  |     /** | ||||||
|  |      * 申报信息名称 | ||||||
|  |      */ | ||||||
|  |     private String planName; | ||||||
|  |     /** | ||||||
|  |      * 项目立项流程实例Id | ||||||
|  |      */ | ||||||
|  |     private String planProcId; | ||||||
|  |     /** | ||||||
|  |      * 项目审核状态(1审核中 2审核失败 3审核通过) | ||||||
|  |      */ | ||||||
|  |     private String planStatus; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目指南级别(4院级 3市级 2省级 1国家级) | ||||||
|  |      */ | ||||||
|  |     private String planLevel; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报指南文件 | ||||||
|  |      */ | ||||||
|  |     private String planFile; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报计划 | ||||||
|  |      */ | ||||||
|  |     private String planComment; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报开始日期 | ||||||
|  |      */ | ||||||
|  |     private Date projectAppStTime; | ||||||
|  |     /** | ||||||
|  |      * 申报结束日期 | ||||||
|  |      */ | ||||||
|  |     private Date projectAppEndTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目来源单位 | ||||||
|  |      */ | ||||||
|  |     private String projectSourceDepartment; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目分类(即申报计划类别) | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目子类 | ||||||
|  |      */ | ||||||
|  |     private String projectSubclass; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审名称 | ||||||
|  |      */ | ||||||
|  |     private String reviewName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审开始时间 | ||||||
|  |      */ | ||||||
|  |     private Date reviewStTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审结束时间 | ||||||
|  |      */ | ||||||
|  |     private Date reviewEndTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 创建人名字 | ||||||
|  |      */ | ||||||
|  |     private String createName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 关联的指南ID | ||||||
|  |      */ | ||||||
|  |     private Long handbookId; | ||||||
|  | } | ||||||
| @ -1,68 +0,0 @@ | |||||||
| package com.ruoyi.scientific.domain.bo; |  | ||||||
| 
 |  | ||||||
| import com.baomidou.mybatisplus.annotation.TableField; |  | ||||||
| import com.fasterxml.jackson.annotation.JsonInclude; |  | ||||||
| import com.ruoyi.common.core.validate.AddGroup; |  | ||||||
| import com.ruoyi.common.core.validate.EditGroup; |  | ||||||
| import lombok.Data; |  | ||||||
| import lombok.EqualsAndHashCode; |  | ||||||
| import javax.validation.constraints.*; |  | ||||||
| 
 |  | ||||||
| import java.io.Serializable; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.util.HashMap; |  | ||||||
| import java.util.Map; |  | ||||||
| 
 |  | ||||||
| import com.ruoyi.common.core.domain.BaseEntity; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理业务对象 act_project |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| 
 |  | ||||||
| @Data |  | ||||||
| //@EqualsAndHashCode(callSuper = true) |  | ||||||
| public class ActProjectBo implements Serializable { |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * |  | ||||||
|      */ |  | ||||||
|     @NotBlank(message = "不能为空", groups = { EditGroup.class }) |  | ||||||
|     private String id; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目id |  | ||||||
|      */ |  | ||||||
|     @NotBlank(message = "项目id不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private String projectId; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 指南id |  | ||||||
|      */ |  | ||||||
|     @NotBlank(message = "指南id不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private String handbookId; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目类别 |  | ||||||
|      */ |  | ||||||
|     @NotNull(message = "项目类别不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private Long category; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目名称 |  | ||||||
|      */ |  | ||||||
|     @NotBlank(message = "项目名称不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private String name; |  | ||||||
| 
 |  | ||||||
|     @NotNull(message = "创建时间不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private Date createTime; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 请求参数 |  | ||||||
|      */ |  | ||||||
|     @JsonInclude(JsonInclude.Include.NON_EMPTY) |  | ||||||
|     @TableField(exist = false) |  | ||||||
|     private Map<String, Object> params = new HashMap<>(); |  | ||||||
| } |  | ||||||
| @ -0,0 +1,80 @@ | |||||||
|  | package com.ruoyi.scientific.domain.bo; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.core.validate.AddGroup; | ||||||
|  | import com.ruoyi.common.core.validate.EditGroup; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import javax.validation.constraints.*; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.core.domain.BaseEntity; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * department业务对象 department | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | public class DepartmentBo extends BaseEntity { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位ID | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "单位ID不能为空", groups = { EditGroup.class }) | ||||||
|  |     private Long departmentId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String departmentName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位地址 | ||||||
|  |      */ | ||||||
|  |     private String departmentAddress; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位性质,1企业,2科研机构,3高校 | ||||||
|  |      */ | ||||||
|  |     private String departmentCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位联系人姓名 | ||||||
|  |      */ | ||||||
|  |     private String departmentPerson; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位联系人电话 | ||||||
|  |      */ | ||||||
|  |     private String departmentPhone; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位联系人邮件 | ||||||
|  |      */ | ||||||
|  |     private String departmentEmail; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 相关文件 | ||||||
|  |      */ | ||||||
|  |     private String departmentFile; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 其他备注信息 | ||||||
|  |      */ | ||||||
|  |     private String departmentNote; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程实例Id | ||||||
|  |      */ | ||||||
|  |     private String departmentProcId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过) | ||||||
|  |      */ | ||||||
|  |     private String departmentStatus; | ||||||
|  | } | ||||||
| @ -62,13 +62,13 @@ public class ProjectApplicationBo extends BaseEntity { | |||||||
|     /** |     /** | ||||||
|      * 申报开始日期 |      * 申报开始日期 | ||||||
|      */ |      */ | ||||||
|     @NotNull(message = "申报开始日期不能为空", groups = { AddGroup.class, EditGroup.class }) |     @NotNull(message = "项目开始日期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|     private Date projectAppStTime; |     private Date projectAppStTime; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报结束日期 |      * 申报结束日期 | ||||||
|      */ |      */ | ||||||
|     @NotNull(message = "申报结束日期不能为空", groups = { AddGroup.class, EditGroup.class }) |     @NotNull(message = "项目结束日期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|     private Date projectAppEndTime; |     private Date projectAppEndTime; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
| @ -86,9 +86,28 @@ public class ProjectApplicationBo extends BaseEntity { | |||||||
|     /** |     /** | ||||||
|      * 项目负责人联系电话 |      * 项目负责人联系电话 | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "项目负责人联系电话不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private String projectLeaderPhone; |     private String projectLeaderPhone; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目关联计划ID | ||||||
|  |      */ | ||||||
|  |     private Long projectPlanId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目关联计划名称 | ||||||
|  |      */ | ||||||
|  |     private String projectPlanName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目关类别(0纵向 1横向 2院级 ) | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目表单内容 | ||||||
|  |      */ | ||||||
|  |     private String projectContent; | ||||||
|  | 
 | ||||||
|     /** |     /** | ||||||
|      * 项目到账情况 0:未到账  1:已到账 |      * 项目到账情况 0:未到账  1:已到账 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -1,5 +1,6 @@ | |||||||
| package com.ruoyi.scientific.domain.bo; | package com.ruoyi.scientific.domain.bo; | ||||||
| 
 | 
 | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
| import com.ruoyi.common.core.validate.AddGroup; | import com.ruoyi.common.core.validate.AddGroup; | ||||||
| import com.ruoyi.common.core.validate.EditGroup; | import com.ruoyi.common.core.validate.EditGroup; | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| @ -8,15 +9,13 @@ import javax.validation.constraints.*; | |||||||
| 
 | 
 | ||||||
| import java.util.Date; | import java.util.Date; | ||||||
| 
 | 
 | ||||||
| import java.util.Date; |  | ||||||
| import com.fasterxml.jackson.annotation.JsonFormat; |  | ||||||
| import com.ruoyi.common.core.domain.BaseEntity; | import com.ruoyi.common.core.domain.BaseEntity; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2业务对象 project_handbook |  * 项目申报指南业务对象 handbook | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| @Data | @Data | ||||||
| @ -30,64 +29,51 @@ public class ProjectHandbookBo extends BaseEntity { | |||||||
|     private Long handbookId; |     private Long handbookId; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报信息名称 |      * 指南名称 | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "申报信息名称不能为空", groups = { AddGroup.class, EditGroup.class }) |     @NotBlank(message = "指南名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|     private String handbookName; |     private String handbookName; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 项目立项流程实例Id |      * 指南分类 | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "项目立项流程实例Id不能为空", groups = { AddGroup.class, EditGroup.class }) |     @NotBlank(message = "指南分类不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|     private String handbookProcId; |     private String handbookCategory; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 项目审核状态(0未审核 1审核中 3审核通过) |      * 指南级别(4院级 3市级 2省级 1国家级) | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "项目审核状态(0未审核 1审核中 3审核通过)不能为空", groups = { AddGroup.class, EditGroup.class }) |     @NotBlank(message = "指南级别(4院级 3市级 2省级 1国家级)不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|     private String handbookStatus; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目指南类型(0 科技计划 1 研发计划) |  | ||||||
|      */ |  | ||||||
|     @NotBlank(message = "项目指南类型(0 科技计划 1 研发计划)不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private String handbookType; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目指南级别(0市级 1区级 3省级 4国家级) |  | ||||||
|      */ |  | ||||||
|     @NotBlank(message = "项目指南级别(0市级 1区级 3省级 4国家级)不能为空", groups = { AddGroup.class, EditGroup.class }) |  | ||||||
|     private String handbookLevel; |     private String handbookLevel; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报状态(0 停止申报 1 申报中) |      * 发布时间 | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "申报状态(0 停止申报 1 申报中)不能为空", groups = { AddGroup.class, EditGroup.class }) |     @NotNull(message = "发布时间不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|     private String declareStatus; |     private Date handbookDate; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报开始日期 |      * 备注 | ||||||
|      */ |      */ | ||||||
|     @NotNull(message = "申报开始日期不能为空", groups = { AddGroup.class, EditGroup.class }) |     private String handbookNote; | ||||||
|     private Date projectAppStTime; |  | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报结束日期 |      * 指南文件 | ||||||
|      */ |      */ | ||||||
|     @NotNull(message = "申报结束日期不能为空", groups = { AddGroup.class, EditGroup.class }) |     private String handbookFile; | ||||||
|     private Date projectAppEndTime; |  | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 指南负责人 |      * 指南录入流程实例Id | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "指南负责人不能为空", groups = { AddGroup.class, EditGroup.class }) |     private String handbookProcId; | ||||||
|     private String handbookLeader; |  | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 指南负责人电话 |      * 指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过) | ||||||
|      */ |      */ | ||||||
|     @NotBlank(message = "指南负责人电话不能为空", groups = { AddGroup.class, EditGroup.class }) |     private String handbookStatus; | ||||||
|     private String projectLeaderPhone; |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南发布人姓名 | ||||||
|  |      */ | ||||||
|  |     private String directorName; | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,116 @@ | |||||||
|  | package com.ruoyi.scientific.domain.bo; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.core.validate.AddGroup; | ||||||
|  | import com.ruoyi.common.core.validate.EditGroup; | ||||||
|  | import lombok.Data; | ||||||
|  | import lombok.EqualsAndHashCode; | ||||||
|  | import javax.validation.constraints.*; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.core.domain.BaseEntity; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2业务对象 project_handbook | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | @Data | ||||||
|  | @EqualsAndHashCode(callSuper = true) | ||||||
|  | public class ProjectPlanBo extends BaseEntity { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目ID | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "项目ID不能为空", groups = { EditGroup.class }) | ||||||
|  |     private Long planId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报信息名称 | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "申报信息名称不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String planName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程实例Id | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "指南录入流程实例Id不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String planProcId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程审核状态(1审核中 2审核失败 3审核通过) | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "指南录入流程审核状态", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String planStatus; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目指南级别(4院级 3市级 2省级 1国家级) | ||||||
|  |      */ | ||||||
|  |     @NotBlank(message = "项目指南级别(4院级 3市级 2省级 1国家级)不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private String planLevel; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报指南文件 | ||||||
|  |      */ | ||||||
|  | 
 | ||||||
|  |     private String planFile; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 备注 | ||||||
|  |      */ | ||||||
|  |     private String planComment; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报开始日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "申报开始日期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Date projectAppStTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报结束日期 | ||||||
|  |      */ | ||||||
|  |     @NotNull(message = "申报结束日期不能为空", groups = { AddGroup.class, EditGroup.class }) | ||||||
|  |     private Date projectAppEndTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目来源单位 | ||||||
|  |      */ | ||||||
|  |     private String projectSourceDepartment; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目分类(即申报计划类别) | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目子类 | ||||||
|  |      */ | ||||||
|  |     private String projectSubclass; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审名称 | ||||||
|  |      */ | ||||||
|  |     private String reviewName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审开始时间 | ||||||
|  |      */ | ||||||
|  |     private Date reviewStTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审结束时间 | ||||||
|  |      */ | ||||||
|  |     private Date reviewEndTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 创建人名字 | ||||||
|  |      */ | ||||||
|  |     private String createName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 关联的指南ID | ||||||
|  |      */ | ||||||
|  |     private Long handbookId; | ||||||
|  | } | ||||||
| @ -1,71 +0,0 @@ | |||||||
| package com.ruoyi.scientific.domain.vo; |  | ||||||
| 
 |  | ||||||
| import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |  | ||||||
| import com.alibaba.excel.annotation.ExcelProperty; |  | ||||||
| import com.baomidou.mybatisplus.annotation.TableField; |  | ||||||
| import com.fasterxml.jackson.annotation.JsonInclude; |  | ||||||
| import com.ruoyi.common.annotation.ExcelDictFormat; |  | ||||||
| import com.ruoyi.common.convert.ExcelDictConvert; |  | ||||||
| import lombok.Data; |  | ||||||
| 
 |  | ||||||
| import java.io.Serializable; |  | ||||||
| import java.util.Date; |  | ||||||
| import java.util.HashMap; |  | ||||||
| import java.util.Map; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理视图对象 act_project |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| @Data |  | ||||||
| @ExcelIgnoreUnannotated |  | ||||||
| public class ActProjectVo implements Serializable { |  | ||||||
| 
 |  | ||||||
|     private static final long serialVersionUID = 1L; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "") |  | ||||||
|     private String id; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目id |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "项目id") |  | ||||||
|     private String projectId; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 指南id |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "指南id") |  | ||||||
|     private String handbookId; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目类别 |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "项目类别") |  | ||||||
|     private Long category; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目名称 |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "项目名称") |  | ||||||
|     private String name; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目创建时间 |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "项目创建时间") |  | ||||||
|     private Date createTime; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 请求参数 |  | ||||||
|      */ |  | ||||||
|     @JsonInclude(JsonInclude.Include.NON_EMPTY) |  | ||||||
|     @TableField(exist = false) |  | ||||||
|     private Map<String, Object> params = new HashMap<>(); |  | ||||||
| } |  | ||||||
| @ -0,0 +1,87 @@ | |||||||
|  | package com.ruoyi.scientific.domain.vo; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import com.ruoyi.common.annotation.ExcelDictFormat; | ||||||
|  | import com.ruoyi.common.convert.ExcelDictConvert; | ||||||
|  | import lombok.Data; | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * department视图对象 department | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | public class DepartmentVo { | ||||||
|  | 
 | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位ID | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位ID") | ||||||
|  |     private Long departmentId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位名称") | ||||||
|  |     private String departmentName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位地址 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位地址") | ||||||
|  |     private String departmentAddress; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位性质,1企业,2科研机构,3高校 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位性质,1企业,2科研机构,3高校") | ||||||
|  |     private String departmentCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位联系人姓名 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位联系人姓名") | ||||||
|  |     private String departmentPerson; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位联系人电话 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位联系人电话") | ||||||
|  |     private String departmentPhone; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 单位联系人邮件 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "单位联系人邮件") | ||||||
|  |     private String departmentEmail; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 相关文件 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "相关文件") | ||||||
|  |     private String departmentFile; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 其他备注信息 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "其他备注信息") | ||||||
|  |     private String departmentNote; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程实例Id | ||||||
|  |      */ | ||||||
|  |     private String departmentProcId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过) | ||||||
|  |      */ | ||||||
|  |     private String departmentStatus; | ||||||
|  | } | ||||||
| @ -88,6 +88,26 @@ public class ProjectApplicationVo { | |||||||
|     @ExcelProperty(value = "项目负责人联系电话") |     @ExcelProperty(value = "项目负责人联系电话") | ||||||
|     private String projectLeaderPhone; |     private String projectLeaderPhone; | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目关联计划ID | ||||||
|  |      */ | ||||||
|  |     private Long projectPlanId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目关联计划名称 | ||||||
|  |      */ | ||||||
|  |     private String projectPlanName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目类别(0纵向 1横向 2院级 ) | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目表单内容 | ||||||
|  |      */ | ||||||
|  |     private String projectContent; | ||||||
|  | 
 | ||||||
|     /** |     /** | ||||||
|      * 项目到账情况 0:未到账  1:已到账 |      * 项目到账情况 0:未到账  1:已到账 | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -1,21 +1,17 @@ | |||||||
| package com.ruoyi.scientific.domain.vo; | package com.ruoyi.scientific.domain.vo; | ||||||
| 
 | 
 | ||||||
| import java.util.Date; | import java.util.Date; | ||||||
| import com.fasterxml.jackson.annotation.JsonFormat; | 
 | ||||||
| import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
| import com.alibaba.excel.annotation.ExcelProperty; | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
| import com.ruoyi.common.annotation.ExcelDictFormat; |  | ||||||
| import com.ruoyi.common.convert.ExcelDictConvert; |  | ||||||
| import lombok.Data; | import lombok.Data; | ||||||
| import java.util.Date; |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2视图对象 project_handbook |  * 项目申报指南视图对象 handbook | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| @Data | @Data | ||||||
| @ExcelIgnoreUnannotated | @ExcelIgnoreUnannotated | ||||||
| @ -30,64 +26,56 @@ public class ProjectHandbookVo { | |||||||
|     private Long handbookId; |     private Long handbookId; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报信息名称 |      * 指南名称 | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "申报信息名称") |     @ExcelProperty(value = "指南名称") | ||||||
|     private String handbookName; |     private String handbookName; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 项目立项流程实例Id |      * 指南分类 | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "项目立项流程实例Id") |     @ExcelProperty(value = "指南分类") | ||||||
|     private String handbookProcId; |     private String handbookCategory; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 项目审核状态(0未审核 1审核中 3审核通过) |      * 指南级别(4院级 3市级 2省级 1国家级) | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "项目审核状态(0未审核 1审核中 3审核通过)") |     @ExcelProperty(value = "指南级别(4院级 3市级 2省级 1国家级)") | ||||||
|     private String handbookStatus; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目指南类型(0 科技计划 1 研发计划) |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "项目指南类型(0 科技计划 1 研发计划)") |  | ||||||
|     private String handbookType; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 项目指南级别(0市级 1区级 3省级 4国家级) |  | ||||||
|      */ |  | ||||||
|     @ExcelProperty(value = "项目指南级别(0市级 1区级 3省级 4国家级)") |  | ||||||
|     private String handbookLevel; |     private String handbookLevel; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报状态(0 停止申报 1 申报中) |      * 发布时间 | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "申报状态(0 停止申报 1 申报中)") |     @ExcelProperty(value = "发布时间") | ||||||
|     private String declareStatus; |     private Date handbookDate; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报开始日期 |      * 备注 | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "申报开始日期") |     @ExcelProperty(value = "备注") | ||||||
|     private Date projectAppStTime; |     private String handbookNote; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 申报结束日期 |      * 指南文件 | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "申报结束日期") |     @ExcelProperty(value = "指南文件") | ||||||
|     private Date projectAppEndTime; |     private String handbookFile; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 指南负责人 |      * 指南录入流程实例Id | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "指南负责人") |     @ExcelProperty(value = "指南录入流程实例Id") | ||||||
|     private String handbookLeader; |     private String handbookProcId; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 指南负责人电话 |      * 指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过) | ||||||
|      */ |      */ | ||||||
|     @ExcelProperty(value = "指南负责人电话") |     @ExcelProperty(value = "指南录入流程状态(0未发起审核 1审核中 2审核失败 3审核通过)") | ||||||
|     private String projectLeaderPhone; |     private String handbookStatus; | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
|  |     /** | ||||||
|  |      * 指南发布人姓名 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "指南发布人姓名") | ||||||
|  |     private String directorName; | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,113 @@ | |||||||
|  | package com.ruoyi.scientific.domain.vo; | ||||||
|  | 
 | ||||||
|  | import java.util.Date; | ||||||
|  | 
 | ||||||
|  | import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; | ||||||
|  | import com.alibaba.excel.annotation.ExcelProperty; | ||||||
|  | import lombok.Data; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2视图对象 project_handbook | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | @Data | ||||||
|  | @ExcelIgnoreUnannotated | ||||||
|  | public class ProjectPlanVo { | ||||||
|  | 
 | ||||||
|  |     private static final long serialVersionUID = 1L; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目ID | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目ID") | ||||||
|  |     private Long planId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报信息名称 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "申报信息名称") | ||||||
|  |     private String planName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目立项流程实例Id | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目立项流程实例Id") | ||||||
|  |     private String planProcId; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目审核状态(0未审核 1审核中 3审核通过) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目审核状态(0未审核 1审核中 3审核通过)") | ||||||
|  |     private String planStatus; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目指南级别(0市级 1区级 3省级 4国家级) | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "项目指南级别(0市级 1区级 3省级 4国家级)") | ||||||
|  |     private String planLevel; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报指南文件 | ||||||
|  |      */ | ||||||
|  |     private String planFile; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报计划 | ||||||
|  |      */ | ||||||
|  |     private String planComment; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报开始日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "申报开始日期") | ||||||
|  |     private Date projectAppStTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 申报结束日期 | ||||||
|  |      */ | ||||||
|  |     @ExcelProperty(value = "申报结束日期") | ||||||
|  |     private Date projectAppEndTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目来源单位 | ||||||
|  |      */ | ||||||
|  |     private String projectSourceDepartment; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目分类(即申报计划类别) | ||||||
|  |      */ | ||||||
|  |     private String projectCategory; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 项目子类 | ||||||
|  |      */ | ||||||
|  |     private String projectSubclass; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审名称 | ||||||
|  |      */ | ||||||
|  |     private String reviewName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审开始时间 | ||||||
|  |      */ | ||||||
|  |     private Date reviewStTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 评审结束时间 | ||||||
|  |      */ | ||||||
|  |     private Date reviewEndTime; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 创建人名字 | ||||||
|  |      */ | ||||||
|  |     private String createName; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 关联的指南ID | ||||||
|  |      */ | ||||||
|  |     private Long handbookId; | ||||||
|  | } | ||||||
| @ -27,6 +27,8 @@ public class BudgetUpdateTaskListener implements ExecutionListener { | |||||||
|         String projectBudget = (String) execution.getVariable("newBudget"); |         String projectBudget = (String) execution.getVariable("newBudget"); | ||||||
|         Long budget = Long.parseLong(projectBudget); |         Long budget = Long.parseLong(projectBudget); | ||||||
| 
 | 
 | ||||||
|  |         String status = (String) execution.getVariable("taskStatus"); | ||||||
|  |         System.out.println("科研模块:项目Id:" + status); | ||||||
|         iProjectApplicationService.updateBudgetInfoById(projectId, budget); |         iProjectApplicationService.updateBudgetInfoById(projectId, budget); | ||||||
| 
 | 
 | ||||||
|         System.out.println("科研模块:项目Id:" + projectIdStr); |         System.out.println("科研模块:项目Id:" + projectIdStr); | ||||||
|  | |||||||
| @ -0,0 +1,59 @@ | |||||||
|  | package com.ruoyi.scientific.listener; | ||||||
|  | import com.ruoyi.common.utils.spring.SpringUtils; | ||||||
|  | import com.ruoyi.flowable.common.constant.ProcessConstants; | ||||||
|  | import com.ruoyi.scientific.domain.bo.DepartmentBo; | ||||||
|  | import com.ruoyi.scientific.service.IDepartmentService; | ||||||
|  | import com.ruoyi.scientific.service.IDepartmentService; | ||||||
|  | import org.flowable.engine.RuntimeService; | ||||||
|  | import org.flowable.engine.delegate.DelegateExecution; | ||||||
|  | import org.flowable.engine.delegate.ExecutionListener; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  | import org.flowable.engine.HistoryService; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.ruoyi.scientific.domain.vo.DepartmentVo; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | 
 | ||||||
|  | @Component | ||||||
|  | public class DepartmentUpdateListener implements ExecutionListener { | ||||||
|  |     /** | ||||||
|  |      * 注入字段(名称与流程设计时字段名称一致) | ||||||
|  |      */ | ||||||
|  | 
 | ||||||
|  |     private final IDepartmentService IdepartmentService = | ||||||
|  |         SpringUtils.getBean(IDepartmentService.class); | ||||||
|  |     private final HistoryService historyService = | ||||||
|  |         SpringUtils.getBean(HistoryService.class); | ||||||
|  | 
 | ||||||
|  |     private final RuntimeService runtimeService = | ||||||
|  |         SpringUtils.getBean(RuntimeService.class); | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public void notify(DelegateExecution execution) { | ||||||
|  |         System.out.println("科研模块:执行合作单位更新任务监听器..."); | ||||||
|  | 
 | ||||||
|  |         String departmentProcId = execution.getProcessInstanceId(); | ||||||
|  |         DepartmentBo bo = new DepartmentBo(); | ||||||
|  |         bo.setDepartmentProcId(departmentProcId); | ||||||
|  |         PageQuery pageQuery = new PageQuery(); | ||||||
|  |         TableDataInfo<DepartmentVo> result = IdepartmentService.queryPageList(bo, pageQuery); | ||||||
|  |         Long departmentId = result.getRows().get(0).getDepartmentId(); | ||||||
|  | 
 | ||||||
|  |         // zqjia:获取在task complete时注入的review状态 | ||||||
|  |         String reviewStatus = (String) execution.getVariable("review"); | ||||||
|  |         // 获取流程状态 | ||||||
|  |         String status = (String) runtimeService.getVariable(departmentProcId, ProcessConstants.PROCESS_STATUS_KEY); | ||||||
|  | 
 | ||||||
|  |         // zqjia: runtimeService获取是否terminated,判断注入review字段可以区分是complete还是cancel | ||||||
|  |         if("terminated".equals(status)) { | ||||||
|  |             IdepartmentService.updateDepartmentInfoById(departmentId, "2"); | ||||||
|  |         } | ||||||
|  |         else { | ||||||
|  |             if("1".equals(reviewStatus)) { | ||||||
|  |                 IdepartmentService.updateDepartmentInfoById(departmentId, "3"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 IdepartmentService.updateDepartmentInfoById(departmentId, "0"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,58 @@ | |||||||
|  | package com.ruoyi.scientific.listener; | ||||||
|  | import com.ruoyi.common.utils.spring.SpringUtils; | ||||||
|  | import com.ruoyi.flowable.common.constant.ProcessConstants; | ||||||
|  | import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; | ||||||
|  | import com.ruoyi.scientific.service.IProjectHandbookService; | ||||||
|  | import org.flowable.engine.RuntimeService; | ||||||
|  | import org.flowable.engine.delegate.DelegateExecution; | ||||||
|  | import org.flowable.engine.delegate.ExecutionListener; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  | import org.flowable.engine.HistoryService; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | 
 | ||||||
|  | @Component | ||||||
|  | public class HandbookUpdateListener implements ExecutionListener { | ||||||
|  |     /** | ||||||
|  |      * 注入字段(名称与流程设计时字段名称一致) | ||||||
|  |      */ | ||||||
|  | 
 | ||||||
|  |     private final IProjectHandbookService ihandbookServiceProject = | ||||||
|  |         SpringUtils.getBean(IProjectHandbookService.class); | ||||||
|  |     private final HistoryService historyService = | ||||||
|  |         SpringUtils.getBean(HistoryService.class); | ||||||
|  | 
 | ||||||
|  |     private final RuntimeService runtimeService = | ||||||
|  |         SpringUtils.getBean(RuntimeService.class); | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public void notify(DelegateExecution execution) { | ||||||
|  |         System.out.println("科研模块:执行申报指南更新任务监听器..."); | ||||||
|  | 
 | ||||||
|  |         String handbookProcId = execution.getProcessInstanceId(); | ||||||
|  |         ProjectHandbookBo bo = new ProjectHandbookBo(); | ||||||
|  |         bo.setHandbookProcId(handbookProcId); | ||||||
|  |         PageQuery pageQuery = new PageQuery(); | ||||||
|  |         TableDataInfo<ProjectHandbookVo> result = ihandbookServiceProject.queryPageList(bo, pageQuery); | ||||||
|  |         Long handbookId = result.getRows().get(0).getHandbookId(); | ||||||
|  | 
 | ||||||
|  |         // zqjia:获取在task complete时注入的review状态 | ||||||
|  |         String reviewStatus = (String) execution.getVariable("review"); | ||||||
|  |         // 获取流程状态 | ||||||
|  |         String status = (String) runtimeService.getVariable(handbookProcId, ProcessConstants.PROCESS_STATUS_KEY); | ||||||
|  | 
 | ||||||
|  |         // zqjia: runtimeService获取是否terminated,判断注入review字段可以区分是complete还是cancel | ||||||
|  |         if("terminated".equals(status)) { | ||||||
|  |             ihandbookServiceProject.updateHandbookInfoById(handbookId, "2"); | ||||||
|  |         } | ||||||
|  |         else { | ||||||
|  |             if("1".equals(reviewStatus)) { | ||||||
|  |                 ihandbookServiceProject.updateHandbookInfoById(handbookId, "3"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 ihandbookServiceProject.updateHandbookInfoById(handbookId, "0"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,76 @@ | |||||||
|  | package com.ruoyi.scientific.listener; | ||||||
|  | import com.ruoyi.common.utils.spring.SpringUtils; | ||||||
|  | import com.ruoyi.flowable.common.constant.ProcessConstants; | ||||||
|  | import com.ruoyi.scientific.service.IProjectPlanService; | ||||||
|  | import org.flowable.engine.RuntimeService; | ||||||
|  | import org.flowable.engine.delegate.DelegateExecution; | ||||||
|  | import org.flowable.engine.delegate.ExecutionListener; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  | import org.flowable.engine.HistoryService; | ||||||
|  | import com.ruoyi.scientific.domain.bo.ProjectPlanBo; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectPlanVo; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | 
 | ||||||
|  | //@Component | ||||||
|  | //public class HandbookUpdateListener implements ExecutionListener { | ||||||
|  | // | ||||||
|  | //    @Override | ||||||
|  | //    public void notify(DelegateExecution execution) { | ||||||
|  | //        System.out.println("当前活动名称: " + execution.getProcessInstanceBusinessStatus()); | ||||||
|  | // | ||||||
|  | //        if ("end".equals(execution.getEventName())) { | ||||||
|  | //            if (execution.isEnded()) { | ||||||
|  | //                System.out.println("任务被终止: " + execution.getId()); | ||||||
|  | //            } else { | ||||||
|  | //                System.out.println("任务正常完成: " + execution.getId()); | ||||||
|  | //            } | ||||||
|  | //        } | ||||||
|  | //    } | ||||||
|  | //} | ||||||
|  | 
 | ||||||
|  | @Component | ||||||
|  | public class PlanUpdateListener implements ExecutionListener { | ||||||
|  |     /** | ||||||
|  |      * 注入字段(名称与流程设计时字段名称一致) | ||||||
|  |      */ | ||||||
|  | 
 | ||||||
|  |     private final IProjectPlanService iProjectHandbookService = | ||||||
|  |         SpringUtils.getBean(IProjectPlanService.class); | ||||||
|  |     private final HistoryService historyService = | ||||||
|  |         SpringUtils.getBean(HistoryService.class); | ||||||
|  | 
 | ||||||
|  |     private final RuntimeService runtimeService = | ||||||
|  |         SpringUtils.getBean(RuntimeService.class); | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public void notify(DelegateExecution execution) { | ||||||
|  |         System.out.println("科研模块:执行申报计划更新任务监听器..."); | ||||||
|  | 
 | ||||||
|  |         String handbookProcId = execution.getProcessInstanceId(); | ||||||
|  |         ProjectPlanBo bo = new ProjectPlanBo(); | ||||||
|  |         bo.setPlanProcId(handbookProcId); | ||||||
|  |         PageQuery pageQuery = new PageQuery(); | ||||||
|  |         TableDataInfo<ProjectPlanVo> result = iProjectHandbookService.queryPageList(bo, pageQuery); | ||||||
|  |         Long handbookId = result.getRows().get(0).getPlanId(); | ||||||
|  | 
 | ||||||
|  |         // zqjia:获取在task complete时注入的review状态 | ||||||
|  |         String reviewStatus = (String) execution.getVariable("review"); | ||||||
|  |         // 获取流程状态 | ||||||
|  |         String status = (String) runtimeService.getVariable(handbookProcId, ProcessConstants.PROCESS_STATUS_KEY); | ||||||
|  | 
 | ||||||
|  |         // zqjia: runtimeService获取是否terminated,判断注入review字段可以区分是complete还是cancel | ||||||
|  |         // 退回有bug,暂时不知道会不会到这来 | ||||||
|  |         if("terminated".equals(status)) { | ||||||
|  |             iProjectHandbookService.updateHandbookInfoById(handbookId, "2"); | ||||||
|  |         } | ||||||
|  |         else { | ||||||
|  |             if("1".equals(reviewStatus)) { | ||||||
|  |                 iProjectHandbookService.updateHandbookInfoById(handbookId, "3"); | ||||||
|  |             } | ||||||
|  |             else { | ||||||
|  |                 iProjectHandbookService.updateHandbookInfoById(handbookId, "0"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,41 @@ | |||||||
|  | package com.ruoyi.scientific.listener; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.utils.spring.SpringUtils; | ||||||
|  | import com.ruoyi.flowable.common.constant.ProcessConstants; | ||||||
|  | import com.ruoyi.scientific.service.IProjectApplicationService; | ||||||
|  | import org.flowable.engine.RuntimeService; | ||||||
|  | import org.flowable.engine.delegate.DelegateExecution; | ||||||
|  | import org.flowable.engine.delegate.ExecutionListener; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  | 
 | ||||||
|  | @Component | ||||||
|  | public class ProjectAppStatusUpdateListener implements ExecutionListener { | ||||||
|  | 
 | ||||||
|  |     private final IProjectApplicationService projectApplicationService = | ||||||
|  |         SpringUtils.getBean(IProjectApplicationService.class); | ||||||
|  |     private final RuntimeService runtimeService = | ||||||
|  |         SpringUtils.getBean(RuntimeService.class); | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public void notify(DelegateExecution execution) { | ||||||
|  |         System.out.println("科研模块:执行项目立项状态更新任务监听器..."); | ||||||
|  | 
 | ||||||
|  |         String projectProcId = execution.getProcessInstanceId(); | ||||||
|  | 
 | ||||||
|  |         String projectIdStr = (String) execution.getVariable("projectId"); | ||||||
|  |         Long projectId = Long.parseLong(projectIdStr); | ||||||
|  | 
 | ||||||
|  |         String reviewStatus = (String) execution.getVariable("review"); | ||||||
|  |         String status = (String) runtimeService.getVariable(projectProcId, ProcessConstants.PROCESS_STATUS_KEY); | ||||||
|  | 
 | ||||||
|  |         if ("terminated".equals(status)) { | ||||||
|  |             projectApplicationService.updateAppstausInfoById(projectId, "2"); | ||||||
|  |         } else { | ||||||
|  |             if ("1".equals(reviewStatus)) { | ||||||
|  |                 projectApplicationService.updateAppstausInfoById(projectId, "3"); | ||||||
|  |             } else { | ||||||
|  |                 projectApplicationService.updateAppstausInfoById(projectId, "0"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -0,0 +1,45 @@ | |||||||
|  | package com.ruoyi.scientific.listener; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.common.utils.spring.SpringUtils; | ||||||
|  | import com.ruoyi.flowable.common.constant.ProcessConstants; | ||||||
|  | import com.ruoyi.scientific.service.IProjectApplicationService; | ||||||
|  | import org.flowable.engine.RuntimeService; | ||||||
|  | import org.flowable.engine.delegate.DelegateExecution; | ||||||
|  | import org.flowable.engine.delegate.ExecutionListener; | ||||||
|  | import org.springframework.stereotype.Component; | ||||||
|  | 
 | ||||||
|  | @Component | ||||||
|  | public class ProjectDeclareStatusListener implements ExecutionListener { | ||||||
|  | 
 | ||||||
|  |     private final IProjectApplicationService projectApplicationService = | ||||||
|  |         SpringUtils.getBean(IProjectApplicationService.class); | ||||||
|  |     private final RuntimeService runtimeService = | ||||||
|  |         SpringUtils.getBean(RuntimeService.class); | ||||||
|  | 
 | ||||||
|  |     @Override | ||||||
|  |     public void notify(DelegateExecution execution) { | ||||||
|  |         System.out.println("科研模块:执行项目申报状态更新任务监听器..."); | ||||||
|  |         // 获得项目的流程ID | ||||||
|  |         String projectProcId = execution.getProcessInstanceId(); | ||||||
|  |         // 获取项目的ID | ||||||
|  |         String projectIdStr = (String) execution.getVariable("projectId"); | ||||||
|  |         Long projectId = Long.parseLong(projectIdStr); | ||||||
|  | 
 | ||||||
|  |         String reviewStatus = (String) execution.getVariable("review"); | ||||||
|  |         String status = (String) runtimeService.getVariable(projectProcId, ProcessConstants.PROCESS_STATUS_KEY); | ||||||
|  | 
 | ||||||
|  |         // 判断流程是否结束 | ||||||
|  |         if ("terminated".equals(status)) { | ||||||
|  |             // 审批人员选择拒绝 申报状态修改为2 审核失败 | ||||||
|  |             projectApplicationService.updateDecStatusInfoById(projectId, "2"); | ||||||
|  |         } else { | ||||||
|  |             if ("1".equals(reviewStatus)) { | ||||||
|  |                 // 如果reviewStatus == 1 说明申报成功 3 审核通过 | ||||||
|  |                 projectApplicationService.updateDecStatusInfoById(projectId, "3"); | ||||||
|  |             } else { | ||||||
|  |                 // 其他状态设置为0 未审核 | ||||||
|  |                 projectApplicationService.updateDecStatusInfoById(projectId, "0"); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,15 +0,0 @@ | |||||||
| package com.ruoyi.scientific.mapper; |  | ||||||
| 
 |  | ||||||
| import com.ruoyi.scientific.domain.ActProject; |  | ||||||
| import com.ruoyi.scientific.domain.vo.ActProjectVo; |  | ||||||
| import com.ruoyi.common.core.mapper.BaseMapperPlus; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理Mapper接口 |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| public interface ActProjectMapper extends BaseMapperPlus<ActProjectMapper, ActProject, ActProjectVo> { |  | ||||||
| 
 |  | ||||||
| } |  | ||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package com.ruoyi.scientific.mapper; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.Department; | ||||||
|  | import com.ruoyi.scientific.domain.vo.DepartmentVo; | ||||||
|  | import com.ruoyi.common.core.mapper.BaseMapperPlus; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * departmentMapper接口 | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | public interface DepartmentMapper extends BaseMapperPlus<DepartmentMapper, Department, DepartmentVo> { | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -5,10 +5,10 @@ import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; | |||||||
| import com.ruoyi.common.core.mapper.BaseMapperPlus; | import com.ruoyi.common.core.mapper.BaseMapperPlus; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2Mapper接口 |  * 项目申报指南Mapper接口 | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| public interface ProjectHandbookMapper extends BaseMapperPlus<ProjectHandbookMapper, ProjectHandbook, ProjectHandbookVo> { | public interface ProjectHandbookMapper extends BaseMapperPlus<ProjectHandbookMapper, ProjectHandbook, ProjectHandbookVo> { | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -0,0 +1,15 @@ | |||||||
|  | package com.ruoyi.scientific.mapper; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.ProjectPlan; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectPlanVo; | ||||||
|  | import com.ruoyi.common.core.mapper.BaseMapperPlus; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2Mapper接口 | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | public interface ProjectPlanMapper extends BaseMapperPlus<ProjectPlanMapper, ProjectPlan, ProjectPlanVo> { | ||||||
|  | 
 | ||||||
|  | } | ||||||
| @ -1,49 +0,0 @@ | |||||||
| package com.ruoyi.scientific.service; |  | ||||||
| 
 |  | ||||||
| import com.ruoyi.scientific.domain.ActProject; |  | ||||||
| import com.ruoyi.scientific.domain.vo.ActProjectVo; |  | ||||||
| import com.ruoyi.scientific.domain.bo.ActProjectBo; |  | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; |  | ||||||
| import com.ruoyi.common.core.domain.PageQuery; |  | ||||||
| 
 |  | ||||||
| import java.util.Collection; |  | ||||||
| import java.util.List; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理Service接口 |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| public interface IActProjectService { |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理 |  | ||||||
|      */ |  | ||||||
|     ActProjectVo queryById(String id); |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理列表 |  | ||||||
|      */ |  | ||||||
|     TableDataInfo<ActProjectVo> queryPageList(ActProjectBo bo, PageQuery pageQuery); |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理列表 |  | ||||||
|      */ |  | ||||||
|     List<ActProjectVo> queryList(ActProjectBo bo); |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 新增科研管理 |  | ||||||
|      */ |  | ||||||
|     Boolean insertByBo(ActProjectBo bo); |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 修改科研管理 |  | ||||||
|      */ |  | ||||||
|     Boolean updateByBo(ActProjectBo bo); |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 校验并批量删除科研管理信息 |  | ||||||
|      */ |  | ||||||
|     Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid); |  | ||||||
| } |  | ||||||
| @ -0,0 +1,51 @@ | |||||||
|  | package com.ruoyi.scientific.service; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.Department; | ||||||
|  | import com.ruoyi.scientific.domain.vo.DepartmentVo; | ||||||
|  | import com.ruoyi.scientific.domain.bo.DepartmentBo; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | 
 | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * departmentService接口 | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | public interface IDepartmentService { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department | ||||||
|  |      */ | ||||||
|  |     DepartmentVo queryById(Long departmentId); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<DepartmentVo> queryPageList(DepartmentBo bo, PageQuery pageQuery); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department列表 | ||||||
|  |      */ | ||||||
|  |     List<DepartmentVo> queryList(DepartmentBo bo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增department | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(DepartmentBo bo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 修改department | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(DepartmentBo bo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除department信息 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | 
 | ||||||
|  |     Boolean updateDepartmentInfoById(Long handbookId, String status); | ||||||
|  | } | ||||||
| @ -65,4 +65,18 @@ public interface IProjectApplicationService { | |||||||
|      * TODO: 2024/7/24 前版本暂时没有加权限的限制以及人员的限制,后续需要加入 |      * TODO: 2024/7/24 前版本暂时没有加权限的限制以及人员的限制,后续需要加入 | ||||||
|      */ |      */ | ||||||
|     Boolean confirmFundsReceivedById(FundsReceivedBo fundsReceivedBo); |     Boolean confirmFundsReceivedById(FundsReceivedBo fundsReceivedBo); | ||||||
|  |     /** | ||||||
|  |      * 查询已申报项目 | ||||||
|  |      * cyf | ||||||
|  |      */ | ||||||
|  |     List<ProjectApplicationVo> queryDeclaredProjects(); | ||||||
|  | 
 | ||||||
|  |     Boolean updateAppstausInfoById(Long projectId, String newProjectAppStaus); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 通过项目的ID,更新项目申报状态 | ||||||
|  |      * @author zhanli | ||||||
|  |      */ | ||||||
|  |     public Boolean updateDecStatusInfoById(Long projectId, String newProjectDecStatus); | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -1,8 +1,7 @@ | |||||||
| package com.ruoyi.scientific.service; | package com.ruoyi.scientific.service; | ||||||
| 
 | 
 | ||||||
| import com.ruoyi.scientific.domain.ProjectHandbook; |  | ||||||
| import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; |  | ||||||
| import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; | import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
| import com.ruoyi.common.core.domain.PageQuery; | import com.ruoyi.common.core.domain.PageQuery; | ||||||
| 
 | 
 | ||||||
| @ -10,40 +9,45 @@ import java.util.Collection; | |||||||
| import java.util.List; | import java.util.List; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2Service接口 |  * 项目申报指南Service接口 | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| public interface IProjectHandbookService { | public interface IProjectHandbookService { | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2 |      * 查询项目申报指南 | ||||||
|      */ |      */ | ||||||
|     ProjectHandbookVo queryById(Long handbookId); |     ProjectHandbookVo queryById(Long handbookId); | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2列表 |      * 查询项目申报指南列表 | ||||||
|      */ |      */ | ||||||
|     TableDataInfo<ProjectHandbookVo> queryPageList(ProjectHandbookBo bo, PageQuery pageQuery); |     TableDataInfo<ProjectHandbookVo> queryPageList(ProjectHandbookBo bo, PageQuery pageQuery); | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2列表 |      * 查询项目申报指南列表 | ||||||
|      */ |      */ | ||||||
|     List<ProjectHandbookVo> queryList(ProjectHandbookBo bo); |     List<ProjectHandbookVo> queryList(ProjectHandbookBo bo); | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 新增项目申报v2 |      * 新增项目申报指南 | ||||||
|      */ |      */ | ||||||
|     Boolean insertByBo(ProjectHandbookBo bo); |     Boolean insertByBo(ProjectHandbookBo bo); | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 修改项目申报v2 |      * 修改项目申报指南 | ||||||
|      */ |      */ | ||||||
|     Boolean updateByBo(ProjectHandbookBo bo); |     Boolean updateByBo(ProjectHandbookBo bo); | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 校验并批量删除项目申报v2信息 |      * 校验并批量删除项目申报指南信息 | ||||||
|      */ |      */ | ||||||
|     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新指南的审核状态 | ||||||
|  |      */ | ||||||
|  |     Boolean updateHandbookInfoById(Long handbookId, String status); | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,53 @@ | |||||||
|  | package com.ruoyi.scientific.service; | ||||||
|  | 
 | ||||||
|  | import com.ruoyi.scientific.domain.bo.ProjectPlanBo; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectPlanVo; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | 
 | ||||||
|  | import java.util.Collection; | ||||||
|  | import java.util.List; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2Service接口 | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | public interface IProjectPlanService { | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2 | ||||||
|  |      */ | ||||||
|  |     ProjectPlanVo queryById(Long handbookId); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2列表 | ||||||
|  |      */ | ||||||
|  |     TableDataInfo<ProjectPlanVo> queryPageList(ProjectPlanBo bo, PageQuery pageQuery); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2列表 | ||||||
|  |      */ | ||||||
|  |     List<ProjectPlanVo> queryList(ProjectPlanBo bo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增项目申报v2 | ||||||
|  |      */ | ||||||
|  |     Boolean insertByBo(ProjectPlanBo bo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 修改项目申报v2 | ||||||
|  |      */ | ||||||
|  |     Boolean updateByBo(ProjectPlanBo bo); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 校验并批量删除项目申报v2信息 | ||||||
|  |      */ | ||||||
|  |     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 更新指南的审核状态 | ||||||
|  |      */ | ||||||
|  |     Boolean updateHandbookInfoById(Long handbookId, String status); | ||||||
|  | } | ||||||
| @ -1,113 +0,0 @@ | |||||||
| package com.ruoyi.scientific.service.impl; |  | ||||||
| 
 |  | ||||||
| import cn.hutool.core.bean.BeanUtil; |  | ||||||
| import com.ruoyi.common.utils.StringUtils; |  | ||||||
| import com.ruoyi.common.core.page.TableDataInfo; |  | ||||||
| import com.ruoyi.common.core.domain.PageQuery; |  | ||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |  | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |  | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; |  | ||||||
| import lombok.RequiredArgsConstructor; |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
| import com.ruoyi.scientific.domain.bo.ActProjectBo; |  | ||||||
| import com.ruoyi.scientific.domain.vo.ActProjectVo; |  | ||||||
| import com.ruoyi.scientific.domain.ActProject; |  | ||||||
| import com.ruoyi.scientific.mapper.ActProjectMapper; |  | ||||||
| import com.ruoyi.scientific.service.IActProjectService; |  | ||||||
| 
 |  | ||||||
| import java.util.List; |  | ||||||
| import java.util.Map; |  | ||||||
| import java.util.Collection; |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * 科研管理Service业务层处理 |  | ||||||
|  * |  | ||||||
|  * @author zqjia |  | ||||||
|  * @date 2024-07-14 |  | ||||||
|  */ |  | ||||||
| @RequiredArgsConstructor |  | ||||||
| @Service |  | ||||||
| public class ActProjectServiceImpl implements IActProjectService { |  | ||||||
| 
 |  | ||||||
|     private final ActProjectMapper baseMapper; |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理 |  | ||||||
|      */ |  | ||||||
|     @Override |  | ||||||
|     public ActProjectVo queryById(String id){ |  | ||||||
|         return baseMapper.selectVoById(id); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理列表 |  | ||||||
|      */ |  | ||||||
|     @Override |  | ||||||
|     public TableDataInfo<ActProjectVo> queryPageList(ActProjectBo bo, PageQuery pageQuery) { |  | ||||||
|         LambdaQueryWrapper<ActProject> lqw = buildQueryWrapper(bo); |  | ||||||
|         Page<ActProjectVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); |  | ||||||
|         return TableDataInfo.build(result); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 查询科研管理列表 |  | ||||||
|      */ |  | ||||||
|     @Override |  | ||||||
|     public List<ActProjectVo> queryList(ActProjectBo bo) { |  | ||||||
|         LambdaQueryWrapper<ActProject> lqw = buildQueryWrapper(bo); |  | ||||||
|         return baseMapper.selectVoList(lqw); |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     private LambdaQueryWrapper<ActProject> buildQueryWrapper(ActProjectBo bo) { |  | ||||||
|         Map<String, Object> params = bo.getParams(); |  | ||||||
|         LambdaQueryWrapper<ActProject> lqw = Wrappers.lambdaQuery(); |  | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getProjectId()), ActProject::getProjectId, bo.getProjectId()); |  | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getHandbookId()), ActProject::getHandbookId, bo.getHandbookId()); |  | ||||||
|         lqw.eq(bo.getCategory() != null, ActProject::getCategory, bo.getCategory()); |  | ||||||
|         lqw.like(StringUtils.isNotBlank(bo.getName()), ActProject::getName, bo.getName()); |  | ||||||
|         lqw.eq(bo.getCreateTime() != null, ActProject::getCreateTime, bo.getCreateTime()); |  | ||||||
|         return lqw; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 新增科研管理 |  | ||||||
|      */ |  | ||||||
|     @Override |  | ||||||
|     public Boolean insertByBo(ActProjectBo bo) { |  | ||||||
|         ActProject add = BeanUtil.toBean(bo, ActProject.class); |  | ||||||
|         validEntityBeforeSave(add); |  | ||||||
|         boolean flag = baseMapper.insert(add) > 0; |  | ||||||
|         if (flag) { |  | ||||||
|             bo.setId(add.getId()); |  | ||||||
|         } |  | ||||||
|         return flag; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 修改科研管理 |  | ||||||
|      */ |  | ||||||
|     @Override |  | ||||||
|     public Boolean updateByBo(ActProjectBo bo) { |  | ||||||
|         ActProject update = BeanUtil.toBean(bo, ActProject.class); |  | ||||||
|         validEntityBeforeSave(update); |  | ||||||
|         return baseMapper.updateById(update) > 0; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 保存前的数据校验 |  | ||||||
|      */ |  | ||||||
|     private void validEntityBeforeSave(ActProject entity){ |  | ||||||
|         //TODO 做一些数据校验,如唯一约束 |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     /** |  | ||||||
|      * 批量删除科研管理 |  | ||||||
|      */ |  | ||||||
|     @Override |  | ||||||
|     public Boolean deleteWithValidByIds(Collection<String> ids, Boolean isValid) { |  | ||||||
|         if(isValid){ |  | ||||||
|             //TODO 做一些业务上的校验,判断是否需要校验 |  | ||||||
|         } |  | ||||||
|         return baseMapper.deleteBatchIds(ids) > 0; |  | ||||||
|     } |  | ||||||
| } |  | ||||||
| @ -0,0 +1,134 @@ | |||||||
|  | package com.ruoyi.scientific.service.impl; | ||||||
|  | 
 | ||||||
|  | import cn.hutool.core.bean.BeanUtil; | ||||||
|  | import com.ruoyi.common.utils.StringUtils; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.ruoyi.scientific.domain.ProjectHandbook; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import com.ruoyi.scientific.domain.bo.DepartmentBo; | ||||||
|  | import com.ruoyi.scientific.domain.vo.DepartmentVo; | ||||||
|  | import com.ruoyi.scientific.domain.Department; | ||||||
|  | import com.ruoyi.scientific.mapper.DepartmentMapper; | ||||||
|  | import com.ruoyi.scientific.service.IDepartmentService; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | import java.util.Collection; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * departmentService业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author zqjia | ||||||
|  |  * @date 2024-08-13 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class DepartmentServiceImpl implements IDepartmentService { | ||||||
|  | 
 | ||||||
|  |     private final DepartmentMapper baseMapper; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public DepartmentVo queryById(Long departmentId){ | ||||||
|  |         return baseMapper.selectVoById(departmentId); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<DepartmentVo> queryPageList(DepartmentBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<Department> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<DepartmentVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询department列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<DepartmentVo> queryList(DepartmentBo bo) { | ||||||
|  |         LambdaQueryWrapper<Department> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     private LambdaQueryWrapper<Department> buildQueryWrapper(DepartmentBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<Department> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.eq(bo.getDepartmentId() != null, Department::getDepartmentId, bo.getDepartmentId()); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getDepartmentName()), Department::getDepartmentName, bo.getDepartmentName()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentAddress()), Department::getDepartmentAddress, bo.getDepartmentAddress()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentCategory()), Department::getDepartmentCategory, bo.getDepartmentCategory()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentPerson()), Department::getDepartmentPerson, bo.getDepartmentPerson()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentPhone()), Department::getDepartmentPhone, bo.getDepartmentPhone()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentEmail()), Department::getDepartmentEmail, bo.getDepartmentEmail()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentFile()), Department::getDepartmentFile, bo.getDepartmentFile()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentNote()), Department::getDepartmentNote, bo.getDepartmentNote()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentProcId()), Department::getDepartmentProcId, bo.getDepartmentProcId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getDepartmentStatus()), Department::getDepartmentStatus, bo.getDepartmentStatus()); | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增department | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(DepartmentBo bo) { | ||||||
|  |         Department add = BeanUtil.toBean(bo, Department.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setDepartmentId(add.getDepartmentId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 修改department | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(DepartmentBo bo) { | ||||||
|  |         Department update = BeanUtil.toBean(bo, Department.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(Department entity){ | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量删除department | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if(isValid){ | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteBatchIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean updateDepartmentInfoById(Long departmentId, String status){ | ||||||
|  |         // 获取项目的详细信息 | ||||||
|  |         Department update  = baseMapper.selectById(departmentId); | ||||||
|  |         if (update == null) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |         // 更新状态信息 | ||||||
|  |         update.setDepartmentStatus(status); | ||||||
|  |         // 保存信息 | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         // 返回结果取决于是否更新成功 | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -73,6 +73,10 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService | |||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getProjectLeader()), ProjectApplication::getProjectLeader, bo.getProjectLeader()); |         lqw.eq(StringUtils.isNotBlank(bo.getProjectLeader()), ProjectApplication::getProjectLeader, bo.getProjectLeader()); | ||||||
|         lqw.eq(bo.getProjectBudget() != null, ProjectApplication::getProjectBudget, bo.getProjectBudget()); |         lqw.eq(bo.getProjectBudget() != null, ProjectApplication::getProjectBudget, bo.getProjectBudget()); | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getProjectLeaderPhone()), ProjectApplication::getProjectLeaderPhone, bo.getProjectLeaderPhone()); |         lqw.eq(StringUtils.isNotBlank(bo.getProjectLeaderPhone()), ProjectApplication::getProjectLeaderPhone, bo.getProjectLeaderPhone()); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         // zqjia:自定义条件查询 | ||||||
|  |         lqw.eq(bo.getProjectPlanId() != null, ProjectApplication::getProjectPlanId, bo.getProjectPlanId()); | ||||||
|         return lqw; |         return lqw; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -83,7 +87,7 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService | |||||||
|     public Boolean insertByBo(ProjectApplicationBo bo) { |     public Boolean insertByBo(ProjectApplicationBo bo) { | ||||||
|         // 新增的时候默认设置为未立项状态 |         // 新增的时候默认设置为未立项状态 | ||||||
|         bo.setProjectAppStaus(ProjectBaseBo.PROJECT_NO_INIT); |         bo.setProjectAppStaus(ProjectBaseBo.PROJECT_NO_INIT); | ||||||
|         // 新增项目默认设置未未申报状态 |         // 新增项目默认设置为未申报状态 | ||||||
|         bo.setProjectDeclareStatus(ProjectBaseBo.PROJECT_NO_DECLARE); |         bo.setProjectDeclareStatus(ProjectBaseBo.PROJECT_NO_DECLARE); | ||||||
|         // 新增的项目默认资金处于未到账状态 |         // 新增的项目默认资金处于未到账状态 | ||||||
|         bo.setProjectFundsReceived(ProjectBaseBo.PROJECT_FUNDS_NO_RECEIVED); |         bo.setProjectFundsReceived(ProjectBaseBo.PROJECT_FUNDS_NO_RECEIVED); | ||||||
| @ -181,4 +185,50 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService | |||||||
|         // 返回结果取决于是否更新成功 |         // 返回结果取决于是否更新成功 | ||||||
|         return baseMapper.updateById(projectApplication) > 0; |         return baseMapper.updateById(projectApplication) > 0; | ||||||
|     } |     } | ||||||
|  |     /** | ||||||
|  |      * 查询已经申报的项目 | ||||||
|  |      * cyf | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<ProjectApplicationVo> queryDeclaredProjects() { | ||||||
|  |         LambdaQueryWrapper<ProjectApplication> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.eq(ProjectApplication::getProjectDeclareStatus, "3"); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  |     /** | ||||||
|  |      * 更新项目审核状态 | ||||||
|  |      * cyf | ||||||
|  |      */ | ||||||
|  |     public Boolean updateAppstausInfoById(Long projectId, String newProjectAppStaus){ | ||||||
|  |         // 获取项目的详细信息 | ||||||
|  |         ProjectApplication projectApplication  = baseMapper.selectById(projectId); | ||||||
|  |         if (projectApplication == null) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |         // 更新立项状态信息 | ||||||
|  |         projectApplication.setProjectAppStaus(newProjectAppStaus); | ||||||
|  |         // 保存信息 | ||||||
|  |         validEntityBeforeSave(projectApplication); | ||||||
|  |         // 返回结果取决于是否更新成功 | ||||||
|  |         return baseMapper.updateById(projectApplication) > 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 通过项目的ID更改,更新项目申报状态 | ||||||
|  |      * @author zhanli | ||||||
|  |      */ | ||||||
|  |     public Boolean updateDecStatusInfoById(Long projectId, String newProjectDecStatus){ | ||||||
|  |         // 获取项目的详细信息 | ||||||
|  |         ProjectApplication projectApplication  = baseMapper.selectById(projectId); | ||||||
|  |         if (projectApplication == null) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |         // 更新项目的申报信息 | ||||||
|  |         projectApplication.setProjectDeclareStatus(newProjectDecStatus); | ||||||
|  |         // 保存信息 | ||||||
|  |         validEntityBeforeSave(projectApplication); | ||||||
|  |         // 返回结果取决于是否更新成功 | ||||||
|  |         return baseMapper.updateById(projectApplication) > 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
| @ -7,23 +7,23 @@ import com.ruoyi.common.core.domain.PageQuery; | |||||||
| import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
| import com.baomidou.mybatisplus.core.toolkit.Wrappers; | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
| import lombok.RequiredArgsConstructor; |  | ||||||
| import org.springframework.stereotype.Service; |  | ||||||
| import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; | import com.ruoyi.scientific.domain.bo.ProjectHandbookBo; | ||||||
| import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; |  | ||||||
| import com.ruoyi.scientific.domain.ProjectHandbook; |  | ||||||
| import com.ruoyi.scientific.mapper.ProjectHandbookMapper; | import com.ruoyi.scientific.mapper.ProjectHandbookMapper; | ||||||
| import com.ruoyi.scientific.service.IProjectHandbookService; | import com.ruoyi.scientific.service.IProjectHandbookService; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectHandbookVo; | ||||||
|  | import com.ruoyi.scientific.domain.ProjectHandbook; | ||||||
| 
 | 
 | ||||||
| import java.util.List; | import java.util.List; | ||||||
| import java.util.Map; | import java.util.Map; | ||||||
| import java.util.Collection; | import java.util.Collection; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * 项目申报v2Service业务层处理 |  * 项目申报指南Service业务层处理 | ||||||
|  * |  * | ||||||
|  * @author ruoyi |  * @author zqjia | ||||||
|  * @date 2024-07-23 |  * @date 2024-07-29 | ||||||
|  */ |  */ | ||||||
| @RequiredArgsConstructor | @RequiredArgsConstructor | ||||||
| @Service | @Service | ||||||
| @ -32,7 +32,7 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|     private final ProjectHandbookMapper baseMapper; |     private final ProjectHandbookMapper baseMapper; | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2 |      * 查询项目申报指南 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public ProjectHandbookVo queryById(Long handbookId){ |     public ProjectHandbookVo queryById(Long handbookId){ | ||||||
| @ -40,7 +40,7 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2列表 |      * 查询项目申报指南列表 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public TableDataInfo<ProjectHandbookVo> queryPageList(ProjectHandbookBo bo, PageQuery pageQuery) { |     public TableDataInfo<ProjectHandbookVo> queryPageList(ProjectHandbookBo bo, PageQuery pageQuery) { | ||||||
| @ -50,7 +50,7 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 查询项目申报v2列表 |      * 查询项目申报指南列表 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public List<ProjectHandbookVo> queryList(ProjectHandbookBo bo) { |     public List<ProjectHandbookVo> queryList(ProjectHandbookBo bo) { | ||||||
| @ -61,21 +61,20 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|     private LambdaQueryWrapper<ProjectHandbook> buildQueryWrapper(ProjectHandbookBo bo) { |     private LambdaQueryWrapper<ProjectHandbook> buildQueryWrapper(ProjectHandbookBo bo) { | ||||||
|         Map<String, Object> params = bo.getParams(); |         Map<String, Object> params = bo.getParams(); | ||||||
|         LambdaQueryWrapper<ProjectHandbook> lqw = Wrappers.lambdaQuery(); |         LambdaQueryWrapper<ProjectHandbook> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.eq(bo.getHandbookId() != null, ProjectHandbook::getHandbookId, bo.getHandbookId()); | ||||||
|         lqw.like(StringUtils.isNotBlank(bo.getHandbookName()), ProjectHandbook::getHandbookName, bo.getHandbookName()); |         lqw.like(StringUtils.isNotBlank(bo.getHandbookName()), ProjectHandbook::getHandbookName, bo.getHandbookName()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getHandbookCategory()), ProjectHandbook::getHandbookCategory, bo.getHandbookCategory()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getHandbookLevel()), ProjectHandbook::getHandbookLevel, bo.getHandbookLevel()); | ||||||
|  |         lqw.eq(bo.getHandbookDate() != null, ProjectHandbook::getHandbookDate, bo.getHandbookDate()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getHandbookNote()), ProjectHandbook::getHandbookNote, bo.getHandbookNote()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getHandbookFile()), ProjectHandbook::getHandbookFile, bo.getHandbookFile()); | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getHandbookProcId()), ProjectHandbook::getHandbookProcId, bo.getHandbookProcId()); |         lqw.eq(StringUtils.isNotBlank(bo.getHandbookProcId()), ProjectHandbook::getHandbookProcId, bo.getHandbookProcId()); | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getHandbookStatus()), ProjectHandbook::getHandbookStatus, bo.getHandbookStatus()); |         lqw.eq(StringUtils.isNotBlank(bo.getHandbookStatus()), ProjectHandbook::getHandbookStatus, bo.getHandbookStatus()); | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getHandbookType()), ProjectHandbook::getHandbookType, bo.getHandbookType()); |  | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getHandbookLevel()), ProjectHandbook::getHandbookLevel, bo.getHandbookLevel()); |  | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getDeclareStatus()), ProjectHandbook::getDeclareStatus, bo.getDeclareStatus()); |  | ||||||
|         lqw.eq(bo.getProjectAppStTime() != null, ProjectHandbook::getProjectAppStTime, bo.getProjectAppStTime()); |  | ||||||
|         lqw.eq(bo.getProjectAppEndTime() != null, ProjectHandbook::getProjectAppEndTime, bo.getProjectAppEndTime()); |  | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getHandbookLeader()), ProjectHandbook::getHandbookLeader, bo.getHandbookLeader()); |  | ||||||
|         lqw.eq(StringUtils.isNotBlank(bo.getProjectLeaderPhone()), ProjectHandbook::getProjectLeaderPhone, bo.getProjectLeaderPhone()); |  | ||||||
|         return lqw; |         return lqw; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 新增项目申报v2 |      * 新增项目申报指南 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Boolean insertByBo(ProjectHandbookBo bo) { |     public Boolean insertByBo(ProjectHandbookBo bo) { | ||||||
| @ -89,7 +88,7 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 修改项目申报v2 |      * 修改项目申报指南 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Boolean updateByBo(ProjectHandbookBo bo) { |     public Boolean updateByBo(ProjectHandbookBo bo) { | ||||||
| @ -106,7 +105,7 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
|      * 批量删除项目申报v2 |      * 批量删除项目申报指南 | ||||||
|      */ |      */ | ||||||
|     @Override |     @Override | ||||||
|     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
| @ -115,4 +114,18 @@ public class ProjectHandbookServiceImpl implements IProjectHandbookService { | |||||||
|         } |         } | ||||||
|         return baseMapper.deleteBatchIds(ids) > 0; |         return baseMapper.deleteBatchIds(ids) > 0; | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean updateHandbookInfoById(Long handbookId, String status){ | ||||||
|  |         // 获取项目的详细信息 | ||||||
|  |         ProjectHandbook update  = baseMapper.selectById(handbookId); | ||||||
|  |         if (update == null) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |         // 更新状态信息 | ||||||
|  |         update.setHandbookStatus(status); | ||||||
|  |         // 保存信息 | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         // 返回结果取决于是否更新成功 | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,131 @@ | |||||||
|  | package com.ruoyi.scientific.service.impl; | ||||||
|  | 
 | ||||||
|  | import cn.hutool.core.bean.BeanUtil; | ||||||
|  | import com.ruoyi.common.utils.StringUtils; | ||||||
|  | import com.ruoyi.common.core.page.TableDataInfo; | ||||||
|  | import com.ruoyi.common.core.domain.PageQuery; | ||||||
|  | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | ||||||
|  | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | ||||||
|  | import com.baomidou.mybatisplus.core.toolkit.Wrappers; | ||||||
|  | import com.ruoyi.scientific.domain.bo.ProjectPlanBo; | ||||||
|  | import com.ruoyi.scientific.mapper.ProjectPlanMapper; | ||||||
|  | import lombok.RequiredArgsConstructor; | ||||||
|  | import org.springframework.stereotype.Service; | ||||||
|  | import com.ruoyi.scientific.domain.vo.ProjectPlanVo; | ||||||
|  | import com.ruoyi.scientific.domain.ProjectPlan; | ||||||
|  | import com.ruoyi.scientific.service.IProjectPlanService; | ||||||
|  | 
 | ||||||
|  | import java.util.List; | ||||||
|  | import java.util.Map; | ||||||
|  | import java.util.Collection; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 项目申报v2Service业务层处理 | ||||||
|  |  * | ||||||
|  |  * @author ruoyi | ||||||
|  |  * @date 2024-07-23 | ||||||
|  |  */ | ||||||
|  | @RequiredArgsConstructor | ||||||
|  | @Service | ||||||
|  | public class ProjectPlanServiceImpl implements IProjectPlanService { | ||||||
|  | 
 | ||||||
|  |     private final ProjectPlanMapper baseMapper; | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public ProjectPlanVo queryById(Long handbookId){ | ||||||
|  |         return baseMapper.selectVoById(handbookId); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public TableDataInfo<ProjectPlanVo> queryPageList(ProjectPlanBo bo, PageQuery pageQuery) { | ||||||
|  |         LambdaQueryWrapper<ProjectPlan> lqw = buildQueryWrapper(bo); | ||||||
|  |         Page<ProjectPlanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw); | ||||||
|  |         return TableDataInfo.build(result); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 查询项目申报v2列表 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public List<ProjectPlanVo> queryList(ProjectPlanBo bo) { | ||||||
|  |         LambdaQueryWrapper<ProjectPlan> lqw = buildQueryWrapper(bo); | ||||||
|  |         return baseMapper.selectVoList(lqw); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     private LambdaQueryWrapper<ProjectPlan> buildQueryWrapper(ProjectPlanBo bo) { | ||||||
|  |         Map<String, Object> params = bo.getParams(); | ||||||
|  |         LambdaQueryWrapper<ProjectPlan> lqw = Wrappers.lambdaQuery(); | ||||||
|  |         lqw.like(StringUtils.isNotBlank(bo.getPlanName()), ProjectPlan::getPlanName, bo.getPlanName()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPlanProcId()), ProjectPlan::getPlanProcId, bo.getPlanProcId()); | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPlanStatus()), ProjectPlan::getPlanStatus, bo.getPlanStatus()); | ||||||
|  | 
 | ||||||
|  |         lqw.eq(StringUtils.isNotBlank(bo.getPlanLevel()), ProjectPlan::getPlanLevel, bo.getPlanLevel()); | ||||||
|  | 
 | ||||||
|  |         lqw.eq(bo.getProjectAppStTime() != null, ProjectPlan::getProjectAppStTime, bo.getProjectAppStTime()); | ||||||
|  |         lqw.eq(bo.getProjectAppEndTime() != null, ProjectPlan::getProjectAppEndTime, bo.getProjectAppEndTime()); | ||||||
|  | 
 | ||||||
|  |         return lqw; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 新增项目申报v2 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean insertByBo(ProjectPlanBo bo) { | ||||||
|  |         ProjectPlan add = BeanUtil.toBean(bo, ProjectPlan.class); | ||||||
|  |         validEntityBeforeSave(add); | ||||||
|  |         boolean flag = baseMapper.insert(add) > 0; | ||||||
|  |         if (flag) { | ||||||
|  |             bo.setPlanId(add.getPlanId()); | ||||||
|  |         } | ||||||
|  |         return flag; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 修改项目申报v2 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean updateByBo(ProjectPlanBo bo) { | ||||||
|  |         ProjectPlan update = BeanUtil.toBean(bo, ProjectPlan.class); | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 保存前的数据校验 | ||||||
|  |      */ | ||||||
|  |     private void validEntityBeforeSave(ProjectPlan entity){ | ||||||
|  |         //TODO 做一些数据校验,如唯一约束 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /** | ||||||
|  |      * 批量删除项目申报v2 | ||||||
|  |      */ | ||||||
|  |     @Override | ||||||
|  |     public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) { | ||||||
|  |         if(isValid){ | ||||||
|  |             //TODO 做一些业务上的校验,判断是否需要校验 | ||||||
|  |         } | ||||||
|  |         return baseMapper.deleteBatchIds(ids) > 0; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     public Boolean updateHandbookInfoById(Long handbookId, String status){ | ||||||
|  |         // 获取项目的详细信息 | ||||||
|  |         ProjectPlan update  = baseMapper.selectById(handbookId); | ||||||
|  |         if (update == null) { | ||||||
|  |             return false; | ||||||
|  |         } | ||||||
|  |         // 更新状态信息 | ||||||
|  |         update.setPlanStatus(status); | ||||||
|  |         // 保存信息 | ||||||
|  |         validEntityBeforeSave(update); | ||||||
|  |         // 返回结果取决于是否更新成功 | ||||||
|  |         return baseMapper.updateById(update) > 0; | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,17 +0,0 @@ | |||||||
| <?xml version="1.0" encoding="UTF-8" ?> |  | ||||||
| <!DOCTYPE mapper |  | ||||||
| PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |  | ||||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |  | ||||||
| <mapper namespace="com.ruoyi.scientific.mapper.ActProjectMapper"> |  | ||||||
| 
 |  | ||||||
|     <resultMap type="com.ruoyi.scientific.domain.ActProject" id="ActProjectResult"> |  | ||||||
|         <result property="id" column="id"/> |  | ||||||
|         <result property="projectId" column="project_id"/> |  | ||||||
|         <result property="handbookId" column="handbook_id"/> |  | ||||||
|         <result property="category" column="category"/> |  | ||||||
|         <result property="name" column="name"/> |  | ||||||
|         <result property="createTime" column="create_time"/> |  | ||||||
|     </resultMap> |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| </mapper> |  | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="com.ruoyi.scientific.mapper.DepartmentMapper"> | ||||||
|  | 
 | ||||||
|  |     <resultMap type="com.ruoyi.scientific.domain.Department" id="DepartmentResult"> | ||||||
|  |         <result property="departmentId" column="department_id"/> | ||||||
|  |         <result property="departmentName" column="department_name"/> | ||||||
|  |         <result property="departmentAddress" column="department_address"/> | ||||||
|  |         <result property="departmentCategory" column="department_category"/> | ||||||
|  |         <result property="departmentPerson" column="department_person"/> | ||||||
|  |         <result property="departmentPhone" column="department_phone"/> | ||||||
|  |         <result property="departmentEmail" column="department_email"/> | ||||||
|  |         <result property="departmentFile" column="department_file"/> | ||||||
|  |         <result property="departmentNote" column="department_note"/> | ||||||
|  |         <result property="createBy" column="create_by"/> | ||||||
|  |         <result property="createTime" column="create_time"/> | ||||||
|  |         <result property="updateBy" column="update_by"/> | ||||||
|  |         <result property="updateTime" column="update_time"/> | ||||||
|  |     </resultMap> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | </mapper> | ||||||
| @ -13,6 +13,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
|         <result property="projectAppStaus" column="project_app_staus"/> |         <result property="projectAppStaus" column="project_app_staus"/> | ||||||
|         <result property="projectAppStTime" column="project_app_st_time"/> |         <result property="projectAppStTime" column="project_app_st_time"/> | ||||||
|         <result property="projectAppEndTime" column="project_app_end_time"/> |         <result property="projectAppEndTime" column="project_app_end_time"/> | ||||||
|  |         <result property="projectPlanId" column="project_plan_id"/> | ||||||
|  |         <result property="projectPlanName" column="project_plan_name"/> | ||||||
|  |         <result property="projectCategory" column="project_category"/> | ||||||
|         <result property="projectLeader" column="project_leader"/> |         <result property="projectLeader" column="project_leader"/> | ||||||
|         <result property="projectBudget" column="project_budget"/> |         <result property="projectBudget" column="project_budget"/> | ||||||
|         <result property="projectLeaderPhone" column="project_leader_phone"/> |         <result property="projectLeaderPhone" column="project_leader_phone"/> | ||||||
|  | |||||||
| @ -4,18 +4,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | |||||||
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
| <mapper namespace="com.ruoyi.scientific.mapper.ProjectHandbookMapper"> | <mapper namespace="com.ruoyi.scientific.mapper.ProjectHandbookMapper"> | ||||||
| 
 | 
 | ||||||
|     <resultMap type="com.ruoyi.scientific.domain.ProjectHandbook" id="ProjectHandbookResult"> |     <resultMap type="com.ruoyi.scientific.domain.ProjectHandbook" id="HandbookResult"> | ||||||
|         <result property="handbookId" column="handbook_id"/> |         <result property="handbookId" column="handbook_id"/> | ||||||
|         <result property="handbookName" column="handbook_name"/> |         <result property="handbookName" column="handbook_name"/> | ||||||
|  |         <result property="handbookCategory" column="handbook_category"/> | ||||||
|  |         <result property="handbookLevel" column="handbook_level"/> | ||||||
|  |         <result property="handbookDate" column="handbook_date"/> | ||||||
|  |         <result property="handbookNote" column="handbook_note"/> | ||||||
|  |         <result property="handbookFile" column="handbook_file"/> | ||||||
|         <result property="handbookProcId" column="handbook_proc_id"/> |         <result property="handbookProcId" column="handbook_proc_id"/> | ||||||
|         <result property="handbookStatus" column="handbook_status"/> |         <result property="handbookStatus" column="handbook_status"/> | ||||||
|         <result property="handbookType" column="handbook_type"/> |         <result property="directorName" column="director_name"/> | ||||||
|         <result property="handbookLevel" column="handbook_level"/> |  | ||||||
|         <result property="declareStatus" column="declare_status"/> |  | ||||||
|         <result property="projectAppStTime" column="project_app_st_time"/> |  | ||||||
|         <result property="projectAppEndTime" column="project_app_end_time"/> |  | ||||||
|         <result property="handbookLeader" column="handbook_leader"/> |  | ||||||
|         <result property="projectLeaderPhone" column="project_leader_phone"/> |  | ||||||
|         <result property="createBy" column="create_by"/> |         <result property="createBy" column="create_by"/> | ||||||
|         <result property="createTime" column="create_time"/> |         <result property="createTime" column="create_time"/> | ||||||
|         <result property="updateBy" column="update_by"/> |         <result property="updateBy" column="update_by"/> | ||||||
|  | |||||||
| @ -0,0 +1,26 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8" ?> | ||||||
|  | <!DOCTYPE mapper | ||||||
|  | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||||||
|  | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||||
|  | <mapper namespace="com.ruoyi.scientific.mapper.ProjectPlanMapper"> | ||||||
|  | 
 | ||||||
|  |     <resultMap type="com.ruoyi.scientific.domain.ProjectPlan" id="ProjectHandbookResult"> | ||||||
|  |         <result property="handbookId" column="handbook_id"/> | ||||||
|  |         <result property="handbookName" column="handbook_name"/> | ||||||
|  |         <result property="handbookProcId" column="handbook_proc_id"/> | ||||||
|  |         <result property="handbookStatus" column="handbook_status"/> | ||||||
|  |         <result property="handbookType" column="handbook_type"/> | ||||||
|  |         <result property="handbookLevel" column="handbook_level"/> | ||||||
|  |         <result property="declareStatus" column="declare_status"/> | ||||||
|  |         <result property="projectAppStTime" column="project_app_st_time"/> | ||||||
|  |         <result property="projectAppEndTime" column="project_app_end_time"/> | ||||||
|  |         <result property="handbookLeader" column="handbook_leader"/> | ||||||
|  |         <result property="projectLeaderPhone" column="project_leader_phone"/> | ||||||
|  |         <result property="createBy" column="create_by"/> | ||||||
|  |         <result property="createTime" column="create_time"/> | ||||||
|  |         <result property="updateBy" column="update_by"/> | ||||||
|  |         <result property="updateTime" column="update_time"/> | ||||||
|  |     </resultMap> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | </mapper> | ||||||
							
								
								
									
										2447
									
								
								script/sql/mysql/ruoyi-flowable-plus-240612.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2447
									
								
								script/sql/mysql/ruoyi-flowable-plus-240612.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3022
									
								
								script/sql/mysql/ry-flowable-plus-240703.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3022
									
								
								script/sql/mysql/ry-flowable-plus-240703.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3153
									
								
								script/sql/mysql/ry-flowable-plus-240709.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3153
									
								
								script/sql/mysql/ry-flowable-plus-240709.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3251
									
								
								script/sql/mysql/ry-flowable-plus-240712.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3251
									
								
								script/sql/mysql/ry-flowable-plus-240712.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3057
									
								
								script/sql/mysql/ry-flowable-plus-240714.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3057
									
								
								script/sql/mysql/ry-flowable-plus-240714.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2830
									
								
								script/sql/mysql/ry-flowable-plus-jzq.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2830
									
								
								script/sql/mysql/ry-flowable-plus-jzq.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3563
									
								
								script/sql/mysql/ry-flowable-plus-jzq240714.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3563
									
								
								script/sql/mysql/ry-flowable-plus-jzq240714.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										3332
									
								
								script/sql/mysql/ry-flowable-plus-jzq240715.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3332
									
								
								script/sql/mysql/ry-flowable-plus-jzq240715.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										4033
									
								
								script/sql/mysql/ry-flowable-plus-zl-0807.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4033
									
								
								script/sql/mysql/ry-flowable-plus-zl-0807.sql
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user