205 lines
6.9 KiB
Plaintext
205 lines
6.9 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"%>
|
|
<!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 editFun = function (id) {
|
|
$.post(ext.contextPath + '/timeEfficiency/patrolContentsStandard/showList.do', { classId: id }, function (data) {
|
|
$("#contentListTable").html(data);
|
|
});
|
|
};
|
|
|
|
var initTreeView = function () {
|
|
//$.post(ext.contextPath + '/equipment/equipmentClass/getTree4EquipmentCardWithoutParts.do', {unitId:unitId} , function(data) {
|
|
$.post(ext.contextPath + '/equipment/equipmentClass/getTreeJson4Equ.do', { unitId: unitId }, function (data) {
|
|
var treeData = data.result;
|
|
$('#tree').treeview({ data: treeData, levels: 2 });
|
|
$('#tree').on('nodeSelected', function (event, treeData) {
|
|
editFun(treeData.id, treeData.type);
|
|
});
|
|
}, 'json');
|
|
$("#contentListTable").html("");
|
|
};
|
|
|
|
//高级搜索
|
|
function searchDivFun() {
|
|
var searchStatus = $('#searchStatus').val();
|
|
if (searchStatus == '0') {
|
|
$('#searchDiv').css('display', 'block');//显示div
|
|
$('#searchStatus').val('1');
|
|
|
|
$('#searchButton2').css('display', 'block');
|
|
$("#searchButton1").css("display", "none");
|
|
}
|
|
if (searchStatus == '1') {
|
|
$('#searchDiv').css('display', 'none');//隐藏div
|
|
$('#searchStatus').val('0');
|
|
|
|
$('#searchButton1').css('display', 'block');
|
|
$("#searchButton2").css("display", "none");
|
|
}
|
|
}
|
|
|
|
//执行搜索
|
|
function searchFun() {
|
|
var quotaTypes = document.getElementsByName("quotaType");//定额类型 低中高
|
|
var repairPartyTypes = document.getElementsByName("repairPartyType");//维修方式 自修或委外
|
|
var repairTypes = document.getElementsByName("repairType");//维修类型 小修、中修等
|
|
var search_name = $('#search_name').val();//搜索内容
|
|
|
|
//定额类型
|
|
var check_val = [];
|
|
for (k in quotaTypes) {
|
|
if (quotaTypes[k].checked) {
|
|
check_val.push(quotaTypes[k].value);
|
|
}
|
|
}
|
|
//维修方式
|
|
var check_val2 = [];
|
|
for (k in repairPartyTypes) {
|
|
if (repairPartyTypes[k].checked) {
|
|
check_val2.push(repairPartyTypes[k].value);
|
|
}
|
|
}
|
|
//维修类型
|
|
var check_val3 = [];
|
|
for (k in repairTypes) {
|
|
if (repairTypes[k].checked) {
|
|
check_val3.push(repairTypes[k].value);
|
|
}
|
|
}
|
|
|
|
/*$.ajax({
|
|
type: "post",
|
|
url: ext.contextPath + '/maintenance/patrolContentsStandard/getClassIds4Search.do',
|
|
data: {quotaTypes:check_val,repairPartyTypes:check_val2,repairTypes:check_val3,search_name:search_name},
|
|
dataType: "json",
|
|
success: function(data){
|
|
var id = data.result;
|
|
var ids = '';
|
|
for (var i = 0; i < id.length; i++) {
|
|
ids += id[i]+',';
|
|
}
|
|
//alert(ids);
|
|
|
|
$.post(ext.contextPath + '/equipment/equipmentClass/getTreeJson4Where.do', {unitId:unitId,ids:ids} , function(data) {
|
|
var treeData = data.result;
|
|
$('#tree').treeview({data: treeData,levels: 3});
|
|
$('#tree').on('nodeSelected', function(event, treeData) {
|
|
editFun(treeData.id, treeData.type);
|
|
//level为树形层级 1为设备大类 2为设备小类 3为部位
|
|
if(treeData.type == 3){
|
|
$("#addDiv").css("display","block");//显示div
|
|
}else{
|
|
$("#addDiv").css("display","none");//隐藏div
|
|
}
|
|
});
|
|
},'json');
|
|
}
|
|
});*/
|
|
|
|
}
|
|
|
|
//导入
|
|
function doImport() {
|
|
$.post(ext.contextPath + '/timeEfficiency/patrolContentsStandard/doImport.do', { unitId: unitId }, function (data) {
|
|
$("#subDiv").html(data);
|
|
openModal('subModal');
|
|
});
|
|
}
|
|
|
|
//导出
|
|
function doExport() {
|
|
window.open(ext.contextPath + "/timeEfficiency/patrolContentsStandard/doExport.do?unitId=" + unitId);
|
|
}
|
|
|
|
$(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 style="width:100%;height:10px;background-color:#ECF0F5;">
|
|
|
|
</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="doExport();"><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="contentListTable"></div>
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |