fs-danaus
2023-09-01 0c3502b052d6e6c7c6296457bf9b510e3f95cd9d
WebRoot/js/index/funcLink.js
@@ -174,7 +174,9 @@
                'htm': '<i class="bi bi-filetype-html" style="color:#369584"></i>',
                'txt': '<i class="bi bi-filetype-txt" style="color: #5d5a5a"></i>',
                'mov': '<i class="bi bi-film"></i>',
                'mp3': '<i class="bi bi-filetype-mp3"></i>'
                'mp3': '<i class="bi bi-filetype-mp3"></i>',
                'jpg':'<i class="bi bi-file-image" style="color: #45b8ab"></i>',
                'key':'<i class="bi bi-filetype-key" style="color: #3fa2e3"></i>'
            },
            previewFileExtSettings: {
                'doc': function(ext) {
@@ -200,6 +202,9 @@
                },
                'mp3': function(ext) {
                    return ext.match(/(mp3|wav)$/i);
                },
                'jpg':function (ext) {
                    return ext.match(/(jpg|png|jpeg|gif|ico|pic|bmp|tif)$/i);
                }
            },
            isNodragging:false,//自定义属性,在只读状态是否可以执行拖拽
@@ -522,9 +527,7 @@
                    // if (jsons[i].fileType.toLowerCase() == 'pdf') {//pdf格式调用插件
                    //     fileURL = jsons[i].domain + '/general/pdf/web/viewer.jsp?file=' + fileURL;
                    // }
                    if (jsons[i].orgFileType == 'doc' || jsons[i].orgFileType == 'docx' || jsons[i].orgFileType == 'xls'
                        || jsons[i].orgFileType == 'xlsx' || jsons[i].orgFileType == 'ppt' || jsons[i].orgFileType == 'pptx') {
                        jsons[i].fileType = 'office';
                    if (jsons[i].fileType == 'office') {//office类型需要
                        fileURL = encodeURIComponent(fileURL);
                    }
                    fileInput.option.initialPreview.push(fileURL);
@@ -533,7 +536,7 @@
                        'time': jsons[i].uploadTimeStr,  //上传开始时间
                        'name': jsons[i].authorName,  //作者名称
                        'size': jsons[i].fileSizeStr,   // 上传的图片大小
                        'type': jsons[i].fileType,   // 上传的图片类型
                        'type': jsons[i].allowView?jsons[i].fileType:'lock',   // 上传的图片类型
                        'filename': jsons[i].originalFileName,//jsons[i].physicalFile,   //物理文件
                        'filetype': jsons[i].fileType + '/' + jsons[i].orgFileType,
                        'title': title,//title
@@ -1331,7 +1334,7 @@
    lfs=lf.split(";"); // 字段分隔固定用;
    sfs=sf.split(split);
    if (sfs.length != lfs.length) {
        $.messager.alert('警告', "请检查外表字段与自身字段是否设置正确!", 'error');
        $.messager.alert('警告', "外表字段与自身字段个数不一致,请检查外表字段与自身字段是否设置正确!", 'error');
        return;
    }
    if (mes&&mes.indexOf("&") != -1 && t == "22") {
@@ -1632,6 +1635,7 @@
            data: {
                "formid": f,
                "param": paramVa,
                "paramFields": lfs.join(";"),//值对应该的字段列表
                "disableDuplicateSubmitUUID": systemUuid.uuid //by danaus 2019/11/22 11:12
            },
            beforeSend: function (XMLHttpRequest) {
@@ -1763,10 +1767,46 @@
            }
        }
        $.messager.alert('提示', msg || '出现错误', "info");
    } else {
    }else if(data.state != null && data.state==-1007){//
        //百望云平台账号已过期,重新登录
        $.messager.alert('提示', data.msg, "info", function () {
            /*layer.open({
                type: 2,
                title: '登录百望云平台',
                maxmin: false,
                skin: 'layui-layer-molv',
                shadeClose: true, //点击遮罩关闭层
                area : ['1300px' , '800px'],
                content:  'https://www.baiwang.com/mainsite/src/html/login/login.html'
            });*/
            window.open(data.data.url,'',' width='+ (screen.availWidth - 10) +',height='+ (screen.availHeight-50) +',scrollbars,resizable=yes,toolbar=no');
            return;
        });
    }else  if(data.state != null && data.state==-1008){
        //百望云平台刷脸验证
        layer.open({
            type: 2,
            area: ['788px', '680px'],
            title: ['风控检测', 'font-size:18px;text-align:center;font-weight:600;'],
            resize: false,
            fixed: false,
            shade: 0,
            content: '/js/faceswiping/faceswiping.html',
            isOutAnim: false,
            success: function (layero, index) {
                // 获取弹出的 iframe 页面对象
                top.layIframeWindow = window[layero.find("iframe")[0]['name']];
                //obj={info:{taxNo:"xxxx",taxUserName:"张三",authId:"336363636"}}
                // console.log("faceswip:"+JSON.stringify(obj))
                top.layIframeWindow.faceSwipingInit(data);
                top.layeerFace=layero;
            }
        });
    }else {
        try{
            var obj=JSON.parse(data);
            $.messager.alert('提示', obj.msg, "info");
                $.messager.alert('提示', obj.msg, "info");
        }catch (e) {
            $.messager.alert('提示', data || '状态无法识别:' + data.state, "info");
        }
@@ -1874,7 +1914,17 @@
    }else if(info.indexOf("open.callBack|") ==0){//处理第三方返回的数据,打开另一个页卡
        info=info.replace("open.callBack|","").split("|");
        var obj=JSON.parse(info[1]);
        window.open(info[0]+obj.Url,'','width=800px;height=800px');
       /* var perContent= layer.open({
            type: 2,
            title: '德立测量单信息',
            maxmin: false,
            skin: 'layui-layer-molv',
            shadeClose: true, //点击遮罩关闭层
            area : ['1300px' , '800px'],
            content:  info[0]+obj.Url       //'/app/67/0/cnzh/110502/1/index.jsp'
        });
        layer.full(perContent);*/
        window.open(info[0]+obj.Url,'',' width='+ (screen.availWidth - 10) +',height='+ (screen.availHeight-50) +',scrollbars,resizable=yes,toolbar=no');
    }else{ // 打开页面
        var tt=info.split("|");
        for(var i=0;i<tt.length;i++){
@@ -1916,7 +1966,10 @@
    if (r == "1") {
        if(location) location.reload();
    }else if(r=="2"){
        if(mygrid) mygrid.ReloadBody();
        if(mygrid){
            mygrid.ReloadBody();
            mygrid.AllSelected=0;//刷新表格时清除全选状态 by danaus 2023-08-26 15:14
        }
    }
    if (c == "1") {
       if(parent) parent.closeTab();
@@ -2013,8 +2066,21 @@
function showLoading() {
    $("#loading").show();
}
function closeLoadingButton(){
    let close = $(".loadingClose");
    if (close) {close.remove();}
    $(".loadingMsg").after("<p class=\"loadingClose\">" +
        "<button class='easyui-linkbutton l-btn l-btn-small' onclick='javascript: closeLoading()'>关闭" +
        "</button></p>");
}
function closeLoading() {
    $("#loading").hide();
}
//错误异常的捕获 xin 2023-8-22 10:34:29
window.onerror=function (message, source, lineno, colno, error) {
    closeLoadingButton();
    console.log(message);
    return true; // 防止异常的默认行为
}
/** ***************************************** */
Object.extend = function(destination, source) {
@@ -2436,6 +2502,7 @@
    if ((C_Grid != undefined && C_Grid != "" && eval('(' + C_Grid + ')').toP != "" && eval('(' + C_Grid + ')').toP != "null")
        || $.trim(postToThis).length > 0 || self_datafields != "") {
        $("#tpselect").show();
        $(".selected-icon-container").show();
    }
    parent.numId = ""; // 设置单号的值
})