121 lines
4.2 KiB
Plaintext
121 lines
4.2 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>
|
|
<script type="text/javascript">
|
|
//var unitId="";
|
|
|
|
var editFun = function(id, pid,type) {
|
|
|
|
//获取对应的设备型号
|
|
$.ajax({
|
|
type: "GET",
|
|
url: ext.contextPath + '/equipment/getdata4Equ.do',
|
|
data: {id: id , pid: pid , type: type,unitId:unitId},
|
|
dataType: "json",
|
|
async:false,
|
|
success: function(data){
|
|
$('#modelButton').empty(); //清空resText里面的所有内容
|
|
var html = '';
|
|
// modelId = '-1';
|
|
// html += '<button type="button" class="btn btn-default" onclick="choiceModel(\''+-1+'\');">通用</button>';
|
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
if(i == 0){
|
|
modelId = data[i].id;
|
|
}
|
|
html += '<button type="button" class="btn btn-default" onclick="choiceModel(\''+data[i].id+'\',\''+id+'\');">'+data[i].text+'</button>';
|
|
}
|
|
$('#modelButton').html(html);
|
|
}
|
|
});
|
|
|
|
$.post(ext.contextPath + '/equipment/equipmentParamSet/showValueList.do', {classId: id,type: type} , function(data) {
|
|
$("#overhaulTable").html(data);
|
|
});
|
|
};
|
|
|
|
function choiceModel(id,classId){
|
|
$.post(ext.contextPath + '/equipment/equipmentParamSet/showValueList4Eq.do', {equipmentId: id,classId: classId} , function(data) {
|
|
$("#overhaulTable").html(data);
|
|
});
|
|
}
|
|
|
|
var initTreeView = function() {
|
|
$.post(ext.contextPath + '/equipment/equipmentClass/getTree4EquipmentCardWithoutParts.do', {unitId:unitId} , function(data) {
|
|
var treeData = data.result;
|
|
console.log(treeData);
|
|
$('#tree').treeview({data: treeData,levels: 3});
|
|
$('#tree').on('nodeSelected', function(event, treeData) {
|
|
editFun(treeData.id, treeData.pid, treeData.type);
|
|
});
|
|
},'json');
|
|
$("#overhaulTable").html("");
|
|
};
|
|
$(function() {
|
|
//alert(unitId);
|
|
initTreeView();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
|
<div class="wrapper">
|
|
<!-- 引用top -->
|
|
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
|
<!-- 菜单栏 -->
|
|
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<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>
|
|
<!-- <li class="active">Here</li> -->
|
|
</ol>
|
|
</section>
|
|
<!-- Main content -->
|
|
<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">
|
|
<!-- <button type="button" class="btn btn-box-tool" onclick="updateFun();"><i class="glyphicon glyphicon-refresh"></i>
|
|
同步
|
|
</button> -->
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box-body no-padding">
|
|
<div id="tree" style="height:700px;overflow:auto; "></div>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 设备型号按钮 -->
|
|
<div class="col-md-9" id="modelButton" ></div>
|
|
<!-- 大修项目及内容 -->
|
|
<div class="col-md-9" id="overhaulTable" ></div>
|
|
|
|
</div>
|
|
</section>
|
|
<!-- /.content -->
|
|
</div>
|
|
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
|
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
|
</div>
|
|
</body>
|
|
</html> |