160 lines
5.3 KiB
Plaintext
160 lines
5.3 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8"%>
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
|
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
|
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
|
|
|
<%@page import="com.sipai.entity.maintenance.LibraryMaintenanceCommon"%>
|
|
<%request.setAttribute("type_Common", LibraryMaintenanceCommon.type_Common);%>
|
|
<%request.setAttribute("type_Meter", LibraryMaintenanceCommon.type_Meter);%>
|
|
|
|
<!DOCTYPE html>
|
|
<!-- <html lang="zh-CN"> -->
|
|
<!-- BEGIN HEAD -->
|
|
<head>
|
|
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
|
<!-- 引用页头及CSS页-->
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
<!-- 文件上传-->
|
|
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/css/fileinput.min.css"/>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/fileinput.min.js" charset="utf-8"></script>
|
|
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-fileinput/js/locales/zh.js" charset="utf-8"></script>
|
|
<style type="text/css">
|
|
|
|
.buttonDiv{
|
|
float: left;
|
|
}
|
|
|
|
</style>
|
|
|
|
<script type="text/javascript">
|
|
var unitId="";
|
|
|
|
var addFun = function() {
|
|
var node=$('#tree').treeview('getSelected');
|
|
var pid="";
|
|
if(node!=null && node.length>0){
|
|
pid=node[0].id;
|
|
}
|
|
$.post(ext.contextPath + '/equipment/equipmentClass/add.do', {pid:pid} , function(data) {
|
|
$("#lubricationTable").html(data);
|
|
});
|
|
};
|
|
|
|
var editFun = function(id, pid,type) {
|
|
$.post(ext.contextPath + '/maintenance/libraryMaintenanceCommon/showList.do', {classId: id,type: type} , function(data) {
|
|
$("#lubricationTable").html(data);
|
|
});
|
|
};
|
|
|
|
var initTreeView = function() {
|
|
$.post(ext.contextPath + '/equipment/equipmentClass/getTree4EquipmentCard.do', {unitId:unitId} , function(data) {
|
|
var treeData = data.result;
|
|
$('#tree').treeview({data: treeData,levels: 3});
|
|
$('#tree').on('nodeSelected', function(event, treeData) {
|
|
editFun(treeData.id, treeData.pid, treeData.type);
|
|
//level为树形层级 1为设备大类 2为设备小类 3为部位
|
|
// if(treeData.type == 3){
|
|
// $("#addDiv").css("display","block");//显示div
|
|
// }else{
|
|
// $("#addDiv").css("display","none");//隐藏div
|
|
// }
|
|
|
|
});
|
|
},'json');
|
|
$("#lubricationTable").html("");
|
|
};
|
|
|
|
|
|
//导入
|
|
function doImport(){
|
|
$.post(ext.contextPath + '/maintenance/libraryMaintenanceCommon/doImport.do', {unitId:unitId} , function(data) {
|
|
$("#subDiv").html(data);
|
|
openModal('subModal');
|
|
});
|
|
}
|
|
|
|
//导出
|
|
function doExportTy(){
|
|
window.open(ext.contextPath + "/maintenance/libraryMaintenanceCommon/doExport.do?unitId="+unitId+'&type=${type_Common}');
|
|
}
|
|
|
|
//导出
|
|
function doExportYb(){
|
|
window.open(ext.contextPath + "/maintenance/libraryMaintenanceCommon/doExport.do?unitId="+unitId+'&type=${type_Meter}');
|
|
}
|
|
|
|
function choiceType(type,name){
|
|
$('#type').val(type);//给型号id赋值
|
|
$('#headId1').html('('+name+')');
|
|
$('#headId2').html('(所有)');
|
|
$('#projectId').val('');
|
|
projectFun();
|
|
contentFun();
|
|
}
|
|
|
|
$(function() {
|
|
unitId=unitId;
|
|
initTreeView();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
|
<!-- 搜索状态 0为隐藏 1为显示 -->
|
|
<input type="hidden" id="searchStatus" name="searchStatus" value="0">
|
|
|
|
<div class="wrapper">
|
|
<div class="content-wrapper">
|
|
<section class="content-header">
|
|
<h1 id ="head_title"> </h1>
|
|
<ol class="breadcrumb">
|
|
<li><a id ='head_firstlevel' href="#"><i class="fa fa-dashboard"></i> </a></li>
|
|
</ol>
|
|
</section>
|
|
<section class="content container-fluid">
|
|
<div id="mainAlertdiv"></div>
|
|
<div id="subDiv"></div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-3">
|
|
<div class="box box-solid">
|
|
<div class="box-header with-border">
|
|
<h3 class="box-title">设备分类</h3>
|
|
<%--<div class="box-tools" id="addDiv" style="display:none">
|
|
</div>--%>
|
|
|
|
<div class="box-tools" id="addDiv">
|
|
<button type="button" class="btn btn-box-tool" onclick="doImport();"><i class="fa fa-cloud-upload"></i>
|
|
导入
|
|
</button>
|
|
<button type="button" class="btn btn-box-tool" onclick="doExportTy();"><i class="fa fa-cloud-download"></i>
|
|
导出通用
|
|
</button>
|
|
<button type="button" class="btn btn-box-tool" onclick="doExportYb();"><i class="fa fa-cloud-download"></i>
|
|
导出仪表
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box-body no-padding">
|
|
<div id="tree" style="height:700px;overflow:auto; "></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-9" id="modelButton" >
|
|
<button type="button" class="btn btn-default" onclick="choiceType('${type_Common}','通用');">通用</button>
|
|
<button type="button" class="btn btn-default" onclick="choiceType('${type_Meter}','仪表');">仪表</button>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<div class="col-md-9" id="lubricationTable" ></div>
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |