ChartsTree.jsp 25.5 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684
<%@page import="weaver.formmode.FormModeConfig" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import="weaver.formmode.service.AppInfoService" %>
<%@ page import="net.sf.json.JSONArray" %>
<%@page import="com.weaver.formmodel.util.StringHelper" %>
<%@page import="weaver.conn.RecordSet" %>
<%@page import="weaver.systeminfo.systemright.CheckSubCompanyRight" %>
<%@ include file="/formmode/pub.jsp" %>

<%
    if (!HrmUserVarify.checkUserRight("FORMMODEAPP:ALL", user)) {
        response.sendRedirect("/notice/noright.jsp");
        return;
    }
%>
<%
    int defaultSubCompanyId = Util.getIntValue(request.getParameter("subCompanyId"), -1);
    if (fmdetachable.equals("1")) {//开启了表单建模分权
        RecordSet rs = new RecordSet();
        String fmdftsubcomid = Util.null2String(session.getAttribute("fmdftsubcomid"));
        String checkSql = "SELECT count(1) as num FROM modeTreeField WHERE subcompanyid IS NULL";
        rs.execute(checkSql);
        if (rs.next()) {
            int num = rs.getInt("num");
            if (num > 0) {
                rs.executeSql("update modeTreeField set subcompanyid=" + fmdftsubcomid + " where subcompanyid IS NULL ");
            }
        }

        checkSql = "SELECT count(1) as num FROM modeinfo WHERE subcompanyid IS NULL";
        rs.execute(checkSql);
        if (rs.next()) {
            int num = rs.getInt("num");
            if (num > 0) {
                rs.executeSql("update modeinfo set subcompanyid=" + fmdftsubcomid + " where subcompanyid IS NULL ");
            }
        }

        checkSql = "SELECT count(1) as num FROM workflow_bill WHERE subcompanyid3 IS NULL";
        rs.execute(checkSql);
        if (rs.next()) {
            int num = rs.getInt("num");
            if (num > 0) {
                rs.executeUpdate("update workflow_bill set subcompanyid3=" + fmdftsubcomid + " where subcompanyid3 IS NULL ");
                rs.executeUpdate("update workflow_formbase set subcompanyid3=" + fmdftsubcomid + " where subcompanyid3 IS NULL ");
            }
        }


        if (defaultSubCompanyId == -1) {
            defaultSubCompanyId = Util.getIntValue(Util.null2String(session.getAttribute("defaultSubCompanyId")), -1);
        }
        CheckSubCompanyRight mSubRight = new CheckSubCompanyRight();
        int[] mSubCom = mSubRight.getSubComByUserRightId(user.getUID(), "FORMMODEAPP:ALL", 0);
        if (defaultSubCompanyId != -1) {//判断session中获取的值是否正确,未关闭浏览器切换账号session未被注销
            boolean subFlag = false;
            for (int i = 0; i < mSubCom.length; i++) {
                if (defaultSubCompanyId == mSubCom[i]) {
                    subFlag = true;
                    break;
                }
            }
            if (!subFlag) {
                session.removeAttribute("defaultSubCompanyId");
                defaultSubCompanyId = -1;
            }
        }
        if (defaultSubCompanyId != -1) {
            String userRightStr = "FORMMODEAPP:ALL";
            Map rightMap = getCheckRightSubCompanyParam(userRightStr, user, fmdetachable, defaultSubCompanyId, "", request, response, session);
            int operatelevel = Util.getIntValue(Util.null2String(rightMap.get("operatelevel")), -1);
            if (operatelevel < 0) {
                defaultSubCompanyId = -1;
            }
        }

        if (defaultSubCompanyId == -1) {
            for (int i = 0; i < mSubCom.length; i++) {
                if (fmdftsubcomid.equals("" + mSubCom[i])) {
                    defaultSubCompanyId = mSubCom[i];
                    break;
                }
            }
            if (defaultSubCompanyId == -1 && mSubCom.length > 0) {
                defaultSubCompanyId = mSubCom[0];
            }
        }
        if (defaultSubCompanyId != -1) {
            session.setAttribute("managefield_subCompanyId", String.valueOf(defaultSubCompanyId));
            session.setAttribute("defaultSubCompanyId", String.valueOf(defaultSubCompanyId));
        }

    }
    String userRightStr = "FORMMODEAPP:ALL";
    Map rightMap = getCheckRightSubCompanyParam(userRightStr, user, fmdetachable, defaultSubCompanyId, "", request, response, session);
    int operatelevel = Util.getIntValue(Util.null2String(rightMap.get("operatelevel")), -1);

    AppInfoService appInfoService = new AppInfoService();
    JSONArray modeinfoArr = new JSONArray();
    if (fmdetachable.equals("1")) {
        Map map = new HashMap();
        map.put("subCompanyId", defaultSubCompanyId);
        map.put("user", user);
        modeinfoArr = appInfoService.getAllAppInfoForTreeParam(map);
    } else {
        modeinfoArr = appInfoService.getAllAppInfoForTree();
    }
    String rightframeurl = StringHelper.null2String(request.getParameter("rightframeurl"), "/formmode/setup/appSettings.jsp");
    FormModeConfig formModeConfig = new FormModeConfig();
%>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="/formmode/js/jquery/pagination/jquery.pagination_wev8.js"></script>
    <script type="text/javascript" src="/formmode/js/jquery/hoverIntent/jquery.hoverIntent.minified_wev8.js"></script>

    <link rel="stylesheet" href="/formmode/js/jquery/zTree3.5.15/css/zTreeStyle/zTreeStyle_wev8.css" type="text/css">
    <script type="text/javascript" src="/formmode/js/jquery/zTree3.5.15/js/jquery.ztree.all-3.5.min_wev8.js"></script>

    <script language=javascript src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>

    <script type="text/javascript" src="/formmode/js/jquery/contextMenu/jquery.contextMenu_wev8.js"></script>
    <link rel="stylesheet" type="text/css"
          href="/formmode/js/jquery/contextMenu/jquery.contextMenu_wev8.css?<%=System.currentTimeMillis() %>"/>

    <link rel="stylesheet" type="text/css"
          href="/wui/theme/ecology8/page/perfect-scrollbar/perfect-scrollbar_wev8.css"/>
    <script type="text/javascript" src="/js/nicescroll/jquery.nicescroll_wev8.js"></script>
    <script type="text/javascript" src="/wui/theme/ecology8/page/perfect-scrollbar/perfect-scrollbar_wev8.js"></script>
    <script type="text/javascript" src="/wui/theme/ecology8/page/perfect-scrollbar/jquery.mousewheel_wev8.js"></script>
    <script type="text/javascript" src="/formmode/js/leftPartTemplate_wev8.js"></script>
    <style type="text/css">
        body {
            height: 100%;
            overflow: hidden;
        }

        * {
            font: 12px Microsoft YaHei
        }

        .e8_module_tree {
            padding: 7px 0px 0px 0px;
            margin: 0px;
        }

        .e8_module_tree li {
            padding: 4px 0px;
        }

        .e8_module_tree li a {
            text-decoration: none !important;
        }

        .e8_module_tree li a.curSelectedNode {
            height: 17px;
            padding-top: 1px;
            border: none;
            background-color: transparent;
        }

        .e8_module_tree li a span {
            color: #0c0c0c;
        }

        .e8_module_tree li ul {
            padding-left: 0px;
        }

        .e8_module_tree li ul.level1 {
            margin-left: -14px;
        }

        .e8_module_tree li ul.level2 {
            margin-left: -28px;
        }

        .e8_module_tree li.level1 {
            padding-left: 14px;
        }

        .e8_module_tree li.level2 {
            padding-left: 28px;
        }

        .e8_module_tree li.level3 {
            padding-left: 42px;
        }

        .e8_module_tree li.noover {
            background: none;
        }

        .e8_module_tree li.ztreeNodeBgColor > a span {
            color: #2F5E85;
            font-weight: bold;
        }

        .e8_module_tree li span.noline_docu.button,
        .e8_module_tree li span.noline_close.button,
        .e8_module_tree li span.noline_open.button {
            margin-left: 5px;
        }

        .e8_module_tree li span.noline_close.button {
            background: url("/formmode/images/jia_wev8.png") no-repeat center;
        }

        .e8_module_tree li span.noline_open.button {
            background: url("/formmode/images/jian_wev8.png") no-repeat center;
        }

        .e8_module_tree li.rightMenuSelected {
            /*background:url("/formmode/images/ztree_over_bg_wev8.png") repeat-x !important;	*/
            background-color: #5FACE9;
        }

        #leftPart {
            overflow: hidden;
            position: relative;
        }

        #drillmenu {
            overflow: hidden;
        }
    </style>
    <script type="text/javascript">

        var zNodes = <%=modeinfoArr.toString()%>;
        var currModelId = null;

        $(document).ready(function () {
            currModelId = FormmodeUtil.getLastId(FormModeConstant._CURRENT_APP, zNodes, "id");
            document.getElementById("currModelId").value = currModelId;

            if (window.parent.location.href.indexOf("/formmode/setup/ModeSettingMain.jsp") != -1) {
                if (typeof(parent.changeRightUrl) == "function") {
                    parent.changeRightUrl(currModelId);
                }
            }

            initAppTree(zNodes);
            $(document).on('mouseover', '.e8_module_tree li', function (event) {
                $(this).parents().addClass("noover");
                $(this).removeClass("noover");
                event.stopPropagation();
            });

            $(document.body).click(function () {
                $(".e8_module_tree li.rightMenuSelected").removeClass("rightMenuSelected");
            });


            updateLeftPartHeight();

            initSearchText(doTextSearch);

            $(".ztreeNodeBgColor").removeClass();

        });

        function initAppTree(treeDatas, expandall) {

            var treeSetting = {
                view: {
                    showLine: false,
                    showIcon: false
                },
                data: {
                    simpleData: {
                        enable: true
                    }
                },
                callback: {
                    onClick: function (e, treeId, treeNode) {
                        $('.e8_module_tree a:not(.curSelectedNode)').parent().removeClass("ztreeNodeBgColor");
                        $('.e8_module_tree a:not(.curSelectedNode)').parent().addClass("noover");
                        $('.e8_module_tree .curSelectedNode').parent().addClass("ztreeNodeBgColor");
                    },
                    onNodeCreated: zTreeOnNodeCreated,
                    onCollapse: zTreeOnCollapse,
                    onExpand: zTreeOnExpand
                }
            };

            $.fn.zTree.init($("#e8_module_tree"), treeSetting, treeDatas);

            var treeObj = $.fn.zTree.getZTreeObj("e8_module_tree");

            if (expandall) {
                treeObj.expandAll(true);	//展开全部
            }
            //treeObj.expandAll(true);	//展开全部

            var selectedNode = treeObj.getNodeByParam("id", currModelId, null);
            treeObj.selectNode(selectedNode, true, true);
            zTreeOnAsyncSuccess();
            treeObj.setting.callback.onClick(null, treeObj.setting.treeId, selectedNode);//调用事件

        }

        var firstAsyncSuccessFlag = 0;

        function zTreeOnAsyncSuccess() {
            if (firstAsyncSuccessFlag == 0) {
                try {
                    var treeObj = $.fn.zTree.getZTreeObj("e8_module_tree");
                    //调用默认展开第一个结点
                    var selectedNode = treeObj.getSelectedNodes();
                    var nodes = treeObj.getNodes();
                    treeObj.expandNode(nodes[0], true);
                    var childNodes = treeObj.transformToArray(nodes[0]);
                    treeObj.expandNode(childNodes[1], true);
                    //treeObj.selectNode(childNodes[1]);
                    var childNodes1 = treeObj.transformToArray(childNodes[1]);
                    treeObj.checkNode(childNodes1[1], true, true);
                    firstAsyncSuccessFlag = 1;
                } catch (err) {

                }
            }
        }

        function zTreeOnRightClick(event, treeId, treeNode) {
            if (treeNode) {
                $("#" + treeId).contextMenu({
                    menu: 'appRightMenu'
                }, function (action, el, pos) {

                });
            }
        };

        function zTreeOnNodeCreated(event, treeId, treeNode) {
            $("#" + treeNode.tId).contextMenu({
                menu: 'appRightMenu'
            }, function (action, el, pos) {

                $(el).removeClass("rightMenuSelected");
            });
        };

        function zTreeOnCollapse(event, treeId, treeNode) {
            updateLeftPartHeight("update");
        };

        function zTreeOnExpand(event, treeId, treeNode) {
            updateLeftPartHeight("update");
        };

        function onModuleChange(id) {
            window.parent.appTreeId = id;
            var list = window.parent.document.getElementById("listFrame");
            $(list).attr('src','/formmode/charts/list.jsp?appid='+id);
            window.parent.$(".modelist").css('border-bottom','2px solid #30b5ff');
            window.parent.$(".modepage").css('border-bottom','0px solid #30b5ff');
        }

        function refreshAppTree() {
            var url = "/formmode/setup/appSettingsAction.jsp?action=getAllAppInfoForTree";
            if (jQuery("#subCompanyId").length > 0) {
                var subCompanyId = jQuery("#subCompanyId").val();
                if (subCompanyId != "") {
                    url = url + "&subCompanyId=" + subCompanyId;
                }
            }
            FormmodeUtil.doAjaxDataLoad(url, function (treeDatas) {
                initAppTree(treeDatas);
            });
        }

        var appDlg;

        function createApp(superFieldId) {
            appDlg = top.createTopDialog();//定义Dialog对象
            appDlg.Model = true;
            appDlg.Width = 700;//定义长度
            appDlg.Height = 360;
            var url = "/formmode/setup/addDefineApp.jsp?superFieldId=" + superFieldId + "&flag=create&isFromMode=1";
            if (jQuery("#subCompanyId").length > 0) {
                var subCompanyId = jQuery("#subCompanyId").val();
                if (subCompanyId != "") {
                    url = url + "&subCompanyId=" + subCompanyId;
                }
            }
            appDlg.URL = url;
            appDlg.Title = "<%=SystemEnv.getHtmlLabelName(82177,user.getLanguage())%>";//新增应用'
            appDlg.onCloseCallbackFn = function (result) {
                if (result) {
                    refreshApp(result);
                }
            };
            appDlg.show();
        }

        function editApp(appId) {
            var fmdetachable = "<%=fmdetachable%>";
            appDlg = top.createTopDialog();//定义Dialog对象
            appDlg.Model = true;
            appDlg.Width = 700;//定义长度
            if (fmdetachable == 1 && appId != 1) {
                appDlg.Height = 340;
            } else {
                appDlg.Height = 260;
            }
            appDlg.URL = "/formmode/setup/addDefineApp.jsp?appId=" + appId + "&flag=edit&isFromMode=1";
            appDlg.Title = "<%=SystemEnv.getHtmlLabelName(82178,user.getLanguage())%>";//编辑应用
            appDlg.onCloseCallbackFn = function (result) {
                if (result) {
                    refreshApp(result);
                }
            };
            appDlg.show();
        }

        var myMask;

        function deleteApp(appId, pid, name) {
            top.Dialog.confirm("<%=SystemEnv.getHtmlLabelName(82180,user.getLanguage())%>" + "\"" + name + "\"" + "<%=SystemEnv.getHtmlLabelName(82179,user.getLanguage())%>", function () {
                var url = "/formmode/setup/appSettingsAction.jsp?action=wasteApp";
                FormmodeUtil.doAjaxDataSave(url, {"appId": appId}, function (res) {
                    if (res == "1") {
                        refreshApp(pid);
                    } else {
                        alert("error:\n" + res);
                    }
                });
            });
        }

        function deleteModeTreeField(appId, pid, name) {
            var url = escape("/formmode/modesetdelete/deleteModeTreeField.jsp?appId=" + appId + "&pid=" + pid);
            var dialogurl = "/systeminfo/BrowserMain.jsp?url=" + url;
            var dialog = new window.top.Dialog();
            dialog.currentWindow = window;
            dialog.URL = dialogurl;
            dialog.callbackfun = function (paramobj, res) {
                var isrefresh = res.isrefresh;
                if (isrefresh == "1") {
                    refreshApp(pid);
                }
            };
            dialog.Title = "<%=SystemEnv.getHtmlLabelNames("91,345,172",user.getLanguage())%>";//请选择
            dialog.Width = 550;
            dialog.Height = 715;
            dialog.Drag = true;
            dialog.show();
        }

        function refreshApp(selectedAppid) {
            //closeCreateAppDlg();
            onModuleChange(selectedAppid);
            refreshAppTree();
        }

        function changeAppUrl() {
            var currModelId = document.getElementById("currModelId").value;
            var rightFrame = getRightFrame();
            var url = "/formmode/setup/appSettings.jsp?modelId=" + currModelId;
            if (jQuery("#subCompanyId").length > 0) {
                var subCompanyId = jQuery("#subCompanyId").val();
                if (subCompanyId != "") {
                    url = url + "&subCompanyId=" + subCompanyId;
                }
            }
            rightFrame.src = url;
        }

        function getRightFrame() {
            return parent.document.getElementById("mainFrame");
        }

        function updateLeftPartHeight(option) {
            var winHeight = jQuery(window).height() - 50;
            var detachDiv = jQuery("#detachDiv");//分权部分
            if (detachDiv.length == 1) {
                winHeight = winHeight - detachDiv.height();
            }
            if (window.parent.location.href.indexOf("/formmode/setup/ModeSettingMain.jsp") != -1) {
                if (jQuery.browser.msie) {
                    winHeight = winHeight - 70;
                } else {
                    winHeight = winHeight - 30;
                }
            }
            jQuery("#leftPart").height(winHeight);
            if (!!option) {
                jQuery("#leftPart").perfectScrollbar(option);
            } else {
                jQuery("#leftPart").perfectScrollbar();
            }
        }

        jQuery(window).resize(function () {
            updateLeftPartHeight("update");
        });

        function exportApp(appid) {
            var xmlHttp = ajaxinit();
            xmlHttp.open("post", "/formmode/setup/appoperationxml.jsp", true);
            var timestamp = (new Date()).valueOf();
            var postStr = "src=export&appid=" + appid + "&ti=" + timestamp;
            xmlHttp.onreadystatechange = function () {
                switch (xmlHttp.readyState) {
                    case 4 :
                        if (xmlHttp.status == 200) {
                            var downxml = xmlHttp.responseText.replace(/(^\s*)|(\s*$)/g, "");
                            window.open(downxml, "_self");
                        }
                        break;
                }
            }
            xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
            xmlHttp.send(postStr);
        }

        function preImportApp(appid) {
            appDlg = top.createTopDialog();//定义Dialog对象
            appDlg.currentWindow = window;
            appDlg.Model = true;
            appDlg.Width = 400;//定义长度
            appDlg.Height = 400;
            <%if(formModeConfig.isImportchecksametable()){%>
            appDlg.URL = "/formmode/setup/addDefineApp.jsp?appId=" + appid + "&flag=import&isImportant=<%=formModeConfig.isImportchecksametable()%>&isFromMode=1";
            <%}else{%>
            appDlg.URL = "/formmode/setup/addDefineApp.jsp?appId=" + appid + "&flag=import&isImportant=<%=formModeConfig.isImportchecksametable()%>&isFromMode=1";
            <%}%>
            appDlg.Title = "<%=SystemEnv.getHtmlLabelName(81994,user.getLanguage())%>";//导入应用
            appDlg.onCloseCallbackFn = function (result) {
                if (result) {
                    refreshApp(result);
                }
            };
            appDlg.show();
        }

        function preImportModel(appid) {
            appDlg = top.createTopDialog();//定义Dialog对象
            appDlg.currentWindow = window;
            appDlg.Model = true;
            appDlg.Width = 400;//定义长度
            appDlg.Height = 300;
            appDlg.URL = "/formmode/setup/preimportapp.jsp?importmodel=1&appid=" + appid;
            appDlg.Title = "<%=SystemEnv.getHtmlLabelName(81995,user.getLanguage())%>";//导入模块
            appDlg.onCloseCallbackFn = function (result) {
                if (result) {
                    refreshApp(result);
                }
            };
            appDlg.show();
        }

        function selectOrg() {
            var winHight = jQuery(window).height();
            var winWidth = jQuery(window).width();
            var dialog = new window.top.Dialog();
            dialog.currentWindow = window;
            dialog.Width = 580;
            dialog.Height = 630;
            dialog.normalDialog = false;
            dialog.URL = "/systeminfo/BrowserMain.jsp?url=/formmode/setup/SubcompanyBrowser.jsp?rightStr=FORMMODEAPP:ALL";
            //dialog.Top = "100%";
            //dialog.Left = "0%";
            dialog.callbackfun = function (paramobj, id1) {
                if (id1) {
                    var id = id1.id;
                    var name = id1.name;
                    if (id != "") {
                        window.location.href = "/formmode/setup/main.jsp?subCompanyId=" + id;
                    }
                }
            };
            dialog.Title = "<%=SystemEnv.getHtmlLabelName(33256,user.getLanguage())%>";//选择分部
            dialog.Drag = false;
            dialog.show();
        }
    </script>
    <style type="text/css">
        .e8_searchText {
            outline: none;
        }

        .e8_left_top {
            cursor: pointer;
            top: 0px;
            left: 0px;
            padding-left: 15px;
            padding-right: 15px;
            padding-bottom: 5px;
            padding-top: 15px;
        }

        .e8_searchTable {
            border-collapse: collapse;
            border: 1px solid #66bafc;
            height: 24px;
            width: 100%;
        }

        .e8_searchText {
            width: 100%;
            border: 0px;
            /*background-color:#53a2e0;*/
            color: #0c0c0c;
        }
    </style>
</head>

<body id="mainBody" name="mainBody">
<input type="hidden" id="appTreeId" value=""/>
<div class="e8_left_top">
    <%if (fmdetachable.equals("1")) {%>
    <div id="detachDiv">
        <table style="padding-bottom: 5px;">
            <tbody>
            <tr>
                <td width="18" style="padding-top:5px;padding-right:5px;line-height:5px;"><a title="查询"
                                                                                             href="javascript:selectOrg();">
                    <img src="/formmode/images/globalwhite_wev8.png" width="16" height="16" border="0px"/></a></td>
                <td style="padding:0 0 0 5px;position: relative;">
                    <div id="subCompanyIdSpan" name="subCompanyIdSpan" onclick="selectOrg()"
                         style="overflow: hidden;height: 20px;line-height: 20px;color: #fff;">
                        <%
                            if (defaultSubCompanyId == -1) {%>
                        <%=SystemEnv.getHtmlLabelName(82181,user.getLanguage())%><!-- 请选择分部 -->
                        <%
                            } else {
                                out.print(SubCompanyComInfo.getSubCompanyname("" + defaultSubCompanyId));
                            }
                        %>

                    </div>
                    <input style="display: none" type="text" id="subCompanyId" name="subCompanyId"
                           value="<%=defaultSubCompanyId %>"/></td>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <%}%>
    <table class="e8_searchTable">
        <tbody>
        <tr>
            <td style="padding:0 0 0 5px;position: relative;"><input type="text" class="e8_searchText" value=""></td>
            <td width="18" style="padding-top:5px;padding-right:5px;line-height:5px;">
                <a title="查询" href="javascript:doTextSearch();">
                    <img src="/formmode/images/searchblue_wev8.png" width="16" height="16" border="0px"/>
                </a></td>
        </tr>
        </tbody>
    </table>
</div>
<input type="hidden" id="currModelId"/>
<input type="hidden" id="rightFrameUrl" value="<%=rightframeurl%>"/>
<div id="leftPart">
    <div id="drillmenu">
        <ul class="e8_module_tree ztree" id="e8_module_tree"></ul>
    </div>
</div>


</ul>
<script type="text/javascript">
    function doTextSearch() {
        var searchText = jQuery(".e8_searchText").val();
        refreshAppTree4Search(searchText);
    }

    function refreshAppTree4Search(searchText) {
        var url = "/formmode/setup/appSettingsAction.jsp?action=getAllAppInfoForTreeSearch&searchtext=" + searchText;
        if (jQuery("#subCompanyId").length > 0) {
            var subCompanyId = jQuery("#subCompanyId").val();
            if (subCompanyId != "") {
                url = url + "&subCompanyId=" + subCompanyId;
            }
        }
        FormmodeUtil.doAjaxDataLoad(url, function (treeDatas) {
            initAppTree(treeDatas, true);
            jQuery(".e8_searchText").focus();
        });
    }
</script>
</body>
</html>