<?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">
|
<head>
|
<style type="text/css">
|
div.ui-fileupload-content.ui-widget-content .ui-corner-bottom{
|
display: none;
|
}
|
|
|
</style>
|
|
|
</head>
|
<ui:composition>
|
<h:form id="fileMngForm">
|
<p:panel styleClass="center-header">
|
<p:outputLabel styleClass="title" value="app文件管理"></p:outputLabel>
|
<p:panelGrid styleClass="filter" columns="8">
|
<p:outputLabel value="app名称:"></p:outputLabel>
|
<p:inputText value="#{sysFileMngController.name}"></p:inputText>
|
<p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink>
|
</p:panelGrid>
|
</p:panel>
|
<p:panel styleClass="center-body">
|
<p:panelGrid columns="3" styleClass="btn">
|
<p:commandButton value="新建" styleClass="new-btn"
|
process="@this"
|
actionListener="#{sysFileMngController.onNewBtnClick}"
|
oncomplete="PF('dialog').show();"
|
update=":dialog,:dialogForm"></p:commandButton>
|
<p:commandButton value="修改" styleClass="edit-btn"
|
process="@form"
|
actionListener="#{sysFileMngController.onEditBtnClick}"
|
update=":dialog,:dialogForm"></p:commandButton>
|
<p:commandButton value="删除" styleClass="del-btn"
|
process="@form"
|
actionListener="#{sysFileMngController.onDeleteBtnClick}"
|
update="@form">
|
<p:confirm header="确认" message="确认操作?"></p:confirm>
|
</p:commandButton>
|
</p:panelGrid>
|
|
<p:dataTable id="fileMngDataTable" styleClass="data-table"
|
paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
|
lazy="true" value="#{sysFileMngController.dataModel}" var="row" rowKey="#{row.id}"
|
emptyMessage="无数据" selection="#{sysFileMngController.selectedList}"
|
rows="20" pageLinks="5">
|
<p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>
|
<p:column headerText="app名称">
|
<h:outputText value="#{row.name}"></h:outputText>
|
</p:column>
|
<p:column headerText="版本号">
|
<h:outputText value="#{row.version}"></h:outputText>
|
</p:column>
|
<p:column headerText="RFID版本">
|
<h:outputText value="1" rendered="#{row.newOrOld==1}"></h:outputText>
|
<h:outputText value="2" rendered="#{row.newOrOld==2}"></h:outputText>
|
</p:column>
|
<p:column headerText="文件名称">
|
<h:outputText value="#{row.fileName}"></h:outputText>
|
</p:column>
|
<p:column headerText="备注">
|
<h:outputText value="#{row.remark}"></h:outputText>
|
</p:column>
|
</p:dataTable>
|
</p:panel>
|
</h:form>
|
|
<p:dialog modal="true" header="#{sysFileMngController.action==constants.ACTION_ADD?'新建':'修改'}" appendTo="@(body)"
|
id="dialog" widgetVar="dialog" resizable="false" width="450">
|
<h:form id="dialogForm" enctype="multipart/form-data">
|
<p:panelGrid columns="1" styleClass="content">
|
<p:row>
|
<p:column>
|
<p:outputLabel value="app名称"></p:outputLabel>
|
</p:column>
|
<p:column>
|
<p:inputText value="#{sysFileMngController.sysFile.name}" required="true" requiredMessage="请输入名称"></p:inputText>
|
</p:column>
|
</p:row>
|
<p:row>
|
<p:column>
|
<p:outputLabel value="RFID版本"></p:outputLabel>
|
</p:column>
|
<p:column>
|
<p:selectOneMenu value="#{sysFileMngController.sysFile.newOrOld}" required="true" requiredMessage="请选择RFID版本">
|
<f:selectItem itemLabel="请选择" itemValue="#{null}" noSelectionOption="true" ></f:selectItem>
|
<f:selectItem itemLabel="1" itemValue="1" ></f:selectItem>
|
<f:selectItem itemLabel="2" itemValue="2" ></f:selectItem>
|
</p:selectOneMenu>
|
</p:column>
|
</p:row>
|
<p:row>
|
<p:column>
|
<p:outputLabel value="版本号"></p:outputLabel>
|
</p:column>
|
<p:column>
|
<p:inputText decimalPlaces="0" minValue="0"
|
required="true" requiredMessage="请输入版本号" value="#{sysFileMngController.sysFile.version}"></p:inputText>
|
</p:column>
|
</p:row>
|
<p:row>
|
<p:column>
|
<p:outputLabel value="上传文件"></p:outputLabel>
|
</p:column>
|
|
<style type="text/css">
|
#dialogForm\:fileUploadComponent_label{
|
position: relative ;
|
font-size: 1.1rem ;
|
background-color: #206cdd ;
|
background-size: 46px 26px ;
|
color: white ;
|
transition: all ease 0.3s ;
|
border: unset;
|
height: 25px;
|
}
|
|
#dialogForm\:fileUploadComponent_label::after {
|
position: absolute ;
|
top: 41%;
|
right: 0.6em ;
|
transform: translateY(-50%) ;
|
content:"»" ;
|
font-size: 1.2em ;
|
transition: all ease 0.3s ;
|
opacity: 0;
|
}
|
#dialogForm\:fileUploadComponent_label:hover {
|
padding: .3em 1.8em .3em 0.9em;
|
}
|
|
.ui-button-text-icon-left .ui-button-text {
|
padding: 0.3em 1em 0.3em 1.1em;
|
}
|
|
#dialogForm\:fileUploadComponent_label:hover::after{
|
right: 0.6em;
|
opacity: 1 ;
|
}
|
#dialogForm\:fileUploadComponent .ui-icon-plusthick,#dialogForm\:fileUploadComponent>.ui-corner-bottom{
|
display: none ;
|
}
|
#dialogForm\:fileUploadComponent>.ui-corner-top{
|
background: white;
|
border: 0;
|
}
|
#dialogForm\:fileUploadComponent>.ui-fileupload-buttonbar>.ui-button{
|
float: right;
|
right: -16px;
|
text-shadow: none;
|
height: 31px;
|
}
|
#dialogForm\:fileUploadComponent_input{
|
position: absolute;
|
top: unset;
|
}
|
|
label#dialogForm\:uploadFileInfo{
|
position: absolute;
|
top: 291px;
|
width: 257px;
|
height: 25px;
|
border: 1px solid #e5e5e5!important;
|
background-color: #f7f7f7;
|
border-radius: 3px;
|
display: inline-block;
|
cursor: pointer;
|
font-family: "Oracle Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
|
-webkit-font-smoothing: antialiased;
|
font-weight: 500;
|
padding: 5px 0 0 6px;
|
}
|
</style>
|
<script type="text/javascript">
|
document.getElementById("dialogForm:fileUploadComponent_label").onclick=function (){
|
document.getElementById("dialogForm:fileUploadComponent_input").click()
|
}
|
|
</script>
|
<p:fileUpload id="fileUploadComponent" auto="true" label="选择"
|
fileUploadListener="#{sysFileMngController.upload}"
|
mode="advanced" dragDropSupport="false" update="uploadFileInfo" skinSimple="true"/>
|
|
<p:outputLabel id="uploadFileInfo" value="#{sysFileMngController.sysFile.fileName}"></p:outputLabel>
|
</p:row>
|
<p:row>
|
<p:column>
|
<p:outputLabel value="备注"></p:outputLabel>
|
</p:column>
|
<p:column>
|
<p:inputTextarea autoResize="false" style="height: 80px"
|
value="#{sysFileMngController.sysFile.remark}"
|
maxlength="200"></p:inputTextarea>
|
</p:column>
|
</p:row>
|
|
|
</p:panelGrid>
|
<p:panel styleClass="btn">
|
<p:commandButton value="保存" actionListener="#{sysFileMngController.onSaveBtnClick}"
|
process="@form" update=":fileMngForm:fileMngDataTable">
|
<p:confirm header="确认" message="确认操作?"></p:confirm>
|
</p:commandButton>
|
</p:panel>
|
</h:form>
|
</p:dialog>
|
</ui:composition>
|
|
</html>
|