studio打开文件:…web/scripts/epr.menu.js
复制下面代码,加到文件的最后。注意查看代码中的注释,对应修改:exclamation:
// 结算清单编目跳转 --DIP系统使用
function loginDIP(lnk, newwin) {
var url = lnk + "?token=";
var param = "app=HIS&username=" + session['LOGON.USERCODE'];
// 下面的role 和 page 是固定值,每个项目都不一样,DIP系统提供,你替换一下
param += "&role=69d5d0323f8e535ae4247edd65c9062b&page=2d6ce1723c47977770b17ce7b3231edf";
param += "×tamp=" + new Date().getTime();
param = base64Encode(param);
url = url + param;
// PassDetails(url,newwin); // 有医为浏览器的解开这个注释。
exec("chrome " + url); // 老his是ie的,要用谷歌登录
}
function base64Encode(str) {
var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;
str = utf8Encode(str);
while (i < str.length) {
chr1 = str.charCodeAt(i++);
chr2 = str.charCodeAt(i++);
chr3 = str.charCodeAt(i++);
enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;
if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}
output = output +
keyStr.charAt(enc1) + keyStr.charAt(enc2) +
keyStr.charAt(enc3) + keyStr.charAt(enc4);
}
return output;
}
function utf8Encode(string) {
string = string.replace(/\r\n/g, "\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
} else if ((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
} else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
}
studio打开文件:…web/scripts/websys.js
检查文件中是否有方法:exec
没有的,将下面的方法添加到最后。
// exec('cmd.exe /c "time 10:40"')
function exec(command) {
window.oldOnError=window.onerror;
window._command=command;
window.onerror= function(err){
if(err.indexOf('utomation')>-1) {
alert(websys_unicode_trans.command + window._command + websys_unicode_trans.disableByUser);
return true;
}else{
return false;
}
};
var wsh=new ActiveXObject('WScript.Shell');
if (wsh) {
wsh.Run(command);
}
window.onerror = window.oldOnError;
}
var websys_unicode_trans = {
sessionTimeOutReLogon:"\u4F1A\u8BDD\u5DF2\u8D85\u671F\uFF0C\u8BF7\u9000\u51FA\u91CD\u65B0\u767B\u5F55\u3002", /*会话已超期,请退出重新登录*/
pageNotOperateReLogon:"\u754C\u9762\u957F\u65F6\u95F4\u672A\u64CD\u4F5C\uFF0C\u8BF7\u9000\u51FA\u91CD\u65B0\u767B\u5F55", /*界面长时间未操作,请退出重新登录*/
command:"\u547D\u4EE4", /*命令*/
disableByUser:"\u5DF2\u7ECF\u88AB\u7528\u6237\u7981\u6B62\uFF01",/*已经被用户禁止!*/
yes:"\u662F",/*是*/
notConnectInternet:"\u6CA1\u6709\u8FDE\u63A5\u5230Internet", /*没有连接到Internet*/
dialog:"\u5BF9\u8BDD\u6846", /*对话框*/
notContent:"\u65E0\u5185\u5BB9", /*无内容*/
selectImportFile:"\u8BF7\u9009\u62E9\u9700\u8981\u5BFC\u5165\u7684\u6587\u4EF6" , /*请选择需要导入的文件*/
waitingSign:"\u7B49\u5F85\u7B7E\u540D", /*等待签名*/
certAuth:"\u8BC1\u4E66\u8BA4\u8BC1" /*证书认证*/
}
1、增加菜单
连接CSP或界面:http://192.168.101.84:8093/misl/sso(用你们项目自己的ip)
javascript函数:loginDIP
测试:
访问量: 363066