添加查看考生档案,查看危险化学品生产单位电子证件功能

This commit is contained in:
wans 2021-06-25 17:52:21 +08:00
parent 9196b530f3
commit b4bc3d1581
11 changed files with 766 additions and 2 deletions

View File

@ -0,0 +1,40 @@
package cn.com.tenlion.controller.api.personfiles;
import cn.com.tenlion.service.personfiles.IPersonFilesService;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
/**
* 人员档案controller
* @author xwangs
* @create 2021-06-24 15:56
* @description
*/
@RestController
@RequestMapping(ISystemConstant.API_PREFIX + "/person-files")
public class PersonFilesController extends DefaultBaseController {
@Autowired
private IPersonFilesService personFilesService;
@GetMapping("list")
public SuccessResultList list(ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return personFilesService.list(page);
}
@GetMapping("get-certificate")
public Map<String, Object> getCertificate() {
Map<String, Object> params = requestParams();
return personFilesService.getCertificate(params);
}
}

View File

@ -0,0 +1,29 @@
package cn.com.tenlion.dao.personfiles;
import org.springframework.stereotype.Repository;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2021-06-24 16:10
* @description
*/
@Repository
public interface IPersonFilesDao {
/**
* 人员档案列表
* @param params
* @return
*/
List<Map<String, Object>> list(Map<String, Object> params);
/**
* 查询工种证件对应关系
* @param params
* @return
*/
Map<String, Object> getCertificateMapping(Map<String, Object> params);
}

View File

@ -65,6 +65,8 @@ public class ApplyStudentsDTO {
private Integer applyAuditState; private Integer applyAuditState;
@ApiModelProperty(name = "applyTestScores", value = "考试成绩") @ApiModelProperty(name = "applyTestScores", value = "考试成绩")
private String applyTestScores; private String applyTestScores;
@ApiModelProperty(name = "bindUserAccount", value = "同意用户ID")
private String bindUserAccount;
@ApiModelProperty(name = "creator", value = "创建人") @ApiModelProperty(name = "creator", value = "创建人")
private String creator; private String creator;
@ApiModelProperty(name = "gmtCreate", value = "创建时间") @ApiModelProperty(name = "gmtCreate", value = "创建时间")
@ -345,4 +347,12 @@ public class ApplyStudentsDTO {
public void setExamEndTime(String examEndTime) { public void setExamEndTime(String examEndTime) {
this.examEndTime = examEndTime; this.examEndTime = examEndTime;
} }
public String getBindUserAccount() {
return bindUserAccount == null ? "" : bindUserAccount;
}
public void setBindUserAccount(String bindUserAccount) {
this.bindUserAccount = bindUserAccount;
}
} }

View File

@ -0,0 +1,28 @@
package cn.com.tenlion.service.personfiles;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import java.util.Map;
/**
* @author xwangs
* @create 2021-06-24 16:07
* @description
*/
public interface IPersonFilesService {
/**
* 人员档案列表
* @param page
* @return
*/
SuccessResultList list(ListPage page);
/**
* 根据档案查询对应证件
* @param params
* @return
*/
Map<String, Object> getCertificate(Map<String, Object> params);
}

View File

@ -0,0 +1,76 @@
package cn.com.tenlion.service.personfiles.impl;
import cn.com.tenlion.dao.personfiles.IPersonFilesDao;
import cn.com.tenlion.pojo.dtos.applystudentsnew.ApplyStudentsNewDTO;
import cn.com.tenlion.pojo.dtos.classplan.ClassPlanDTO;
import cn.com.tenlion.service.applystudentsnew.IApplyStudentsNewService;
import cn.com.tenlion.service.classplan.IClassPlanService;
import cn.com.tenlion.service.personfiles.IPersonFilesService;
import cn.com.tenlion.util.CertificateUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.exceptions.SearchException;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xwangs
* @create 2021-06-24 16:08
* @description
*/
@Service
public class PersonFilesServiceImpl extends DefaultBaseService implements IPersonFilesService {
@Autowired
private IPersonFilesDao personFilesDao;
@Autowired
private IApplyStudentsNewService studentsNewService;
@Autowired
private IClassPlanService classPlanService;
@Autowired
private CertificateUtil certificateUtil;
@Override
public SuccessResultList list(ListPage page) {
String orgId = page.getParams().get("orgId") == null ? "" : page.getParams().get("orgId").toString();
if("".equals(orgId)){
return new SuccessResultList(new ArrayList<>(), 0, 0L);
}
PageHelper.startPage(page.getPage(), page.getRows());
List<Map<String, Object>> list = personFilesDao.list(page.getParams());
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(list);
return new SuccessResultList(list, pageInfo.getPageNum(), pageInfo.getTotal());
}
@Override
public Map<String, Object> getCertificate(Map<String, Object> params) {
if(params.get("applyStudentsNewId") == null
|| params.get("applyStudentsNewId").toString().length() == 0){
throw new SearchException("主键丢失,查询不到人员档案");
}
String applyStudentsNewId = params.get("applyStudentsNewId").toString();
ApplyStudentsNewDTO applyStudentsNewDTO = studentsNewService.get(applyStudentsNewId);
ClassPlanDTO classPlanDTO = classPlanService.get(applyStudentsNewDTO.getClassPlanId());
String workTypeId = classPlanDTO.getWorkerCatalog();
params.put("workTypeId","9f1ac1a6-7c17-4e1f-a44b-0d2de9b623ef");
Map<String, Object> certificateMapping = personFilesDao.getCertificateMapping(params);
String mappingCode = certificateMapping.get("mappingCode").toString();
String certificateB64 = "";
switch (mappingCode){
case "TS0002" :
certificateB64 = certificateUtil.getTS0002(applyStudentsNewDTO);
break;
}
Map<String, Object> resultMap = new HashMap<>(4);
resultMap.put("certificateB64",certificateB64);
return resultMap;
}
}

View File

@ -0,0 +1,65 @@
package cn.com.tenlion.util;
import cn.com.tenlion.buildingpictures.service.picturestemplatebuilding.IPicturesTemplateBuildingService;
import cn.com.tenlion.pojo.dtos.applystudents.ApplyStudentsDTO;
import cn.com.tenlion.pojo.dtos.applystudentsnew.ApplyStudentsNewDTO;
import cn.com.tenlion.pojo.dtos.cardential.CardentialDTO;
import cn.com.tenlion.service.applystudents.IApplyStudentsService;
import ink.wgink.module.dictionary.pojo.dtos.DataDTO;
import ink.wgink.module.dictionary.service.IDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
/**
* 生成证书的工具类
* @author xwangs
* @create 2021-06-25 10:42
* @description
*/
@Component
public class CertificateUtil {
@Autowired
private IApplyStudentsService studentsService;
@Autowired
private IDataService dataService;
@Autowired
private IPicturesTemplateBuildingService picService;
public String getTS0002(ApplyStudentsNewDTO applyStudentsNewDTO){
Map<String, Object> query = new HashMap<>(8);
query.put("applyClassId", applyStudentsNewDTO.getClassPlanId());
query.put("bindUserAccount",applyStudentsNewDTO.getUserId());
ApplyStudentsDTO studentsDTO = studentsService.get(query);
CardentialDTO cardentialDTO = new CardentialDTO();
cardentialDTO.setPhoto(studentsDTO.getApplyUserCardPhoto());
cardentialDTO.setName(applyStudentsNewDTO.getName());
cardentialDTO.setSex(applyStudentsNewDTO.getSex());
// 查询文化程度
if(applyStudentsNewDTO.getEducation() == null
|| applyStudentsNewDTO.getEducation().length() == 0){
cardentialDTO.setEducationDegree("EMPTY");
} else {
DataDTO educationData = dataService.get(applyStudentsNewDTO.getEducation());
cardentialDTO.setEducationDegree(educationData.getDataName());
}
cardentialDTO.setIdentity(applyStudentsNewDTO.getCardNumber());
cardentialDTO.setDepartment(applyStudentsNewDTO.getWorkUnit());
cardentialDTO.setPosition(applyStudentsNewDTO.getWorkTitle());
cardentialDTO.setSueDate(applyStudentsNewDTO.getGetCardTime());
cardentialDTO.setStartDate(applyStudentsNewDTO.getGetCardTime());
cardentialDTO.setEndDate(applyStudentsNewDTO.getGetCardTime());
cardentialDTO.setNumber(applyStudentsNewDTO.getIdCard());
cardentialDTO.setQrCode("");
String certificateB64;
try {
certificateB64 = picService.buildingPictures("TS0002",cardentialDTO);
} catch (Exception e){
return "";
}
return certificateB64;
}
}

View File

@ -27,6 +27,7 @@
<result column="apply_user_card_photo" property="applyUserCardPhoto"/> <result column="apply_user_card_photo" property="applyUserCardPhoto"/>
<result column="apply_audit_state" property="applyAuditState"/> <result column="apply_audit_state" property="applyAuditState"/>
<result column="apply_test_scores" property="applyTestScores"/> <result column="apply_test_scores" property="applyTestScores"/>
<result column="bind_user_account" property="bindUserAccount"/>
<result column="creator" property="creator"/> <result column="creator" property="creator"/>
<result column="gmt_create" property="gmtCreate"/> <result column="gmt_create" property="gmtCreate"/>
<result column="modifier" property="modifier"/> <result column="modifier" property="modifier"/>
@ -306,11 +307,22 @@
t1.apply_technical_titles, t1.apply_technical_titles,
t1.apply_user_card_photo, t1.apply_user_card_photo,
t1.apply_audit_state, t1.apply_audit_state,
t1.apply_test_scores t1.apply_test_scores,
t1.bind_user_account
FROM FROM
e_apply_students t1 e_apply_students t1
WHERE WHERE
t1.is_delete = 0 AND t1.apply_id = #{applyId} t1.is_delete = 0
<if test="applyId != null and applyId != ''">
AND t1.apply_id = #{applyId}
</if>
<if test="applyClassId != null and applyClassId != ''">
AND t1.apply_class_id = #{applyClassId}
</if>
<if test="bindUserAccount != null and bindUserAccount != ''">
AND t1.bind_user_account = #{bindUserAccount}
</if>
limit 1
</select> </select>
<!-- 班级学生表详情 --> <!-- 班级学生表详情 -->

View File

@ -0,0 +1,49 @@
<?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="cn.com.tenlion.dao.personfiles.IPersonFilesDao">
<select id="list" parameterType="map" resultType="map">
SELECT
t1.*,
t2.plan_type planType,
t2.plan_number planNumber,
t2.plan_name planName,
t3.work_type_name workTypeName,
t3.work_type_id workTypeId
FROM
e_apply_students_new t1
LEFT JOIN e_class_plan t2 ON t1.class_plan_id = t2.class_plan_id
LEFT JOIN e_work_type t3 ON t2.worker_catalog = t3.work_type_id
WHERE
t1.is_delete = '0'
<if test="orgId != null and orgId != ''">
AND t1.org_id = #{orgId}
</if>
<if test="workerCatalog != null and workerCatalog != ''">
AND t2.worker_catalog = #{workerCatalog}
</if>
<if test="keywords != null and keywords !='' ">
AND (
t1.name LIKE CONCAT('%', #{keywords}, '%')
OR
t1.card_number LIKE CONCAT('%', #{keywords}, '%')
OR
t1.phone LIKE CONCAT('%', #{keywords}, '%')
OR
t3.work_type_name LIKE CONCAT('%', #{keywords}, '%')
)
</if>
</select>
<select id="getCertificateMapping" parameterType="map" resultType="map">
SELECT
t1.work_type_id workTypeId,
t1.work_type_name workTypeName,
t1.mapping_code mappingCode
FROM
e_certificate_mapping t1
WHERE
t1.work_type_id = #{workTypeId}
limit 1
</select>
</mapper>

View File

@ -0,0 +1,151 @@
<!doctype html>
<html lang="en">
<head>
<base href="/signup/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" href="assets/js/vendor/zTree3/css/metroStyle/metroStyle.css"/>
<link rel="stylesheet" href="assets/layuiadmin/style/common.css" media="all">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-row layui-col-space15">
<div class="layui-col-md2 layui-col-sm2 layui-col-xs2">
<div class="layui-card">
<div class="layui-card-body left-tree-wrap">
<div id="leftTreeWrap">
<ul id="leftTree" class="ztree"></ul>
</div>
</div>
</div>
</div>
<div class="layui-col-md10 layui-col-sm10 layui-col-xs10">
<div class="layui-card">
<div id="listContentWrap" class="layui-card-body">
<blockquote id="treeTitle" class="layui-elem-quote">所有人员档案</blockquote>
<iframe id="listContent" frameborder="0" class="layadmin-iframe" style="margin-top: 65px;"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
var common;
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'ztree', 'common'], function() {
common = layui.common;
var $ = layui.$;
var $win = $(window);
var resizeTimeout = null;
var parentId = '0';
var parentName = '';
var orgId = '';
function initData(){
initSize();
getOrgInfo();
}
initData();
// 初始化大小
function initSize() {
$('#leftTreeWrap').css({
height: $win.height() - 40,
overflow: 'auto'
});
$('#listContentWrap').css({
height: $win.height() - 120,
});
}
function getOrgInfo(){
top.restAjax.get(top.restAjax.path('api/teacher/getorginfo', []), {}, null, function (code, data) {
orgId = data.institutionId;
initThree();
$('#listContent').attr('src', top.restAjax.path('route/personfiles/list-person-files.html?orgId={arg1}&workerCatalog={arg2}',
[orgId,'']));
}, function (code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化树
function initThree() {
var setting = {
async: {
enable: true,
autoLoad: false,
type: 'get',
url: top.restAjax.path('api/lessons/list-tree-org-work-type?orgId={orgId}', [orgId]),
autoParam: ['id'],
dataFilter: function (treeId, parentNode, childNodes) {
if (!childNodes) return null;
for (var i = 0, l = childNodes.length; i < l; i++) {
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
var str = childNodes[i].name.split('-');
childNodes[i].name = str[0];
childNodes[i].realName = str[0];
}
return childNodes;
}
},
callback: {
onClick: function (event, treeId, treeNode) {
if(treeNode.pId == '-1'){
$('#treeTitle').text('所有人员档案');
$('#listContent').attr('src', top.restAjax.path('route/personfiles/list-person-files.html?orgId={arg1}&workerCatalog={arg2}',
[orgId,'']));
return;
}
if(treeNode.isParent == true){
return;
}
parentId = treeNode.id;
parentName = treeNode.realName;
$('#treeTitle').text(parentName);
initIFrame();
return false;
}
},
};
var zTree = $.fn.zTree.init($("#leftTree"), setting);
zTree.addNodes(null, {
id: '0',
pId: '-1',
name: '所有开设工种',
url: 'javascript:;',
isParent: 'true'
});
common.refreshTree('leftTree');
}
// 初始化IFrame
function initIFrame() {
$('#listContent').attr('src', top.restAjax.path('route/personfiles/list-person-files.html?orgId={arg1}&workerCatalog={arg2}',
[orgId,parentId]));
}
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
initSize();
}, 500);
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,244 @@
<!doctype html>
<html lang="en">
<head>
<base href="/signup/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<div class="test-table-reload-btn" style="margin-bottom: 10px;">
<div class="layui-inline">
<input type="text" id="keywords" class="layui-input search-item" autocomplete="off"
style="width: 240px;" placeholder="培训类别|姓名|证件号码|手机号">
</div>
<button type="button" id="search" class="layui-btn layui-btn-sm">
<i class="fa fa-lg fa-search"></i> 搜索
</button>
</div>
<table class="layui-hide" id="dataTable" lay-filter="dataTable"></table>
</div>
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table', 'laydate', 'common'], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var common = layui.common;
var resizeTimeout = null;
var orgId = top.restAjax.params(window.location.href).orgId;
var workerCatalog = top.restAjax.params(window.location.href).workerCatalog;
var tableUrl = 'api/person-files/list';
function initData(){
initTable();
}
initData();
// 初始化表格
function initTable() {
table.render({
elem: '#dataTable',
id: 'dataTable',
url: top.restAjax.path(tableUrl, []),
width: admin.screen() > 1 ? '100%' : '',
height: $win.height() - 60,
limit: 20,
limits: [20, 40, 60, 80, 100, 200],
where :{
orgId: orgId,
workerCatalog : workerCatalog
},
toolbar: false,
request: {
pageName: 'page',
limitName: 'rows'
},
cols: [
[
{field:'rowNum', width:80, title: '序号', fixed: 'left', align:'center', templet: '<span>{{d.LAY_INDEX}}</span>'},
{width: 150, title: '操作', align:'center',
templet: function(row) {
var dom = '<div class="layui-btn-group">';
dom += '<button type="button" class="layui-btn layui-btn-xs" lay-event="showPersonFiles">查看详情</button>';
dom += '<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" lay-event="showCertificate">查看证件</button>';
dom += '</div>';
return dom;
}
},
{field: 'name', width: 100, title: '姓名', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{width: 300, title: '参培班次', align:'center',
templet: function(row) {
var planNumber = row['planNumber'];
var planType = row['planType'];
var planName = row['planName'];
var text = '';
var planNumber = '[' + planNumber + '] ';
if(planType == '1'){
text = '[初训] ' + text;
}
if(planType == '2'){
text = '[复训] ' + text;
}
return text + planNumber + planName;
}
},
{field: 'workTypeName', width: 200, title: '工种名称', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'sex', width: 80, title: '性别', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{width: 250, title: '证件号码', align:'center',
templet: function(row) {
return '[' + row['card_type_name'] + ']' + row['card_number'];
}
},
{field: 'phone', width: 140, title: '联系方式', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
{field: 'exam_grade', width: 140, title: '知识成绩', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
return rowData;
}
},
]
],
page: true,
parseData: function(data) {
return {
'code': 0,
'msg': '',
'count': data.total,
'data': data.rows
};
}
});
}
// 重载表格
function reloadTable(currentPage) {
table.reload('dataTable', {
url: top.restAjax.path(tableUrl, []),
where: {
keywords: $('#keywords').val(),
orgId: orgId,
workerCatalog : workerCatalog
},
page: {
curr: currentPage
},
height: $win.height() - 60,
});
}
table.on('tool(dataTable)', function(obj) {
var layEvent = obj.event;
var checkStatus = table.checkStatus('dataTable');
var checkDatas = checkStatus.data;
if(layEvent == 'showPersonFiles'){
layer.open({
type: 2,
title: '查看档案',
closeBtn: 1,
area: ['90%', '90%'],
shadeClose: false,
anim: 2,
content: top.restAjax.path('route/applystudentsnew/update.html?applyStudentsNewId={arg}',
[obj.data.apply_students_new_id]),
end: function () {
reloadTable();
}
});
}
if(layEvent == 'showCertificate'){
var applyStudentsNewId = obj.data.apply_students_new_id;
layer.open({
type: 2,
title: '查看 [' + obj.data.workTypeName + '] 证件',
closeBtn: 1,
area: ['90%', '90%'],
shadeClose: false,
anim: 2,
content: top.restAjax.path('route/personfiles/show-certificate.html?applyStudentsNewId={arg1}',
[applyStudentsNewId]),
end: function () {
reloadTable();
}
});
}
});
// 事件 - 页面变化
$win.on('resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(function() {
reloadTable();
}, 500);
});
// 事件 - 搜索
$(document).on('click', '#search', function() {
reloadTable(1);
});
$(document).on('keydown', function (e) {
if(e.keyCode == 13){
reloadTable(1);
}
})
});
</script>
</body>
</html>

View File

@ -0,0 +1,60 @@
<!doctype html>
<html lang="en">
<head>
<base href="/signup/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-card">
<div class="layui-card-body" style="padding: 15px;text-align: center">
<img id="certificateB64" src="" alt="生成失败" style="display: none;">
</div>
</div>
</div>
</div>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'table',], function() {
var $ = layui.$;
var $win = $(window);
var table = layui.table;
var admin = layui.admin;
var laydate = layui.laydate;
var applyStudentsNewId = top.restAjax.params(window.location.href).applyStudentsNewId;
function initData(){
getCertificate();
$('.layui-card').height($('.layui-card').height() > $win.height() ?
$('.layui-card').height() : $win.height())
}
initData();
function getCertificate(){
top.restAjax.get(top.restAjax.path('api/person-files/get-certificate', []),
{applyStudentsNewId : applyStudentsNewId}, null, function (code, data) {
$("#certificateB64").attr("src",data.certificateB64);
$("#certificateB64").show();
}, function (code, data) {
top.dialog.msg(data.msg);
});
}
});
</script>
</body>
</html>