This commit is contained in:
parent
78d664a840
commit
80f2a2b901
|
|
@ -0,0 +1,57 @@
|
|||
package com.bonus.aqgqj.basis.controller;
|
||||
|
||||
import com.bonus.aqgqj.annotation.DecryptAndVerify;
|
||||
import com.bonus.aqgqj.annotation.LogAnnotation;
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import com.bonus.aqgqj.basis.service.OriginalRecordService;
|
||||
import com.bonus.aqgqj.system.vo.EncryptedReq;
|
||||
import com.bonus.aqgqj.utils.ServerResponse;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @className:OriginalRecordController
|
||||
* @author:cwchen
|
||||
* @date:2024-07-24-14:11
|
||||
* @version:1.0
|
||||
* @description:原始记录管理-controller
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/originalRecord/")
|
||||
@Slf4j
|
||||
public class OriginalRecordController {
|
||||
|
||||
@Resource(name = "OriginalRecordService")
|
||||
private OriginalRecordService service;
|
||||
|
||||
@PostMapping(value = "getList")
|
||||
@DecryptAndVerify(decryptedClass = ParamsDto.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "原始记录管理", operation = "查询列表", operDesc = "系统级事件", operType = "查询")
|
||||
// @PreAuthorize("@pms.hasPermission('sys:originalRecord:query')" )
|
||||
public ServerResponse getList(EncryptedReq<ParamsDto> data) {
|
||||
PageHelper.startPage(data.getData().getPage(), data.getData().getLimit());
|
||||
List<ExperimentalVo> list = service.getList(data.getData());
|
||||
PageInfo<ExperimentalVo> pageInfo = new PageInfo<>(list);
|
||||
return ServerResponse.createSuccessPage(pageInfo, data.getData().getPage(), data.getData().getLimit());
|
||||
}
|
||||
|
||||
@PostMapping(value = "getDetailList")
|
||||
@DecryptAndVerify(decryptedClass = ParamsDto.class)//加解密统一管理
|
||||
@LogAnnotation(operModul = "原始记录管理", operation = "查询审查详情列表", operDesc = "系统级事件", operType = "查询")
|
||||
// @PreAuthorize("@pms.hasPermission('sys:originalRecord:detailQuery')")
|
||||
public ServerResponse getDetailList(EncryptedReq<ParamsDto> data) {
|
||||
PageHelper.startPage(data.getData().getPage(), data.getData().getLimit());
|
||||
List<ExperimentalDetailVo> list = service.getDetailList(data.getData());
|
||||
PageInfo<ExperimentalDetailVo> pageInfo = new PageInfo<>(list);
|
||||
return ServerResponse.createSuccessPage(pageInfo, data.getData().getPage(), data.getData().getLimit());
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package com.bonus.aqgqj.basis.dao;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import org.apache.ibatis.annotations.MapKey;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:OriginalRecordMapper
|
||||
* @author:cwchen
|
||||
* @date:2024-07-24-14:12
|
||||
* @version:1.0
|
||||
* @description:原始记录-mapper
|
||||
*/
|
||||
@Repository("OriginalRecordMapper")
|
||||
public interface OriginalRecordMapper {
|
||||
|
||||
/**
|
||||
* 原始记录列表
|
||||
*
|
||||
* @param dto
|
||||
* @return List<ExperimentalVo>
|
||||
* @author cwchen
|
||||
* @date 2024/7/23 10:15
|
||||
*/
|
||||
List<ExperimentalVo> getList(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 原始记录审查详情列表
|
||||
*
|
||||
* @param dto
|
||||
* @return List<ExperimentalDetailVo>
|
||||
* @author cwchen
|
||||
* @date 2024/7/23 17:58
|
||||
*/
|
||||
List<ExperimentalDetailVo> getDetailList(ParamsDto dto);
|
||||
|
||||
/**
|
||||
* 查询试验设备数量
|
||||
* @param experId
|
||||
* @return List<Map < String, String>>
|
||||
* @author cwchen
|
||||
* @date 2024/7/23 18:16
|
||||
*/
|
||||
@MapKey("id")
|
||||
List<Map<String, String>> getExperDevItemsNum(Long experId);
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.bonus.aqgqj.basis.service;
|
||||
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @className:OriginalRecordService
|
||||
* @author:cwchen
|
||||
* @date:2024-07-24-14:12
|
||||
* @version:1.0
|
||||
* @description:原始记录-service
|
||||
*/
|
||||
public interface OriginalRecordService {
|
||||
|
||||
/**
|
||||
* 原始记录列表
|
||||
*
|
||||
* @param data
|
||||
* @return List<ExperimentalVo>
|
||||
* @author cwchen
|
||||
* @date 2024/7/23 10:14
|
||||
*/
|
||||
List<ExperimentalVo> getList(ParamsDto data);
|
||||
|
||||
/**
|
||||
* 原始记录审查详情列表
|
||||
* @param data
|
||||
* @return List<ExperimentalDetailVo>
|
||||
* @author cwchen
|
||||
* @date 2024/7/23 17:57
|
||||
*/
|
||||
List<ExperimentalDetailVo> getDetailList(ParamsDto data);
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.bonus.aqgqj.basis.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.bonus.aqgqj.basis.dao.OriginalRecordMapper;
|
||||
import com.bonus.aqgqj.basis.entity.dto.ParamsDto;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo;
|
||||
import com.bonus.aqgqj.basis.entity.vo.ExperimentalVo;
|
||||
import com.bonus.aqgqj.basis.service.OriginalRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @className:OriginalRecordServiceImpl
|
||||
* @author:cwchen
|
||||
* @date:2024-07-24-14:12
|
||||
* @version:1.0
|
||||
* @description:原始记录-impl
|
||||
*/
|
||||
@Service(value = "OriginalRecordService")
|
||||
@Slf4j
|
||||
public class OriginalRecordServiceImpl implements OriginalRecordService {
|
||||
|
||||
@Resource(name = "OriginalRecordMapper")
|
||||
private OriginalRecordMapper mapper;
|
||||
|
||||
@Override
|
||||
public List<ExperimentalVo> getList(ParamsDto dto) {
|
||||
List<ExperimentalVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getList(dto);
|
||||
for (ExperimentalVo vo : list) {
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExperimentalDetailVo> getDetailList(ParamsDto dto) {
|
||||
List<ExperimentalDetailVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getDetailList(dto);
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
for (ExperimentalDetailVo detailVo : list) {
|
||||
// 样品试验结果、样品数量、送样总数
|
||||
List<ExperimentalDetailVo.Sample> sampleList = new ArrayList<>();
|
||||
if (detailVo.getExperId() != null) {
|
||||
List<Map<String, String>> mapList = mapper.getExperDevItemsNum(detailVo.getExperId());
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
jsonArray.addAll(mapList);
|
||||
sampleList = jsonArray.toJavaList(ExperimentalDetailVo.Sample.class);
|
||||
}
|
||||
detailVo.setSampleList(sampleList);
|
||||
detailVo.setSampleQuantity(sampleList.size());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<?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.bonus.aqgqj.basis.dao.OriginalRecordMapper">
|
||||
|
||||
<!--原始记录列表-->
|
||||
<select id="getList" resultType="com.bonus.aqgqj.basis.entity.vo.ExperimentalVo">
|
||||
SELECT ts.id,
|
||||
tc.custom_name AS customName,
|
||||
DATE_FORMAT(ts.sample_time, '%Y-%m-%d') AS sampleTime,
|
||||
IFNULL(tsd.num,0) AS customNum,
|
||||
tsd.sampleDev,
|
||||
su.user_name AS sampleUserName,
|
||||
su2.user_name AS dispatchUserName,
|
||||
DATE_FORMAT(ts.sample_date, '%Y-%m-%d') AS sampleDate,
|
||||
tt.team_name AS teamName,
|
||||
ts.process_status AS status,
|
||||
<if test="roleCode == 'experimentalTeam'">
|
||||
WHEN process_status = 1 AND audti_status = 0 THEN '待审阅'
|
||||
END AS audtiStatus,
|
||||
</if>
|
||||
<if test="roleCode == 'technicalDirector'">
|
||||
WHEN process_status = 2 AND audti_status = 0 THEN '待审核'
|
||||
END AS audtiStatus,
|
||||
</if>
|
||||
<if test="roleCode=='centerManager'">
|
||||
WHEN process_status = 3 AND audti_status = 0 THEN '待审批'
|
||||
END AS audtiStatus,
|
||||
</if>
|
||||
<if test="roleCode == 'administrators'">
|
||||
CASE WHEN process_status = 1 AND audti_status = 0 THEN '待审阅'
|
||||
WHEN process_status = 2 AND audti_status = 0 THEN '待审核'
|
||||
WHEN process_status = 3 AND audti_status = 0 THEN '待审批'
|
||||
END AS audtiStatus,
|
||||
</if>
|
||||
ts.remarks
|
||||
FROM tb_sample ts
|
||||
LEFT JOIN tb_custom tc ON ts.custom_id = tc.id
|
||||
LEFT JOIN sys_user su ON ts.create_user = su.id AND su.del_flag = 0
|
||||
LEFT JOIN sys_user su2 ON ts.update_user = su2.id AND su2.del_flag = 0
|
||||
LEFT JOIN tb_team tt ON ts.team_id = tt.id AND tt.del_flag = 0
|
||||
LEFT JOIN (
|
||||
SELECT sample_id,COUNT(sample_id) AS num,ANY_VALUE(GROUP_CONCAT(DISTINCT dev_type_name)) AS sampleDev,ANY_VALUE(GROUP_CONCAT(DISTINCT dev_type_code)) AS sampleDevCode
|
||||
FROM tb_sample_device
|
||||
WHERE del_falg = 0
|
||||
GROUP BY sample_id
|
||||
) tsd ON tsd.sample_id = ts.id
|
||||
WHERE ts.del_flag = 0
|
||||
<if test="keyWord != null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tt.team_name,#{keyWord}) > 0 OR
|
||||
INSTR(su2.user_name,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
<if test="sampleUserName != null and sampleUserName!=''">
|
||||
AND INSTR(su.user_name,#{sampleUserName}) > 0
|
||||
</if>
|
||||
<if test="startTime != null and endTime!=''">
|
||||
AND DATE_FORMAT(ts.sample_date, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="devTypeCode != null and devTypeCode!=''">
|
||||
AND INSTR(tsd.sampleDevCode,#{devTypeCode})
|
||||
</if>
|
||||
/*管理员、技术负责人、中心负责人查询全部数据*/
|
||||
<if test="roleCode != 'administrators' and roleCode != 'technicalDirector' and roleCode != 'centerManager' and roleCode == 'experimentalTeamLeader'">
|
||||
/*试验班组-班组长审阅-只审阅本班组提交的审阅*/
|
||||
<if test="teamId != null">
|
||||
AND ts.team_id = #{teamId}
|
||||
</if>
|
||||
<if test="teamId ==null">
|
||||
AND ts.team_id = -1
|
||||
</if>
|
||||
</if>
|
||||
/*非管理员、非技术负责人、非中心负责人、非试验班组长无审查数据权限*/
|
||||
<if test="roleCode != 'administrators' and roleCode != 'technicalDirector' and roleCode != 'centerManager' and roleCode != 'experimentalTeamLeader'">
|
||||
AND ts.team_id = -1
|
||||
</if>
|
||||
/*班组长-审阅*/
|
||||
<if test="roleCode == 'experimentalTeam'">
|
||||
AND process_status = 1 AND audti_status = 0
|
||||
</if>
|
||||
/*技术负责人-审核*/
|
||||
<if test="roleCode == 'technicalDirector'">
|
||||
AND process_status = 2 AND audti_status = 0
|
||||
</if>
|
||||
/*中心负责人-审批*/
|
||||
<if test="roleCode=='centerManager'">
|
||||
AND process_status = 3 AND audti_status = 0
|
||||
</if>
|
||||
/*管理员*/
|
||||
<if test="roleCode=='administrators'">
|
||||
AND process_status IN (1,2,3) AND audti_status = 0
|
||||
</if>
|
||||
ORDER BY FIELD(audtiStatus, '待审阅','待审核','待审批') ASC,dispatch_time ASC
|
||||
</select>
|
||||
<!--原始记录审查详情列表-->
|
||||
<select id="getDetailList" resultType="com.bonus.aqgqj.basis.entity.vo.ExperimentalDetailVo">
|
||||
SELECT ANY_VALUE(tsd.sample_id) AS sampleId,
|
||||
ANY_VALUE(tsd.dev_type_name) AS devTypeName,
|
||||
tsd.dev_type_code AS devTypeCode,
|
||||
ANY_VALUE(te.id) AS experId,
|
||||
COUNT(tsd.dev_type_code) AS sampleNum,
|
||||
ANY_VALUE(te.audit_remakr) AS causeOfRejection,
|
||||
ANY_VALUE(su2.user_name) AS experimenter,
|
||||
ANY_VALUE(DATE_FORMAT(te.update_time, '%Y-%m-%d')) AS testTime,
|
||||
CASE WHEN ANY_VALUE(te.status) = 0 AND ANY_VALUE(te.audit_status) = 0 THEN '待提交'
|
||||
WHEN ANY_VALUE(te.status) = 1 AND ANY_VALUE(te.audit_status) = 0 THEN '待审阅'
|
||||
WHEN ANY_VALUE(te.status) = 1 AND ANY_VALUE(te.audit_status) = 2 THEN '审阅不通过'
|
||||
WHEN ANY_VALUE(te.status) = 2 AND ANY_VALUE(te.audit_status) = 0 THEN '待审核'
|
||||
WHEN ANY_VALUE(te.status) = 2 AND ANY_VALUE(te.audit_status) = 3 THEN '审核不通过'
|
||||
WHEN ANY_VALUE(te.status) = 3 AND ANY_VALUE(te.audit_status) = 0 THEN '待审批'
|
||||
WHEN ANY_VALUE(te.status) = 3 AND ANY_VALUE(te.audit_status) = 4 THEN '审批不通过'
|
||||
WHEN ANY_VALUE(te.status) = 4 AND ANY_VALUE(te.audit_status) = 1 THEN '试验完成'
|
||||
ELSE '待试验'
|
||||
END AS status
|
||||
FROM tb_sample_device tsd
|
||||
LEFT JOIN tb_exper te ON tsd.sample_id = te.sample_id AND tsd.dev_type_code = te.dev_type_code AND te.del_flag = 0
|
||||
LEFT JOIN sys_user su2 ON te.update_user = su2.id AND su2.del_flag = 0
|
||||
WHERE tsd.sample_id = #{id} AND tsd.del_falg = 0
|
||||
<if test="devTypeCode != null and devTypeCode!=''">
|
||||
AND INSTR(tsd.dev_type_code,#{devTypeCode})
|
||||
</if>
|
||||
<if test="startTime != null and endTime!=''">
|
||||
AND DATE_FORMAT(te.update_time, '%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(su2.user_name,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
GROUP BY tsd.dev_type_code
|
||||
</select>
|
||||
<!--查询试验设备数量-->
|
||||
<select id="getExperDevItemsNum" resultType="java.util.Map">
|
||||
SELECT dev_code AS devCode,
|
||||
case is_hg WHEN '1' THEN '不合格'
|
||||
WHEN '0' THEN '合格'
|
||||
ELSE '不合格' END AS testResult
|
||||
FROM tb_exper_dev
|
||||
WHERE exper_id = #{experId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,191 @@
|
|||
let form, layer, table, tableIns, laydate;
|
||||
let pageNum = 1, limitSize = 10; // 默认第一页,分页数量为10
|
||||
let deviceTypeList = [];
|
||||
layui.use(['form', 'layer', 'table', 'laydate'], function () {
|
||||
form = layui.form;
|
||||
layer = layui.layer;
|
||||
table = layui.table;
|
||||
laydate = layui.laydate;
|
||||
layui.form.render();
|
||||
deviceTypeList = getDictsSelect("dev_code");
|
||||
setDictSelectValue(deviceTypeList, 'devTypeCode');
|
||||
laydate.render({
|
||||
elem: '#ID-laydate-rangeLinked',
|
||||
range: ['#startTime', '#endTime'],
|
||||
rangeLinked: true // 开启日期范围选择时的区间联动标注模式 --- 2.8+ 新增
|
||||
});
|
||||
pages(1, 10, 1);
|
||||
})
|
||||
|
||||
function pages(pageNum, pageSize, typeNum) {
|
||||
let params = getReqParams(pageNum, pageSize, typeNum);
|
||||
$.ajax({
|
||||
url: dataUrl + "/examine/getList",
|
||||
headers: {
|
||||
"token": tokens
|
||||
},
|
||||
data: params,
|
||||
type: 'POST',
|
||||
async: false,
|
||||
success: function (result) {
|
||||
console.log(result);
|
||||
if (result.code === 200) {
|
||||
if (result.data) {
|
||||
initTable(result.data, result.limit, result.curr)
|
||||
laypages(result.count, result.curr, result.limit)
|
||||
}
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
}, error: function (xhr) {
|
||||
error(xhr);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function laypages(total, page, limit) {
|
||||
layui.use(['laypage'], function () {
|
||||
let laypage = layui.laypage;
|
||||
laypage.render({
|
||||
elem: 'voi-page',
|
||||
count: total,
|
||||
curr: page,
|
||||
limit: limit,
|
||||
limits: [10, 20, 50, 100, 200, 500],
|
||||
layout: ['prev', 'page', 'next', 'skip', 'count', 'limit'],
|
||||
groups: 5,
|
||||
jump: function (obj, first) {
|
||||
if (!first) {
|
||||
pageNum = obj.curr, limitSize = obj.limit;
|
||||
pages(obj.curr, obj.limit, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
/*初始化表格*/
|
||||
function initTable(dataList, limit, page) {
|
||||
let loadingMsg = layer.msg("数据加载中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
|
||||
tableIns = table.render({
|
||||
elem: "#table_data",
|
||||
height: "full-140",
|
||||
data: dataList,
|
||||
limit: limit,
|
||||
cols: [
|
||||
[
|
||||
//表头
|
||||
{
|
||||
title: "序号", width: 80, unresize: true, align: "center",
|
||||
templet: function (d) {
|
||||
return (page - 1) * limit + d.LAY_NUM;
|
||||
}
|
||||
},
|
||||
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
||||
{field: "sampleTime", title: "送样时间", unresize: true, align: "center"},
|
||||
{field: "sampleDev", title: "送样设备", unresize: true, align: "center"},
|
||||
{field: "customNum", title: "送样数量", unresize: true, align: "center"},
|
||||
{field: "sampleUserName", title: "收样人", unresize: true, align: "center"},
|
||||
{field: "sampleDate", title: "收样时间", unresize: true, align: "center"},
|
||||
{field: "teamName", title: "试验班组", unresize: true, align: "center"},
|
||||
{field: "audtiStatus", title: "状态", unresize: true, align: "center"},
|
||||
{
|
||||
title: "审查", unresize: true, width: 180, align: "center",
|
||||
templet: function (d) {
|
||||
let html = '';
|
||||
// html += "<a class='layui-icon layui-icon-edit' title='详情' onclick=\"addData('" + d.id + "')\"></a>";
|
||||
html += setButtonName(d.id, d.roleCode, d.status);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
],
|
||||
],
|
||||
done: function (res, curr, count) {
|
||||
layer.close(loadingMsg);
|
||||
table.resize("table_data");
|
||||
count || this.elem.next(".layui-table-view").find(".layui-table-header").css("display", "inline-block");
|
||||
count || this.elem.next(".layui-table-view").find(".layui-table-box").css("overflow", "auto");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 获取参数
|
||||
function getReqParams(page, limit, type) {
|
||||
let obj = {};
|
||||
if (!type) {
|
||||
obj = {
|
||||
page: page + "",
|
||||
limit: limit + "",
|
||||
keyWord: $('#keyWord').val(),
|
||||
startTime: $('#startTime').val(),
|
||||
endTime: $('#endTime').val(),
|
||||
devTypeCode: $('#devTypeCode').val(),
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
page: '1',
|
||||
limit: '10',
|
||||
keyWord: '',
|
||||
accessType: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
devTypeCode: ''
|
||||
};
|
||||
}
|
||||
obj = {
|
||||
encryptedData: encryptCBC(JSON.stringify(obj))
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// 查询/重置
|
||||
function query() {
|
||||
let pattern = new RegExp("[%_<>]");
|
||||
if (pattern.test($("#ip").val())) {
|
||||
$("#ip").val('');
|
||||
return layer.msg('ip查询包含特殊字符,请重新输入', {
|
||||
icon: 2,
|
||||
time: 2000 //2秒关闭(如果不配置,默认是3秒)
|
||||
});
|
||||
}
|
||||
pageNum = 1;
|
||||
pages(1, limitSize);
|
||||
}
|
||||
|
||||
function reloadData() {
|
||||
pages(pageNum, limitSize);
|
||||
}
|
||||
|
||||
// 审核数据
|
||||
function auditData(id, status, btnName) {
|
||||
let title = btnName
|
||||
let param = {
|
||||
'id': id,
|
||||
'status':status
|
||||
}
|
||||
openIframe3("auditData", title, "child/auditData.html", '1500px', '800px', param);
|
||||
}
|
||||
|
||||
const data = {
|
||||
administrators1: '审阅',
|
||||
administrators2: '审核',
|
||||
administrators3: '审批',
|
||||
experimentalTeamLeader1: '审阅',
|
||||
technicalDirector2: '审核',
|
||||
centerManager3: '审批'
|
||||
};
|
||||
|
||||
function getValueByKey(obj, key) {
|
||||
return obj[key];
|
||||
}
|
||||
|
||||
/**设置审核类型*/
|
||||
function setButtonName(id, value, status) {
|
||||
let cent = "";
|
||||
const btnName = getValueByKey(data, value + status)
|
||||
if (btnName) {
|
||||
cent += "<a title='" + btnName + "' onclick=\"auditData('" + id + "','" + status + "','" + btnName + "')\">" + btnName + "</a>";
|
||||
}
|
||||
return cent;
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link rel="stylesheet" href="../../js/layui-v2.9.14/layui/css/layui.css">
|
||||
<link rel="stylesheet" href="../../css/table-common2.css">
|
||||
<script src="../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/layui-v2.9.14/layui/layui.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../js/publicJs.js"></script>
|
||||
<script src="../../js/commonUtils.js"></script>
|
||||
<script src="../../js/openIframe.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<script src="../../js/select.js"></script>
|
||||
<title>试验数据-审查</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<div class="basic-search-box layout">
|
||||
<form class="layui-form basic-form" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<select class="layui-select" id="devTypeCode">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline" id="ID-laydate-rangeLinked">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" autocomplete="off" readonly id="startTime" class="layui-input"
|
||||
placeholder="开始日期">
|
||||
</div>
|
||||
<div class="layui-form-mid">-</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" autocomplete="off" readonly id="endTime" class="layui-input"
|
||||
placeholder="结束日期">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="keyWord" maxlength="30" class="layui-input" autocomplete="off"
|
||||
placeholder="请输入关键字">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline btns">
|
||||
<button type="button" class="layui-btn layui-btn-normal layui-btn-sm btn-1" onclick="query(1)">查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table id="table_data" class="table" lay-filter="table_data"></table>
|
||||
<div id="voi-page" class="layout"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<style>
|
||||
.layui-table-init {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script src="../../js/basis/originalRecord.js" charset="UTF-8" type="text/javascript"></script>
|
||||
</html>
|
||||
Loading…
Reference in New Issue