change(activiti): 修改实验申请信息管理功能

- 添加时间列表对话框,展示实验申请的时间线
- 新增编辑实验方案、内容、准备工具和交流内容的功能
- 列表页面,增加按角色显示不同编辑按钮的逻辑
master
zch 1 month ago
parent 1a28cc4ceb
commit bccee4d6dd

@ -1,6 +1,9 @@
package com.haiwei.activiti.controller;
import java.util.List;
import com.haiwei.activiti.domain.ExperimentRequestRelation;
import com.haiwei.activiti.service.IExperimentRequestRelationService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -21,9 +24,9 @@ import com.haiwei.common.core.page.TableDataInfo;
/**
* Controller
*
*
* @author wangg
* @date 2024-09-25
* @date 2024-12-31
*/
@Controller
@RequestMapping("/activiti/experiment_request")
@ -34,6 +37,9 @@ public class ExperimentRequestController extends BaseController
@Autowired
private IExperimentRequestService experimentRequestService;
@Autowired
private IExperimentRequestRelationService experimentRequestRelationService;
@RequiresPermissions("activiti:experiment_request:view")
@GetMapping()
public String experiment_request()
@ -89,18 +95,60 @@ public class ExperimentRequestController extends BaseController
return toAjax(experimentRequestService.insertExperimentRequest(experimentRequest));
}
/**
*
*
*/
@RequiresPermissions("activiti:experiment_request:remove")
@Log(title = "实验申请信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(experimentRequestService.deleteExperimentRequestByIds(ids));
}
/* *//**
*
*//*
@RequiresPermissions("activiti:experiment_request:remove")
@Log(title = "实验申请信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(Long id)
{
return toAjax(experimentRequestService.deleteExperimentRequestById(id));
}*/
/**
*
*/
@RequiresPermissions("activiti:experiment_request:list")
@PostMapping("/getTimeList/{objid}")
@ResponseBody
public AjaxResult getTimeList(@PathVariable("objid") Long objid)
{
ExperimentRequestRelation experimentRequestRelation = new ExperimentRequestRelation();
experimentRequestRelation.setPojectId(objid);
List<ExperimentRequestRelation> timeList = experimentRequestRelationService.selectExperimentRequestRelationList(experimentRequestRelation);
return AjaxResult.success(timeList);
}
/* *//**
*
*//*
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
ExperimentRequest experimentRequest = experimentRequestService.selectExperimentRequestById(objid);
mmap.put("experimentRequest", experimentRequest);
return prefix + "/edit";
}
/**
return prefix + "/editDesc";
}*/
/**
*
*/
@RequiresPermissions("activiti:experiment_request:edit")
@ -112,15 +160,64 @@ public class ExperimentRequestController extends BaseController
return toAjax(experimentRequestService.updateExperimentRequest(experimentRequest));
}
/**
*
*
*/
@RequiresPermissions("activiti:experiment_request:remove")
@Log(title = "实验申请信息", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
@GetMapping("/edit/{objid}")
public String edit(@PathVariable("objid") Long objid, ModelMap mmap)
{
return toAjax(experimentRequestService.deleteExperimentRequestByIds(ids));
ExperimentRequest experimentRequest = experimentRequestService.selectExperimentRequestById(objid);
mmap.put("experimentRequest", experimentRequest);
return prefix + "/edit";
}
/**
*
*/
@GetMapping("/editDesc/{objid}")
public String editDesc(@PathVariable("objid") Long objid, ModelMap mmap)
{
ExperimentRequest experimentRequest = experimentRequestService.selectExperimentRequestById(objid);
experimentRequest.setStatus(2L);
mmap.put("experimentRequest", experimentRequest);
return prefix + "/editDesc";
}
/**
*
*/
@GetMapping("/editExperimentContent/{objid}")
public String editExperimentContent(@PathVariable("objid") Long objid, ModelMap mmap)
{
ExperimentRequest experimentRequest = experimentRequestService.selectExperimentRequestById(objid);
experimentRequest.setStatus(1L);
mmap.put("experimentRequest", experimentRequest);
return prefix + "/editExperimentContent";
}
/**
*
*/
@GetMapping("/editCommunicationContent/{objid}")
public String editCommunicationContent(@PathVariable("objid") Long objid, ModelMap mmap)
{
ExperimentRequest experimentRequest = experimentRequestService.selectExperimentRequestById(objid);
experimentRequest.setStatus(4L);
mmap.put("experimentRequest", experimentRequest);
return prefix + "/editCommunicationContent";
}
/**
*
*/
@GetMapping("/editTools/{objid}")
public String editTools(@PathVariable("objid") Long objid, ModelMap mmap)
{
ExperimentRequest experimentRequest = experimentRequestService.selectExperimentRequestById(objid);
experimentRequest.setStatus(3L);
mmap.put("experimentRequest", experimentRequest);
return prefix + "/editTools";
}
}

@ -8,9 +8,9 @@ import com.haiwei.common.core.domain.BaseEntity;
/**
* experiment_request
*
*
* @author wangg
* @date 2024-09-25
* @date 2024-12-31
*/
public class ExperimentRequest extends BaseEntity
{
@ -38,112 +38,171 @@ public class ExperimentRequest extends BaseEntity
/** 使用的设备名称 */
@Excel(name = "使用的设备名称")
private String deviceName;
private String device2Name;
/** 实验内容 */
@Excel(name = "实验内容")
/** 实验方案 */
@Excel(name = "实验方案")
private String experimentDesc;
/** 实验申请流程ID */
private Long processId;
/** 实验设备2 */
private String device2Name;
public String getDevice2Name() {
return device2Name;
}
/** 实验内容 */
@Excel(name = "实验内容")
private String experimentContent;
public void setDevice2Name(String device2Name) {
this.device2Name = device2Name;
}
/** 准备工具 */
@Excel(name = "准备工具")
private String preparationTools;
/** 交流内容 */
@Excel(name = "交流内容")
private String communicationContent;
/** 实验请求状态 */
@Excel(name = "实验请求状态")
private Long status;
public void setObjid(Long objid)
{
this.objid = objid;
}
public Long getObjid()
public Long getObjid()
{
return objid;
}
public void setCustomerName(String customerName)
public void setCustomerName(String customerName)
{
this.customerName = customerName;
}
public String getCustomerName()
public String getCustomerName()
{
return customerName;
}
public void setProjectName(String projectName)
public void setProjectName(String projectName)
{
this.projectName = projectName;
}
public String getProjectName()
public String getProjectName()
{
return projectName;
}
public void setCreationTime(Date creationTime)
public void setCreationTime(Date creationTime)
{
this.creationTime = creationTime;
}
public Date getCreationTime()
public Date getCreationTime()
{
return creationTime;
}
public void setExecutionTime(Date executionTime)
public void setExecutionTime(Date executionTime)
{
this.executionTime = executionTime;
}
public Date getExecutionTime()
public Date getExecutionTime()
{
return executionTime;
}
public void setDeviceName(String deviceName)
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
public String getDeviceName()
{
return deviceName;
}
public void setExperimentDesc(String experimentDesc)
public void setExperimentDesc(String experimentDesc)
{
this.experimentDesc = experimentDesc;
}
public String getExperimentDesc()
public String getExperimentDesc()
{
return experimentDesc;
}
public void setProcessId(Long processId)
public void setProcessId(Long processId)
{
this.processId = processId;
}
public Long getProcessId()
public Long getProcessId()
{
return processId;
}
public void setDevice2Name(String device2Name)
{
this.device2Name = device2Name;
}
public String getDevice2Name()
{
return device2Name;
}
public void setExperimentContent(String experimentContent)
{
this.experimentContent = experimentContent;
}
public String getExperimentContent()
{
return experimentContent;
}
public void setPreparationTools(String preparationTools)
{
this.preparationTools = preparationTools;
}
public String getPreparationTools()
{
return preparationTools;
}
public void setCommunicationContent(String communicationContent)
{
this.communicationContent = communicationContent;
}
public String getCommunicationContent()
{
return communicationContent;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("objid", getObjid())
.append("customerName", getCustomerName())
.append("projectName", getProjectName())
.append("creationTime", getCreationTime())
.append("executionTime", getExecutionTime())
.append("deviceName", getDeviceName())
.append("experimentDesc", getExperimentDesc())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("processId", getProcessId())
.toString();
.append("objid", getObjid())
.append("customerName", getCustomerName())
.append("projectName", getProjectName())
.append("creationTime", getCreationTime())
.append("executionTime", getExecutionTime())
.append("deviceName", getDeviceName())
.append("experimentDesc", getExperimentDesc())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("processId", getProcessId())
.append("device2Name", getDevice2Name())
.append("experimentContent", getExperimentContent())
.append("preparationTools", getPreparationTools())
.append("communicationContent", getCommunicationContent())
.append("status", getStatus())
.toString();
}
}

@ -1,6 +1,11 @@
package com.haiwei.activiti.service.impl;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import com.haiwei.activiti.domain.ExperimentRequestRelation;
import com.haiwei.activiti.mapper.ExperimentRequestRelationMapper;
import com.haiwei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -9,21 +14,28 @@ import com.haiwei.activiti.domain.ExperimentRequest;
import com.haiwei.activiti.service.IExperimentRequestService;
import com.haiwei.common.core.text.Convert;
import com.haiwei.framework.util.ShiroUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.transaction.annotation.Transactional;
/**
* Service
*
*
* @author wangg
* @date 2024-09-25
*/
@Service
public class ExperimentRequestServiceImpl implements IExperimentRequestService
public class ExperimentRequestServiceImpl implements IExperimentRequestService
{
@Autowired
private ExperimentRequestMapper experimentRequestMapper;
@Autowired
private ExperimentRequestRelationMapper experimentRequestRelationMapper;
/**
*
*
*
* @param objid ID
* @return
*/
@ -35,7 +47,7 @@ public class ExperimentRequestServiceImpl implements IExperimentRequestService
/**
*
*
*
* @param experimentRequest
* @return
*/
@ -47,51 +59,132 @@ public class ExperimentRequestServiceImpl implements IExperimentRequestService
/**
*
*
*
* @param experimentRequest
* @return
*/
/**
*
* @param experimentRequest
* @return
*/
@Transactional
@Override
public int insertExperimentRequest(ExperimentRequest experimentRequest)
{
public int insertExperimentRequest(ExperimentRequest experimentRequest) {
// 设置实验请求的状态为1
experimentRequest.setStatus(1L);
// 设置实验请求的创建时间为当前时间
experimentRequest.setCreationTime(DateUtils.getNowDate());
return experimentRequestMapper.insertExperimentRequest(experimentRequest);
/* <insert id="insertExperimentRequest" parameterType="ExperimentRequest" useGeneratedKeys="true" keyProperty="objid">
useGeneratedKeys="true"
keyProperty="objid" ExperimentRequest objid */
// experimentRequest的主键objId为null将实验请求插入数据库objId主键自动生成
int i = experimentRequestMapper.insertExperimentRequest(experimentRequest);
// 获取第一个实验请求的主键objId
Long obj = experimentRequest.getObjid();
// 创建实验请求关系对象
ExperimentRequestRelation experimentRequestRelation = new ExperimentRequestRelation();
// 设置项目ID为查询到的对象ID
experimentRequestRelation.setPojectId(obj);
// 设置实验请求关系的状态为1表示新建
experimentRequestRelation.setStatus(1L);
// 设置实验请求关系的更新时间为实验请求的创建时间
experimentRequestRelation.setUpdateTime(experimentRequest.getCreationTime());
// 将实验请求关系插入数据库
experimentRequestRelationMapper.insertExperimentRequestRelation(experimentRequestRelation);
// 返回插入操作影响的行数
return i;
}
/**
*
*
*
* @param experimentRequest
* @return
*/
@Transactional( rollbackFor = Exception.class )
@Override
public int updateExperimentRequest(ExperimentRequest experimentRequest)
{
experimentRequest.setUpdateTime(DateUtils.getNowDate());
public int updateExperimentRequest(ExperimentRequest experimentRequest) {
Date nowDate = DateUtils.getNowDate();
// 获取当前用户的主体信息
Subject subject = ShiroUtils.getSubject();
// 创建一个新的实验请求关系对象
ExperimentRequestRelation experimentRequestRelation = new ExperimentRequestRelation();
// 设置项目ID为实验请求对象的ID
experimentRequestRelation.setPojectId(experimentRequest.getObjid());
// 设置状态为实验请求对象的状态
experimentRequestRelation.setStatus(experimentRequest.getStatus());
// 根据实验请求关系对象查询相关记录列表
List<ExperimentRequestRelation> timeList = experimentRequestRelationMapper
.selectExperimentRequestRelationList(experimentRequestRelation);
// 如果查询结果不为空,则进行更新操作
if (!timeList.isEmpty()) {
// 设置更新时间为当前时间
experimentRequestRelation.setUpdateTime(nowDate);
// 设置对象ID为查询到的第一条记录的对象ID
experimentRequestRelation.setObjId(timeList.get(0).getObjId());
// 更新实验请求关系记录
experimentRequestRelationMapper.updateExperimentRequestRelation(experimentRequestRelation);
} else {
// 如果查询结果为空,则进行插入操作
// 设置更新时间为当前时间
experimentRequestRelation.setUpdateTime(nowDate);
// 插入新的实验请求关系记录
experimentRequestRelationMapper.insertExperimentRequestRelation(experimentRequestRelation);
}
// 设置实验请求对象的更新时间为当前时间
experimentRequest.setUpdateTime(nowDate);
// 更新实验请求记录并返回受影响的行数
return experimentRequestMapper.updateExperimentRequest(experimentRequest);
}
/**
*
*
*
* @param ids ID
* @return
*/
@Transactional
@Override
public int deleteExperimentRequestByIds(String ids)
{
experimentRequestRelationMapper.deleteExperimentRequestRelationByProjectIds(Convert.toStrArray(ids));
return experimentRequestMapper.deleteExperimentRequestByIds(Convert.toStrArray(ids));
}
/**
*
*
*
* @param objid ID
* @return
*/
@Transactional
@Override
public int deleteExperimentRequestById(Long objid)
{
experimentRequestRelationMapper.deleteExperimentRequestRelationByProjectId(objid);
return experimentRequestMapper.deleteExperimentRequestById(objid);
}
}

@ -11,17 +11,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="creationTime" column="creation_time" />
<result property="executionTime" column="execution_time" />
<result property="deviceName" column="device_name" />
<result property="device2Name" column="device2_name" />
<result property="experimentDesc" column="experiment_desc" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="processId" column="process_id" />
<result property="device2Name" column="device2_name" />
<result property="experimentContent" column="experiment_content" />
<result property="preparationTools" column="preparation_tools" />
<result property="communicationContent" column="communication_content" />
<result property="status" column="status" />
</resultMap>
<sql id="selectExperimentRequestVo">
select objid, customer_name, project_name, creation_time, execution_time, device_name,device2_name, experiment_desc, create_by, create_time, update_by, update_time, process_id from experiment_request
select objid, customer_name, project_name, creation_time, execution_time, device_name, experiment_desc, create_by, create_time, update_by, update_time, process_id, device2_name, experiment_content, preparation_tools, communication_content, status from experiment_request
</sql>
<select id="selectExperimentRequestList" parameterType="ExperimentRequest" resultMap="ExperimentRequestResult">
@ -32,8 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="creationTime != null "> and creation_time = #{creationTime}</if>
<if test="executionTime != null "> and execution_time = #{executionTime}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like ('%' + #{deviceName} + '%')</if>
<if test="experimentDesc != null and experimentDesc != ''"> and experiment_desc = #{experimentDesc}</if>
<if test="processId != null "> and process_id = #{processId}</if>
<if test="status != null "> and status = #{status}</if>
</where>
</select>
@ -42,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where objid = #{objid}
</select>
<insert id="insertExperimentRequest" parameterType="ExperimentRequest">
<insert id="insertExperimentRequest" parameterType="ExperimentRequest" useGeneratedKeys="true" keyProperty="objid">
insert into experiment_request
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objid != null">objid,</if>
@ -51,14 +54,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="creationTime != null">creation_time,</if>
<if test="executionTime != null">execution_time,</if>
<if test="deviceName != null">device_name,</if>
<if test="device2Name != null">device2_name,</if>
<if test="experimentDesc != null">experiment_desc,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="processId != null">process_id,</if>
</trim>
<if test="device2Name != null">device2_name,</if>
<if test="experimentContent != null">experiment_content,</if>
<if test="preparationTools != null">preparation_tools,</if>
<if test="communicationContent != null">communication_content,</if>
<if test="status != null">status,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objid != null">#{objid},</if>
<if test="customerName != null">#{customerName},</if>
@ -66,14 +73,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="creationTime != null">#{creationTime},</if>
<if test="executionTime != null">#{executionTime},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="device2Name != null">#{device2Name},</if>
<if test="experimentDesc != null">#{experimentDesc},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="processId != null">#{processId},</if>
</trim>
<if test="device2Name != null">#{device2Name},</if>
<if test="experimentContent != null">#{experimentContent},</if>
<if test="preparationTools != null">#{preparationTools},</if>
<if test="communicationContent != null">#{communicationContent},</if>
<if test="status != null">#{status},</if>
</trim>
</insert>
<update id="updateExperimentRequest" parameterType="ExperimentRequest">
@ -84,13 +95,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="creationTime != null">creation_time = #{creationTime},</if>
<if test="executionTime != null">execution_time = #{executionTime},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="device2Name != null">device2_name = #{device2Name},</if>
<if test="experimentDesc != null">experiment_desc = #{experimentDesc},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="processId != null">process_id = #{processId},</if>
<if test="device2Name != null">device2_name = #{device2Name},</if>
<if test="experimentContent != null">experiment_content = #{experimentContent},</if>
<if test="preparationTools != null">preparation_tools = #{preparationTools},</if>
<if test="communicationContent != null">communication_content = #{communicationContent},</if>
<if test="status != null">status = #{status},</if>
</trim>
where objid = #{objid}
</update>

@ -62,12 +62,17 @@
</div>
</div>
</div>
<div class="form-group">
<!-- <div class="form-group">
<label class="col-sm-3 control-label">实验方案:</label>
<div class="col-sm-8">
<textarea name="experimentDesc" class="form-control" type="text"></textarea>
</div>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">实验内容:</label>
<div class="col-sm-8">
<input name="experimentContent" class="form-control" type="text">
</div>
</form>
</div>
<th:block th:include="include :: footer"/>
@ -97,4 +102,4 @@
});
</script>
</body>
</html>
</html>

@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('修改实验申请信息')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-experiment_request-edit" th:object="${experimentRequest}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">项目名称:</label>
<div class="col-sm-8">
<input name="projectName" th:field="*{projectName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="creationTime" th:value="${#dates.format(experimentRequest.creationTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"
disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验执行时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="executionTime" th:value="${#dates.format(experimentRequest.executionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">使用的设备名称:</label>
<div class="col-sm-8">
<input name="deviceName" th:field="*{deviceName}" class="form-control" type="text">
</div>
</div>-->
<!-- todo-->
<div class="form-group">
<label class="col-sm-2 control-label">实验设备1</label>
<div class="col-sm-4">
<!-- <input name="deviceName" class="form-control" type="text">-->
<select name="deviceName" class="form-control m-b" th:field="*{deviceName}"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>
<!-- <label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>-->
<label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b" th:field="*{device2Name}" th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}" th:value="${dict.deviceName}"></option>
</select>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">实验方案:</label>
<div class="col-sm-8">
<textarea name="experimentDesc" class="form-control">[[*{experimentDesc}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验内容:</label>
<div class="col-sm-8">
<textarea name="experimentContent" class="form-control">[[*{experimentContent}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">准备工具:</label>
<div class="col-sm-8">
<textarea name="preparationTools" class="form-control">[[*{preparationTools}]]</textarea>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">交流内容:</label>
<div class="col-sm-8">
<textarea name="communicationContent" class="form-control">[[*{communicationContent}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验请求状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('process_status')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
</select>
<input type="hidden" name="status" id="hidden-status" th:value="*{status}">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "activiti/experiment_request";
$("#form-experiment_request-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-experiment_request-edit').serialize());
}
}
$("input[name='creationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='executionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,147 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('修改实验申请信息')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-experiment_request-edit" th:object="${experimentRequest}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">项目名称:</label>
<div class="col-sm-8">
<input name="projectName" th:field="*{projectName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="creationTime" th:value="${#dates.format(experimentRequest.creationTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"
disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验执行时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="executionTime" th:value="${#dates.format(experimentRequest.executionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">使用的设备名称:</label>
<div class="col-sm-8">
<input name="deviceName" th:field="*{deviceName}" class="form-control" type="text">
</div>
</div>-->
<!-- todo-->
<div class="form-group">
<label class="col-sm-2 control-label">实验设备1</label>
<div class="col-sm-4">
<!-- <input name="deviceName" class="form-control" type="text">-->
<select name="deviceName" class="form-control m-b" th:field="*{deviceName}"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>
<!-- <label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>-->
<label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b" th:field="*{device2Name}" th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}" th:value="${dict.deviceName}"></option>
</select>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验方案:</label>
<div class="col-sm-8">
<textarea name="experimentDesc" class="form-control">[[*{experimentDesc}]]</textarea>
</div>
</div>
<!--
<div class="form-group">
<label class="col-sm-3 control-label">实验内容:</label>
<div class="col-sm-8">
<textarea name="experimentContent" class="form-control">[[*{experimentContent}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">准备工具:</label>
<div class="col-sm-8">
<textarea name="preparationTools" class="form-control">[[*{preparationTools}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交流内容:</label>
<div class="col-sm-8">
<textarea name="communicationContent" class="form-control">[[*{communicationContent}]]</textarea>
</div>
</div>
-->
<div class="form-group">
<label class="col-sm-3 control-label">实验请求状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('process_status')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
</select>
<input type="hidden" name="status" id="hidden-status" th:value="*{status}">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "activiti/experiment_request";
$("#form-experiment_request-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-experiment_request-edit').serialize());
}
}
$("input[name='creationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='executionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('修改实验申请信息')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-experiment_request-edit" th:object="${experimentRequest}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">项目名称:</label>
<div class="col-sm-8">
<input name="projectName" th:field="*{projectName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="creationTime" th:value="${#dates.format(experimentRequest.creationTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"
disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验执行时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="executionTime" th:value="${#dates.format(experimentRequest.executionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">使用的设备名称:</label>
<div class="col-sm-8">
<input name="deviceName" th:field="*{deviceName}" class="form-control" type="text">
</div>
</div>-->
<!-- todo-->
<div class="form-group">
<label class="col-sm-2 control-label">实验设备1</label>
<div class="col-sm-4">
<!-- <input name="deviceName" class="form-control" type="text">-->
<select name="deviceName" class="form-control m-b" th:field="*{deviceName}"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>
<!-- <label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>-->
<label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b" th:field="*{device2Name}" th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}" th:value="${dict.deviceName}"></option>
</select>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">实验方案:</label>
<div class="col-sm-8">
<textarea name="experimentDesc" class="form-control">[[*{experimentDesc}]]</textarea>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">实验内容:</label>
<div class="col-sm-8">
<textarea name="experimentContent" class="form-control">[[*{experimentContent}]]</textarea>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">准备工具:</label>
<div class="col-sm-8">
<textarea name="preparationTools" class="form-control">[[*{preparationTools}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交流内容:</label>
<div class="col-sm-8">
<textarea name="communicationContent" class="form-control">[[*{communicationContent}]]</textarea>
</div>
</div>
-->
<div class="form-group">
<label class="col-sm-3 control-label">实验请求状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('process_status')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}"></option>
</select>
<input type="hidden" name="status" id="hidden-status" th:value="*{status}">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "activiti/experiment_request";
$("#form-experiment_request-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-experiment_request-edit').serialize());
}
}
$("input[name='creationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='executionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -0,0 +1,141 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('修改实验申请信息')" />
<th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-experiment_request-edit" th:object="${experimentRequest}">
<input name="objid" th:field="*{objid}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="customerName" th:field="*{customerName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">项目名称:</label>
<div class="col-sm-8">
<input name="projectName" th:field="*{projectName}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验创建时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="creationTime" th:value="${#dates.format(experimentRequest.creationTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text"
disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验执行时间:</label>
<div class="col-sm-8">
<div class="input-group date">
<input name="executionTime" th:value="${#dates.format(experimentRequest.executionTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">使用的设备名称:</label>
<div class="col-sm-8">
<input name="deviceName" th:field="*{deviceName}" class="form-control" type="text">
</div>
</div>-->
<!-- todo-->
<div class="form-group">
<label class="col-sm-2 control-label">实验设备1</label>
<div class="col-sm-4">
<!-- <input name="deviceName" class="form-control" type="text">-->
<select name="deviceName" class="form-control m-b" th:field="*{deviceName}"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>
<label class="col-sm-2 control-label">实验设备2</label>
<div class="col-sm-4">
<select name="device2Name" class="form-control m-b" th:field="*{device2Name}"
th:with="type=${@baseDeviceInfoServiceImpl.selectBaseDeviceInfoList(null)}">
<option th:each="dict : ${type}" th:text="${dict.deviceName}"
th:value="${dict.deviceName}"></option>
</select>
</div>
<!-- <div class="form-group">
<label class="col-sm-3 control-label">实验方案:</label>
<div class="col-sm-8">
<textarea name="experimentDesc" class="form-control">[[*{experimentDesc}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">实验内容:</label>
<div class="col-sm-8">
<textarea name="experimentContent" class="form-control">[[*{experimentContent}]]</textarea>
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label">准备工具:</label>
<div class="col-sm-8">
<textarea name="preparationTools" class="form-control">[[*{preparationTools}]]</textarea>
</div>
</div>
<!--
<div class="form-group">
<label class="col-sm-3 control-label">交流内容:</label>
<div class="col-sm-8">
<textarea name="communicationContent" class="form-control">[[*{communicationContent}]]</textarea>
</div>
</div>
-->
<div class="form-group">
<label class="col-sm-3 control-label">实验请求状态:</label>
<div class="col-sm-8">
<select name="status" class="form-control m-b" th:with="type=${@dict.getType('process_status')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{status}" ></option>
</select>
<input type="hidden" name="status" id="hidden-status" th:value="*{status}">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script th:inline="javascript">
var prefix = ctx + "activiti/experiment_request";
$("#form-experiment_request-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-experiment_request-edit').serialize());
}
}
$("input[name='creationTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
$("input[name='executionTime']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
});
</script>
</body>
</html>

@ -2,6 +2,10 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('实验申请信息列表')" />
<link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
<link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
<link th:href="@{/css/style.css}" rel="stylesheet"/>
</head>
<body class="gray-bg">
<div class="container-div">
@ -65,6 +69,65 @@
<i class="fa fa-download"></i> 导出
</a>
</div>
<!-- 时间列表对话框 -->
<!--
<div class="modal fade" id="timeListModal" tabindex="-1" role="dialog" aria-labelledby="timeListModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="timeListModalLabel">时间列表</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<table id="timeListTable" class="table table-striped">
<thead>
<tr>
<th>绑定项目</th>
<th>更新时间</th>
<th>内容</th>
<th>实验状态</th>
</tr>
</thead>
<tbody>
&lt;!&ndash; 数据将动态插入到这里 &ndash;&gt;
</tbody>
</table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
-->
<!-- 时间列表对话框 -->
<div class="modal fade" id="timeListModal" tabindex="-1" role="dialog" aria-labelledby="timeListModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="timeListModalLabel">时间列表</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div id="vertical-timeline" class="vertical-container light-timeline">
<!-- 数据将动态插入到这里 -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
</div>
</div>
</div>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
@ -72,15 +135,112 @@
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var timeFlag = [[${@permission.hasPermi('activiti:experiment_request:edit')}]];
var editFlag = [[${@permission.hasPermi('activiti:experiment_request:edit')}]];
var removeFlag = [[${@permission.hasPermi('activiti:experiment_request:remove')}]];
var prefix = ctx + "activiti/experiment_request";
var descRole = [[${@permission.hasAnyRoles('admin,descRole')}]];
var experimentContentRole = [[${@permission.hasAnyRoles('admin,experimentContentRole')}]];
var toolsRole = [[${@permission.hasAnyRoles('admin,toolsRole')}]];
var communicationContentRole = [[${@permission.hasAnyRoles('admin,common')}]];
/* function showTimeList(objId) {
$.ajax({
url: prefix + "/getTimeList/" + objId,
type: "POST",
success: function(response) {
if (response.code === 0) {
var timeList = response.data;
var tbody = $("#timeListTable tbody");
tbody.empty();
timeList.forEach(function(item) {
var row = $("<tr>");
row.append($("<td>").text(item.pojectId));
row.append($("<td>").text(item.updateTime));
row.append($("<td>").text(item.content));
row.append($("<td>").text(item.status));
tbody.append(row);
});
$("#timeListModal").modal("show");
} else {
alert("获取时间列表失败: " + response.msg);
}
},
error: function() {
alert("获取时间列表失败");
}
});
}*/
function showTimeList(objId) {
$.ajax({
url: prefix + "/getTimeList/" + objId,
type: "POST",
success: function(response) {
if (response.code === 0) {
var timeList = response.data;
var timeline = $("#vertical-timeline");
timeline.empty();
timeList.forEach(function(item, index) {
// 获取数据字典数据
var dicts = [[${@dict.getType('process_status')}]];
// console.log(dicts);
var statusLabel = dicts.find(dict => dict.dictValue === item.status.toString())?.dictLabel || item.status;
var block = $("<div>").addClass("vertical-timeline-block");
var icon = $("<div>").addClass("vertical-timeline-icon navy-bg").append($("<i>").addClass("fa fa-briefcase"));
var content = $("<div>").addClass("vertical-timeline-content")
.append($("<h2>").text(statusLabel)) // 实验状态在上面
.append($("<p>").text(item.content)) // 其次是内容描述
.append($("<span>").addClass("vertical-date").html(item.updateTime)); // 最下面是时间
block.append(icon).append(content);
timeline.append(block);
});
$("#timeListModal").modal("show");
} else {
alert("获取时间列表失败: " + response.msg);
}
},
error: function() {
alert("获取时间列表失败");
}
});
}
function editDesc(objId) {
$.modal.open("修改" , prefix + "/editDesc/" + objId);
}
function editExperimentContent(objId) {
$.modal.open("修改" , prefix + "/editExperimentContent/" + objId);
}
function editTools(objId) {
$.modal.open("修改" , prefix + "/editTools/" + objId);
}
function editCommunicationContent(objId) {
$.modal.open("修改" , prefix + "/editCommunicationContent/" + objId);
}
$(function() {
var options = {
url: prefix + "/list",
timeListUrl: prefix + "/timeList/{id}",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
updateDescUrl: prefix + "/editDesc/{id}",
updateExperimentContentUrl: prefix + "/editExperimentContent/{id}",
updateToolsUrl: prefix + "/editTools/{id}",
updateCommunicationContentUrl: prefix + "/editCommunicationContent/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "实验申请信息",
@ -126,14 +286,30 @@
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + timeFlag + '" href="javascript:void(0)" onclick="showTimeList(\'' + row.objid + '\')"><i class="fa fa-timeList"></i>时间列表</a> ');
/* actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
*/
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs '+ experimentContentRole + editFlag + '" href="javascript:void(0)" onclick="editExperimentContent(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑实验内容</a> ');
actions.push('<a class="btn btn-success btn-xs '+ descRole + editFlag + '" href="javascript:void(0)" onclick="editDesc(\'' + row.objid +'\')"><i class="fa fa-edit"></i>编辑讨论方案</a> ');
actions.push('<a class="btn btn-success btn-xs '+ toolsRole + editFlag + '" href="javascript:void(0)" onclick="editTools(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑准备工具</a> ');
actions.push('<a class="btn btn-success btn-xs '+ communicationContentRole + editFlag + '" href="javascript:void(0)" onclick="editCommunicationContent(\'' + row.objid + '\')"><i class="fa fa-edit"></i>编辑交流内容</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objid + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
</html>

@ -0,0 +1,111 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('实验申请信息关联时间列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>绑定项目主键:</label>
<input type="text" name="pojectId"/>
</li>
<li class="select-time">
<label>更新时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUpdateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUpdateTime]"/>
</li>
<li>
<label>实验状态:</label>
<select name="status" th:with="type=${@dict.getType('process_status')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="activiti:experiment_request_relation:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="activiti:experiment_request_relation:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="activiti:experiment_request_relation:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="activiti:experiment_request_relation:export">
<i class="fa fa-download"></i> 导出
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('activiti:experiment_request_relation:edit')}]];
var removeFlag = [[${@permission.hasPermi('activiti:experiment_request_relation:remove')}]];
var statusDatas = [[${@dict.getType('process_status')}]];
var prefix = ctx + "activiti/experiment_request_relation";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "实验申请信息关联时间",
columns: [{
checkbox: true
},
{
field: 'objId',
title: '主键',
visible: false
},
{
field: 'pojectId',
title: '绑定项目主键'
},
{
field: 'updateTime',
title: '更新时间'
},
{
field: 'status',
title: '实验状态',
formatter: function(value, row, index) {
return $.table.selectDictLabel(statusDatas, value);
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.objId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.objId + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>
Loading…
Cancel
Save