first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

426
WebRoot/jsp/bot/botEdit.jsp Normal file
View File

@ -0,0 +1,426 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<script type="text/javascript">
/*** 上半部分 */
var showCompany4SelectFun = function () {
$.post(ext.contextPath + '/user/showCompany4Select.do', { formId: "botForm", hiddenId: "pid", textId: "_pname" }, function (data) {
$("#company4SelectDiv").html(data);
openModal("company4SelectModal");
});
};
function doSaveBot() {
$.post(ext.contextPath + "/bot/bot/updateBot.do", $("#botForm").serialize(), function (data) {
if (data.res == "1") {
initTreeView();
} else {
showAlert('d', '保存失败');
}
}, 'json');
}
function delCompany() {
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
classname: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
classname: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(willDelete => {
if (willDelete) {
$.post(ext.contextPath + '/user/deleteCompany.do', $("#botForm").serialize(), function (data) {
if (data > 0) {
initTreeView();
} else {
showAlert('d', '删除失败');
}
}, 'json');
s
}
});
}
//文件上传
var fileinput = function() {
//var url='/maintenance/updateProblemFile.do';//保存数据表方法
$.post(ext.contextPath + '/base/fileinput.do', {masterId:masterId,tbName:tbName,nameSpace:nameSpace} , function(data) {
$("#fileInputDiv").html(data);
openModal('fileInputModal');
});
};
var masterId=$('#id').val();
var tbName='tb_bot_file'; //数据表
var nameSpace='botFile';//保存文件夹
var previews = new Array();
var previewConfigs = new Array();
/* var student = {
"caption":"lilei",
}
previewConfigs[0]=student; */
//初始化fileinput控件第一次初始化
function showFileInput(ctrlName) {
var control = $('#' + ctrlName);
control.fileinput('destroy');
control.fileinput({
language: 'zh', //设置语言
showUpload: false, //是否显示上传按钮
showDownload:true,
showRemove:false,
showCaption: true,//是否显示标题
showBrowse:false,//选择按钮
showClose:false,//右上角关闭按钮
dropZoneEnabled: false,//是否显示拖拽区域
allowedFileExtensions : ['*'],//接收的文件后缀
previewFileType:['image'],
fileActionSettings:{
showDrag:false
},
otherActionButtons:'<a type="button" onclick="downloadfile(this)" class="kv-file-down btn btn-sm btn-default" {dataKey} title="下载图片"><i class="fa fa-cloud-download"></i></a>',
browseClass: "btn btn-primary", //按钮样式
maxFileCount: 1, //表示允许同时上传的最大文件个数
enctype: 'multipart/form-data',
validateInitialCount:true,
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
initialPreviewAsData: true,
initialPreview: previews,
initialPreviewConfig:previewConfigs,
layoutTemplates:{
actionUpload:'',
actionDownload:''
},
preferIconicPreview: true,//是否强制相关文件展示icon
previewFileIconSettings: {
'doc': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
'docx': '<i class="fa fa-file-word-o" style="color:#3c8dbc"></i>',
'xls': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
'xlsx': '<i class="fa fa-file-excel-o" style="color:#00a65a "></i>',
'pptx': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
'ppt': '<i class="fa fa-file-powerpoint-o" style="color:#f39c12 "></i>',
//'jpg': '<i class="fa fa-file-image-o" style="color:#00a65a "></i>',
'pdf': '<i class="fa fa-file-pdf-o" style="color:#dd4b39 "></i>',
'zip': '<i class="fa fa-file-zip-o" ></i>',
},
deleteUrl:ext.contextPath+"/base/deleteInputFile.do",
deleteExtraData:function () { //传参
var data = {
"tbName": tbName
};
return data;
}
});
//异步上传返回结果处理
control.on('fileerror', function(event, data, msg) {
console.log(data.id);
console.log(data.index);
console.log(data.file);
console.log(data.reader);
console.log(data.files);
// get message
alert(msg);
});
//异步上传返回结果处理
control.on("fileuploaded", function (event, data, previewId, index) {
console.log(data.id);
console.log(data.index);
console.log(data.file);
console.log(data.reader);
console.log(data.files);
var obj = data.response;
alert(JSON.stringify(data.success));
});
//同步上传错误处理
control.on('filebatchuploaderror', function(event, data, msg) {
console.log(data.id);
console.log(data.index);
console.log(data.file);
console.log(data.reader);
console.log(data.files);
// get message
alert(msg);
});
//同步上传返回结果处理
control.on("filebatchuploadsuccess", function (event, data, previewId, index) {
console.log(data.id);
console.log(data.index);
console.log(data.file);
console.log(data.reader);
console.log(data.files);
var obj = data.response;
alert(JSON.stringify(data.success));
});
$('#kvFileinputModal').on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
//modal重复打开会导致前面的滚动条失去作用
$('.modal').css("overflow","auto");
});
}
function downloadfile(obj){
var key = $(obj).data('key');
window.open(ext.contextPath + '/base/downloadFile.do?key='+key+'&tbName='+tbName);
}
//名称定义不可修改
var getFileList = function() {
$.post(ext.contextPath + '/base/getInputFileList.do', {masterId:masterId,tbName:tbName} , function(data) {
//console.info(data)
if(data.length>0){
previews=new Array();
$('#typefile').show();
for(var i=0;i<data.length;i++){
var previewConfig = new Object();
var path = data[i].abspath;
path=path.substring(path.indexOf('webapps')+7,path.length);
path =ext.basePath.replace(ext.contextPath,'')+ path.replace(/\\/g,"\/");;
previews.push(path);
previewConfig['width']= '50px';
previewConfig['caption']= data[i].filename;
previewConfig['key']= data[i].id;
previewConfigs.push(previewConfig);
}
showFileInput("typefile");
}else{
$('#typefile').hide();
}
},'json');
};
getFileList();
/*** 下半部分 */
var addUserFun = function () {
$.post(ext.contextPath + '/user/addUser.do', {}, function (data) {
$("#userDiv").html(data + "<div id='unit4SelectDiv'></div> ");
openModal('subModal');
});
};
var delUserFun = function () {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas = "";
$.each(checkedItems, function (index, item) {
datas += item.id + ",";
});
if (datas == "") {
showAlert('d', '请先选择记录', 'mainAlertdiv');
} else {
swal({
text: "您确定要禁用这些用户吗?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
classname: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
classname: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(willDelete => {
if (willDelete) {
$.post(ext.contextPath + '/user/deleteUsers.do', { ids: datas }, function (data) {
if (data > 0) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '禁用失败', 'mainAlertdiv');
}
});
}
});
}
};
var editUserFun = function (id) {
$.post(ext.contextPath + '/user/editUser.do', { id: id }, function (data) {
$("#userDiv").html(data);
openModal('subModal');
});
};
//重置密码
var pwdFun = function (id) {
swal({
text: "您确定要重置密码吗?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
classname: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
classname: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(willDelete => {
if (willDelete) {
$.post(ext.contextPath + '/user/resetPassword.do', { id: id }, function (data) {
if (data == 1) {
showAlert('s', '重置成功', 'mainAlertdiv');
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '重置失败', 'mainAlertdiv');
}
});
}
});
};
$(function () {
});
</script>
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">详情</h3>
<div class="box-tools pull-right">
<a onclick="doSaveBot()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
class="glyphicon glyphicon-floppy-disk"></i></a>
</div>
</div>
<!-- /.box-header -->
<div class="box-body ">
<form class="form-horizontal " id="botForm">
<input id="id" name="id" type="hidden" value="${bot.id}" />
<input id="bizid" name="bizid" type="hidden" value="${bot.bizid}" />
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<div id="company4SelectDiv"></div>
<div class="form-group">
<label class="col-sm-2 control-label">设计规模</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="designScale" name="designScale" placeholder="设计规模"
value="${bot.designScale }">
</div>
<label class="col-sm-2 control-label">排放标准</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="emission" name="emission" placeholder="排放标准"
value="${bot.emission }">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">进水指标</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="influentIndex" name="influentIndex" placeholder="进水指标"
value="${bot.influentIndex}">
</div>
<!-- <div id="biz_id" style="display:none;">
<label class="col-sm-2 control-label">水厂编号</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="id" name ="id" placeholder="编号" value="" />
</div>
</div> -->
</div>
<div class="form-group">
<label class="col-sm-2 control-label">出水指标</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="effluentIndex" name="effluentIndex" placeholder="出水指标"
value="${bot.effluentIndex}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">处理工艺</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="process" name="process" placeholder="处理工艺"
value="${bot.process}">
</div>
<label class="col-sm-2 control-label">初始污水处理费</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="price" name="price" placeholder="初始污水处理服务费单价"
value="${bot.price}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">污水处理费核算方式</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="calculation" name ="calculation" placeholder="请输入" autocomplete="off" >${bot.calculation}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">协议签订日期</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="signdate" name="signdate" placeholder="协议签订日期"
value="${bot.signdate}">
</div>
<label class="col-sm-2 control-label">特许经营期</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="franchisePeriod" name="franchisePeriod" placeholder="特许经营期"
value="${bot.franchisePeriod}">
</div>
</div>
<div class="form-group">
<div class="col-sm-2 col-md-2"></div>
<div class="col-sm-4 col-md-4">
<!-- <input id="f_upload" type="file" class="file" /> -->
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i class="fa fa-paperclip"></i>文件上传</button>
</div>
</div>
<div class="form-group" style="margin:8px;">
<div class="col-sm-2 col-md-2"></div>
<div class="col-sm-10 col-md-10">
<input type="file" name="typefile" id="typefile" multiple class="file-loading" />
</div>
</div>
</div>
</form>
</div>
</div>

View File

@ -0,0 +1,233 @@
<%@ 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 nodeid = "-1";//树指针的全局变量
var addCompanyFun = function (type) {
/*var node=$('#companytree').treeview('getSelected');
var pid="";
if(node!=null && node.length>0){
pid=node[0].id;
}*/
$.post(ext.contextPath + '/user/showCompanyAdd.do', { pid: nodeid, type: type }, function (data) {
$("#companyBox").html(data);
});
};
var addDeptFun = function (type) {
/*var node=$('#companytree').treeview('getSelected');
var pid="";
if(node!=null && node.length>0){
pid=node[0].id;
}*/
$.post(ext.contextPath + '/user/showDeptAdd.do', { pid: nodeid }, function (data) {
$("#companyBox").html(data);
});
};
var editFun = function (id) {
//console.log("id",id);
};
var deleteFun = function (id) {
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
className: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
className: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(willDelete => {
if (willDelete) {
$.post(ext.contextPath + '/work/group/delete.do', { id: id }, function (data) {
if (data == 1) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
});
}
});
};
var deletesFun = function () {
var checkedItems = $("#table").bootstrapTable('getSelections');
var datas = "";
$.each(checkedItems, function (index, item) {
datas += item.id + ",";
});
if (datas == "") {
showAlert('d', '请先选择记录', 'mainAlertdiv');
} else {
swal({
text: "您确定要删除此记录?",
dangerMode: true,
buttons: {
cancel: {
text: "取消",
value: null,
visible: true,
className: "btn btn-default btn-sm",
closeModal: true,
},
confirm: {
text: "确定",
value: true,
visible: true,
className: "btn btn-danger btn-sm",
closeModal: true
}
}
})
.then(willDelete => {
if (willDelete) {
$.post(ext.contextPath + '/work/group/deletes.do', { ids: datas }, function (data) {
if (data > 0) {
$("#table").bootstrapTable('refresh');
} else {
showAlert('d', '删除失败', 'mainAlertdiv');
}
});
}
});
}
};
function doshow(){
$.post(ext.contextPath + '/bot/bot/getbotList.do', {} , function(data) {
console.log(data);
var typejsonlist= JSON.parse(data);
var html = "";
html += '<div class="firstdiv" style="width: 100%;height:auto;">';
for(var i = 0;i<typejsonlist.length;i++){
var color = "#"+typejsonlist[i].color;
for(var j=0;j<typejsonlist[i].codes.length;j++){
html += '<div style="width: 120px;height: 120px;float:left;">';
html += '<div style="width:100%;height:100;">';
html += '<div style="width:100%;height:15%;background-color: '+color+'"></div>';
html += '</div>'
html += '</div>';
html += '<div style="width:10px;height:120px;background-color:rgba(0,0,0,1);float:left; "></div>';
}
}
html += '</div>';
$('#sublists').html(html);
});
}
var initTreeView = function () {
//console.log("0");
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
//console.info("yes");
$('#companytree').treeview({
data: data,
showBorder: true,
levels: 1,
});
$('#companytree').on('nodeSelected', function (event, data) {
nodeid = data.id;
var nodesnum=0;
if(data.nodes!=null){
nodesnum=data.nodes.length;
}else{
nodesnum=nodesnum;
}
if(nodesnum==0){
$.post(ext.contextPath + '/bot/bot/showBotEdit.do', { bizid: data.id }, function (data1) {
$("#companyBox").html(data1);
});
}
});
}, 'json');
$("#companyBox").html("");
};
$(function () {
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 id="fileInputDiv"></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>
<div class="box-body no-padding">
<div id="companytree" style="height:550px;overflow:auto; "></div>
</div>
<!-- /.box-body -->
</div>
</div>
<div class="col-md-9" id="companyBox">
</div>
</div>
</section>
<!-- /.content -->
</div>
<%--<jsp:include page="/jsp/bottom.jsp"></jsp:include>--%>
<%--<jsp:include page="/jsp/side.jsp"></jsp:include>--%>
</div>
</body>
</html>

View File

@ -0,0 +1,142 @@
<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
/* table[ip] tr th,table[ip] tr td{
border: 1px solid grey;
text-align: center;
height: 30px;
width:25%;
} */
</style>
<script type="text/javascript">
function dosave() {
// if($('#name').val()==null||$('#name').val()==''){
// showAlert('d','请输入工艺类型名称','alertDiv');
// return;
// }
$.post(ext.contextPath + "/bot/bot/doBotUpdate.do", $("#subForm").serialize(), function(data) {
if (data == 1) {
closeModal('subModal')
location.reload();
}else if(data == 0){
showAlert('d','保存失败');
}else{
showAlert('d',data.res);
}
},'json');
}
$(function(){
})
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content" style="width: 750px;">
<div class="modal-header" style="background-color: #DCE0E9;">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">${bizname}</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<form class="form-horizontal" id="subForm" enctype="multipart/form-data" >
<!-- 界面提醒div强制id为alertDiv -->
<div id="alertDiv"></div>
<input type="hidden" name="id" id="id" value="${bot.id}">
<div class="form-group">
<label class="col-sm-2 control-label">设计规模</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="designScale" name="designScale" placeholder="设计规模"
value="${bot.designScale }">
</div>
<label class="col-sm-2 control-label">排放标准</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="emission" name="emission" placeholder="排放标准"
value="${bot.emission }">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">进水指标</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="influentIndex" name="influentIndex" placeholder="进水指标"
value="${bot.influentIndex}">
</div>
<!-- <div id="biz_id" style="display:none;">
<label class="col-sm-2 control-label">水厂编号</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="id" name ="id" placeholder="编号" value="" />
</div>
</div> -->
</div>
<div class="form-group">
<label class="col-sm-2 control-label">出水指标</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="effluentIndex" name="effluentIndex" placeholder="出水指标"
value="${bot.effluentIndex}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">处理工艺</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="process" name="process" placeholder="处理工艺"
value="${bot.process}">
</div>
<label class="col-sm-2 control-label">初始污水处理费</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="price" name="price" placeholder="初始污水处理服务费单价"
value="${bot.price}">
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">污水处理费核算方式</label>
<div class="col-sm-10">
<textarea class="form-control" rows="2" id ="calculation" name ="calculation" placeholder="请输入" autocomplete="off" >${bot.calculation}</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">协议签订日期</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="signdate" name="signdate" placeholder="协议签订日期"
value="${bot.signdate}">
</div>
<label class="col-sm-2 control-label">特许经营期</label>
<div class="col-sm-4">
<input type="text" class="form-control" id="franchisePeriod" name="franchisePeriod" placeholder="特许经营期"
value="${bot.franchisePeriod}">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" onclick="dosave()" >保存</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>

View File

@ -0,0 +1,295 @@
<%@ 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">
function doshow(bizid){
console.log(bizid);
if(bizid=='' || bizid == undefined){
bizid = '9b162f0489e749ccafa86661ebcb6331';
}
$.post(ext.contextPath + '/bot/bot/getbotList.do', {bizid:bizid} , function(data) {
// console.log(data);
var typejsonlist= JSON.parse(data);
var html = "";
html += '<div class="firstdiv" style="width: 100%;height:auto;">';
for(var i = 0;i<typejsonlist.length;i++){
var color = "#"+typejsonlist[i].color;
for(var j=0;j<typejsonlist[i].codes.length;j++){
html += '<div style="width: 260px;height: 260px;float:left;">';
html += '<div style="width:100%;height:90%;background-color:white;border-radius:10px;">';
//第一层15%
html += '<div style="width:100%;height:15%;background-color: '+color+';cursor: pointer;border-top-left-radius:10px;border-top-right-radius:10px;" onclick="dobotedit(\''+typejsonlist[i].codes[j].id+'\');">';
html += '<div style="width:100%;height:100%">';
html += '<div style="width:100%;height:25%"></div>';
html += '<div style="width:100%;height:50%;color:white;text-align:center;">'+typejsonlist[i].codes[j].bizname+'</div>';
html += '<div style="width:100%;height:25%"></div>';
html += '</div>';
html += '</div>';
//第二层85%
html += '<div style="width:100;height:85%">';
//左
html += '<div style="width:5%;height:100%;float:left;"></div>';
//中
html += '<div style="width:90%;height:100%;float:left;">';
//中间第一层45%
html +='<div style="width:100%;height:45%;">';
//上
html += '<div style="width:100%;height:10%"></div>';
//下
html += '<div style="width:100%;height:90%">';
//下左width60%
html += '<div style="width:65%;height:100%;float:left">';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:8px;">设计规模:</div>';
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].designScale+'</div>';
html += '</div>';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:8px;">排放标准:</div>';
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].emission+'</div>';
html += '</div>';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:8px;">处理工艺:</div>';
if (typejsonlist[i].codes[j].process.byteLength()>12){
html += '<div style="width:60%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].process+'">'+typejsonlist[i].codes[j].process.substr(0,6)+'...'+'</div>';
}else{
html += '<div style="width:60%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].process+'">'+typejsonlist[i].codes[j].process+'</div>';
}
html += '</div>';
html += '</div>';
//下中width10%
html += '<div style="width:5%;height:100%;float:left">';
html += '</div>';
//下右width30% 里边是厂图片
html += '<div style="width:30%;height:100%;float:left">';
html += '<div style="width:65px;height:65px;">';
html += '<img src="<%=request.getContextPath()%>/IMG/bot/biz.png" style="width: 100%;height: 100%;">';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>';
//中间第二层35%
html += '<div style="width:100%;height:35%;border-bottom: 1px solid #EBEBEB;border-top: 1px solid #EBEBEB;">';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:40%">';
html += '<div style="width:59%;float:left;color:#8F9297;font-size:8px;">初始污水处理服务费单价:</div>';
html += '<div style="width:40%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].price+'">'+typejsonlist[i].codes[j].price+'</div>';
html += '</div>';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:40%">';
html += '<div style="width:35%;float:left;color:#8F9297;font-size:8px;">协议签订日期:</div>';
html += '<div style="width:65%;float:left;font-weight: 600;text-overflow: ellipsis;white-space: nowrap;overflow: hidden;" title="'+typejsonlist[i].codes[j].signdate+'">'+typejsonlist[i].codes[j].signdate+'</div>';
html += '</div>';
html += '</div>'
//中间第三层20%
html += '<div style="width:100%;height:20%;">';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:80%">';
html += '<div style="width:85%;height:100%;float:left;color:#8F9297;">';
html += '<div style="width:auto;float:left;color:#8F9297">特许经营期:</div>';
html += '<div style="width:auto;float:left;font-weight: 600;color:#333">'+typejsonlist[i].codes[j].franchisePeriod+'</div>';
html += '</div>';
//放下载文件的图片
html += '<div style="width:15%;height:100%;float:left;">';
html += '<div style="width:22px;height:19px;">';
html += '<img src="<%=request.getContextPath()%>/IMG/bot/downfile.png" style="width: 100%;height: 100%;cursor: pointer;" onclick="fileDownload(\''+typejsonlist[i].codes[j].fileid+'\',\''+typejsonlist[i].codes[j].filetype+'\');">';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>'
html += '</div>';
//右
html += '<div style="width:5%;height:100%;float:left;"></div>';
html += '</div>';
html += '</div>';
html += '</div>';
html += '<div style="width:10px;height:120px;background-color:rgba(0,0,0,0);float:left; "></div>';
}
}
html += '</div>';
$('#sublists').html(html);
});
}
var tbName ='tb_bot_file'; //数据表
String.prototype.byteLength = function() { //获取字符串的字节数扩展string类型方法
var b = 0;
if(this.length>0) { //如果存在字符串,则执行计划
for(var i = 0; i < 1; i ++) { //遍历字符串,枚举每个字符
if(this.charCodeAt(i) > 255) { //字符编码大于255说明是双字节字符
b += 2; //则累加2个
}else {
b ++; //否则递加一次
}
}
return b; //返回字节数
} else {
return 0; //如果参数为空则返回0个
}
}
//下载文件
var fileDownload = function(id,type) {
if(type == "no"){
swal('当前无文件下载!');
}else if(type=="yes"){
window.open(ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName,"_self");
}
// $.post(ext.contextPath + '/base/downloadFile.do', {key:id,tbName:tbName} , function(data) {
// });
};
var dobotedit = function(id) {
$.post(ext.contextPath + '/bot/bot/doBotEdit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
$(function () {
doshow(unitId);
//简易公司combotree
$.post(ext.contextPath + '/user/getUnitForTreeFromTop.do', { ng: '', unitId: unitId }, function (data) {
//console.log("data",data[0]);
/* if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
//当登陆者的pid以下没有子节点时显示单独一个span
$("#search_pid").val(data[0].id);
$("#companyselect").hide();
$("#companyName").text("公司:" + data[0].text);
showtable();
} else */if ((data.length == 1 && data.nodes != "") || data.length > 1) {
//第一次加载时赋值
$("#search_pid").val(data[0].id);
$("#cname_input").val(data[0].text);
// showtable();
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
$('#companytree').treeview({
data: data,
showBorder: false,
});
$('#companytree').on('nodeSelected', function (event, data) {
$("#search_pid").val(data.id);
$("#cname_input").val(data.text);
doshow(data.id);
//$("ul#companyselect").hide();
// $table.bootstrapTable('refresh');
});
} else {
//待完善
};
}, 'json');
});
</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 id="fileInputDiv"></div>
<!--搜索栏-->
<div style="width: 100%;height: 60px;">
<div class="form-group " style="margin-bottom:10px;">
<!-- -->
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
</div>
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
<li class="dropdown messages-menu" style="width:300px;">
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
<div class="input-group">
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
readonly />
</div><!-- /input-group -->
</a>
<ul class="dropdown-menu">
<li class="header" id="li_unread">
<div id="companytree" style="width: 275px;overflow:auto;"></div>
</li>
</ul>
</li>
</ul>
<div class="form-group pull-right form-inline " style="margin-top: -40px;">
<!-- <div class="form-group has-feedback ">
<input type="text" class="form-control " id="search_group" name ="search_group" placeholder="小组" onclick="showUnit4SelectFun();" style="width: 250px;height:30px">
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
</input>
</div>
<input id="search_pid" class="form-control" name="search_pid" type="hidden" /> -->
<div class="input-group input-group-sm" style="width: 250px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
placeholder="处理工艺">
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
</input>
<div class="input-group-btn">
<button type="button" class="btn btn-default" onclick="doshow();"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<!-- <div style="width: 100%;height: 15px;">
</div> -->
<div id="sublists">
</div>
</section>
<!-- /.content -->
</div>
<%--<jsp:include page="/jsp/bottom.jsp"></jsp:include>--%>
<%--<jsp:include page="/jsp/side.jsp"></jsp:include>--%>
</div>
</body>
</html>

View File

@ -0,0 +1,288 @@
<%@ 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">
function doshow(bizid){
var search_name = $("#search_name").val();
console.log(bizid);
if(bizid=='' || bizid == undefined){
bizid = '9b162f0489e749ccafa86661ebcb6331';
}
$.post(ext.contextPath + '/bot/bot/getbotList.do', {bizid:bizid,search_name} , function(data) {
// console.log(data);
var typejsonlist= JSON.parse(data);
var html = "";
html += '<div class="firstdiv" style="width: 100%;height:auto;">';
for(var i = 0;i<typejsonlist.length;i++){
var color = "#"+typejsonlist[i].color;
for(var j=0;j<typejsonlist[i].codes.length;j++){
html += '<div style="width: 100%;height: 360px;float:left;">';
html += '<div style="width:100%;height:90%;background-color:white;border-radius:10px;">';
//第一层15%
html += '<div style="width:100%;height:15%;background-color: '+color+';cursor: pointer;border-top-left-radius:10px;border-top-right-radius:10px;" onclick="dobotedit(\''+typejsonlist[i].codes[j].id+'\');">';
html += '<div style="width:100%;height:100%">';
html += '<div style="width:100%;height:25%"></div>';
html += '<div style="width:100%;height:50%;color:white;text-align:center;">'+typejsonlist[i].codes[j].bizname+'</div>';
html += '<div style="width:100%;height:25%"></div>';
html += '</div>';
html += '</div>';
//第二层85%
html += '<div style="width:100;height:85%">';
//左
html += '<div style="width:5%;height:100%;float:left;"></div>';
//中
html += '<div style="width:90%;height:100%;float:left;">';
//中间第一层45%
html +='<div style="width:100%;height:45%;">';
//上
html += '<div style="width:100%;height:10%"></div>';
//下
html += '<div style="width:100%;height:90%">';
//下左width60%
html += '<div style="width:65%;height:100%;float:left">';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:4vw;">设计规模:</div>';
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].designScale+'</div>';
html += '</div>';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:4vw;">排放标准:</div>';
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].emission+'</div>';
html += '</div>';
html += '<div style="width:100%;height:33%">';
html += '<div style="width:40%;float:left;color:#8F9297;font-size:4vw;">处理工艺:</div>';
if (typejsonlist[i].codes[j].process.byteLength()>12){
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].process.substr(0,6)+'...'+'</div>';
}else{
html += '<div style="width:60%;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].process+'</div>';
}
html += '</div>';
html += '</div>';
//下中width10%
html += '<div style="width:5%;height:100%;float:left">';
html += '</div>';
//下右width30% 里边是厂图片
html += '<div style="width:30%;height:100%;float:left">';
html += '<div style="width:65px;height:65px;">';
html += '<img src="<%=request.getContextPath()%>/IMG/bot/biz.png" style="width: 150%;height: 150%;">';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>';
//中间第二层35%
html += '<div style="width:100%;height:35%;border-bottom: 1px solid #EBEBEB;border-top: 1px solid #EBEBEB;">';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:40%">';
html += '<div style="width:auto;float:left;color:#8F9297;font-size:4vw;">初始污水处理服务费单价:</div>';
html += '<div style="width:auto;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].price+'</div>';
html += '</div>';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:100%;height:40%">';
html += '<div style="width:auto;float:left;color:#8F9297;font-size:4vw;">协议签订日期:</div>';
html += '<div style="width:auto;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].signdate+'</div>';
html += '</div>';
html += '</div>'
//中间第三层20%
html += '<div style="width:100%;height:20%;">';
html += '<div style="width:100%;height:10%;"></div>';
html += '<div style="width:85%;height:80%;float:left">';
html += '<div style="width:auto;height:100%;float:left;color:#8F9297;font-size:4vw">特许经营期:</div>';
html += '<div style="width:auto;float:left;font-weight: 600;">'+typejsonlist[i].codes[j].franchisePeriod+'</div>';
html += '</div>';
//放下载文件的图片
html += '<div style="width:15%;height:100%;float:left;">';
html += '<div style="width:22px;height:19px;">';
html += '<img src="<%=request.getContextPath()%>/IMG/bot/downfile.png" style="width: 100%;height: 100%;cursor: pointer;" onclick="fileDownload(\''+typejsonlist[i].codes[j].fileid+'\',\''+typejsonlist[i].codes[j].filetype+'\');">';
html += '</div>';
html += '</div>';
html += '</div>';
html += '</div>'
html += '</div>';
//右
html += '<div style="width:5%;height:100%;float:left;"></div>';
html += '</div>';
html += '</div>';
html += '</div>';
html += '<div style="width:10px;height:0px;background-color:rgba(0,0,0,0);float:left; "></div>';
}
}
html += '</div>';
$('#sublists').html(html);
});
}
var tbName ='tb_bot_file'; //数据表
String.prototype.byteLength = function() { //获取字符串的字节数扩展string类型方法
var b = 0;
if(this.length>0) { //如果存在字符串,则执行计划
for(var i = 0; i < 1; i ++) { //遍历字符串,枚举每个字符
if(this.charCodeAt(i) > 255) { //字符编码大于255说明是双字节字符
b += 2; //则累加2个
}else {
b ++; //否则递加一次
}
}
return b; //返回字节数
} else {
return 0; //如果参数为空则返回0个
}
}
//下载文件
var fileDownload = function(id,type) {
if(type == "no"){
swal('当前无文件下载!');
}else if(type=="yes"){
window.open(ext.contextPath + "/base/downloadFile.do?key="+id+"&tbName="+tbName,"_self");
}
// $.post(ext.contextPath + '/base/downloadFile.do', {key:id,tbName:tbName} , function(data) {
// });
};
var dobotedit = function(id) {
$.post(ext.contextPath + '/bot/bot/doBotEdit.do', {id:id} , function(data) {
$("#subDiv").html(data);
openModal('subModal');
});
};
$(function () {
doshow(unitId);
//简易公司combotree
$.post(ext.contextPath + '/user/getUnitForTree.do', { ng: '' }, function (data) {
//console.log("data",data[0]);
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
//当登陆者的pid以下没有子节点时显示单独一个span
$("#search_pid").val(data[0].id);
$("#companyselect").hide();
$("#companyName").text("公司:" + data[0].text);
showtable();
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
//第一次加载时赋值
$("#search_pid").val(data[0].id);
$("#cname_input").val(data[0].text);
// showtable();
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
$('#companytree').treeview({
data: data,
showBorder: false,
});
$('#companytree').on('nodeSelected', function (event, data) {
$("#search_pid").val(data.id);
$("#cname_input").val(data.text);
doshow(data.id);
//$("ul#companyselect").hide();
// $table.bootstrapTable('refresh');
});
} else {
//待完善
};
}, 'json');
});
</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) -->
<!-- Main content -->
<section class="content container-fluid">
<div id="mainAlertdiv"></div>
<div id="subDiv"></div>
<div id="fileInputDiv"></div>
<!--搜索栏-->
<div style="width: 100%;height: 60px;">
<div class="form-group " style="margin-bottom:10px;">
<!-- -->
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
</div>
<ul id="companyselect" style="list-style-type:none;padding-left:0px;width:300px;">
<li class="dropdown messages-menu" style="width:300px;">
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:300px;">
<div class="input-group">
<span class="input-group-addon" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">公司:</span>
<input class="form-control " id="cname_input" name="cname_input" style="height:31px;width: 220px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;"
readonly />
</div><!-- /input-group -->
</a>
<ul class="dropdown-menu">
<li class="header" id="li_unread">
<div id="companytree" style="width: 275px;overflow:auto;"></div>
</li>
</ul>
</li>
</ul>
<div class="form-group pull-left form-inline " style="margin-top: 0px;">
<!-- <div class="form-group has-feedback ">
<input type="text" class="form-control " id="search_group" name ="search_group" placeholder="小组" onclick="showUnit4SelectFun();" style="width: 250px;height:30px">
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
</input>
</div>
<input id="search_pid" class="form-control" name="search_pid" type="hidden" /> -->
<div class="input-group input-group-sm" style="width: 279px;">
<input type="text" id="search_name" name="search_name" class="form-control pull-left"
placeholder="处理工艺">
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea" style="padding-top:6px;pointer-events: auto"></a>
</input>
<div class="input-group-btn">
<button type="button" class="btn btn-default" onclick="doshow();"><i
class="fa fa-search"></i></button>
</div>
</div>
</div>
</div>
<!-- <div style="width: 100%;height: 15px;">
</div> -->
<div id="sublists">
</div>
</section>
<!-- /.content -->
</div>
<%--<jsp:include page="/jsp/bottom.jsp"></jsp:include>--%>
<%--<jsp:include page="/jsp/side.jsp"></jsp:include>--%>
</div>
</body>
</html>