D:/workspace/chenjingjing/git/gx_tieta/gx_tieta/.gitignore
2019-01-11 13024bf03b961d252e39bdbd48a5610686a3ab6f
审核电池组权限添加
1个文件已修改
45 ■■■■■ 已修改文件
gx_tieta/WebRoot/mobil/index.html 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gx_tieta/WebRoot/mobil/index.html
@@ -1,3 +1,4 @@
<!doctype html>
<html>
<head>
@@ -47,7 +48,7 @@
                <a href="map.html" target="_top" data-i18n="main.usermanagement">机房定位</a>
            </li>
             <li>
                <a href="checkAccept-index.html" target="_top" data-i18n="main.usermanagement">批准审批及验收</a>
                <a href="checkAccept-index.html" id="check_Accept" target="_top" data-i18n="main.usermanagement">批准审批及验收</a>
            </li>
            <!-- <li>
                <a href="batt-home-info.html" target="_top" data-i18n="main.usermanagement">机房信息</a>
@@ -77,6 +78,12 @@
    });
    $(function(){
        var user = getCookie("user");
        var user_logo = getCookie("user_logo");
        //user = JSON.parse(user);
        console.info(user);
        console.info(user_logo);
        judgeOpen();
        delCookie("pages");
        delCookie("stationId");
        delCookie("wapproval");
@@ -95,6 +102,42 @@
            window.location.replace("loginm.html");
        });
    }
    function judgeOpen(){
        $.ajax({
                 type: 'post',
                async: false,
                url: 'User_permitgroup_dataAction!getPermits',
                data: null,
                dataType: 'json',
                success:function(data) {
                    data = JSON.parse(data.result);
                    data = JSON.parse(data);
                    console.info(data);
                    if(isHasPermit("install_look_permit",data)){
                    }else{
                        document.getElementById("check_Accept").style.display="none";
                    }
                }
        });
    }
    //根据权限名判断是否具有某个权限
    function isHasPermit(_permitName,_permitList)
    {
        //console.info(_permitList);
        var _isHasPermit=false;
        //遍历_permitList根据_permitName找到该权限是否具有
        for(var i=0;i<_permitList.length;i++)
        {
            //console.info(_permitList[i].permit_item_name);
            //console.info(_permitList[i].permit_item_value);
            if(_permitList[i].permit_item_name == _permitName && _permitList[i].permit_item_value == 1)
            {
                _isHasPermit = true;
                return _isHasPermit;
            }
        }
        return _isHasPermit;
    }
    </script>
</div>