Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
UP管理员 | e1b7b58210 |
8
pom.xml
|
@ -352,6 +352,13 @@
|
|||
<version>${ruoyi-flowable-plus.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- scientific模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>scientific</artifactId>
|
||||
<version>${ruoyi-flowable-plus.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
@ -367,6 +374,7 @@
|
|||
<module>ruoyi-oss</module>
|
||||
<module>ruoyi-sms</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>scientific</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
|
|
@ -78,6 +78,12 @@
|
|||
<artifactId>ruoyi-demo</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- scientific模块 -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>scientific</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- flowable模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
|
|
|
@ -72,8 +72,13 @@ public class WfProcessController extends BaseController {
|
|||
public TableDataInfo<WfTaskVo> handbookList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
return processService.selectPageHandbookList(processQuery, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获得我发起的流程的详细信息的列表, pageQuery中可以指定标题名和负责人名字字段,如果能够匹配则
|
||||
* 返回这些信息,如果无法匹配返回为空。
|
||||
* @author zhanli
|
||||
* @since 2024-07-22
|
||||
*/
|
||||
@SaCheckPermission("workflow:process:ownList")
|
||||
@GetMapping(value = "/ownInfoList")
|
||||
public TableDataInfo<WfTaskInfoVo> ownProcessInfoList(ProcessQuery processQuery, PageQuery pageQuery) {
|
||||
|
@ -204,7 +209,7 @@ public class WfProcessController extends BaseController {
|
|||
*
|
||||
* @param definitionId 流程定义id
|
||||
* @param deployId 流程部署id
|
||||
* @param procInsId 这个参数可选
|
||||
* @param procInsId 这个参数可选, 如果流程的实例Id存在,那么就会把数值变量信息也返回
|
||||
*/
|
||||
@SaCheckPermission("workflow:process:start")
|
||||
@GetMapping("/getProcessForm")
|
||||
|
@ -215,7 +220,7 @@ public class WfProcessController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 根据流程定义id启动流程实例
|
||||
* 根据流程定义id启动流程实例, 实际上启动流程只需要流程的定义Id和传递的参数就行
|
||||
*
|
||||
* @param processDefId 流程定义id
|
||||
* @param variables 变量集合,json对象
|
||||
|
@ -227,6 +232,13 @@ public class WfProcessController extends BaseController {
|
|||
return R.ok("流程启动成功");
|
||||
}
|
||||
|
||||
@SaCheckPermission("workflow:process:start")
|
||||
@PostMapping("/startId/{processDefId}")
|
||||
public R<Void> start_(@PathVariable(value = "processDefId") String processDefId, @RequestBody Map<String, Object> variables) {
|
||||
String processInstanceId = processService.startProcessByDefId_(processDefId, variables);
|
||||
return R.ok(processInstanceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除流程实例
|
||||
*
|
||||
|
@ -237,6 +249,13 @@ public class WfProcessController extends BaseController {
|
|||
processService.deleteProcessByIds(instanceIds);
|
||||
return R.ok();
|
||||
}
|
||||
@SaCheckPermission("workflow:process:start")
|
||||
@PostMapping("/updateHistory/{processInsId}")
|
||||
public R<Void> updateHistory(@PathVariable(value = "processInsId") String processInsId, @RequestBody Map<String, Object> variables) {
|
||||
// 删除的时候先要获取流程的实体Id
|
||||
processService.editProcessByIds(processInsId, variables);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 读取xml文件
|
||||
|
|
|
@ -49,9 +49,9 @@ spring:
|
|||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
# jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
|
||||
# rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
|
||||
url: jdbc:mysql://localhost:3306/fengxu_java?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=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
|
||||
username: root
|
||||
password: 123456
|
||||
password: jyzbyj306
|
||||
# 从库数据源
|
||||
# slave:
|
||||
# lazy: true
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
</encoder>
|
||||
</appender>
|
||||
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="file_console" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.path}/sys-console.log</file>
|
||||
|
|
|
@ -16,12 +16,19 @@ import javax.annotation.Resource;
|
|||
@Getter
|
||||
public class FlowServiceFactory {
|
||||
|
||||
/**
|
||||
* 提供了管理与控制部署(deployments)与流程定义(process definitions)的操作
|
||||
*/
|
||||
@Resource
|
||||
protected RepositoryService repositoryService;
|
||||
|
||||
@Resource
|
||||
protected RuntimeService runtimeService;
|
||||
|
||||
/**
|
||||
* 用于管理(创建,更新,删除,查询……)组与用户,Flowable实际上在运行时并不做任
|
||||
* 何用户检查。例如任务可以分派给任何用户,而引擎并不会验证系统中是否存在该用户
|
||||
*/
|
||||
@Resource
|
||||
protected IdentityService identityService;
|
||||
|
||||
|
@ -30,10 +37,20 @@ public class FlowServiceFactory {
|
|||
|
||||
@Resource
|
||||
protected FormService formService;
|
||||
|
||||
/**
|
||||
* 暴露Flowable引擎收集的所有历史数据。当执行流程时,引擎会保存许多数据(可配置),
|
||||
* 例如流程实例启动时间、谁在执行哪个任务、完成任务花费的事件、每个流程实例的执行路
|
||||
* 径,等等。这个服务主要提供查询这些数据的能力。
|
||||
*/
|
||||
@Resource
|
||||
protected HistoryService historyService;
|
||||
|
||||
/**
|
||||
* 暴露通常在用Flowable编写用户应用时不需要使用。它可以读取数据库表与表原始数据的信
|
||||
* 息,也提供了对作业(job)的查询与管理操作。Flowable中很多地方都使用作业,例如定时
|
||||
* 器(timer),异步操作(asynchronous continuation),延时暂停/激活(delayed
|
||||
* suspension/activation)等等
|
||||
*/
|
||||
@Resource
|
||||
protected ManagementService managementService;
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package com.ruoyi.flowable.listener;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.flowable.engine.delegate.ExecutionListener;
|
||||
|
||||
public class TestTaskListener implements ExecutionListener {
|
||||
/**
|
||||
* 注入字段(名称与流程设计时字段名称一致)
|
||||
*/
|
||||
// private FixedValue field;
|
||||
@Override
|
||||
public void notify(DelegateExecution execution) {
|
||||
System.out.println("执行任务监听器...");
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
package com.ruoyi.project.service;
|
||||
|
||||
import com.ruoyi.project.domain.ProjectApplication;
|
||||
import com.ruoyi.project.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.project.domain.bo.ProjectApplicationBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目申报Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
*/
|
||||
public interface IProjectApplicationService {
|
||||
|
||||
/**
|
||||
* 查询项目申报
|
||||
*/
|
||||
ProjectApplicationVo queryById(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询项目申报列表
|
||||
*/
|
||||
TableDataInfo<ProjectApplicationVo> queryPageList(ProjectApplicationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询项目申报列表
|
||||
*/
|
||||
List<ProjectApplicationVo> queryList(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目申报
|
||||
*/
|
||||
Boolean insertByBo(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目申报
|
||||
*/
|
||||
Boolean updateByBo(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目申报信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
|
@ -123,4 +123,8 @@ public interface IWfProcessService {
|
|||
|
||||
|
||||
TableDataInfo<WfTaskInfoVo> selectPageOwnProcessInfoList(ProcessQuery processQuery, PageQuery pageQuery);
|
||||
|
||||
String startProcessByDefId_(String processDefId, Map<String, Object> variables);
|
||||
|
||||
void editProcessByIds(String procInsId, Map<String, Object> variables);
|
||||
}
|
||||
|
|
|
@ -42,10 +42,16 @@ import lombok.RequiredArgsConstructor;
|
|||
import org.flowable.bpmn.constants.BpmnXMLConstants;
|
||||
import org.flowable.bpmn.model.Process;
|
||||
import org.flowable.bpmn.model.*;
|
||||
import org.flowable.common.engine.impl.interceptor.Command;
|
||||
import org.flowable.common.engine.impl.interceptor.CommandContext;
|
||||
import org.flowable.engine.ProcessEngine;
|
||||
import org.flowable.engine.ProcessEngineConfiguration;
|
||||
import org.flowable.engine.history.HistoricActivityInstance;
|
||||
import org.flowable.engine.history.HistoricActivityInstanceQuery;
|
||||
import org.flowable.engine.history.HistoricProcessInstance;
|
||||
import org.flowable.engine.history.HistoricProcessInstanceQuery;
|
||||
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
|
||||
import org.flowable.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
|
||||
import org.flowable.engine.repository.Deployment;
|
||||
import org.flowable.engine.repository.ProcessDefinition;
|
||||
import org.flowable.engine.repository.ProcessDefinitionQuery;
|
||||
|
@ -199,6 +205,7 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
|||
taskVo.setFinishTime(hisIns.getEndTime());
|
||||
taskVo.setProcInsId(hisIns.getId());
|
||||
|
||||
|
||||
// 计算耗时
|
||||
if (Objects.nonNull(hisIns.getEndTime())) {
|
||||
taskVo.setDuration(DateUtils.getDatePoor(hisIns.getEndTime(), hisIns.getStartTime()));
|
||||
|
@ -664,6 +671,18 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
|||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String startProcessByDefId_(String procDefId, Map<String, Object> variables) {
|
||||
try {
|
||||
ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(procDefId).singleResult();
|
||||
return startProcess_(processDefinition, variables);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException("流程启动错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过DefinitionKey启动流程
|
||||
* @param procDefKey 流程定义Key
|
||||
|
@ -696,6 +715,82 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
|||
historyService.bulkDeleteHistoricProcessInstances(ids);
|
||||
}
|
||||
|
||||
public void editProcessByIds(String procInsId, Map<String, Object> variables) {
|
||||
// 更改前先获得历史信息
|
||||
HistoricProcessInstance historicProcIns = historyService.createHistoricProcessInstanceQuery()
|
||||
.processInstanceId(procInsId)
|
||||
.includeProcessVariables()
|
||||
.singleResult();
|
||||
|
||||
// ---------------------------------- 新建流程 ------------------------------------- //
|
||||
// 从历史实体中获取流程定义
|
||||
String procDefId = historicProcIns.getProcessDefinitionId();
|
||||
ProcessDefinition procDef = repositoryService.createProcessDefinitionQuery()
|
||||
.processDefinitionId(procDefId).singleResult();
|
||||
|
||||
// 检查流程定义是否正常
|
||||
if (ObjectUtil.isNotNull(procDef) && procDef.isSuspended()) {
|
||||
throw new ServiceException("流程已被挂起,请先激活流程");
|
||||
}
|
||||
|
||||
// 设置流程发起人Id到流程中
|
||||
String userIdStr = TaskUtils.getUserId();
|
||||
identityService.setAuthenticatedUserId(userIdStr);
|
||||
variables.put(BpmnXMLConstants.ATTRIBUTE_EVENT_START_INITIATOR, userIdStr);
|
||||
|
||||
// 设置流程状态为完成
|
||||
variables.put(ProcessConstants.PROCESS_STATUS_KEY, ProcessStatus.COMPLETED.getStatus());
|
||||
// 根据流程的定义发起流程实例
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDef.getId(), variables);
|
||||
// 第一个用户任务为发起人,则自动完成任务
|
||||
wfTaskService.startFirstTask(processInstance, variables);
|
||||
|
||||
|
||||
// 直接修改数据库的方法
|
||||
// processEngine.getProcessEngineConfiguration().getDataSource();
|
||||
// // 获取数据库连接
|
||||
// DataSource dataSource = processEngineConfiguration.getDataSource();
|
||||
// try (Connection connection = dataSource.getConnection();
|
||||
// Statement statement = connection.createStatement()) {
|
||||
//
|
||||
// // 更新历史流程实例的名称
|
||||
// String sql = "UPDATE ACT_HI_PROCINST SET NAME_ = 'newName' WHERE ID_ = 'processInstanceId'";
|
||||
// statement.executeUpdate(sql);
|
||||
//
|
||||
// } catch (SQLException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
|
||||
// HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery()
|
||||
// .processInstanceId("processInstanceId")
|
||||
// .singleResult();
|
||||
// ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration
|
||||
// .createProcessEngineConfigurationFromResourceDefault();
|
||||
// // 将查询结果转换为实体类,以便进行修改
|
||||
// if (historicProcessInstance instanceof HistoricProcessInstanceEntity) {
|
||||
// HistoricProcessInstanceEntity processInstanceEntity = (HistoricProcessInstanceEntity) historicProcessInstance;
|
||||
//
|
||||
// // 修改流程实例名称
|
||||
// processInstanceEntity.setName("newProcessName");
|
||||
//
|
||||
// // 保存修改
|
||||
// processEngineConfiguration.getCommandExecutor().execute(new Command<Void>() {
|
||||
// @Override
|
||||
// public Void execute(CommandContext commandContext) {
|
||||
//
|
||||
// return null;
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
|
||||
// -------------------------------- 删除历史流程 ---------------------------------- //
|
||||
// 历史流程实例不能编辑只能删除,因此编辑=删除+新建
|
||||
historyService.deleteHistoricProcessInstance(procInsId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 读取xml文件
|
||||
* @param processDefId 流程定义ID
|
||||
|
@ -777,6 +872,23 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
|||
wfTaskService.startFirstTask(processInstance, variables);
|
||||
}
|
||||
|
||||
private String startProcess_(ProcessDefinition procDef, Map<String, Object> variables) {
|
||||
if (ObjectUtil.isNotNull(procDef) && procDef.isSuspended()) {
|
||||
throw new ServiceException("流程已被挂起,请先激活流程");
|
||||
}
|
||||
// 设置流程发起人Id到流程中
|
||||
String userIdStr = TaskUtils.getUserId();
|
||||
identityService.setAuthenticatedUserId(userIdStr);
|
||||
variables.put(BpmnXMLConstants.ATTRIBUTE_EVENT_START_INITIATOR, userIdStr);
|
||||
// 设置流程状态为进行中
|
||||
variables.put(ProcessConstants.PROCESS_STATUS_KEY, ProcessStatus.RUNNING.getStatus());
|
||||
// 发起流程实例
|
||||
ProcessInstance processInstance = runtimeService.startProcessInstanceById(procDef.getId(), variables);
|
||||
// 第一个用户任务为发起人,则自动完成任务
|
||||
wfTaskService.startFirstTask(processInstance, variables);
|
||||
return processInstance.getProcessInstanceId();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取流程变量
|
||||
|
@ -881,6 +993,7 @@ public class WfProcessServiceImpl extends FlowServiceFactory implements IWfProce
|
|||
@Deprecated
|
||||
private void buildStartFormData(HistoricProcessInstance historicProcIns, Process process, String deployId, List<FormConf> procFormList) {
|
||||
procFormList = procFormList == null ? new ArrayList<>() : procFormList;
|
||||
|
||||
HistoricActivityInstance startInstance = historyService.createHistoricActivityInstanceQuery()
|
||||
.processInstanceId(historicProcIns.getId())
|
||||
.activityId(historicProcIns.getStartActivityId())
|
||||
|
|
|
@ -330,6 +330,7 @@ public class WfTaskServiceImpl extends FlowServiceFactory implements IWfTaskServ
|
|||
taskService.setOwner(bo.getTaskId(), TaskUtils.getUserId());
|
||||
// 执行委派
|
||||
taskService.delegateTask(bo.getTaskId(), bo.getUserId());
|
||||
|
||||
// 设置任务节点名称
|
||||
bo.setTaskName(task.getName());
|
||||
// 处理抄送用户
|
||||
|
|
|
@ -1,19 +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.project.mapper.ProjectApplicationMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.project.domain.ProjectApplication" id="ProjectApplicationResult">
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="projectStatus" column="project_status"/>
|
||||
<result property="projectAppStTime" column="project_app_st_time"/>
|
||||
<result property="projectAppEndTime" column="project_app_end_time"/>
|
||||
<result property="projectLeader" column="project_leader"/>
|
||||
<result property="projectBudget" column="project_budget"/>
|
||||
<result property="projectLeaderPhone" column="project_leader_phone"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -5,8 +5,8 @@
|
|||
"author": "KonBAI",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build": "vue-cli-service build",
|
||||
"dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
|
||||
"build": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目申报列表
|
||||
export function listApplication(query) {
|
||||
return request({
|
||||
url: '/scientific/application/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目申报详细
|
||||
export function getApplication(projectId) {
|
||||
return request({
|
||||
url: '/scientific/application/' + projectId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增项目申报
|
||||
export function addApplication(data) {
|
||||
return request({
|
||||
url: '/scientific/application',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改项目申报
|
||||
export function updateApplication(data) {
|
||||
return request({
|
||||
url: '/scientific/application',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除项目申报
|
||||
export function delApplication(projectId) {
|
||||
return request({
|
||||
url: '/scientific/application/' + projectId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 删除项目申报
|
||||
export function confirmFundsReceived(data) {
|
||||
return request({
|
||||
url: '/scientific/application/confirmFunds/',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目申报v2列表
|
||||
export function listHandbook(query) {
|
||||
return request({
|
||||
url: '/scientific/handbook/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目申报v2详细
|
||||
export function getHandbook(handbookId) {
|
||||
return request({
|
||||
url: '/scientific/handbook/' + handbookId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增项目申报v2
|
||||
export function addHandbook(data) {
|
||||
return request({
|
||||
url: '/scientific/handbook',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改项目申报v2
|
||||
export function updateHandbook(data) {
|
||||
return request({
|
||||
url: '/scientific/handbook',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除项目申报v2
|
||||
export function delHandbook(handbookId) {
|
||||
return request({
|
||||
url: '/scientific/handbook/' + handbookId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询科研管理列表
|
||||
export function listProject(query) {
|
||||
return request({
|
||||
url: '/scientific/project/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询科研管理详细
|
||||
export function getProject(id) {
|
||||
return request({
|
||||
url: '/scientific/project/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增科研管理
|
||||
export function addProject(data) {
|
||||
return request({
|
||||
url: '/scientific/project',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改科研管理
|
||||
export function updateProject(data) {
|
||||
return request({
|
||||
url: '/scientific/project',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除科研管理
|
||||
export function delProject(id) {
|
||||
return request({
|
||||
url: '/scientific/project/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
|
@ -27,6 +27,22 @@ export function startProcess(processDefId, data) {
|
|||
})
|
||||
}
|
||||
|
||||
export function startProcess_(processDefId, data) {
|
||||
return request({
|
||||
url: '/workflow/process/startId/' + processDefId,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export function updateProcess(processInsId, data) {
|
||||
return request({
|
||||
url: '/workflow/process/updateHistory/' + processInsId,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除流程实例
|
||||
export function delProcess(ids) {
|
||||
return request({
|
||||
|
|
|
@ -187,11 +187,46 @@ export const dynamicRoutes = [
|
|||
name: 'WorkStart',
|
||||
meta: { title: '发起流程', icon: '' }
|
||||
},
|
||||
// logzhan:这里注册项目信息更新模块
|
||||
{
|
||||
path: 'update/:deployId([\\w|\\-]+)',
|
||||
component: () => import('@/views/workflow/work/update'),
|
||||
name: 'WorkUpdate',
|
||||
meta: { title: '更新信息', icon: '' }
|
||||
},
|
||||
{
|
||||
path: 'detail/:procInsId([\\w|\\-]+)',
|
||||
component: () => import('@/views/workflow/work/detail'),
|
||||
name: 'WorkDetail',
|
||||
meta: { title: '流程详情', activeMenu: '/work/own' }
|
||||
},
|
||||
// logzhan:这里用于项目的信息变更如预算追加、更换负责人等等
|
||||
{
|
||||
path: 'proj_update/:deployId([\\w|\\-]+)',
|
||||
component: () => import('@/views/workflow/work/proj_update'),
|
||||
name: 'ProjectInfoUpdate',
|
||||
meta: { title: '项目信息变更', icon: ''}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/scientific',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
permissions: ['scientific:projectApply'],
|
||||
children: [
|
||||
{
|
||||
path: 'projectApply/:deployId([\\w|\\-]+)',
|
||||
component: () => import('@/views/scientific/projectApply'),
|
||||
name: 'ProjectApply',
|
||||
meta: { title: '项目申报', icon: '' }
|
||||
},
|
||||
{
|
||||
path: 'handbookProjectQuery/:handbookId([\\w|\\-]+)',
|
||||
component: () => import('@/views/scientific/handbookProject_query'),
|
||||
name: 'handbookProjectQuery',
|
||||
meta: { title: '已申报项目' }
|
||||
// meta: { title: '已申报项目', activeMenu: '/work/own' }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -0,0 +1,524 @@
|
|||
<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="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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
|
||||
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="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-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:application: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:application: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:application: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:application:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="applicationList" @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="项目ID" align="center" prop="projectId" v-if="true" width="180"/> -->
|
||||
<el-table-column label="项目名称" align="center" :min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">{{ scope.row.projectName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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" :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
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['scientific:application:edit']"
|
||||
>信息修改</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
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['scientific:application: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目申报对话框, 采用open字段控制是否 -->
|
||||
<!-- 这是提交或者详细信息的表单显示框 -->
|
||||
<!-- 这个表单的名字为form:
|
||||
在form.projectName这种方式配置参数 -->
|
||||
<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 label="项目负责人" prop="projectLeader">
|
||||
<el-input v-model="form.projectLeader" placeholder="请输入项目负责人" :style="{ width: '100px'}"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="projectStatus" >
|
||||
<el-input v-model="form.projectStatus" placeholder="请输入状态" :style="{ width: '50px' }"/>
|
||||
</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-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>
|
||||
<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 { listApplication, getApplication, delApplication, addApplication, updateApplication } from "@/api/scientific/application";
|
||||
import { listProcess} from "@/api/workflow/process";
|
||||
export default {
|
||||
name: "Application",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目申报表格数据
|
||||
applicationList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectName: undefined,
|
||||
projectStatus: undefined,
|
||||
projectAppProcId: undefined,
|
||||
projectAppStaus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
projectLeader: undefined,
|
||||
projectBudget: undefined,
|
||||
projectLeaderPhone: undefined,
|
||||
},
|
||||
queryProcParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
processKey: undefined,
|
||||
processName: "项目预算追加表",
|
||||
category: "001"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
projectId: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
],
|
||||
projectName: [
|
||||
{ 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() {
|
||||
this.getList();
|
||||
},
|
||||
// logzhan : 当我们跳转到其他路由页面,例如预算变更的时候,再次回来时
|
||||
// 需要用这个函数刷新列表,否则列表将处于刷新状态不显示信息
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
vm.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目申报列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listApplication(this.queryParams).then(response => {
|
||||
this.applicationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
projectId: undefined,
|
||||
projectName: undefined,
|
||||
projectStatus: undefined,
|
||||
projectAppProcId: undefined,
|
||||
projectAppStaus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
projectLeader: undefined,
|
||||
projectBudget: undefined,
|
||||
projectLeaderPhone: 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.projectId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加项目申报";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const projectId = row.projectId || this.ids
|
||||
getApplication(projectId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
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() {
|
||||
// $refs["form"].validate(valid => 验证表单是否有效
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
// 判断是修改还是新增
|
||||
if (this.form.projectId != null) {
|
||||
console.log(this.form)
|
||||
updateApplication(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
// 提交成功后刷新列表
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
|
||||
addApplication(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const projectIds = row.projectId || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目申报编号为"' + projectIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delApplication(projectIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('scientific/application/export', {
|
||||
...this.queryParams
|
||||
}, `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 '';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -73,8 +73,8 @@
|
|||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['project:application:add']"
|
||||
>新增</el-button>
|
||||
v-hasPermi="['scientific:application:add']"
|
||||
>项目填写</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
|
@ -84,7 +84,7 @@
|
|||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['project:application:edit']"
|
||||
v-hasPermi="['scientific:application:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -95,7 +95,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['project:application:remove']"
|
||||
v-hasPermi="['scientific:application:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
|
@ -105,7 +105,7 @@
|
|||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['project:application:export']"
|
||||
v-hasPermi="['scientific:application:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
|
@ -113,9 +113,26 @@
|
|||
|
||||
<el-table v-loading="loading" :data="applicationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目ID" align="center" prop="projectId" v-if="true" width="180"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" :min-width="280"/>
|
||||
<el-table-column label="状态" align="center" prop="projectStatus" width="60"/>
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<!-- <el-table-column label="项目ID" align="center" prop="projectId" v-if="true" width="180"/> -->
|
||||
<el-table-column label="项目名称" align="center" :min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">{{ scope.row.projectName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">{{ formatProjectAppStatus(scope.row.projectAppStaus) }}</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>
|
||||
|
@ -126,33 +143,39 @@
|
|||
<span>{{ parseTime(scope.row.projectAppEndTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目负责人" align="center" prop="projectLeader" width="100"/>
|
||||
|
||||
<el-table-column label="项目预算(万)" align="center" prop="projectBudget" :min-width="180" width="180"/>
|
||||
<el-table-column label="项目负责人联系电话" align="center" prop="projectLeaderPhone" :min-width="220" width="220"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" :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
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:application:edit']"
|
||||
>修改</el-button>
|
||||
v-hasPermi="['scientific:application:edit']"
|
||||
>信息修改</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
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['project:application:remove']"
|
||||
v-hasPermi="['scientific:application:remove']"
|
||||
>删除</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-video-play"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['project:application:remove']"
|
||||
>申报</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -165,12 +188,18 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目申报对话框 -->
|
||||
<!-- 添加或修改项目申报对话框, 采用open字段控制是否 -->
|
||||
<!-- 这是提交或者详细信息的表单显示框 -->
|
||||
<!-- 这个表单的名字为form:
|
||||
在form.projectName这种方式配置参数 -->
|
||||
<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 label="项目负责人" prop="projectLeader">
|
||||
<el-input v-model="form.projectLeader" placeholder="请输入项目负责人" :style="{ width: '100px'}"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="projectStatus" >
|
||||
<el-input v-model="form.projectStatus" placeholder="请输入状态" :style="{ width: '50px' }"/>
|
||||
</el-form-item>
|
||||
|
@ -190,9 +219,6 @@
|
|||
placeholder="请选择申报结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目负责人" prop="projectLeader">
|
||||
<el-input v-model="form.projectLeader" placeholder="请输入项目负责人" :style="{ width: '100px'}"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目预算(万)" prop="projectBudget">
|
||||
<el-input v-model="form.projectBudget" placeholder="请输入项目预算(万)" :style="{ width: '100px'}"/>
|
||||
</el-form-item>
|
||||
|
@ -209,8 +235,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listApplication, getApplication, delApplication, addApplication, updateApplication } from "@/api/project/application";
|
||||
|
||||
import { listApplication, getApplication, delApplication, addApplication, updateApplication } from "@/api/scientific/application";
|
||||
import { listProcess} from "@/api/workflow/process";
|
||||
export default {
|
||||
name: "Application",
|
||||
data() {
|
||||
|
@ -241,11 +267,20 @@ export default {
|
|||
pageSize: 10,
|
||||
projectName: undefined,
|
||||
projectStatus: undefined,
|
||||
projectAppProcId: undefined,
|
||||
projectAppStaus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
projectLeader: undefined,
|
||||
projectBudget: undefined,
|
||||
projectLeaderPhone: undefined
|
||||
projectLeaderPhone: undefined,
|
||||
},
|
||||
queryProcParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
processKey: undefined,
|
||||
processName: "项目预算追加表",
|
||||
category: "001"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -274,13 +309,20 @@ export default {
|
|||
],
|
||||
projectLeaderPhone: [
|
||||
{ required: true, message: "项目负责人联系电话不能为空", trigger: "blur" }
|
||||
]
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
// logzhan : 当我们跳转到其他路由页面,例如预算变更的时候,再次回来时
|
||||
// 需要用这个函数刷新列表,否则列表将处于刷新状态不显示信息
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
vm.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目申报列表 */
|
||||
getList() {
|
||||
|
@ -302,6 +344,8 @@ export default {
|
|||
projectId: undefined,
|
||||
projectName: undefined,
|
||||
projectStatus: undefined,
|
||||
projectAppProcId: undefined,
|
||||
projectAppStaus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
projectLeader: undefined,
|
||||
|
@ -342,22 +386,58 @@ export default {
|
|||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改项目申报";
|
||||
console.log(this.form)
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdateBudget(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const upProjectId = row.projectId || this.ids
|
||||
|
||||
// 注释参考代码:用于后续代码修改的参考
|
||||
// getApplication(projectId).then(response => {
|
||||
// this.loading = false;
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
// this.title = "修改项目申报";
|
||||
// });
|
||||
|
||||
// 查询项目经费追加流程
|
||||
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() {
|
||||
// $refs["form"].validate(valid => 验证表单是否有效
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
// 判断是修改还是新增
|
||||
if (this.form.projectId != null) {
|
||||
console.log(this.form)
|
||||
updateApplication(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
// 提交成功后刷新列表
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
|
||||
addApplication(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
|
@ -386,9 +466,45 @@ export default {
|
|||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('project/application/export', {
|
||||
this.download('scientific/application/export', {
|
||||
...this.queryParams
|
||||
}, `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 "未知状态";
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -0,0 +1,516 @@
|
|||
<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="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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
|
||||
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="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-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="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['scientific:application:export']"
|
||||
>Excel导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="applicationList" @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="项目ID" align="center" prop="projectId" v-if="true" width="180"/> -->
|
||||
<el-table-column label="项目名称" align="center" :min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">{{ scope.row.projectName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<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" :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" width="100px" :min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" :type="getFundsTagType(scope.row.projectFundsReceived)">
|
||||
{{ formatProjectFundsRecvStatus(scope.row.projectFundsReceived) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="到账备注" align="center" prop="projectFundsRemark" :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
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['scientific:application:edit']"
|
||||
>信息修改</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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目申报对话框, 采用open字段控制是否 -->
|
||||
<!-- 这是提交或者详细信息的表单显示框 -->
|
||||
<!-- 这个表单的名字为form:
|
||||
在form.projectName这种方式配置参数 -->
|
||||
<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 label="项目负责人" prop="projectLeader">
|
||||
<el-input v-model="form.projectLeader" placeholder="请输入项目负责人" :style="{ width: '100px'}"/>
|
||||
</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-item label="到账情况" prop="projectFundsReceived">
|
||||
<el-select
|
||||
v-model="form.projectFundsReceived"
|
||||
placeholder="请选择"
|
||||
:style="{ width: '100px' }"
|
||||
:disabled="isProjectFundsReceivedDisabled"
|
||||
>
|
||||
<el-option label="到账" value="1"></el-option>
|
||||
<el-option label="未到账" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="到账备注" prop="projectFundsRemark">
|
||||
<el-input v-model="form.projectFundsRemark" placeholder="输入到账状态说明" :style="{ width: '140px'} " />
|
||||
</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 { listApplication, getApplication, delApplication, addApplication, confirmFundsReceived } from "@/api/scientific/application";
|
||||
import { listProcess} from "@/api/workflow/process";
|
||||
export default {
|
||||
name: "Application",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目申报表格数据
|
||||
applicationList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectName: undefined,
|
||||
projectStatus: undefined,
|
||||
projectAppProcId: undefined,
|
||||
projectAppStaus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
projectLeader: undefined,
|
||||
projectBudget: undefined,
|
||||
projectLeaderPhone: undefined,
|
||||
},
|
||||
queryProcParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
processKey: undefined,
|
||||
processName: "项目预算追加表",
|
||||
category: "001"
|
||||
},
|
||||
fundsForm: {
|
||||
projectId:undefined,
|
||||
projectFundsReceived:undefined,
|
||||
projectFundsRemark:undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
projectId: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
],
|
||||
projectName: [
|
||||
{ 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() {
|
||||
this.getList();
|
||||
},
|
||||
// logzhan : 当我们跳转到其他路由页面,例如预算变更的时候,再次回来时
|
||||
// 需要用这个函数刷新列表,否则列表将处于刷新状态不显示信息
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
vm.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目申报列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listApplication(this.queryParams).then(response => {
|
||||
this.applicationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
projectId: undefined,
|
||||
projectName: undefined,
|
||||
projectStatus: undefined,
|
||||
projectAppProcId: undefined,
|
||||
projectAppStaus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
projectLeader: undefined,
|
||||
projectBudget: undefined,
|
||||
projectLeaderPhone: undefined,
|
||||
projectFundsReceived: undefined,
|
||||
projectFundsRemark:undefined
|
||||
};
|
||||
this.fundsForm = {
|
||||
projectId: undefined,
|
||||
projectFundsReceived: undefined,
|
||||
projectFundsRemark: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.projectId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加项目申报";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const projectId = row.projectId || this.ids
|
||||
getApplication(projectId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
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() {
|
||||
// $refs["form"].validate(valid => 验证表单是否有效
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
// 判断是修改还是新增
|
||||
if (this.form.projectId != null) {
|
||||
console.log(this.form)
|
||||
this.fundsForm.projectId = this.form.projectId;
|
||||
this.fundsForm.projectFundsReceived = this.form.projectFundsReceived;
|
||||
this.fundsForm.projectFundsRemark = this.form.projectFundsRemark;
|
||||
confirmFundsReceived(this.fundsForm).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
// 提交成功后刷新列表
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addApplication(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const projectIds = row.projectId || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目申报编号为"' + projectIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delApplication(projectIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('scientific/application/export', {
|
||||
...this.queryParams
|
||||
}, `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 '';
|
||||
}
|
||||
},
|
||||
formatProjectFundsRecvStatus(cellValue) {
|
||||
switch (cellValue) {
|
||||
case '0':
|
||||
return "未到账";
|
||||
case '1':
|
||||
return "已到账";
|
||||
default:
|
||||
return "异常";
|
||||
}
|
||||
},
|
||||
getFundsTagType(status) {
|
||||
switch (status) {
|
||||
case '1':
|
||||
// 审核中 显示黄色
|
||||
return 'success';
|
||||
case '0':
|
||||
// 未申报, 灰色
|
||||
return 'primary';
|
||||
default:
|
||||
return 'info';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,476 @@
|
|||
<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="handbookName" label-width="100px" >
|
||||
<el-input
|
||||
v-model="queryParams.handbookName"
|
||||
placeholder="请输入申报信息名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目指南级别" prop="handbookLevel" label-width="100px">
|
||||
<el-input
|
||||
v-model="queryParams.handbookLevel"
|
||||
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 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-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:handbook: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:handbook: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:handbook: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:handbook:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="handbookList" @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="项目ID" align="center" prop="handbookId" v-if="true"/> -->
|
||||
<el-table-column label="申报信息名称" align="center" prop="handbookName" :min-width="180"/>
|
||||
<!-- <el-table-column label="项目审核状态" align="center" prop="handbookStatus" /> -->
|
||||
<el-table-column label="项目指南类型" align="center" prop="handbookType" />
|
||||
|
||||
<el-table-column label="项目指南级别" align="center" width="100px" :min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" :type="getTagLevelType(scope.row.handbookLevel)">
|
||||
{{ formatHandbookLevel(scope.row.handbookLevel) }}
|
||||
</el-tag>
|
||||
</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(scope.row.declareStatus)">
|
||||
{{ formatHandbookStatus(scope.row.declareStatus) }}
|
||||
</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="handbookLeader" />
|
||||
<el-table-column label="指南负责人电话" align="center" prop="projectLeaderPhone" />
|
||||
<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="handleUpdate(scope.row)"
|
||||
v-hasPermi="['scientific:handbook:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['scientific:handbook: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改项目申报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="handbookName">
|
||||
<el-input v-model="form.handbookName" placeholder="请输入申报信息名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目立项流程实例Id" prop="handbookProcId">
|
||||
<el-input v-model="form.handbookProcId" placeholder="请输入项目立项流程实例Id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目指南级别(0市级 1区级 3省级 4国家级)" prop="handbookLevel">
|
||||
<el-input v-model="form.handbookLevel" 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-item label="指南负责人" prop="handbookLeader">
|
||||
<el-input v-model="form.handbookLeader" placeholder="请输入指南负责人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="指南负责人电话" prop="projectLeaderPhone">
|
||||
<el-input v-model="form.projectLeaderPhone" 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 { listHandbook, getHandbook, delHandbook, addHandbook, updateHandbook } from "@/api/scientific/handbook";
|
||||
|
||||
export default {
|
||||
name: "Handbook",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目申报v2表格数据
|
||||
handbookList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
handbookName: undefined,
|
||||
handbookProcId: undefined,
|
||||
handbookStatus: undefined,
|
||||
handbookType: undefined,
|
||||
handbookLevel: undefined,
|
||||
declareStatus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
handbookLeader: undefined,
|
||||
projectLeaderPhone: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
handbookId: [
|
||||
{ required: true, message: "项目ID不能为空", trigger: "blur" }
|
||||
],
|
||||
handbookName: [
|
||||
{ required: true, message: "申报信息名称不能为空", trigger: "blur" }
|
||||
],
|
||||
handbookProcId: [
|
||||
{ required: true, message: "项目立项流程实例Id不能为空", trigger: "blur" }
|
||||
],
|
||||
handbookStatus: [
|
||||
{ required: true, message: "项目审核状态(0未审核 1审核中 3审核通过)不能为空", trigger: "change" }
|
||||
],
|
||||
handbookType: [
|
||||
{ required: true, message: "项目指南类型(0 科技计划 1 研发计划)不能为空", trigger: "change" }
|
||||
],
|
||||
handbookLevel: [
|
||||
{ required: true, message: "项目指南级别(0市级 1区级 3省级 4国家级)不能为空", trigger: "blur" }
|
||||
],
|
||||
declareStatus: [
|
||||
{ required: true, message: "申报状态(0 停止申报 1 申报中)不能为空", trigger: "change" }
|
||||
],
|
||||
projectAppStTime: [
|
||||
{ required: true, message: "申报开始日期不能为空", trigger: "blur" }
|
||||
],
|
||||
projectAppEndTime: [
|
||||
{ required: true, message: "申报结束日期不能为空", trigger: "blur" }
|
||||
],
|
||||
handbookLeader: [
|
||||
{ required: true, message: "指南负责人不能为空", trigger: "blur" }
|
||||
],
|
||||
projectLeaderPhone: [
|
||||
{ required: true, message: "指南负责人电话不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目申报v2列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listHandbook(this.queryParams).then(response => {
|
||||
this.handbookList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
handbookId: undefined,
|
||||
handbookName: undefined,
|
||||
handbookProcId: undefined,
|
||||
handbookStatus: undefined,
|
||||
handbookType: undefined,
|
||||
handbookLevel: undefined,
|
||||
declareStatus: undefined,
|
||||
projectAppStTime: undefined,
|
||||
projectAppEndTime: undefined,
|
||||
handbookLeader: undefined,
|
||||
projectLeaderPhone: 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.handbookId)
|
||||
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 handbookId = row.handbookId || this.ids
|
||||
getHandbook(handbookId).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.handbookId != null) {
|
||||
updateHandbook(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addHandbook(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const handbookIds = row.handbookId || this.ids;
|
||||
this.$modal.confirm('是否确认删除项目申报v2编号为"' + handbookIds + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delHandbook(handbookIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('scientific/handbook/export', {
|
||||
...this.queryParams
|
||||
}, `handbook_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/**
|
||||
* 把项目状态的申报code转换为文字: 0 : 未申报 1: 审核中 2: 已申报
|
||||
* @param {number|string} cellValue - 原始数值
|
||||
* @returns {string} 转换后的字符串
|
||||
* @author zhanli
|
||||
*/
|
||||
formatHandbookStatus(cellValue) {
|
||||
switch (cellValue) {
|
||||
case '0':
|
||||
return "暂未开始";
|
||||
case '1':
|
||||
return "申报中";
|
||||
case '2':
|
||||
return "停止申报";
|
||||
default:
|
||||
return "未知状态";
|
||||
}
|
||||
},
|
||||
formatHandbookLevel(cellValue) {
|
||||
switch (cellValue) {
|
||||
case '0':
|
||||
return "市级";
|
||||
case '1':
|
||||
return "区级";
|
||||
case '2':
|
||||
return "省级";
|
||||
case '3':
|
||||
return "国家级";
|
||||
default:
|
||||
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) {
|
||||
switch (status) {
|
||||
case '2':
|
||||
// 省级 蓝色
|
||||
return 'primary';
|
||||
case '1':
|
||||
// 市级 显示绿色
|
||||
return 'success';
|
||||
case '0':
|
||||
// 区级, 灰色
|
||||
return 'info';
|
||||
case '3':
|
||||
// 国家级 红色
|
||||
return 'danger';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,308 @@
|
|||
<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="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目创建时间" prop="createTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.createTime"
|
||||
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:project: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:project: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:project: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:project:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目名称" align="center" prop="name" />
|
||||
<el-table-column label="项目创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="handleUpdate(scope.row)"
|
||||
v-hasPermi="['scientific:project:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['scientific:project: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改科研管理对话框 -->
|
||||
<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="name">
|
||||
<el-input v-model="form.name" placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类别" prop="category">
|
||||
<el-input v-model="form.category" placeholder="请输入项目类别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目创建时间" prop="createTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.createTime"
|
||||
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 { listProject, getProject, delProject, addProject, updateProject } from "@/api/scientific/project";
|
||||
|
||||
export default {
|
||||
name: "Project",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 科研管理表格数据
|
||||
projectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
handbookId: undefined,
|
||||
category: undefined,
|
||||
name: undefined,
|
||||
createTime: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
projectId: [
|
||||
{ required: true, message: "项目id不能为空", trigger: "blur" }
|
||||
],
|
||||
handbookId: [
|
||||
{ required: true, message: "指南id不能为空", trigger: "blur" }
|
||||
],
|
||||
category: [
|
||||
{ required: true, message: "项目类别不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "项目名称不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
handbookName: undefined,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询科研管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.handbookId = this.$route.query && this.$route.query.handbookId;
|
||||
this.handbookName = this.$route.query && this.$route.query.handbookname;
|
||||
|
||||
listProject(this.queryParams).then(response => {
|
||||
this.projectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
handbookId: undefined,
|
||||
category: undefined,
|
||||
name: undefined,
|
||||
createTime: 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.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加科研管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getProject(id).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改科研管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.id != null) {
|
||||
updateProject(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addProject(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除科研管理编号为"' + ids + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delProject(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('scientific/project/export', {
|
||||
...this.queryParams
|
||||
}, `project_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -65,7 +65,7 @@ export default {
|
|||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.formData = res.data;
|
||||
this.formOpen = true
|
||||
this.formOpen = true;
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -72,11 +72,14 @@
|
|||
|
||||
|
||||
<el-table v-loading="loading" :data="showList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="指南名称" 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="申报信息名称" align="center" width="280px" :min-width="280">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.handbookname }}
|
||||
<el-tag size="medium">{{ scope.row.projectName }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布人" align="center" prop="directorName" />
|
||||
<el-table-column label="指南类别" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.handbookclass }}
|
||||
|
@ -87,20 +90,38 @@
|
|||
{{ scope.row.handbooklevel }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="截至日期" align="center">
|
||||
<el-table-column label="申报结束日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.handbookdate }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="指南文件" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button class="file" @click="handbookDownload(scope.row.handbookfile)">下载</el-button>
|
||||
<el-button class="file"
|
||||
type="text"
|
||||
icon="el-icon-download"
|
||||
@click="handbookDownload(scope.row.handbookfile)"
|
||||
>下载</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="项目申报" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button class="file" @click="projectApply(scope.row)">项目申报</el-button>
|
||||
<el-button class="file"
|
||||
type="text"
|
||||
icon="el-icon-top"
|
||||
@click="projectApply(scope.row)"
|
||||
>进入申报</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button class="file"
|
||||
type="text"
|
||||
icon="el-icon-folder-checked"
|
||||
@click="listProject(scope.row)"
|
||||
>已申报项目</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -121,14 +142,13 @@ import {
|
|||
stopProcess,
|
||||
delProcess,
|
||||
listHandbook,
|
||||
detailProcess,
|
||||
detailProcesses,
|
||||
listProcess
|
||||
} from '@/api/workflow/process';
|
||||
import { listAllCategory } from '@/api/workflow/category';
|
||||
import Parser from '@/utils/generator/parser'
|
||||
import {getToken} from "@/utils/auth";
|
||||
// import {deepClone} from "@/utils";
|
||||
import {listProject} from "@/api/scientific/project";
|
||||
|
||||
export default {
|
||||
name: "handbookQuery",
|
||||
|
@ -210,22 +230,36 @@ export default {
|
|||
const apply = response.rows[0];
|
||||
if(apply) {
|
||||
this.$router.push({
|
||||
path: '/workflow/process/start/' + apply.deploymentId,
|
||||
path: '/scientific/projectApply/' + apply.deploymentId,
|
||||
query: {
|
||||
definitionId: apply.definitionId,
|
||||
processName: apply.processName,
|
||||
processName: row.handbookname,
|
||||
handbookId: row.procInsId,
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
listProject(row) {
|
||||
if(row.procInsId) {
|
||||
this.$router.push({
|
||||
path: '/scientific/handbookProjectQuery/' + row.procInsId,
|
||||
query: {
|
||||
processName: row.handbookname,
|
||||
handbookId: row.procInsId,
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/** 查询流程定义列表 */
|
||||
getList() {
|
||||
// zqjia:这个解析要模仿parser.js重写
|
||||
return new Promise((resolve,reject)=>{
|
||||
this.showList = [];
|
||||
this.loading = true;
|
||||
// 先列出所有的指南流程
|
||||
listHandbook(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.handbookList = response.rows;
|
||||
this.total = response.total;
|
||||
|
@ -249,9 +283,9 @@ export default {
|
|||
res.rows.forEach(row => {
|
||||
let processForm = row.processFormList[0];
|
||||
let formData = [];
|
||||
this.initFormData(processForm.fields, formData);
|
||||
formData["procDefId"] = row.procInsId;
|
||||
|
||||
// 从原始表单中筛选解析的数据显示
|
||||
this.parseFormData(processForm.fields, formData);
|
||||
formData["procInsId"] = row.procInsId;
|
||||
this.showList.push(formData);
|
||||
})
|
||||
})
|
||||
|
@ -262,9 +296,11 @@ export default {
|
|||
getCategoryList() {
|
||||
listAllCategory().then(response => this.categoryOptions = response.data)
|
||||
},
|
||||
|
||||
|
||||
initFormData(componentList, formData) {
|
||||
/**
|
||||
* 从原始的流程表单中解析字段数据
|
||||
* @author zqjia
|
||||
*/
|
||||
parseFormData(componentList, formData) {
|
||||
componentList.forEach(cur => {
|
||||
this.buildOptionMethod(cur)
|
||||
const config = cur.__config__;
|
||||
|
@ -275,14 +311,11 @@ export default {
|
|||
else {
|
||||
formData[cur.__vModel__] = config.defaultValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (config.children) {
|
||||
this.initFormData(config.children, formData);
|
||||
this.parseFormData(config.children, formData);
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
// 特殊处理的 Option
|
||||
|
|
|
@ -1,472 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="流程标识" prop="processKey">
|
||||
<el-input
|
||||
v-model="queryParams.processKey"
|
||||
placeholder="请输入流程标识"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程名称" prop="processName">
|
||||
<el-input
|
||||
v-model="queryParams.processName"
|
||||
placeholder="请输入流程名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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-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="handbookList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="流程编号" align="center" prop="procInsId" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="指南名称" align="center" prop="procDefName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="流程类别" align="center" prop="category" :formatter="categoryFormat" />
|
||||
<el-table-column label="流程版本" align="center" width="80px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" >v{{ scope.row.procDefVersion }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="当前节点" align="center" prop="taskName"/>
|
||||
<el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
|
||||
<el-table-column label="流程状态" align="center" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wf_process_status" :value="scope.row.processStatus"/>
|
||||
</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">
|
||||
<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"
|
||||
v-hasPermi="['workflow:process:start']"
|
||||
@click="handleAgain(scope.row)"
|
||||
>重新发起</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
|
||||
<el-table v-loading="loading" :data="showList" @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">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[0] }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column label="指南名称" align="center" width="180px" :min-width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">{{ scope.row[0] }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="指南类别" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[1] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="指南级别" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[2] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="截至日期" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row[3] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="指南文件" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button class="file" @click="handbookDownload(scope.row[5])" style="color: #1890ff;">
|
||||
<i class="el-icon-download"></i> {{ scope.row[4] }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-tickets"
|
||||
@click="handleFlowDetails(scope.row[5])"
|
||||
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"
|
||||
v-hasPermi="['workflow:process:start']"
|
||||
@click="handleAgain(scope.row)"
|
||||
>重新发起</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"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {stopProcess, delProcess, listHandbook, detailProcess} from '@/api/workflow/process';
|
||||
import { listAllCategory } from '@/api/workflow/category';
|
||||
import Parser from '@/utils/generator/parser'
|
||||
import {getToken} from "@/utils/auth";
|
||||
// import {deepClone} from "@/utils";
|
||||
|
||||
export default {
|
||||
name: "Own",
|
||||
dicts: ['wf_process_status'],
|
||||
components: {
|
||||
Parser,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
processLoading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
categoryOptions: [],
|
||||
processTotal:0,
|
||||
// 我发起的流程列表数据
|
||||
handbookList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
src: "",
|
||||
definitionList:[],
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
processKey: undefined,
|
||||
processName: undefined,
|
||||
category: "007"
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
|
||||
processFormList: [], // 流程变量数据
|
||||
showList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getCategoryList();
|
||||
},
|
||||
beforeRouteEnter(to, from, next) {
|
||||
next(vm => {
|
||||
vm.getList()
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
// 文件下载
|
||||
handbookDownload(ossId) {
|
||||
this.$download.oss(ossId)
|
||||
},
|
||||
|
||||
// 流程任务重获取变量表单
|
||||
getProcessDetails(procInsId, taskId) {
|
||||
const params = {procInsId: procInsId, taskId: taskId}
|
||||
detailProcess(params).then(res => {
|
||||
const data = res.data;
|
||||
const formList = data.processFormList;
|
||||
formList.forEach(form => {
|
||||
var dataShow = [];
|
||||
const fields = form.fields;
|
||||
|
||||
// zqjia:fields对应的是提交表单的各项数据,不同的序号对应不同的类型,分开处理
|
||||
for (var i = 0; i < fields.length; i++) {
|
||||
const tmp = fields[i];
|
||||
const slot = tmp.__slot__;
|
||||
const config = tmp.__config__;
|
||||
if (i === 4 && config.defaultValue) {
|
||||
tmp['file-list'] = config.defaultValue;
|
||||
tmp['headers'] = {
|
||||
Authorization: "Bearer " + getToken(),
|
||||
}
|
||||
|
||||
// tmp['on-success'] = (res, file, fileList) => {
|
||||
// if (res.code === 200 && fileList) {
|
||||
// config.defaultValue = fileList;
|
||||
// fileList.forEach(val =>{
|
||||
// val.url = val.response.data.url;
|
||||
// val.ossId = val.response.data.ossId;
|
||||
// })
|
||||
// }
|
||||
// };
|
||||
|
||||
// zqjia:点击文件列表中文件的ossId,现在假设只有一个文件
|
||||
dataShow.push(config.defaultValue[0].name);
|
||||
dataShow.push(config.defaultValue[0].ossId);
|
||||
dataShow.push(procInsId);
|
||||
}
|
||||
else {
|
||||
if (slot !== undefined && slot.options !== undefined) {
|
||||
dataShow.push(slot.options[config.defaultValue - 1].label);
|
||||
}
|
||||
else {
|
||||
dataShow.push(config.defaultValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.showList.push(dataShow);
|
||||
});
|
||||
// zqjia:存储了原始表单数据,暂时未用到
|
||||
this.processFormList.push(data.processFormList);
|
||||
})
|
||||
},
|
||||
|
||||
/** 查询流程分类列表 */
|
||||
getCategoryList() {
|
||||
listAllCategory().then(response => this.categoryOptions = response.data)
|
||||
},
|
||||
/** 查询流程定义列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listHandbook(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.handbookList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
this.handbookList.forEach(handbook => {
|
||||
this.getProcessDetails(handbook.procInsId, undefined);
|
||||
});
|
||||
});
|
||||
// console.log(this.showList);
|
||||
console.log(this.processFormList);
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
category: null,
|
||||
key: null,
|
||||
tenantId: null,
|
||||
deployTime: null,
|
||||
derivedFrom: null,
|
||||
derivedFromRoot: null,
|
||||
parentDeploymentId: null,
|
||||
engineVersion: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
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/start/' + row.deployId,
|
||||
query: {
|
||||
definitionId: row.procDefId,
|
||||
procInsId: row.procInsId
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 取消流程申请 */
|
||||
handleStop(row){
|
||||
const params = {
|
||||
procInsId: row.procInsId
|
||||
}
|
||||
stopProcess(params).then( res => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 流程流转记录 */
|
||||
handleFlowRecord(row) {
|
||||
this.$router.push({
|
||||
path: '/workflow/process/detail/' + row.procInsId,
|
||||
query: {
|
||||
processed: false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleFlowDetails(procInsId) {
|
||||
this.$router.push({
|
||||
path: '/workflow/process/detail/' + procInsId,
|
||||
query: {
|
||||
processed: false
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
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 ?? '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.file {
|
||||
border: none;
|
||||
background: none;
|
||||
/* 取消其他默认样式 */
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.file:hover {
|
||||
background: none; /* 去掉鼠标悬停时的背景 */
|
||||
/* 如果需要,可以添加其他hover效果 */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,339 @@
|
|||
<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="项目id" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
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="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目创建时间" prop="createTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.createTime"
|
||||
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:project: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:project: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:project: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:project:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="项目id" align="center" prop="projectId" />
|
||||
<el-table-column label="指南id" align="center" prop="handbookId" />
|
||||
<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">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="handleUpdate(scope.row)"
|
||||
v-hasPermi="['scientific:project:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['scientific:project: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改科研管理对话框 -->
|
||||
<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="项目id" prop="projectId">
|
||||
<el-input v-model="form.projectId" placeholder="请输入项目id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="指南id" prop="handbookId">
|
||||
<el-input v-model="form.handbookId" placeholder="请输入指南id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目类别" prop="category">
|
||||
<el-input v-model="form.category" placeholder="请输入项目类别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入项目名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目创建时间" prop="createTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.createTime"
|
||||
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 { listProject, getProject, delProject, addProject, updateProject } from "@/api/scientific/project";
|
||||
|
||||
export default {
|
||||
name: "Project",
|
||||
data() {
|
||||
return {
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 科研管理表格数据
|
||||
projectList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
handbookId: undefined,
|
||||
category: undefined,
|
||||
name: undefined,
|
||||
createTime: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
projectId: [
|
||||
{ required: true, message: "项目id不能为空", trigger: "blur" }
|
||||
],
|
||||
handbookId: [
|
||||
{ required: true, message: "指南id不能为空", trigger: "blur" }
|
||||
],
|
||||
category: [
|
||||
{ required: true, message: "项目类别不能为空", trigger: "blur" }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: "项目名称不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询科研管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listProject(this.queryParams).then(response => {
|
||||
this.projectList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
projectId: undefined,
|
||||
handbookId: undefined,
|
||||
category: undefined,
|
||||
name: undefined,
|
||||
createTime: 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.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加科研管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getProject(id).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改科研管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.id != null) {
|
||||
updateProject(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addProject(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除科研管理编号为"' + ids + '"的数据项?').then(() => {
|
||||
this.loading = true;
|
||||
return delProject(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('scientific/project/export', {
|
||||
...this.queryParams
|
||||
}, `project_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
|
@ -15,10 +15,9 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { listProcess} from "@/api/workflow/process";
|
||||
import { listAllCategory } from '@/api/workflow/category'
|
||||
import { getProcessForm, startProcess } from '@/api/workflow/process'
|
||||
import { getProcessForm, startProcess_ } from '@/api/workflow/process'
|
||||
import Parser from '@/utils/generator/parser'
|
||||
import {addProject} from "@/api/scientific/project";
|
||||
|
||||
export default {
|
||||
name: 'WorkStart',
|
||||
|
@ -33,18 +32,7 @@ export default {
|
|||
formOpen: false,
|
||||
formData: {},
|
||||
|
||||
processName: '',
|
||||
categoryOptions: [],
|
||||
// 流程定义表格数据
|
||||
processParams: null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
processKey: undefined,
|
||||
processName: "项目指南录入",
|
||||
category: "007"
|
||||
},
|
||||
processName: null,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -52,25 +40,23 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
initData() {
|
||||
/** 查询流程定义列表 */
|
||||
listProcess(this.queryParams).then(response => {
|
||||
this.processParams = response.rows[0];
|
||||
this.processName = this.processParams.processName;
|
||||
this.definitionId = this.processParams.definitionId;
|
||||
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.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: this.procInsId
|
||||
}).then(res => {
|
||||
if (res.data) {
|
||||
this.formData = res.data;
|
||||
this.formOpen = true
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/** 接收子组件传的值 */
|
||||
getData(data) {
|
||||
if (data) {
|
||||
|
@ -96,8 +82,21 @@ export default {
|
|||
submit(data) {
|
||||
if (data && this.definitionId) {
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
startProcess(this.definitionId, JSON.stringify(data.valData)).then(res => {
|
||||
this.$modal.msgSuccess(res.msg);
|
||||
// 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'
|
||||
})
|
|
@ -140,8 +140,8 @@
|
|||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="用户系统编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
|
||||
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="用户名(登录账号)" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="姓名(昵称)" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||
|
|
|
@ -189,8 +189,8 @@ export default {
|
|||
processKey: undefined,
|
||||
processName: undefined,
|
||||
category: undefined,
|
||||
detailTitleName: 'field101',
|
||||
detailDirectorName: 'field102'
|
||||
detailTitleName: 'projectName',
|
||||
detailDirectorName: 'directorName'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -272,9 +272,8 @@ export default {
|
|||
},
|
||||
|
||||
handleProcessStart(row) {
|
||||
const deploymentId = 'b1531b69-3eae-11ef-97ad-106fd9c7c7b5'; // 假设 row 中的 deploymentId 是常量
|
||||
const definitionId = 'Process_1720608606342:1:b161c16c-3eae-11ef-97ad-106fd9c7c7b5'; // 假设 row 中的 definitionId 是常量
|
||||
|
||||
const deploymentId = '0ab3017f-428d-11ef-99ce-106fd9c7c7b5'; // 假设 row 中的 deploymentId 是常量
|
||||
const definitionId = 'Process_1720608606342:2:0afd50f2-428d-11ef-99ce-106fd9c7c7b5'; // 假设 row 中的 definitionId 是常量
|
||||
this.$router.push({
|
||||
path: `/workflow/process/start/${deploymentId}?definitionId=${definitionId}`,
|
||||
});
|
||||
|
|
|
@ -254,7 +254,7 @@ export default {
|
|||
},
|
||||
handleAgain(row) {
|
||||
this.$router.push({
|
||||
path: '/workflow/process/start/' + row.deployId,
|
||||
path: '/workflow/process/update/' + row.deployId,
|
||||
query: {
|
||||
definitionId: row.procDefId,
|
||||
procInsId: row.procInsId
|
||||
|
|
|
@ -74,13 +74,13 @@
|
|||
<el-table v-loading="loading" :data="ownProcessList" @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" width="280px" :min-width="280">
|
||||
<el-table-column label="项目名称" align="center" width="280px" :min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium">{{ scope.row.processTitle }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="项目负责人" align="center" prop="director" width="140"/>
|
||||
<el-table-column label="计划(基金)中文名称" align="center" width="200px">
|
||||
<el-table-column label="审批类型" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" >{{ scope.row.procDefName }}</el-tag>
|
||||
</template>
|
||||
|
@ -181,8 +181,8 @@ export default {
|
|||
processKey: undefined,
|
||||
processName: undefined,
|
||||
category: undefined,
|
||||
detailTitleName: 'field101',
|
||||
detailDirectorName: 'field102'
|
||||
detailTitleName: 'projectName',
|
||||
detailDirectorName: 'directorName'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -208,7 +208,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true;
|
||||
listOwnInfoProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.ownProcessList = response.rows.filter(item => item.category === '002');
|
||||
this.ownProcessList = response.rows;
|
||||
//this.ownProcessList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
|
|
@ -73,31 +73,28 @@
|
|||
|
||||
<el-table v-loading="loading" :data="ownProcessList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" width="50"/>
|
||||
<el-table-column label="项目计划名" align="center" :min-width="260" width="auto">
|
||||
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="项目申报名" align="center" width="280px" :min-width="280">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" >{{ scope.row.processTitle }}</el-tag>
|
||||
<el-tag size="medium">{{ scope.row.processTitle }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核类型" align="center" prop="procDefName" :min-width="140" width="auto"/>
|
||||
|
||||
<el-table-column label="审批类别" align="center" prop="category" :formatter="categoryFormat" width="140"/>
|
||||
<el-table-column label="提交时间" align="center" prop="createTime" width="180"/>
|
||||
<el-table-column label="项目负责人" align="center" prop="director" width="140"/>
|
||||
<el-table-column label="计划(基金)中文名称" align="center" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="medium" >{{ scope.row.procDefName }}</el-tag>
|
||||
</template>
|
||||
</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" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.wf_process_status" :value="scope.row.processStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耗时" align="center" prop="duration" width="160"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="280">
|
||||
<!-- <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-top"
|
||||
@click="handleProcessStart(scope.row)"
|
||||
v-hasPermi="['workflow:process:query']"
|
||||
>项目申报</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
|
@ -105,6 +102,14 @@
|
|||
@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"
|
||||
|
@ -175,11 +180,9 @@ export default {
|
|||
pageSize: 10,
|
||||
processKey: undefined,
|
||||
processName: undefined,
|
||||
// 目录的筛选是通过目录code实现的
|
||||
// category: "006"
|
||||
category: undefined,
|
||||
detailTitleName: 'proj_plan_title',
|
||||
detailDirectorName: undefined
|
||||
detailTitleName: 'projectName',
|
||||
detailDirectorName: 'directorName'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
@ -205,7 +208,7 @@ export default {
|
|||
getList() {
|
||||
this.loading = true;
|
||||
listOwnInfoProcess(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||
this.ownProcessList = response.rows.filter(item => item.category === '006');
|
||||
this.ownProcessList = response.rows.filter(item => item.category === '002');
|
||||
//this.ownProcessList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
|
@ -270,7 +273,6 @@ export default {
|
|||
});
|
||||
},
|
||||
/** 流程流转记录 */
|
||||
// 这个地方相当于导航到了其他的页面获取详细信息
|
||||
handleFlowRecord(row) {
|
||||
this.$router.push({
|
||||
path: '/workflow/process/detail/' + row.procInsId,
|
||||
|
@ -279,15 +281,6 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
handleProcessStart(row) {
|
||||
const deploymentId = '7d553e9a-3e02-11ef-a576-106fd9c7c7b5'; // 假设 row 中的 deploymentId 是常量
|
||||
const definitionId = 'Process_1720536463039:1:7d67b52d-3e02-11ef-a576-106fd9c7c7b5'; // 假设 row 中的 definitionId 是常量
|
||||
|
||||
this.$router.push({
|
||||
path: `/workflow/process/start/${deploymentId}?definitionId=${definitionId}`,
|
||||
});
|
||||
},
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.procInsId || this.ids;
|
||||
|
@ -308,8 +301,6 @@ export default {
|
|||
...this.queryParams
|
||||
}, `wf_own_process_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
|
||||
// 因为流程信息返回的cateory是编码类型001这样,所以需要转换为其实际对应的含义
|
||||
categoryFormat(row, column) {
|
||||
return this.categoryOptions.find(k => k.code === row.category)?.categoryName ?? '';
|
||||
}
|
|
@ -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>
|
|
@ -42,7 +42,12 @@ export default {
|
|||
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;
|
||||
if(this.$route.query && this.$route.query.processName) {
|
||||
this.processName = this.$route.query && this.$route.query.processName;
|
||||
}
|
||||
else {
|
||||
this.processName = "发起流程";
|
||||
}
|
||||
|
||||
getProcessForm({
|
||||
definitionId: this.definitionId,
|
||||
|
|
|
@ -0,0 +1,119 @@
|
|||
<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, updateProcess } from '@/api/workflow/process'
|
||||
import Parser from '@/utils/generator/parser'
|
||||
|
||||
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;
|
||||
|
||||
// 如果能够从路由获得流程名字就赋值,否则就默认名字
|
||||
if(this.$route.query && this.$route.query.processName) {
|
||||
this.processName = this.$route.query && this.$route.query.processName;
|
||||
}
|
||||
else {
|
||||
this.processName = "更新流程";
|
||||
}
|
||||
|
||||
// 获取流程的动态表单
|
||||
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 {
|
||||
// 如果是单个信息,直接得到defaultValue
|
||||
variableData.val = item.__config__.defaultValue
|
||||
}
|
||||
variables.push(variableData)
|
||||
})
|
||||
this.variables = variables;
|
||||
}
|
||||
},
|
||||
submit(data) {
|
||||
if (data && this.definitionId) {
|
||||
// 启动流程并将表单数据加入流程变量
|
||||
console.log("submit");
|
||||
console.log(data.valData);
|
||||
updateProcess(this.procInsId, 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>
|
|
@ -0,0 +1,49 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi-flowable-plus</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>0.8.3</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>scientific</artifactId>
|
||||
|
||||
<description>
|
||||
scientific模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-sms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-flowable</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 短信 用哪个导入哪个依赖 -->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.aliyun</groupId>-->
|
||||
<!-- <artifactId>dysmsapi20170525</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.tencentcloudapi</groupId>-->
|
||||
<!-- <artifactId>tencentcloud-sdk-java-sms</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,108 @@
|
|||
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));
|
||||
}
|
||||
}
|
|
@ -1,9 +1,10 @@
|
|||
package com.ruoyi.project.controller;
|
||||
package com.ruoyi.scientific.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import com.ruoyi.scientific.domain.bo.FundsReceivedBo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -20,21 +21,21 @@ 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.project.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.project.domain.bo.ProjectApplicationBo;
|
||||
import com.ruoyi.project.service.IProjectApplicationService;
|
||||
import com.ruoyi.scientific.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.scientific.domain.bo.ProjectApplicationBo;
|
||||
import com.ruoyi.scientific.service.IProjectApplicationService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目申报
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
* @date 2024-07-18
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/project/application")
|
||||
@RequestMapping("/scientific/application")
|
||||
public class ProjectApplicationController extends BaseController {
|
||||
|
||||
private final IProjectApplicationService iProjectApplicationService;
|
||||
|
@ -42,7 +43,7 @@ public class ProjectApplicationController extends BaseController {
|
|||
/**
|
||||
* 查询项目申报列表
|
||||
*/
|
||||
@SaCheckPermission("project:application:list")
|
||||
@SaCheckPermission("scientific:application:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ProjectApplicationVo> list(ProjectApplicationBo bo, PageQuery pageQuery) {
|
||||
return iProjectApplicationService.queryPageList(bo, pageQuery);
|
||||
|
@ -51,7 +52,7 @@ public class ProjectApplicationController extends BaseController {
|
|||
/**
|
||||
* 导出项目申报列表
|
||||
*/
|
||||
@SaCheckPermission("project:application:export")
|
||||
@SaCheckPermission("scientific:application:export")
|
||||
@Log(title = "项目申报", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ProjectApplicationBo bo, HttpServletResponse response) {
|
||||
|
@ -64,7 +65,7 @@ public class ProjectApplicationController extends BaseController {
|
|||
*
|
||||
* @param projectId 主键
|
||||
*/
|
||||
@SaCheckPermission("project:application:query")
|
||||
@SaCheckPermission("scientific:application:query")
|
||||
@GetMapping("/{projectId}")
|
||||
public R<ProjectApplicationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long projectId) {
|
||||
|
@ -74,7 +75,7 @@ public class ProjectApplicationController extends BaseController {
|
|||
/**
|
||||
* 新增项目申报
|
||||
*/
|
||||
@SaCheckPermission("project:application:add")
|
||||
@SaCheckPermission("scientific:application:add")
|
||||
@Log(title = "项目申报", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
|
@ -85,7 +86,7 @@ public class ProjectApplicationController extends BaseController {
|
|||
/**
|
||||
* 修改项目申报
|
||||
*/
|
||||
@SaCheckPermission("project:application:edit")
|
||||
@SaCheckPermission("scientific:application:edit")
|
||||
@Log(title = "项目申报", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
|
@ -93,12 +94,34 @@ public class ProjectApplicationController extends BaseController {
|
|||
return toAjax(iProjectApplicationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改项项目预算审批
|
||||
*/
|
||||
@SaCheckPermission("scientific:application:edit")
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/updateBudgetProc")
|
||||
public R<Void> updateBudgetProc(@Validated(EditGroup.class) @RequestBody ProjectApplicationBo bo) {
|
||||
return toAjax(iProjectApplicationService.updateBudgetProc(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项项目预算审批
|
||||
*/
|
||||
@SaCheckPermission("scientific:application:edit")
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/confirmFunds")
|
||||
public R<Void> confirmFundsReceivedById(@Validated(EditGroup.class) @RequestBody FundsReceivedBo bo) {
|
||||
iProjectApplicationService.confirmFundsReceivedById(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目申报
|
||||
*
|
||||
* @param projectIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("project:application:remove")
|
||||
@SaCheckPermission("scientific:application:remove")
|
||||
@Log(title = "项目申报", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{projectIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
|
@ -0,0 +1,108 @@
|
|||
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.ProjectHandbookVo;
|
||||
import com.ruoyi.scientific.domain.bo.ProjectHandbookBo;
|
||||
import com.ruoyi.scientific.service.IProjectHandbookService;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 项目申报v2
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/scientific/handbook")
|
||||
public class ProjectHandbookController extends BaseController {
|
||||
|
||||
private final IProjectHandbookService iProjectHandbookService;
|
||||
|
||||
/**
|
||||
* 查询项目申报v2列表
|
||||
*/
|
||||
@SaCheckPermission("scientific:handbook:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<ProjectHandbookVo> list(ProjectHandbookBo bo, PageQuery pageQuery) {
|
||||
return iProjectHandbookService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出项目申报v2列表
|
||||
*/
|
||||
@SaCheckPermission("scientific:handbook:export")
|
||||
@Log(title = "项目申报v2", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(ProjectHandbookBo bo, HttpServletResponse response) {
|
||||
List<ProjectHandbookVo> list = iProjectHandbookService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "项目申报v2", ProjectHandbookVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取项目申报v2详细信息
|
||||
*
|
||||
* @param handbookId 主键
|
||||
*/
|
||||
@SaCheckPermission("scientific:handbook:query")
|
||||
@GetMapping("/{handbookId}")
|
||||
public R<ProjectHandbookVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long handbookId) {
|
||||
return R.ok(iProjectHandbookService.queryById(handbookId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目申报v2
|
||||
*/
|
||||
@SaCheckPermission("scientific:handbook:add")
|
||||
@Log(title = "项目申报v2", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody ProjectHandbookBo bo) {
|
||||
return toAjax(iProjectHandbookService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目申报v2
|
||||
*/
|
||||
@SaCheckPermission("scientific:handbook:edit")
|
||||
@Log(title = "项目申报v2", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ProjectHandbookBo bo) {
|
||||
return toAjax(iProjectHandbookService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除项目申报v2
|
||||
*
|
||||
* @param handbookIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("scientific:handbook:remove")
|
||||
@Log(title = "项目申报v2", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{handbookIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] handbookIds) {
|
||||
return toAjax(iProjectHandbookService.deleteWithValidByIds(Arrays.asList(handbookIds), true));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.project.domain;
|
||||
package com.ruoyi.scientific.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
|
@ -15,7 +15,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* 项目申报对象 project_application
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
* @date 2024-07-18
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
|
@ -37,6 +37,18 @@ public class ProjectApplication extends BaseEntity {
|
|||
* 状态(0正常 1停用)
|
||||
*/
|
||||
private String projectStatus;
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
private String projectAppProcId;
|
||||
/**
|
||||
* 项目申报状态(0 未申报 2申报中 3已申报 4 申报失败)
|
||||
*/
|
||||
private String projectDeclareStatus;
|
||||
/**
|
||||
* 项目立项状态(0未立项 2审核中 3已立项)
|
||||
*/
|
||||
private String projectAppStaus;
|
||||
/**
|
||||
* 申报开始日期
|
||||
*/
|
||||
|
@ -58,4 +70,13 @@ public class ProjectApplication extends BaseEntity {
|
|||
*/
|
||||
private String projectLeaderPhone;
|
||||
|
||||
/**
|
||||
* 项目到账情况 0:未到账 1:已到账
|
||||
*/
|
||||
private String projectFundsReceived;
|
||||
|
||||
/**
|
||||
* 项目到账情况备注说明
|
||||
*/
|
||||
private String projectFundsRemark;
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
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 java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目申报v2对象 project_handbook
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("project_handbook")
|
||||
public class ProjectHandbook extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID=1L;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@TableId(value = "handbook_id")
|
||||
private Long handbookId;
|
||||
/**
|
||||
* 申报信息名称
|
||||
*/
|
||||
private String handbookName;
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
private String handbookProcId;
|
||||
/**
|
||||
* 项目审核状态(0未审核 1审核中 3审核通过)
|
||||
*/
|
||||
private String handbookStatus;
|
||||
/**
|
||||
* 项目指南类型(0 科技计划 1 研发计划)
|
||||
*/
|
||||
private String handbookType;
|
||||
/**
|
||||
* 项目指南级别(0市级 1区级 3省级 4国家级)
|
||||
*/
|
||||
private String handbookLevel;
|
||||
/**
|
||||
* 申报状态(0 停止申报 1 申报中)
|
||||
*/
|
||||
private String declareStatus;
|
||||
/**
|
||||
* 申报开始日期
|
||||
*/
|
||||
private Date projectAppStTime;
|
||||
/**
|
||||
* 申报结束日期
|
||||
*/
|
||||
private Date projectAppEndTime;
|
||||
/**
|
||||
* 指南负责人
|
||||
*/
|
||||
private String handbookLeader;
|
||||
/**
|
||||
* 指南负责人电话
|
||||
*/
|
||||
private String projectLeaderPhone;
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
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,32 @@
|
|||
package com.ruoyi.scientific.domain.bo;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 项目到账信息结构体, 用于财务更新项目的到账情况
|
||||
* @author zhanli
|
||||
*/
|
||||
@Data
|
||||
public class FundsReceivedBo {
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotNull(message = "项目ID不能为空", groups = { EditGroup.class })
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 项目到账状态 0: 未到账 1: 已到账
|
||||
*/
|
||||
@NotBlank(message = "到账情况不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String projectFundsReceived;
|
||||
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
@NotBlank(message = "请填写项目到账备注说明", groups = { AddGroup.class, EditGroup.class })
|
||||
private String projectFundsRemark;
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package com.ruoyi.project.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.EditGroup;
|
||||
import lombok.Data;
|
||||
|
@ -16,7 +17,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
|||
* 项目申报业务对象 project_application
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
* @date 2024-07-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
|
@ -42,6 +43,22 @@ public class ProjectApplicationBo extends BaseEntity {
|
|||
@NotBlank(message = "状态(0正常 1停用)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String projectStatus;
|
||||
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
private String projectAppProcId;
|
||||
|
||||
/**
|
||||
* 项目立项状态(0未立项 2审核中 3已立项)
|
||||
*/
|
||||
private String projectAppStaus;
|
||||
|
||||
|
||||
/**
|
||||
* 项目申报状态(0 未申报 2申报中 3已申报 4 申报失败)
|
||||
*/
|
||||
private String projectDeclareStatus;
|
||||
|
||||
/**
|
||||
* 申报开始日期
|
||||
*/
|
||||
|
@ -72,5 +89,13 @@ public class ProjectApplicationBo extends BaseEntity {
|
|||
@NotBlank(message = "项目负责人联系电话不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String projectLeaderPhone;
|
||||
|
||||
/**
|
||||
* 项目到账情况 0:未到账 1:已到账
|
||||
*/
|
||||
private String projectFundsReceived;
|
||||
|
||||
/**
|
||||
* 项目到账情况备注说明
|
||||
*/
|
||||
private String projectFundsRemark;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.scientific.domain.bo;
|
||||
|
||||
public class ProjectBaseBo {
|
||||
/**
|
||||
* 项目未立项常量
|
||||
*/
|
||||
public static String PROJECT_NO_INIT = "0";
|
||||
/**
|
||||
* 项目审核中
|
||||
*/
|
||||
public static String PROJECT_REVIEWING = "1";
|
||||
|
||||
/**
|
||||
* 项目已立项
|
||||
*/
|
||||
public static String PROJECT_INIT = "2";
|
||||
|
||||
/**
|
||||
* 项目未申报
|
||||
*/
|
||||
public static String PROJECT_NO_DECLARE = "0";
|
||||
|
||||
/**
|
||||
* 项目经费未到账
|
||||
*/
|
||||
public static String PROJECT_FUNDS_NO_RECEIVED = "0";
|
||||
|
||||
/**
|
||||
* 项目经费到账
|
||||
*/
|
||||
public static String PROJECT_FUNDS_RECEIVED = "1";
|
||||
|
||||
/**
|
||||
* 项目经费到账备注
|
||||
*/
|
||||
public static String PROJECT_FUNDS_NO_RECEIVED_REMARK = "暂无";
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
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 java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 项目申报v2业务对象 project_handbook
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ProjectHandbookBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@NotNull(message = "项目ID不能为空", groups = { EditGroup.class })
|
||||
private Long handbookId;
|
||||
|
||||
/**
|
||||
* 申报信息名称
|
||||
*/
|
||||
@NotBlank(message = "申报信息名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String handbookName;
|
||||
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
@NotBlank(message = "项目立项流程实例Id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String handbookProcId;
|
||||
|
||||
/**
|
||||
* 项目审核状态(0未审核 1审核中 3审核通过)
|
||||
*/
|
||||
@NotBlank(message = "项目审核状态(0未审核 1审核中 3审核通过)不能为空", 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;
|
||||
|
||||
/**
|
||||
* 申报状态(0 停止申报 1 申报中)
|
||||
*/
|
||||
@NotBlank(message = "申报状态(0 停止申报 1 申报中)不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String declareStatus;
|
||||
|
||||
/**
|
||||
* 申报开始日期
|
||||
*/
|
||||
@NotNull(message = "申报开始日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date projectAppStTime;
|
||||
|
||||
/**
|
||||
* 申报结束日期
|
||||
*/
|
||||
@NotNull(message = "申报结束日期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Date projectAppEndTime;
|
||||
|
||||
/**
|
||||
* 指南负责人
|
||||
*/
|
||||
@NotBlank(message = "指南负责人不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String handbookLeader;
|
||||
|
||||
/**
|
||||
* 指南负责人电话
|
||||
*/
|
||||
@NotBlank(message = "指南负责人电话不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String projectLeaderPhone;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.ruoyi.scientific.domain.bo;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UpdateBudgetBo {
|
||||
/**
|
||||
* 项目ID,不能为空
|
||||
*/
|
||||
private Long projectId;
|
||||
|
||||
private Long projectOldBudget;
|
||||
|
||||
private Long projectNewBudget;
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
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<>();
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.project.domain.vo;
|
||||
package com.ruoyi.scientific.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
@ -42,6 +42,22 @@ public class ProjectApplicationVo {
|
|||
@ExcelDictFormat(readConverterExp = "0=正常,1=停用")
|
||||
private String projectStatus;
|
||||
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
private String projectAppProcId;
|
||||
|
||||
/**
|
||||
* 项目立项状态(0未立项 2审核中 3已立项 4 立项失败)
|
||||
*/
|
||||
private String projectAppStaus;
|
||||
|
||||
|
||||
/**
|
||||
* 项目申报状态(0 未申报 2申报中 3已申报 4 申报失败)
|
||||
*/
|
||||
private String projectDeclareStatus;
|
||||
|
||||
/**
|
||||
* 申报开始日期
|
||||
*/
|
||||
|
@ -72,5 +88,15 @@ public class ProjectApplicationVo {
|
|||
@ExcelProperty(value = "项目负责人联系电话")
|
||||
private String projectLeaderPhone;
|
||||
|
||||
/**
|
||||
* 项目到账情况 0:未到账 1:已到账
|
||||
*/
|
||||
@ExcelProperty(value = "项目到账情况 0:未到账 1:已到账")
|
||||
private String projectFundsReceived;
|
||||
|
||||
/**
|
||||
* 项目到账情况备注说明
|
||||
*/
|
||||
@ExcelProperty(value = "到账情况备注说明")
|
||||
private String projectFundsRemark;
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
package com.ruoyi.scientific.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 项目申报v2视图对象 project_handbook
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class ProjectHandbookVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 项目ID
|
||||
*/
|
||||
@ExcelProperty(value = "项目ID")
|
||||
private Long handbookId;
|
||||
|
||||
/**
|
||||
* 申报信息名称
|
||||
*/
|
||||
@ExcelProperty(value = "申报信息名称")
|
||||
private String handbookName;
|
||||
|
||||
/**
|
||||
* 项目立项流程实例Id
|
||||
*/
|
||||
@ExcelProperty(value = "项目立项流程实例Id")
|
||||
private String handbookProcId;
|
||||
|
||||
/**
|
||||
* 项目审核状态(0未审核 1审核中 3审核通过)
|
||||
*/
|
||||
@ExcelProperty(value = "项目审核状态(0未审核 1审核中 3审核通过)")
|
||||
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;
|
||||
|
||||
/**
|
||||
* 申报状态(0 停止申报 1 申报中)
|
||||
*/
|
||||
@ExcelProperty(value = "申报状态(0 停止申报 1 申报中)")
|
||||
private String declareStatus;
|
||||
|
||||
/**
|
||||
* 申报开始日期
|
||||
*/
|
||||
@ExcelProperty(value = "申报开始日期")
|
||||
private Date projectAppStTime;
|
||||
|
||||
/**
|
||||
* 申报结束日期
|
||||
*/
|
||||
@ExcelProperty(value = "申报结束日期")
|
||||
private Date projectAppEndTime;
|
||||
|
||||
/**
|
||||
* 指南负责人
|
||||
*/
|
||||
@ExcelProperty(value = "指南负责人")
|
||||
private String handbookLeader;
|
||||
|
||||
/**
|
||||
* 指南负责人电话
|
||||
*/
|
||||
@ExcelProperty(value = "指南负责人电话")
|
||||
private String projectLeaderPhone;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package com.ruoyi.scientific.listener;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.scientific.service.IProjectApplicationService;
|
||||
import org.flowable.engine.delegate.DelegateExecution;
|
||||
import org.flowable.engine.delegate.ExecutionListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
|
||||
@Component
|
||||
public class BudgetUpdateTaskListener implements ExecutionListener {
|
||||
/**
|
||||
* 注入字段(名称与流程设计时字段名称一致)
|
||||
*/
|
||||
|
||||
private final IProjectApplicationService iProjectApplicationService =
|
||||
SpringUtils.getBean(IProjectApplicationService.class);
|
||||
|
||||
|
||||
@Override
|
||||
public void notify(DelegateExecution execution) {
|
||||
System.out.println("科研模块:执行任务监听器...");
|
||||
|
||||
String projectIdStr = (String) execution.getVariable("projectId");
|
||||
Long projectId = Long.parseLong(projectIdStr);
|
||||
|
||||
String projectBudget = (String) execution.getVariable("newBudget");
|
||||
Long budget = Long.parseLong(projectBudget);
|
||||
|
||||
iProjectApplicationService.updateBudgetInfoById(projectId, budget);
|
||||
|
||||
System.out.println("科研模块:项目Id:" + projectIdStr);
|
||||
System.out.println("科研模块:项目预算:" + projectBudget);
|
||||
// 调用其他模块的服务完成数据库的更新操作
|
||||
// Your Code
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
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> {
|
||||
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
package com.ruoyi.project.mapper;
|
||||
package com.ruoyi.scientific.mapper;
|
||||
|
||||
import com.ruoyi.project.domain.ProjectApplication;
|
||||
import com.ruoyi.project.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.scientific.domain.ProjectApplication;
|
||||
import com.ruoyi.scientific.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 项目申报Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
* @date 2024-07-18
|
||||
*/
|
||||
public interface ProjectApplicationMapper extends BaseMapperPlus<ProjectApplicationMapper, ProjectApplication, ProjectApplicationVo> {
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.ruoyi.scientific.mapper;
|
||||
|
||||
import com.ruoyi.scientific.domain.ProjectHandbook;
|
||||
import com.ruoyi.scientific.domain.vo.ProjectHandbookVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 项目申报v2Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
public interface ProjectHandbookMapper extends BaseMapperPlus<ProjectHandbookMapper, ProjectHandbook, ProjectHandbookVo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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,68 @@
|
|||
package com.ruoyi.scientific.service;
|
||||
|
||||
import com.ruoyi.scientific.domain.ProjectApplication;
|
||||
import com.ruoyi.scientific.domain.bo.FundsReceivedBo;
|
||||
import com.ruoyi.scientific.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.scientific.domain.bo.ProjectApplicationBo;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目申报Service接口
|
||||
*
|
||||
* @author zhanli
|
||||
* @date 2024-07-18
|
||||
*/
|
||||
public interface IProjectApplicationService {
|
||||
|
||||
/**
|
||||
* 查询项目申报
|
||||
*/
|
||||
ProjectApplicationVo queryById(Long projectId);
|
||||
|
||||
/**
|
||||
* 查询项目申报列表
|
||||
*/
|
||||
TableDataInfo<ProjectApplicationVo> queryPageList(ProjectApplicationBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询项目申报列表
|
||||
*/
|
||||
List<ProjectApplicationVo> queryList(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目申报
|
||||
*/
|
||||
Boolean insertByBo(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目申报
|
||||
*/
|
||||
Boolean updateByBo(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目预算审批流程
|
||||
*/
|
||||
Boolean updateBudgetProc(ProjectApplicationBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目申报信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 更新项目Id更新预算信息
|
||||
*/
|
||||
Boolean updateBudgetInfoById(Long projectId, Long newProjectBudget);
|
||||
|
||||
/**
|
||||
* 项目经费到账确认:项目经费到账情况(由财务根据实际情况进行填写)
|
||||
* @param fundsReceivedBo 项目到账情况描述类,包含项目Id,项目到账情况,项目到账备注
|
||||
* @author zhanli
|
||||
* TODO: 2024/7/24 前版本暂时没有加权限的限制以及人员的限制,后续需要加入
|
||||
*/
|
||||
Boolean confirmFundsReceivedById(FundsReceivedBo fundsReceivedBo);
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
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.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 IProjectHandbookService {
|
||||
|
||||
/**
|
||||
* 查询项目申报v2
|
||||
*/
|
||||
ProjectHandbookVo queryById(Long handbookId);
|
||||
|
||||
/**
|
||||
* 查询项目申报v2列表
|
||||
*/
|
||||
TableDataInfo<ProjectHandbookVo> queryPageList(ProjectHandbookBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询项目申报v2列表
|
||||
*/
|
||||
List<ProjectHandbookVo> queryList(ProjectHandbookBo bo);
|
||||
|
||||
/**
|
||||
* 新增项目申报v2
|
||||
*/
|
||||
Boolean insertByBo(ProjectHandbookBo bo);
|
||||
|
||||
/**
|
||||
* 修改项目申报v2
|
||||
*/
|
||||
Boolean updateByBo(ProjectHandbookBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除项目申报v2信息
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
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;
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.ruoyi.project.service.impl;
|
||||
package com.ruoyi.scientific.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
@ -7,13 +7,16 @@ 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.FundsReceivedBo;
|
||||
import com.ruoyi.scientific.domain.bo.ProjectBaseBo;
|
||||
import com.ruoyi.scientific.domain.bo.UpdateBudgetBo;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.domain.bo.ProjectApplicationBo;
|
||||
import com.ruoyi.project.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.project.domain.ProjectApplication;
|
||||
import com.ruoyi.project.mapper.ProjectApplicationMapper;
|
||||
import com.ruoyi.project.service.IProjectApplicationService;
|
||||
import com.ruoyi.scientific.domain.bo.ProjectApplicationBo;
|
||||
import com.ruoyi.scientific.domain.vo.ProjectApplicationVo;
|
||||
import com.ruoyi.scientific.domain.ProjectApplication;
|
||||
import com.ruoyi.scientific.mapper.ProjectApplicationMapper;
|
||||
import com.ruoyi.scientific.service.IProjectApplicationService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -23,7 +26,7 @@ import java.util.Collection;
|
|||
* 项目申报Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-06-14
|
||||
* @date 2024-07-18
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
|
@ -63,6 +66,8 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService
|
|||
LambdaQueryWrapper<ProjectApplication> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getProjectName()), ProjectApplication::getProjectName, bo.getProjectName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectStatus()), ProjectApplication::getProjectStatus, bo.getProjectStatus());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectAppProcId()), ProjectApplication::getProjectAppProcId, bo.getProjectAppProcId());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectAppStaus()), ProjectApplication::getProjectAppStaus, bo.getProjectAppStaus());
|
||||
lqw.eq(bo.getProjectAppStTime() != null, ProjectApplication::getProjectAppStTime, bo.getProjectAppStTime());
|
||||
lqw.eq(bo.getProjectAppEndTime() != null, ProjectApplication::getProjectAppEndTime, bo.getProjectAppEndTime());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getProjectLeader()), ProjectApplication::getProjectLeader, bo.getProjectLeader());
|
||||
|
@ -76,9 +81,20 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService
|
|||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ProjectApplicationBo bo) {
|
||||
// 新增的时候默认设置为未立项状态
|
||||
bo.setProjectAppStaus(ProjectBaseBo.PROJECT_NO_INIT);
|
||||
// 新增项目默认设置未未申报状态
|
||||
bo.setProjectDeclareStatus(ProjectBaseBo.PROJECT_NO_DECLARE);
|
||||
// 新增的项目默认资金处于未到账状态
|
||||
bo.setProjectFundsReceived(ProjectBaseBo.PROJECT_FUNDS_NO_RECEIVED);
|
||||
// 设项目资金到账默认备注
|
||||
bo.setProjectFundsRemark(ProjectBaseBo.PROJECT_FUNDS_NO_RECEIVED_REMARK);
|
||||
// 数据转换
|
||||
ProjectApplication add = BeanUtil.toBean(bo, ProjectApplication.class);
|
||||
// 保存实体信息
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
// 如果数据库成功插入,那么就可以获得项目的Id
|
||||
if (flag) {
|
||||
bo.setProjectId(add.getProjectId());
|
||||
}
|
||||
|
@ -95,6 +111,20 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService
|
|||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 项目预算追加流程
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateBudgetProc(ProjectApplicationBo bo) {
|
||||
// ProjectApplication update = BeanUtil.toBean(bo, ProjectApplication.class);
|
||||
// validEntityBeforeSave(update);
|
||||
// 将项目的表单转换为Map
|
||||
UpdateBudgetBo budgetBo = new UpdateBudgetBo();
|
||||
budgetBo.setProjectId(bo.getProjectId());
|
||||
//budgetBo.se
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
|
@ -112,4 +142,43 @@ public class ProjectApplicationServiceImpl implements IProjectApplicationService
|
|||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据给定的Id更新预算信息,这个功能用于支持项目预算变更。当用户发起预算变更流程,当流程
|
||||
* 完成后,通过监听流程审批是否完成,确定是否更新预算信息
|
||||
* @author : zhanli
|
||||
*/
|
||||
public Boolean updateBudgetInfoById(Long projectId, Long newProjectBudget){
|
||||
// 获取项目的详细信息
|
||||
ProjectApplication projectApplication = baseMapper.selectById(projectId);
|
||||
if (projectApplication == null) {
|
||||
return false;
|
||||
}
|
||||
// 更新预算信息
|
||||
projectApplication.setProjectBudget(newProjectBudget);
|
||||
// 保存信息
|
||||
validEntityBeforeSave(projectApplication);
|
||||
// 返回结果取决于是否更新成功
|
||||
return baseMapper.updateById(projectApplication) > 0;
|
||||
}
|
||||
/**
|
||||
* 项目经费到账确认:项目经费到账情况(由财务根据实际情况进行填写)
|
||||
* @param fundsReceivedBo 项目到账情况描述类,包含项目Id,项目到账情况,项目到账备注
|
||||
* @author zhanli
|
||||
* TODO: 2024/7/24 前版本暂时没有加权限的限制以及人员的限制,后续需要加入
|
||||
*/
|
||||
public Boolean confirmFundsReceivedById(FundsReceivedBo fundsReceivedBo){
|
||||
// 获取项目的详细信息
|
||||
ProjectApplication projectApplication = baseMapper.selectById(fundsReceivedBo.getProjectId());
|
||||
if (projectApplication == null) {
|
||||
return false;
|
||||
}
|
||||
// 设置项目的状态到账状态
|
||||
projectApplication.setProjectFundsReceived(fundsReceivedBo.getProjectFundsReceived());
|
||||
projectApplication.setProjectFundsRemark(fundsReceivedBo.getProjectFundsRemark());
|
||||
// 保存信息
|
||||
validEntityBeforeSave(projectApplication);
|
||||
// 返回结果取决于是否更新成功
|
||||
return baseMapper.updateById(projectApplication) > 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
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.ProjectHandbookBo;
|
||||
import com.ruoyi.scientific.domain.vo.ProjectHandbookVo;
|
||||
import com.ruoyi.scientific.domain.ProjectHandbook;
|
||||
import com.ruoyi.scientific.mapper.ProjectHandbookMapper;
|
||||
import com.ruoyi.scientific.service.IProjectHandbookService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 项目申报v2Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-07-23
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class ProjectHandbookServiceImpl implements IProjectHandbookService {
|
||||
|
||||
private final ProjectHandbookMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询项目申报v2
|
||||
*/
|
||||
@Override
|
||||
public ProjectHandbookVo queryById(Long handbookId){
|
||||
return baseMapper.selectVoById(handbookId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目申报v2列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<ProjectHandbookVo> queryPageList(ProjectHandbookBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<ProjectHandbook> lqw = buildQueryWrapper(bo);
|
||||
Page<ProjectHandbookVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询项目申报v2列表
|
||||
*/
|
||||
@Override
|
||||
public List<ProjectHandbookVo> queryList(ProjectHandbookBo bo) {
|
||||
LambdaQueryWrapper<ProjectHandbook> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<ProjectHandbook> buildQueryWrapper(ProjectHandbookBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<ProjectHandbook> lqw = Wrappers.lambdaQuery();
|
||||
lqw.like(StringUtils.isNotBlank(bo.getHandbookName()), ProjectHandbook::getHandbookName, bo.getHandbookName());
|
||||
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.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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增项目申报v2
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(ProjectHandbookBo bo) {
|
||||
ProjectHandbook add = BeanUtil.toBean(bo, ProjectHandbook.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setHandbookId(add.getHandbookId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改项目申报v2
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(ProjectHandbookBo bo) {
|
||||
ProjectHandbook update = BeanUtil.toBean(bo, ProjectHandbook.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(ProjectHandbook entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除项目申报v2
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteBatchIds(ids) > 0;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
java包使用 `.` 分割 resource 目录使用 `/` 分割
|
||||
<br>
|
||||
此文件目的 防止文件夹粘连找不到 `xml` 文件
|
|
@ -0,0 +1,17 @@
|
|||
<?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,27 @@
|
|||
<?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.ProjectApplicationMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.scientific.domain.ProjectApplication" id="ProjectApplicationResult">
|
||||
<result property="projectId" column="project_id"/>
|
||||
<result property="projectName" column="project_name"/>
|
||||
<result property="projectStatus" column="project_status"/>
|
||||
<result property="projectAppProcId" column="project_app_proc_id"/>
|
||||
<result property="projectDeclareStatus" column="project_declare_status"/>
|
||||
<result property="projectAppStaus" column="project_app_staus"/>
|
||||
<result property="projectAppStTime" column="project_app_st_time"/>
|
||||
<result property="projectAppEndTime" column="project_app_end_time"/>
|
||||
<result property="projectLeader" column="project_leader"/>
|
||||
<result property="projectBudget" column="project_budget"/>
|
||||
<result property="projectLeaderPhone" column="project_leader_phone"/>
|
||||
<result property="projectFundsReceived" column="project_funds_received"/>
|
||||
<result property="projectFundsRemark" column="project_funds_remark"/>
|
||||
<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>
|
|
@ -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.ProjectHandbookMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.scientific.domain.ProjectHandbook" 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>
|
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 150 KiB |
Before Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 142 KiB |
Before Width: | Height: | Size: 148 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 74 KiB |
59
操作文档.md
|
@ -1,59 +0,0 @@
|
|||
# 工程导入
|
||||
|
||||
## MySQL
|
||||
|
||||
![image-20241216100403352](操作文档.assets/image-20241216100403352.png)
|
||||
|
||||
## 配置数据库信息
|
||||
|
||||
![image-20241216100442145](操作文档.assets/image-20241216100442145.png)
|
||||
|
||||
# 工程运行
|
||||
|
||||
## 前端项目运行
|
||||
|
||||
![image-20241216100519457](操作文档.assets/image-20241216100519457.png)
|
||||
|
||||
## 后端项目运行
|
||||
|
||||
![image-20241216100553198](操作文档.assets/image-20241216100553198.png)
|
||||
|
||||
## 访问项目![image-20241216100624740](操作文档.assets/image-20241216100624740.png)
|
||||
|
||||
# 请假流程
|
||||
|
||||
## 新增流程分类
|
||||
|
||||
![image-20241216101121542](操作文档.assets/image-20241216101121542.png)
|
||||
|
||||
## 新增表单
|
||||
|
||||
![image-20241216101737575](操作文档.assets/image-20241216101737575.png)
|
||||
|
||||
## 新增流程设计
|
||||
|
||||
![image-20241216101900521](操作文档.assets/image-20241216101900521.png)
|
||||
|
||||
## 流程设计
|
||||
|
||||
![image-20241216102020287](操作文档.assets/image-20241216102020287.png)
|
||||
|
||||
## 指定超级管理员角色
|
||||
|
||||
![image-20241216102737755](操作文档.assets/image-20241216102737755.png)
|
||||
|
||||
## 部署流程
|
||||
|
||||
![image-20241216102414056](操作文档.assets/image-20241216102414056.png)
|
||||
|
||||
## 新建请假流程
|
||||
|
||||
![image-20241216102448797](操作文档.assets/image-20241216102448797.png)
|
||||
|
||||
## 审批流程
|
||||
|
||||
![image-20241216102706312](操作文档.assets/image-20241216102706312.png)
|
||||
|
||||
## 通过流程
|
||||
|
||||
![image-20241216102834521](操作文档.assets/image-20241216102834521.png)
|