hn_cloud_web/smz-web/pages/work/ownPerson/faceChangeExam.html

116 lines
4.4 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="../../../css/work/person/faceContrast/faceChangeExam.css">
<link rel="stylesheet" href="../../../layui/css/layui.css">
</head>
<body>
<div class="face-pics">
<div class="origin-pic">
<img id="yzp" src="">
<h3>原照片</h3>
</div>
<div class="change-pic">
<img id="bgzp" src="">
<h3>变更照片</h3>
</div>
</div>
<h2 class="divide">意见</h2>
<div class="ipt-area">
<textarea class="text-ipt" id="yj"></textarea>
<div class="btn-area">
<button class="layui-btn" id="agreeOpinion">同意</button>
<button class="layui-btn layui-btn-danger" style="margin-left: 0 !important;" id="rejectOpinion">驳回</button>
</div>
</div>
</body>
<script type="text/javascript" src="../../../js/libs/jquery-3.6.0.js"></script>
<script type="text/javascript" src="../../../js/jq.js"></script>
<script type="text/javascript" src="../../../js/plugin/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="../../../js/plugin/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="../../../js/my/permission.js"></script>
<script type="text/javascript" src="../../../layui/layui.js"></script>
<script type="text/javascript" src="../../../js/publicJs.js"></script>
<script type="text/javascript" src="../../../js/dict.js"></script>
<script>
// 初始化LayUI
layui.use('layer', function() {
var layer = layui.layer;
$('#bgzp').attr('src', `${localStorage.getItem('filePath')}`)
if (localStorage.getItem('yzpPath')) {
$('#yzp').attr('src', `${localStorage.getItem('yzpPath')}`)
}
// 按钮点击事件监听
$('#agreeOpinion').click(function() {
// 发送Ajax请求
var opinion= $('.text-ipt').val();
var type = "1";
layui.$.ajax({
url: ctxPath + '/WorkerDepartFaceContrast/faceChanges',
type: 'put', // 或 'GET'
data: {
id: localStorage.getItem('id'),
type: type,
opinion: opinion,
token: localStorage.getItem('token')
},
dataType: 'text', // 如果返回的是JSON数据类型可以设置为json
success: function(data) {
// 请求成功处理逻辑
parent.layer.msg(data, {icon: 1, time: 2000});
setTimeout("reloading()", 2100);
},
error: function(xhr, status, error) {
// 请求失败处理逻辑
layer.msg('请求失败');
}
});
});
// 按钮点击事件监听
$('#rejectOpinion').click(function() {
var yj = $("#yj").val();
if(yj==""||yj=="null"||yj==null){
parent.layer.msg("请填写意见");
}else{
// 发送Ajax请求
var opinion= $('.text-ipt').val();
var type = "2";
layui.$.ajax({
url: ctxPath + '/WorkerDepartFaceContrast/faceChanges',
type: 'put', // 或 'GET'
data: {
id: localStorage.getItem('id'),
type: type,
opinion: opinion,
token: localStorage.getItem('token')
},
dataType: 'text', // 如果返回的是JSON数据类型可以设置为json
success: function(data) {
// 请求成功处理逻辑
parent.layer.msg(data, {icon: 1, time: 2000});
setTimeout("reloading()", 2100);
},
error: function(xhr, status, error) {
// 请求失败处理逻辑
layer.msg('请求失败');
}
});
}
});
});
function reloading() {
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
parent.layer.close(index); //再执行关闭
window.parent.example.ajax.reload( null, false ); // 刷新页面
}
</script>
</html>