128 lines
5.3 KiB
Plaintext
128 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" %>
|
|
<!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 = "";
|
|
|
|
//type 1 为类别 2 为设备 3为部位
|
|
var addFun = function (type) {
|
|
var node = $('#tree').treeview('getSelected');
|
|
var pid = "";
|
|
if (node != null && node.length > 0) {
|
|
pid = node[0].id;
|
|
}
|
|
$.post(ext.contextPath + '/achievement/modelLibrary/add.do', {pid: pid, type: type}, function (data) {
|
|
console.log(data);
|
|
$("#menuBox").html(data);
|
|
});
|
|
};
|
|
|
|
var editFun = function (id, type) {
|
|
$.post(ext.contextPath + '/achievement/modelLibrary/edit.do', {id: id, type: type}, function (data) {
|
|
$("#menuBox").html(data);
|
|
});
|
|
};
|
|
|
|
var initTreeView = function () {
|
|
$.post(ext.contextPath + '/achievement/modelLibrary/getTree.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');
|
|
$("#menuBox").html("");
|
|
};
|
|
|
|
//导入
|
|
/*function doImport(){
|
|
$.post(ext.contextPath + '/achievement/modelLibrary/importEquipmentClass.do', {unitId:unitId} , function(data) {
|
|
$("#subDiv").html(data);
|
|
openModal('subModal');
|
|
});
|
|
}*/
|
|
|
|
//导出
|
|
/*function doExport(){
|
|
window.open(ext.contextPath + "/achievement/modelLibrary/doExport.do?unitId="+unitId);
|
|
}*/
|
|
|
|
$(function () {
|
|
unitId = unitId;
|
|
initTreeView();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
|
<div class="wrapper">
|
|
<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>
|
|
</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">
|
|
<%--<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>--%>
|
|
<button type="button" class="btn btn-box-tool" onclick="addFun('1');"><i
|
|
class="fa fa-plus"></i>
|
|
数据模型
|
|
</button>
|
|
<button type="button" class="btn btn-box-tool" onclick="addFun('2');"><i
|
|
class="fa fa-plus"></i>
|
|
工艺单元
|
|
</button>
|
|
<button type="button" class="btn btn-box-tool" onclick="addFun('3');"><i
|
|
class="fa fa-plus"></i>
|
|
指标名称
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box-body no-padding">
|
|
<div id="tree" style="height:750px;overflow:auto; "></div>
|
|
</div>
|
|
<!-- /.box-body -->
|
|
</div>
|
|
</div>
|
|
<div class="col-md-9" id="menuBox">
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |