Merge branch 'deng' into deng-release

# Conflicts:
#	src/main/java/com/sipai/controller/equipment/MaintenancePlanController.java
This commit is contained in:
Timer
2026-04-04 01:18:42 +08:00
13 changed files with 1776 additions and 894 deletions

View File

@ -17,6 +17,7 @@ import io.swagger.annotations.*;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.activiti.engine.RepositoryService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -866,6 +867,9 @@ public class UserController {
public String getUsersByIds(HttpServletRequest request, Model model) {
String userIds = request.getParameter("userIds");
List<User> list = this.userService.selectListByWhere("where id in ('" + userIds.replace(",", "','") + "') order by CHARINDEX(','+ id +',','," + userIds + ",')");
if (CollectionUtils.isNotEmpty(list)){
list = list.stream().filter(u -> StringUtils.isNotBlank(u.getId())).collect(toList());
}
JSONArray json = JSONArray.fromObject(list);
model.addAttribute("result", json);
return "result";

View File

@ -4152,8 +4152,15 @@ public class MPointController {
for (int i = 0; i < ids.length; i++) {
com.alibaba.fastjson.JSONObject jsonObject2 = new com.alibaba.fastjson.JSONObject();
//通过es查询bizid
MPoint mPoint_es = mPointService.selectById(ids[i]);
//通过数据库查询测点优先通过unitId和测点编码查询
MPoint mPoint_es = mPointService.selectById(unitId, ids[i]);
if (mPoint_es == null) {
// 尝试通过测点编码查询
List<MPoint> mPointList = mPointService.selectListByWhere(unitId, "where mpointcode='" + ids[i] + "'");
if (mPointList != null && mPointList.size() > 0) {
mPoint_es = mPointList.get(0);
}
}
if (mPoint_es != null) {
unitId = mPoint_es.getBizid();

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

File diff suppressed because it is too large Load Diff

View File

@ -141,9 +141,9 @@
formatter: function (value, row, index) {
var buts = "";
buts += '<security:authorize buttonUrl="equipment/location.do">';
buts += '<button class="btn btn-default btn-sm" title="定位" onclick="locationFun(\'' + row.id + '\')"><i class="fa fa-map-marker"></i><span class="hidden-md hidden-lg"> 定位</span></button>';
buts += '</security:authorize>';
// buts += '<security:authorize buttonUrl="equipment/location.do">';
// buts += '<button class="btn btn-default btn-sm" title="定位" onclick="locationFun(\'' + row.id + '\')"><i class="fa fa-map-marker"></i><span class="hidden-md hidden-lg"> 定位</span></button>';
// buts += '</security:authorize>';
buts += '<security:authorize buttonUrl="equipment/edit.do">';
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';

View File

@ -105,16 +105,15 @@
masterId: id,
tbName: tbName
}, function (data) {
//console.info(data)
// 清空之前的配置
previews = [];
previewConfigs = [];
if (data.length > 0) {
previews = new Array();
$('#maintenancefile').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, "\/");
;
// 预览地址添加preview=true参数让浏览器内嵌显示
var path = ext.contextPath + "/report/rptInfoSetFile/downloadFile4minio.do?id=" + data[i].id + "&tbName=" + tbName + "&preview=true";
previews.push(path);
previewConfig['width'] = '2500px';
previewConfig['caption'] = data[i].filename;

View File

@ -47,7 +47,7 @@
$("#subForm").bootstrapValidator('validate');//提交验证
//setTimeout(function(){
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/equipment/maintenancePlan/doupdate.do", $("#subForm").serialize(), function(data) {
$.post(ext.contextPath + "/maintenance/equipmentPlan/doupdate.do", $("#subForm").serialize(), function(data) {
if (data.res == 1){
$("#table").bootstrapTable('refresh');
closeModal("subModal");
@ -70,7 +70,7 @@
$("#subUnitForm").bootstrapValidator('validate');//提交验证
//setTimeout(function(){
if ($("#subForm").data('bootstrapValidator').isValid() && $("#subUnitForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
$.post(ext.contextPath + "/equipment/maintenancePlan/doupdate.do", $("#subForm").serialize(), function(data) {
$.post(ext.contextPath + "/maintenance/equipmentPlan/doupdate.do", $("#subForm").serialize(), function(data) {
var routeNum = $("#routeNum").val();
if (data.res == 1){
$.post(ext.contextPath + "/equipment/maintenancePlan/submitAuditAgain.do", $("#subUnitForm").serialize()+"&routeNum="+routeNum, function(unitdata) {
@ -426,6 +426,43 @@
</div>
<div id="fileArea"></div>--%>
</form>
<!--流程审核退回后显示-->
<form class="form-horizontal" id="subUnitForm" enctype="multipart/form-data">
<input type="hidden" class="form-control" name="id" value="${businessUnitHandle.id}">
<input type="hidden" class="form-control" name="processid" value="${businessUnitHandle.processid}">
<input type="hidden" class="form-control" name="taskid" value="${businessUnitHandle.taskid}">
<input type="hidden" class="form-control" name="businessid" value="${businessUnitHandle.businessid}">
<input type="hidden" class="form-control" name="taskdefinitionkey" value="${businessUnitHandle.taskdefinitionkey}">
<input type="hidden" class="form-control" name="unitid" value="${businessUnitHandle.unitid}">
<c:if test='${not empty businessUnitAudit.auditopinion}'>
<div class="form-group">
<label class="col-sm-2 control-label">审核意见:</label>
<div class="col-sm-10">
<textarea class="form-control" id="auditopinion" name="auditopinion" rows="2" placeholder="审核意见">${businessUnitAudit.auditopinion}</textarea>
</div>
</div>
</c:if>
<div class="form-group">
<label class="col-sm-2 control-label">*下一节点</label>
<div class="col-sm-6">
<select class="form-control select2" id="routeNum" name="routeNum" style="width: 270px;">
</select>
</div>
</div>
<div id="selectUsers" class="form-group">
<label class="col-sm-2 control-label">提交至:</label>
<div class="col-sm-10">
<input type="text" class="form-control" id="targetUsersName" name="targetUsersName" placeholder="下一级人员" onclick="showUser4AuditSelectsFun();">
<input id="targetusers" name="targetusers" type="hidden" value="${businessUnitHandle.targetusers}"/>
<input class="form-control" id="targetjobs" name="targetjobs" type="hidden" value=""/>
</div>
</div>
<!-- 文件上传,显示 -->
<div class="form-group" style="margin:8px">
<button type="button" class="btn btn-default btn-file" onclick="fileinput_process()"><i class="fa fa-paperclip"></i>上传文件</button>
</div>
<div class="file-border" id="fileArea"></div>
</form>
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">关联设备</h3>

View File

@ -135,7 +135,7 @@
//配置logo
var array = eval(${jsonArray});
var verCode = true;
var bgpath = ["IMG/login/bg1.png"];
var bgpath = ["IMG/loginbp.png"];
if(array!=null && array!=undefined && array.length>0){
for(var i =0;i<array.length;i++){
var img = null;
@ -325,15 +325,9 @@
<div class="content" style="height:100%;vertical-align: middle;" id="login-content">
<!-- BEGIN 登录 FORM -->
<form class="login-form " id="loginForm">
<div class="logo row">
<!-- <div class="logo row">
<img src="IMG/login/title.png" style="width:100%;" alt="" id="login-title" />
<!-- <div class="col-lg-8 col-sm-8 col-md-8 col-xs-8">
<h5 style="color:black" class="form-title">西派埃智能</h4>
<h2 style="margin:0px">南康智慧水厂运管平台</h2>
<h4 style="color:black;margin-top:4px" >精益运行工业互联网平台</h4>
</div> -->
</div>
</div> -->
<div class="form-group">
<div id="alertDiv"></div>

View File

@ -78,7 +78,7 @@
/* 上部分区域 */
.top-section {
display: grid;
grid-template-columns: 220px 1fr 220px;
grid-template-columns: 220px 1fr 240px;
gap: 15px;
margin-bottom: 15px;
align-items: start;
@ -186,7 +186,7 @@
/* 设备运行卡片 */
.device-list {
max-height: 360px;
max-height: 343px;
overflow-y: auto;
}
@ -424,6 +424,7 @@
padding: 10px 15px;
border-top: 1px solid #f0f0f0;
background: #fafafa;
margin: 0;
}
.pagination-info {
@ -483,6 +484,127 @@
.device-list::-webkit-scrollbar-track {
background: #f1f1f1;
}
/* 企业模块样式 */
.enterprise-section {
margin-top: 15px;
}
.enterprise-stats {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 15px;
margin-bottom: 15px;
}
.enterprise-stat-card {
background: #fff;
border-radius: 8px;
padding: 20px;
text-align: center;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.enterprise-stat-card .stat-value {
font-size: 32px;
font-weight: bold;
color: #0c4377;
margin-bottom: 5px;
}
.enterprise-stat-card .stat-label {
font-size: 14px;
color: #666;
}
.enterprise-stat-card.primary .stat-value {
color: #378dcc;
}
.enterprise-stat-card.success .stat-value {
color: #52c41a;
}
.enterprise-stat-card.warning .stat-value {
color: #faad14;
}
.enterprise-list-wrapper {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 15px;
}
.enterprise-item {
background: #fff;
border-radius: 8px;
padding: 15px;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: transform 0.2s, box-shadow 0.2s;
}
.enterprise-item:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.enterprise-item-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #f0f0f0;
}
.enterprise-item-name {
font-size: 14px;
font-weight: bold;
color: #333;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 150px;
}
.enterprise-item-status {
padding: 2px 8px;
border-radius: 4px;
font-size: 12px;
}
.enterprise-item-status.online {
background: #e6f7e6;
color: #52c41a;
}
.enterprise-item-status.offline {
background: #fff1f0;
color: #ff4d4f;
}
.enterprise-item-flow {
display: flex;
justify-content: space-between;
align-items: center;
}
.enterprise-flow-label {
font-size: 12px;
color: #999;
}
.enterprise-flow-value {
font-size: 18px;
font-weight: bold;
color: #378dcc;
}
.enterprise-flow-unit {
font-size: 12px;
color: #999;
margin-left: 2px;
}
</style>
<script type="text/javascript">
// 分页配置
@ -494,17 +616,259 @@
var alarmCurrentPage = 1;
var alarmData = [];
// 接口返回的原始数据缓存
var mainConfigData = null;
// 默认unitId如果在URL中没有传递或无法从父页面获取
var defaultUnitId = '0533JS';
$(function () {
initData();
initChart();
// 如果unitId为空使用默认值或URL参数
if (!unitId || unitId === '') {
var urlParams = new URLSearchParams(window.location.search);
unitId = urlParams.get('unitId') || defaultUnitId;
}
loadMainConfig();
loadEnterpriseData();
});
// 企业模块变量
var enterpriseTotal = 0;
var enterpriseOnline = 0;
var enterpriseList = [];
// 加载企业数据
function loadEnterpriseData() {
$.ajax({
type: 'POST',
url: ext.contextPath + '/sparepart/sewage/getList.do',
data: {
page: 1,
rows: 1000,
sort: "displacement",
order: "asc",
unitId: '0533JS',
},
// async: true,
// dataType: 'json',
// globle: false,
error: function () {
// loadEnterpriseDataMock();
return false;
},
success: function (data) {
if (typeof data === "string") {
var dataList = JSON.parse(data);
if (dataList && dataList.rows) {
var list = dataList.rows || [];
enterpriseTotal = dataList.total;
enterpriseOnline = list.filter(function(item) {
return item._input;
}).length;
enterpriseList = list;
renderEnterpriseStats();
renderEnterpriseList(list);
} else {
loadEnterpriseDataMock();
}
}
}
});
}
// Mock企业数据
function loadEnterpriseDataMock() {
var mockData = [
{id: '001', text: '金山污水处理厂', attributes: {status: 'online', flow: 12580}},
{id: '002', text: '亭林污水处理厂', attributes: {status: 'online', flow: 8650}},
{id: '003', text: '朱泾污水处理厂', attributes: {status: 'online', flow: 5430}},
{id: '004', text: '枫泾污水处理厂', attributes: {status: 'offline', flow: 0}},
{id: '005', text: '廊下污水处理厂', attributes: {status: 'online', flow: 3280}},
{id: '006', text: '张堰污水处理厂', attributes: {status: 'online', flow: 4560}},
{id: '007', text: '吕巷污水处理厂', attributes: {status: 'online', flow: 2890}},
{id: '008', text: '漕泾污水处理厂', attributes: {status: 'offline', flow: 0}}
];
enterpriseTotal = mockData.length;
enterpriseOnline = mockData.filter(function(item) { return item.attributes.status === 'online'; }).length;
enterpriseList = mockData;
renderEnterpriseStats();
renderEnterpriseList(mockData);
}
// 渲染企业统计
function renderEnterpriseStats() {
$('#enterprise_total').text(enterpriseTotal);
$('#enterprise_online').text(enterpriseOnline);
$('#enterprise_offline').text(enterpriseTotal - enterpriseOnline);
// 计算总流量
var totalFlow = enterpriseList.reduce(function(sum, item) {
return sum + (item.attributes && item.attributes.flow ? item.attributes.flow : 0);
}, 0);
$('#enterprise_total_flow').text(formatNumber(totalFlow));
}
// 渲染企业列表
function renderEnterpriseList(list) {
var html = '';
list.forEach(function(item) {
var name = item.name || item.text || '--';
var status = item._input ? 'online' : 'offline';
var flow = item.attributes && item.attributes.flow ? item.attributes.flow : 0;
var statusClass = status === 'online' ? 'online' : 'offline';
var statusText = status === 'online' ? '已接入' : '未接入';
html += '<div class="enterprise-item">';
html += '<div class="enterprise-item-header">';
html += '<span class="enterprise-item-name" title="' + name + '">' + name + '</span>';
html += '<span class="enterprise-item-status ' + statusClass + '">' + statusText + '</span>';
html += '</div>';
html += '<div class="enterprise-item-flow">';
html += '<span class="enterprise-flow-label">瞬时流量</span>';
html += '<div>';
html += '<span class="enterprise-flow-value">' + formatNumber(flow) + '</span>';
html += '<span class="enterprise-flow-unit">m³/h</span>';
html += '</div>';
html += '</div>';
html += '</div>';
});
$('#enterprise_list').html(html);
}
// 格式化数字
function formatNumber(num) {
if (num === null || num === undefined) return '--';
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
}
// 加载主配置数据
function loadMainConfig() {
$.ajax({
type: 'GET',
url: ext.contextPath + '/base/mainConfig/getJson.do',
async: true,
data: {unitId: unitId},
globle: false,
error: function () {
console.error('获取主配置数据失败');
// // 加载失败时使用默认数据
// initData();
// initChart();
return false;
},
success: function (data) {
try {
var jsonData = eval('(' + data + ')');
if (jsonData.status === 'pass' && jsonData.mpcode) {
mainConfigData = jsonData.mpcode;
processMainConfig(jsonData.mpcode);
} else {
// initData();
// initChart();
}
} catch (e) {
console.error('解析主配置数据失败', e);
// initData();
// initChart();
}
}
});
}
// 处理主配置数据
function processMainConfig(mpcode) {
var hasChartConfig = false;
for (var i = 0; i < mpcode.length; i++) {
var item = mpcode[i];
var code = item.mpointId;
var funname = item.funName;
var divid = item.divId;
var testid = item.testId;
var type = item.type;
var mpointId = item.mpointId;
var funName = item.funName;
if (type == '${type_pro}' && funName == 'getValue') {//生产
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
}
if (type == '${type_safe}') {//安全
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
}
if (type == '${type_eff}') {//效率
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
}
if (type == '${type_pic}') {//左上角图片
// getUnitsByUnitId4Select(unitId,funname,mpointId);
}
}
// // 根据type类型调用对应函数
// if (type === '${type_pro}' || type === '${type_safe}' || type === '${type_eff}') {
// if (funname && divid) {
// eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')");
// }
// } else if (type === 'chart') {
// // 图表类型
// hasChartConfig = true;
// if (funname === 'initChartByConfig') {
// initChartByConfig(code, divid);
// } else if (funname === 'echartMixed' || funname === 'echartColumnar1' || funname === 'echartColumnar2') {
// eval(funname + "('" + unitId + "','" + code + "','" + divid + "')");
// } else if (funname === 'echartPie') {
// eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')");
// } else if (funname) {
// eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')");
// }
// } else if (type === 'device') {
// // 设备运行状态
// initDeviceListByConfig(code, divid);
// } else if (type === 'pump') {
// // 泵站详情
// initPumpStationByConfig(item);
// } else if (type === 'process') {
// // 工艺列表
// initProcessListByConfig(code, divid);
// } else if (type === 'alarm') {
// // 告警列表
// initAlarmListByConfig(code, divid);
// }
// // 如果没有图表配置,使用默认图表
// if (!hasChartConfig) {
// initChart();
// }
// 如果没有设备配置,使用默认数据
var hasDeviceConfig = mpcode.some(function(item) { return item.type === 'device'; });
if (!hasDeviceConfig) {
initDeviceList();
}
// 如果没有泵站配置,使用默认数据
var hasPumpConfig = mpcode.some(function(item) { return item.type === 'pump'; });
if (!hasPumpConfig) {
initPumpStations();
}
// 如果没有工艺配置,使用默认数据
var hasProcessConfig = mpcode.some(function(item) { return item.type === 'process'; });
if (!hasProcessConfig) {
initProcessList();
}
// 如果没有告警配置,使用默认数据
var hasAlarmConfig = mpcode.some(function(item) { return item.type === 'alarm'; });
if (!hasAlarmConfig) {
initAlarmList();
}
}
function initData() {
// 初始化进出水累计
$('#industrial_inflow_value').text('12,580');
$('#industrial_outflow_value').text('12,380');
$('#domestic_inflow_value').text('8,650');
$('#domestic_outflow_value').text('8,450');
// 初始化进出水累计(默认值)
$('#valueProduce1_js').text('--');
$('#valueProduce2_js').text('--');
$('#valueProduce3_js').text('--');
$('#valueProduce4_js').text('--');
// 初始化设备运行列表
initDeviceList();
@ -516,32 +880,132 @@
initAlarmList();
}
// 设备列表分页配置
var devicePageSize = 20;
var deviceCurrentPage = 1;
var deviceTotal = 0;
function initDeviceList() {
loadDeviceList(1);
}
// 加载设备运行列表(分页)
function loadDeviceList(page) {
deviceCurrentPage = page;
$.ajax({
type: 'GET',
url: ext.contextPath + '/equipment/getList4EquipmentCard.do',
data: {
rows: devicePageSize,
page: page,
sort: 'equipmentcardid',
order: 'asc',
unitId: unitId,
},
async: true,
globle: false,
error: function () {
// 失败时使用默认mock数据
loadDeviceListMock();
return false;
},
success: function (data) {
if (data != null && data !== '') {
try {
var result = eval('(' + data + ')');
if (result.total !== undefined && result.rows) {
deviceTotal = result.total;
renderDeviceList('device_list', result.rows);
renderDevicePagination();
} else {
loadDeviceListMock();
}
} catch (e) {
loadDeviceListMock();
}
} else {
loadDeviceListMock();
}
}
});
}
// Mock数据接口失败时使用
function loadDeviceListMock() {
var devices = [
{name: '进水泵1#', status: 'running'},
{name: '进水泵2#', status: 'running'},
{name: '鼓风机1#', status: 'running'},
{name: '鼓风机2#', status: 'stopped'},
{name: '回流泵1#', status: 'warning'},
{name: '回流泵2#', status: 'running'},
{name: '污泥泵1#', status: 'running'},
{name: '污泥泵2#', status: 'stopped'},
{name: '提升泵1#', status: 'running'},
{name: '提升泵2#', status: 'running'}
{equipmentname: '进水泵1#', equipmentstatus: '运行'},
{equipmentname: '进水泵2#', equipmentstatus: '运行'},
{equipmentname: '鼓风机1#', equipmentstatus: '运行'},
{equipmentname: '鼓风机2#', equipmentstatus: '停止'},
{equipmentname: '回流泵1#', equipmentstatus: '异常'},
{equipmentname: '回流泵2#', equipmentstatus: '运行'},
{equipmentname: '污泥泵1#', equipmentstatus: '运行'},
{equipmentname: '污泥泵2#', equipmentstatus: '停止'},
{equipmentname: '提升泵1#', equipmentstatus: '运行'},
{equipmentname: '提升泵2#', equipmentstatus: '运行'}
];
deviceTotal = devices.length;
renderDeviceList('device_list', devices);
renderDevicePagination();
}
// 根据配置初始化设备运行列表
function initDeviceListByConfig(mpointCode, containerId) {
loadDeviceList(1);
}
// 渲染设备列表
function renderDeviceList(containerId, devices) {
var html = '';
devices.forEach(function(device) {
var statusClass = device.status === 'running' ? 'status-running' :
device.status === 'stopped' ? 'status-stopped' : 'status-warning';
var statusText = device.status === 'running' ? '运行中' :
device.status === 'stopped' ? '已停止' : '异常';
var status = device.equipmentStatusManagement.name || device.status || '';
var name = device.equipmentname || device.name || '';
// 根据状态设置样式
var statusClass = '';
var statusText = '';
if (status === '在用' || status === 'running') {
statusClass = 'status-running';
statusText = '在用';
} else if (status === '停用') {
statusClass = 'status-stopped';
statusText = '停用';
} else if (status === '异常') {
statusClass = 'status-warning';
statusText = '异常';
} else {
statusClass = 'status-stopped';
statusText = status || '运行中';
}
html += '<div class="device-item">';
html += '<span class="device-name">' + device.name + '</span>';
html += '<span class="device-name">' + name + '</span>';
html += '<span class="device-status ' + statusClass + '">' + statusText + '</span>';
html += '</div>';
});
$('#device_list').html(html);
$('#' + containerId).html(html);
}
// 渲染设备分页
function renderDevicePagination() {
var totalPages = Math.ceil(deviceTotal / devicePageSize);
// var pageInfo = '第 ' + deviceCurrentPage + '/' + totalPages + ' 页,共 ' + deviceTotal + ' 条';
var pageInfo = '第 ' + deviceCurrentPage + '/' + totalPages + '页';
var html = '<span class="pagination-info">' + pageInfo + '</span>';
html += '<div class="pagination-btns">';
// html += '<button class="pagination-btn" onclick="deviceGoToPage(1)" ' + (deviceCurrentPage === 1 ? 'disabled' : '') + '>首页</button>';
html += '<button class="pagination-btn" onclick="deviceGoToPage(' + (deviceCurrentPage - 1) + ')" ' + (deviceCurrentPage === 1 ? 'disabled' : '') + '><</button>';
html += '<button class="pagination-btn" onclick="deviceGoToPage(' + (deviceCurrentPage + 1) + ')" ' + (deviceCurrentPage >= totalPages ? 'disabled' : '') + '>></button>';
html += '</div>';
$('#device_pagination').html(html);
}
// 设备分页跳转
function deviceGoToPage(page) {
var totalPages = Math.ceil(deviceTotal / devicePageSize);
if (page < 1) page = 1;
if (page > totalPages) page = totalPages;
loadDeviceList(page);
}
function initPumpStations() {
@ -576,6 +1040,55 @@
$('#' + containerId).html(html);
}
// 根据配置初始化泵站详情
function initPumpStationByConfig(configItem) {
var code = configItem.mpointId;
var divid = configItem.divId;
var testid = configItem.testId;
var memo = configItem.memo || '';
// 解析memo获取泵站信息格式如"泵站名称:COD:氨氮"
var parts = memo.split(':');
var stationName = parts[0] || '';
var paramNames = parts.slice(1);
$.ajax({
type: 'GET',
url: ext.contextPath + '/work/mpoint/getPumpStation.do?unitId=' + unitId + '&mpointCode=' + code,
async: true,
globle: false,
error: function () {
return false;
},
success: function (data) {
if (data != null && data !== '') {
try {
var result = eval('(' + data + ')');
if (result.status === 'pass') {
// 更新水质参数
if (result.params) {
for (var key in result.params) {
$('#' + key).text(result.params[key]);
}
}
// 更新泵状态
if (result.pumps && divid) {
renderPumpList(divid, result.pumps);
}
}
} catch (e) {
console.error('解析泵站数据失败', e);
}
}
}
});
}
// 获取泵站水质参数值
function getPumpParamValue(unitId, mpointCode, valueId, textId) {
getValue(unitId, mpointCode, valueId, textId);
}
// 生成工艺列表mock数据
function generateProcessData() {
var processNames = ['粗格栅间', '细格栅间', '曝气沉砂池', '厌氧池', '缺氧池', '好氧池', '二沉池', '消毒池', '污泥浓缩池', '污泥脱水间'];
@ -596,6 +1109,41 @@
return data;
}
// 根据配置初始化工艺列表
function initProcessListByConfig(mpointCode, containerId) {
$.ajax({
type: 'GET',
url: ext.contextPath + '/work/mpoint/getProcessList.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
async: true,
globle: false,
error: function () {
processData = generateProcessData();
renderProcessTable();
return false;
},
success: function (data) {
if (data != null && data !== '') {
try {
var result = eval('(' + data + ')');
if (result.status === 'pass' && result.processList) {
processData = result.processList;
renderProcessTable();
} else {
processData = generateProcessData();
renderProcessTable();
}
} catch (e) {
processData = generateProcessData();
renderProcessTable();
}
} else {
processData = generateProcessData();
renderProcessTable();
}
}
});
}
// 生成告警列表mock数据
function generateAlarmData() {
var processNames = ['粗格栅间', '细格栅间', '曝气沉砂池', '厌氧池', '缺氧池', '好氧池', '二沉池', '消毒池', '污泥浓缩池', '污泥脱水间'];
@ -620,6 +1168,41 @@
return data;
}
// 根据配置初始化告警列表
function initAlarmListByConfig(mpointCode, containerId) {
$.ajax({
type: 'GET',
url: ext.contextPath + '/work/mpoint/getAlarmList.do?unitId=' + unitId + '&mpointCode=' + mpointCode,
async: true,
globle: false,
error: function () {
alarmData = generateAlarmData();
renderAlarmTable();
return false;
},
success: function (data) {
if (data != null && data !== '') {
try {
var result = eval('(' + data + ')');
if (result.status === 'pass' && result.alarmList) {
alarmData = result.alarmList;
renderAlarmTable();
} else {
alarmData = generateAlarmData();
renderAlarmTable();
}
} catch (e) {
alarmData = generateAlarmData();
renderAlarmTable();
}
} else {
alarmData = generateAlarmData();
renderAlarmTable();
}
}
});
}
function initProcessList() {
processData = generateProcessData();
renderProcessTable();
@ -705,10 +1288,34 @@
alarmCurrentPage = page;
renderAlarmTable();
}
function initChart() {
var chart = echarts.init(document.getElementById('flow_chart'));
var option = {
// 构建图表配置项
function buildChartOption(chartData) {
var series = [];
var legendData = [];
if (chartData.series) {
chartData.series.forEach(function(item, index) {
legendData.push(item.name);
var colors = [
[{offset: 0, color: '#378dcc'}, {offset: 1, color: '#5ba3d9'}],
[{offset: 0, color: '#5b8def'}, {offset: 1, color: '#40a9ff'}],
[{offset: 0, color: '#52c41a'}, {offset: 1, color: '#73d13d'}],
[{offset: 0, color: '#2ecc71'}, {offset: 1, color: '#58d68d'}]
];
series.push({
name: item.name,
type: item.type || 'bar',
barWidth: '20%',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, colors[index % colors.length])
},
data: item.data
});
});
}
return {
tooltip: {
trigger: 'axis',
axisPointer: {
@ -716,7 +1323,7 @@
}
},
legend: {
data: ['工业进水', '工业出水', '生活进水', '生活出水'],
data: legendData,
top: 5,
textStyle: {
fontSize: 12
@ -731,7 +1338,7 @@
},
xAxis: {
type: 'category',
data: ['3/16', '3/17', '3/18', '3/19', '3/20', '3/21', '3/22'],
data: chartData.xAxis || ['3/16', '3/17', '3/18', '3/19', '3/20', '3/21', '3/22'],
axisLine: {
lineStyle: {
color: '#e8e8e8'
@ -744,7 +1351,7 @@
},
yAxis: {
type: 'value',
name: 'm³/D',
name: chartData.yAxisName || 'm³/D',
nameTextStyle: {
fontSize: 12
},
@ -764,62 +1371,8 @@
}
}
},
series: [
{
name: '工业进水',
type: 'bar',
barWidth: '20%',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#378dcc'},
{offset: 1, color: '#5ba3d9'}
])
},
data: [12000, 11500, 13000, 12500, 11800, 12200, 12580]
},
{
name: '工业出水',
type: 'bar',
barWidth: '20%',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#5b8def'},
{offset: 1, color: '#40a9ff'}
])
},
data: [11800, 11300, 12800, 12300, 11600, 12000, 12380]
},
{
name: '生活进水',
type: 'bar',
barWidth: '20%',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#52c41a'},
{offset: 1, color: '#73d13d'}
])
},
data: [8500, 8200, 9000, 8800, 8600, 8400, 8650]
},
{
name: '生活出水',
type: 'bar',
barWidth: '20%',
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{offset: 0, color: '#2ecc71'},
{offset: 1, color: '#58d68d'}
])
},
data: [8300, 8000, 8800, 8600, 8400, 8200, 8450]
}
]
series: series
};
chart.setOption(option);
window.addEventListener('resize', function() {
chart.resize();
});
}
</script>
</head>
@ -838,19 +1391,19 @@
<div class="inflow-group-content">
<div class="inflow-item industrial-inflow">
<div class="inflow-content">
<span class="label">进水累计</span>
<span class="label" id="textProduce1_js">进水累计</span>
<div class="value-row">
<span class="value" id="industrial_inflow_value">--</span>
<span class="unit">m³</span>
<span class="value" id="valueProduce1_js">--</span>
<!-- <span class="unit">m³</span> -->
</div>
</div>
</div>
<div class="inflow-item industrial-outflow">
<div class="inflow-content">
<span class="label">出水累计</span>
<span class="label" id="textProduce2_js">出水累计</span>
<div class="value-row">
<span class="value" id="industrial_outflow_value">--</span>
<span class="unit">m³</span>
<span class="value" id="valueProduce2_js">--</span>
<!-- <span class="unit">m³</span> -->
</div>
</div>
</div>
@ -861,19 +1414,19 @@
<div class="inflow-group-content">
<div class="inflow-item domestic-inflow">
<div class="inflow-content">
<span class="label">进水累计</span>
<span class="label" id="textProduce3_js">进水累计</span>
<div class="value-row">
<span class="value" id="domestic_inflow_value">--</span>
<span class="unit">m³</span>
<span class="value" id="valueProduce3_js">--</span>
<!-- <span class="unit">m³</span> -->
</div>
</div>
</div>
<div class="inflow-item domestic-outflow">
<div class="inflow-content">
<span class="label">出水累计</span>
<span class="label" id="textProduce4_js">出水累计</span>
<div class="value-row">
<span class="value" id="domestic_outflow_value">--</span>
<span class="unit">m³</span>
<span class="value" id="valueProduce4_js">--</span>
<!-- <span class="unit">m³</span> -->
</div>
</div>
</div>
@ -887,7 +1440,7 @@
<div class="card">
<div class="card-header">污水流量7天日趋势</div>
<div class="card-body">
<div id="flow_chart" class="chart-container"></div>
<div id="myChartProduce8" class="chart-container"></div>
</div>
</div>
@ -897,6 +1450,7 @@
<div class="card-body" style="padding: 0;">
<div class="device-list" id="device_list"></div>
</div>
<div class="pagination device_pagination" id="device_pagination"></div>
</div>
</div>
@ -1011,6 +1565,39 @@
</div>
</div>
</div>
<!-- 企业模块 -->
<div class="enterprise-section">
<div class="card">
<div class="card-header">企业概况</div>
<div class="card-body">
<!-- 统计卡片 -->
<div class="enterprise-stats">
<div class="enterprise-stat-card primary">
<div class="stat-value" id="enterprise_total">--</div>
<div class="stat-label">企业总数</div>
</div>
<div class="enterprise-stat-card success">
<div class="stat-value" id="enterprise_online">--</div>
<div class="stat-label">接入总数</div>
</div>
<div class="enterprise-stat-card warning">
<div class="stat-value" id="enterprise_offline">--</div>
<div class="stat-label">离线企业</div>
</div>
<div class="enterprise-stat-card">
<div class="stat-value" id="enterprise_total_flow">--</div>
<div class="stat-label">总瞬时流量(m³/h)</div>
</div>
</div>
<!-- 企业列表 -->
<div class="enterprise-list-wrapper" id="enterprise_list">
<!-- 企业卡片将通过JS动态生成 -->
</div>
</div>
</div>
</div>
</div>
</body>

View File

@ -0,0 +1,398 @@
<%@ 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" %>
<%@ page import="com.sipai.entity.base.MainConfig" %>
<% request.setAttribute("type_pro", MainConfig.type_pro); %>
<% request.setAttribute("type_safe", MainConfig.type_safe); %>
<% request.setAttribute("type_eff", MainConfig.type_eff); %>
<% request.setAttribute("type_pic", MainConfig.type_pic); %>
<!DOCTYPE html>
<head>
<title><%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<!-- echarts-->
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts.4.1.0.min.js"
charset="utf-8"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/main/main_js.js" charset="utf-8"></script>
<style>
/*
根据不同分辨率显示不同px的文字大小
*/
@media (min-width: 1080px) {
}
@media (min-width: 1550px) {
}
.fontValue {
text-align: center;
margin-top: 20px;
margin-left: 70px;
font-size: 20px;
color: #ffffff;
font-weight: bold;
}
.fontText {
margin-left: 20px;
font-size: 14px;
color: #ffffff;
font-weight: bold;
}
.carousel-inner,
.carousel-inner >.item,
.carousel-inner >.item >img{
width:100%;height:100%;
}
.carousel-caption{
cursor: pointer;
padding: 0;
background-color: RGBA(55,141,204,0.5);
bottom: 10px;
}
</style>
<script type="text/javascript">
$(function () {
firstFun();
});
window.onresize = function () {
firstFun();
}
function firstFun() {
//var height = document.documentElement.clientHeight;
var height = $(window).height();
$('#mainDiv').css('height', height);//页面加载先给高度
$.ajax({
type: 'GET',
url: ext.contextPath + '/base/mainConfig/getJson.do',
async: true,
data: {unitId: unitId},
globle: false,
error: function () {
return false;
},
success: function (data) {
var data = eval('(' + data + ')');
for (var i = 0; i < data.mpcode.length; i++) {
var code = data.mpcode[i].mpointId;
var funname = data.mpcode[i].funName;
var divid = data.mpcode[i].divId;
var testid = data.mpcode[i].testId;
var mpointId = data.mpcode[i].mpointId;
if (data.mpcode[i].type == '${type_pro}') {//生产
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
}
if (data.mpcode[i].type == '${type_safe}') {//安全
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
}
if (data.mpcode[i].type == '${type_eff}') {//效率
eval(funname + "('" + unitId + "','" + code + "','" + divid + "','" + testid + "')")
}
if (data.mpcode[i].type == '${type_pic}') {//左上角图片
//eval(funname + "('" + unitId + "')")
getUnitsByUnitId4Select(unitId,funname,mpointId);
}
}
//安全
// echartColumnar2(unitId, 'TH_03_FIT040001D_FLOW_C', 'myChartsafe1');
}
});
//优良差
$(".evaluateIcon").attr("src", ext.contextPath + "/IMG/main/evaluate.png");
//左上角图片
// $("#mainImg").attr("src", ext.contextPath + "/IMG/main/main.jpg");
}
</script>
</head>
<body>
<div id="mainDiv" style="background:#f1f1f1;">
<div style="float:left;height:100%;width:35%;">
<div style="float:left;height:45%;width:100%;padding:5px 5px 5px 5px;">
<div style="height:100%;width:100%;background-color:#ffffff;">
<%--图片--%>
<!-- <img src="" id="mainImg" style="width:100%;height:100%;"> -->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel" style="width:100%;height:100%;">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox" id="carousel-items">
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
<div style="float:left;height:55%;width:100%;padding:5px 5px 5px 5px;">
<div style="height:100%;width:100%;background-color:#ffffff;">
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
水量及电耗
</div>
<div style="width:100%;height:40%;float:left;">
<div style="width:48%;height:45%;float:left;background-color:#378dcc;margin:1%;">
<div class="fontValue" id="safe_value_1">-</div>
<div class="fontText" id="safe_text_1">-</div>
</div>
<div style="width:48%;height:45%;float:right;background-color:#67aad7;margin:1%;">
<div class="fontValue" id="safe_value_2">-</div>
<div class="fontText" id="safe_text_2">-</div>
</div>
<div style="width:48%;height:45%;float:left;background-color:#FACA00;margin:1%;">
<div class="fontValue" id="safe_value_3">-</div>
<div class="fontText" id="safe_text_3">-</div>
</div>
<div style="width:48%;height:45%;float:right;background-color:#66D97C;margin:1%;">
<div class="fontValue" id="safe_value_4">-</div>
<div class="fontText" id="safe_text_4">-</div>
</div>
</div>
<div style="width:100%;height:55%;float:left;padding: 5px 5px 5px 5px;">
<div style="width:100%;height:100%;float:left;">
<div style="width:100%;height:100%;float:left;" id="myChartProduce8"></div>
</div>
</div>
</div>
</div>
</div>
<div style="float:left;height:100%;width:65%;">
<div style="float:left;height:50%;width:100%;padding:5px 5px 5px 5px;">
<div style="height:100%;width:100%;background-color:#ffffff;">
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
一车间
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:25%;float:left;background-color:#cbe3f9;margin:6%;">
<div class="fontValue" style="color: #0c4377;" id="valueProduce1_js"></div>
<div class="fontText" style="color: #0c4377;" id="textProduce1_js"></div>
</div>
<div style="width:100%;height:25%;float:left;background-color:#badaf8;margin:6%;">
<div class="fontValue" style="color: #0c4377;" id="valueProduce2_js"></div>
<div class="fontText" style="color: #0c4377;" id="textProduce2_js"></div>
</div>
<div style="width:100%;height:25%;float:left;background-color:#73afd8;margin:6%;">
<div class="fontValue" style="color: #0c4377;" id="valueProduce3_js"></div>
<div class="fontText" style="color: #0c4377;" id="textProduce3_js"></div>
</div>
</div>
<div style="width:80%;height:100%;float:left;padding: 5px 10px 30px 10px;">
<div style="width:100%;height:100%;float:left;">
<div style="width:100%;height:3%;float:left;"></div>
<div style="width:100%;height:40%;float:left;">
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText1_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce1_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText2_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce2_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText3_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce3_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText4_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce4_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText5_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce5_js"></div>
</div>
</div>
<div style="width:100%;height:4%;float:left;"></div>
<div style="width:100%;height:40%;float:left;">
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText6_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce6_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText7_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce7_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText8_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce8_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText9_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce9_js"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText10_js">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce10_js"></div>
</div>
</div>
<div style="width:100%;height:3%;float:left;"></div>
</div>
</div>
</div>
</div>
<div style="float:left;height:50%;width:100%;padding:5px 5px 5px 5px;">
<div style="height:100%;width:100%;background-color:#ffffff;">
<div style="width:100%;height:5%;float:left;border-bottom:2px solid #67aad7;font-weight: bold;">
二车间
</div>
<div style="width:20%;height:96%;float:left;">
<div style="width:100%;height:25%;float:left;background-color:#cbe3f9;margin:6%;">
<div class="fontValue" style="color: #0c4377;" id="valueProduce1_cs"></div>
<div class="fontText" style="color: #0c4377;" id="textProduce1_cs"></div>
</div>
<div style="width:100%;height:25%;float:left;background-color:#badaf8;margin:6%;">
<div class="fontValue" style="color: #0c4377;" id="valueProduce2_cs"></div>
<div class="fontText" style="color: #0c4377;" id="textProduce2_cs"></div>
</div>
<div style="width:100%;height:25%;float:left;background-color:#73afd8;margin:6%;">
<div class="fontValue" style="color: #0c4377;" id="valueProduce3_cs"></div>
<div class="fontText" style="color: #0c4377;" id="textProduce3_cs"></div>
</div>
</div>
<div style="width:80%;height:96%;float:left;padding: 5px 10px 30px 10px;">
<div style="width:100%;height:100%;float:left;">
<div style="width:100%;height:3%;float:left;"></div>
<div style="width:100%;height:40%;float:left;">
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText1_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce1_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText2_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce2_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText3_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce3_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText4_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce4_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText5_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce5_cs"></div>
</div>
</div>
<div style="width:100%;height:4%;float:left;"></div>
<div style="width:100%;height:40%;float:left;">
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText6_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce6_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText7_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce7_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText8_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce8_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText9_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce9_cs"></div>
</div>
<div style="width:20%;height:100%;float:left;">
<div style="width:100%;height:20%;padding-top:10%;padding-right:5%;" align="center"
id="myChartProduceText10_cs">
-
</div>
<div style="width:100%;height:80%;" id="myChartProduce10_cs"></div>
</div>
</div>
<div style="width:100%;height:3%;float:left;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -354,7 +354,9 @@
var buts= '';
buts+= '<button class="btn btn-default btn-sm" title="瞬时流量" onclick="showLineFun(\'' + (row.ventNum || '') + '\', \'SSLL\')"><i class="fa fa-line-chart"></i></button>';
buts+= '<button class="btn btn-default btn-sm" title="累计流量" onclick="showLineFun(\'' + (row.ventNum || '') + '\', \'LJLL\')"><i class="fa fa-area-chart"></i></button>';
buts+= '<button class="btn btn-default btn-sm" title="查看点位" onclick="showpointFun(\'' + row.name + '\')"><i class="fa fa-check-square-o"></i></button>';
// buts+= '<button class="btn btn-default btn-sm" title="查看点位" onclick="showpointFun(\'' + row.name + '\')"><i class="fa fa-check-square-o"></i></button>';
buts+= '<security:authorize buttonUrl="sparepart/sewage/edit.do">';
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
buts+= '</security:authorize>';

View File

@ -20,7 +20,10 @@
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
charset="utf-8"></script>
<script type="text/javascript">
var companyId = unitId;
var companyId = '';
$(function() {
companyId = unitId;
});
var addFun = function () {
$.post(ext.contextPath + '/user/addJob.do', {companyId: companyId}, function (data) {
$("#subDiv").html(data);

View File

@ -1116,12 +1116,12 @@ pageEncoding="UTF-8"%>
// 泵站名称到经纬度的映射
lngLatMap: {
'卫八路泵站': { lng: 121.277502, lat: 30.720661 },
'春华泵站': { lng: 121.287567, lat: 30.727986 },
'九号泵站': { lng: 121.286513, lat: 30.716669 }
'春华泵站': { lng: 121.287567, lat: 30.727986 },
'九号泵站': { lng: 121.286513, lat: 30.716669 },
},
transform: function(item, idx) {
var name = item.text || item.name || '';
var lngLat = this.lngLatMap[name] || { lng: 121.32 + idx * 0.01, lat: 30.76 - idx * 0.005 };
var lngLat = this.lngLatMap[name] ? this.lngLatMap[name] : { lng: 121.32 + idx * 0.01, lat: 30.76 - idx * 0.005 };
return {
id: item.id || 'pump_' + idx,
name: name,
@ -1605,7 +1605,7 @@ pageEncoding="UTF-8"%>
var item = dataConfig.company.data[index];
if (!item || !item.lng || !item.lat) return;
map.panTo(new T.LngLat(item.lng, item.lat));
map.setZoom(15);
map.setZoom(16);
selectMarker(item.name, 'company');
}