From 47a751cb301d05276ae5d75145d57b2d090fe4e1 Mon Sep 17 00:00:00 2001 From: kongzy <kongzy> Date: 星期一, 01 七月 2024 10:58:35 +0800 Subject: [PATCH] change --- src/main/webapp/user_mng.xhtml | 55 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 48 insertions(+), 7 deletions(-) diff --git a/src/main/webapp/user_mng.xhtml b/src/main/webapp/user_mng.xhtml index 4764996..1c6c326 100644 --- a/src/main/webapp/user_mng.xhtml +++ b/src/main/webapp/user_mng.xhtml @@ -23,7 +23,7 @@ <p:inputText value="#{userMngController.name}"></p:inputText> <p:outputLabel value="课题组:"></p:outputLabel> - <p:inputText value="#{userMngController.project}"></p:inputText> + <p:inputText value="#{userMngController.projectName}"></p:inputText> <p:outputLabel value="部门:"></p:outputLabel> <p:inputText value="#{userMngController.departmentName}"></p:inputText> @@ -83,6 +83,9 @@ white-space: normal; word-break: break-all; } + #dialogForm\:img-pic > tbody > tr > td:nth-child(2):has(img) { + width: 200px !important; + } </style> <p:dataTable id="userMngDataTable" styleClass="data-table" paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom" @@ -99,7 +102,7 @@ </p:column> <p:column headerText="课题组"> - <h:outputText value="#{row.project}"></h:outputText> + <h:outputText value="#{row.projectName}"></h:outputText> </p:column> <p:column headerText="ARP"> @@ -162,7 +165,8 @@ <p:dialog modal="true" header="#{userMngController.action==constants.ACTION_ADD?'新建':'修改'}" appendTo="@(body)" id="dialog" widgetVar="dialog" - resizable="false" width="800"> + resizable="false" width="900"> + <h:form id="dialogForm"> <p:panelGrid columns="4" styleClass="content2 grid-padding-bottom2"> <p:outputLabel value="单位"></p:outputLabel> @@ -184,10 +188,10 @@ required="true" requiredMessage="请输入ARP号"></p:inputText> <p:outputLabel value="课题组"></p:outputLabel> - <p:selectOneMenu value="#{userMngController.sysUser.project}" filter="true" filterMatchMode="startsWith"> + <p:selectOneMenu value="#{userMngController.sysUser.projectId}" filter="true" filterMatchMode="startsWith" required="true" requiredMessage="请选择课题组"> <f:selectItem itemLabel="不选择课题组" /> <f:selectItems value="#{sysProjectServiceImpl.getAll()}" - var="item" itemLabel="#{item.project}" itemValue="#{item.project}"></f:selectItems> + var="item" itemLabel="#{item.projectName}" itemValue="#{item.id}"></f:selectItems> </p:selectOneMenu> <p:outputLabel value="姓名"></p:outputLabel> @@ -212,8 +216,6 @@ <p:outputLabel value="ID卡号"></p:outputLabel> <p:inputText value="#{userMngController.sysUser.idCard}" maxlength="32"></p:inputText> - <p:outputLabel value="分数"></p:outputLabel> - <p:inputText value="#{userMngController.sysUser.point}" maxlength="32"></p:inputText> <p:outputLabel value="角色"></p:outputLabel> <p:selectOneMenu value="#{userMngController.sysUser.roleId}" @@ -250,6 +252,23 @@ <f:selectItems value="#{userMngController.wasterSelectList}" var="item" itemLabel="#{item.text}" itemValue="#{item}"></f:selectItems> </p:selectOneMenu> + + + <p:outputLabel /> + <p:outputLabel /> + + </p:panelGrid> + <p:panelGrid columns="4" styleClass="content2 grid-padding-bottom2" id="img-pic"> + <p:outputLabel value="图片"/> + + <p:graphicImage rendered="#{userMngController.sysUser.url ne null and userMngController.sysUser.url ne ''}" + url="#{userMngController.sysUser.url}" + width="120" + height="120"/> + + <p:commandButton value="点击上传" + oncomplete="PF('imgDialog').show();"/> + </p:panelGrid> <p:panel styleClass="btn"> <p:commandButton value="保存" actionListener="#{userMngController.onSaveBtnClick}" @@ -259,5 +278,27 @@ </p:panel> </h:form> </p:dialog> + <p:dialog modal="true" header="图片上传" appendTo="@(body)" + id="imgDialog" widgetVar="imgDialog" + resizable="false" width="700"> + <p:panelGrid columns="1" styleClass="content2 grid-padding-bottom2"> + <h:form id="dialogForm2"> + <p:fileUpload fileUploadListener="#{userMngController.handleImageUpload}" + mode="advanced" + dragDropSupport="false" + uploadLabel="上传" + cancelLabel="取消" + label="浏览" + invalidFileMessage="请上传gif、jpe、jpg、png文件" + multiple="false" + sizeLimit="10000000" + fileLimit="1" + allowTypes="/(\.|\/)(gif|jpe?g|png)$/" + > </p:fileUpload> + </h:form> + + </p:panelGrid> + + </p:dialog> </ui:composition> </html> -- Gitblit v1.9.2