lsc 2 天之前
父节点
当前提交
6b11bea35c
共有 2 个文件被更改,包括 24 次插入0 次删除
  1. 11 0
      js/Desktop/DeskTop.js
  2. 13 0
      js/Desktop/Onload.js

+ 11 - 0
js/Desktop/DeskTop.js

@@ -5964,6 +5964,17 @@ U.MD.D.I.openInApplication = function (str, data, screenType, tType) {
                 closecallback: function () { }
             }, { "style": { "height": "36px" } }).form; //创建窗体
             break;
+        case "testDetail":
+            _formdiv = new U.UF.UI.form(
+                "表单填写",
+                $$("iframe", { "allow": "camera *; microphone *;display-capture;midi;encrypted-media;", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://beta.cloud.cocorobo.cn/#/doTest?cid=" + data + "&userid=" + _userid + "&oid=" + _oid + "&org=" + _org + "&type=3&role=" + _role }), {
+                "id": "testDetail" + data,
+                "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                "onresize": function () { }
+            }, {
+                closecallback: function () { }
+            }, { "style": { "height": "36px" } }).form; //创建窗体
+            break;
     }
 }
 U.MD.D.I.openApplication = function (str, obj, info) {

+ 13 - 0
js/Desktop/Onload.js

@@ -1219,6 +1219,19 @@ function loginSet(userInfo, res){
     if(userInfo.type === 1 && U.UF.C.queryString('tycode') && U.UF.C.queryString('app')){
         U.MD.D.I.openApplication(U.UF.C.queryString('app'))
     }
+
+    let testIdMatch = window.location.href.match(/testid=([^&]+)/);
+    if(window.location.href.includes('testDetail') && testIdMatch && testIdMatch[1]){
+        console.log(testIdMatch[1]);
+        U.A.Request(`${US.Config.pbl}getTestWorks2?cid=${testIdMatch[1]}`, [], function (res) {
+            if(res && res.value && res.value.length && res.value[0].length){
+                let testWorks = res.value[0][0];
+                if(userInfo.org == testWorks.org || userInfo.organizeid == testWorks.organizeid){
+                    U.MD.D.I.openInApplication("testDetail", testIdMatch[1])
+                }
+            }
+        }, [], { "type": "GET", "withCredentials": true });
+    }
     U.MD.O.P.connect(); //登录成功后连接socket服务同步协同编辑
 }