first commit
This commit is contained in:
164
WebRoot/jsp/maintenance/libraryAddResetProjectBiz4Tree.jsp
Normal file
164
WebRoot/jsp/maintenance/libraryAddResetProjectBiz4Tree.jsp
Normal file
@ -0,0 +1,164 @@
|
||||
<%@ 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>
|
||||
<script type="text/javascript">
|
||||
//var unitId="";
|
||||
|
||||
var updateFun = function () {
|
||||
$.post(ext.contextPath + '/maintenance/libraryOverhaulProjectBiz/update4UintId.do', {unitId: unitId}, function (data) {
|
||||
if (data.code == 1) {
|
||||
alert('同步成功');
|
||||
$("#faultTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
alert('同步失败');
|
||||
}
|
||||
}, 'json');
|
||||
};
|
||||
|
||||
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 + '\');">' + data[i].text + '</button>';
|
||||
}
|
||||
$('#modelButton').html(html);
|
||||
}
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/maintenance/libraryAddResetProject/showListBiz.do', {
|
||||
classId: id,
|
||||
type: type,
|
||||
modelId: modelId,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#overhaulTable").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
function choiceModel(id) {
|
||||
$('#modelId').val(id);//给型号id赋值
|
||||
$('#projectId').val('');//清除用于大修内容的id
|
||||
|
||||
projectFun();
|
||||
}
|
||||
|
||||
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: 2});
|
||||
$('#tree').on('nodeSelected', function (event, treeData) {
|
||||
editFun(treeData.id, treeData.pid, treeData.type);
|
||||
});
|
||||
}, 'json');
|
||||
$("#overhaulTable").html("");
|
||||
};
|
||||
|
||||
//导入
|
||||
function doImport() {
|
||||
$.post(ext.contextPath + '/maintenance/libraryAddResetProject/doImport4Biz.do', {unitId: unitId}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
//导出
|
||||
function doExport() {
|
||||
window.open(ext.contextPath + "/maintenance/libraryAddResetProject/doExport4Biz.do?unitId=" + unitId);
|
||||
}
|
||||
|
||||
$(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">
|
||||
<div class="box-tools">
|
||||
<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>
|
||||
|
||||
<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>
|
||||
Reference in New Issue
Block a user