diff --git a/index.html b/index.html index 91592bd..0028fcd 100644 --- a/index.html +++ b/index.html @@ -13,5 +13,7 @@
+ + \ No newline at end of file diff --git a/public/a.json b/public/a.json deleted file mode 100644 index e69de29..0000000 diff --git a/public/imgs/video/1.jpg b/public/imgs/video/1.jpg new file mode 100644 index 0000000..fb9be98 Binary files /dev/null and b/public/imgs/video/1.jpg differ diff --git a/public/imgs/video/2.jpg b/public/imgs/video/2.jpg new file mode 100644 index 0000000..a9e1e69 Binary files /dev/null and b/public/imgs/video/2.jpg differ diff --git a/public/imgs/video/3.jpg b/public/imgs/video/3.jpg new file mode 100644 index 0000000..cab076a Binary files /dev/null and b/public/imgs/video/3.jpg differ diff --git a/public/imgs/video/4.jpg b/public/imgs/video/4.jpg new file mode 100644 index 0000000..317d97e Binary files /dev/null and b/public/imgs/video/4.jpg differ diff --git a/public/imgs/video/5.jpg b/public/imgs/video/5.jpg new file mode 100644 index 0000000..3354468 Binary files /dev/null and b/public/imgs/video/5.jpg differ diff --git a/public/imgs/video/地址.txt b/public/imgs/video/地址.txt new file mode 100644 index 0000000..c33ea34 --- /dev/null +++ b/public/imgs/video/地址.txt @@ -0,0 +1,14 @@ +1 +http://65.47.6.105:18080/#/play/wasm/ws%3A%2F%2F65.47.6.105%3A8080%2Frtp%2F43012457021185000003_34020000001320000033.live.flv + +2 +http://65.47.6.105:18080/#/play/wasm/ws%3A%2F%2F65.47.6.105%3A8080%2Frtp%2F43012457021185000003_34020000001320000028.live.flv + +3 +http://65.47.6.105:18080/#/play/wasm/ws%3A%2F%2F65.47.6.105%3A8080%2Frtp%2F43012457021185000003_34020000001320000002.live.flv + +4 +http://65.47.6.105:18080/#/play/wasm/ws%3A%2F%2F65.47.6.105%3A8080%2Frtp%2F43012457021185000003_34020000001320000019.live.flv + +5 +http://65.47.6.105:18080/#/play/wasm/ws%3A%2F%2F65.47.6.105%3A8080%2Frtp%2F43012457021185000003_34020000001320000011.live.flv diff --git a/public/js/authen.js b/public/js/authen.js new file mode 100644 index 0000000..8c3a5de --- /dev/null +++ b/public/js/authen.js @@ -0,0 +1,246 @@ +/* eslint-disable */ +var JIT_AUTHEN = function () { + + // initParam:PNX初始化参数,数据可从网关系统:认证管理->Key类型管理中导出 + var initParam = "" + + "" + + "" + //软证书 + "" + //SKFAPI20079.dll 海泰20079 + ""; + + //请求随机数地址 + var randomUrl = "/api/jitGWRandom"; + //请求p7认证地址 + var P7certAuthUrl = "/api/jitGWAuthP7"; + //请求p1认证地址 + var P1certAuthUrl = "/api/jitGWAuthP1"; + + return{ + InitParam : initParam, + //请求生成随机数 + random : function () { + var randomResult = ""; + $.ajax({ + url : randomUrl, + type : "post", + async: false, + data : "", + success : function (data) { + randomResult= data; + }, + error : function () { + }, + datatype : "json" + }) + return randomResult; + }, + + //请求p7认证方法 + P7certAuth : function (random,signed_data) { + var authResult = ""; + $.ajax({ + url : P7certAuthUrl, + type : "post", + async: false, + data : {"random":random,"signed_data":signed_data}, + success : function (data) { + authResult = data ; + }, + error : function () { + }, + datatype : "json", + }) + return authResult; + }, + + //请求p1认证 + P1certAuth : function (random,signed_data,certBase64,hashAlg) { + var authResult = ""; + $.ajax({ + url : P1certAuthUrl, + type : "post", + async: false, + data : {"random":random,"signed_data":signed_data,"certBase64":certBase64,"hashAlg":hashAlg}, + success : function (data) { + authResult = data ; + }, + error : function () { + }, + datatype : "json", + }) + return authResult; + }, + + //p7方式签名数据处理 + AuthP7Sign: function (random) { + // 调用网关工具脚本中的detachSignStr(P7)进行签名,并返回签名结果 + var sign_Result = ""; + try { + //用于判断插件是否可用(可选) + JIT_GW_ExtInterface.GetVersion(); + } catch (e) { + alert("未安装控件,请进行安装控件"); + window.location.href = "/PNXClient.exe"; + } + try { + //清理过滤条件(可选) + JIT_GW_ExtInterface.ClearFilter(); + // 初始化KEY信息 + JIT_GW_ExtInterface.Initialize("", initParam); + // 控制证书为一个时,不弹出证书选择框(可选) + JIT_GW_ExtInterface.SetChooseSingleCert(1); + // 添加过滤条件,颁发者过滤、同DN时SM2优先级设置等(可选) + //同DN情况下优先使用sm2证书 + // JIT_GW_ExtInterface.AddFilter(11,"2"); + //强制弹PIN码(可选) + //JIT_GW_ExtInterface.SetForcePinDialog(0); + } catch (e) { + alert("调用方法失败:" + JIT_GW_ExtInterface.GetLastErrorMessage()); + } + try { + // 原文做P7签名 + sign_Result = JIT_GW_ExtInterface.P7SignString(random, true, true); + } catch (e) { + alert("生成签名信息失败:" + JIT_GW_ExtInterface.GetLastErrorMessage()); + } + if (JIT_GW_ExtInterface.GetLastError() != 0) { + if (JIT_GW_ExtInterface.GetLastError() == 3758096386 || JIT_GW_ExtInterface.GetLastError() == 2148532334 || JIT_GW_ExtInterface.GetLastError() == 3758096385) { + alert("用户取消操作"); + } else if (JIT_GW_ExtInterface.GetLastError() == -536870815 || JIT_GW_ExtInterface.GetLastError() == 3758096481) { + alert("没有找到有效的证书,如果使用的是KEY,请确认已经插入key"); + } else { + alert(JIT_GW_ExtInterface.GetLastErrorMessage()); + } + } + // 释放签名对象 + JIT_GW_ExtInterface.Finalize(); + // 返回签名结果 + return sign_Result; + }, + + //p7带下拉框方式的签名数据处理 + AuthP7Sign_certSelect : function(authContent, certsn) { + var sign_Result = ""; + try { + // 用于判断插件是否可用(可选) + JIT_GW_ExtInterface.GetVersion(); + } catch (e) { + alert("未安装控件,请进行安装控件"); + window.location.href = "/PNXClient.exe"; + } + try { + //清理过滤条件(可选) + JIT_GW_ExtInterface.ClearFilter(); + // 初始化KEY信息 + JIT_GW_ExtInterface.Initialize("", initParam); + //下拉框参考Cert_Select方法 + // 根据SN过滤唯一证书 + JIT_GW_ExtInterface.AddFilter(1,certsn); + // 设置单证书不弹出对话框 + JIT_GW_ExtInterface.SetChooseSingleCert(1); + //强制弹PIN码(可选) + JIT_GW_ExtInterface.SetForcePinDialog(0); + } catch (e) { + alert("调用方法失败:" + JIT_GW_ExtInterface.GetLastErrorMessage()); + } + try { + // 原文做P7签名 + sign_Result = JIT_GW_ExtInterface.P7SignString (authContent, true, true); + } catch (e) { + alert("生成签名信息失败:" + JIT_GW_ExtInterface.GetLastErrorMessage()); + } + if (JIT_GW_ExtInterface.GetLastError() != 0) { + if (JIT_GW_ExtInterface.GetLastError() == 3758096386 + || JIT_GW_ExtInterface.GetLastError() == 2148532334 || JIT_GW_ExtInterface.GetLastError() == 3758096385) { + alert("用户取消操作"); + } else if (JIT_GW_ExtInterface.GetLastError() == -536870815 + || JIT_GW_ExtInterface.GetLastError() == 3758096481) { + alert("没有找到有效的证书,如果使用的是KEY,请确认已经插入key"); + } else { + alert(JIT_GW_ExtInterface.GetLastErrorMessage()); + } + } + // 释放签名对象 + JIT_GW_ExtInterface.Finalize(); + // 返回签名结果对象 + return sign_Result; + }, + + //p1带下拉框方式的签名数据处理 + AuthP1Sign_certSelect : function(random, certsn, pin) { + var sign_ResultObj = ""; + try { + // 用于判断插件是否可用(可选) + JIT_GW_ExtInterface.GetVersion(); + } catch (e) { + alert("未安装控件,请进行安装控件"); + window.location.href = "/PNXClient.exe"; + } + try { + //清理过滤条件(可选) + JIT_GW_ExtInterface.ClearFilter(); + // 初始化KEY信息 + JIT_GW_ExtInterface.Initialize("", initParam); + } catch (e) { + alert("调用方法失败:" + JIT_GW_ExtInterface.GetLastErrorMessage()); + } + //下拉框展示部分参考p1Select方法 + try { + // 原文做P1签名 + var signobj = JIT_GW_ExtInterface.P1SignWithPin(certsn, pin, random); + sign_ResultObj = JSON.parse(signobj); + if (sign_ResultObj.result != 0) { + if (sign_ResultObj.remainretrycount < 0) { + var errorMessage = JIT_GW_ExtInterface.GetLastErrorMessage(); + alert(errorMessage); + } else { + alert("输入的pin码不正确,还剩余" + sign_ResultObj.remainretrycount + "次重试次数"); + } + } + } catch (e) { + alert("生成签名信息失败:" + JIT_GW_ExtInterface.GetLastErrorMessage()); + } + if (JIT_GW_ExtInterface.GetLastError() != 0) { + if (JIT_GW_ExtInterface.GetLastError() == 3758096386 + || JIT_GW_ExtInterface.GetLastError() == 2148532334 || JIT_GW_ExtInterface.GetLastError() == 3758096385) { + alert("用户取消操作"); + } else if (JIT_GW_ExtInterface.GetLastError() == -536870815 + || JIT_GW_ExtInterface.GetLastError() == 3758096481) { + alert("没有找到有效的证书,如果使用的是KEY,请确认已经插入key"); + } else { + alert(JIT_GW_ExtInterface.GetLastErrorMessage()); + } + } + // 释放签名对象 + JIT_GW_ExtInterface.Finalize(); + // 返回签名结果对象 + return sign_ResultObj; + }, + + //获取证书列表 + getCertList : function () { + // 初始化KEY信息 + JIT_GW_ExtInterface.Initialize("",initParam); + // 添加过滤条件,颁发者过滤、同DN时SM2优先级设置等(可选) + //同DN情况下优先使用sm2证书 + // JIT_GW_ExtInterface.AddFilter(11,"2"); + // 获取证书列表 + var cert = JIT_GW_ExtInterface.GetCertList(); + var arr = cert.split("\r\n"); + var options=[]; + for (var i = 0; i < arr.length; i++) { + var option={}; + var ele = arr[i]; + var n = ele.lastIndexOf(" "); + var dn = ele.substr(0, n); + var sn = ele.substr(n + 1); + option.sn=sn; + option.dn=dn; + options.push(option); + } + // 释放签名对象 + JIT_GW_ExtInterface.Finalize(); + return options; + }, + } +}(); \ No newline at end of file diff --git a/public/js/pnxclient.js b/public/js/pnxclient.js new file mode 100644 index 0000000..9d82bdc --- /dev/null +++ b/public/js/pnxclient.js @@ -0,0 +1,873 @@ +/* eslint-disable */ +var JIT_GW_ExtInterface = function(){ + + var currentSessionWSURL = ""; + var useActioveX = false; + var useNPPlugin = false; + + /** + * simple polyfill Object.assign for IE <= 11 + * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + * @param {Object} target - target options + * @param {Object} options - new options + */ + var extendOptions = function (target, options) { + if (typeof Object.assign === 'function') { + Object.assign(target, options) + } else { + // for IE < 11 + for (var key in options) { + target[key] = options[key] + } + } + } + + var options = {}; + + var checkSessionWSURL = function () + { + if( currentSessionWSURL=="" ) + { + if ("https:" == document.location.protocol) + { + currentSessionWSURL = SendAndWaitMessage("https://127.0.0.1:10087/", "QueryService"); + } + else + { + currentSessionWSURL = SendAndWaitMessage("http://127.0.0.1:10086/", "QueryService"); + } + } + } + + // 是否是IE + var isUseActioveX = function () + { + if (!!window.ActiveXObject || "ActiveXObject" in window) + { + //try + //{ + // var ax = new ActiveXObject("PNXClient.PNXDataTrans"); + // useActioveX = true; + //} + //catch(e) + //{ + // useActioveX = false; + //} + useActioveX = true; + } + else + { + useActioveX = false; + } + } + + // 是否使用NPPlugin + var isUseNPPlugin = function() + { + checkSessionWSURL(); + if ("{\"value\":\"\"}" == currentSessionWSURL) + { + useNPPlugin = true; + } + else + { + useNPPlugin = false; + } + } + + var addActioveX = function(){ + document.write(""); + } + + var addNPPlugin = function(){ + document.write(""); + } + + var SendAndWaitMessageEx = function (operatorCmd, sendMsg) + { + checkSessionWSURL(); + var strSendMsg = operatorCmd + ":" + sendMsg; + + return SendAndWaitMessage(currentSessionWSURL, strSendMsg); + } + + var SendAndWaitMessage = function (wsurl, sendMsg) + { + var ResultMsg = "{\"value\":\"\"}"; + + if( ResultMsg == wsurl ) + { + return ; + } + try{ + var globalXmlHttpRequest = new XMLHttpRequest(); + globalXmlHttpRequest.open("POST", wsurl, false); + globalXmlHttpRequest.setRequestHeader("Content-Type", "text/plain;charset=UTF-8"); + globalXmlHttpRequest.send(sendMsg); + ResultMsg = globalXmlHttpRequest.responseText; + }catch(e){ + currentSessionWSURL = ""; + if (options.onError) { + options.onError.call(undefined, e); + } + } + return ResultMsg; + } + + return { + Config: function(extendOption) { + if (extendOption && typeof extendOption === 'object') { + extendOptions(options, extendOption) + } + }, + Init: function() + { + isUseActioveX(); + if (useActioveX) { + addActioveX(); + } + else + { + isUseNPPlugin(); + if (useNPPlugin){ + addNPPlugin(); + } + } + }, + // 功能:返回客户端的版本 HRESULT GetClientVersion([out,retval] BSTR* bstrClientVersion); + GetClientVersion: function() + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetClientVersion(); + } + else + { + var result = JSON.parse(SendAndWaitMessageEx("GetClientVersion", "")); + return result.value; + } + }, + + // 功能:下载客户端程序并安装 HRESULT SetupClient([in] BSTR strURL, [in] BSTR strHashValue, [in] BOOL bSync, [in] BOOL bOnlySSO, [out,retval] LONG* lRetVal); + SetupClient: function (bstrURL, bstrHashValue, bSync, bOnlySSO) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetupClient(bstrURL, bstrHashValue, bSync, bOnlySSO); + } + else + { + var jsonstr = {"strURL":bstrURL,"strHashValue":bstrHashValue,"bSync":bSync,"bOnlySSO":bOnlySSO}; + var result = JSON.parse(SendAndWaitMessageEx("SetupClient", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取硬件指纹信息 HRESULT GetFinger([in] ULONG dwSign, [in] BSTR strGateWayIP, [out,retval] BSTR* bstrFinger); + GetFinger: function (dwSign, strGateWayIP) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetFinger(dwSign, strGateWayIP); + } + else + { + var jsonstr = {"dwSign":dwSign, "strGateWayIP":strGateWayIP}; + var result = JSON.parse(SendAndWaitMessageEx("GetFinger", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:设置转发策略和代填策略 HRESULT SetPolicy([in] BSTR strProxyPolicy, [in] BSTR strSSOPolicy, [in] BSTR strGatewayAddress, [out,retval] LONG* lRetVal); + SetPolicy:function (strProxyPolicy, strSSOPolicy, strGatewayAddress) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetPolicy(strProxyPolicy, strSSOPolicy, strGatewayAddress); + } + else + { + var jsonstr = {"strProxyPolicy":strProxyPolicy, "strSSOPolicy":strSSOPolicy, "strGatewayAddress":strGatewayAddress}; + var result = JSON.parse(SendAndWaitMessageEx("SetPolicy", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:启动认证信息模块 HRESULT GetAuthToken([in] BSTR strFileName,[in] BSTR strXmlData,[out,retval] BSTR* bstrInfo); + GetAuthToken: function (strFileName, strXmlData) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetAuthToken(strFileName, strXmlData); + } + else + { + var jsonstr = {"strFileName":strFileName, "strXmlData":strXmlData}; + var result = JSON.parse(SendAndWaitMessageEx("GetAuthToken", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:打开BS应用 HRESULT NavigateURL([in] BSTR strUrl, [out,retval] LONG* lRetVal); + NavigateURL: function (strUrl) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.NavigateURL(strUrl); + } + else + { + var jsonstr = {"strUrl":strUrl}; + var result = JSON.parse(SendAndWaitMessageEx("NavigateURL", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:打开CS应用 HRESULT ExecuteCS([in] BSTR strGatewayAddress, [in] BSTR strAppFlag, [in] BSTR strAppPath, [out,retval] LONG* lRetVal); + ExecuteCS: function (strGatewayAddress, strAppFlag, strAppPath) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.ExecuteCS(strGatewayAddress, strAppFlag, strAppPath); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress, "strAppFlag":strAppFlag, "strAppPath":strAppPath}; + var result = JSON.parse(SendAndWaitMessageEx("ExecuteCS", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:设置自动更新策略 HRESULT SetUpdatePolicy([in] BSTR strGatewayAddress, [in] SHORT nGatewayPort, [in] BSTR strUserToken, [in] ULONG ulUpdateDelay, [out, retval] LONG* lRetVal); + SetUpdatePolicy: function (strGatewayAddress, nGatewayPort, strUserToken, updatedelay) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetUpdatePolicy(strGatewayAddress, nGatewayPort, strUserToken, updatedelay); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress, "nGatewayPort":nGatewayPort, "strUserToken":strUserToken, "ulUpdateDelay":updatedelay}; + var result = JSON.parse(SendAndWaitMessageEx("SetUpdatePolicy", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取客户端IP HRESULT GetClientIP([in] BSTR strGatewayIP, [out, retval] BSTR* RetVal); + GetClientIP: function (strGatewayIP) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetClientIP(strGatewayIP); + } + else + { + var jsonstr = {"strGatewayIP":strGatewayIP}; + var result = JSON.parse(SendAndWaitMessageEx("GetClientIP", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:登出网关 HRESULT GWLogout([in] BSTR strServerIP, [out, retval] LONG* lRetVal); + GWLogout: function (strServerIP) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GWLogout(strServerIP); + } + else + { + var jsonstr = {"strServerIP":strServerIP}; + var result = JSON.parse(SendAndWaitMessageEx("GWLogout", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:运行安装包: 0 非静默安装,1 静默安装,2 同步安装,4 异步安装 HRESULT RunSetup([in] LONG lRunType, [in] BOOL bIsOnlySSO, [out, retval] LONG* lRetVal); + RunSetup: function (lRunType, bIsOnlySSO) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.RunSetup(lRunType, bIsOnlySSO); + } + else + { + var jsonstr = {"lRunType":lRunType, "bIsOnlySSO":bIsOnlySSO}; + var result = JSON.parse(SendAndWaitMessageEx("RunSetup", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取下载进度 HRESULT GetDownloadProgress([out, retval] LONG* lRetVal); + GetDownloadProgress: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetDownloadProgress(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetDownloadProgress", jsonstr)); + return result.value; + } + }, + + // 功能:是否安装完成 HRESULT IsInstallComplete([out, retval] BOOL* lRetVal); + IsInstallComplete: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.IsInstallComplete(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("IsInstallComplete", jsonstr)); + return result.value; + } + }, + + // 功能:初始化签包对象 HRESULT Initialize([in] BSTR strAlgType, [in] BSTR strAuxParam, [out,retval] LONG* Result); + Initialize: function (strAlgType, strAuxParam) + { + if(useActioveX|| useNPPlugin ) + { + return PNXGWClient.Initialize(strAlgType, strAuxParam); + } + else + { + var jsonstr = { "strAlgType":strAlgType, "strAuxParam":strAuxParam }; + var result = JSON.parse(SendAndWaitMessageEx("Initialize", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:设置摘要算法 HRESULT SetDigestAlg([in] BSTR strDigestAlg, [out,retval] LONG* Result); + SetDigestAlg: function (strDigestAlg) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetDigestAlg(strDigestAlg); + } + else + { + var jsonstr = {"strDigestAlg":strDigestAlg}; + var result = JSON.parse(SendAndWaitMessageEx("SetDigestAlg", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:设置单证书是否弹出对话框 HRESULT SetChooseSingleCert([in] ULONG isChoose, [out,retval] LONG* Result); + SetChooseSingleCert: function (isChoose) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetChooseSingleCert(isChoose); + } + else + { + var jsonstr = {"isChoose":isChoose}; + var result = JSON.parse(SendAndWaitMessageEx("SetChooseSingleCert", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:添加证书过滤条件 HRESULT AddFilter([in] ULONG ulType, [in] BSTR strValue, [out,retval] LONG* Result); + AddFilter: function (ulType, strValue) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.AddFilter(ulType, strValue); + } + else + { + var jsonstr = {"ulType":ulType, "strValue":strValue}; + var result = JSON.parse(SendAndWaitMessageEx("AddFilter", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:清除所有过滤条件 HRESULT ClearFilter([out,retval] LONG* Result); + ClearFilter: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.ClearFilter(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("ClearFilter", jsonstr)); + return result.value; + } + }, + + // 功能:P1签名 HRESULT P1Sign([in] BSTR strValueBase64, [out,retval] BSTR* Result); + P1Sign: function (strValueBase64) + { + if(useActioveX|| useNPPlugin ) + { + return PNXGWClient.P1Sign(strValueBase64); + } + else + { + var jsonstr = {"strValueBase64":strValueBase64}; + var result = JSON.parse(SendAndWaitMessageEx("P1Sign", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:P1签名字符串 HRESULT P1SignString([in] BSTR strValue, [out,retval] BSTR* Result); + P1SignString: function (strValue) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.P1SignString(strValue); + } + else + { + var jsonstr = {"strValue":strValue}; + var result = JSON.parse(SendAndWaitMessageEx("P1SignString", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:P7签名 HRESULT P7Sign([in] BSTR strValueBase64,[in] VARIANT_BOOL isDetach,[in] VARIANT_BOOL isIncludeCert, [out,retval] BSTR* Result); + P7Sign: function (strValueBase64, isDetach, isIncludeCert) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.P7Sign(strValueBase64, isDetach, isIncludeCert); + } + else + { + var jsonstr = {"strValueBase64":strValueBase64, "isDetach":isDetach, "isIncludeCert":isIncludeCert}; + var result = JSON.parse(SendAndWaitMessageEx("P7Sign", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:P7签名字符串 HRESULT P7SignString([in] BSTR strValue,[in] VARIANT_BOOL isDetach,[in] VARIANT_BOOL isIncludeCert, [out,retval] BSTR* Result); + P7SignString: function (strValue, isDetach, isIncludeCert) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.P7SignString(strValue, isDetach, isIncludeCert); + } + else + { + var jsonstr = {"strValue":strValue, "isDetach":isDetach, "isIncludeCert":isIncludeCert}; + var result = JSON.parse(SendAndWaitMessageEx("P7SignString", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:释放签名对象 HRESULT Finalize([out,retval] LONG* Result); + Finalize: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.Finalize(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("Finalize", jsonstr)); + return result.value; + } + }, + + // 功能:获取签名版本 HRESULT GetSignVersion([out,retval] BSTR* Result); + GetSignVersion: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetSignVersion(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetSignVersion", jsonstr)); + return result.value; + } + }, + + // 功能:获取签名证书 HRESULT GetSignCert([out,retval] BSTR* RetCert); + GetSignCert: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetSignCert(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetSignCert", jsonstr)); + return result.value; + } + }, + + // 功能:获取错误码 HRESULT GetLastError([out,retval] ULONG* RetLong); + GetLastError: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetLastError(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetLastError", jsonstr)); + return result.value; + } + }, + + // 功能:获取错误信息 HRESULT GetLastErrorMessage([out,retval] BSTR* RetStr); + GetLastErrorMessage: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetLastErrorMessage(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetLastErrorMessage", jsonstr)); + return result.value; + } + }, + + // 功能:销毁认证对象 HRESULT DestoryAuth([out,retval] LONG* lRetVal); + DestoryAuth: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.DestoryAuth(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("DestoryAuth", jsonstr)); + return result.value; + } + }, + + // 功能:获取证书类型 HRESULT GetSignCertType([out,retval] BSTR* RetCertType); + GetSignCertType: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetSignCertType(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetSignCertType", jsonstr)); + return result.value; + } + }, + + // 功能:获取签名摘要算法 HRESULT GetSignHash([out,retval] BSTR* RetSignHash); + GetSignHash: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetSignHash(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetSignHash", jsonstr)); + return result.value; + } + }, + + // 功能:使能调用序列 HRESULT CallQueueEnable([in] BOOL bCallQueueEnable, [in] BOOL bHeadInfoEnable, [out,retval] LONG* lRetVal); + CallQueueEnable: function (bCallQueueEnable, bHeadInfoEnable) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.CallQueueEnable(bCallQueueEnable, bHeadInfoEnable); + } + else + { + var jsonstr = {"bCallQueueEnable":bCallQueueEnable, "bHeadInfoEnable":bHeadInfoEnable}; + var result = JSON.parse(SendAndWaitMessageEx("CallQueueEnable", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:清空调用序列结果 HRESULT CallQueueClear([out,retval] LONG* lRetVal); + CallQueueClear: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.CallQueueClear(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("CallQueueClear", jsonstr)); + return result.value; + } + }, + + // 功能:获取调用序列结果 HRESULT CallQueueGet([out,retval] BSTR* bstrRetVal); + CallQueueGet: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.CallQueueGet(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("CallQueueGet", jsonstr)); + return result.value; + } + }, + + // 功能:客户端安全策略检查 HRESULT DoClientSecurityCheck([in] BSTR strGatewayAddress, [in] SHORT usGatewayPort, [in] BSTR strSecurityPolicys, [out,retval] BOOL* RetVal); + DoClientSecurityCheck: function (strGatewayAddress, usGatewayPort, strSecurityPolicys) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.DoClientSecurityCheck(strGatewayAddress, usGatewayPort, strSecurityPolicys); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress, "usGatewayPort":usGatewayPort, "strSecurityPolicys":strSecurityPolicys}; + var result = JSON.parse(SendAndWaitMessageEx("DoClientSecurityCheck", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取通讯协议版本 HRESULT GetProtocolVersion([out,retval] BSTR* strProtocolVersion); + GetProtocolVersion: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetProtocolVersion(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetProtocolVersion", jsonstr)); + return result.value; + } + }, + + // 功能:修改Key的Pin码 HRESULT ChangePinCode([in] BSTR strCertSn, [in] LONG lPinCodeType, [in] BSTR strCurPinCode, [in] BSTR strNewPinCode, [out,retval] LONG *pRet); + ChangePinCode: function (strCertSn, lPinCodeType, strCurPinCode, strNewPinCode) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.ChangePinCode(strCertSn, lPinCodeType, strCurPinCode, strNewPinCode); + } + else + { + var jsonstr = {"strCertSn":strCertSn, "lPinCodeType":lPinCodeType, "strCurPinCode":strCurPinCode, "strNewPinCode":strNewPinCode}; + var result = JSON.parse(SendAndWaitMessageEx("ChangePinCode", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:等待策略设置完毕 HRESULT WaitSetPolicyFinish([in] BSTR strGatewayAddress, [out,retval] LONG* lRetVal); + WaitSetPolicyFinish: function (strGatewayAddress) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.WaitSetPolicyFinish(strGatewayAddress); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress}; + var result = JSON.parse(SendAndWaitMessageEx("WaitSetPolicyFinish", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取会话Token HRESULT GetSessionToken([in] BSTR strGatewayAddress, [out,retval] BSTR* bstrToken); + GetSessionToken: function (strGatewayAddress) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetSessionToken(strGatewayAddress); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress}; + var result = JSON.parse(SendAndWaitMessageEx("GetSessionToken", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取控件版本 HRESULT GetVersion([out,retval] BSTR* bstrRetVal); + GetVersion: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetVersion(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetVersion", jsonstr)); + return result.value; + } + }, + + // 功能:设置语言资源 HRESULT SetLanguage([in] BSTR strLanguage, [out,retval] LONG* Result); + SetLanguage: function (strLanguage) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetLanguage(strLanguage); + } + else + { + var jsonstr = {"strLanguage":strLanguage}; + var result = JSON.parse(SendAndWaitMessageEx("SetLanguage", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:获取用户属性 HRESULT GetAttribute([in] BSTR strGatewayAddress, [in] BSTR strAppFlag, [in] BSTR strAttributeName, [out, retval] BSTR* attributevalue); + GetAttribute: function (strGatewayAddress, strAppFlag, strAttributeName) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetAttribute(strGatewayAddress, strAppFlag, strAttributeName); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress, "strAppFlag":strAppFlag, "strAttributeName":strAttributeName}; + var result = JSON.parse(SendAndWaitMessageEx("GetAttribute", JSON.stringify(jsonstr))); + return result.value; + } + }, + + //功能:获取签名加密PIN码 HRESULT GetPinCode([out,retval] BSTR* Result); + GetPinCode: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetPinCode(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetPinCode", JSON.stringify(jsonstr))); + return result.value; + } + }, + + //功能:设置强制弹出PIN码框 HRESULT SetForcePinDialog([in] ULONG isForcePinDialog, [out,retval] LONG* Result); + SetForcePinDialog: function (isForcePinDialog) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetForcePinDialog(isForcePinDialog); + } + else + { + var jsonstr = {"isForcePinDialog":isForcePinDialog}; + var result = JSON.parse(SendAndWaitMessageEx("SetForcePinDialog", JSON.stringify(jsonstr))); + return result.value; + } + }, + + //功能:返回报文认证属性 HRESULT MessageAuth([in] BSTR bstrGatewayAddress, [in] BSTR bstrAttributeName, [in] BSTR bstrAppID,[out,retval] BSTR* bstrAttributeValue); + MessageAuth: function (bstrGatewayAddress, bstrAttributeName, bstrAppID) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.MessageAuth(bstrGatewayAddress, bstrAttributeName, bstrAppID); + } + else + { + var jsonstr = {"bstrGatewayAddress":bstrGatewayAddress, "bstrAttributeName":bstrAttributeName, "bstrAppID":bstrAppID}; + var result = JSON.parse(SendAndWaitMessageEx("MessageAuth", JSON.stringify(jsonstr))); + return result.value; + } + }, + // 功能:获取底板照片 HRESULT GetPhoto([in] BSTR bstrSvrIP, [in] USHORT usSvrPort, [in] BSTR bstrID, [out,retval] BSTR* bstrBase64); + GetPhoto: function (bstrSvrIP, usSvrPort, bstrID) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetPhoto(bstrSvrIP, usSvrPort, bstrID); + } + else + { + var jsonstr = {"bstrSvrIP":bstrSvrIP, "usSvrPort":usSvrPort, "bstrID":bstrID}; + var result = JSON.parse(SendAndWaitMessageEx("GetPhoto", JSON.stringify(jsonstr))); + return result.value; + } + }, + // 功能:获取证书列表 HRESULT GetCertList([out,retval] BSTR* pbstrResult); + // 证书间用换行符分割,证书各项间用空格符分割 + GetCertList: function() + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.GetCertList(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("GetCertList", JSON.stringify(jsonstr))); + return result.value; + } + }, + + // 功能:设置pin码并获取签名结果 HRESULT P1SignWithPin([in] BSTR bstrSN, [in] BSTR bstrPIN, [in] BSTR bstrOrg, [out, retval] BSTR* bstrResult); + P1SignWithPin: function(bstrSN, bstrPIN, bstrOrg) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.P1SignWithPin(bstrSN, bstrPIN, bstrOrg); + } + else + { + var jsonstr = {"bstrSN":bstrSN, "bstrPIN":bstrPIN, "bstrOrg":bstrOrg}; + var result = JSON.parse(SendAndWaitMessageEx("P1SignWithPin", JSON.stringify(jsonstr))); + return result.value; + } + }, + // 功能:清除所有过滤条件 HRESULT ClearFilterEx([out,retval] LONG* Result); + ClearFilterEx: function () + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.ClearFilterEx(); + } + else + { + var jsonstr = ""; + var result = JSON.parse(SendAndWaitMessageEx("ClearFilterEx", jsonstr)); + return result.value; + } + }, + + //功能:设置会话token HRESULT SetSessionToken([in] BSTR bstrGwAddr, [in] BSTR bstrToken, [out, retval] LONG* Result) + SetSessionToken: function(strGatewayAddress, strToken) + { + if( useActioveX || useNPPlugin ) + { + return PNXGWClient.SetSessionToken(strGatewayAddress, strToken); + } + else + { + var jsonstr = {"strGatewayAddress":strGatewayAddress, "strToken":strToken}; + var result = JSON.parse(SendAndWaitMessageEx("SetSessionToken", JSON.stringify(jsonstr))); + return result.value; + } + } + } +}(); + +(function(){ + JIT_GW_ExtInterface.Init(); +})(); \ No newline at end of file diff --git a/public/mp4/1.mp4 b/public/mp4/1.mp4 deleted file mode 100644 index 3d5384f..0000000 Binary files a/public/mp4/1.mp4 and /dev/null differ diff --git a/src/api/rightsComfort/comfort.ts b/src/api/rightsComfort/comfort.ts new file mode 100644 index 0000000..ebab3ac --- /dev/null +++ b/src/api/rightsComfort/comfort.ts @@ -0,0 +1,50 @@ +import request from "@/api/request"; + + +export function listComfort(query) { + return request.get({ + url: `/comfort`, + query: query + }); +} + +export function listTodos(query) { + return request.get({ + url: `/comfort/todo`, + query: query + }); +} + +export function listDone(query) { + return request.get({ + url: `/comfort/done`, + query: query + }); +} + +export function getDetail(id) { + return request.get({ + url: `/comfort/` + id, + }); +} + +export function applyComfort(body) { + return request.post({ + url: `/comfort`, + body + }); +} + +export function delComfort(id) { + return request.del({ + url: `/comfort/` + id + }); +} + + +export function comfortApprove(body) { + return request.post({ + url: `/comfort/approve`, + body + }); +} \ No newline at end of file diff --git a/src/api/work/comfort.ts b/src/api/rightsComfort/rights.ts similarity index 59% rename from src/api/work/comfort.ts rename to src/api/rightsComfort/rights.ts index 5a7a435..e43d637 100644 --- a/src/api/work/comfort.ts +++ b/src/api/rightsComfort/rights.ts @@ -1,9 +1,9 @@ import request from "@/api/request"; -export function listComfort(query) { +export function listRights(query) { return request.get({ - url: `/comfort`, + url: `/rights`, query: query }); } \ No newline at end of file diff --git a/src/api/screen/videoSupervise.ts b/src/api/screen/videoSupervise.ts index 6b3f2cf..031759b 100644 --- a/src/api/screen/videoSupervise.ts +++ b/src/api/screen/videoSupervise.ts @@ -36,3 +36,10 @@ export function getVideoSuperviseProblemTypeRate(times) { url: `/datav/videoSupervise/getVideoSuperviseProblemTypeRate?beginTime=${times[0]}&endTime=${times[1]}` }); } + +// 获取内部视频数量 +export function getVideoStatus(times) { + return request.get({ + url: `/datav/videoSupervise/getVideoStatus` + }); +} diff --git a/src/api/system/police.ts b/src/api/system/police.ts index 1d19872..d4e3cd4 100644 --- a/src/api/system/police.ts +++ b/src/api/system/police.ts @@ -7,6 +7,13 @@ export function listPolice(query) { }); } +export function listAbnormalPolice(query) { + return request.get({ + url: '/police/abnormal', + query + }); +} + export function addPolice(body) { return request.post({ url: '/police', diff --git a/src/api/system/rightPerson.ts b/src/api/system/rightPerson.ts new file mode 100644 index 0000000..43f9d97 --- /dev/null +++ b/src/api/system/rightPerson.ts @@ -0,0 +1,35 @@ +import request from "@/api/request"; + +export function listRightPerson(query) { + return request.get({ + url: '/rightPerson', + query + }); +} + +// 获取当前单位的维权专干 +export function listRightPersonByDepartId(departId) { + return request.get({ + url: '/rightPerson/depart/' + departId + }); +} + +export function addRightPerson(body) { + return request.post({ + url: '/rightPerson', + body + }); +} + +export function updateRightPerson(body) { + return request.put({ + url: '/rightPerson', + body + }); +} + +export function delRightPerson(id) { + return request.del({ + url: '/rightPerson/' + id + }); +} \ No newline at end of file diff --git a/src/components/comfort/dialog.vue b/src/components/comfort/dialog.vue new file mode 100644 index 0000000..59cdd04 --- /dev/null +++ b/src/components/comfort/dialog.vue @@ -0,0 +1,406 @@ + + + \ No newline at end of file diff --git a/src/components/icon/index.vue b/src/components/icon/index.vue index 5c7ce57..c1e01ea 100644 --- a/src/components/icon/index.vue +++ b/src/components/icon/index.vue @@ -32,7 +32,7 @@ export default defineComponent({ () => [createVNode(resolveComponent(props.name.replace(EL_ICON_PREFIX, '')))] ) } - if (props.name.indexOf(LOCAL_ICON_PREFIX) === 0) { + if (props.name?.indexOf(LOCAL_ICON_PREFIX) === 0) { // 本地icon return () => h( diff --git a/src/components/negative/dialog.vue b/src/components/negative/dialog.vue index 9a87b1f..45820eb 100644 --- a/src/components/negative/dialog.vue +++ b/src/components/negative/dialog.vue @@ -137,7 +137,6 @@ - - + - \ No newline at end of file diff --git a/src/views/datav/subonedatav/SubOneVideoInsp.vue b/src/views/datav/subonedatav/SubOneVideoInsp.vue index 5a8e199..dabe514 100644 --- a/src/views/datav/subonedatav/SubOneVideoInsp.vue +++ b/src/views/datav/subonedatav/SubOneVideoInsp.vue @@ -21,14 +21,7 @@
- +
diff --git a/src/views/rightsComfort/Comfort.vue b/src/views/rightsComfort/Comfort.vue new file mode 100644 index 0000000..59b88ba --- /dev/null +++ b/src/views/rightsComfort/Comfort.vue @@ -0,0 +1,170 @@ + + + \ No newline at end of file diff --git a/src/views/rightsComfort/MyComfort.vue b/src/views/rightsComfort/MyComfort.vue new file mode 100644 index 0000000..f385f6d --- /dev/null +++ b/src/views/rightsComfort/MyComfort.vue @@ -0,0 +1,891 @@ + + + \ No newline at end of file diff --git a/src/views/rightsComfort/Rights.vue b/src/views/rightsComfort/Rights.vue new file mode 100644 index 0000000..54cc239 --- /dev/null +++ b/src/views/rightsComfort/Rights.vue @@ -0,0 +1,167 @@ + + + \ No newline at end of file diff --git a/src/views/system/Menu.vue b/src/views/system/Menu.vue index b0d4cff..2e193e7 100644 --- a/src/views/system/Menu.vue +++ b/src/views/system/Menu.vue @@ -125,7 +125,12 @@ diff --git a/src/views/system/Operating.vue b/src/views/system/Operating.vue new file mode 100644 index 0000000..a09fdb9 --- /dev/null +++ b/src/views/system/Operating.vue @@ -0,0 +1,14 @@ + + + \ No newline at end of file diff --git a/src/views/system/Police.vue b/src/views/system/Police.vue index c8c265e..bd767a8 100644 --- a/src/views/system/Police.vue +++ b/src/views/system/Police.vue @@ -1,282 +1,461 @@