Browse Source

Merge branch 'master' of http://192.168.1.220:10080/CoSharp/eip

airhead 7 years ago
parent
commit
9c377f6d1b

+ 0 - 5
pom.xml

@ -31,11 +31,6 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-cache</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>

+ 2 - 0
src/main/java/com/yihu/hos/filter/SessionOutTimeFilter.java

@ -28,6 +28,8 @@ public class SessionOutTimeFilter extends OncePerRequestFilter {
        HttpSession session = request.getSession();
        if (requestUri.indexOf("/login") != -1
                || requestUri.indexOf("/tenantAutoFail") != -1
                || requestUri.indexOf("/tokenValidFail") != -1
                || requestUri.indexOf("/system/loginAction") != -1
                || requestUri.indexOf("/error") != -1
                || requestUri.indexOf("/test.jsp") != -1

+ 9 - 9
src/main/java/com/yihu/hos/monitor/service/ServerMonitorService.java

@ -34,11 +34,11 @@ public class ServerMonitorService {
    private MongoOperations mongoOperations;
    @Autowired
    private Mongo mongo;
    private MongoClient mongoClient;
    public Result getMonitorList(HttpSession session, String host, String type, String beginTime, String endTime) {
        TenantSession tenantSession = (TenantSession) session.getAttribute(ContextAttributes.TENANT_SESSION);
        mongoOperations = new MongoTemplate(mongo, MONITOR);
        mongoOperations = new MongoTemplate(mongoClient, MONITOR);
        DBCollection envCollection = mongoOperations.getCollection(SERVER);
        Timestamp begin = DateUtil.toTimestamp(beginTime);
        Timestamp end = DateUtil.toTimestamp(endTime);
@ -47,8 +47,8 @@ public class ServerMonitorService {
                        new BasicDBObject().append("tenant", tenantSession.getTenant()),
                        new BasicDBObject().append("host", host),
                        new BasicDBObject().append("type", type),
                        new BasicDBObject("create_time", new BasicDBObject().append(QueryOperators.GTE, begin)
                                .append(QueryOperators.LT, end))
                        new BasicDBObject("create_date", new BasicDBObject().append(QueryOperators.GTE, beginTime)
                                .append(QueryOperators.LT, endTime))
                });
        List<DBObject> result = new ArrayList<>();
@ -66,7 +66,7 @@ public class ServerMonitorService {
    public Result getMonitorDetail(HttpSession session, String host, String type, String date) {
        TenantSession tenantSession = (TenantSession) session.getAttribute(ContextAttributes.TENANT_SESSION);
        mongoOperations = new MongoTemplate(mongo, MONITOR);
        mongoOperations = new MongoTemplate(mongoClient, MONITOR);
        DBCollection envCollection = mongoOperations.getCollection(SERVER);
        Timestamp timestamp = DateUtil.toTimestamp(date);
        BasicDBObject queryObject = new BasicDBObject().append(QueryOperators.AND,
@ -74,10 +74,10 @@ public class ServerMonitorService {
                        new BasicDBObject().append("tenant", tenantSession.getTenant()),
                        new BasicDBObject().append("host", host),
                        new BasicDBObject().append("type", type),
                        new BasicDBObject("create_time", new BasicDBObject(QueryOperators.LTE, timestamp))});
                        new BasicDBObject("create_date", new BasicDBObject(QueryOperators.LTE, date))});
        Map result = new HashMap<>();
        DBCursor cursor = envCollection.find(queryObject).sort(new BasicDBObject("create_time", -1)).limit(1);
        DBCursor cursor = envCollection.find(queryObject).sort(new BasicDBObject("create_date", -1)).limit(1);
        while (cursor.hasNext()) {
            DBObject dbObject = cursor.next();
            dbObject.removeField("_id");
@ -92,7 +92,7 @@ public class ServerMonitorService {
    public Result getHosts() {
        List<Map<String, Object>> result = new ArrayList<>();
        mongoOperations = new MongoTemplate(mongo, MONITOR);
        mongoOperations = new MongoTemplate(mongoClient, MONITOR);
        DBCollection envCollection = mongoOperations.getCollection(HOST);
        DBCursor cursor = envCollection.find();
        while (cursor.hasNext()) {
@ -117,7 +117,7 @@ public class ServerMonitorService {
    public Result getServerTreeList(HttpSession session) throws Exception {
        List<TreeView> treeList = new ArrayList<>();
        TenantSession tenantSession = (TenantSession) session.getAttribute(ContextAttributes.TENANT_SESSION);
        mongoOperations = new MongoTemplate(mongo, MONITOR);
        mongoOperations = new MongoTemplate(mongoClient, MONITOR);
        DBCollection envCollection = mongoOperations.getCollection(HOST);
        //查询条件
        BasicDBObject queryObject = new BasicDBObject().append(QueryOperators.AND,

+ 7 - 7
src/main/webapp/WEB-INF/ehr/jsp/common/index.jsp

@ -14,18 +14,18 @@
    .m-index-content{height:100%;background-color: #fff;border:1px solid #e1e1e1;border-bottom: 0px;}
    #ulTree.l-tree{background: #f6f9fa;}
    #ulTree.l-tree li .l-body,#ulTree.l-tree li .l-body span{height: 45px;line-height: 45px;font-size: 14px;font-weight: bolder;}
    #ulTree.l-tree li .l-body,#ulTree.l-tree li .l-body span{height: 30px;line-height: 30px;font-size: 14px;font-weight: bolder;}
    #ulTree.l-tree li .l-body{background: #f6f9fa;border-bottom: #e8e8e8 solid 1px;}
    #ulTree.l-tree li>.l-selected{background:#4DB2EE;}
    #ulTree.l-tree li>.l-selected span{color:#fff;}
    #ulTree.l-tree li .l-body .l-box{background: transparent;width:0px;}
    #ulTree.l-tree li .l-body .l-box.l-tree-icon{width:45px;height:45px;}
    #ulTree.l-tree li .l-body .l-box.l-tree-icon img{width:16px;height:16px;margin-top:14px;margin-left:20px;}
    #ulTree.l-tree .l-children li .l-body,#ulTree.l-tree .l-children li .l-body span{height:45px;line-height: 45px;font-size: 12px;font-weight:normal;}
    #ulTree.l-tree .l-children li .l-body{height: 45px;line-height: 45px;padding-left:15px;}
    #ulTree.l-tree li .l-body .l-box.l-tree-icon{width:45px;height:25px;}
    #ulTree.l-tree li .l-body .l-box.l-tree-icon img{width:16px;height:16px;margin-top:6px;margin-left:20px;}
    #ulTree.l-tree .l-children li .l-body,#ulTree.l-tree .l-children li .l-body span{height:30px;line-height: 30px;font-size: 12px;font-weight:normal;}
    #ulTree.l-tree .l-children li .l-body{height: 30px;line-height: 30px;padding-left:15px;}
    #ulTree.l-tree .l-children li .l-body.l-selected{background-color: #f6f9fa;}
    #ulTree.l-tree .l-children li>.l-body.l-selected span{color: #4DB2EE;}
    
    #btnIndexLogout{float: right;width:40px;height:40px;background:url('${staticRoot}/images/index/logout_btn.png') no-repeat;margin-left:10px;}
    #btnIndexLogout:hover{background:url('${staticRoot}/images/index/logout_over_btn.png') no-repeat;cursor:pointer}
    #btnIndexPassword{float: right;width:40px;height:40px;background:url('${staticRoot}/images/index/password_btn.png') no-repeat;}
@ -54,7 +54,7 @@
    <div position="center" class="m-index-center" id="divIndexContent">
    </div>
<input type="hidden" id="ehrUser" value="${ehrUser}">
    <input type="hidden" id="ehrUser" value="${ehrUser}">
</div>

+ 67 - 67
src/main/webapp/WEB-INF/ehr/jsp/common/indexJs.jsp

@ -93,7 +93,7 @@
                {id: 5, text: '运行监控', icon: '${staticRoot}/images/index/menu04.png'},
                {id: 51, pid: 5, text: '系统监控', url: '${contextRoot}/monitor/server/initial', icon: '${staticRoot}/images/index/Ins_icon.png'},
                {id: 52, pid: 5, text: '服务监控', url: '${contextRoot}/monitor/service/initial', icon: '${staticRoot}/images/index/Ins_icon.png'},
              <%--{id: 55, pid: 5, text: '远程管理', url: '${contextRoot}/shell/initial', icon: '${staticRoot}/images/index/Ins_icon.png'},--%>
                <%--{id: 55, pid: 5, text: '远程管理', url: '${contextRoot}/shell/initial', icon: '${staticRoot}/images/index/Ins_icon.png'},--%>
                //资源管理
                <%--{id: 3, text: '资源服务', icon: '${staticRoot}/images/index/menu05.png'},--%>
@ -155,54 +155,54 @@
                btnClickToToggleOnly: false,
                slide: true,
                nodeDraggable: false,
                isExpand: false,
                isExpand: true,//true展开所有,false关闭所有
                parentIcon: true,
                childIcon: true,
                nodeWidth: 176,
                onSelect: function (obj) {
                	if (obj.data.url != undefined) {
                    if (obj.data.url != undefined) {
                        if(obj.data.url.indexOf("report/signin") >= 0){
                            me.loadIframePage(obj.data.url);//质控页面
                        }else{
                            me.openMenu(obj);
                        }
                    }
                	//选中子菜单时默认选中父菜单
                	if(obj.data.children == undefined){
                		var parent = $("#ulTree li").eq(obj.data.treedataindex).parents("li");
                		var parImg = parent.children(".l-body").children(".l-tree-icon").find("img");
                		parent.children(".l-body").addClass("l-selected");
                		if(parImg.attr("src").indexOf("hover") == -1){
                			var imgSrc = parImg.attr("src");
                			parImg.attr("src",imgSrc.substring(0,imgSrc.length-4)+"_hover.png");
                		}
                	}
                	//切换选中菜单的图标
                	var imgSrc = obj.data.icon;
                	if(imgSrc.indexOf("hover")>0){
                		obj.data.hover = imgSrc;
                	}else{
                		obj.data.hover = imgSrc.substring(0,obj.data.icon.length-4)+"_hover.png";
                		obj.data.icon = obj.data.hover;
                	}
                	$("#ulTree li").eq(obj.data.treedataindex).children(".l-body").find("img").attr("src",obj.data.hover);
                	$.each($(".l-body"), function(index, item) {
						var self = $(this);
						if(!self.hasClass("l-selected")){
							var imgSrcs = self.find("img").attr("src");
							if(imgSrcs.indexOf("hover") > 0){
								self.find("img").attr("src",imgSrcs.substring(0,imgSrcs.length-10)+".png");
							}
						}
					});
                    //选中子菜单时默认选中父菜单
                    if(obj.data.children == undefined){
                        var parent = $("#ulTree li").eq(obj.data.treedataindex).parents("li");
                        var parImg = parent.children(".l-body").children(".l-tree-icon").find("img");
                        parent.children(".l-body").addClass("l-selected");
                        if(parImg.attr("src").indexOf("hover") == -1){
                            var imgSrc = parImg.attr("src");
                            parImg.attr("src",imgSrc.substring(0,imgSrc.length-4)+"_hover.png");
                        }
                    }
                    //切换选中菜单的图标
                    var imgSrc = obj.data.icon;
                    if(imgSrc.indexOf("hover")>0){
                        obj.data.hover = imgSrc;
                    }else{
                        obj.data.hover = imgSrc.substring(0,obj.data.icon.length-4)+"_hover.png";
                        obj.data.icon = obj.data.hover;
                    }
                    $("#ulTree li").eq(obj.data.treedataindex).children(".l-body").find("img").attr("src",obj.data.hover);
                    $.each($(".l-body"), function(index, item) {
                        var self = $(this);
                        if(!self.hasClass("l-selected")){
                            var imgSrcs = self.find("img").attr("src");
                            if(imgSrcs.indexOf("hover") > 0){
                                self.find("img").attr("src",imgSrcs.substring(0,imgSrcs.length-10)+".png");
                            }
                        }
                    });
                },
                onClick:function(obj){
                },
                onBeforeSelect(obj){//解决bug 3487【ESB】标准规范:点击标准规范的图标,图标会显示成白色。
                onBeforeSelect:function(obj){//解决bug 3487【ESB】标准规范:点击标准规范的图标,图标会显示成白色。
                    if(obj.data == null){
                         if(obj.target.parentElement.parentElement.className.indexOf("l-selected") > 0){
                        if(obj.target.parentElement.parentElement.className.indexOf("l-selected") > 0){
                            return false;
                         }
                        }
                    }
                },
                //一级节点不可选中
@ -464,39 +464,39 @@
    $(function () {
        <%--if (window.history && window.history.pushState) {--%>
            <%--$(window).on('popstate', function () {--%>
                <%--var hashLocation = location.hash;--%>
                <%--var hashSplit = hashLocation.split("#!/");--%>
                <%--var hashName = hashSplit[1];--%>
                <%--if (hashName !== '') {--%>
                    <%--var hash = window.location.hash;--%>
                    <%--if (hash === '') {--%>
                        <%--$.ligerDialog.confirm('是否确认后退登出系统!', function (yes) {--%>
                            <%--if (yes) {--%>
                                <%--$.ajax({ //获取表的字段列表--%>
                                    <%--type: "POST",--%>
                                    <%--url: "${contextRoot}/system/logoutAction",--%>
                                    <%--dataType: "json",--%>
                                    <%--cache: false,--%>
                                    <%--success: function (data) {--%>
                                        <%--if (data.successFlg) {--%>
                                            <%--localStorage.removeItem("userRole");--%>
                                            <%--location.href = "${contextRoot}/"+data.data+"/loginPage";--%>
                                        <%--}--%>
                                        <%--else {--%>
                                            <%--$.ligerDialog.error(data.message);--%>
                                        <%--}--%>
                                    <%--},--%>
                                    <%--error: function (data) {--%>
                                        <%--$.ligerDialog.error("Status:" + data.status + "(" + data.statusText + ")");--%>
                                    <%--}--%>
                                <%--});--%>
                            <%--}--%>
                        <%--});--%>
                    <%--}--%>
                <%--}--%>
            <%--});--%>
            <%--window.history.pushState('forward', null, './indexPage');--%>
        <%--$(window).on('popstate', function () {--%>
        <%--var hashLocation = location.hash;--%>
        <%--var hashSplit = hashLocation.split("#!/");--%>
        <%--var hashName = hashSplit[1];--%>
        <%--if (hashName !== '') {--%>
        <%--var hash = window.location.hash;--%>
        <%--if (hash === '') {--%>
        <%--$.ligerDialog.confirm('是否确认后退登出系统!', function (yes) {--%>
        <%--if (yes) {--%>
        <%--$.ajax({ //获取表的字段列表--%>
        <%--type: "POST",--%>
        <%--url: "${contextRoot}/system/logoutAction",--%>
        <%--dataType: "json",--%>
        <%--cache: false,--%>
        <%--success: function (data) {--%>
        <%--if (data.successFlg) {--%>
        <%--localStorage.removeItem("userRole");--%>
        <%--location.href = "${contextRoot}/"+data.data+"/loginPage";--%>
        <%--}--%>
        <%--else {--%>
        <%--$.ligerDialog.error(data.message);--%>
        <%--}--%>
        <%--},--%>
        <%--error: function (data) {--%>
        <%--$.ligerDialog.error("Status:" + data.status + "(" + data.statusText + ")");--%>
        <%--}--%>
        <%--});--%>
        <%--}--%>
        <%--});--%>
        <%--}--%>
        <%--}--%>
        <%--});--%>
        <%--window.history.pushState('forward', null, './indexPage');--%>
        <%--}--%>
        isLogin();