From 0ece929cad95dbe0bb4c8be5e03ddccacec5a935 Mon Sep 17 00:00:00 2001
From: 李宇 <986321569@qq.com>
Date: 星期二, 22 十二月 2020 12:17:25 +0800
Subject: [PATCH] 修改危化品编码
---
src/main/webapp/sys_controller_mng.xhtml | 21 ++++++++++++++++++---
1 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/src/main/webapp/sys_controller_mng.xhtml b/src/main/webapp/sys_controller_mng.xhtml
index a329e75..82a840d 100644
--- a/src/main/webapp/sys_controller_mng.xhtml
+++ b/src/main/webapp/sys_controller_mng.xhtml
@@ -26,7 +26,7 @@
</p:panelGrid>
</p:panel>
<p:panel styleClass="center-body">
- <p:panelGrid columns="3" styleClass="btn">
+ <p:panelGrid columns="6" styleClass="btn">
<p:commandButton value="新建" styleClass="new-btn"
process="@this"
actionListener="#{sysControllerMngController.onNewBtnClick}"
@@ -42,8 +42,23 @@
update="@form">
<p:confirm header="确认" message="确认操作?"></p:confirm>
</p:commandButton>
- </p:panelGrid>
+ <p:commandButton value="导入" styleClass="import-btn" onclick="importExcel()"/>
+ <p:commandButton value="导出" styleClass="new-btn" ajax="false" actionListener="${sysControllerMngController.export2Excel}"/>
+ <a href="resources/template/主控设备导入模板.xlsx" style="display: inline-block;"><img src="resources/images/xlsx.png" width="30px;" alt=""/></a>
+ <script type="text/javascript">
+ function importExcel(){
+ $("#sysControllerMngForm\\:importControl_input").click()
+ }
+ </script>
+
+ </p:panelGrid>
+ <div style="display: none" id='importDv'>
+ <p:fileUpload fileUploadListener="#{sysControllerMngController.uploadFile}"
+ dragDropSupport="false" id="importControl" label="导入"
+ update="@form" auto="true" sizeLimit="5000000"
+ mode="advanced"/>
+ </div>
<p:dataTable id="sysControllerMngDataTable" styleClass="data-table"
paginator="true" paginatorAlwaysVisible="false" paginatorPosition="bottom"
lazy="true" value="#{sysControllerMngController.dataModel}" var="row" rowKey="#{row.id}"
@@ -71,7 +86,7 @@
<p:inputText value="#{sysControllerMngController.controller.controllerName}"></p:inputText>
<p:outputLabel value="设备代码"></p:outputLabel>
- <p:inputText value="#{sysControllerMngController.controller.controllerCode}" readonly="true"></p:inputText>
+ <p:inputText value="#{sysControllerMngController.controller.controllerCode}"></p:inputText>
<p:outputLabel value="设备类型"></p:outputLabel>
<p:selectOneMenu value="#{sysControllerMngController.controller.type}"
required="true" requiredMessage="请选择设备类型">
--
Gitblit v1.9.2