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jB,IAAI,EAAiB,SAAS,uBAAuB,uBACrD,MAAM,UAAU,QAAQ,KAAK,GAAgB,IACzC,EAAM,QAAU,WACZ,IAAI,EAAM,EAAE,GAAO,KAAK,WACpB,EAAU,EAAE,GAAO,KAAK,UAC5B,iBACW,GAAR,EAIH,OAAO,KAAK,EAAI,UAHZ,QAAQ,QAAQ,YAKxB,KAEJ,EAAM,QAAU,SAAS,GACrB,IAAI,EAAS,SAAS,uBAAuB,gBAAgB,IACE,GAA5D,EAAO,aAAa,SAAS,QAAQ,IACpC,EAAO,aAAa,QAAQ,0CAAiD,KAC7E,EAAM,UAnEA,2BAqEN,EAAO,aAAa,QAAQ,4BAA4B,KAAuB,KAC/E,EAAM,UAAY,EAE1B,EAEA,EAAE,UAAU,SAAQ,SAAU,GAE1B,IAAyC,GAAtC,EAAE,OAAO,UAAU,QAAQ,SAA9B,CACA,IAAI,EAAM,EAAE,oBACZ,IAAK,EAAI,GAAG,EAAE,SAAwC,IAA7B,EAAI,IAAI,EAAE,QAAQ,OAAc,CAGrD,IAAI,EAAS,SAAS,uBAAuB,gBAAgB,GAC1D,IACC,EAAO,aAAa,QAAQ,GAAG,KAC/B,EAAM,UAAY,EAE1B,CAV4C,CAWhD,GACJ,CAKA,SAAS,iBACF,eAAe,QAAQ,cACtB,eAAe,WAAW,aAE3B,eAAe,QAAQ,cACtB,eAAe,WAAW,YAElC,CAGA,SAAS,YAAY,EAAI,GAErB,OADU,IAAI,OAAO,YAAc,EAAO,oBAAqB,KACvD,KAAK,GACN,SAAS,OAAO,GAAG,QAAQ,MAAO,MAClC,EACX,CAnBA,aAAY,KACR,eAAc,GACf","file":"/npm/plate-form@2.2.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/plate-form@2.2.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\nimport './css/index.less'\nimport './js/jquery.min.js'\nimport { Message } from 'element-ui';\nfunction replaceBanner() {\n    // console.log(\"加载进来了\")\n    let headerContainer  = document.getElementById('header-logo')\n    //检验在登录页面是否已经插入了平台页面,插入则移除\n    if(!headerContainer&&document.getElementsByClassName('plate_dialog').length>0){\n        resetLocalData()\n        $('.plate_dialog').remove()\n    }\n    if(!headerContainer||document.getElementsByClassName('plate_system_div').length>0) return\n    // console.log(\"将创建dom并填充加载数据\")\n    while(headerContainer.firstChild){\n        headerContainer.removeChild(headerContainer.firstChild)\n    }\n    let info = sessionStorage.getItem('qz-system-info')&&JSON.parse(sessionStorage.getItem('qz-system-info'))\n    if(!info) return\n    let pInfo={}\n    let div= document.createElement('div')\n    div.setAttribute('class','plate_system_div')\n    let img = document.createElement('img')\n    let divSystemName = document.createElement('div')\n    divSystemName.textContent = info.systemName\n    divSystemName.setAttribute('class','plate_system_name')\n    \n    div.append(divSystemName)\n    img.setAttribute('src',info.imgSrc)\n    if(info.imgSrc!=''&&info.imgSrc){\n        headerContainer.appendChild(img)\n    }\n    \n    headerContainer.appendChild(div)\n    //箭头\n    let arrow = document.createElement('span')\n    let arrowDown = 'el-icon-arrow-down arrow'\n    let arrowUp = 'el-icon-arrow-up arrow'  \n    arrow.setAttribute('class',arrowDown)\n    headerContainer.appendChild(arrow)\n    \n\n    //控制显示与否\n    let plate_dialog_hidden = \"display:none\"\n    let plate_dialog_show = \"display:block\"\n    //基础样式\n    let plate_dialog = \"position:absolute;top:45px;width:100%;overflow-y:auto;background:#f4f5f9;z-index:1000;\"\n    let plate_dialog_main = \"margin:20px;\"\n    //图片样式\n    let plagte_dialog_img = \"margin:0px;padding:0px;width:66px;height:40px;\"\n    //模块样式\n    let plate_dialog_systemItem =\"\"\n    //系统名称样式\n    let plate_dialog_name = \"height:40px;font-size:14px;color:#333333;font-weight:bold;\"\n    //系统信息样式\n    let plate_dialog_systemInfo = \"display:flex;flex-wrap:wrap;\"\n    let plate_dialog_systemItemInfo = \"margin-bottom:20px;height:160px;box-sizing:border-box;padding:20px;overflow:hidden;cursor:pointer;border-radius:4px;background:#fff;\"\n    let plate_dialog_systemItemInfo_span = \"margin-top:20px;font-size:16px;color:#000000;\"\n    let plate_dialog_systemItemInfo_describe = \"font-size:13px;color:#a09e9e;text-overflow:ellipsis\"\n    let circle = \"display:inline-block;width:5px;height:5px;border-radius:5px;background-color:#f7b500;\"\n    let img_hidden=\"display:none\"\n    let sysetemItemContainer = ''\n    let innerContainer = ''\n    $.each(info.plateDataList,function(index,listItem){\n        innerContainer = innerContainer+`<div pJump=\"${listItem.product_host}\" isJump=\"${listItem.is_jump}\" pName=\"${listItem.product_name}\" productIP=\"${listItem.ip||'--'}\" pIcon=\"${listItem.product_icon}\" linkUrl=\"${listItem.url}\" class='plateSystemInfoItem' style='width:calc(33.333333% - 14px);${(index+1)%3==0?'margin-right:0px;':'margin-right:20px;'}${plate_dialog_systemItemInfo}'>\n        <img style='${listItem.product_icon!=''?plagte_dialog_img:img_hidden}' src=\"${listItem.product_icon}\" />\n            <div style='margin:5px 0px;'>\n                <span style='${plate_dialog_systemItemInfo_span}'>${listItem.product_name}</span>\n            </div>\n            <div class='describe' style='${plate_dialog_systemItemInfo_describe}'>\n                ${listItem.product_intro||'--'}\n            </div>\n        </div>`\n    })\n    sysetemItemContainer = sysetemItemContainer +\n       ` <div class='plateSystemInfo' style='${plate_dialog_systemInfo}'>\n            ${innerContainer}\n        </div>`\n    let dialogContainer = `<div class=\"plate_dialog\" style='height:calc(100% - 46px);${plate_dialog}${plate_dialog_hidden}'>\n            <div class='plateDialogMain' style='${plate_dialog_main}'>\n                ${sysetemItemContainer}\n            </div>\n        </div>`\n    let dialogHtml = $(dialogContainer)\n    $('body').append(dialogHtml)\n    //console.log(\"将创建dom和填充数据完毕\")\n    let systemItemList = document.getElementsByClassName('plateSystemInfoItem')\n    Array.prototype.forEach.call(systemItemList,(sItem)=>{\n        sItem.onclick = function(){\n            let url = $(sItem).attr('linkUrl')\n            let isJump =  $(sItem).attr('isJump')\n            resetLocalData()\n            if(isJump!=1){\n                Message.warning('当前用户不支持跳转')\n                return\n            }\n            window.open(url,'_blank')\n\n        }\n    })\n    arrow.onclick = function(event){\n        let dialog = document.getElementsByClassName('plate_dialog')[0]\n        if(dialog.getAttribute('style').indexOf(plate_dialog_hidden)!=-1){\n            dialog.setAttribute('style',`height:calc(100% - 46px);${plate_dialog_show};${plate_dialog}`)\n            arrow.className = arrowUp\n        }else{\n            dialog.setAttribute('style',`height:calc(100% - 46px);${plate_dialog_hidden};${plate_dialog}`)\n            arrow.className = arrowDown\n        }\n    }\n    //控制点击plateDialogMain以外的区域会触发input的blur事件\n    $(document).mouseup(function (e) {\n        //判断点击的是不是箭头\n        if(e.target.className.indexOf('arrow')!=-1) return\n        var con = $(\".plateDialogMain\");   // 设置目标区域\n        if (!con.is(e.target) && con.has(e.target).length === 0) {\n            //在外部点击后执行逻辑\n            //console.log(\"在plateDialogMain区域外点击了\");\n            let dialog = document.getElementsByClassName('plate_dialog')[0]\n            if(dialog){\n                dialog.setAttribute('style',`${plate_dialog_hidden}`)\n                arrow.className = arrowDown\n            }\n        }\n    });\n}\nsetInterval(() => {\n    replaceBanner()\n}, 1000);\n\nfunction resetLocalData(){\n    if(sessionStorage.getItem('leaveMenu')){\n        sessionStorage.removeItem('leaveMenu')\n    }\n    if(sessionStorage.getItem('userInfos')){\n        sessionStorage.removeItem('userInfos')\n    }\n}\n\n\nfunction getUrlParms(url,name) {\n    var reg = new RegExp(\"(^|\\\\?|&)\" + name + \"=([^&]*)(\\\\s|&|$)\", \"i\");\n    if (reg.test(url))\n    return unescape(RegExp.$2.replace(/\\+/g, \" \"));\n    return \"\";\n}\n\n"]}