kongzy
2024-01-30 1123d12eb51d23edcd4a39660ef8cd47802b931d
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:s="http://shiro.apache.org/tags">
<head></head>
<ui:composition template="layouts/default.xhtml">
    <ui:define name="title">智慧实验室试剂全过程安全管理系统</ui:define>
<!--    <ui:define name="title">智能安全危险化学品全生命周期管控系统</ui:define>-->
 
    <ui:define name="north">
        <h:form id="northForm">
            <p:panelGrid styleClass="header">
                <p:row>
                    <p:column styleClass="header-logo">
                        <p:graphicImage value="#{loginController.logo}" style="width: 80px;height: 80px"></p:graphicImage>
                    </p:column>
                    <p:column styleClass="header-title">
                        <p:outputLabel value="#{loginController.title}"></p:outputLabel>
<!--                        <p:outputLabel value="中国科学院苏州纳米技术与纳米仿生研究所"></p:outputLabel>-->
                        <br/>
                        <p:outputLabel value="智慧实验室试剂全过程安全管理系统" style="color: #ffd74a"></p:outputLabel>
<!--                        <p:outputLabel value="智能安全危险化学品全生命周期管控系统" style="color: #ffd74a"></p:outputLabel>-->
                    </p:column>
                    <p:column styleClass="header-personal">
                        <h:inputHidden id="ischange" value="#{loginController.ischange}"></h:inputHidden>
                        <p:commandLink class="userName" style="margin-right: 30px" value="#{menuController.userName}" action="#{userMngController.updatePassword}" oncomplete="PF('dialogPassword').show();" update=":dialogPassword,:dialogFormPassword"></p:commandLink >
                        <p:commandLink class="logout" action="#{loginController.logout}" ajax="false"></p:commandLink>
                    </p:column>
                </p:row>
            </p:panelGrid>
        </h:form>
        <p:dialog modal="true" header="#{'修改密码'}" appendTo="@(body)"
              id="dialogPassword" widgetVar="dialogPassword"
              resizable="false" width="420">
            <h:form id="dialogFormPassword">
                <p:panelGrid columns="1" styleClass="content">
                    <p:outputLabel value="原密码"></p:outputLabel>
                    <p:password value="#{userMngController.oriPassword}" maxlength="100"
                             required="true" requiredMessage="请输入原密码" autocomplete="off"></p:password>
 
                     <p:outputLabel value="新密码(必须是8位以上且包含大小写和特殊字符)"></p:outputLabel>
                     <p:password value="#{userMngController.newPassword}" maxlength="100"
                             required="true" requiredMessage="请输入新密码" autocomplete="off"></p:password>
 
                    <p:outputLabel value="确认密码"></p:outputLabel>
                             <p:password value="#{userMngController.newPasswordSecond}" maxlength="100"
                             required="true" requiredMessage="请输入确认密码" autocomplete="off"></p:password>
                </p:panelGrid>
                <p:panel styleClass="btn">
                    <p:commandButton value="修改" actionListener="#{userMngController.updatePasswordAction}"
                                 process="@form">
                        <p:confirm header="确认" message="确认操作?"></p:confirm>
                    </p:commandButton>
                </p:panel>
            </h:form>
        </p:dialog>
 
        <p:dialog modal="true" header="#{'重置密码'}" appendTo="@(body)"
                  id="changePassword" widgetVar="changePassword"
                  width="420" style="left: 650px;top: 250px;"
                  closable="false">
            <h:form id="changeFormPassword">
                <p:panelGrid columns="1" styleClass="content">
                    <p:outputLabel value="原密码"></p:outputLabel>
                    <p:password value="#{userMngController.oriPassword}" maxlength="100"
                                required="true" requiredMessage="请输入原密码" autocomplete="off"></p:password>
 
                    <p:outputLabel value="新密码(必须是8位以上且包含大小写和特殊字符)"></p:outputLabel>
                    <p:password value="#{userMngController.newPassword}" maxlength="100"
                                required="true" requiredMessage="请输入新密码" autocomplete="off"></p:password>
 
                    <p:outputLabel value="确认密码"></p:outputLabel>
                    <p:password value="#{userMngController.newPasswordSecond}" maxlength="100"
                                required="true" requiredMessage="请输入确认密码" autocomplete="off"></p:password>
                </p:panelGrid>
                <p:panel styleClass="btn">
                    <p:commandButton value="修改" actionListener="#{userMngController.updatePasswordAction}"
                                     process="@form">
                        <p:confirm header="确认" message="确认操作?"></p:confirm>
                    </p:commandButton>
                </p:panel>
            </h:form>
        </p:dialog>
        <script>
            // console.log($('#northForm\\:ischange').val())
            // if($('#northForm\\:ischange').val() == 0){
            //     $("#changePassword").hide();
            // }else {
            //     $("#changePassword").show();
            // }
        </script>
    </ui:define>
 
    <ui:define name="west">
        <h:form id="westForm">
            <p:panelGrid styleClass="menu" columns="1">
                <c:if test="#{menuController.menuList != null and menuController.menuList.size() > 0}">
                    <c:forEach items="#{menuController.menuList}" var="menu">
                        <c:if test="#{menu.dispInMenuList and (menu.id ne 'system_link' or menuController.activeEnv eq 'gslab') }">
                            <c:if test="#{menu.subMenu != null and menu.subMenu.size() > 0}">
                                <p:panelMenu style="border: none">
                                    <p:submenu label="#{menu.title}" rendered="#{menuController.isDispRootMenu(menu)}"
                                               style="border: none"
                                               styleClass="#{menu.icon}">
 
                                        <c:forEach items="#{menu.subMenu}" var="subMenu">
                                            <c:if test="#{menuController.activeEnv ne 'gslab' or subMenu.id ne 'price_mng'}" >
                                                <p:menuitem value="#{subMenu.title}"
                                                            actionListener="#{menuController.goToPage(subMenu)}"
                                                            update=":centerRootPanel,@form"
                                                            containerStyleClass="#{menuController.currentPage==subMenu.page?'menu-item-selected':''}"
                                                            rendered="#{menuController.isPermitted(subMenu.privilegeCode)}">
                                                </p:menuitem>
                                            </c:if>
 
                                        </c:forEach>
                                    </p:submenu>
                                </p:panelMenu>
                            </c:if>
                            <c:if test="#{menu.subMenu == null or menu.subMenu.size() == 0}">
                                <p:commandButton value="#{menu.title}"
                                                 actionListener="#{menuController.goToPage(menu)}"
                                                 update=":centerRootPanel,@form"
                                                 rendered="#{menuController.isPermitted(menu.privilegeCode)}"
                                                 styleClass="#{menu.icon} menu-item#{menuController.currentPage==menu.page?' menu-item-selected':''}"></p:commandButton>
                            </c:if>
                        </c:if>
                    </c:forEach>
                </c:if>
                <!-- 添加系统链接 -->
 
                                
                                
            </p:panelGrid>
        </h:form>
    </ui:define>
 
    <ui:define name="center">
        <p:growl showSummary="true" showDetail="true" life="3000" autoUpdate="true"></p:growl>
        <p:panel id="centerRootPanel">
            <ui:include src="#{menuController.currentPage}.xhtml"></ui:include>
        </p:panel>
    </ui:define>
 
    <ui:define name="south">
        <a style="text-align: center;display: block" href="http://beian.miit.gov.cn" target="_Blank">${institute.copyright}</a>
    </ui:define>
</ui:composition>
</html>