// ==UserScript==
// @icon http://www.tzr.me/images/2019/01/26/111.png
// @name 华医通审核助手
// @author zhiwen-T
// @namespace [url=mailto:1649991905@qq.com]1649991905@qq.com[/url]
// @description 华医通审核助手V1.0
// @include *://h5hyt.cd120.com/admin*
// @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js
// @version 1.0.0
// @version 0.0.1.20190127142547
// @downloadURL none
// ==/UserScript==
var a = '
';
//将以上的html代码插入到网页里的ul标签中
$("div.ant-layout-sider-children").append(a);
var b = '';
//将以上的html代码插入到网页里的ul标签中
$("div.ant-layout-sider-children").append(b);
$(document).on("click","#kaiqi",function(){
console.log('关闭助手');
clearInterval(out);//停止功能1
clearInterval(aaa);//停止功能2
//$("#zhushou").html("审核助手X");
$("#kaiqi").hide();//隐藏按钮(0~0)
$("#guanbi").show();//显示按钮(0~0)
})
$(document).on("click","#guanbi",function(){
console.log('开启助手');
out=setInterval(f,100) //重新开始功能1
aaa=setInterval(ff,500)//重新开始功能2
//$("#zhushou").html("审核助手√");
$("#kaiqi").show();//隐藏按钮(0~0)
$("#guanbi").hide();//显示按钮(0~0)
})
var out = setInterval(f,100);//100毫秒后运行刷新 (循环)
function f(){
var url = window.location.href;
if(url.indexOf("tabStatu") >= 0 ){//2、判断循环条件;
if(location.href.indexOf('#') < 1){
location.href=location.href+"#";
location.href=location.href+"%";
location.reload();
}
}
}
var aaa = setInterval(ff,500);//100毫秒后运行刷新 (循环)
function ff(){
var url = window.location.href;
if(url.indexOf("tabStatu") >= 0 ){//2、判断循环条件;
if(location.href.indexOf('%') < 1){
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list";//跳转到主页
}
}
}
$(document).ready(function() {
// 刷新后页面加载完成
//setInterval(function(){//220毫秒后运行下列程序 循环
setTimeout(function(){//220毫秒后运行下列程序 一次
var url = window.location.href;
if(url.indexOf("tabStatu") >= 0 ) { //判断url地址中是否包含tabStatu字符串
//alert("包含tabStatu字符");
$(".ant-btn.ant-btn-primary").hide();//隐藏原按钮(0~0)
$(".ant-btn.ant-btn-sm").hide();
$(".ant-btn.ant-btn-danger").hide();
var as = document.getElementsByTagName('p');// 获取所有 P标签内容,
var img1 =document.getElementById("images1").getElementsByTagName("img")[0].src //获取正面照
var img2 =document.getElementById("images2").getElementsByTagName("img")[0].src //获取反面照
var img3 =document.getElementById("images3").getElementsByTagName("img")[0].src //获取手持照
////将以下的html代码插入到网页里的第一个P标签中
var down_btn_html = ''; //添加确认和返回按钮
down_btn_html += '
';
down_btn_html += '
';
down_btn_html += '
';
down_btn_html += ''+as[2].innerText+'
'; //添加患者名字
//down_btn_html += ''+as[9].innerText+'
'; //添加审核状态
//down_btn_html += ''+as[10].innerText+'
'; //添加操作人
//down_btn_html += ''+as[11].innerText+'
'; //添加审核时间
down_btn_html += ''+as[12].innerText+'
'; //添加审核理由
down_btn_html += '';//添加适应div ,背景
down_btn_html += '
';
down_btn_html += '
';//添加正面照
down_btn_html += '
';
down_btn_html += '';
down_btn_html += '
';
down_btn_html += '
';
down_btn_html += '
';//添加反面照
down_btn_html += '
';
down_btn_html += '';
down_btn_html += '
';
down_btn_html += '
';
down_btn_html += '
';//添加手持照
down_btn_html += '
';
down_btn_html += '';
down_btn_html += '
';
down_btn_html += '
'; // 背景 style="background-color:#AFEEEE"width:100px;height:50px;
down_btn_html += '
快捷键“1”
';
down_btn_html += '
快捷键“2”
';
down_btn_html += '
快捷键“3”
';
down_btn_html += '
快捷键“4”
';
down_btn_html += '
快捷键“5”
';
down_btn_html += '
';
down_btn_html += '
';
$("p:first").before(down_btn_html); //将以上的html代码插入到网页里的第一个P标签中
var imges = document.getElementsByTagName('img');//单击图片即可放大
imges[0].click();
imges[1].click();
imges[2].click();
imges[3].click();
imges[4].click();
imges[5].click();
imges[6].click();
var obj = document.getElementsByClassName("aaaa"); //移动到确认,返回按钮的效果
for(var i = 0; i < obj.length; i ++) {
if (obj[i].type.toLowerCase() == 'button') {
obj[i].onmouseover = function() {
this.style.backgroundColor = '#40A9FF';
this.style.color = '#FFFFFF';
}
obj[i].onmouseout = function() {
this.style.backgroundColor = '#1890FF';
this.style.color = '#FFFFFF';
}
}
}
var obj = document.getElementsByClassName("bbbb");//移动到未通过按钮的效果
for(var i = 0; i < obj.length; i ++) {
if (obj[i].type.toLowerCase() == 'button') {
obj[i].onmouseover = function() {
this.style.backgroundColor = '#FF4D4F';
this.style.color = '#F5F5F5';
}
obj[i].onmouseout = function() {
this.style.backgroundColor = '#F5F5F5';
this.style.color = '#FF4D4F';
}
}
}
$("#re1").click(function(){ //点击按钮id=re1 的功能
var url1 = window.location.href;
$(".ant-btn.ant-btn-primary").trigger("click");
setTimeout(function(){
var btns = document.getElementsByClassName("ant-btn");
if(btns.length<4){
setTimeout(function(){
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list";//跳转到主页
},500);
}else{
setTimeout(function(){//520毫秒后运行下列程序
btns[4].click();
setTimeout(function(){
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list";//跳转到主页
if(url.indexOf("tabStatu") >= 0 ){
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list";//跳转到主页
setTimeout(function(){
if(url.indexOf("tabStatu") >= 0 ){
setTimeout(function(){
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list";//跳转到主页
if(url.indexOf("tabStatu") >= 0 ){
setTimeout(function(){
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list";//跳转到主页
},1020);
}
},520);
}
},120);
}
},520);
},420);
}
},420);
});
$("#re2").click(function(){ //点击按钮id=re2 的功能
console.log('返回');
// var btns = document.getElementsByClassName("ant-btn");
// btns[3].click();
var url_home = "https://h5hyt.cd120.com/admin/realname/card/list";//你要跳的链接
window.location.href = url_home;//跳转到主页
});
$("#re3").click(function(){ //点击按钮id=re3 的功能
aaa=setInterval(f,100)//重新开始定时器判断
setTimeout(function(){//1020毫秒后运行下列程序 一次
$(".ant-btn.ant-btn-danger").trigger("click");
var editorWin=document.getElementById('failReason').contentWindow;
$("#failReason").focus().trigger("click");
// $("#failReason").select; //选择全部文本
$('#failReason').val('您未上传手持证件照,请您手持身份证合拍照片重新上传或者使用人脸识别的功能进行验证'); //设置value文本为*****
//setTimeout(function(){//1020毫秒后运行下列程序 一次
// $(".ant-btn.ant-btn-primary").click(); //点击确认
// },1020);
function sendkey(keychar){ //模拟按键点击触发textarea监听的oninput事件(不起作用。。。。)
var ev = document.createEvent("KeyboardEvent");//模拟按键点击触发textarea监听的oninput事件(不起作用。。。。)
var keycode = keychar.charCodeAt(); //模拟按键点击触发textarea监听的oninput事件(不起作用。。。。)
ev.initKeyEvent("keydown", true, true, null, 0, 0, 0, 0,keycode,keychar);
document.dispatchEvent(ev); //模拟按键点击触发textarea监听的oninput事件(不起作用。。。。)
}
},220);
});
$("#re4").click(function(){//点击按钮id=re4 的功能
aaa=setInterval(f,100)//重新开始定时器判断
setTimeout(function(){//1020毫秒后运行下列程序 一次
$(".ant-btn.ant-btn-danger").trigger("click");
var editorWin=document.getElementById('failReason').contentWindow;
$("#failReason").focus().trigger("click");
$('#failReason').val('您上传的手持证件照未符合要求(请您手持身份证合拍照片),请您重新上传或者使用人脸识别的功能进行验证'); //设置value文本为*****
//setTimeout(function(){//1020毫秒后运行下列程序 一次
// $(".ant-btn.ant-btn-primary").click(); //点击确认
// },1020);
},220);
});
$("#re5").click(function(){//点击按钮id=re5 的功能
aaa=setInterval(f,100)//重新开始定时器判断
setTimeout(function(){//1020毫秒后运行下列程序 一次
$(".ant-btn.ant-btn-danger").trigger("click");
var editorWin=document.getElementById('failReason');
$("#failReason").focus().trigger("click");
$('#failReason').val('翻拍的身份证,无法判断是否是本人注册,请本人重新用实体身份证拍摄上传。建议使用人脸识别的功能进行验证'); //设置value文本为*****
//setTimeout(function(){//1020毫秒后运行下列程序 一次
// $(".ant-btn.ant-btn-primary").click(); //点击确认
// },1020);
},220);
});
$("#re6").click(function(){//点击按钮id=re6的功能
aaa=setInterval(f,100)//重新开始定时器判断
setTimeout(function(){//1020毫秒后运行下列程序 一次
$(".ant-btn.ant-btn-danger").click();
$("#failReason").focus().trigger("click");
$('#failReason').val('您上传的证件照的信息不清晰或被遮挡(请保持证件照清晰的展示了全部信息),建议使用人脸识别的功能进行验证'); //设置value文本为*****
//setTimeout(function(){//1020毫秒后运行下列程序 一次
// $(".ant-btn.ant-btn-primary").click(); //点击确认
// },1020);
},220);
});
$("#re7").click(function(){//点击按钮id=re7 的功能
aaa=setInterval(f,100)//重新开始定时器判断
setTimeout(function(){//1020毫秒后运行下列程序 一次
$(".ant-btn.ant-btn-danger").click();
var editorWin=document.getElementById('failReason').contentWindow;
document.getElementById('failReason').focus()
$('#failReason').val('您注册电子就诊卡的证件号与实名证件信息不匹配(请保持注册证件与实名证件信息统一,无身份证可使用户口簿或出生证),建议人脸识别的功能进行验证'); //设置value文本为*****
//setTimeout(function(){//1020毫秒后运行下列程序 一次
// $(".ant-btn.ant-btn-primary").click(); //点击确认
// },1020);
},220);
});
$("#xxxxxxxxxxx").click(function(){//点击按钮id=xxxxxxxxxxx 的功能
$(".ant-btn.ant-btn-primary").click();
setTimeout(function(){//1020毫秒后运行下列程序 一次
$(".ant-btn.ant-btn-primary").click();
if(url.indexOf("//h5hyt.cd120.com/admin/realname/card/list") <= 0 ){
setTimeout(function(){//1020毫秒后运行下列程序 一次
window.location.href = "https://h5hyt.cd120.com/admin/realname/card/list"
},1020);
}
},220);
});
$("#xxxxxxxxxxx").click(function(){//点击按钮id=xxxxxxxxxxx 的功能
$("p").remove(); //全局判断按钮被点击
});
$(document).keydown(function(event){
if(event.keyCode == 97){
$("#re3").click();
}else if (event.keyCode == 98){
$("#re4").click();
}
else if (event.keyCode == 99){
$("#re5").click();
}
else if (event.keyCode == 100){
$("#re6").click();
}
else if (event.keyCode == 101){
$("#re7").click();
}
else if (event.keyCode == 37){ //按左← 键返回
$("#re2").click();
}
else if (event.keyCode == 39){
var url1 = window.location.href; //按右→键调往下一个ID
var sec = url1.split("?")[1].split("&")[0].split("=")[1];
var num = Number(sec)
var num2 = num + 1
var url_Id = "https://h5hyt.cd120.com/admin/realname/card/detail?id="+num2;//你要跳的链接加id
var url_Id2 = url_Id+"&status=1&realnameType=MC&tabStatus=1" //你要跳的链接加id+1
window.location.href = url_Id2;//跳转
}
else if (event.keyCode == 96){ //按0确认
$("#re1").click();
}
else if (event.keyCode == 13){ //按0确认
setTimeout(function(){
var btns = document.getElementsByClassName("ant-btn");
if(btns.length<4){
setTimeout(function(){
$(".ant-btn.ant-btn-primary").click();
},100);
}else{
btns[4].click();
setTimeout(function(){
//btns[4].click(); // 延时点击确认,防止点错(已取消)
},420);
}
},100);
}
});
}
},220);
});