first commit
This commit is contained in:
@ -0,0 +1,443 @@
|
||||
<%@ 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" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
|
||||
<style type="text/css">
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
let bizid = "";
|
||||
|
||||
$(function () {
|
||||
let windowHeight = $(window).height();
|
||||
$('#main').css("height", windowHeight + "px");
|
||||
|
||||
if ('${param.bizid}' != null) {
|
||||
bizid = '${param.bizid}';
|
||||
}
|
||||
|
||||
changeTab('1');
|
||||
})
|
||||
|
||||
function changeTab(st) {
|
||||
for (let i = 1; i < 5; i++) {
|
||||
// console.log(i)
|
||||
if (i == st) {
|
||||
$("#tab_ck_" + i).css("display", "block");
|
||||
$("#tab_unck_" + i).css("display", "none");
|
||||
|
||||
let series = [];
|
||||
|
||||
if (i == 1) {
|
||||
//报警数
|
||||
let edt = getNowTime().substring(0, 16);
|
||||
let sdt = edt.substring(0, 7) + "-01 00:00";
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/alarm/proAlarm/getAlarmNum.do",
|
||||
async: true,
|
||||
globle: false,
|
||||
data: {
|
||||
unitId: bizid,
|
||||
sdt: sdt,
|
||||
edt: edt
|
||||
},
|
||||
// dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (result) {
|
||||
// console.log(result)
|
||||
$('.alarmNum').text(result);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/alarm/proAlarm/getAlarmYearHis.do",
|
||||
async: true,
|
||||
globle: false,
|
||||
data: {
|
||||
unitId: bizid
|
||||
},
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (result) {
|
||||
// console.log(result)
|
||||
let seriesData = [];
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
let seriesData_d = [];
|
||||
seriesData_d.push(result[i].date);
|
||||
seriesData_d.push(result[i].num);
|
||||
seriesData.push(seriesData_d);
|
||||
}
|
||||
|
||||
series.push({
|
||||
name: '报警数',
|
||||
type: 'bar',
|
||||
data: seriesData
|
||||
})
|
||||
|
||||
getBarChart(series);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else {
|
||||
series.push({
|
||||
name: '待处理',
|
||||
type: 'bar',
|
||||
data: [
|
||||
2.0, 4.9, 7.0, 3.2, 5.6, 7.7, 4.6, 5.2, 3.6, 2.0, 6.4, 3.3
|
||||
]
|
||||
})
|
||||
series.push({
|
||||
name: '已完成',
|
||||
type: 'bar',
|
||||
data: [
|
||||
2.6, 5.9, 9.0, 6.4, 8.7, 7.7, 5.6, 8.2, 5.7, 7.8, 6.0, 2.3
|
||||
]
|
||||
})
|
||||
getBarChart(series);
|
||||
}
|
||||
|
||||
|
||||
getOrderTable(st);
|
||||
|
||||
} else {
|
||||
$("#tab_unck_" + i).css("display", "block");
|
||||
$("#tab_ck_" + i).css("display", "none");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getBarChart(series) {
|
||||
var myChart = echarts.init(document.getElementById("barChart"));
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
left: '10px', // 与容器左侧的距离
|
||||
right: '10px', // 与容器右侧的距离
|
||||
top: '50px', // 与容器顶部的距离
|
||||
bottom: '10px', // 与容器底部的距离
|
||||
containLabel: true
|
||||
},
|
||||
legend: {
|
||||
data: ['待处理', '已完成', '报警数'],
|
||||
left: 'right',
|
||||
textStyle: {
|
||||
color: '#FFFFFF'
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'time',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '个',
|
||||
minInterval: 1,
|
||||
nameTextStyle: {
|
||||
color: '#FFFFFF'
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: '#FFFFFF',
|
||||
type: 'dashed'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
series: series
|
||||
};
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
|
||||
function getOrderTable(st) {
|
||||
|
||||
let edt = getNowTime().substring(0, 16);
|
||||
let sdt = edt.substring(0, 7) + "-01 00:00";
|
||||
|
||||
if (st == '1') {
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/alarm/proAlarm/getAlarmTopData.do",
|
||||
async: true,
|
||||
globle: false,
|
||||
data: {
|
||||
unitId: bizid,
|
||||
sdt: sdt,
|
||||
edt: edt,
|
||||
topNum: '5'
|
||||
},
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (result) {
|
||||
let html = "";
|
||||
|
||||
html += "<tr style='text-align: center;color: #1CBEC5;font-size: 14px;height: 20%;'>";
|
||||
html += "<td style='width: 80px;'>报警名称</td>";
|
||||
html += "<td style='width: 140px;'>报警时间</td>";
|
||||
html += "<td style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>报警内容</td>";
|
||||
html += "</tr>";
|
||||
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
let data = result[i];
|
||||
html += "<tr style='text-align: center;color: #ffffff;font-size: 14px;height: 16%;'>";
|
||||
html += "<td title='" + data.pointName + "' style='width: 80px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>" + data.pointName + "</td>";
|
||||
html += "<td style='width: 140px;'>" + data.alarmTime.substring(0, 16) + "</td>";
|
||||
html += "<td title='" + data.describe + "' style='text-align: left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>" + data.describe + "</td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
|
||||
for (let i = 0; i < (5 - result.length); i++) {
|
||||
html += "<tr style='text-align: center;color: #ffffff;font-size: 14px;height: 20%;'>";
|
||||
html += "<td style='width: 80px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'></td>";
|
||||
html += "<td style='width: 140px;'></td>";
|
||||
html += "<td style='text-align: left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'></td>";
|
||||
html += "</tr>";
|
||||
}
|
||||
|
||||
$('#orderTable').html(html);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
} else if (st == '2') {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini"
|
||||
style="background: transparent;overflow: hidden;">
|
||||
<div class="wrapper" style="background: transparent;">
|
||||
<!-- 引用top -->
|
||||
<%-- <jsp:include page="/jsp/top.jsp"></jsp:include> --%>
|
||||
<!-- 菜单栏 -->
|
||||
<%-- <jsp:include page="/jsp/left.jsp"></jsp:include> --%>
|
||||
<div class="content-wrapper"
|
||||
style="background-size: 100% 100%;background: transparent;">
|
||||
<!-- Main content -->
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
|
||||
<div id="main">
|
||||
<div style="float: left;width: 100%;height:50px;">
|
||||
<div id="tab_ck_1"
|
||||
style="float: left;width: 25%;height:100%;display: block;position:relative;cursor: pointer;">
|
||||
<div style="float: left;left:0px;top:10px;width: 100%;height:23px;background: url(<%=request.getContextPath()%>/IMG/dataVisual/TAB底图.png);background-size: 100% 100%;position: absolute;">
|
||||
</div>
|
||||
<div style="float: left;width: 24px;height: 24px;left:8px;top:0px;position: absolute;">
|
||||
<svg t="1711070875654" class="icon" viewBox="0 0 1024 1024" p-id="5522" width="24" height="24">
|
||||
<path d="M790.87 666.95V456.08c0-144.36-102.62-264.33-236.2-285.65v-85.1h-85.33v85.12c-133.5 21.39-236.03 141.32-236.03 285.61 0 11.4-0.04 33.6-0.04 33.68v176.08c0 30.49-6.92 102.78-70.98 115.6L128 788.3v79.92h147.85l152.19 0.31c7.17 39.88 42.02 70.14 83.96 70.14 41.82 0 76.59-30.09 83.9-69.8l152.17 0.31H896v-79.92l-34.29-6.86c-63.94-12.81-70.85-84.95-70.84-115.45zM290.93 782.91c17.91-32.15 27.68-71.99 27.68-117.22V489.82s0.04-22.3 0.04-33.75c0-112.31 86.78-203.68 193.45-203.68s193.45 91.37 193.45 203.68V668.41c0.2 44.46 9.9 83.67 27.54 115.4l-442.16-0.9z"
|
||||
p-id="5523" fill="#D9F6FB"></path>
|
||||
<path d="M289.31 242.65l-54.35-65.78C134.44 259.91 76.8 382.25 76.8 512.5h85.33c0-104.72 46.36-203.08 127.18-269.85zM861.87 512.5h85.33c0-130.35-57.72-252.75-158.35-335.8l-54.32 65.81C815.45 309.3 861.87 407.7 861.87 512.5z"
|
||||
p-id="5524" fill="#D9F6FB"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 40px;height: 24px;left:45px;top:0px;position: absolute;color:#D9F6FB;font-size: 18px;letter-spacing: 0.45px;">
|
||||
报警
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">发生数:</div>
|
||||
<div class="alarmNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab_unck_1"
|
||||
style="float: left;width: 25%;height:100%;display: none;position:relative;cursor: pointer;"
|
||||
onclick="changeTab('1')">
|
||||
<div style="float: left;width: 24px;height: 24px;left:8px;top:0px;position: absolute;">
|
||||
<svg t="1711070875654" class="icon" viewBox="0 0 1024 1024" p-id="5522" width="24" height="24">
|
||||
<path d="M790.87 666.95V456.08c0-144.36-102.62-264.33-236.2-285.65v-85.1h-85.33v85.12c-133.5 21.39-236.03 141.32-236.03 285.61 0 11.4-0.04 33.6-0.04 33.68v176.08c0 30.49-6.92 102.78-70.98 115.6L128 788.3v79.92h147.85l152.19 0.31c7.17 39.88 42.02 70.14 83.96 70.14 41.82 0 76.59-30.09 83.9-69.8l152.17 0.31H896v-79.92l-34.29-6.86c-63.94-12.81-70.85-84.95-70.84-115.45zM290.93 782.91c17.91-32.15 27.68-71.99 27.68-117.22V489.82s0.04-22.3 0.04-33.75c0-112.31 86.78-203.68 193.45-203.68s193.45 91.37 193.45 203.68V668.41c0.2 44.46 9.9 83.67 27.54 115.4l-442.16-0.9z"
|
||||
p-id="5523" fill="#1AA9B0"></path>
|
||||
<path d="M289.31 242.65l-54.35-65.78C134.44 259.91 76.8 382.25 76.8 512.5h85.33c0-104.72 46.36-203.08 127.18-269.85zM861.87 512.5h85.33c0-130.35-57.72-252.75-158.35-335.8l-54.32 65.81C815.45 309.3 861.87 407.7 861.87 512.5z"
|
||||
p-id="5524" fill="#1AA9B0"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#1AA9B0;font-size: 18px;letter-spacing: 0.45px;">
|
||||
报警
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">发生数:</div>
|
||||
<div class="alarmNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tab_ck_2"
|
||||
style="float: left;width: 25%;height:100%;display: none;position:relative;cursor: pointer;">
|
||||
<div style="float: left;left:0px;top:10px;width: 100%;height:23px;background: url(<%=request.getContextPath()%>/IMG/dataVisual/TAB底图.png);background-size: 100% 100%;position: absolute;">
|
||||
</div>
|
||||
<div style="float: left;width: 24px;height: 24px;left:8px;top:0px;position: absolute;">
|
||||
<svg t="1711071429403" class="icon" viewBox="0 0 1024 1024" p-id="6633" width="24" height="24">
|
||||
<path d="M512 85.333333C277.333333 85.333333 85.333333 277.333333 85.333333 512s192 426.666667 426.666667 426.666667 426.666667-192 426.666667-426.666667S746.666667 85.333333 512 85.333333z m0 768c-187.733333 0-341.333333-153.6-341.333333-341.333333s153.6-341.333333 341.333333-341.333333 341.333333 153.6 341.333333 341.333333-153.6 341.333333-341.333333 341.333333z"
|
||||
fill="#D9F6FB" p-id="6634"></path>
|
||||
<path d="M512 665.6c-12.8 0-25.6 4.266667-34.133333 12.8-8.533333 8.533333-12.8 21.333333-12.8 34.133333 0 17.066667 4.266667 25.6 12.8 38.4 8.533333 8.533333 21.333333 12.8 38.4 12.8 12.8 0 25.6-4.266667 38.4-12.8 8.533333-8.533333 12.8-21.333333 12.8-38.4 0-12.8-4.266667-25.6-12.8-34.133333-17.066667-8.533333-29.866667-12.8-42.666667-12.8zM516.266667 256c-17.066667 0-29.866667 4.266667-38.4 17.066667-8.533333 12.8-12.8 25.6-12.8 42.666666 0 12.8 0 38.4 4.266666 68.266667l12.8 162.133333c4.266667 42.666667 12.8 64 34.133334 64s34.133333-21.333333 34.133333-59.733333l12.8-166.4c0-17.066667 4.266667-34.133333 4.266667-46.933333 0-25.6-4.266667-42.666667-8.533334-51.2-8.533333-21.333333-25.6-29.866667-42.666666-29.866667z"
|
||||
fill="#D9F6FB" p-id="6635"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#D9F6FB;font-size: 18px;letter-spacing: 0.45px;">
|
||||
异常
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">待处理:</div>
|
||||
<div class="YCDCLNum" style="float: left;">0</div>
|
||||
<div style="float: left;padding-left: 2px;">已完成:</div>
|
||||
<div class="YCYWCNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab_unck_2"
|
||||
style="float: left;width: 25%;height:100%;display: block;position:relative;cursor: pointer;"
|
||||
onclick="changeTab('2')">
|
||||
<div style="float: left;width: 24px;height: 24px;left:8px;top:0px;position: absolute;">
|
||||
<svg t="1711071429403" class="icon" viewBox="0 0 1024 1024" p-id="6633" width="24" height="24">
|
||||
<path d="M512 85.333333C277.333333 85.333333 85.333333 277.333333 85.333333 512s192 426.666667 426.666667 426.666667 426.666667-192 426.666667-426.666667S746.666667 85.333333 512 85.333333z m0 768c-187.733333 0-341.333333-153.6-341.333333-341.333333s153.6-341.333333 341.333333-341.333333 341.333333 153.6 341.333333 341.333333-153.6 341.333333-341.333333 341.333333z"
|
||||
fill="#1AA9B0" p-id="6634"></path>
|
||||
<path d="M512 665.6c-12.8 0-25.6 4.266667-34.133333 12.8-8.533333 8.533333-12.8 21.333333-12.8 34.133333 0 17.066667 4.266667 25.6 12.8 38.4 8.533333 8.533333 21.333333 12.8 38.4 12.8 12.8 0 25.6-4.266667 38.4-12.8 8.533333-8.533333 12.8-21.333333 12.8-38.4 0-12.8-4.266667-25.6-12.8-34.133333-17.066667-8.533333-29.866667-12.8-42.666667-12.8zM516.266667 256c-17.066667 0-29.866667 4.266667-38.4 17.066667-8.533333 12.8-12.8 25.6-12.8 42.666666 0 12.8 0 38.4 4.266666 68.266667l12.8 162.133333c4.266667 42.666667 12.8 64 34.133334 64s34.133333-21.333333 34.133333-59.733333l12.8-166.4c0-17.066667 4.266667-34.133333 4.266667-46.933333 0-25.6-4.266667-42.666667-8.533334-51.2-8.533333-21.333333-25.6-29.866667-42.666666-29.866667z"
|
||||
fill="#1AA9B0" p-id="6635"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#1AA9B0;font-size: 18px;letter-spacing: 0.45px;">
|
||||
异常
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">待处理:</div>
|
||||
<div class="YCDCLNum" style="float: left;">0</div>
|
||||
<div style="float: left;padding-left: 2px;">已完成:</div>
|
||||
<div class="YCYWCNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tab_ck_3"
|
||||
style="float: left;width: 25%;height:100%;display: none;position:relative;cursor: pointer;">
|
||||
<div style="float: left;left:0px;top:10px;width: 100%;height:23px;background: url(<%=request.getContextPath()%>/IMG/dataVisual/TAB底图.png);background-size: 100% 100%;position: absolute;">
|
||||
</div>
|
||||
<div style="float: left;width: 24px;height: 24px;left:8px;top:0px;position: absolute;">
|
||||
<svg t="1711073074065" class="icon" viewBox="0 0 1027 1024" p-id="7703" width="24" height="24">
|
||||
<path d="M835.707408 791.0893c8.945488 8.935549 8.945488 23.039602-0.268365 32.52182-8.667184 8.408759-22.771238 8.408759-31.99503-0.546669l-140.434229-140.145985c-8.667184-8.935549-8.667184-23.039602 0.546669-32.253456 8.677124-8.677124 23.317907-8.677124 32.531759 0L835.707408 791.0893zM773.625718 0c14.640783 0 29.55987 1.083398 44.190713 4.601957 15.455816 2.713465 29.54993 7.325361 43.107315 13.020655 18.974375 8.130455 28.198167 30.633328 19.789408 50.154372a39.638453 39.638453 0 0 1-7.86209 11.927318c-29.013201 29.003261-58.016462 57.748098-86.761299 86.751359l4.880261 17.354247 4.343532 17.622613 17.890977 4.88026 17.354247 4.611897c28.734897-29.003261 57.748098-57.479733 86.751359-86.761299 14.650722-14.909147 39.042087-14.909147 54.2196 0 4.343532 4.611896 7.593726 10.307191 9.223792 16.27085a195.558317 195.558317 0 0 1 11.658953 38.495418v0.546669h0.268365c2.703525 13.825749 4.343532 28.734897 4.343532 44.459078 0 60.998292-25.216338 117.116322-65.610188 157.788476-40.125485 40.39385-96.52182 65.341823-157.788477 65.341823-4.343532 0-8.677124-0.268365-13.020655-0.268364l-42.292282 41.745612L950.935238 721.145519l1.888492 2.166797a156.715018 156.715018 0 0 1 44.190713 109.254232c0 40.125485-15.177512 80.519335-46.089144 111.152663l-0.546669 0.546669c-30.901693 30.374903-70.490449 45.552415-110.615934 45.552415s-81.056065-15.177512-111.152663-46.099084l-233.159187-232.880882-237.741264 238.307812c-49.617642 49.607703-109.532536 53.951235-158.60351 32.810063-18.974375-7.86209-36.050318-19.789408-50.154371-33.893461h-0.268365c-14.094114-14.362479-25.753067-31.179997-33.615158-49.886007-21.141171-49.070974-16.807579-109.254232 33.078429-158.593571v-0.546669L313.290884 473.892219l-97.05855-97.058549-86.214629-25.753067a37.740022 37.740022 0 0 1-24.401305-21.419475L22.930269 135.822333c-7.593726-14.094114-5.148626-32.53176 6.778692-44.459078L64.407517 56.933064 98.569343 22.771238c10.575555-10.565616 27.114769-14.640783 41.755552-8.130455l196.283895 83.769529a37.571051 37.571051 0 0 1 21.68784 24.401305l25.484703 86.214629 97.058549 97.05855 69.675415-69.138686c-0.268365-4.880261-0.546669-9.492157-0.546668-13.010716h0.268364c0-62.08169 24.947973-118.19972 65.341824-158.325206v-0.278304c40.383911-40.115546 96.511881-65.331884 158.046901-65.331884z m-109.532536 542.752601l-114.402857 114.412797 232.602578 232.602578c15.455816 15.724181 36.865352 23.854636 57.469793 23.854636s41.487187-8.130455 56.943004-23.586271l0.536729-0.268365c15.724181-15.177512 23.049542-36.596987 23.049542-57.201428 0-20.067712-7.325361-40.39385-21.966144-55.581302l-1.620127-1.620127-232.612518-232.612518zM366.963814 420.209349l59.914894-59.636589-103.837242-104.105607a38.525237 38.525237 0 0 1-10.297251-18.974375l-22.502873-76.185743L134.082932 95.428483l-15.992545 15.72418-15.992546 16.260911 66.425222 156.158409 78.620903 23.049542c6.510328 1.898431 11.927318 5.148626 16.27085 10.028887L366.963814 420.209349zM768.208728 76.454108a146.248796 146.248796 0 0 0-98.688616 43.375679 145.562976 145.562976 0 0 0-43.37568 104.105607h0.546669v10.575555l1.083398 8.945488c2.703525 11.927318-1.083398 24.938034-10.30719 34.430191L102.097841 792.987731h-0.268364c-23.854636 24.669669-26.568101 52.599472-16.807579 75.639074 4.065228 8.935549 10.307191 17.890977 17.622612 25.474764 7.86209 7.593726 16.539214 13.557385 26.031371 17.622612 23.039602 10.028886 50.701041 7.315422 75.092406-16.539214l264.060879-264.05094 1.083398-1.083398 168.085728-168.354092 1.083398-1.351763 80.7877-80.250971h0.268364c7.86209-8.677124 20.067712-13.010716 32.263395-11.112284 3.796863 0.536729 7.315422 1.083398 11.390589 1.083398 2.703525 0.268365 6.500388 0.546669 10.84392 0.546669 40.672154 0 77.537506-16.539214 104.105606-42.560646v-0.546669c25.216338-24.938034 41.208883-59.914894 42.570586-98.688616-16.539214 16.807579-33.078428 33.078428-49.617643 50.154371-9.482218 10.565616-23.854636 14.909147-38.495418 11.658954l-38.495419-10.575556-39.042087-10.565615c-13.020655-3.528498-23.586271-13.020655-27.11477-27.11477l-10.297251-39.042087-10.575555-39.042087c-2.981829-11.927318-0.268365-26.568101 10.038826-36.060258 17.056065-17.344308 34.141948-34.420252 51.496195-51.774499z"
|
||||
fill="#D9F6FB" p-id="7704"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#D9F6FB;font-size: 18px;letter-spacing: 0.45px;">
|
||||
维修
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">待处理:</div>
|
||||
<div class="WXDCLNum" style="float: left;">0</div>
|
||||
<div style="float: left;padding-left: 2px;">已完成:</div>
|
||||
<div class="WXYWCNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab_unck_3"
|
||||
style="float: left;width: 25%;height:100%;display: block;position:relative;cursor: pointer;"
|
||||
onclick="changeTab('3')">
|
||||
<div style="float: left;width: 24px;height: 24px;left:8px;top:0px;position: absolute;">
|
||||
<svg t="1711073074065" class="icon" viewBox="0 0 1027 1024" p-id="7703" width="24" height="24">
|
||||
<path d="M835.707408 791.0893c8.945488 8.935549 8.945488 23.039602-0.268365 32.52182-8.667184 8.408759-22.771238 8.408759-31.99503-0.546669l-140.434229-140.145985c-8.667184-8.935549-8.667184-23.039602 0.546669-32.253456 8.677124-8.677124 23.317907-8.677124 32.531759 0L835.707408 791.0893zM773.625718 0c14.640783 0 29.55987 1.083398 44.190713 4.601957 15.455816 2.713465 29.54993 7.325361 43.107315 13.020655 18.974375 8.130455 28.198167 30.633328 19.789408 50.154372a39.638453 39.638453 0 0 1-7.86209 11.927318c-29.013201 29.003261-58.016462 57.748098-86.761299 86.751359l4.880261 17.354247 4.343532 17.622613 17.890977 4.88026 17.354247 4.611897c28.734897-29.003261 57.748098-57.479733 86.751359-86.761299 14.650722-14.909147 39.042087-14.909147 54.2196 0 4.343532 4.611896 7.593726 10.307191 9.223792 16.27085a195.558317 195.558317 0 0 1 11.658953 38.495418v0.546669h0.268365c2.703525 13.825749 4.343532 28.734897 4.343532 44.459078 0 60.998292-25.216338 117.116322-65.610188 157.788476-40.125485 40.39385-96.52182 65.341823-157.788477 65.341823-4.343532 0-8.677124-0.268365-13.020655-0.268364l-42.292282 41.745612L950.935238 721.145519l1.888492 2.166797a156.715018 156.715018 0 0 1 44.190713 109.254232c0 40.125485-15.177512 80.519335-46.089144 111.152663l-0.546669 0.546669c-30.901693 30.374903-70.490449 45.552415-110.615934 45.552415s-81.056065-15.177512-111.152663-46.099084l-233.159187-232.880882-237.741264 238.307812c-49.617642 49.607703-109.532536 53.951235-158.60351 32.810063-18.974375-7.86209-36.050318-19.789408-50.154371-33.893461h-0.268365c-14.094114-14.362479-25.753067-31.179997-33.615158-49.886007-21.141171-49.070974-16.807579-109.254232 33.078429-158.593571v-0.546669L313.290884 473.892219l-97.05855-97.058549-86.214629-25.753067a37.740022 37.740022 0 0 1-24.401305-21.419475L22.930269 135.822333c-7.593726-14.094114-5.148626-32.53176 6.778692-44.459078L64.407517 56.933064 98.569343 22.771238c10.575555-10.565616 27.114769-14.640783 41.755552-8.130455l196.283895 83.769529a37.571051 37.571051 0 0 1 21.68784 24.401305l25.484703 86.214629 97.058549 97.05855 69.675415-69.138686c-0.268365-4.880261-0.546669-9.492157-0.546668-13.010716h0.268364c0-62.08169 24.947973-118.19972 65.341824-158.325206v-0.278304c40.383911-40.115546 96.511881-65.331884 158.046901-65.331884z m-109.532536 542.752601l-114.402857 114.412797 232.602578 232.602578c15.455816 15.724181 36.865352 23.854636 57.469793 23.854636s41.487187-8.130455 56.943004-23.586271l0.536729-0.268365c15.724181-15.177512 23.049542-36.596987 23.049542-57.201428 0-20.067712-7.325361-40.39385-21.966144-55.581302l-1.620127-1.620127-232.612518-232.612518zM366.963814 420.209349l59.914894-59.636589-103.837242-104.105607a38.525237 38.525237 0 0 1-10.297251-18.974375l-22.502873-76.185743L134.082932 95.428483l-15.992545 15.72418-15.992546 16.260911 66.425222 156.158409 78.620903 23.049542c6.510328 1.898431 11.927318 5.148626 16.27085 10.028887L366.963814 420.209349zM768.208728 76.454108a146.248796 146.248796 0 0 0-98.688616 43.375679 145.562976 145.562976 0 0 0-43.37568 104.105607h0.546669v10.575555l1.083398 8.945488c2.703525 11.927318-1.083398 24.938034-10.30719 34.430191L102.097841 792.987731h-0.268364c-23.854636 24.669669-26.568101 52.599472-16.807579 75.639074 4.065228 8.935549 10.307191 17.890977 17.622612 25.474764 7.86209 7.593726 16.539214 13.557385 26.031371 17.622612 23.039602 10.028886 50.701041 7.315422 75.092406-16.539214l264.060879-264.05094 1.083398-1.083398 168.085728-168.354092 1.083398-1.351763 80.7877-80.250971h0.268364c7.86209-8.677124 20.067712-13.010716 32.263395-11.112284 3.796863 0.536729 7.315422 1.083398 11.390589 1.083398 2.703525 0.268365 6.500388 0.546669 10.84392 0.546669 40.672154 0 77.537506-16.539214 104.105606-42.560646v-0.546669c25.216338-24.938034 41.208883-59.914894 42.570586-98.688616-16.539214 16.807579-33.078428 33.078428-49.617643 50.154371-9.482218 10.565616-23.854636 14.909147-38.495418 11.658954l-38.495419-10.575556-39.042087-10.565615c-13.020655-3.528498-23.586271-13.020655-27.11477-27.11477l-10.297251-39.042087-10.575555-39.042087c-2.981829-11.927318-0.268365-26.568101 10.038826-36.060258 17.056065-17.344308 34.141948-34.420252 51.496195-51.774499z"
|
||||
fill="#1AA9B0" p-id="7704"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#1AA9B0;font-size: 18px;letter-spacing: 0.45px;">
|
||||
维修
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">待处理:</div>
|
||||
<div class="WXDCLNum" style="float: left;">0</div>
|
||||
<div style="float: left;padding-left: 2px;">已完成:</div>
|
||||
<div class="WXYWCNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tab_ck_4"
|
||||
style="float: left;width: 25%;height:100%;display: none;position:relative;cursor: pointer;">
|
||||
<div style="float: left;left:0px;top:10px;width: 100%;height:23px;background: url(<%=request.getContextPath()%>/IMG/dataVisual/TAB底图.png);background-size: 100% 100%;position: absolute;">
|
||||
</div>
|
||||
<div style="float: left;width: 24px;height: 24px;left:12px;top:0px;position: absolute;">
|
||||
<svg t="1711073426580" class="icon" viewBox="0 0 1024 1024" p-id="11471" width="24" height="24">
|
||||
<path d="M497.166 511.405L295.113 308.991l-88.4 88.554 290.453 290.976 449.64-450.433v329.799C897.583 815.392 512 1022.976 512 1022.976S126.419 815.392 77.194 567.888v-439.12S317.161 150.724 512 1.024C642.874 101.58 793.79 124.59 878.986 128.918l-381.82 382.487z"
|
||||
fill="#D9F6FB" p-id="11472"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#D9F6FB;font-size: 18px;letter-spacing: 0.45px;">
|
||||
保养
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">待处理:</div>
|
||||
<div class="BYDCLNum" style="float: left;">0</div>
|
||||
<div style="float: left;padding-left: 2px;">已完成:</div>
|
||||
<div class="BYYWCNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tab_unck_4"
|
||||
style="float: left;width: 25%;height:100%;display: block;position:relative;cursor: pointer;"
|
||||
onclick="changeTab('4')">
|
||||
<div style="float: left;width: 24px;height: 24px;left:12px;top:0px;position: absolute;">
|
||||
<svg t="1711073426580" class="icon" viewBox="0 0 1024 1024" p-id="11471" width="24" height="24">
|
||||
<path d="M497.166 511.405L295.113 308.991l-88.4 88.554 290.453 290.976 449.64-450.433v329.799C897.583 815.392 512 1022.976 512 1022.976S126.419 815.392 77.194 567.888v-439.12S317.161 150.724 512 1.024C642.874 101.58 793.79 124.59 878.986 128.918l-381.82 382.487z"
|
||||
fill="#1AA9B0" p-id="11472"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left;width: 100px;height: 24px;left:45px;top:0px;position: absolute;color:#1AA9B0;font-size: 18px;letter-spacing: 0.45px;">
|
||||
保养
|
||||
</div>
|
||||
<div style="float: left;width: 110px;height: 18px;left:8px;top:26px;position: absolute;color:#1AA9B0;font-size: 12px;">
|
||||
<div style="float: left;">待处理:</div>
|
||||
<div class="BYDCLNum" style="float: left;">0</div>
|
||||
<div style="float: left;padding-left: 2px;">已完成:</div>
|
||||
<div class="BYYWCNum" style="float: left;">0</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div style="float: left;width: 100%;height:calc((100% - 50px)*0.4);">
|
||||
<div id="barChart" style="width: 100%;height: 100%;"></div>
|
||||
</div>
|
||||
|
||||
<div style="float: left;width: 100%;height:calc((100% - 50px)*0.6);padding-left: 10px;padding-right: 10px;">
|
||||
<table id="orderTable" style="width: 100%;height: 100%;table-layout: fixed;"></table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
119
src/main/webapp/jsp/process/dataPatrolAdd.jsp
Normal file
119
src/main/webapp/jsp/process/dataPatrolAdd.jsp
Normal file
@ -0,0 +1,119 @@
|
||||
<%@ 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.data.DataCurve" %>
|
||||
<% request.setAttribute("Type_group", DataCurve.Type_group);%>
|
||||
<% request.setAttribute("Type_sys", DataCurve.Type_sys);%>
|
||||
<% request.setAttribute("Type_user", DataCurve.Type_user);%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm_Add").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm_Add").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataPatrol/doSave.do", $("#subForm_Add ").serialize(), function (result) {
|
||||
var data = $.parseJSON(result);
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
// showAlert('s','保存成功');
|
||||
} else {
|
||||
showAlert('d', result.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm_interfaceAdd").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
if ($('#type').val() == 0) {
|
||||
$('#mpid').hide()
|
||||
$('#mpidtag').hide()
|
||||
} else {
|
||||
$('#mpid').show()
|
||||
$('#mpidtag').show()
|
||||
}
|
||||
$('#type').change(function () {
|
||||
if ($('#type').val() == 0) {
|
||||
$('#mpid').hide()
|
||||
$('#mpidtag').hide()
|
||||
} else {
|
||||
$('#mpid').show()
|
||||
$('#mpidtag').show()
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
var selectMPint = function(pid) {
|
||||
$.post(ext.contextPath + '/work/mpoint/showlistForSelect.do', {formId:'subForm_Add',hiddenId:'mpid',codeId:'mpcode',textId:'name', valueId :'value',mpid:$("#mpid").val()} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
</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="dosave()" 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="subForm_Add">
|
||||
<input id="unitId" name="unitId" type="hidden" value="${param.unitId}"/>
|
||||
<input id="pid" name="pid" type="hidden" value="${pid}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">节点类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2">
|
||||
<option value="0">节点</option>
|
||||
<option value="1">测量点节点</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序">
|
||||
</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="name" name="name" placeholder="名称">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label" id="mpidtag">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name="mpid" onclick="selectMPint()" placeholder="测量点" readonly>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
374
src/main/webapp/jsp/process/dataPatrolCurve.jsp
Normal file
374
src/main/webapp/jsp/process/dataPatrolCurve.jsp
Normal file
@ -0,0 +1,374 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
var beginTimeStore1 = '';
|
||||
var endTimeStore1 = '';
|
||||
|
||||
function initDate() {
|
||||
//定义locale汉化插件
|
||||
beginTimeStore1 = moment().subtract(7, 'days').format('YYYY-MM-DD HH:mm');
|
||||
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
|
||||
var locale = {
|
||||
"format": 'YYYY-MM-DD HH:mm',
|
||||
"separator": " ~ ",
|
||||
"applyLabel": "确定",
|
||||
"cancelLabel": "取消",
|
||||
"fromLabel": "起始时间",
|
||||
"toLabel": "结束时间'",
|
||||
"customRangeLabel": "自定义",
|
||||
"weekLabel": "W",
|
||||
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
|
||||
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
|
||||
"firstDay": 1
|
||||
};
|
||||
$('#reservationtime').daterangepicker({
|
||||
"timePicker": true,
|
||||
"timePicker24Hour": true,
|
||||
"linkedCalendars": false,
|
||||
"autoUpdateInput": false,
|
||||
"timePickerIncrement": 10,
|
||||
"locale": locale,
|
||||
//汉化按钮部分
|
||||
ranges: {
|
||||
// '今日': [moment(), moment().subtract(-1, 'days')],
|
||||
'昨日': [moment().subtract(1, 'days'), moment()],
|
||||
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
|
||||
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
|
||||
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
|
||||
},
|
||||
startDate: beginTimeStore1,
|
||||
endDate: endTimeStore1
|
||||
}, function (start, end, label) {
|
||||
beginTimeStore1 = start.format(this.locale.format);
|
||||
endTimeStore1 = end.format(this.locale.format);
|
||||
if (!this.startDate) {
|
||||
this.element.val('');
|
||||
} else {
|
||||
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
|
||||
}
|
||||
});
|
||||
$('#reservationtime').val(beginTimeStore1 + locale.separator + endTimeStore1);
|
||||
};
|
||||
|
||||
|
||||
var color = [
|
||||
"#2ec7c9",
|
||||
"#b6a2de",
|
||||
"#5ab1ef",
|
||||
"#ffb980",
|
||||
"#d87a80",
|
||||
"#8d98b3",
|
||||
"#e5cf0d",
|
||||
"#97b552",
|
||||
"#95706d",
|
||||
"#dc69aa",
|
||||
"#07a2a4",
|
||||
"#9a7fd1",
|
||||
"#588dd5",
|
||||
"#f5994e",
|
||||
"#c05050",
|
||||
"#59678c",
|
||||
"#c9ab00",
|
||||
"#7eb00a",
|
||||
"#6f5553",
|
||||
"#c14089"
|
||||
];
|
||||
|
||||
let myChart1 = "";
|
||||
let option1 = [];
|
||||
|
||||
let myChart2 = "";
|
||||
let option2 = [];
|
||||
let source2Data = [];
|
||||
function getdata() {
|
||||
$.post(ext.contextPath + '/process/dataPatrol/getDetailData.do', {
|
||||
mpcode: "${param.mpcode}",
|
||||
sdt: beginTimeStore1,
|
||||
edt: endTimeStore1,
|
||||
unitId: unitId
|
||||
}, function (result) {
|
||||
// console.log(result);
|
||||
let outData = result[0];
|
||||
let name = outData.name;
|
||||
let legend1Data = [];
|
||||
legend1Data.push(name);
|
||||
option1.legend.name = legend1Data;
|
||||
option1.series[0].name = name;
|
||||
option1.series[0].data = outData.data;
|
||||
// console.log(option1);
|
||||
myChart1.setOption(option1, true);
|
||||
|
||||
source2Data = [];
|
||||
// console.log(option2);
|
||||
option2.dataset[0].source[0]=outData.data2;
|
||||
option2.dataset[1].transform.config.itemNameFormatter = name;
|
||||
myChart2.setOption(option2, true);
|
||||
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function getEcharts1() {
|
||||
let series = [];
|
||||
let yAxis = [];
|
||||
let legenddata = [];
|
||||
|
||||
series.push({
|
||||
symbol: 'none',
|
||||
type: 'line',
|
||||
lineStyle: {
|
||||
name:"",
|
||||
width: 2
|
||||
},
|
||||
markPoint: {
|
||||
data: [
|
||||
{type: 'max', name: '最大值'},
|
||||
{type: 'min', name: '最小值'}
|
||||
]
|
||||
},
|
||||
markLine: {
|
||||
data: [
|
||||
{type: 'average', name: '平均值'}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
document.getElementById("chart1").removeAttribute("_echarts_instance_");
|
||||
myChart1 = echarts.init(document.getElementById("chart1"));
|
||||
yAxis.push({
|
||||
type: 'value',
|
||||
name: false,
|
||||
splitLine: {
|
||||
show: false//是否显示分隔线。默认数值轴显示,类目轴不显示。
|
||||
},
|
||||
scale: true//设置成 true 后坐标刻度不会强制包含零刻度。
|
||||
});
|
||||
option1 = {
|
||||
color: color,
|
||||
animation: false,
|
||||
legend: {
|
||||
left: 'center'
|
||||
},
|
||||
grid: {
|
||||
left: '4%', // 与容器左侧的距离
|
||||
right: '4%', // 与容器右侧的距离
|
||||
top: '8%', // 与容器顶部的距离
|
||||
//bottom: '5%', // 与容器底部的距离
|
||||
containLabel: true
|
||||
},
|
||||
toolbox: {
|
||||
feature: {
|
||||
saveAsImage: {show: true}
|
||||
}
|
||||
},
|
||||
xAxis: {
|
||||
type: 'time'
|
||||
},
|
||||
yAxis: yAxis,
|
||||
series: series,
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
formatter: function (params, ticket, callback) {
|
||||
var htmlStr = '';
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
var param = params[i];
|
||||
// console.log(param);
|
||||
var xName = param.name;//x轴的名称
|
||||
var seriesName = param.seriesName;//图例名称
|
||||
var xvalue = param.value[0];//x轴值
|
||||
var yvalue = param.value[1];//y轴值
|
||||
var remarkvalue = param.value[2];//备注轴值
|
||||
var color = param.color;//图例颜色
|
||||
var dataIndex = param.dataIndex;
|
||||
var seriesIndex = param.seriesIndex;
|
||||
htmlStr += '<div>';
|
||||
htmlStr += xvalue + '<br/>';
|
||||
htmlStr += '<span style="margin-right:5px;display:inline-block;width:10px;height:10px;border-radius:5px;background-color:' + color + ';"></span>';
|
||||
htmlStr += seriesName + ':' + yvalue + '';
|
||||
htmlStr += '</div>';
|
||||
}
|
||||
return htmlStr;
|
||||
}
|
||||
// alwaysShowContent:true,
|
||||
},
|
||||
dataZoom: [{
|
||||
type: 'inside',
|
||||
start: 0,
|
||||
end: 100
|
||||
}, {
|
||||
start: 0,
|
||||
end: 100,
|
||||
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
|
||||
handleSize: '60%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
}
|
||||
}]
|
||||
};
|
||||
myChart1.setOption(option1, true);
|
||||
}
|
||||
|
||||
function getEcharts2() {
|
||||
document.getElementById("chart2").removeAttribute("_echarts_instance_");
|
||||
myChart2 = echarts.init(document.getElementById("chart2"));
|
||||
|
||||
option2 = {
|
||||
title: [
|
||||
{
|
||||
text: '最大值: Q3 + 1.5 * IQR;最小值: Q1 - 1.5 * IQR',
|
||||
borderColor: '#999',
|
||||
borderWidth: 1,
|
||||
textStyle: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 14,
|
||||
lineHeight: 20
|
||||
},
|
||||
left: '10%',
|
||||
top: '95%'
|
||||
}
|
||||
],
|
||||
dataset: [
|
||||
{
|
||||
// prettier-ignore
|
||||
source: [
|
||||
source2Data
|
||||
]
|
||||
},
|
||||
{
|
||||
transform: {
|
||||
type: 'boxplot',
|
||||
config: {itemNameFormatter: ''}
|
||||
}
|
||||
},
|
||||
{
|
||||
fromDatasetIndex: 1,
|
||||
fromTransformResult: 1
|
||||
}
|
||||
],
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
left: '5%',
|
||||
right: '5%',
|
||||
bottom: '10%'
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: true,
|
||||
nameGap: 30,
|
||||
splitArea: {
|
||||
show: false
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
name: '',
|
||||
splitArea: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '盒须图',
|
||||
type: 'boxplot',
|
||||
datasetIndex: 1,
|
||||
tooltip: {
|
||||
formatter: function (param) {
|
||||
return [
|
||||
'最大值: ' + param.data[5],
|
||||
'上四分位数: ' + param.data[4],
|
||||
'中位数: ' + param.data[3],
|
||||
'下四分位数: ' + param.data[2],
|
||||
'最小值: ' + param.data[1]
|
||||
].join('<br/>');
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '界外值',
|
||||
type: 'scatter',
|
||||
datasetIndex: 2
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart2.setOption(option2, true);
|
||||
}
|
||||
|
||||
$(function () {
|
||||
var windowhight = $(window).height();
|
||||
var windowwidth = $(window).width();
|
||||
$('#chart1').css("width", (windowwidth - 100) + "px");
|
||||
$('#chart1').css("height", (windowhight - 200) + "px");
|
||||
$('#chart2').css("width", (windowwidth - 100) + "px");
|
||||
$('#chart2').css("height", (windowhight - 200) + "px");
|
||||
initDate();
|
||||
getEcharts1();
|
||||
getEcharts2();
|
||||
getdata();
|
||||
});
|
||||
|
||||
function doCurveSearch() {
|
||||
getdata();
|
||||
}
|
||||
|
||||
let nowCurveType = 0;
|
||||
|
||||
function changeCurveType() {
|
||||
if (nowCurveType == 0) {
|
||||
nowCurveType = 1;
|
||||
$('#chart1').css("display", "none");
|
||||
$('#chart2').css("display", "block");
|
||||
} else {
|
||||
nowCurveType = 0;
|
||||
$('#chart2').css("display", "none");
|
||||
$('#chart1').css("display", "block");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="curveModal">
|
||||
<div style="padding: 20px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">历史曲线</h4>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div style="float: left;width: 100%;">
|
||||
<input type="text" class="form-control pull-left" id="reservationtime" style="width:270px">
|
||||
<div class="input-group-btn pull-left">
|
||||
<button type="button" class="btn btn-default" onclick="doCurveSearch();"><i
|
||||
class="fa fa-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
<div class="input-group-btn pull-left" style="margin-left: 80px;">
|
||||
<button type="button" class="btn btn-default" onclick="changeCurveType();">切换
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="chart1" style="float: left;display: block;"></div>
|
||||
<div id="chart2" style="float: left;display: none;"></div>
|
||||
</div>
|
||||
<div class="modal-footer" style="border-top: 0px;">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
156
src/main/webapp/jsp/process/dataPatrolEdit.jsp
Normal file
156
src/main/webapp/jsp/process/dataPatrolEdit.jsp
Normal file
@ -0,0 +1,156 @@
|
||||
<%@ 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.data.DataCurve" %>
|
||||
<% request.setAttribute("Type_group", DataCurve.Type_group);%>
|
||||
<% request.setAttribute("Type_sys", DataCurve.Type_sys);%>
|
||||
<% request.setAttribute("Type_user", DataCurve.Type_user);%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
|
||||
.select2-selection__arrow {
|
||||
margin-top: 3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm_Edit").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm_Edit").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataPatrol/doUpdate.do", $("#subForm_Edit").serialize(), function (result) {
|
||||
var data= $.parseJSON(result);
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
// showAlert('s','保存成功');
|
||||
} else {
|
||||
showAlert('d', data.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function dodel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataPatrol/doDel.do', $("#subForm_Edit").serialize(), function (result) {
|
||||
if (result.code == 1) {
|
||||
console.log(222)
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', result.msg);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#subForm_Edit").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
if ($('#type').val() == 0) {
|
||||
$('#mpid').hide()
|
||||
$('#mpidtag').hide()
|
||||
} else {
|
||||
$('#mpid').show()
|
||||
$('#mpidtag').show()
|
||||
}
|
||||
});
|
||||
$('#type').change(function () {
|
||||
if ($('#type').val() == 0) {
|
||||
$('#mpid').hide()
|
||||
$('#mpidtag').hide()
|
||||
} else {
|
||||
$('#mpid').show()
|
||||
$('#mpidtag').show()
|
||||
}
|
||||
})
|
||||
|
||||
var selectMPint = function(pid) {
|
||||
$.post(ext.contextPath + '/work/mpoint/showlistForSelect.do', {formId:'subForm_Add',hiddenId:'mpid',codeId:'mpcode',textId:'name', valueId :'value',mpid:$("#mpid").val()} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
</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="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
||||
class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal " id="subForm_Edit">
|
||||
<input id="id" name="id" type="hidden" value="${dataPatrol.id}"/>
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">节点类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2">
|
||||
<option value="0" <c:if test="${dataPatrol.type==0}">selected</c:if>>节点</option>
|
||||
<option value="1" <c:if test="${dataPatrol.type==1}">selected</c:if>>测量点节点</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序" value="${dataPatrol.morder}">
|
||||
</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="name" name="name" placeholder="名称" value="${dataPatrol.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label" id="mpidtag">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name="mpid" onclick="selectMPint()" placeholder="测量点" readonly value="${dataPatrol.mpid}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
121
src/main/webapp/jsp/process/dataPatrolList.jsp
Normal file
121
src/main/webapp/jsp/process/dataPatrolList.jsp
Normal file
@ -0,0 +1,121 @@
|
||||
<%@ 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 editFun = function (id) {
|
||||
console.log(11111)
|
||||
$.post(ext.contextPath + '/process/dataPatrol/showEdit.do', {id: id}, function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
function choiceModel(id, text) {
|
||||
$('#modelId').val(id);//给型号id赋值
|
||||
//$('#faultId').val('');//清除用于大修内容的id
|
||||
$('#modelNameId').html(text);
|
||||
|
||||
repairFun();
|
||||
}
|
||||
|
||||
var initTreeView = function (id) {
|
||||
$.post(ext.contextPath + '/process/dataPatrol/getTreeJson1.do ', {unitId: unitId}, function (data) {
|
||||
var treeData = data;
|
||||
$('#tree').treeview({data: treeData});
|
||||
$('#tree').on('nodeSelected', function (event, treeData) {
|
||||
editFun(treeData.id);
|
||||
});
|
||||
}, 'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
$(function () {
|
||||
//alert(unitId);
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
//新增
|
||||
function doadd() {
|
||||
var node=$('#tree').treeview('getSelected');
|
||||
var pid="";
|
||||
if(node!=null && node.length>0){
|
||||
pid=node[0].id;
|
||||
console.log(node[0])
|
||||
}else{
|
||||
pid="-1";
|
||||
}
|
||||
$.post(ext.contextPath + '/process/dataPatrol/showAdd.do', {unitId:unitId,pid:pid} , function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body 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>
|
||||
<!-- <li class="active">Here</li> -->
|
||||
</ol>
|
||||
</section>
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
<div id="configEditsubDiv"></div>
|
||||
<div id="configsubDiv"></div>
|
||||
<div id="pointEditsubDiv"></div>
|
||||
<div id="mpSubDiv"></div>
|
||||
<div id="pointsubDiv"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">运行巡视节点树</h3>
|
||||
<div class="box-tools" id="addDiv">
|
||||
<button type="button" class="btn btn-box-tool" onclick="doadd();"><i
|
||||
class="fa fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:700px;overflow:auto; "></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
634
src/main/webapp/jsp/process/dataPatrolNewView.jsp
Normal file
634
src/main/webapp/jsp/process/dataPatrolNewView.jsp
Normal file
@ -0,0 +1,634 @@
|
||||
<%@ 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" %>
|
||||
<%--<%String contextPath = request.getContextPath();%>--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
// let windowHeight = $(window).height();
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataPatrol/getResultDataNewTime.do",
|
||||
// dataType: 'json',
|
||||
data: {
|
||||
unitId: unitId
|
||||
},
|
||||
async: true,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data)
|
||||
$('#newRTime').text(data);
|
||||
}
|
||||
});
|
||||
|
||||
// $('#main').css("height", (windowHeight - 30) + "px");
|
||||
// let nowWidth = $("#main").width();
|
||||
// let widthNum = parseInt(nowWidth / 340);
|
||||
// let widthDiff = nowWidth - widthNum * 340;
|
||||
// let widthDiffPx = widthDiff / (widthNum - 1);
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataPatrol/getTreeJson.do",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
unitId: unitId
|
||||
},
|
||||
async: true,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
|
||||
let typeNum1 = 0;//正常
|
||||
let typeNum2 = 0;//数据中断
|
||||
let typeNum3 = 0;//数据停滞
|
||||
let typeNum4 = 0;//数据超限(上限,下限)
|
||||
let typeNum5 = 0;//异常趋势
|
||||
|
||||
if (data.length > 0) {
|
||||
|
||||
let barNum = 0;
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let mainContent = data[i];
|
||||
// console.log(mainContent)
|
||||
let mainName = mainContent.text;
|
||||
// let rows = 1;
|
||||
// if (mainContent.nodes != null) {
|
||||
// rows = Math.ceil((mainContent.nodes.length / 4));
|
||||
// }
|
||||
// let totalHeight = (rows + 1) * 50;
|
||||
// if (totalHeight < 200) {
|
||||
// totalHeight = 200;
|
||||
// }
|
||||
|
||||
// let ckMStyle = "";
|
||||
// if (Number(barNum) > (widthNum - 1)) {
|
||||
// barNum = 0;
|
||||
// }
|
||||
// if (barNum != 0) {
|
||||
// ckMStyle += "margin-left:" + widthDiffPx + "px;";
|
||||
// }
|
||||
// if (Number(barNum) == (widthNum - 1)) {
|
||||
// barNum = 0;
|
||||
// } else {
|
||||
// barNum++;
|
||||
// }
|
||||
|
||||
|
||||
// let widthPx = 340;
|
||||
// let divWidthNum = 1;
|
||||
let detailContentHtml = "";
|
||||
let rows = 1;
|
||||
if (mainContent.nodes != null) {
|
||||
rows = Math.ceil((mainContent.nodes.length / 4));
|
||||
}
|
||||
let totalHeight = (rows + 1) * 50;
|
||||
if (totalHeight < 200) {
|
||||
totalHeight = 200;
|
||||
}
|
||||
|
||||
detailContentHtml += "<div style='float: left;width:100%;height: " + totalHeight + "px;margin-top: 15px;background: #ffffff;border-radius: 8px;' >";
|
||||
// detailContentHtml += "<div style='float: left;width:100%;height: 50px;padding-left: 20px;line-height: 50px;color: #40a3ff;font-size: 24px;' >" + mainName + "</div>";
|
||||
detailContentHtml += "<div style='float: left;width: 100%;height:4px;border:1px solid #d7dbe2;background: #5c9fd1;border-radius: 4px 4px 0px 0px;'></div>";
|
||||
detailContentHtml += "<div style='float: left;width: 100%;height:40px;border-bottom:1px solid #d7dbe2;line-height: 40px;font-size: 16px;padding-left: 20px;'>" + mainName + "</div>";
|
||||
|
||||
|
||||
if (mainContent.nodes != null) {
|
||||
let detailContents = mainContent.nodes;
|
||||
|
||||
for (let j = 0; j < detailContents.length; j++) {
|
||||
let detailContent = detailContents[j];
|
||||
let detailName = detailContent.text;
|
||||
let resultColor = "#00FF80";
|
||||
// if (detailContent.resultColor != null) {
|
||||
// resultColor = detailContent.resultColor;
|
||||
// }
|
||||
let mpid = "";
|
||||
if (detailContent.mpid != null) {
|
||||
mpid = detailContent.mpid;
|
||||
}
|
||||
let value = "";
|
||||
if (detailContent.value != null) {
|
||||
value = detailContent.value;
|
||||
}
|
||||
let unit = "";
|
||||
if (detailContent.unit != null) {
|
||||
unit = detailContent.unit;
|
||||
}
|
||||
|
||||
if (detailContent.resultType != null) {
|
||||
let resultType = detailContent.resultType;
|
||||
if (resultType == '0') {
|
||||
typeNum1++;
|
||||
resultColor = "#00FF80";
|
||||
} else if (resultType == '1') {
|
||||
typeNum2++;
|
||||
resultColor = "#C40000";
|
||||
} else if (resultType == '2') {
|
||||
typeNum3++;
|
||||
resultColor = "#8F4300";
|
||||
} else if (resultType == '3') {
|
||||
typeNum4++;
|
||||
resultColor = "#FF6F00";
|
||||
} else if (resultType == '4') {
|
||||
typeNum4++;
|
||||
resultColor = "#FF6F00";
|
||||
} else if (resultType == '5') {
|
||||
typeNum5++;
|
||||
resultColor = "#FFCC00";
|
||||
}
|
||||
}
|
||||
|
||||
detailContentHtml += "<div style='float: left;width:25%;height: 50px;padding-left: 30px;padding-right: 10px;line-height: 50px;color: #bcbcbc;font-size: 24px;' >";
|
||||
|
||||
detailContentHtml += "<div style='float:left;width: 22px;padding-top: 14px;'>";
|
||||
detailContentHtml += "<div style='float:left;width: 22px;height: 22px;background: " + resultColor + ";border-radius: 50%;'></div>";
|
||||
detailContentHtml += "</div>";
|
||||
detailContentHtml += "<div style='float:left;width: calc((100% - 52px)*0.5);height: 100%;padding-left: 10px;'>" + detailName + "</div>";
|
||||
detailContentHtml += "<div style='float:left;width: calc((100% - 52px)*0.5);height: 100%;padding-left: 10px;'>" + value + "" + unit + "</div>";
|
||||
detailContentHtml += "<div style='float:left;width: 30px;'>";
|
||||
detailContentHtml += "<i style='cursor: pointer;' class='fa fa-line-chart' onclick=\"showCurve('" + mpid + "');\"></i>";
|
||||
detailContentHtml += "</div>";
|
||||
|
||||
detailContentHtml += "</div>";
|
||||
|
||||
|
||||
<%--if ((detailContents.length % 7) == 0) {--%>
|
||||
<%-- divWidthNum = parseInt(detailContents.length / 7);--%>
|
||||
<%--} else {--%>
|
||||
<%-- divWidthNum = parseInt(detailContents.length / 7) + 1;--%>
|
||||
<%--}--%>
|
||||
<%--if (detailContents.length > 7) {--%>
|
||||
<%-- widthPx = 340 * divWidthNum + widthDiffPx;--%>
|
||||
<%-- barNum++;--%>
|
||||
<%--}--%>
|
||||
|
||||
<%--for (let n = 0; n < divWidthNum; n++) {--%>
|
||||
<%-- detailContentHtml += "<div style='float: left;width: " + (100 / divWidthNum) + "%;height:100%;'>";--%>
|
||||
<%-- let jNum = 7;--%>
|
||||
<%-- if (n == (divWidthNum - 1)) {--%>
|
||||
<%-- jNum = detailContents.length - n * 7;--%>
|
||||
<%-- }--%>
|
||||
<%-- for (let j = n * 7; j < n * 7 + jNum; j++) {--%>
|
||||
<%-- let detailContent = detailContents[j];--%>
|
||||
<%-- let detailName = detailContent.text;--%>
|
||||
<%-- let value = detailContent.value;--%>
|
||||
<%-- let unit = " ";--%>
|
||||
<%-- if (detailContent.unit != null) {--%>
|
||||
<%-- unit = detailContent.unit;--%>
|
||||
<%-- }--%>
|
||||
<%-- // let resultColor = "#ECF0F5";--%>
|
||||
<%-- // if (detailContent.resultColor != null) {--%>
|
||||
<%-- // resultColor = detailContent.resultColor;--%>
|
||||
<%-- // }--%>
|
||||
<%-- let mpid = "";--%>
|
||||
<%-- if (detailContent.mpid != null) {--%>
|
||||
<%-- mpid = detailContent.mpid;--%>
|
||||
<%-- }--%>
|
||||
<%-- let valueStyle = "";--%>
|
||||
<%-- if (detailContent.resultType != null) {--%>
|
||||
<%-- let resultType = detailContent.resultType;--%>
|
||||
<%-- if (resultType == '0') {--%>
|
||||
<%-- typeNum1++;--%>
|
||||
<%-- } else if (resultType == '1') {--%>
|
||||
<%-- valueStyle = "color: #FFFFFF;background-color: #C40000;border: 1px solid #ff0000;border-radius: 4px;";--%>
|
||||
<%-- typeNum2++;--%>
|
||||
<%-- } else if (resultType == '2') {--%>
|
||||
<%-- valueStyle = "color: #FFFFFF;background-color: #8F4300;border: 1px solid #9E3F00;border-radius: 4px;";--%>
|
||||
<%-- typeNum3++;--%>
|
||||
<%-- } else if (resultType == '3') {--%>
|
||||
<%-- valueStyle = "color: #FFFFFF;background-color: #FF6F00;border: 1px solid #F69C00;border-radius: 4px;";--%>
|
||||
<%-- typeNum4++;--%>
|
||||
<%-- } else if (resultType == '4') {--%>
|
||||
<%-- valueStyle = "color: #FFFFFF;background-color: #FF6F00;border: 1px solid #F69C00;border-radius: 4px;";--%>
|
||||
<%-- typeNum4++;--%>
|
||||
<%-- } else if (resultType == '5') {--%>
|
||||
<%-- valueStyle = "color: #FFFFFF;background-color: #FFCC00;border: 1px solid #FFDD00;border-radius: 4px;";--%>
|
||||
<%-- typeNum5++;--%>
|
||||
<%-- }--%>
|
||||
<%-- }--%>
|
||||
|
||||
<%-- detailContentHtml += "<div style='float: left;width: 100%;height:42px;padding-left: 15px;padding-right: 15px;text-align: center;line-height: 42px;'>";--%>
|
||||
<%-- detailContentHtml += "<div title='" + detailName + "' style='float: left;width: 110px;height:100%;color: #B9B9B9;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;'>" + detailName + "</div>";--%>
|
||||
<%-- detailContentHtml += "<div title='" + value + "' style='float: left;width: 90px;height:100%;padding: 5px 5px 5px 5px;'><div style='float: left;width: 100%;height:100%;line-height: 32px;font-weight: 700;overflow: hidden;text-overflow:ellipsis;white-space:nowrap;" + valueStyle + "'>" + value + "</div></div>";--%>
|
||||
<%-- detailContentHtml += "<div style='float: left;width: 50px;height:100%;color: #B9B9B9;'>" + unit + "</div>";--%>
|
||||
<%-- detailContentHtml += "<div onclick=\"showCurve('" + mpid + "');\" style='float: left;width: 20px;height:20px;margin-top:11px;margin-left:5px;background:url(<%=request.getContextPath()%>/IMG/digitalProcess/curve.png);background-size: 100% 100%;cursor: pointer'></div>";--%>
|
||||
<%-- detailContentHtml += "<div style='float: left;width: 20px;height:20px;margin-top:11px;margin-left:5px;background:url(<%=request.getContextPath()%>/IMG/digitalProcess/limite.png);background-size: 100% 100%;cursor: pointer;'></div>";--%>
|
||||
<%-- detailContentHtml += "</div>";--%>
|
||||
|
||||
<%-- }--%>
|
||||
<%-- detailContentHtml += "</div>";--%>
|
||||
<%--}--%>
|
||||
}
|
||||
}
|
||||
|
||||
detailContentHtml += "</div>";
|
||||
$('#content').append(detailContentHtml);
|
||||
|
||||
// let ckhtml = "";
|
||||
|
||||
// ckhtml += "<div style='float: left;width:" + widthPx + "px;height: 352px;border:1px solid #d7dbe2;background: #ffffff;border-radius: 4px;margin-top: 10px;" + ckMStyle + "'>";
|
||||
// ckhtml += "<div style='float: left;width: 100%;height:4px;border:1px solid #d7dbe2;background: #5c9fd1;border-radius: 4px 4px 0px 0px;'></div>";
|
||||
// ckhtml += "<div style='float: left;width: 100%;height:40px;border-bottom:1px solid #d7dbe2;line-height: 40px;font-size: 16px;padding-left: 20px;'>" + mainName + "</div>";
|
||||
// ckhtml += "" + detailContentHtml + "";
|
||||
// ckhtml += "</div>";
|
||||
|
||||
// $('#content').append(ckhtml);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$('#typeNum2').text(typeNum2);
|
||||
$('#typeNum3').text(typeNum3);
|
||||
$('#typeNum4').text(typeNum4);
|
||||
$('#typeNum5').text(typeNum5);
|
||||
|
||||
let nowTime = getNowTime();
|
||||
let lastMonth = getPlusTime(nowTime, "-1", "month");
|
||||
|
||||
let nowMonth_typeNum2 = 0;
|
||||
let nowMonth_typeNum3 = 0;
|
||||
let nowMonth_typeNum4 = 0;
|
||||
let nowMonth_typeNum5 = 0;
|
||||
let lastMonth_typeNum2 = 0;
|
||||
let lastMonth_typeNum3 = 0;
|
||||
let lastMonth_typeNum4 = 0;
|
||||
let lastMonth_typeNum5 = 0;
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataPatrol/getViewMonthData.do",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
unitId: unitId,
|
||||
inDate: nowTime
|
||||
},
|
||||
async: false,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let content = data[i];
|
||||
if (content.result == '1') {
|
||||
nowMonth_typeNum2 = content.num;
|
||||
} else if (content.result == '2') {
|
||||
nowMonth_typeNum3 = content.num;
|
||||
} else if (content.result == '3') {
|
||||
nowMonth_typeNum4 += content.num;
|
||||
} else if (content.result == '4') {
|
||||
nowMonth_typeNum4 += content.num;
|
||||
} else if (content.result == '5') {
|
||||
nowMonth_typeNum5 = content.num;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataPatrol/getViewMonthData.do",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
unitId: unitId,
|
||||
inDate: lastMonth
|
||||
},
|
||||
async: false,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data)
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let content = data[i];
|
||||
if (content.result == '1') {
|
||||
lastMonth_typeNum2 = content.num;
|
||||
} else if (content.result == '2') {
|
||||
lastMonth_typeNum3 = content.num;
|
||||
} else if (content.result == '3') {
|
||||
lastMonth_typeNum4 += content.num;
|
||||
} else if (content.result == '4') {
|
||||
lastMonth_typeNum4 += content.num;
|
||||
} else if (content.result == '5') {
|
||||
lastMonth_typeNum5 = content.num;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataPatrol/getViewYearData.do",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
unitId: unitId,
|
||||
inDate: nowTime
|
||||
},
|
||||
async: true,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data)
|
||||
let out1 = data[0];
|
||||
let out2 = data[1];
|
||||
let out3 = data[2];
|
||||
let out4 = data[3];
|
||||
let xdata = data[4];
|
||||
getChart2(out1, out2, out3, out4,xdata);
|
||||
}
|
||||
});
|
||||
|
||||
$('#nowMonth_typeNum2').text(nowMonth_typeNum2 + "次");
|
||||
$('#nowMonth_typeNum3').text(nowMonth_typeNum3 + "次");
|
||||
$('#nowMonth_typeNum4').text(nowMonth_typeNum4 + "次");
|
||||
$('#nowMonth_typeNum5').text(nowMonth_typeNum5 + "次");
|
||||
$('#lastMonth_typeNum2').text(lastMonth_typeNum2 + "次");
|
||||
$('#lastMonth_typeNum3').text(lastMonth_typeNum3 + "次");
|
||||
$('#lastMonth_typeNum4').text(lastMonth_typeNum4 + "次");
|
||||
$('#lastMonth_typeNum5').text(lastMonth_typeNum5 + "次");
|
||||
|
||||
getChart1(nowMonth_typeNum2, nowMonth_typeNum3, nowMonth_typeNum4, nowMonth_typeNum5);
|
||||
getChart2();
|
||||
|
||||
}
|
||||
});
|
||||
// getData("");
|
||||
})
|
||||
|
||||
function getChart1(nowMonth_typeNum2, nowMonth_typeNum3, nowMonth_typeNum4, nowMonth_typeNum5) {
|
||||
let myChart1 = echarts.init(document.getElementById("chart1"));
|
||||
let option1 = {
|
||||
color: ['#C40000', '#8F4300', '#FF6F00', '#FFCC00'],
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: true,
|
||||
fontSize: 16,
|
||||
fontWeight: 'bold'
|
||||
}
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{value: nowMonth_typeNum2, name: '数据中断'},
|
||||
{value: nowMonth_typeNum3, name: '数据停滞'},
|
||||
{value: nowMonth_typeNum4, name: '数据超限'},
|
||||
{value: nowMonth_typeNum5, name: '异常趋势'}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart1.setOption(option1, true);
|
||||
}
|
||||
|
||||
function getChart2(out1, out2, out3, out4,xdata) {
|
||||
let myChart2 = echarts.init(document.getElementById("chart2"));
|
||||
let option2 = {
|
||||
color: ['#C40000', '#8F4300', '#FF6F00', '#FFCC00'],
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
legend: {
|
||||
data: ['数据中断', '数据停滞', '数据超限', '异常趋势'],
|
||||
bottom: '0px',
|
||||
left: 'center'
|
||||
},
|
||||
grid: {
|
||||
top: '10px',
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '25px',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
// prettier-ignore
|
||||
data: xdata
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '数据中断',
|
||||
type: 'bar',
|
||||
stack: 'one',
|
||||
barWidth: 30,
|
||||
data: out1
|
||||
},
|
||||
{
|
||||
name: '数据停滞',
|
||||
type: 'bar',
|
||||
stack: 'one',
|
||||
barWidth: 30,
|
||||
data: out2
|
||||
}, {
|
||||
name: '数据超限',
|
||||
type: 'bar',
|
||||
stack: 'one',
|
||||
barWidth: 30,
|
||||
data: out3
|
||||
},
|
||||
{
|
||||
name: '异常趋势',
|
||||
type: 'bar',
|
||||
stack: 'one',
|
||||
barWidth: 30,
|
||||
data: out4
|
||||
}
|
||||
]
|
||||
};
|
||||
myChart2.setOption(option2, true);
|
||||
}
|
||||
|
||||
function showCurve(mpid) {
|
||||
if (mpid != '') {
|
||||
$.post(ext.contextPath + '/process/dataPatrol/showCurve.do', {
|
||||
mpcode: mpid,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('curveModal');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</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"
|
||||
style="background-size: 100% 100%;">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
|
||||
<div id="main">
|
||||
<div style="float: left;width: 100%;height: 60px;background-color: #FFFFFF;border: 1px solid #d7dbe2;border-radius: 4px;padding-left: 50px;">
|
||||
<div style="float: left;width: 230px;height:100%;line-height: 60px;">
|
||||
<span style="float:left;color: #B9B9B9;">最新刷新时间:</span>
|
||||
<span id="newRTime"
|
||||
style="float:left;color: #000000;font-weight: 700;margin-left: 15px;"></span>
|
||||
</div>
|
||||
<div style="float: left;width: 140px;height:100%;line-height: 60px;">
|
||||
<span style="float:left;color: #B9B9B9;">刷新频率:</span>
|
||||
<span style="float:left;color: #000000;font-weight: 700;margin-left: 15px;">5min</span>
|
||||
</div>
|
||||
<div style="float: left;height:100%;line-height: 60px;margin-left: 20px;">
|
||||
<span style="float:left;color: #B9B9B9;">图例:</span>
|
||||
<%-- <span style="float:left;color: #000000;font-weight: 700;margin-left: 15px;">数据正常</span>//#00FF80--%>
|
||||
<div style="float: left;width:80px;height:36px;margin-top: 12px;margin-left: 20px;background: #00FF80;border: 1px solid #00FF80;border-radius: 4px;padding-left: 12px;">
|
||||
<span style="float:left;color: #ffffff;height: 100%;line-height: 34px;">数据正常</span>
|
||||
</div>
|
||||
<div style="float: left;width:110px;height:36px;margin-top: 12px;margin-left: 20px;background: #c40000;border: 1px solid #ff0000;border-radius: 4px;padding-left: 12px;">
|
||||
<span style="float:left;color: #ffffff;height: 100%;line-height: 34px;">数据中断:</span>
|
||||
<span id="typeNum2"
|
||||
style="float:left;color: #ffffff;height: 100%;line-height: 34px;">0</span>
|
||||
</div>
|
||||
<div style="float: left;width:110px;height:36px;margin-top: 12px;margin-left: 20px;background: #8F4300;border: 1px solid #9E3F00;border-radius: 4px;padding-left: 12px;">
|
||||
<span style="float:left;color: #ffffff;height: 100%;line-height: 34px;">数据停滞:</span>
|
||||
<span id="typeNum3"
|
||||
style="float:left;color: #ffffff;height: 100%;line-height: 34px;">0</span>
|
||||
</div>
|
||||
<div style="float: left;width:110px;height:36px;margin-top: 12px;margin-left: 20px;background: #FF6F00;border: 1px solid #F69C00;border-radius: 4px;padding-left: 12px;">
|
||||
<span style="float:left;color: #ffffff;height: 100%;line-height: 34px;">数据超限:</span>
|
||||
<span id="typeNum4"
|
||||
style="float:left;color: #ffffff;height: 100%;line-height: 34px;">0</span>
|
||||
</div>
|
||||
<div style="float: left;width:110px;height:36px;margin-top: 12px;margin-left: 20px;background: #FFCC00;border: 1px solid #FFDD00;border-radius: 4px;padding-left: 12px;">
|
||||
<span style="float:left;color: #ffffff;height: 100%;line-height: 34px;">异常趋势:</span>
|
||||
<span id="typeNum5"
|
||||
style="float:left;color: #ffffff;height: 100%;line-height: 34px;">0</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;width: 100%;height: 10px;"></div>
|
||||
<div id="content" style="float: left;width:100%;">
|
||||
|
||||
</div>
|
||||
<div style="float: left;width: 100%;height: 10px;"></div>
|
||||
<div style="float: left;width:100%;height: 400px;border:1px solid #d7dbe2;background: #ffffff;border-radius: 4px;">
|
||||
<div style="float: left;width: 100%;height:4px;border:1px solid #d7dbe2;background: #5c9fd1;border-radius: 4px 4px 0px 0px;"></div>
|
||||
<div style="float: left;width: 100%;height:40px;border-bottom:1px solid #d7dbe2;line-height: 40px;font-size: 16px;padding-left: 20px;">
|
||||
数据巡视异常统计
|
||||
</div>
|
||||
<div style="float: left;width: 100%;height:calc(100% - 44px);padding: 20px;">
|
||||
<div style="float: left;width: 280px;height:100%;">
|
||||
<table style="width: 100%;height: 100%;text-align: center;">
|
||||
<tr>
|
||||
<td width="120px" style="color: #A0A0A0;">时间范围:</td>
|
||||
<td width="80px" style="color: #A0A0A0;">本月</td>
|
||||
<td width="80px" style="color: #A0A0A0;">上月</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 20px;">
|
||||
<div style="width: 80px;height: 36px;color: #FFFFFF;background-color: #C40000;border: 1px solid #ff0000;border-radius: 4px;text-align: center;line-height: 36px;">
|
||||
数据中断
|
||||
</div>
|
||||
</td>
|
||||
<td id="nowMonth_typeNum2"></td>
|
||||
<td id="lastMonth_typeNum2"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 20px;">
|
||||
<div style="width: 80px;height: 36px;color: #FFFFFF;background-color: #8F4300;border: 1px solid #9E3F00;border-radius: 4px;text-align: center;line-height: 36px;">
|
||||
数据停滞
|
||||
</div>
|
||||
</td>
|
||||
<td id="nowMonth_typeNum3"></td>
|
||||
<td id="lastMonth_typeNum3"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 20px;">
|
||||
<div style="width: 80px;height: 36px;color: #FFFFFF;background-color: #FF6F00;border: 1px solid #F69C00;border-radius: 4px;text-align: center;line-height: 36px;">
|
||||
数据超限
|
||||
</div>
|
||||
</td>
|
||||
<td id="nowMonth_typeNum4"></td>
|
||||
<td id="lastMonth_typeNum4"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding-left: 20px;">
|
||||
<div style="width: 80px;height: 36px;color: #FFFFFF;background-color: #FFCC00;border: 1px solid #FFDD00;border-radius: 4px;text-align: center;line-height: 36px;">
|
||||
异常趋势
|
||||
</div>
|
||||
</td>
|
||||
<td id="nowMonth_typeNum5"></td>
|
||||
<td id="lastMonth_typeNum5"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="chart1" style="float: left;width: 400px;height:100%;"></div>
|
||||
<div id="chart2" style="float: left;width: calc(100% - 680px);height:100%;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>e
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入ChartJS-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.bundle.min.js"
|
||||
charset="utf-8"></script>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
</html>
|
||||
224
src/main/webapp/jsp/process/dataPatrolView.jsp
Normal file
224
src/main/webapp/jsp/process/dataPatrolView.jsp
Normal file
@ -0,0 +1,224 @@
|
||||
<%@ 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" %>
|
||||
<%--<%String contextPath = request.getContextPath();%>--%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
let windowHeight = $(window).height();
|
||||
$('#main').css("height", (windowHeight - 30) + "px");
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataPatrol/getTreeJson.do",
|
||||
dataType: 'json',
|
||||
data: {
|
||||
unitId: unitId
|
||||
},
|
||||
async: true,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data)
|
||||
let typeNum1 = 0;
|
||||
let typeNum2 = 0;
|
||||
let typeNum3 = 0;
|
||||
let typeNum4 = 0;
|
||||
let typeNum5 = 0;
|
||||
let typeNum6 = 0;
|
||||
if (data.length > 0) {
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let mainContent = data[i];
|
||||
// console.log(mainContent)
|
||||
let mainName = mainContent.text;
|
||||
let rows = 1;
|
||||
if (mainContent.nodes != null) {
|
||||
rows = Math.ceil((mainContent.nodes.length / 4));
|
||||
}
|
||||
let totalHeight = (rows + 1) * 50;
|
||||
if (totalHeight < 200) {
|
||||
totalHeight = 200;
|
||||
}
|
||||
|
||||
let html = "<div style='float: left;width:100%;height: " + totalHeight + "px;margin-top: 15px;background: #ffffff;border-radius: 8px;' >";
|
||||
html += "<div style='float: left;width:100%;height: 50px;padding-left: 20px;line-height: 50px;color: #40a3ff;font-size: 24px;' >" + mainName + "</div>";
|
||||
|
||||
if (mainContent.nodes != null) {
|
||||
let detailContents = mainContent.nodes;
|
||||
for (let j = 0; j < detailContents.length; j++) {
|
||||
let detailContent = detailContents[j];
|
||||
let detailName = detailContent.text;
|
||||
let resultColor = "#ECF0F5";
|
||||
if (detailContent.resultColor != null) {
|
||||
resultColor = detailContent.resultColor;
|
||||
}
|
||||
let mpid = "";
|
||||
if (detailContent.mpid != null) {
|
||||
mpid = detailContent.mpid;
|
||||
}
|
||||
let value = "";
|
||||
if (detailContent.value != null) {
|
||||
value = detailContent.value;
|
||||
}
|
||||
let unit = "";
|
||||
if (detailContent.unit != null) {
|
||||
unit = detailContent.unit;
|
||||
}
|
||||
|
||||
if (detailContent.resultType != null) {
|
||||
let resultType = detailContent.resultType;
|
||||
if (resultType == '0') {
|
||||
typeNum1++;
|
||||
} else if (resultType == '1') {
|
||||
typeNum2++;
|
||||
} else if (resultType == '2') {
|
||||
typeNum3++;
|
||||
} else if (resultType == '3') {
|
||||
typeNum4++;
|
||||
} else if (resultType == '4') {
|
||||
typeNum5++;
|
||||
} else if (resultType == '5') {
|
||||
typeNum6++;
|
||||
}
|
||||
}
|
||||
|
||||
html += "<div style='float: left;width:25%;height: 50px;padding-left: 30px;padding-right: 10px;line-height: 50px;color: #bcbcbc;font-size: 24px;' >";
|
||||
|
||||
html += "<div style='float:left;width: 22px;padding-top: 14px;'>";
|
||||
html += "<div style='float:left;width: 22px;height: 22px;background: " + resultColor + ";border-radius: 50%;'></div>";
|
||||
html += "</div>";
|
||||
html += "<div style='float:left;width: calc((100% - 52px)*0.5);height: 100%;padding-left: 10px;'>" + detailName + "</div>";
|
||||
html += "<div style='float:left;width: calc((100% - 52px)*0.5);height: 100%;padding-left: 10px;'>" + value + ""+unit+"</div>";
|
||||
html += "<div style='float:left;width: 30px;'>";
|
||||
html += "<i style='cursor: pointer;' class='fa fa-line-chart' onclick=\"showCurve('" + mpid + "');\"></i>";
|
||||
html += "</div>";
|
||||
|
||||
html += "</div>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
$('#content').append(html);
|
||||
|
||||
}
|
||||
|
||||
$('#typeNum1').html(typeNum1);
|
||||
$('#typeNum2').html(typeNum2);
|
||||
$('#typeNum3').html(typeNum3);
|
||||
$('#typeNum4').html(typeNum4);
|
||||
$('#typeNum5').html(typeNum5);
|
||||
$('#typeNum6').html(typeNum6);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
// getData("");
|
||||
})
|
||||
|
||||
function showCurve(mpid) {
|
||||
if (mpid != '') {
|
||||
$.post(ext.contextPath + '/process/dataPatrol/showCurve.do', {
|
||||
mpcode: mpid,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('curveModal');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</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">
|
||||
<!-- Main content -->
|
||||
<section class="content container-fluid">
|
||||
<div id="mainAlertdiv"></div>
|
||||
<div id="subDiv"></div>
|
||||
|
||||
<div id="main">
|
||||
<div style="float:left;width: 100%;height: 68px;background: #ffffff;border-radius: 8px;">
|
||||
<div style="float:left;width: 130px;height: 100%;line-height: 68px;padding-left: 10px;">
|
||||
<div style="float:left;width: 22px;padding-top: 23px;">
|
||||
<div style="float:left;width: 22px;height: 22px;background: #00ff00;border-radius: 50%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width: 98px;padding-left: 5px;">正常(<span id="typeNum1"></span>)</div>
|
||||
</div>
|
||||
<div style="float:left;width: 130px;height: 100%;line-height: 68px;padding-left: 10px;">
|
||||
<div style="float:left;width: 22px;padding-top: 23px;">
|
||||
<div style="float:left;width: 22px;height: 22px;background: #EA2208;border-radius: 50%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width: 98px;padding-left: 5px;">超上限(<span id="typeNum2"></span>)</div>
|
||||
</div>
|
||||
<div style="float:left;width: 130px;height: 100%;line-height: 68px;padding-left: 10px;">
|
||||
<div style="float:left;width: 22px;padding-top: 23px;">
|
||||
<div style="float:left;width: 22px;height: 22px;background: #E5007F;border-radius: 50%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width: 98px;padding-left: 5px;">超下限(<span id="typeNum3"></span>)</div>
|
||||
</div>
|
||||
<div style="float:left;width: 130px;height: 100%;line-height: 68px;padding-left: 10px;">
|
||||
<div style="float:left;width: 22px;padding-top: 23px;">
|
||||
<div style="float:left;width: 22px;height: 22px;background: #FEFE00;border-radius: 50%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width: 98px;padding-left: 5px;">数据静止(<span id="typeNum4"></span>)</div>
|
||||
</div>
|
||||
<div style="float:left;width: 130px;height: 100%;line-height: 68px;padding-left: 10px;">
|
||||
<div style="float:left;width: 22px;padding-top: 23px;">
|
||||
<div style="float:left;width: 22px;height: 22px;background: #00B8EE;border-radius: 50%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width: 98px;padding-left: 5px;">数据为0(<span id="typeNum5"></span>)</div>
|
||||
</div>
|
||||
<div style="float:left;width: 130px;height: 100%;line-height: 68px;padding-left: 10px;">
|
||||
<div style="float:left;width: 22px;padding-top: 23px;">
|
||||
<div style="float:left;width: 22px;height: 22px;background: #01FEFF;border-radius: 50%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width: 98px;padding-left: 5px;">异常趋势(<span id="typeNum6"></span>)</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content" style="float:left;width: 100%;">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>e
|
||||
</div>
|
||||
</body>
|
||||
<!-- 引入ChartJS-->
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/chart.js/dist/Chart.bundle.min.js"
|
||||
charset="utf-8"></script>
|
||||
<!-- 引入daterangepicker-->
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/moment.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/bootstrap-daterangepicker/daterangepicker.js"
|
||||
charset="utf-8"></script>
|
||||
</html>
|
||||
412
src/main/webapp/jsp/process/dataVisualAssembly/ZResize.js
Normal file
412
src/main/webapp/jsp/process/dataVisualAssembly/ZResize.js
Normal file
@ -0,0 +1,412 @@
|
||||
var theobject = null; //This gets a value as soon as a resize start
|
||||
var resizeWidth = "";
|
||||
var resizeHeight = "";
|
||||
var resizeLeft = "";
|
||||
var resizeTop = "";
|
||||
var resizeId = "";
|
||||
var firstLeft = "";
|
||||
var firstTop = "";
|
||||
|
||||
function resizeObject() {
|
||||
this.el = null; //pointer to the object
|
||||
this.dir = ""; //type of current resize (n, s, e, w, ne, nw, se, sw)
|
||||
this.grabx = null; //Some useful values
|
||||
this.graby = null;
|
||||
this.width = null;
|
||||
this.height = null;
|
||||
this.left = null;
|
||||
this.top = null;
|
||||
}
|
||||
|
||||
|
||||
//Find out what kind of resize! Return a string inlcluding the directions
|
||||
function getDirection(el) {
|
||||
var xPos, yPos, offset, dir;
|
||||
dir = "";
|
||||
|
||||
xPos = window.event.offsetX;
|
||||
yPos = window.event.offsetY;
|
||||
|
||||
offset = 8; //The distance from the edge in pixels
|
||||
|
||||
if (yPos < offset) dir += "n";
|
||||
else if (yPos > el.offsetHeight - offset) dir += "s";
|
||||
if (xPos < offset) dir += "w";
|
||||
else if (xPos > el.offsetWidth - offset) dir += "e";
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
function doDown() {
|
||||
var el = getReal(event.srcElement, "className", "reSize");
|
||||
|
||||
if (el == null) {
|
||||
theobject = null;
|
||||
return;
|
||||
}
|
||||
resizeId = el.id;
|
||||
|
||||
firstLeft = $('#' + resizeId).position().left;
|
||||
firstTop = $('#' + resizeId).position().top;
|
||||
|
||||
dir = getDirection(el);
|
||||
if (dir == "") return;
|
||||
|
||||
theobject = new resizeObject();
|
||||
|
||||
theobject.el = el;
|
||||
theobject.dir = dir;
|
||||
|
||||
theobject.grabx = window.event.clientX;
|
||||
theobject.graby = window.event.clientY;
|
||||
theobject.width = el.offsetWidth;
|
||||
theobject.height = el.offsetHeight;
|
||||
theobject.left = el.offsetLeft;
|
||||
theobject.top = el.offsetTop;
|
||||
|
||||
window.event.returnValue = false;
|
||||
window.event.cancelBubble = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
function doUp3() {
|
||||
if (theobject != null) {
|
||||
theobject = null;
|
||||
}
|
||||
|
||||
if (resizeId != '') {
|
||||
var reSizeDiv = $('#' + resizeId);
|
||||
resizeWidth = reSizeDiv.css("width");
|
||||
resizeHeight = reSizeDiv.css("height");
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ext.contextPath + "/process/dataVisualContent/updateReSize.do?id=" + resizeId + "&width=" + resizeWidth + "&height=" + resizeHeight,
|
||||
async: false,
|
||||
globle: false,
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
resizeWidth = "";
|
||||
resizeHeight = "";
|
||||
resizeLeft = "";
|
||||
resizeTop = "";
|
||||
resizeId = "";
|
||||
firstLeft = "";
|
||||
firstTop = "";
|
||||
}
|
||||
|
||||
function doUp0() {
|
||||
|
||||
if (theobject != null) {
|
||||
theobject = null;
|
||||
}
|
||||
}
|
||||
|
||||
function doUp() {
|
||||
|
||||
if (theobject != null) {
|
||||
theobject = null;
|
||||
}
|
||||
|
||||
if (resizeId != '') {
|
||||
var reSizeDiv = $('#' + resizeId);
|
||||
resizeWidth = reSizeDiv.css("width");
|
||||
resizeHeight = reSizeDiv.css("height");
|
||||
resizeLeft = reSizeDiv.css("left").replace("px", "");
|
||||
resizeTop = reSizeDiv.css("top").replace("px", "");
|
||||
|
||||
// if(firstLeft==resizeLeft&&firstTop==resizeTop){
|
||||
// stopMove(resizeId,"noMove");
|
||||
// }else{
|
||||
// stopMove(resizeId,"move");
|
||||
// }
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ext.contextPath + "/process/dataVisualContent/updateReSize.do?id=" + resizeId + "&width=" + resizeWidth + "&height=" + resizeHeight,
|
||||
async: false,
|
||||
globle: false,
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ext.contextPath + "/process/dataVisualContent/updateLayout.do?id=" + resizeId + "&postx=" + resizeLeft + "&posty=" + resizeTop,
|
||||
async: false,
|
||||
globle: false,
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
// $('#'+resizeId).draggable({
|
||||
// cursor:'move'
|
||||
// });
|
||||
}
|
||||
|
||||
resizeWidth = "";
|
||||
resizeHeight = "";
|
||||
resizeLeft = "";
|
||||
resizeTop = "";
|
||||
resizeId = "";
|
||||
firstLeft = "";
|
||||
firstTop = "";
|
||||
}
|
||||
|
||||
function doMove() {
|
||||
var el, xPos, yPos, str, xMin, yMin;
|
||||
xMin = 8; //The smallest width possible
|
||||
yMin = 8; // height
|
||||
|
||||
el = getReal(event.srcElement, "className", "reSize");
|
||||
|
||||
if (el == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (el.className.indexOf("reSize") >= 0) {
|
||||
str = getDirection(el);
|
||||
//Fix the cursor
|
||||
if (str == "") str = "default";
|
||||
else str += "-resize";
|
||||
el.style.cursor = str;
|
||||
}
|
||||
|
||||
//Dragging starts here
|
||||
if (theobject != null) {
|
||||
if (dir.indexOf("e") != -1)
|
||||
theobject.el.style.width = Math.max(xMin, theobject.width +
|
||||
|
||||
window.event.clientX - theobject.grabx) + "px";
|
||||
|
||||
if (dir.indexOf("s") != -1)
|
||||
theobject.el.style.height = Math.max(yMin, theobject.height +
|
||||
|
||||
window.event.clientY - theobject.graby) + "px";
|
||||
|
||||
if (dir.indexOf("w") != -1) {
|
||||
theobject.el.style.left = Math.min(theobject.left +
|
||||
|
||||
window.event.clientX - theobject.grabx, theobject.left + theobject.width - xMin) + "px";
|
||||
theobject.el.style.width = Math.max(xMin, theobject.width -
|
||||
|
||||
window.event.clientX + theobject.grabx) + "px";
|
||||
}
|
||||
if (dir.indexOf("n") != -1) {
|
||||
theobject.el.style.top = Math.min(theobject.top +
|
||||
|
||||
window.event.clientY - theobject.graby, theobject.top + theobject.height - yMin) + "px";
|
||||
theobject.el.style.height = Math.max(yMin, theobject.height -
|
||||
|
||||
window.event.clientY + theobject.graby) + "px";
|
||||
}
|
||||
|
||||
window.event.returnValue = false;
|
||||
window.event.cancelBubble = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function getReal(el, type, value) {
|
||||
temp = el;
|
||||
while ((temp != null) && (temp.tagName != "BODY")) {
|
||||
if (temp.className.indexOf("reSize") >= 0) {
|
||||
el = temp;
|
||||
return el;
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
temp = temp.parentElement;
|
||||
}
|
||||
return el;
|
||||
}
|
||||
|
||||
|
||||
function doUp2(resizeId2) {
|
||||
var reSizeDiv = $('#' + resizeId2);
|
||||
// resizeWidth=reSizeDiv.css("width");
|
||||
// resizeHeight=reSizeDiv.css("height");
|
||||
resizeLeft = reSizeDiv.css("left");
|
||||
resizeTop = reSizeDiv.css("top");
|
||||
|
||||
// $.ajax({
|
||||
// type : "GET",
|
||||
// url : ext.contextPath+"/process/dataVisualContent/updateReSize.do?id="+resizeId+"&width="+resizeWidth+"&height="+resizeHeight,
|
||||
// async: false,
|
||||
// globle:false,
|
||||
// success : function(data){
|
||||
// }
|
||||
// });
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ext.contextPath + "/process/dataVisualContent/getOneJson.do?id=" + resizeId2,
|
||||
async: false,
|
||||
globle: false,
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
data = data[0];
|
||||
if (data.postx.indexOf('%') < 0 && data.posty.indexOf('%') < 0) {
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ext.contextPath + "/process/dataVisualContent/updateLayout.do?id=" + resizeId2 + "&postx=" + resizeLeft + "&posty=" + resizeTop,
|
||||
async: false,
|
||||
globle: false,
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
resizeWidth = "";
|
||||
resizeHeight = "";
|
||||
resizeLeft = "";
|
||||
resizeTop = "";
|
||||
resizeId = "";
|
||||
firstLeft = "";
|
||||
firstTop = "";
|
||||
}
|
||||
|
||||
var rec;
|
||||
var flag = 0;
|
||||
function voiceClick(voicetext,voicemethod,paths,contentId){
|
||||
paths=paths.split(",");
|
||||
let path1="";let path2="";
|
||||
if(paths.length>2){
|
||||
path1=paths[1];
|
||||
path2=paths[0];
|
||||
}else{
|
||||
path1=paths[0];
|
||||
path2=paths[0];
|
||||
}
|
||||
|
||||
flag += 1;
|
||||
if (flag % 2 == 1) {
|
||||
rec = Recorder({ type: "mp3", sampleRate: 16000, bitRate: 16, numChannels: 1 });//使用默认配置,mp3格式
|
||||
//打开麦克风授权获得相关资源
|
||||
rec.open(function () {
|
||||
//开始录音
|
||||
rec.start();
|
||||
}, function (msg, isUserNotAllow) {
|
||||
//用户拒绝了权限或浏览器不支持
|
||||
alert((isUserNotAllow ? "用户拒绝了权限," : "") + "无法录音:" + msg);
|
||||
});
|
||||
document.getElementById(contentId+"Img").src=path2;
|
||||
}
|
||||
|
||||
if (flag % 2 == 0) {
|
||||
//停止录音,得到了录音文件blob二进制对象,想干嘛就干嘛
|
||||
rec.stop(function (blob, duration) {
|
||||
var api=ext.contextPath +"/data/baiDuAipSpeech/save.do";
|
||||
var reader=new FileReader();
|
||||
let to_speak = window.speechSynthesis;
|
||||
reader.onloadend=function(){
|
||||
$.ajax({
|
||||
url:api, //上传接口地址
|
||||
type:"POST",
|
||||
data:{
|
||||
type:blob.type, //告诉后端,这个录音是什么格式的,可能前后端都固定的mp3可以不用写
|
||||
upfile_b64:(/.+;\s*base64\s*,\s*(.+)$/i.exec(reader.result)||[])[1] //录音文件内容,后端进行base64解码成二进制
|
||||
},
|
||||
success:function(data){
|
||||
console.log(data);
|
||||
data = eval('(' + data + ')');
|
||||
let result=data.result[0];
|
||||
if(result.indexOf("请对取水一号凤凰进行巡检")>=0){
|
||||
result="请对取水一号泵房进行巡检";
|
||||
}
|
||||
console.log(result);
|
||||
if(result.indexOf(voicetext)>=0){
|
||||
eval(voicemethod);
|
||||
}else if(result.indexOf("请对取水一号泵房进行巡检")>=0||
|
||||
result.indexOf("一号反冲洗泵情况")>=0||
|
||||
result.indexOf("二号反冲洗泵情况")>=0||
|
||||
result.indexOf("三号反冲洗泵情况")>=0||
|
||||
result.indexOf("一号送水泵情况")>=0||
|
||||
result.indexOf("二号送水泵情况")>=0||
|
||||
result.indexOf("三号送水泵情况")>=0||
|
||||
result.indexOf("四号送水泵情况")>=0||
|
||||
result.indexOf("五号送水泵情况")>=0||
|
||||
result.indexOf("六号送水泵情况")>=0||
|
||||
result.indexOf("七号送水泵情况")>=0||
|
||||
result.indexOf("八号送水泵情况")>=0){
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: ext.contextPath + "/data/baiDuAipSpeech/sendBim.do?text=" + result,
|
||||
async: false,
|
||||
globle: false,
|
||||
success: function (data) {
|
||||
console.log("in bim");
|
||||
if(result.indexOf("请对取水一号泵房进行巡检")>=0||result.indexOf("请对取水一号凤凰进行巡检")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("好的,现在开始执行取水一号泵房自动巡检");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("一号反冲洗泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位一号反冲洗泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("二号反冲洗泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位二号反冲洗泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("三号反冲洗泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位三号反冲洗泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("一号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位一号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("二号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位二号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("三号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位三号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("四号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位四号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("五号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位五号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("六号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位六号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("七号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位七号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}else if(result.indexOf("八号送水泵情况")>=0){
|
||||
to_speak = new SpeechSynthesisUtterance("正在为您定位八号送水泵");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}
|
||||
}
|
||||
});
|
||||
}else{
|
||||
to_speak = new SpeechSynthesisUtterance("暂时没法识别你的语音呢");
|
||||
window.speechSynthesis.speak(to_speak);
|
||||
}
|
||||
// console.log("上传成功",v);
|
||||
rec.close();
|
||||
},
|
||||
error:function(s){
|
||||
console.error("上传失败",s);
|
||||
rec.close();
|
||||
}
|
||||
});
|
||||
};
|
||||
reader.readAsDataURL(blob);
|
||||
|
||||
}, function (msg) {
|
||||
alert("录音失败:" + msg);
|
||||
rec.close();
|
||||
});
|
||||
flag=0;
|
||||
document.getElementById(contentId+"Img").src=path1;
|
||||
}
|
||||
}
|
||||
|
||||
// document.onmousedown = doDown;
|
||||
// document.onmouseup = doUp;
|
||||
// document.onmousemove = doMove;
|
||||
9854
src/main/webapp/jsp/process/dataVisualAssembly/assembly.js
Normal file
9854
src/main/webapp/jsp/process/dataVisualAssembly/assembly.js
Normal file
File diff suppressed because it is too large
Load Diff
925
src/main/webapp/jsp/process/dataVisualBarChartEdit.jsp
Normal file
925
src/main/webapp/jsp/process/dataVisualBarChartEdit.jsp
Normal file
@ -0,0 +1,925 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_BarChart", DataVisualContent.Type_BarChart); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#titleColorContainer').colorpicker({format: null});
|
||||
$('#subtitleColorContainer').colorpicker({format: null});
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#xaxislinecolorContainer').colorpicker({format: null});
|
||||
$('#xaxisaxislabelcolorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChart.datazoomst}' == 'false') {
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChart.datazoomst}' == 'true') {
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChart.xaxislineshow}' == 'false') {
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChart.xaxislineshow}' == 'true') {
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChart.xaxisaxislabelshow}' == 'false') {
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChart.xaxisaxislabelshow}' == 'true') {
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChart.xaxisaxistickshow}' == 'false') {
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChart.xaxisaxistickshow}' == 'true') {
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChart.xaxissplitlineshow}' == 'false') {
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChart.xaxissplitlineshow}' == 'true') {
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var datalegendPosition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectlegendPosition = $("#legendPosition").select2({
|
||||
data: datalegendPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlegendPosition.val('${dataVisualBarChart.legendPosition}').trigger("change");//设置选中
|
||||
|
||||
var dataTitlePosition = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectTitlePosition = $("#titlePosition").select2({
|
||||
data: dataTitlePosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectTitlePosition.val('${dataVisualBarChart.titlePosition}').trigger("change");//设置选中
|
||||
|
||||
var dataXaxistype = JSON.parse("[{\"id\":\"category\",\"text\":\"类目轴\"},{\"id\":\"time\",\"text\":\"时间轴\"}]");
|
||||
var selectXaxistype = $("#xaxistype").select2({
|
||||
data: dataXaxistype,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10//数据超过十个启用搜索框
|
||||
});
|
||||
selectXaxistype.val('${dataVisualBarChart.xaxistype}').trigger("change");//设置选中
|
||||
|
||||
|
||||
var dataXaxistype = JSON.parse("[{\"id\":\"0\",\"text\":\"纵向\"},{\"id\":\"1\",\"text\":\"横向\"}]");
|
||||
var selectXaxistype = $("#direction").select2({
|
||||
data: dataXaxistype,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10//数据超过十个启用搜索框
|
||||
});
|
||||
selectXaxistype.val('${dataVisualBarChart.direction}').trigger("change");//设置选中
|
||||
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
function doBarChartsave() {
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let baseform = $("#baseForm").serialize();
|
||||
const datazoomstStatus = $('#switchBtnDatazoomst').bootstrapSwitch('state');
|
||||
if (datazoomstStatus) {
|
||||
baseform = baseform + "&datazoomst=true";
|
||||
} else {
|
||||
baseform = baseform + "&datazoomst=false";
|
||||
}
|
||||
|
||||
const xaxislineshowStatus = $('#switchBtnXaxislineshow').bootstrapSwitch('state');
|
||||
if (xaxislineshowStatus) {
|
||||
baseform = baseform + "&xaxislineshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxislineshow=false";
|
||||
}
|
||||
|
||||
const xaxisaxislabelshowStatus = $('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state');
|
||||
if (xaxisaxislabelshowStatus) {
|
||||
baseform = baseform + "&xaxisaxislabelshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxisaxislabelshow=false";
|
||||
}
|
||||
|
||||
const xaxisaxistickshowStatus = $('#switchBtnXaxisaxistickshow').bootstrapSwitch('state');
|
||||
if (xaxisaxistickshowStatus) {
|
||||
baseform = baseform + "&xaxisaxistickshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxisaxistickshow=false";
|
||||
}
|
||||
|
||||
const xaxissplitlineshowStatus = $('#switchBtnXaxissplitlineshow').bootstrapSwitch('state');
|
||||
if (xaxissplitlineshowStatus) {
|
||||
baseform = baseform + "&xaxissplitlineshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxissplitlineshow=false";
|
||||
}
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualBarChart/doupdate.do", baseform, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('barChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doBarChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualBarChart.id}',
|
||||
type: '${Type_BarChart}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('barChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSeriesFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualBarChartSeries/dosave.do", {pid: '${dataVisualBarChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function addYAxisFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualBarChartYAxis/dosave.do", {pid: '${dataVisualBarChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function initFun() {
|
||||
$("#seriesTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualBarChartSeries/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualBarChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'yaxisindex', // 返回json数据中的name
|
||||
title: '所属轴', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSeriesFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSeriesFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("seriesTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualBarChartSeries/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#seriesTable").tableDnD();
|
||||
|
||||
$("#yAxisTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualBarChartYAxis/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualBarChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '所属轴', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editYAxisFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteYAxisFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("yAxisTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualBarChartYAxis/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#yAxisTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function editSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualBarChartSeries/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('barChartSeriesSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualBarChartSeries/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editYAxisFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualBarChartYAxis/doedit.do', {id: id}, function (data) {
|
||||
$("#containerEditDiv").html(data);
|
||||
openModal('barChartYAxisSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteYAxisFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualBarChartYAxis/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="barChartSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">数据配置</a></li>
|
||||
<li class=""><a href="#tab4" data-toggle="tab" index="3"
|
||||
aria-expanded="true">轴配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="baseForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualBarChart.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">展示反向</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="direction" name="direction"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="xaxistype" name="xaxistype"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">缩放轴</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnDatazoomst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnXaxislineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">x轴颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="xaxislinecolorContainer">
|
||||
<input name="xaxislinecolor" id="xaxislinecolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="x轴颜色"
|
||||
value="${dataVisualBarChart.xaxislinecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴刻度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnXaxisaxistickshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">x轴分割线</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnXaxissplitlineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴数值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnxaxisaxislabelshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数值颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="xaxisaxislabelcolorContainer">
|
||||
<input name="xaxisaxislabelcolor" id="xaxisaxislabelcolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="数值颜色"
|
||||
value="${dataVisualBarChart.xaxisaxislabelcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="xaxisaxislabelfontsize"
|
||||
name="xaxisaxislabelfontsize"
|
||||
placeholder="x轴大小"
|
||||
value="${dataVisualBarChart.xaxisaxislabelfontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数值截断位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="xsubstring"
|
||||
name="xsubstring"
|
||||
placeholder="数值截断位"
|
||||
value="${dataVisualBarChart.xsubstring}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴数据组</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="xaxisdata" name="xaxisdata"
|
||||
placeholder="x轴数据组"
|
||||
value="${dataVisualBarChart.xaxisdata}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图例</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="legendPosition" name="legendPosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图例大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="legendTextFontsize"
|
||||
name="legendTextFontsize"
|
||||
placeholder="图例大小"
|
||||
value="${dataVisualBarChart.legendTextFontsize}">
|
||||
</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="titleText" name="titleText"
|
||||
placeholder="标题文本"
|
||||
value="${dataVisualBarChart.titleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="titlePosition" name="titlePosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="titleColorContainer">
|
||||
<input name="titleColor" id="titleColor" type="text" class="form-control"
|
||||
placeholder="标题颜色"
|
||||
value="${dataVisualBarChart.titleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleFontSize" name="titleFontSize"
|
||||
placeholder="标题大小"
|
||||
value="${dataVisualBarChart.titleFontSize}">
|
||||
</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="titleFontWeight" name="titleFontWeight"
|
||||
placeholder="标题粗细"
|
||||
value="${dataVisualBarChart.titleFontWeight}">
|
||||
</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="subtitleText" name="subtitleText"
|
||||
placeholder="副标题文本"
|
||||
value="${dataVisualBarChart.subtitleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="subtitleColorContainer">
|
||||
<input name="subtitleColor" id="subtitleColor" type="text" class="form-control"
|
||||
placeholder="副标题颜色"
|
||||
value="${dataVisualBarChart.subtitleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="subtitleFontSize"
|
||||
name="subtitleFontSize"
|
||||
placeholder="副标题大小"
|
||||
value="${dataVisualBarChart.subtitleFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="subtitleFontWeight"
|
||||
name="subtitleFontWeight"
|
||||
placeholder="副标题粗细"
|
||||
value="${dataVisualBarChart.subtitleFontWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualBarChart.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</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="colors" name="colors" placeholder="颜色组"
|
||||
value="${dataVisualBarChart.colors}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSeriesFun();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<table id="seriesTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab4"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addYAxisFun();"><i
|
||||
class="fa fa-plus"></i> 添加轴
|
||||
</button>
|
||||
</div>
|
||||
<table id="yAxisTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doBarChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doBarChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
409
src/main/webapp/jsp/process/dataVisualBarChartSeriesEdit.jsp
Normal file
409
src/main/webapp/jsp/process/dataVisualBarChartSeriesEdit.jsp
Normal file
@ -0,0 +1,409 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualBarChartSeries" %>
|
||||
<%request.setAttribute("TimeRange_dateSelect", DataVisualBarChartSeries.TimeRange_dateSelect); %>
|
||||
<%request.setAttribute("TimeRange_hour", DataVisualBarChartSeries.TimeRange_hour); %>
|
||||
<%request.setAttribute("TimeRange_day", DataVisualBarChartSeries.TimeRange_day); %>
|
||||
<%request.setAttribute("TimeRange_week", DataVisualBarChartSeries.TimeRange_week); %>
|
||||
<%request.setAttribute("TimeRange_month", DataVisualBarChartSeries.TimeRange_month); %>
|
||||
<%request.setAttribute("TimeRange_year", DataVisualBarChartSeries.TimeRange_year); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#bkstylecolorContainer').colorpicker({format: null});
|
||||
$('#labelpositioncolorContainer').colorpicker({format: null});
|
||||
|
||||
$("#timerange").select2({minimumResultsForSearch: -1}).val("${dataVisualBarChartSeries.timerange}").trigger("change");
|
||||
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartSeries.ishistorydata}' == 'false') {
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartSeries.ishistorydata}' == 'true') {
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
|
||||
$('#switchBtnMaxshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartSeries.maxshow}' == 'false') {
|
||||
$('#switchBtnMaxshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartSeries.maxshow}' == 'true') {
|
||||
$('#switchBtnMaxshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnMaxshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnMinshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartSeries.minshow}' == 'false') {
|
||||
$('#switchBtnMinshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartSeries.minshow}' == 'true') {
|
||||
$('#switchBtnMinshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnMinshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAvgshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartSeries.avgshow}' == 'false') {
|
||||
$('#switchBtnAvgshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartSeries.avgshow}' == 'true') {
|
||||
$('#switchBtnAvgshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAvgshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnSelectst').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartSeries.selectst}' == 'false') {
|
||||
$('#switchBtnSelectst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartSeries.selectst}' == 'true') {
|
||||
$('#switchBtnSelectst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnSelectst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
var datatype = JSON.parse("[{\"id\":\"bar\",\"text\":\"柱状图\"},{\"id\":\"line\",\"text\":\"折线图\"}]");
|
||||
var selecttype = $("#type").select2({
|
||||
data: datatype,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selecttype.val('${dataVisualBarChartSeries.type}').trigger("change");//设置选中
|
||||
|
||||
var datalabelposition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"inside\",\"text\":\"内部居中\"},{\"id\":\"insideTop\",\"text\":\"内部顶部\"},{\"id\":\"insideBottom\",\"text\":\"内部底部\"},{\"id\":\"top\",\"text\":\"顶部\"},{\"id\":\"bottom\",\"text\":\"底部\"}]");
|
||||
var selectlabelposition = $("#labelposition").select2({
|
||||
data: datalabelposition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlabelposition.val('${dataVisualBarChartSeries.labelposition}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doLineChartSeriesSave() {
|
||||
let form = $("#barChartSeriesForm").serialize();
|
||||
|
||||
const ishistorydata = $('#switchBtnIshistorydata').bootstrapSwitch('state');
|
||||
if (ishistorydata) {
|
||||
form = form + "&ishistorydata=true";
|
||||
} else {
|
||||
form = form + "&ishistorydata=false";
|
||||
}
|
||||
const switchBtnMaxshow = $('#switchBtnMaxshow').bootstrapSwitch('state');
|
||||
if (switchBtnMaxshow) {
|
||||
form = form + "&maxshow=true";
|
||||
} else {
|
||||
form = form + "&maxshow=false";
|
||||
}
|
||||
const switchBtnMinshow = $('#switchBtnMinshow').bootstrapSwitch('state');
|
||||
if (switchBtnMinshow) {
|
||||
form = form + "&minshow=true";
|
||||
} else {
|
||||
form = form + "&minshow=false";
|
||||
}
|
||||
const switchBtnAvgshow = $('#switchBtnAvgshow').bootstrapSwitch('state');
|
||||
if (switchBtnAvgshow) {
|
||||
form = form + "&avgshow=true";
|
||||
} else {
|
||||
form = form + "&avgshow=false";
|
||||
}
|
||||
const switchBtnSelectst = $('#switchBtnSelectst').bootstrapSwitch('state');
|
||||
if (switchBtnSelectst) {
|
||||
form = form + "&selectst=true";
|
||||
} else {
|
||||
form = form + "&selectst=false";
|
||||
}
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualBarChartSeries/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('barChartSeriesSubModal');
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function selectmpids() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointList4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
$('#barChartSeriesForm #mpid').val(data);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="barChartSeriesSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="barChartSeriesForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualBarChartSeries.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualBarChartSeries.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属轴</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="yaxisindex" name="yaxisindex" placeholder="所属轴"
|
||||
value="${dataVisualBarChartSeries.yaxisindex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">历史值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIshistorydata" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">时间范围</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="timerange" name="timerange" class="form-control select2" style="width: 170px;">
|
||||
<option value="${TimeRange_dateSelect}">日期控件</option>
|
||||
<option value="${TimeRange_hour}">小时</option>
|
||||
<option value="${TimeRange_day}">天</option>
|
||||
<option value="${TimeRange_week}">周</option>
|
||||
<option value="${TimeRange_month}">月</option>
|
||||
<option value="${TimeRange_year}">年</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="type" name="type"
|
||||
style="width: 170px;"></select>
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualBarChartSeries.mpid}" onclick="selectmpids();">
|
||||
</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="urldata" name="urldata"
|
||||
placeholder="接口数据"
|
||||
value="${dataVisualBarChartSeries.urldata}">
|
||||
</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="fixedvalue" name="fixedvalue" placeholder="固定值"
|
||||
value="${dataVisualBarChartSeries.fixedvalue}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提示文本</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="labelposition" name="labelposition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文本单位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="labelpositionunit" name="labelpositionunit"
|
||||
placeholder="文本单位"
|
||||
value="${dataVisualBarChartSeries.labelpositionunit}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="labelpositioncolorContainer">
|
||||
<input name="labelpositioncolor" id="labelpositioncolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="文本颜色"
|
||||
value="${dataVisualBarChartSeries.labelpositioncolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文本大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="labelpositionfontsize"
|
||||
name="labelpositionfontsize"
|
||||
placeholder="文本大小"
|
||||
value="${dataVisualBarChartSeries.labelpositionfontsize}">
|
||||
</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="markerline" name="markerline" placeholder="标记线"
|
||||
value="${dataVisualBarChartSeries.markerline}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">堆叠名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="stackst" name="stackst" placeholder="堆叠名称"
|
||||
value="${dataVisualBarChartSeries.stackst}">
|
||||
</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="barwidth" name="barwidth" placeholder="柱条宽度"
|
||||
value="${dataVisualBarChartSeries.barwidth}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">柱条距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="bargap" name="bargap"
|
||||
placeholder="柱条距离"
|
||||
value="${dataVisualBarChartSeries.bargap}">
|
||||
</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="borderradius" name="borderradius"
|
||||
placeholder="堆叠名称"
|
||||
value="${dataVisualBarChartSeries.borderradius}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">阴影颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="bkstylecolorContainer">
|
||||
<input name="bkstylecolor" id="bkstylecolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="阴影颜色"
|
||||
value="${dataVisualBarChartSeries.bkstylecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">阴影半径</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="bkstyleborderradius" name="bkstyleborderradius"
|
||||
placeholder="阴影圆角半径"
|
||||
value="${dataVisualBarChartSeries.bkstyleborderradius}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnMaxshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnMinshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">平均值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAvgshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图例状态</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnSelectst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">排序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="morder" name="morder" placeholder="排序"
|
||||
value="${dataVisualBarChartSeries.morder}">
|
||||
</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="doLineChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
278
src/main/webapp/jsp/process/dataVisualBarChartYAxisEdit.jsp
Normal file
278
src/main/webapp/jsp/process/dataVisualBarChartYAxisEdit.jsp
Normal file
@ -0,0 +1,278 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#linecolorContainer').colorpicker({format: null});
|
||||
$('#axislabelcolorContainer').colorpicker({format: null});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var positionData = JSON.parse("[{\"id\":\"left\",\"text\":\"左侧\"},{\"id\":\"right\",\"text\":\"右侧\"}]");
|
||||
var positionSelect = $("#position").select2({
|
||||
data: positionData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
positionSelect.val('${dataVisualBarChartYAxis.position}').trigger("change");//设置选中
|
||||
|
||||
|
||||
$('#switchBtnlineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartYAxis.lineshow}' == 'false') {
|
||||
$('#switchBtnlineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartYAxis.lineshow}' == 'true') {
|
||||
$('#switchBtnlineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnlineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartYAxis.axislabelshow}' == 'false') {
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartYAxis.axislabelshow}' == 'true') {
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartYAxis.axistickshow}' == 'false') {
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartYAxis.axistickshow}' == 'true') {
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartYAxis.splitlineshow}' == 'false') {
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartYAxis.splitlineshow}' == 'true') {
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnscale').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualBarChartYAxis.scale}' == 'false') {
|
||||
$('#switchBtnscale').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualBarChartYAxis.scale}' == 'true') {
|
||||
$('#switchBtnscale').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnscale').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function doLineChartSeriesSave() {
|
||||
let form = $("#barChartYAxisForm").serialize();
|
||||
const lineshowStatus = $('#switchBtnlineshow').bootstrapSwitch('state');
|
||||
if (lineshowStatus) {
|
||||
form = form + "&lineshow=true";
|
||||
} else {
|
||||
form = form + "&lineshow=false";
|
||||
}
|
||||
|
||||
const axislabelshowStatus = $('#switchBtnaxislabelshow').bootstrapSwitch('state');
|
||||
if (axislabelshowStatus) {
|
||||
form = form + "&axislabelshow=true";
|
||||
} else {
|
||||
form = form + "&axislabelshow=false";
|
||||
}
|
||||
|
||||
const axistickshowStatus = $('#switchBtnaxistickshow').bootstrapSwitch('state');
|
||||
if (axistickshowStatus) {
|
||||
form = form + "&axistickshow=true";
|
||||
} else {
|
||||
form = form + "&axistickshow=false";
|
||||
}
|
||||
|
||||
const splitlineshowStatus = $('#switchBtnsplitlineshow').bootstrapSwitch('state');
|
||||
if (splitlineshowStatus) {
|
||||
form = form + "&splitlineshow=true";
|
||||
} else {
|
||||
form = form + "&splitlineshow=false";
|
||||
}
|
||||
|
||||
const scaleStatus = $('#switchBtnscale').bootstrapSwitch('state');
|
||||
if (scaleStatus) {
|
||||
form = form + "&scale=true";
|
||||
} else {
|
||||
form = form + "&scale=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualBarChartYAxis/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('barChartYAxisSubModal');
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="barChartYAxisSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="barChartYAxisForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualBarChartYAxis.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualBarChartYAxis.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属轴</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="morder" name="morder" placeholder="所属轴"
|
||||
value="${dataVisualBarChartYAxis.morder}">
|
||||
</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="unit" name="unit" placeholder="轴名"
|
||||
value="${dataVisualBarChartYAxis.unit}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="position" name="position"
|
||||
style="width: 170px;"></select>
|
||||
</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="max" name="max" placeholder="最大值"
|
||||
value="${dataVisualBarChartYAxis.max}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="min" name="min" placeholder="最小值"
|
||||
value="${dataVisualBarChartYAxis.min}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">y轴</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnlineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">y轴颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="linecolorContainer">
|
||||
<input name="linecolor" id="linecolor" type="text" class="form-control"
|
||||
placeholder="y轴颜色"
|
||||
value="${dataVisualBarChartYAxis.linecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">y轴数值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnaxislabelshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数值颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="axislabelcolorContainer">
|
||||
<input name="axislabelcolor" id="axislabelcolor" type="text" class="form-control"
|
||||
placeholder="数值颜色"
|
||||
value="${dataVisualBarChartYAxis.axislabelcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="axislabelfontsize" name="axislabelfontsize"
|
||||
placeholder="数值大小"
|
||||
value="${dataVisualBarChartYAxis.axislabelfontsize}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">y轴刻度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnaxistickshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">y轴分割线</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnsplitlineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">不含0刻度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnscale" type="checkbox"/>
|
||||
</div>
|
||||
</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="doLineChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
105
src/main/webapp/jsp/process/dataVisualCamera4Radio.jsp
Normal file
105
src/main/webapp/jsp/process/dataVisualCamera4Radio.jsp
Normal file
@ -0,0 +1,105 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.scada.MPoint"%>
|
||||
<%request.setAttribute("Flag_Enable",MPoint.Flag_Enable);%>
|
||||
<%request.setAttribute("Flag_Disable",MPoint.Flag_Disable);%>
|
||||
<script type="text/javascript">
|
||||
var dosearchCamera = function() {
|
||||
$("#table_camera").bootstrapTable('refresh');
|
||||
};
|
||||
var $table;
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val(),
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
$(function() {
|
||||
$table=$("#table_camera").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/work/camera/getList.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
clickToSelect:true,//2,设置点击选中当前行
|
||||
singleSelect:true,//3,设置单选
|
||||
// responseHandler:responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'name', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true // 显示一个勾选框
|
||||
},{
|
||||
field: 'name',
|
||||
title: "摄像头名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
}, {
|
||||
field: 'url',
|
||||
title: "摄像头ip",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%',
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_camera");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onCheck:function(row, $element){
|
||||
$('#${param.formId} #${param.hiddenId}' ).val(row.id);
|
||||
$('#${param.formId} #${param.textId}').val(row.name);
|
||||
closeModal("cameraSubModal");
|
||||
},
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="cameraSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择摄像头</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm " style="width: 220px;margin-left:30px">
|
||||
|
||||
<input type="text" id="search_name" name="search_name" class="form-control " placeholder="摄像头名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearchCamera();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 重置</button> -->
|
||||
</div>
|
||||
<div>
|
||||
<table id="table_camera" ></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doselect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
158
src/main/webapp/jsp/process/dataVisualCamera4Select.jsp
Normal file
158
src/main/webapp/jsp/process/dataVisualCamera4Select.jsp
Normal file
@ -0,0 +1,158 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.scada.MPoint"%>
|
||||
<%request.setAttribute("Flag_Enable",MPoint.Flag_Enable);%>
|
||||
<%request.setAttribute("Flag_Disable",MPoint.Flag_Disable);%>
|
||||
<script type="text/javascript">
|
||||
var dosearchCamera = function() {
|
||||
$("#table_camera").bootstrapTable('refresh');
|
||||
};
|
||||
function doselect(dialog,grid) {
|
||||
var checkedItems = $("#table_camera").bootstrapTable('getAllSelections');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
if(datas!=""){
|
||||
datas+=",";
|
||||
}
|
||||
datas+=item.id;
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/process/dataVisualCamera/dosave.do',{frameId:'${param.frameId}',datas:datas},function(data) {
|
||||
closeModal("cameraSubModal");
|
||||
showContent('${param.frameId}');
|
||||
});
|
||||
console.log(datas);
|
||||
closeModal("cameraSubModal")
|
||||
};
|
||||
|
||||
|
||||
var $table;
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name : $('#search_name').val(),
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
$(function() {
|
||||
$table=$("#table_camera").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/work/camera/getList.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect:true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// responseHandler:responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'name', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true // 显示一个勾选框
|
||||
},{
|
||||
field: 'name',
|
||||
title: "摄像头名称",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%'
|
||||
}, {
|
||||
field: 'url',
|
||||
title: "摄像头ip",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '50%',/*
|
||||
formatter:function(value,row,index){
|
||||
return row.processSection.name;
|
||||
}*/
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table_camera");
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
// selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
if($.inArray(id,array)==-1){
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id,array);
|
||||
if(index!=-1){
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union":union,"difference":difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="cameraSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择摄像头</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm " style="width: 220px;margin-left:30px">
|
||||
|
||||
<input type="text" id="search_name" name="search_name" class="form-control " placeholder="摄像头名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearchCamera();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 重置</button> -->
|
||||
</div>
|
||||
<div>
|
||||
<table id="table_camera" ></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doselect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
91
src/main/webapp/jsp/process/dataVisualCameraAlarmEdit.jsp
Normal file
91
src/main/webapp/jsp/process/dataVisualCameraAlarmEdit.jsp
Normal file
@ -0,0 +1,91 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorCKContainer').colorpicker({format: null});
|
||||
$("#jsmethod").select2({minimumResultsForSearch: -1}).val("${dataVisualCameraAlarm.jsmethod}").trigger("change");
|
||||
});
|
||||
|
||||
function doCameraAlarmSave() {
|
||||
let form = $("#mpViewForm").serialize();
|
||||
$.post(ext.contextPath + "/process/dataVisualCameraAlarm/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('cameraAlarmSubModal');
|
||||
$("#cameraAlarmTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="cameraAlarmSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="mpViewForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualCameraAlarm.id}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${dataVisualCameraAlarm.pid}"/>
|
||||
<input type="hidden" name="morder" id="morder" value="${dataVisualCameraAlarm.morder}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">比较方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="jsmethod" name="jsmethod" class="form-control select2">
|
||||
<option value=">" selected>></option>
|
||||
<option value=">=">>=</option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
<option value="<="><=</option>
|
||||
<option value="!=">!=</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">比较值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="jsvalue" name="jsvalue" placeholder="比较值"
|
||||
value="${dataVisualCameraAlarm.jsvalue}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorCKContainer">
|
||||
<input name="color" id="color" type="text" class="form-control"
|
||||
placeholder="颜色"
|
||||
value="${dataVisualCameraAlarm.color}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="doCameraAlarmSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
2779
src/main/webapp/jsp/process/dataVisualConfigureList.jsp
Normal file
2779
src/main/webapp/jsp/process/dataVisualConfigureList.jsp
Normal file
File diff suppressed because it is too large
Load Diff
287
src/main/webapp/jsp/process/dataVisualContainer.jsp
Normal file
287
src/main/webapp/jsp/process/dataVisualContainer.jsp
Normal file
@ -0,0 +1,287 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
.choiceColor2 {
|
||||
background: rgba(121, 116, 116, 0.2);
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#containerC').on('mousedown', 'td', function (e) {
|
||||
$('.choiceColor2').removeClass('choiceColor2');
|
||||
var startLeft = e.clientX;
|
||||
var startTop = e.clientY;
|
||||
var thatTd_ = $(this);
|
||||
|
||||
$(document).on('mousemove', function (e) {
|
||||
var moveLeft = e.clientX;
|
||||
var moveTop = e.clientY;
|
||||
// 动态生成选择区域时占位的碰撞检测块
|
||||
crashPlaceholder(moveLeft, moveTop, startLeft, startTop);
|
||||
// 元素碰撞检测
|
||||
elementCrash();
|
||||
// 处理有表格合并之后的的选择问题 通过检测高度来实现效果
|
||||
formMergeChoice(moveLeft, moveTop)
|
||||
});
|
||||
e.stopPropagation();
|
||||
})
|
||||
// 鼠标抬起事件
|
||||
$(document).on('mouseup', function (e) {
|
||||
$(document).unbind('mousemove');
|
||||
$('.showC').remove();
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// 生成占位块
|
||||
function crashPlaceholder(A, B, C, D) {
|
||||
// 开始的行列
|
||||
var a = A > C ? C : A;
|
||||
var b = B > D ? D : B;
|
||||
|
||||
$('.showC').remove();
|
||||
$('body').append('<div class="showC"></div>');
|
||||
|
||||
$('.showC').css('width', Math.abs(A - C)).css('height', Math.abs(B - D)).css('position', 'fixed').css('left', a).css(
|
||||
'top', b).css('border', '1px dotted black');
|
||||
}
|
||||
|
||||
// 碰撞检测
|
||||
function elementCrash() {
|
||||
$('#containerC td').each(function () {
|
||||
$(this).removeClass('choiceColor2');
|
||||
// 碰撞检测
|
||||
var t1 = $(this).offset().top;
|
||||
var l1 = $(this).offset().left;
|
||||
var r1 = $(this).offset().left + $(this).innerWidth();
|
||||
var b1 = $(this).offset().top + $(this).innerHeight();
|
||||
|
||||
var t2 = $('.showC').offset().top;
|
||||
var l2 = $('.showC').offset().left;
|
||||
var r2 = $('.showC').offset().left + $('.showC').innerWidth();
|
||||
var b2 = $('.showC').offset().top + $('.showC').innerHeight();
|
||||
|
||||
if (b1 < t2 || l1 > r2 || t1 > b2 || r1 < l2) {
|
||||
$(this).removeClass('choiceColor2');
|
||||
} else {
|
||||
$(this).addClass('choiceColor2');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 处理有表格合并之后的的选择问题 通过检测高度来实现效果
|
||||
function formMergeChoice() {
|
||||
var heightArr = [],
|
||||
heightArr1 = [],
|
||||
widthArr = [],
|
||||
widthArr1 = [];
|
||||
$('.choiceColor2').each(function () {
|
||||
heightArr.push($(this).offset().top);
|
||||
heightArr1.push($(this).offset().top + $(this).outerHeight());
|
||||
widthArr.push($(this).offset().left);
|
||||
widthArr1.push($(this).offset().left + $(this).outerWidth());
|
||||
})
|
||||
var minHeight = Math.min.apply(null, heightArr);
|
||||
var maxHeight = Math.max.apply(null, heightArr1);
|
||||
var minWidth = Math.min.apply(null, widthArr);
|
||||
var maxWidth = Math.max.apply(null, widthArr1);
|
||||
$('.showC').outerHeight(maxHeight - minHeight - 3).outerWidth(maxWidth - minWidth).css('top', minHeight).css('left', minWidth);
|
||||
// 当改变碰撞占位检测块之后的高度和定位之后 再次进行碰撞检测
|
||||
elementCrash();
|
||||
|
||||
$('.choiceColor2').each(function () {
|
||||
heightArr.push($(this).offset().top);
|
||||
heightArr1.push($(this).offset().top + $(this).outerHeight());
|
||||
widthArr.push($(this).offset().left);
|
||||
widthArr1.push($(this).offset().left + $(this).outerWidth());
|
||||
})
|
||||
var minHeight1 = Math.min.apply(null, heightArr);
|
||||
var maxHeight1 = Math.max.apply(null, heightArr1);
|
||||
var minWidth1 = Math.min.apply(null, widthArr);
|
||||
var maxWidth1 = Math.max.apply(null, widthArr1);
|
||||
|
||||
// 递归函数
|
||||
if (minHeight == minHeight1 && maxHeight == maxHeight1 && minWidth == minWidth1 && maxWidth == maxWidth1) {
|
||||
return;
|
||||
} else {
|
||||
formMergeChoice();
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
showtable();
|
||||
var containerHeight = (800 * nowFrameHeight) / nowFrameWidth;
|
||||
$('#leftMove').css('height', containerHeight + "px");
|
||||
$('#containerTableDiv').css('height', containerHeight + "px");
|
||||
});
|
||||
|
||||
function doContainerSave() {
|
||||
var insertrow = $('#insertrow').val();
|
||||
var insertcolumn = $('#insertcolumn').val();
|
||||
|
||||
if (insertrow == '') {
|
||||
showAlert('d', '行不能为空');
|
||||
return;
|
||||
}
|
||||
if (insertcolumn == '') {
|
||||
showAlert('d', '列不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrameContainer/dosave.do', {
|
||||
insertrow: insertrow,
|
||||
insertcolumn: insertcolumn,
|
||||
frameId: '${param.frameId}'
|
||||
}, function (data) {
|
||||
$('#containerC').html("");
|
||||
showtable();
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function showtable() {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrameContainer/getJson.do', {frameId: '${param.frameId}'}, function (data) {
|
||||
var html = "";
|
||||
// var trLength=data.length;
|
||||
// $('#containerC').css('height',(trLength*50)+"px");
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var r = data[i];
|
||||
// html += "<tr style=\"height: 50px;\" >"
|
||||
html += "<tr >"
|
||||
if (r.nodes != '') {
|
||||
for (var j = 0; j < r.nodes.length; j++) {
|
||||
var c = r.nodes[j];
|
||||
var width = c.width + "%";
|
||||
var height = c.height + "%";
|
||||
var bkcolor = c.background;
|
||||
|
||||
html += "<td id=" + c.id + " rowspan=" + c.rows + " colspan=" + c.columns + " showRow=" + (r.insertRow) + " showColumn=" + (c.insertColumn) + " style='width:" + width + ";height:" + height + ";background:" + bkcolor + ";border: 1px solid #B0B0B0;' ondblclick=\"containerEdit('" + c.id + "');\" ></td>";
|
||||
}
|
||||
}
|
||||
html += "</tr>"
|
||||
}
|
||||
// console.log(html);
|
||||
$('#containerC').html(html);
|
||||
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doContainerMerge() {
|
||||
var choiceColor2 = $('.choiceColor2');
|
||||
|
||||
if (choiceColor2.length > 1) {
|
||||
var length = choiceColor2.length;
|
||||
|
||||
var firstRow = choiceColor2[0].attributes.showrow.value;
|
||||
var firstColumn = choiceColor2[0].attributes.showcolumn.value;
|
||||
var lastRow = choiceColor2[length - 1].attributes.showrow.value;
|
||||
var lastColumn = choiceColor2[length - 1].attributes.showcolumn.value;
|
||||
|
||||
// console.log(firstRow+","+firstColumn);
|
||||
// console.log(lastRow+","+lastColumn);
|
||||
|
||||
$.post(ext.contextPath + '/process/dataVisualFrameContainer/doContainerMerge.do', {
|
||||
frameId: '${param.frameId}',
|
||||
firstRow: firstRow,
|
||||
firstColumn: firstColumn,
|
||||
lastRow: lastRow,
|
||||
lastColumn: lastColumn
|
||||
}, function (data) {
|
||||
$('#containerC').html("");
|
||||
showtable();
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
//attributes
|
||||
}
|
||||
|
||||
function containerEdit(id) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrameContainer/containerEdit.do', {
|
||||
id: id,
|
||||
frameId: '${param.frameId}'
|
||||
}, function (data) {
|
||||
$("#containerEditDiv").html(data);
|
||||
openModal('containerEditSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="containerSubModal">
|
||||
<div class="modal-dialog" style="width:900px;">
|
||||
<div class="modal-content">
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">容器编辑</h4>
|
||||
</div>
|
||||
<div style="float: left;width: 100%;height: 45px;text-align: center;line-height: 45px;margin-top: 10px;">
|
||||
<div style="float: left;width: 40%;height: 100%;">
|
||||
<div style="float: left;width: 30%;height: 100%;">
|
||||
行
|
||||
</div>
|
||||
<div style="float: left;width: 70%;height: 100%;padding-top:5px;">
|
||||
<input type="number" autocomplete="off" min="1" class="form-control" id="insertrow"
|
||||
name="insertrow" placeholder="行" value="${insertrow}">
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;width: 40%;height: 100%;">
|
||||
<div style="float: left;width: 30%;height: 100%;">
|
||||
列
|
||||
</div>
|
||||
<div style="float: left;width: 70%;height: 100%;padding-top:5px;">
|
||||
<input type="number" autocomplete="off" min="1" class="form-control" id="insertcolumn"
|
||||
name="insertcolumn" placeholder="列" value="${insertcolumn}">
|
||||
</div>
|
||||
</div>
|
||||
<div style="float: left;width: 20%;height: 100%;">
|
||||
<button type="button" class="btn btn-primary" onclick="doContainerSave()" id="btn_save">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="float: left;width: 100%;margin-top: 20px;padding-left: 50px;padding-right: 50px;">
|
||||
<div id="containerTableDiv" style="float: left;width:100%;">
|
||||
<table id="containerC" style="width: 800px;height: 100%;border-collapse: collapse;">
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="float: left;width: 100%;margin-top: 20px;"></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="doContainerMerge()" id="btn_save">合并单元格</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="doContainerSplit()" id="btn_save">拆分单元格</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
82
src/main/webapp/jsp/process/dataVisualContainerEdit.jsp
Normal file
82
src/main/webapp/jsp/process/dataVisualContainerEdit.jsp
Normal file
@ -0,0 +1,82 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({ format: null });
|
||||
});
|
||||
|
||||
function docontainerEditSave() {
|
||||
$("#containerEditSubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#containerEditSubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
var oldwidth=$('#oldwidth').val();
|
||||
var oldheight=$('#oldheight').val();
|
||||
var frameId='${param.frameId}';
|
||||
$.post(ext.contextPath + "/process/dataVisualFrameContainer/doTdupdate.do", $("#containerEditSubForm").serialize()+"&oldwidth="+oldwidth+"&oldheight="+oldheight+"&frameId="+frameId, function(data) {
|
||||
closeModal('containerEditSubModal');
|
||||
showtable();
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="containerEditSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<form class="form-horizontal" id="containerEditSubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualFrameContainer.id}" />
|
||||
<input type="hidden" name="insertcolumn" id="insertcolumn" value="${dataVisualFrameContainer.insertcolumn}" />
|
||||
<input type="hidden" name="columns" id="columns" value="${dataVisualFrameContainer.columns}" />
|
||||
<input type="hidden" name="insertrow" id="insertrow" value="${dataVisualFrameContainer.insertrow}" />
|
||||
<input type="hidden" name="rows" id="rows" value="${dataVisualFrameContainer.rows}" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">宽</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="width" name="width" placeholder="宽"
|
||||
value="${dataVisualFrameContainer.width}">
|
||||
<input type="hidden" class="form-control" id="oldwidth" name="oldwidth" placeholder="宽"
|
||||
value="${dataVisualFrameContainer.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高"
|
||||
value="${dataVisualFrameContainer.height}">
|
||||
<input type="hidden" class="form-control" id="oldheight" name="oldheight" placeholder="高"
|
||||
value="${dataVisualFrameContainer.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer">
|
||||
<input name="background" id="background" type="text" class="form-control" placeholder="背景颜色"
|
||||
value="${dataVisualFrameContainer.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="docontainerEditSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
477
src/main/webapp/jsp/process/dataVisualContentEditForAI.jsp
Normal file
477
src/main/webapp/jsp/process/dataVisualContentEditForAI.jsp
Normal file
@ -0,0 +1,477 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_SignalPoint", DataVisualContent.Type_SignalPoint); %>
|
||||
<%request.setAttribute("Type_DataPoint", DataVisualContent.Type_DataPoint); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.readauto {
|
||||
pointer-events: auto;
|
||||
background-color: #ffffff;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.readonly {
|
||||
pointer-events: none;
|
||||
background-color: #f0f0f0;
|
||||
color: #888888;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer1').colorpicker({format: null});
|
||||
$('#colorContainer2').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#titleSwitchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '开',
|
||||
offText: '关',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualMPoint.titleSwitch}' == 'false') {
|
||||
$('#titleSwitchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualMPoint.titleSwitch}' == 'true') {
|
||||
$('#titleSwitchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#titleSwitchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
}
|
||||
|
||||
$('#unitSwitchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '开',
|
||||
offText: '关',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualMPoint.unitSwitch}' == 'false') {
|
||||
$('#unitSwitchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualMPoint.unitSwitch}' == 'true') {
|
||||
$('#unitSwitchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#unitSwitchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
}
|
||||
|
||||
var showStyleSelectData = JSON.parse("[{\"id\":\"style1\",\"text\":\"样式1\"},{\"id\":\"style2\",\"text\":\"样式2\"}]");
|
||||
var showStyleSelect = $("#showStyle").select2({
|
||||
data: showStyleSelectData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
showStyleSelect.val('${dataVisualMPoint.showStyle}').trigger("change");//设置选中
|
||||
if ('${dataVisualMPoint.showStyle}' == 'style1') {
|
||||
$(".readst").addClass("readauto");
|
||||
} else if ('${dataVisualMPoint.showStyle}' == 'style2') {
|
||||
$(".readst").addClass("readonly");
|
||||
}
|
||||
showStyleSelect.on("change", function (e) {
|
||||
let value = $("#showStyle").val();
|
||||
let element = $(".readst");
|
||||
if (value == 'style1') {
|
||||
element.removeClass("readonly");
|
||||
element.addClass("readauto");
|
||||
} else if (value == 'style2') {
|
||||
element.removeClass("readauto");
|
||||
element.addClass("readonly");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function doMpAIsave1() {
|
||||
$("#subMpAIForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subMpAIForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", $("#subMpAIForm1").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#subMpAIForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subMpAIForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualMPoint/doupdate.do", $("#subMpAIForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doMpAIsave2() {
|
||||
$("#subMpAIForm3").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subMpAIForm3").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subMpAIForm3").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#subMpAIForm4").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subMpAIForm4").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let formD = $("#subMpAIForm4").serialize();
|
||||
const isTitleSwitchStatus = $('#titleSwitchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isTitleSwitchStatus) {
|
||||
formD = formD + "&titleSwitch=true";
|
||||
} else {
|
||||
formD = formD + "&titleSwitch=false";
|
||||
}
|
||||
const isUnitSwitchStatus = $('#unitSwitchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isUnitSwitchStatus) {
|
||||
formD = formD + "&unitSwitch=true";
|
||||
} else {
|
||||
formD = formD + "&unitSwitch=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualMPoint/doupdate.do", formD, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doMpAIdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualMPoint.id}',
|
||||
type: '${Type_DataPoint}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('subModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#subMpAIForm4 #mpid').val(data[0].mpid);
|
||||
$('#subMpAIForm4 #name').val(data[0].parmname);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">详细配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="subMpAIForm1" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">左侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control readst" id="postx" name="postx"
|
||||
placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control readst" id="posty" name="posty"
|
||||
placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control readst" id="height" name="height"
|
||||
placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="subMpAIForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualMPoint.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualMPoint.name}">
|
||||
</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" onclick="doMpAIdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doMpAIsave1()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subMpAIForm3" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control readst" id="height" name="height"
|
||||
placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</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 readst" id="style" name="style"
|
||||
placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="subMpAIForm4" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualMPoint.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualMPoint.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualMPoint.mpid}" onclick="selectmpid();">
|
||||
</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 readst" id="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualMPoint.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control readst"
|
||||
placeholder="文字颜色"
|
||||
value="${dataVisualMPoint.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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 readst" id="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualMPoint.fontweight}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer2">
|
||||
<input name="background" id="background" type="text"
|
||||
class="form-control readst"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualMPoint.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称开关</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="titleSwitchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位开关</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="unitSwitchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">显示样式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="showStyle" name="showStyle"
|
||||
style="width: 170px;"></select>
|
||||
</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" onclick="doMpAIdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doMpAIsave2()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
380
src/main/webapp/jsp/process/dataVisualContentEditForCamera.jsp
Normal file
380
src/main/webapp/jsp/process/dataVisualContentEditForCamera.jsp
Normal file
@ -0,0 +1,380 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Camera", DataVisualContent.Type_Camera); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
initDFun();
|
||||
});
|
||||
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#subForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualCamera/doupdate.do", $("#subForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doCameradel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualCamera.id}',
|
||||
type: '${Type_Camera}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('subModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
<%--showContent('${param.frameId}');--%>
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initDFun() {
|
||||
$("#cameraAlarmTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualCameraAlarm/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualCamera.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'jsmethod', // 返回json数据中的name
|
||||
title: '比较方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'jsvalue', // 返回json数据中的name
|
||||
title: '比较值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editCameraAlarmFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteCameraAlarmFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("svgAlarmTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualCameraAlarm/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#cameraAlarmTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function addCameraAlarm() {
|
||||
$.post(ext.contextPath + "/process/dataVisualCameraAlarm/dosave.do", {pid: '${dataVisualCamera.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#cameraAlarmTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function deleteCameraAlarmFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualCameraAlarm/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#cameraAlarmTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editCameraAlarmFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualCameraAlarm/doedit.do', {id: id}, function (data) {
|
||||
$("#contentDDiv").html(data);
|
||||
openModal('cameraAlarmSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function changeCamera() {
|
||||
$.post(ext.contextPath + '/process/dataVisualCamera/radioListForVisual.do', {
|
||||
formId: 'subForm2',
|
||||
hiddenId: 'cameraid',
|
||||
textId: 'cameraName'
|
||||
}, function (data) {
|
||||
$("#contentDDiv").html(data);
|
||||
openModal('cameraSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function addHQCameraAlarm(){
|
||||
$.post(ext.contextPath + "/process/dataVisualCameraAlarm/doHQCameraAlarmSave.do", {pid: '${dataVisualCamera.id}'}, function (data) {
|
||||
if (data.code >= 1) {
|
||||
$("#cameraAlarmTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-horizontal" id="subForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualCamera.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="cameraName" name="cameraName" placeholder="摄像头"
|
||||
value="${dataVisualCamera.camera.name}" readonly onclick="changeCamera();">
|
||||
<input type="hidden" id="cameraid" name="cameraid" value="${dataVisualCamera.cameraid}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图像颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer">
|
||||
<input name="color" id="color" type="text" class="form-control" placeholder="图像颜色"
|
||||
value="${dataVisualCamera.color}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">mq主题</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="mqTheme" name="mqTheme" placeholder="mq主题名称"
|
||||
value="${dataVisualCamera.mqTheme}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 100px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addCameraAlarm();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" style="width: 120px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addHQCameraAlarm();"><i
|
||||
class="fa fa-plus"></i> 初始数据_虹桥
|
||||
</button>
|
||||
</div>
|
||||
<table id="cameraAlarmTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doCameradel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
324
src/main/webapp/jsp/process/dataVisualContentEditForDI.jsp
Normal file
324
src/main/webapp/jsp/process/dataVisualContentEditForDI.jsp
Normal file
@ -0,0 +1,324 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_SignalPoint", DataVisualContent.Type_SignalPoint); %>
|
||||
<%request.setAttribute("Type_DataPoint", DataVisualContent.Type_DataPoint); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
.readauto {
|
||||
pointer-events: auto;
|
||||
background-color: #ffffff;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.readonly {
|
||||
pointer-events: none;
|
||||
background-color: #f0f0f0;
|
||||
color: #888888;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
var showStyleSelectData = JSON.parse("[{\"id\":\"style1\",\"text\":\"样式1\"},{\"id\":\"style2\",\"text\":\"样式2\"}]");
|
||||
var showStyleSelect = $("#showStyle").select2({
|
||||
data: showStyleSelectData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
showStyleSelect.val('${dataVisualMPoint.showStyle}').trigger("change");//设置选中
|
||||
if ('${dataVisualMPoint.showStyle}' == 'style1') {
|
||||
$(".readst1").addClass("readauto");
|
||||
$(".readst2").addClass("readonly");
|
||||
} else if ('${dataVisualMPoint.showStyle}' == 'style2') {
|
||||
$(".readst2").addClass("readauto");
|
||||
$(".readst1").addClass("readonly");
|
||||
} else {
|
||||
$(".readst1").addClass("readauto");
|
||||
$(".readst2").addClass("readonly");
|
||||
}
|
||||
showStyleSelect.on("change", function (e) {
|
||||
let value = $("#showStyle").val();
|
||||
let element1 = $(".readst1");
|
||||
let element2 = $(".readst2");
|
||||
if (value == 'style1') {
|
||||
element1.removeClass("readonly");
|
||||
element1.addClass("readauto");
|
||||
element2.removeClass("readauto");
|
||||
element2.addClass("readonly");
|
||||
} else if (value == 'style2') {
|
||||
element2.removeClass("readonly");
|
||||
element2.addClass("readauto");
|
||||
element1.removeClass("readauto");
|
||||
element1.addClass("readonly");
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
function doMpDIsave() {
|
||||
$("#MpDIsubForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#MpDIsubForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#MpDIsubForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#MpDIsubForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#MpDIsubForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualMPoint/doupdate.do", $("#MpDIsubForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doMpDIdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualMPoint.id}',
|
||||
type: '${Type_DataPoint}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('subModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#MpDIsubForm2 #mpid').val(data[0].mpid);
|
||||
$('#MpDIsubForm2 #name').val(data[0].parmname);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
function doMpDICopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualMPoint/doMpDICopy.do', {
|
||||
contentId: '${dataVisualContent.id}',
|
||||
id: '${dataVisualMPoint.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="MpDIsubForm1" autocomplete="off">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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 readst2" id="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control readst2" id="height" name="height"
|
||||
placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="MpDIsubForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualMPoint.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualMPoint.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualMPoint.mpid}" onclick="selectmpid();">
|
||||
</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 readst1" id="fontsize" name="fontsize"
|
||||
placeholder="大小"
|
||||
value="${dataVisualMPoint.fontsize}">
|
||||
</div>
|
||||
<%-- <label class="col-sm-2 control-label">文字颜色</label>--%>
|
||||
<%-- <div class="col-sm-4">--%>
|
||||
<%-- <div class="input-group" id="colorContainer">--%>
|
||||
<%-- <input name="fontcolor" id="fontcolor" type="text" class="form-control readst1"--%>
|
||||
<%-- placeholder="文字颜色"--%>
|
||||
<%-- value="${dataVisualMPoint.fontcolor}">--%>
|
||||
<%-- <div class="input-group-addon">--%>
|
||||
<%-- <i></i>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<label class="col-sm-2 control-label">显示样式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="showStyle" name="showStyle"
|
||||
style="width: 170px;"></select>
|
||||
</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" onclick="doMpDIdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doMpDICopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doMpDIsave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
266
src/main/webapp/jsp/process/dataVisualContentEditForIframe.jsp
Normal file
266
src/main/webapp/jsp/process/dataVisualContentEditForIframe.jsp
Normal file
@ -0,0 +1,266 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Iframe", DataVisualContent.Type_Iframe); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<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>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function doIframesave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('iframeSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doIframeDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_Iframe}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('iframeSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doIframeCopy(){
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/doIframeCopy.do', {
|
||||
contentId: '${dataVisualContent.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('iframeSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="iframeSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">id</label>
|
||||
<label class="col-sm-4 control-label">${dataVisualContent.id}</label>
|
||||
</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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualContent.name}">
|
||||
</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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualContent.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <label class="col-sm-2 control-label">刷新时间</label>--%>
|
||||
<%-- <div class="col-sm-3">--%>
|
||||
<%-- <input type="text" class="form-control" id="refreshtime" name="refreshtime"--%>
|
||||
<%-- placeholder="刷新时间"--%>
|
||||
<%-- value="${dataVisualContent.refreshtime}">--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <div class="col-sm-1">--%>
|
||||
<%-- <div style="line-height: 34px;text-align: center;">min</div>--%>
|
||||
<%-- </div>--%>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</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="src" name="src" placeholder="链接地址"
|
||||
value="${dataVisualContent.src}">
|
||||
</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" onclick="doIframeDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doIframeCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doIframesave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
190
src/main/webapp/jsp/process/dataVisualContentEditForLine.jsp
Normal file
190
src/main/webapp/jsp/process/dataVisualContentEditForLine.jsp
Normal file
@ -0,0 +1,190 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Line", DataVisualContent.Type_Line); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
|
||||
|
||||
});
|
||||
|
||||
function doLinesave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('lineSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doLineDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_Line}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('lineSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="lineSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">id</label>
|
||||
<label class="col-sm-4 control-label">${dataVisualContent.id}</label>
|
||||
</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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualContent.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</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" onclick="doLineDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doLinesave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
382
src/main/webapp/jsp/process/dataVisualContentEditForPicture.jsp
Normal file
382
src/main/webapp/jsp/process/dataVisualContentEditForPicture.jsp
Normal file
@ -0,0 +1,382 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Picture", DataVisualContent.Type_Picture); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<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>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var masterId = '${dataVisualContent.id}';
|
||||
var tbName = 'tb_pro_dataVisual_picture_file'; //数据表
|
||||
var nameSpace = 'dataVisualPicture';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
var fileinput = function () {
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
//名称定义不可修改
|
||||
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();
|
||||
// $('#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, "\/");
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("dataVisualPictureFile");
|
||||
} else {
|
||||
$('#dataVisualPictureFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsvoiceknow').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isvoiceknow}' == 'false') {
|
||||
$('#switchBtnIsvoiceknow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isvoiceknow}' == 'true') {
|
||||
$('#switchBtnIsvoiceknow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsvoiceknow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
getFileList();
|
||||
|
||||
});
|
||||
|
||||
function doPicturesave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
const isvoiceknowStatus = $('#switchBtnIsvoiceknow').bootstrapSwitch('state');
|
||||
if (isvoiceknowStatus) {
|
||||
form = form + "&isvoiceknow=true";
|
||||
} else {
|
||||
form = form + "&isvoiceknow=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('pictureSubModal');
|
||||
if('${dataVisualContent.istab}'=='true'){
|
||||
showOneContent('${dataVisualContent.id}','tab');
|
||||
}else{
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doPictureDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_Picture}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('pictureSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="pictureSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">id</label>
|
||||
<label class="col-sm-4 control-label">${dataVisualContent.id}</label>
|
||||
</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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualContent.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="form-group">--%>
|
||||
<%-- <label class="col-sm-2 control-label">语音识别</label>--%>
|
||||
<%-- <div class="col-sm-4">--%>
|
||||
<%-- <div class="switch" data-on="primary" data-off="info">--%>
|
||||
<%-- <input id="switchBtnIsvoiceknow" type="checkbox"/>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <label class="col-sm-2 control-label">识别文字</label>--%>
|
||||
<%-- <div class="col-sm-4">--%>
|
||||
<%-- <input type="text" class="form-control" id="voicetext" name="voicetext" placeholder="识别文字"--%>
|
||||
<%-- value="${dataVisualContent.voicetext}">--%>
|
||||
<%-- </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="voicemethod" name="voicemethod" placeholder="启用方法"--%>
|
||||
<%-- value="${dataVisualContent.voicemethod}">--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save">
|
||||
<i
|
||||
class="fa fa-paperclip"></i>上传图片
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="file" name="dataVisualPictureFile" id="dataVisualPictureFile" multiple
|
||||
class="file-loading"/>
|
||||
</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" onclick="doPictureDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPicturesave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@ -0,0 +1,325 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_SelectJump", DataVisualContent.Type_SelectJump); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
|
||||
initDFun();
|
||||
});
|
||||
|
||||
function doSelectJumpsave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('selectJumpSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doSelectJumpDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_SelectJump}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('selectJumpSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSelectJump() {
|
||||
$.post(ext.contextPath + "/process/dataVisualSelect/dosave.do", {pid: '${dataVisualContent.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#selectJumpTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function initDFun() {
|
||||
$("#selectJumpTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualSelect/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualContent.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'textcontent', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSelectFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSelectFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("selectJumpTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualSelect/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#selectJumpTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function deleteSelectFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualSelect/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#selectJumpTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editSelectFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualSelect/doedit.do', {id: id}, function (data) {
|
||||
$("#contentDDiv").html(data);
|
||||
openModal('selectJumpDSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="selectJumpSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">id</label>
|
||||
<label class="col-sm-4 control-label">${dataVisualContent.id}</label>
|
||||
</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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualContent.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 100px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSelectJump();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<table id="selectJumpTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</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" onclick="doSelectJumpDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelectJumpsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
600
src/main/webapp/jsp/process/dataVisualContentEditForText.jsp
Normal file
600
src/main/webapp/jsp/process/dataVisualContentEditForText.jsp
Normal file
@ -0,0 +1,600 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Text", DataVisualContent.Type_Text); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualText" %>
|
||||
<%request.setAttribute("Click_ShowFrame", DataVisualText.Click_ShowFrame); %>
|
||||
<%request.setAttribute("Click_OpenFrame", DataVisualText.Click_OpenFrame); %>
|
||||
<%request.setAttribute("Click_TabFrame", DataVisualText.Click_TabFrame); %>
|
||||
<%request.setAttribute("Click_OpenLine", DataVisualText.Click_OpenLine); %>
|
||||
<%request.setAttribute("Click_RoundTime", DataVisualText.Click_RoundTime); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
||||
<%request.setAttribute("MenuType_ProVisual", DataVisualFrame.MenuType_ProVisual); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
||||
<%request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer1').colorpicker({format: null});
|
||||
$('#colorContainer2').colorpicker({format: null});
|
||||
|
||||
$("#clickname").select2({minimumResultsForSearch: -1}).val("${dataVisualText.clickname}").trigger("change");
|
||||
|
||||
if ("${dataVisualText.clickname}" == "${Click_ShowFrame}" || "${dataVisualText.clickname}" == "${Click_OpenFrame}" || "${dataVisualText.clickname}" == "${Click_TabFrame}") {
|
||||
$("#showFrameDiv").css('display', 'block');
|
||||
<%--if ("${dataVisualText.clickname}" == "${Click_OpenFrame}" || "${dataVisualText.clickname}" == "${Click_TabFrame}") {--%>
|
||||
$("#urlstringShow").css('display', 'block');
|
||||
// }
|
||||
} else if ("${dataVisualText.clickname}" == "${Click_OpenLine}") {
|
||||
$("#showChartMpids").css('display', 'block');
|
||||
} else if ("${dataVisualText.clickname}" == "${Click_RoundTime}") {
|
||||
$("#showRoundTime").css('display', 'block');
|
||||
}
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualFrame/getFrame.do", {id: '${dataVisualText.clickparameter}'}, function (data) {
|
||||
if (data != null) {
|
||||
$("#showFrameSelectName").val(data.name);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualFrame/getFrameTree.do", {
|
||||
unitId: unitId
|
||||
// menuType: '${MenuType_ProVisual}'
|
||||
}, function (data) {
|
||||
$('#showFrameSelectTree').treeview({
|
||||
data: data,
|
||||
showBorder: false,
|
||||
showCheckbox: false,
|
||||
levels: 2
|
||||
});
|
||||
$('#showFrameSelectTree').on('nodeSelected', function (event, data) {
|
||||
if (data.type == '${Type_frame}') {
|
||||
$("#clickparameter").val(data.id);
|
||||
$("#showFrameSelectName").val(data.text);
|
||||
$("#showFrameSelect").hide();
|
||||
}
|
||||
});
|
||||
}, 'json');
|
||||
|
||||
|
||||
$("#clickname").change(function () {
|
||||
var clickname = $("#clickname").val();
|
||||
if (clickname == "${Click_ShowFrame}" || clickname == "${Click_OpenFrame}" || clickname == "${Click_TabFrame}") {
|
||||
$("#showFrameDiv").css('display', 'block');
|
||||
$("#showChartMpids").css('display', 'none');
|
||||
$("#showRoundTime").css('display', 'none');
|
||||
<%--if (clickname == "${Click_OpenFrame}" || clickname == "${Click_TabFrame}") {--%>
|
||||
$("#urlstringShow").css('display', 'block');
|
||||
// } else {
|
||||
// $("#urlstringShow").css('display', 'none');
|
||||
// }
|
||||
} else if (clickname == "${Click_OpenLine}") {
|
||||
$("#showChartMpids").css('display', 'block');
|
||||
$("#showFrameDiv").css('display', 'none');
|
||||
$("#showRoundTime").css('display', 'none');
|
||||
$("#urlstringShow").css('display', 'none');
|
||||
} else if (clickname == "${Click_RoundTime}") {
|
||||
$("#showRoundTime").css('display', 'block');
|
||||
$("#showChartMpids").css('display', 'none');
|
||||
$("#showFrameDiv").css('display', 'none');
|
||||
$("#urlstringShow").css('display', 'none');
|
||||
} else {
|
||||
$("#showChartMpids").css('display', 'none');
|
||||
$("#showFrameDiv").css('display', 'none');
|
||||
$("#showRoundTime").css('display', 'none');
|
||||
$("#urlstringShow").css('display', 'none');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var dataTextalign = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectTextalign = $("#textalign").select2({
|
||||
data: dataTextalign,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectTextalign.val('${dataVisualText.textalign}').trigger("change");//设置选中
|
||||
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualText.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnUnitSt').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualText.unitst}' == 'false') {
|
||||
$('#switchBtnUnitSt').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualText.unitst}' == 'true') {
|
||||
$('#switchBtnUnitSt').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnUnitSt').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doTextsave() {
|
||||
$("#subForm3").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm3").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm3").serialize();
|
||||
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#subForm4").bootstrapValidator('validate');//提交验证
|
||||
|
||||
let form = $("#subForm4").serialize();
|
||||
|
||||
const unitStStatus = $('#switchBtnUnitSt').bootstrapSwitch('state');
|
||||
if (unitStStatus) {
|
||||
form = form + "&unitst=true";
|
||||
} else {
|
||||
form = form + "&unitst=false";
|
||||
}
|
||||
if ($("#subForm4").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualText/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doContentDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualText.id}',
|
||||
type: '${Type_Text}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('subModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doTextCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualText/doTextCopy.do', {
|
||||
contentId: '${dataVisualContent.id}',
|
||||
id: '${dataVisualText.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#subForm4 #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
|
||||
function selectmpids() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointList4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidsDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidsDone(data) {
|
||||
$('#subForm4 #chartmpids').val(data);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm3" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="subForm4" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualText.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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualText.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">显示单位</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnUnitSt" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">系数</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="rate" name="rate" placeholder="系数"
|
||||
value="${dataVisualText.rate}">
|
||||
</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="urldata" name="urldata"
|
||||
placeholder="接口数据"
|
||||
value="${dataVisualText.urldata}">
|
||||
</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="numtail" name="numtail"
|
||||
placeholder="小数位"
|
||||
value="${dataVisualText.numtail}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="textcontent" name="textcontent" style="width:100%;height:66px;"
|
||||
wrap="soft">${dataVisualText.textcontent}</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualText.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="文字颜色"
|
||||
value="${dataVisualText.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualText.fontweight}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer2">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualText.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文字位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="textalign" name="textalign"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="textheight" name="textheight"
|
||||
placeholder="文字高度"
|
||||
value="${dataVisualText.textheight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">点击事件</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="clickname" name="clickname"
|
||||
style="width: 170px;">
|
||||
<option value="-" selected="selected">无</option>
|
||||
<option value="${Click_ShowFrame}" selected="selected">画面跳转</option>
|
||||
<option value="${Click_OpenFrame}" selected="selected">弹出画面</option>
|
||||
<option value="${Click_TabFrame}" selected="selected">tab画面</option>
|
||||
<option value="${Click_OpenLine}" selected="selected">弹出曲线</option>
|
||||
<option value="${Click_RoundTime}" selected="selected">轮巡展示</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="showFrameDiv" style="display: none;">
|
||||
<label class="col-sm-2 control-label">画面选择</label>
|
||||
<div class="col-sm-4">
|
||||
<ul style="list-style-type:none;padding-left:0px;margin-top:0px;width:170px;">
|
||||
<li class="dropdown messages-menu">
|
||||
<!-- Menu toggle button -->
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"
|
||||
style="width:170px;"
|
||||
onclick="document.getElementById('showFrameSelect').style.display = 'block';">
|
||||
<div class="input-group" style="height: 25px">
|
||||
<input type="hidden" name="clickparameter" id="clickparameter"
|
||||
value="${dataVisualText.clickparameter}"/>
|
||||
<input class="form-control " id="showFrameSelectName"
|
||||
name="showFrameSelectName"
|
||||
style="height:28px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;text-align:center;"
|
||||
readonly/>
|
||||
</div>
|
||||
</a>
|
||||
<ul id="showFrameSelect" class="dropdown-menu"
|
||||
data-stopPropagation="true">
|
||||
<li>
|
||||
<div id="showFrameSelectTree"
|
||||
style="width: 170px;height:250px;overflow:auto;"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="urlstringShow" style="display: none;">
|
||||
<label class="col-sm-2 control-label">画面地址</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="urlstring" name="urlstring"
|
||||
placeholder="画面地址" value="${dataVisualText.urlstring}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="showChartMpids" class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label">曲线测点</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="chartmpids" name="chartmpids"
|
||||
placeholder="曲线测点" onclick="selectmpids();"
|
||||
value="${dataVisualText.chartmpids}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="showRoundTime" class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label">组件id</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="roundtimeid" name="roundtimeid"
|
||||
placeholder="组件id"
|
||||
value="${dataVisualText.roundtimeid}">
|
||||
</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" onclick="doContentDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doTextCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doTextsave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
216
src/main/webapp/jsp/process/dataVisualContentMPoint4Select.jsp
Normal file
216
src/main/webapp/jsp/process/dataVisualContentMPoint4Select.jsp
Normal file
@ -0,0 +1,216 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html>
|
||||
<script type="text/javascript">
|
||||
var doSearchPatrolPoint = function() {
|
||||
$("#table_patrolPoint4Select").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doSelect(dialog,grid) {
|
||||
//var checkedItems = $("#table_user").bootstrapTable('getAllSelections');
|
||||
var datas="";
|
||||
datas_name="";
|
||||
$.each(selectionIds, function(index, item){
|
||||
if(datas!=""){
|
||||
datas+=",";
|
||||
}
|
||||
datas+=item;
|
||||
});
|
||||
$.post(ext.contextPath + '/process/dataVisualMPoint/dosave.do',{frameId:'${param.frameId}',datas:datas,unitId:unitId},function(data) {
|
||||
closeModal("MPointModel");
|
||||
showContent('${param.frameId}');
|
||||
});
|
||||
};
|
||||
|
||||
var $table;
|
||||
var switchStatus=false;
|
||||
var selectionIds = [];
|
||||
|
||||
function queryParams(params) {
|
||||
var temp={
|
||||
rows: params.limit,
|
||||
page: params.offset/params.limit+1,
|
||||
sort: params.sort,
|
||||
order: params.order,
|
||||
search_name: $('#search_mpointcode').val(),
|
||||
signalType:$('#signalType').val(),
|
||||
unitId: '${param.unitId}'
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function() {
|
||||
console.log('${param.unitId}')
|
||||
$(".select2-selection--single").css({'height':'30px','paddingTop':'4px'});
|
||||
|
||||
// initialSelectionIds();
|
||||
|
||||
$table=$("#table_patrolPoint4Select").bootstrapTable({
|
||||
url: ext.contextPath + '/work/mpoint/getlistES.do',
|
||||
clickToSelect:true,
|
||||
striped: true,
|
||||
pagination: true,
|
||||
pageList: [10, 20],
|
||||
pageSize: 20,
|
||||
pageNumber: 1,
|
||||
sidePagination: 'server',
|
||||
clickToSelect:true,
|
||||
responseHandler:responseHandler,
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id',
|
||||
sortOrder: 'asc',
|
||||
columns: [
|
||||
{
|
||||
checkbox: true,
|
||||
formatter: function (i,row) {
|
||||
if($.inArray(row.id,Array.from(selectionIds))!=-1){
|
||||
return {
|
||||
checked : true
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
field: 'parmname',
|
||||
title: "名称",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'mpointcode',
|
||||
title: "测量点Code",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'parmvalue',
|
||||
title: "当前值",
|
||||
align: 'center',
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'unit',
|
||||
title: "单位",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'measuredt',
|
||||
title: "时间",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'numtail',
|
||||
title: "精度",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'signalType',
|
||||
title: "信号类型",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
},{
|
||||
field: 'signalType',
|
||||
title: "信号类型",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){
|
||||
adjustBootstrapTableView("table_patrolPoint4Select");
|
||||
},
|
||||
onLoadError: function(){
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e,rows, obj) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
if('check'==e.type){
|
||||
obj.parent().addClass("checked");
|
||||
}else{
|
||||
obj.parent().removeClass("checked");
|
||||
}
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
if($.inArray(id,array)==-1){
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function(array,ids){
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id,array);
|
||||
if(index!=-1){
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union":union,"difference":difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1;
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="MPointModel">
|
||||
<div class="modal-dialog" style="width: 1200px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择测量点</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="form-group " style="margin-bottom:10px;">
|
||||
<input id="search_code" name="search_code" type="hidden" />
|
||||
<span id="company" style="height:31px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold"></span>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-right form-inline" >
|
||||
|
||||
<div class="form-group pull-left form-inline" style="float: left;width: 120px;margin-top: 5px;">
|
||||
<label class="col-sm-4 control-label" style="line-height: 30px;padding: 0px;">信号</label>
|
||||
<div class="col-sm-8 control-label" >
|
||||
<select id ="signalType" name="signalType" class="form-control select2" style="padding: 0px;width: 60px;height: 30px;border-radius:4px;border:1px solid #aaa;" onchange="changeSignalType(this);">
|
||||
<option value="-1" >全部</option>
|
||||
<option value="AI" >AI</option>
|
||||
<option value="DI" >DI</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group pull-left form-inline" style="float: left;width: 250px;margin-top: 5px;">
|
||||
<div class="input-group input-group-sm " style="width: 230px;">
|
||||
<input type="text" id="search_mpointcode" name="search_mpointcode" class="form-control pull-right" placeholder="点位查询">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="doSearchPatrolPoint();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 重置</button> -->
|
||||
</div>
|
||||
<div class="table-scrollable">
|
||||
<table class="table table-bordered table-striped" style="overflow:auto;width:100%" id="table_patrolPoint4Select"></table>
|
||||
</div>
|
||||
</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="doSelect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
283
src/main/webapp/jsp/process/dataVisualDateEdit.jsp
Normal file
283
src/main/webapp/jsp/process/dataVisualDateEdit.jsp
Normal file
@ -0,0 +1,283 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualDate" %>
|
||||
<%request.setAttribute("Types_Date_Year", DataVisualDate.Types_Date_Year); %>
|
||||
<%request.setAttribute("Types_Date_Month", DataVisualDate.Types_Date_Month); %>
|
||||
<%request.setAttribute("Types_Date_Day", DataVisualDate.Types_Date_Day); %>
|
||||
<%request.setAttribute("Types_Date_Hour", DataVisualDate.Types_Date_Hour); %>
|
||||
<%request.setAttribute("Types_Date_Min", DataVisualDate.Types_Date_Min); %>
|
||||
<%request.setAttribute("Types_Date_Sec", DataVisualDate.Types_Date_Sec); %>
|
||||
<%request.setAttribute("Types_Date_Week", DataVisualDate.Types_Date_Week); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Date", DataVisualContent.Type_Date); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({format: null});
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var textAlignPosition = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selecttextAlign = $("#textAlign").select2({
|
||||
data: textAlignPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selecttextAlign.val('${dataVisualDate.textAlign}').trigger("change");//设置选中
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doDatesave() {
|
||||
$("#datesubForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#datesubForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#datesubForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#datesubForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#datesubForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualDate/doupdate.do", $("#datesubForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('dateSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doDatedel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualDate.id}',
|
||||
type: '${Type_Date}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('dateSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="dateSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="datesubForm1" autocomplete="off">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">sec</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="datesubForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualDate.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">日期类型</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="types" name="types" placeholder="日期类型"
|
||||
value="${dataVisualDate.types}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualDate.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="字体颜色"
|
||||
value="${dataVisualDate.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontsize" name="fontsize" placeholder="字体大小"
|
||||
value="${dataVisualDate.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fontweight" name="fontweight" placeholder="字体粗细"
|
||||
value="${dataVisualDate.fontweight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文字位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="textAlign" name="textAlign"
|
||||
style="width: 170px;"></select>
|
||||
</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" onclick="doDatedel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doDatesave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
241
src/main/webapp/jsp/process/dataVisualDateSelectEdit.jsp
Normal file
241
src/main/webapp/jsp/process/dataVisualDateSelectEdit.jsp
Normal file
@ -0,0 +1,241 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_DateSelect", DataVisualContent.Type_DateSelect); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#fontcolorContainer').colorpicker({format: null});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var typePosition = JSON.parse("[{\"id\":\"0\",\"text\":\"日-单日历\"},{\"id\":\"1\",\"text\":\"月-单日历\"},{\"id\":\"2\",\"text\":\"年-单日历\"},{\"id\":\"3\",\"text\":\"日-双日历\"},{\"id\":\"4\",\"text\":\"月-双日历\"},{\"id\":\"5\",\"text\":\"年-双日历\"}]");
|
||||
var selecttype = $("#type").select2({
|
||||
data: typePosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selecttype.val('${dataVisualDateSelect.type}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doDateSelectsave() {
|
||||
$("#dateSelectsubForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#dateSelectsubForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", $("#dateSelectsubForm1").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#dateSelectsubForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#dateSelectsubForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualDateSelect/doupdate.do", $("#dateSelectsubForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('dateSelectSubModal');
|
||||
if('${dataVisualContent.istab}'=='true'){
|
||||
showOneContent('${dataVisualContent.id}','tab');
|
||||
}else{
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doDateSelectdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualDateSelect.id}',
|
||||
type: '${Type_DateSelect}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('dateSelectSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="dateSelectSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="dateSelectsubForm1" autocomplete="off">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<!-- <label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div> -->
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="dateSelectsubForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualDateSelect.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="type" name="type"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualDateSelect.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="fontcolorContainer">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="字体颜色"
|
||||
value="${dataVisualDateSelect.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontsize" name="fontsize" placeholder="字体大小"
|
||||
value="${dataVisualDateSelect.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fontweight" name="fontweight" placeholder="字体粗细"
|
||||
value="${dataVisualDateSelect.fontweight}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualDateSelect.style}">
|
||||
</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" onclick="doDateSelectdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doDateSelectsave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
165
src/main/webapp/jsp/process/dataVisualEqPoints4Select.jsp
Normal file
165
src/main/webapp/jsp/process/dataVisualEqPoints4Select.jsp
Normal file
@ -0,0 +1,165 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager" %>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.scada.MPoint" %>
|
||||
<%request.setAttribute("Flag_Enable", MPoint.Flag_Enable);%>
|
||||
<%request.setAttribute("Flag_Disable", MPoint.Flag_Disable);%>
|
||||
<script type="text/javascript">
|
||||
var dosearchTaskPoints = function () {
|
||||
$("#table_eqPoints").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doselect(dialog, grid) {
|
||||
var checkedItems = $("#table_eqPoints").bootstrapTable('getAllSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
if (datas != "") {
|
||||
datas += ",";
|
||||
}
|
||||
datas += item.id;
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/process/dataVisualEqPoints/dosave.do', {
|
||||
frameId: '${param.frameId}',
|
||||
datas: datas
|
||||
}, function (data) {
|
||||
closeModal("eqPointsSubModal");
|
||||
showContent('${param.frameId}');
|
||||
});
|
||||
closeModal("eqPointsSubModal")
|
||||
};
|
||||
|
||||
|
||||
var $table;
|
||||
|
||||
function queryParams(params) {
|
||||
var temp = {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
classNames: "特种设备",
|
||||
search_name: $('#search_name').val()
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$table = $("#table_eqPoints").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/equipment/getList4EquipmentCard.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect: true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// responseHandler:responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
}, {
|
||||
field: 'equipmentcardid', // 返回json数据中的number
|
||||
title: '编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'equipmentname', // 返回json数据中的number
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'equipmentClass.name', // 返回json数据中的number
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_eqPoints");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
// selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="eqPointsSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择任务点</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div class="form-group pull-right form-inline">
|
||||
<div class="input-group input-group-sm " style="width: 220px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control " placeholder="编号/名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearchTaskPoints();"><i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 重置</button> -->
|
||||
</div>
|
||||
<div>
|
||||
<table id="table_eqPoints"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doselect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
191
src/main/webapp/jsp/process/dataVisualEqPointsEdit.jsp
Normal file
191
src/main/webapp/jsp/process/dataVisualEqPointsEdit.jsp
Normal file
@ -0,0 +1,191 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_EqPoints", DataVisualContent.Type_EqPoints); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doEqPointsSave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('eqPointsSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
<%--$("#subForm2").bootstrapValidator('validate');//提交验证--%>
|
||||
<%--if ($("#subForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码--%>
|
||||
|
||||
<%-- $.post(ext.contextPath + "/process/dataVisualEqPoints/doupdate.do", $("#subForm2").serialize(), function (data) {--%>
|
||||
<%-- if (data.code == 1) {--%>
|
||||
<%-- closeModal('subModal');--%>
|
||||
<%-- if ('${dataVisualContent.istab}' == 'true') {--%>
|
||||
<%-- showOneContent('${dataVisualContent.id}', 'tab');--%>
|
||||
<%-- } else {--%>
|
||||
<%-- showOneContent('${dataVisualContent.id}');--%>
|
||||
<%-- }--%>
|
||||
<%-- } else if (data.code == 0) {--%>
|
||||
<%-- showAlert('d', '保存失败');--%>
|
||||
<%-- } else {--%>
|
||||
<%-- showAlert('d', data.res);--%>
|
||||
<%-- }--%>
|
||||
<%-- }, 'json');--%>
|
||||
<%--}--%>
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doEqPointsdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualEqPoints.id}',
|
||||
type: '${Type_EqPoints}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('eqPointsSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="eqPointsSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<%-- <form class="form-horizontal" id="subForm2" autocomplete="off">--%>
|
||||
<%-- <!-- 界面提醒div强制id为alertDiv -->--%>
|
||||
<%-- <input type="hidden" name="id" id="id" value="${dataVisualEqPoints.id}"/>--%>
|
||||
|
||||
<%-- <div class="form-group">--%>
|
||||
|
||||
<%-- </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" onclick="doEqPointsdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doEqPointsSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
315
src/main/webapp/jsp/process/dataVisualFormContainer.jsp
Normal file
315
src/main/webapp/jsp/process/dataVisualFormContainer.jsp
Normal file
@ -0,0 +1,315 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Form", DataVisualContent.Type_Form); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('containerFormSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doContentFormDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_Form}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('containerFormSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doContainerSave() {
|
||||
var insertrow = $('#insertrow').val();
|
||||
var insertcolumn = $('#insertcolumn').val();
|
||||
|
||||
if (insertrow == '') {
|
||||
showAlert('d', '行不能为空');
|
||||
return;
|
||||
}
|
||||
if (insertcolumn == '') {
|
||||
showAlert('d', '列不能为空');
|
||||
return;
|
||||
}
|
||||
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualForm/doRCsave.do', {
|
||||
insertrow: insertrow,
|
||||
insertcolumn: insertcolumn,
|
||||
frameId: '${dataVisualContent.id}'
|
||||
}, function (data) {
|
||||
closeModal('containerFormSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
function doTextCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualForm/doTextCopy.do', {
|
||||
contentId: '${dataVisualContent.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('containerFormSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="containerFormSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">行</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="number" autocomplete="off" min="1" class="form-control" id="insertrow"
|
||||
name="insertrow" placeholder="行" value="${insertrow}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">列</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="number" autocomplete="off" min="1" class="form-control" id="insertcolumn"
|
||||
name="insertcolumn" placeholder="列" value="${insertcolumn}">
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-primary" onclick="doContainerSave()">确认</button>
|
||||
</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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</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="roundtimecontent" name="roundtimecontent"
|
||||
placeholder="轮巡顺序"
|
||||
value="${dataVisualContent.roundtimecontent}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">组件id</label>
|
||||
<div class="col-sm-10">
|
||||
${dataVisualContent.id}
|
||||
</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" onclick="doContentFormDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doTextCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
758
src/main/webapp/jsp/process/dataVisualFormContainerEdit.jsp
Normal file
758
src/main/webapp/jsp/process/dataVisualFormContainerEdit.jsp
Normal file
@ -0,0 +1,758 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({format: null});
|
||||
$('#colorContainer1').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnUnitSt').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualForm.unitst}' == 'false') {
|
||||
$('#switchBtnUnitSt').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualForm.unitst}' == 'true') {
|
||||
$('#switchBtnUnitSt').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnUnitSt').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnTimeSt').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualForm.timest}' == 'false') {
|
||||
$('#switchBtnTimeSt').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualForm.timest}' == 'true') {
|
||||
$('#switchBtnTimeSt').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnTimeSt').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnSqlst').bootstrapSwitch({
|
||||
onText: '开',
|
||||
offText: '关',
|
||||
size: "small",
|
||||
onSwitchChange: function () {
|
||||
//.prop方法查看input的checked属性,即使查看其开关状态
|
||||
var checkedOfAll = $("#switchBtnSqlst").prop("checked");
|
||||
//false、true对应input的checked属性,显示和隐藏输入框
|
||||
if (checkedOfAll == false) {
|
||||
$('#sqlcontentSt').css('display', 'none');
|
||||
} else {
|
||||
$('#sqlcontentSt').css('display', 'block');
|
||||
}
|
||||
}
|
||||
});
|
||||
if ('${dataVisualForm.sqlst}' == 'false') {
|
||||
$('#switchBtnSqlst').bootstrapSwitch('state', false, true);
|
||||
$('#sqlcontentSt').css('display', 'none');
|
||||
} else if ('${dataVisualForm.sqlst}' == 'true') {
|
||||
$('#switchBtnSqlst').bootstrapSwitch('state', true, true);
|
||||
$('#sqlcontentSt').css('display', 'block');
|
||||
} else {
|
||||
$('#switchBtnSqlst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnRowStyleSt').bootstrapSwitch({
|
||||
onText: '开',
|
||||
offText: '关',
|
||||
size: "small",
|
||||
onSwitchChange: function () {
|
||||
//.prop方法查看input的checked属性,即使查看其开关状态
|
||||
var checkedOfAll = $("#switchBtnRowStyleSt").prop("checked");
|
||||
//false、true对应input的checked属性,显示和隐藏输入框
|
||||
if (checkedOfAll == false) {
|
||||
$('#RowStyleSt').css('display', 'none');
|
||||
} else {
|
||||
$('#RowStyleSt').css('display', 'block');
|
||||
}
|
||||
}
|
||||
});
|
||||
if ('${dataVisualForm.rowst}' == 'false') {
|
||||
$('#switchBtnRowStyleSt').bootstrapSwitch('state', false, true);
|
||||
$('#RowStyleSt').css('display', 'none');
|
||||
} else if ('${dataVisualForm.rowst}' == 'true') {
|
||||
$('#switchBtnRowStyleSt').bootstrapSwitch('state', true, true);
|
||||
$('#RowStyleSt').css('display', 'block');
|
||||
} else {
|
||||
$('#switchBtnRowStyleSt').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var dataTextalign = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectTextalign = $("#textalign").select2({
|
||||
data: dataTextalign,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
// select.on("change", function (e) {
|
||||
//
|
||||
// });
|
||||
selectTextalign.val('${dataVisualForm.textalign}').trigger("change");//设置选中
|
||||
|
||||
var dataverticalalign = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"top\",\"text\":\"顶部\"},{\"id\":\"bottom\",\"text\":\"底部\"}]");
|
||||
var selectverticalalign = $("#verticalalign").select2({
|
||||
data: dataverticalalign,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
// select.on("change", function (e) {
|
||||
//
|
||||
// });
|
||||
selectverticalalign.val('${dataVisualForm.verticalalign}').trigger("change");//设置选中
|
||||
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualForm.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
var datatimeframe = JSON.parse("[{\"id\":\"none\",\"text\":\"无\"},{\"id\":\"hour\",\"text\":\"小时\"},{\"id\":\"nowday\",\"text\":\"今日\"},{\"id\":\"yesterday\",\"text\":\"昨日\"},{\"id\":\"week\",\"text\":\"周\"},{\"id\":\"month\",\"text\":\"月\"},{\"id\":\"year\",\"text\":\"年\"},{\"id\":\"3year\",\"text\":\"历史\"},{\"id\":\"yoy\",\"text\":\"同比\"},{\"id\":\"mom\",\"text\":\"环比\"}]");
|
||||
var selecttimeframe = $("#timeframe").select2({
|
||||
data: datatimeframe,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selecttimeframe.val('${dataVisualForm.timeframe}').trigger("change");//设置选中
|
||||
|
||||
$("#formSqlPointTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualFormSqlPoint/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualForm.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
let html = "<input style='width: 240px;' id=\"" + row.id + "_FormSqlPointName\" value=\"" + row.name + "\" onchange=\"changeFormSqlPointName('" + row.id + "');\" />";
|
||||
return html;
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteFormSqlPointFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("formSqlPointTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualFormSqlPoint/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
// $("#formSqlPointTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#formSqlPointTable").tableDnD();
|
||||
|
||||
$("#formRowStyleTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualFormShowStyle/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualForm.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'ckmethod', // 返回json数据中的name
|
||||
title: '比较方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'ckcontent', // 返回json数据中的name
|
||||
title: '比较内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editRowStyleFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteRowStyleFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("formSqlPointTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualFormShowStyle/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
// $("#formSqlPointTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#formRowStyleTable").tableDnD();
|
||||
|
||||
})
|
||||
|
||||
function docontainerEditSave() {
|
||||
$("#containerEditSubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#containerEditSubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
var oldwidth = $('#oldwidth').val();
|
||||
var oldheight = $('#oldheight').val();
|
||||
|
||||
let form = $("#containerEditSubForm").serialize() + "&oldwidth=" + oldwidth + "&oldheight=" + oldheight + "&frameId=${param.contentId}";
|
||||
|
||||
const unitStStatus = $('#switchBtnUnitSt').bootstrapSwitch('state');
|
||||
if (unitStStatus) {
|
||||
form = form + "&unitst=true";
|
||||
} else {
|
||||
form = form + "&unitst=false";
|
||||
}
|
||||
|
||||
const timeStStatus = $('#switchBtnTimeSt').bootstrapSwitch('state');
|
||||
if (timeStStatus) {
|
||||
form = form + "×t=true";
|
||||
} else {
|
||||
form = form + "×t=false";
|
||||
}
|
||||
|
||||
const sqlstStatus = $('#switchBtnSqlst').bootstrapSwitch('state');
|
||||
if (sqlstStatus) {
|
||||
form = form + "&sqlst=true";
|
||||
} else {
|
||||
form = form + "&sqlst=false";
|
||||
}
|
||||
|
||||
const rowStyleStatus = $('#switchBtnRowStyleSt').bootstrapSwitch('state');
|
||||
if (rowStyleStatus) {
|
||||
form = form + "&rowst=true";
|
||||
} else {
|
||||
form = form + "&rowst=false";
|
||||
}
|
||||
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualForm/doTdupdate.do", form, function (data) {
|
||||
closeModal('containerFormSubModal');
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/getOneJson.do", {id: '${param.contentId}'}, function (contentData) {
|
||||
contentData = contentData[0];
|
||||
if (contentData.istab == 'true') {
|
||||
showOneContent(contentData.id, 'tab');
|
||||
} else {
|
||||
showOneContent(contentData.id);
|
||||
}
|
||||
// showOneContent('${param.contentId}');
|
||||
}, 'json');
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
console.log(data)
|
||||
$('#containerEditSubForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
function addFormSqlPointFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualFormSqlPoint/dosave.do", {pid: '${dataVisualForm.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#formSqlPointTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function deleteFormSqlPointFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFormSqlPoint/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#formSqlPointTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeFormSqlPointName(id) {
|
||||
let name = $('#' + id + '_FormSqlPointName').val();
|
||||
$.post(ext.contextPath + "/process/dataVisualFormSqlPoint/updateName.do", {
|
||||
id: id,
|
||||
name: name
|
||||
}, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function addFormShowStyleFun() {
|
||||
$.post(ext.contextPath + '/process/dataVisualFormShowStyle/doadd.do', {
|
||||
pid: '${dataVisualForm.id}'
|
||||
}, function (data) {
|
||||
$("#formShowStyleDiv").html(data);
|
||||
openModal('formShowStyleSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function editRowStyleFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualFormShowStyle/doedit.do', {id: id}, function (data) {
|
||||
$("#formShowStyleDiv").html(data);
|
||||
openModal('formShowStyleSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteRowStyleFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFormShowStyle/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#formRowStyleTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="containerFormSubModal">
|
||||
<div class="modal-dialog" style="width: 1200px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="float: left;height: calc(100% - 60px);">
|
||||
|
||||
<form class="form-horizontal" id="containerEditSubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualForm.id}"/>
|
||||
<input type="hidden" name="insertcolumn" id="insertcolumn" value="${dataVisualForm.insertcolumn}"/>
|
||||
<input type="hidden" name="columns" id="columns" value="${dataVisualForm.columns}"/>
|
||||
<input type="hidden" name="insertrow" id="insertrow" value="${dataVisualForm.insertrow}"/>
|
||||
<input type="hidden" name="rows" id="rows" value="${dataVisualForm.rows}"/>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">宽</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="width" name="width" placeholder="宽"
|
||||
value="${dataVisualForm.width}">
|
||||
<input type="hidden" class="form-control" id="oldwidth" name="oldwidth" placeholder="宽"
|
||||
value="${dataVisualForm.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高"
|
||||
value="${dataVisualForm.height}">
|
||||
<input type="hidden" class="form-control" id="oldheight" name="oldheight"
|
||||
placeholder="高"
|
||||
value="${dataVisualForm.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景颜色"
|
||||
value="${dataVisualForm.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">边距</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="padding" name="padding"
|
||||
placeholder="边距"
|
||||
value="${dataVisualForm.padding}">
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualForm.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">显示单位</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnUnitSt" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">显示日期</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnTimeSt" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">日期位数</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="timestnum" name="timestnum"
|
||||
placeholder="日期位数"
|
||||
value="${dataVisualForm.timestnum}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">时间范围</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="timeframe" name="timeframe"
|
||||
style="width: 170px;"></select>
|
||||
</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="urldata" name="urldata"
|
||||
placeholder="接口数据"
|
||||
value="${dataVisualForm.urldata}">
|
||||
</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="numtail" name="numtail"
|
||||
placeholder="小数位"
|
||||
value="${dataVisualForm.numtail}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">系数</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="rate" name="rate" placeholder="系数"
|
||||
value="${dataVisualForm.rate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="textcontent" name="textcontent" style="width:100%;height:66px;"
|
||||
wrap="soft">${dataVisualForm.textcontent}</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualForm.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="文字颜色"
|
||||
value="${dataVisualForm.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualForm.fontweight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">水平位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="textalign" name="textalign"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">垂直位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="verticalalign" name="verticalalign"
|
||||
style="width: 170px;"></select>
|
||||
</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="border" name="border"
|
||||
placeholder="边框样式"
|
||||
value="${dataVisualForm.border}">
|
||||
</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="borderradius" name="borderradius"
|
||||
placeholder="边框弧度"
|
||||
value="${dataVisualForm.borderradius}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualForm.style}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">sql开关</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnSqlst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="sqlcontentSt" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">sql内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="sqlcontent" name="sqlcontent" style="width:100%;height:120px;"
|
||||
wrap="soft">${dataVisualForm.sqlcontent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addFormSqlPointFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<table id="formSqlPointTable" data-use-row-attr-func="true"
|
||||
data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">行样式</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnRowStyleSt" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="RowStyleSt" style="display: none;">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addFormShowStyleFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<table id="formRowStyleTable" data-use-row-attr-func="true"
|
||||
data-reorderable-rows="true"></table>
|
||||
</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="docontainerEditSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
126
src/main/webapp/jsp/process/dataVisualFormShowStyleAdd.jsp
Normal file
126
src/main/webapp/jsp/process/dataVisualFormShowStyleAdd.jsp
Normal file
@ -0,0 +1,126 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$('#rowStylecolorContainer1').colorpicker({format: null});
|
||||
$('#rowStylecolorContainer2').colorpicker({format: null});
|
||||
|
||||
function doFormShowStyleSave() {
|
||||
$("#dataVisualFormShowStyleForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#dataVisualFormShowStyleForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualFormShowStyle/dosave.do", $("#dataVisualFormShowStyleForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#formRowStyleTable").bootstrapTable('refresh');
|
||||
closeModal("formShowStyleSubModal");
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="formShowStyleSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为dataVisualFormShowStyleForm -->
|
||||
<form class="form-horizontal" id="dataVisualFormShowStyleForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="pid" id="pid" value="${param.pid}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">变化范围</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="showst" name="showst" class="form-control select2">
|
||||
<option value="0" selected>单元格</option>
|
||||
<option value="1">行</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">比较方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="ckmethod" name="ckmethod" class="form-control select2">
|
||||
<option value=">" selected>></option>
|
||||
<option value=">=">>=</option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
<option value="<="><=</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">比较值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="ckcontent" name="ckcontent" placeholder="比较内容"
|
||||
value="${dataVisualFormShowStyle.ckcontent}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="rowStylecolorContainer2">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景颜色"
|
||||
value="${dataVisualFormShowStyle.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualFormShowStyle.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="rowStylecolorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="背景颜色"
|
||||
value="${dataVisualFormShowStyle.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualFormShowStyle.fontweight}">
|
||||
</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="doFormShowStyleSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
188
src/main/webapp/jsp/process/dataVisualFormShowStyleEdit.jsp
Normal file
188
src/main/webapp/jsp/process/dataVisualFormShowStyleEdit.jsp
Normal file
@ -0,0 +1,188 @@
|
||||
<%@ page language="java" import="java.util.*" 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" %>
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
$(function () {
|
||||
$('#rowStylecolorContainer1').colorpicker({format: null});
|
||||
$('#rowStylecolorContainer2').colorpicker({format: null});
|
||||
});
|
||||
|
||||
function doFormShowStyleSave() {
|
||||
$("#dataVisualFormShowStyleForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#dataVisualFormShowStyleForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#dataVisualFormShowStyleForm").serialize();
|
||||
$.post(ext.contextPath + "/process/dataVisualFormShowStyle/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#formRowStyleTable").bootstrapTable('refresh');
|
||||
closeModal('formShowStyleSubModal');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doFormShowStyleDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFormShowStyle/dodelete.do', {
|
||||
id: '${dataVisualFormShowStyle.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
$("#formRowStyleTable").bootstrapTable('refresh');
|
||||
closeModal('formShowStyleSubModal');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="formShowStyleSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="dataVisualFormShowStyleForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualFormShowStyle.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">变化范围</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="showst" name="showst" class="form-control select2">
|
||||
<option value="0"
|
||||
<c:if test="${dataVisualFormShowStyle.showst=='0'}">selected</c:if> >单元格
|
||||
</option>
|
||||
<option value="1"
|
||||
<c:if test="${dataVisualFormShowStyle.showst=='1'}">selected</c:if> >行
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">比较方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="ckmethod" name="ckmethod" class="form-control select2">
|
||||
<option value=">"
|
||||
<c:if test="${dataVisualFormShowStyle.ckmethod=='>'}">selected</c:if> >>
|
||||
</option>
|
||||
<option value=">="
|
||||
<c:if test="${dataVisualFormShowStyle.ckmethod=='>='}">selected</c:if> >>=
|
||||
</option>
|
||||
<option value="="
|
||||
<c:if test="${dataVisualFormShowStyle.ckmethod=='='}">selected</c:if> >=
|
||||
</option>
|
||||
<option value="<="
|
||||
<c:if test="${dataVisualFormShowStyle.ckmethod=='<='}">selected</c:if> ><=
|
||||
</option>
|
||||
<option value="<"
|
||||
<c:if test="${dataVisualFormShowStyle.ckmethod=='<'}">selected</c:if> ><
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">比较值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="ckcontent" name="ckcontent" placeholder="比较内容"
|
||||
value="${dataVisualFormShowStyle.ckcontent}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="rowStylecolorContainer2">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景颜色"
|
||||
value="${dataVisualFormShowStyle.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualFormShowStyle.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="rowStylecolorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="背景颜色"
|
||||
value="${dataVisualFormShowStyle.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualFormShowStyle.fontweight}">
|
||||
</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" onclick="doFormShowStyleDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doFormShowStyleSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
163
src/main/webapp/jsp/process/dataVisualFrameAdd.jsp
Normal file
163
src/main/webapp/jsp/process/dataVisualFrameAdd.jsp
Normal file
@ -0,0 +1,163 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
||||
<%request.setAttribute("Type_structure", DataVisualFrame.Type_structure); %>
|
||||
<%request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
||||
<%request.setAttribute("Active_0", DataVisualFrame.Active_0); %>
|
||||
<%request.setAttribute("Active_1", DataVisualFrame.Active_1); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualFrame/doFrameSave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '排序不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '编码不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var showUser4SelectsFun = function() {
|
||||
var userIds= $("#rolepeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"rolepeople",textId:"rolepeopleName",userIds:userIds} , function(data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function typechange(is) {
|
||||
var st = is.value;
|
||||
if (st == '${Type_frame}') {
|
||||
$("#frameSt").css('display', 'block');
|
||||
} else if (st == '${Type_structure}') {
|
||||
$("#frameSt").css('display', 'none');
|
||||
}
|
||||
}
|
||||
</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="dosave()" 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="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="unitid" id="unitid" value="${param.unitId}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${param.pid}"/>
|
||||
<input type="hidden" name="menutype" id="menutype" value="${param.menuType}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="名称"
|
||||
value="${dataVisualFrame.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2" onchange="typechange(this);">
|
||||
<option value="${Type_structure}">结构</option>
|
||||
<option value="${Type_frame}">画面</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="active" name="active" class="form-control select2">
|
||||
<option value="${Active_1}">启用</option>
|
||||
<option value="${Active_0}">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
|
||||
value="${dataVisualFrame.morder}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="frameSt" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">宽度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualFrame.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualFrame.height}">
|
||||
</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="background" name="background" placeholder="背景色"
|
||||
value="${dataVisualFrame.background}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">编码</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="code" name="code" placeholder="编码"
|
||||
value="${dataVisualFrame.code}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualFrame.style}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">查看人员</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" style="height: 80px;" class="form-control" id="rolepeopleName"
|
||||
name="rolepeopleName" placeholder="查看人员" onclick="showUser4SelectsFun();"
|
||||
readonly>${dataVisualFrame.rolepeopleName}</textarea>
|
||||
<input id="rolepeople" name="rolepeople" type="hidden"
|
||||
value="${dataVisualFrame.rolepeople}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
169
src/main/webapp/jsp/process/dataVisualFrameConfigure.jsp
Normal file
169
src/main/webapp/jsp/process/dataVisualFrameConfigure.jsp
Normal file
@ -0,0 +1,169 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var addFun = function () {
|
||||
var node = $('#tree').treeview('getSelected');
|
||||
var pid = "";
|
||||
if (node != null && node.length > 0) {
|
||||
pid = node[0].id;
|
||||
} else {
|
||||
pid = "-1";
|
||||
}
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/frameAdd.do', {
|
||||
unitId: unitId,
|
||||
pid: pid,
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/frameEdit.do', {
|
||||
id: id,
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/getFrameTreeForConfigure.do', {
|
||||
unitId: unitId,
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
//console.info(data)
|
||||
$('#tree').treeview({
|
||||
data: data
|
||||
});
|
||||
$('#tree').on('nodeSelected', function (event, data) {
|
||||
editFun(data.id);
|
||||
//var node=$('#tree').treeview('getSelected');
|
||||
});
|
||||
|
||||
// $("#tree li").each(function () {
|
||||
// var id = $(this).attr("id");
|
||||
// // var levelLength=$(this).attr("data-nodeid").split(".").length-1;
|
||||
// $(this).append("<span class='fa fa-angle-up pull-right' style='padding-top:2px;' title='上移' onclick='morderDown(\"" + id + "\");'></span>");
|
||||
// $(this).append("<span class='fa fa-angle-down pull-right' style='padding-top:2px;' title='下移' onclick='morderUp(\"" + id + "\");'></span>");
|
||||
// });
|
||||
}, 'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
$(function () {
|
||||
initTreeView();
|
||||
});
|
||||
|
||||
function morderDown(id) {
|
||||
event.stopPropagation();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + "/process/dataVisualFrame/doFrameMorderChange.do?id=" + id + "&type=down",
|
||||
async: false,
|
||||
globle: false,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
if (data != "suc") {
|
||||
alert(data);
|
||||
} else {
|
||||
initTreeView();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function morderUp(id) {
|
||||
event.stopPropagation();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ext.contextPath + "/process/dataVisualFrame/doFrameMorderChange.do?id=" + id + "&type=up",
|
||||
async: false,
|
||||
globle: false,
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
// console.log(data);
|
||||
if (data != "suc") {
|
||||
alert(data);
|
||||
} else {
|
||||
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="mpSubDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
<div id="menu4SelectDiv"></div>
|
||||
<div id="user4SelectDiv"></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="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
373
src/main/webapp/jsp/process/dataVisualFrameEdit.jsp
Normal file
373
src/main/webapp/jsp/process/dataVisualFrameEdit.jsp
Normal file
@ -0,0 +1,373 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
||||
<%request.setAttribute("Type_structure", DataVisualFrame.Type_structure); %>
|
||||
<%request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
||||
<%request.setAttribute("Active_0", DataVisualFrame.Active_0); %>
|
||||
<%request.setAttribute("Active_1", DataVisualFrame.Active_1); %>
|
||||
|
||||
<!-- bootstrap switch -->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<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>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var masterId = '${dataVisualFrame.id}';
|
||||
var tbName = 'tb_pro_dataVisual_frame_file'; //数据表
|
||||
var nameSpace = 'dataVisual';//保存文件夹
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
var fileinput = function () {
|
||||
$.post(ext.contextPath + '/base/fileinput.do', {
|
||||
masterId: masterId,
|
||||
tbName: tbName,
|
||||
nameSpace: nameSpace
|
||||
}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('fileInputModal');
|
||||
});
|
||||
};
|
||||
|
||||
//名称定义不可修改
|
||||
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();
|
||||
// $('#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, "\/");
|
||||
previews.push(path);
|
||||
previewConfig['width'] = '50px';
|
||||
previewConfig['caption'] = data[i].filename;
|
||||
previewConfig['key'] = data[i].id;
|
||||
previewConfigs.push(previewConfig);
|
||||
}
|
||||
showFileInput("dataVisualFrameFile");
|
||||
} else {
|
||||
$('#dataVisualFrameFile').hide();
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
};
|
||||
|
||||
function showFileInput(ctrlName) {
|
||||
var control = $('#' + ctrlName);
|
||||
control.fileinput('destroy');
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
showUpload: false, //是否显示上传按钮
|
||||
showRemove: false,
|
||||
showCaption: false,//是否显示标题
|
||||
showBrowse: false,//选择按钮
|
||||
showClose: false,//右上角关闭按钮
|
||||
dropZoneEnabled: false,//是否显示拖拽区域
|
||||
fileActionSettings: {
|
||||
showDrag: false
|
||||
},
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
maxFileCount: 10, //表示允许同时上传的最大文件个数
|
||||
enctype: 'multipart/form-data',
|
||||
validateInitialCount: true,
|
||||
previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
|
||||
initialPreviewAsData: true,
|
||||
initialPreview: previews,
|
||||
initialPreviewConfig: previewConfigs,
|
||||
layoutTemplates: {
|
||||
actionUpload: ''
|
||||
},
|
||||
deleteUrl: ext.contextPath + "/base/deleteInputFile.do",
|
||||
deleteExtraData: function () { //传参
|
||||
var data = {
|
||||
"tbName": tbName
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
$('#kvFileinputModal').on("hidden.bs.modal", function () {
|
||||
$(this).removeData("bs.modal");
|
||||
//modal重复打开会导致前面的滚动条失去作用
|
||||
$('.modal').css("overflow", "auto");
|
||||
});
|
||||
}
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualFrame/doFrameUpdate.do", $("#subForm").serialize() + "&oldmorder=$(#oldmorder).val()" + "&oldpid=$(#oldpid).val()", function (data) {
|
||||
if (data.code == 1) {
|
||||
// initFrameTreeView();
|
||||
// closeModal("subModal");
|
||||
initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
morder: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '排序不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '编码不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function dodel(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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/doFrameDelete.do', {id: id}, function (data) {
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', data.msg, 'alertDiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#type").select2({minimumResultsForSearch: -1}).val("${dataVisualFrame.type}").trigger("change");
|
||||
$("#active").select2({minimumResultsForSearch: -1}).val("${dataVisualFrame.active}").trigger("change");
|
||||
|
||||
getFileList();
|
||||
$('#url').html(window.location.host + ext.contextPath + "/process/dataVisualFrame/view.do?frameId=${dataVisualFrame.id}&unitId=" + unitId)
|
||||
});
|
||||
|
||||
function typechange(is) {
|
||||
var st = is.value;
|
||||
if (st == '${Type_frame}') {
|
||||
$("#frameSt").css('display', 'block');
|
||||
} else if (st == '${Type_structure}') {
|
||||
$("#frameSt").css('display', 'none');
|
||||
}
|
||||
}
|
||||
|
||||
var showMenu4SelectFun = function () {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/showMenu4Select.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "pid",
|
||||
textId: "pname",
|
||||
ownId: '${dataVisualFrame.id}',
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
};
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#rolepeople").val();
|
||||
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {
|
||||
formId: "subForm",
|
||||
hiddenId: "rolepeople",
|
||||
textId: "rolepeopleName",
|
||||
userIds: userIds
|
||||
}, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function doCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/showMenu4SelectForCopy.do', {
|
||||
ownId: '${dataVisualFrame.id}',
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
$("#menu4SelectDiv").html(data);
|
||||
openModal("menu4SelectModal")
|
||||
});
|
||||
}
|
||||
|
||||
function doSyncMq() {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/getFrameContentToMqtt.do', {
|
||||
id: '${dataVisualFrame.id}',
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
showAlert('s', "执行完成", 'alertDiv');
|
||||
});
|
||||
}
|
||||
|
||||
</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="doSyncMq()" class="btn btn-box-tool" data-toggle="tooltip" title="同步Mqtt"><i
|
||||
class="fa fa-undo"></i></a>
|
||||
<a onclick="doCopy()" class="btn btn-box-tool" data-toggle="tooltip" title="拷贝"><i
|
||||
class="fa fa-copy"></i></a>
|
||||
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
||||
class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
<a onclick="dodel('${dataVisualFrame.id}')" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualFrame.id}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${dataVisualFrame.pid}"/>
|
||||
<input type="hidden" name="oldmorder" id="oldmorder" value="${dataVisualFrame.morder}"/>
|
||||
<input type="hidden" name="oldpid" id="oldpid" value="${dataVisualFrame.pid}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="名称"
|
||||
value="${dataVisualFrame.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属层级</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="pname" name="pname" placeholder="所属层级"
|
||||
onclick="showMenu4SelectFun();" value="${dataVisualFrame.pname}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2" onchange="typechange(this);">
|
||||
<option value="${Type_structure}">结构</option>
|
||||
<option value="${Type_frame}">画面</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">启用</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="active" name="active" class="form-control select2">
|
||||
<option value="${Active_1}">启用</option>
|
||||
<option value="${Active_0}">禁用</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
|
||||
value="${dataVisualFrame.morder}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="frameSt" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">宽度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualFrame.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualFrame.height}">
|
||||
</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="background" name="background" placeholder="背景色"
|
||||
value="${dataVisualFrame.background}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">编码</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="code" name="code" placeholder="编码"
|
||||
value="${dataVisualFrame.code}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualFrame.style}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">查看人员</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" style="height: 80px;" class="form-control" id="rolepeopleName"
|
||||
name="rolepeopleName" placeholder="查看人员" onclick="showUser4SelectsFun();"
|
||||
readonly>${dataVisualFrame.rolepeopleName}</textarea>
|
||||
<input id="rolepeople" name="rolepeople" type="hidden"
|
||||
value="${dataVisualFrame.rolepeople}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">浏览链接:</label>
|
||||
<div id="url" class="col-sm-10" style="line-height: 34px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-2">
|
||||
<button type="button" class="btn btn-default btn-file" onclick="fileinput()" id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传图片
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="file" name="dataVisualFrameFile" id="dataVisualFrameFile" multiple
|
||||
class="file-loading"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
54
src/main/webapp/jsp/process/dataVisualFrameMenu4select.jsp
Normal file
54
src/main/webapp/jsp/process/dataVisualFrameMenu4select.jsp
Normal file
@ -0,0 +1,54 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<script type="text/javascript">
|
||||
var selectMenu = function () {
|
||||
|
||||
alert('${param.hiddenId}' + '${param.textId}');
|
||||
}
|
||||
$(function () {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/getMenusJson.do', {
|
||||
unitId: unitId,
|
||||
ownId: '${param.ownId}',
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
// console.info(data);
|
||||
if (data.length > 0) {
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function (event, data) {
|
||||
$('#${param.formId} #${param.hiddenId}').val(data.id);
|
||||
$('#${param.formId} #${param.textId}').val(data.text);
|
||||
closeModal("menu4SelectModal");
|
||||
});
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
});
|
||||
|
||||
function rootTree() {
|
||||
$('#${param.formId} #${param.hiddenId}').val("-1");
|
||||
$('#${param.formId} #${param.textId}').val("-1");
|
||||
closeModal("menu4SelectModal");
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="menu4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择菜单</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal" onclick="rootTree();">根节点</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@ -0,0 +1,173 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
||||
<% request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
||||
<style type="text/css">
|
||||
.helpTitle {
|
||||
/*border-bottom: 1px dotted #666;*/
|
||||
color: #333;
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
.helpTitle:hover {
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.helpTitle-content {
|
||||
position: absolute;
|
||||
white-space: pre;
|
||||
/*top: 10px;*/
|
||||
/*left: 850px;*/
|
||||
border: 1px solid #000000;
|
||||
padding: 5px;
|
||||
background-color: #ffffff;
|
||||
color: #000;
|
||||
/*border-radius: 5px;*/
|
||||
font-size: 12px;
|
||||
z-index: 9999;
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
let ownName = "";
|
||||
var doSelectCopy = function (id) {
|
||||
let ckName = "";
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualFrame/getFrame.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (result) {
|
||||
ckName = result.name
|
||||
}
|
||||
});
|
||||
|
||||
swal({
|
||||
text: "将把"+ckName+"页面元素拷贝至"+ownName+"页面。此操作无法撤回,请确认操作!",
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/copyFrame.do', {
|
||||
ckid: id,
|
||||
id: '${param.ownId}'
|
||||
}, function (data) {
|
||||
// console.log(data)
|
||||
closeModal("menu4SelectModal");
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// getTitleContent("将拷贝层级树中选择的页面元素至所选界面", "helpTitle_id_1");
|
||||
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualFrame/getFrame.do",
|
||||
async: true,
|
||||
globle: false,
|
||||
data: {
|
||||
id: '${param.ownId}'
|
||||
},
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (result) {
|
||||
ownName = result.name
|
||||
}
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/getMenusJson.do', {
|
||||
unitId: unitId,
|
||||
ownId: '${param.ownId}',
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
// console.info(data);
|
||||
if (data.length > 0) {
|
||||
$('#menu_select_tree').treeview({
|
||||
data: data,
|
||||
});
|
||||
$('#menu_select_tree').on('nodeSelected', function (event, data) {
|
||||
if (data.type == '${Type_frame}') {
|
||||
doSelectCopy(data.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
});
|
||||
|
||||
function getTitleContent(title, id) {
|
||||
// 给需要提示的元素绑定鼠标悬浮事件
|
||||
$('#' + id).hover(function (e) {
|
||||
// 鼠标悬浮时显示提示内容
|
||||
// var title = $(this).attr('title');
|
||||
// var title = "";
|
||||
$(this).attr('data-title', title);
|
||||
$(this).removeAttr('title');
|
||||
$('<div class="helpTitle-content"></div>').text(title).appendTo('body').fadeIn();
|
||||
let mouseX = e.pageX + 15;
|
||||
let mouseY = e.pageY;
|
||||
$('.helpTitle-content').css('top', mouseY + 'px');
|
||||
$('.helpTitle-content').css('left', mouseX + 'px');
|
||||
}, function () {
|
||||
// 鼠标移出时隐藏提示内容
|
||||
$(this).attr('title', $(this).attr('data-title'));
|
||||
$('.helpTitle-content').remove();
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="menu4SelectModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">
|
||||
<div style="float: left;width: 80px;">选择菜单</div>
|
||||
<%-- <div id="helpTitle_id_1" class="helpTitle"--%>
|
||||
<%-- style="float: left;width: 18px;height: 18px;margin-left: 10px;">--%>
|
||||
<%-- <i class="fa fa-question-circle" aria-hidden="true"></i>--%>
|
||||
<%-- </div>--%>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="menu_select_tree" style="height:430px;overflow:auto;width:100%"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<!-- <button type="button" class="btn btn-primary" onclick="selectMenu()">保存</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
921
src/main/webapp/jsp/process/dataVisualGaugeChartEdit.jsp
Normal file
921
src/main/webapp/jsp/process/dataVisualGaugeChartEdit.jsp
Normal file
@ -0,0 +1,921 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_GaugeChart", DataVisualContent.Type_GaugeChart); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#dataColorContainer').colorpicker({format: null});
|
||||
$('#titleColorContainer').colorpicker({format: null});
|
||||
$('#pointerColorContainer').colorpicker({format: null});
|
||||
$('#splitlineColorContainer').colorpicker({format: null});
|
||||
$('#axistickColorContainer').colorpicker({format: null});
|
||||
$('#axislabelColorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnDatast').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualGaugeChart.datast}' == 'false') {
|
||||
$('#switchBtnDatast').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualGaugeChart.datast}' == 'true') {
|
||||
$('#switchBtnDatast').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnDatast').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnPointerst').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualGaugeChart.pointerst}' == 'false') {
|
||||
$('#switchBtnPointerst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualGaugeChart.pointerst}' == 'true') {
|
||||
$('#switchBtnPointerst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnPointerst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnSplitlinest').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualGaugeChart.splitlinest}' == 'false') {
|
||||
$('#switchBtnSplitlinest').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualGaugeChart.splitlinest}' == 'true') {
|
||||
$('#switchBtnSplitlinest').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnSplitlinest').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAxislinest').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualGaugeChart.axislinest}' == 'false') {
|
||||
$('#switchBtnAxislinest').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualGaugeChart.axislinest}' == 'true') {
|
||||
$('#switchBtnAxislinest').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAxislinest').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAxistickst').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualGaugeChart.axistickst}' == 'false') {
|
||||
$('#switchBtnAxistickst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualGaugeChart.axistickst}' == 'true') {
|
||||
$('#switchBtnAxistickst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAxistickst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAxislabelst').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualGaugeChart.axislabelst}' == 'false') {
|
||||
$('#switchBtnAxislabelst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualGaugeChart.axislabelst}' == 'true') {
|
||||
$('#switchBtnAxislabelst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAxislabelst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualGaugeChart.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doGaugeChartsave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let chartsubForm = $("#chartsubForm").serialize();
|
||||
const datastStatus = $('#switchBtnDatast').bootstrapSwitch('state');
|
||||
if (datastStatus) {
|
||||
chartsubForm = chartsubForm + "&datast=true";
|
||||
} else {
|
||||
chartsubForm = chartsubForm + "&datast=false";
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualGaugeChart/doupdate.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: chartsubForm,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
let chartsubForm2 = $("#chartsubForm2").serialize();
|
||||
const pointerstStatus = $('#switchBtnPointerst').bootstrapSwitch('state');
|
||||
if (pointerstStatus) {
|
||||
chartsubForm2 = chartsubForm2 + "&pointerst=true";
|
||||
} else {
|
||||
chartsubForm2 = chartsubForm2 + "&pointerst=false";
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualGaugeChart/doupdate.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: chartsubForm2,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
let chartsubForm3 = $("#chartsubForm3").serialize();
|
||||
const splitlinestStatus = $('#switchBtnSplitlinest').bootstrapSwitch('state');
|
||||
if (splitlinestStatus) {
|
||||
chartsubForm3 = chartsubForm3 + "&splitlinest=true";
|
||||
} else {
|
||||
chartsubForm3 = chartsubForm3 + "&splitlinest=false";
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualGaugeChart/doupdate.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: chartsubForm3,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
let chartsubForm4 = $("#chartsubForm4").serialize();
|
||||
const axislinestStatus = $('#switchBtnAxislinest').bootstrapSwitch('state');
|
||||
if (axislinestStatus) {
|
||||
chartsubForm4 = chartsubForm4 + "&axislinest=true";
|
||||
} else {
|
||||
chartsubForm4 = chartsubForm4 + "&axislinest=false";
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualGaugeChart/doupdate.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: chartsubForm4,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
let chartsubForm5 = $("#chartsubForm5").serialize();
|
||||
const axistickstStatus = $('#switchBtnAxistickst').bootstrapSwitch('state');
|
||||
if (axistickstStatus) {
|
||||
chartsubForm5 = chartsubForm5 + "&axistickst=true";
|
||||
} else {
|
||||
chartsubForm5 = chartsubForm5 + "&axistickst=false";
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualGaugeChart/doupdate.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: chartsubForm5,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
let chartsubForm6 = $("#chartsubForm6").serialize();
|
||||
const axislabelstStatus = $('#switchBtnAxislabelst').bootstrapSwitch('state');
|
||||
if (axislabelstStatus) {
|
||||
chartsubForm6 = chartsubForm6 + "&axislabelst=true";
|
||||
} else {
|
||||
chartsubForm6 = chartsubForm6 + "&axislabelst=false";
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: ext.contextPath + "/process/dataVisualGaugeChart/doupdate.do",
|
||||
async: false,
|
||||
globle: false,
|
||||
data: chartsubForm6,
|
||||
dataType: 'json',
|
||||
error: function () {
|
||||
return false;
|
||||
},
|
||||
success: function (data) {
|
||||
}
|
||||
});
|
||||
|
||||
closeModal('gaugeChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doGaugeChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualGaugeChart.id}',
|
||||
type: '${Type_GaugeChart}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('gaugeChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#chartsubForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="gaugeChartSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">指针设置</a></li>
|
||||
<li class=""><a href="#tab4" data-toggle="tab" index="3"
|
||||
aria-expanded="true">分隔线设置</a></li>
|
||||
<li class=""><a href="#tab5" data-toggle="tab" index="4"
|
||||
aria-expanded="true">轴线设置</a></li>
|
||||
<li class=""><a href="#tab6" data-toggle="tab" index="5"
|
||||
aria-expanded="true">刻度线设置</a></li>
|
||||
<li class=""><a href="#tab7" data-toggle="tab" index="6"
|
||||
aria-expanded="true">刻度值设置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<form class="form-horizontal" id="chartsubForm" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualGaugeChart.id}"/>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fixedvalue" name="fixedvalue"
|
||||
placeholder="固定值"
|
||||
value="${dataVisualGaugeChart.fixedvalue}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name="mpid"
|
||||
placeholder="测量点"
|
||||
value="${dataVisualGaugeChart.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</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="startangle" name="startangle"
|
||||
placeholder="起始角度"
|
||||
value="${dataVisualGaugeChart.startangle}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">结束角度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="endangle" name="endangle"
|
||||
placeholder="结束角度"
|
||||
value="${dataVisualGaugeChart.endangle}">
|
||||
</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="max" name="max"
|
||||
placeholder="最大值"
|
||||
value="${dataVisualGaugeChart.max}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="min" name="min"
|
||||
placeholder="最小值"
|
||||
value="${dataVisualGaugeChart.min}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据文本显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnDatast" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">数据字体颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="dataColorContainer">
|
||||
<input name="dataColor" id="dataColor" type="text" class="form-control"
|
||||
placeholder="数据字体颜色"
|
||||
value="${dataVisualGaugeChart.dataColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数据字体大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="dataFontSize" name="dataFontSize"
|
||||
placeholder="数据字体大小"
|
||||
value="${dataVisualGaugeChart.dataFontSize}">
|
||||
</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="dataFontWeight" name="dataFontWeight"
|
||||
placeholder="数据字体粗细"
|
||||
value="${dataVisualGaugeChart.dataFontWeight}">
|
||||
</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="dataXPosition" name="dataXPosition"
|
||||
placeholder="数据水平位置"
|
||||
value="${dataVisualGaugeChart.dataXPosition}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数据垂直位置</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="dataYPosition" name="dataYPosition"
|
||||
placeholder="数据垂直位置"
|
||||
value="${dataVisualGaugeChart.dataYPosition}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%-- <label class="col-sm-2 control-label">标题文本</label>--%>
|
||||
<%-- <div class="col-sm-4">--%>
|
||||
<%-- <div class="switch" data-on="primary" data-off="info">--%>
|
||||
<%-- <input id="switchBtnTitlest" type="checkbox"/>--%>
|
||||
<%-- </div>--%>
|
||||
<%-- </div>--%>
|
||||
<label class="col-sm-2 control-label">标题内容</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleText" name="titleText"
|
||||
placeholder="标题内容"
|
||||
value="${dataVisualGaugeChart.titleText}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题字体颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="titleColorContainer">
|
||||
<input name="titleColor" id="titleColor" type="text" class="form-control"
|
||||
placeholder="标题字体颜色"
|
||||
value="${dataVisualGaugeChart.titleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题字体大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleFontSize" name="titleFontSize"
|
||||
placeholder="标题字体大小"
|
||||
value="${dataVisualGaugeChart.titleFontSize}">
|
||||
</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="titleFontWeight" name="titleFontWeight"
|
||||
placeholder="标题字体粗细"
|
||||
value="${dataVisualGaugeChart.titleFontWeight}">
|
||||
</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="titleXPosition" name="titleXPosition"
|
||||
placeholder="标题水平位置"
|
||||
value="${dataVisualGaugeChart.titleXPosition}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题垂直位置</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleYPosition" name="titleYPosition"
|
||||
placeholder="标题垂直位置"
|
||||
value="${dataVisualGaugeChart.titleYPosition}">
|
||||
</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="radius" name="radius"
|
||||
placeholder="图形大小"
|
||||
value="${dataVisualGaugeChart.radius}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualGaugeChart.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="chartsubForm2" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualGaugeChart.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnPointerst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="pointerColorContainer">
|
||||
<input name="pointerColor" id="pointerColor" type="text" class="form-control"
|
||||
placeholder="颜色"
|
||||
value="${dataVisualGaugeChart.pointerColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="pointerLength" name="pointerLength"
|
||||
placeholder="长度"
|
||||
value="${dataVisualGaugeChart.pointerLength}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">宽度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="pointerWidth" name="pointerWidth"
|
||||
placeholder="宽度"
|
||||
value="${dataVisualGaugeChart.pointerWidth}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab4"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="chartsubForm3" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualGaugeChart.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnSplitlinest" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="splitlineColorContainer">
|
||||
<input name="splitlineColor" id="splitlineColor" type="text"
|
||||
class="form-control"
|
||||
placeholder="颜色"
|
||||
value="${dataVisualGaugeChart.splitlineColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="splitlineLength" name="splitlineLength"
|
||||
placeholder="长度"
|
||||
value="${dataVisualGaugeChart.splitlineLength}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">宽度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="splitlineWidth" name="splitlineWidth"
|
||||
placeholder="宽度"
|
||||
value="${dataVisualGaugeChart.splitlineWidth}">
|
||||
</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="splitlineDistance"
|
||||
name="splitlineDistance"
|
||||
placeholder="与轴线距离"
|
||||
value="${dataVisualGaugeChart.splitlineDistance}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab5"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="chartsubForm4" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualGaugeChart.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAxislinest" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">宽度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="axislineWidth" name="axislineWidth"
|
||||
placeholder="宽度"
|
||||
value="${dataVisualGaugeChart.axislineWidth}">
|
||||
</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="axislineColor" name="axislineColor"
|
||||
placeholder="颜色(不少于两种)"
|
||||
value="${dataVisualGaugeChart.axislineColor}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab6"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="chartsubForm5" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualGaugeChart.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAxistickst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="axistickColorContainer">
|
||||
<input name="axistickColor" id="axistickColor" type="text"
|
||||
class="form-control"
|
||||
placeholder="颜色"
|
||||
value="${dataVisualGaugeChart.axistickColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="axistickLength" name="axistickLength"
|
||||
placeholder="长度"
|
||||
value="${dataVisualGaugeChart.axistickLength}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">宽度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="axistickWidth" name="axistickWidth"
|
||||
placeholder="宽度"
|
||||
value="${dataVisualGaugeChart.axistickWidth}">
|
||||
</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="axistickDistance"
|
||||
name="axistickDistance"
|
||||
placeholder="与轴线距离"
|
||||
value="${dataVisualGaugeChart.axistickDistance}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分割段数</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="axistickSplitnumber"
|
||||
name="axistickSplitnumber"
|
||||
placeholder="分割段数"
|
||||
value="${dataVisualGaugeChart.axistickSplitnumber}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab7"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="chartsubForm6" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualGaugeChart.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刻度值显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAxislabelst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="axislabelColorContainer">
|
||||
<input name="axislabelColor" id="axislabelColor" type="text"
|
||||
class="form-control"
|
||||
placeholder="字体颜色"
|
||||
value="${dataVisualGaugeChart.axislabelColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="axislabelFontSize"
|
||||
name="axislabelFontSize"
|
||||
placeholder="字体大小"
|
||||
value="${dataVisualGaugeChart.axislabelFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="axislabelFontWeight"
|
||||
name="axislabelFontWeight"
|
||||
placeholder="字体粗细"
|
||||
value="${dataVisualGaugeChart.axislabelFontWeight}">
|
||||
</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="axislabelDistance"
|
||||
name="axislabelDistance"
|
||||
placeholder="与刻度线的距离"
|
||||
value="${dataVisualGaugeChart.axislabelDistance}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doGaugeChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doGaugeChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@ -0,0 +1,133 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject" %>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var websocket = null;
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/process/dataVisualFrame/getFrameTreeForConfigure.do', {
|
||||
unitId: '${param.unitId}',
|
||||
menuType: '${param.menuType}'
|
||||
}, function (data) {
|
||||
console.info(data)
|
||||
$('#tree').treeview({
|
||||
data: data
|
||||
});
|
||||
$('#tree').on('nodeSelected', function (event, data) {
|
||||
sendSocket(data.id)
|
||||
});
|
||||
}, 'json');
|
||||
$("#menuBox").html("");
|
||||
};
|
||||
|
||||
$(function () {
|
||||
initTreeView();
|
||||
|
||||
// 浏览器上的websocket对象,用来和服务端通信.
|
||||
if ('WebSocket' in window) {
|
||||
// 创建websocket对象
|
||||
var userName = "控制";
|
||||
// console.log(ext.basePath.replace("http", "ws") + "/chat/" + userName);
|
||||
websocket = new WebSocket(ext.basePath.replace("http", "ws") + "/chat/" + userName);
|
||||
registerEvent();
|
||||
} else {
|
||||
alert('当前浏览器不支持websocket')
|
||||
}
|
||||
|
||||
function registerEvent() {
|
||||
websocket.onopen = function (event) {
|
||||
|
||||
}
|
||||
websocket.onmessage = function (event) {
|
||||
|
||||
};
|
||||
websocket.onclose = function (event) {
|
||||
websocket.close();
|
||||
};
|
||||
//连接发生错误的回调方法
|
||||
websocket.onerror = function () {
|
||||
// $("#Putin").attr('disabled', 'disabled');
|
||||
websocket.close();
|
||||
};
|
||||
}
|
||||
|
||||
$(window).unload(function () {
|
||||
console.log("websocket关闭");
|
||||
websocket.close();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function sendSocket(frameId) {
|
||||
// //清除交互
|
||||
// var clearInterationJsonStr = "[{'type':'clearInteraction'}]";
|
||||
// websocket.send(clearInterationJsonStr);
|
||||
var jsonstr = "[{'type':'plan','frameId':'" + frameId + "'}]";
|
||||
websocket.send(jsonstr);
|
||||
}
|
||||
|
||||
|
||||
</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-12">
|
||||
<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="addFun();"><i--%>
|
||||
<%-- class="fa fa-plus"></i>--%>
|
||||
<%-- </button>--%>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1262
src/main/webapp/jsp/process/dataVisualLargeScreenView.jsp
Normal file
1262
src/main/webapp/jsp/process/dataVisualLargeScreenView.jsp
Normal file
File diff suppressed because it is too large
Load Diff
971
src/main/webapp/jsp/process/dataVisualLineChartEdit.jsp
Normal file
971
src/main/webapp/jsp/process/dataVisualLineChartEdit.jsp
Normal file
@ -0,0 +1,971 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_LineChart", DataVisualContent.Type_LineChart); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#titleColorContainer').colorpicker({format: null});
|
||||
$('#subtitleColorContainer').colorpicker({format: null});
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#xaxislinecolorContainer').colorpicker({format: null});
|
||||
$('#xaxisaxislabelcolorContainer').colorpicker({format: null});
|
||||
$('#xaxissplitlinecolorContainer').colorpicker({format: null});
|
||||
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChart.datazoomst}' == 'false') {
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChart.datazoomst}' == 'true') {
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnDatazoomst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChart.xaxislineshow}' == 'false') {
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChart.xaxislineshow}' == 'true') {
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnXaxislineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChart.xaxisaxislabelshow}' == 'false') {
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChart.xaxisaxislabelshow}' == 'true') {
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChart.xaxisaxistickshow}' == 'false') {
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChart.xaxisaxistickshow}' == 'true') {
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnXaxisaxistickshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChart.xaxissplitlineshow}' == 'false') {
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChart.xaxissplitlineshow}' == 'true') {
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnXaxissplitlineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var datalegendPosition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectlegendPosition = $("#legendPosition").select2({
|
||||
data: datalegendPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlegendPosition.val('${dataVisualLineChart.legendPosition}').trigger("change");//设置选中
|
||||
|
||||
var dataTitlePosition = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectTitlePosition = $("#titlePosition").select2({
|
||||
data: dataTitlePosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectTitlePosition.val('${dataVisualLineChart.titlePosition}').trigger("change");//设置选中
|
||||
|
||||
var dataXaxistype = JSON.parse("[{\"id\":\"category\",\"text\":\"类目轴\"},{\"id\":\"time\",\"text\":\"时间轴\"}]");
|
||||
var selectXaxistype = $("#xaxistype").select2({
|
||||
data: dataXaxistype,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10//数据超过十个启用搜索框
|
||||
});
|
||||
selectXaxistype.val('${dataVisualLineChart.xaxistype}').trigger("change");//设置选中
|
||||
|
||||
var dataXaxissplitlinetype = JSON.parse("[{\"id\":\"solid\",\"text\":\"实线\"},{\"id\":\"dashed\",\"text\":\"虚线\"},{\"id\":\"dotted\",\"text\":\"点线\"}]");
|
||||
var selectXaxissplitlinetype = $("#xaxissplitlinetype").select2({
|
||||
data: dataXaxissplitlinetype,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10//数据超过十个启用搜索框
|
||||
});
|
||||
selectXaxissplitlinetype.val('${dataVisualLineChart.xaxissplitlinetype}').trigger("change");//设置选中
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
function doLineChartsave() {
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let baseform = $("#baseForm").serialize();
|
||||
const datazoomstStatus = $('#switchBtnDatazoomst').bootstrapSwitch('state');
|
||||
if (datazoomstStatus) {
|
||||
baseform = baseform + "&datazoomst=true";
|
||||
} else {
|
||||
baseform = baseform + "&datazoomst=false";
|
||||
}
|
||||
|
||||
const xaxislineshowStatus = $('#switchBtnXaxislineshow').bootstrapSwitch('state');
|
||||
if (xaxislineshowStatus) {
|
||||
baseform = baseform + "&xaxislineshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxislineshow=false";
|
||||
}
|
||||
|
||||
const xaxisaxislabelshowStatus = $('#switchBtnxaxisaxislabelshow').bootstrapSwitch('state');
|
||||
if (xaxisaxislabelshowStatus) {
|
||||
baseform = baseform + "&xaxisaxislabelshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxisaxislabelshow=false";
|
||||
}
|
||||
|
||||
const xaxisaxistickshowStatus = $('#switchBtnXaxisaxistickshow').bootstrapSwitch('state');
|
||||
if (xaxisaxistickshowStatus) {
|
||||
baseform = baseform + "&xaxisaxistickshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxisaxistickshow=false";
|
||||
}
|
||||
|
||||
const xaxissplitlineshowStatus = $('#switchBtnXaxissplitlineshow').bootstrapSwitch('state');
|
||||
if (xaxissplitlineshowStatus) {
|
||||
baseform = baseform + "&xaxissplitlineshow=true";
|
||||
} else {
|
||||
baseform = baseform + "&xaxissplitlineshow=false";
|
||||
}
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualLineChart/doupdate.do", baseform, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('lineChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doLineChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualLineChart.id}',
|
||||
type: '${Type_LineChart}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('lineChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSeriesFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualLineChartSeries/dosave.do", {pid: '${dataVisualLineChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function addYAxisFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualLineChartYAxis/dosave.do", {pid: '${dataVisualLineChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function initFun() {
|
||||
$("#seriesTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualLineChartSeries/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualLineChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'yaxisindex', // 返回json数据中的name
|
||||
title: '所属轴', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSeriesFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSeriesFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("seriesTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ext.contextPath + '/process/dataVisualLineChartSeries/dosort.do',
|
||||
contentType: 'application/json;charset=utf-8',
|
||||
data: JSON.stringify({jsondata: newData}),
|
||||
success: function (data) {
|
||||
console.log("data:", data)
|
||||
if (data == 1) {
|
||||
//成功
|
||||
} else {
|
||||
//出错
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
}, error: function (error) {
|
||||
console.log("error", error);
|
||||
}
|
||||
});
|
||||
// $.post(ext.contextPath + '/process/dataVisualLineChartSeries/dosortnew.do', {contentType: 'application/json;charset=utf-8',jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
// function (data) {
|
||||
// if (data == 1) {
|
||||
// //$("#table").bootstrapTable('refresh');
|
||||
// } else {
|
||||
// showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
// }
|
||||
// });
|
||||
}
|
||||
});
|
||||
$("#seriesTable").tableDnD();
|
||||
|
||||
$("#yAxisTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualLineChartYAxis/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualLineChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'morder', // 返回json数据中的name
|
||||
title: '所属轴', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editYAxisFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteYAxisFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("yAxisTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualLineChartYAxis/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#yAxisTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function editSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualLineChartSeries/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('lineChartSeriesSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualLineChartSeries/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editYAxisFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualLineChartYAxis/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('lineChartYAxisSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteYAxisFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualLineChartYAxis/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualLineChart/doCopy.do', {
|
||||
contentId: '${dataVisualContent.id}',
|
||||
id: '${dataVisualLineChart.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('lineChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="lineChartSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">数据配置</a></li>
|
||||
<li class=""><a href="#tab4" data-toggle="tab" index="3"
|
||||
aria-expanded="true">轴配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="baseForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualLineChart.id}"/>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="xaxistype" name="xaxistype"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">缩放轴</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnDatazoomst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnXaxislineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">x轴颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="xaxislinecolorContainer">
|
||||
<input name="xaxislinecolor" id="xaxislinecolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="x轴颜色"
|
||||
value="${dataVisualLineChart.xaxislinecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴刻度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnXaxisaxistickshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">x轴分割线</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnXaxissplitlineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分割线类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="xaxissplitlinetype"
|
||||
name="xaxissplitlinetype"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分割线颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="xaxissplitlinecolorContainer">
|
||||
<input name="xaxissplitlinecolor" id="xaxissplitlinecolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="数值颜色"
|
||||
value="${dataVisualLineChart.xaxissplitlinecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴数值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnxaxisaxislabelshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数值颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="xaxisaxislabelcolorContainer">
|
||||
<input name="xaxisaxislabelcolor" id="xaxisaxislabelcolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="数值颜色"
|
||||
value="${dataVisualLineChart.xaxisaxislabelcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="xaxisaxislabelfontsize"
|
||||
name="xaxisaxislabelfontsize"
|
||||
placeholder="x轴大小"
|
||||
value="${dataVisualLineChart.xaxisaxislabelfontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数值截断位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="xsubstring"
|
||||
name="xsubstring"
|
||||
placeholder="数值截断位"
|
||||
value="${dataVisualLineChart.xsubstring}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">x轴数据组</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="xaxisdata" name="xaxisdata"
|
||||
placeholder="x轴数据组"
|
||||
value="${dataVisualLineChart.xaxisdata}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图例</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="legendPosition" name="legendPosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图例大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="legendTextFontsize"
|
||||
name="legendTextFontsize"
|
||||
placeholder="图例大小"
|
||||
value="${dataVisualLineChart.legendTextFontsize}">
|
||||
</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="titleText" name="titleText"
|
||||
placeholder="标题文本"
|
||||
value="${dataVisualLineChart.titleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="titlePosition" name="titlePosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="titleColorContainer">
|
||||
<input name="titleColor" id="titleColor" type="text" class="form-control"
|
||||
placeholder="标题颜色"
|
||||
value="${dataVisualLineChart.titleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleFontSize" name="titleFontSize"
|
||||
placeholder="标题大小"
|
||||
value="${dataVisualLineChart.titleFontSize}">
|
||||
</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="titleFontWeight" name="titleFontWeight"
|
||||
placeholder="标题粗细"
|
||||
value="${dataVisualLineChart.titleFontWeight}">
|
||||
</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="subtitleText" name="subtitleText"
|
||||
placeholder="副标题文本"
|
||||
value="${dataVisualLineChart.subtitleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="subtitleColorContainer">
|
||||
<input name="subtitleColor" id="subtitleColor" type="text" class="form-control"
|
||||
placeholder="副标题颜色"
|
||||
value="${dataVisualLineChart.subtitleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="subtitleFontSize"
|
||||
name="subtitleFontSize"
|
||||
placeholder="副标题大小"
|
||||
value="${dataVisualLineChart.subtitleFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="subtitleFontWeight"
|
||||
name="subtitleFontWeight"
|
||||
placeholder="副标题粗细"
|
||||
value="${dataVisualLineChart.subtitleFontWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualLineChart.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</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="colors" name="colors" placeholder="颜色组"
|
||||
value="${dataVisualLineChart.colors}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSeriesFun();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<table id="seriesTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab4"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addYAxisFun();"><i
|
||||
class="fa fa-plus"></i> 添加轴
|
||||
</button>
|
||||
</div>
|
||||
<table id="yAxisTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doLineChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doLineChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
336
src/main/webapp/jsp/process/dataVisualLineChartSeriesEdit.jsp
Normal file
336
src/main/webapp/jsp/process/dataVisualLineChartSeriesEdit.jsp
Normal file
@ -0,0 +1,336 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualLineChartSeries" %>
|
||||
<%request.setAttribute("TimeRange_dateSelect", DataVisualLineChartSeries.TimeRange_dateSelect); %>
|
||||
<%request.setAttribute("TimeRange_hour", DataVisualLineChartSeries.TimeRange_hour); %>
|
||||
<%request.setAttribute("TimeRange_day", DataVisualLineChartSeries.TimeRange_day); %>
|
||||
<%request.setAttribute("TimeRange_week", DataVisualLineChartSeries.TimeRange_week); %>
|
||||
<%request.setAttribute("TimeRange_month", DataVisualLineChartSeries.TimeRange_month); %>
|
||||
<%request.setAttribute("TimeRange_year", DataVisualLineChartSeries.TimeRange_year); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("#timerange").select2({minimumResultsForSearch: -1}).val("${dataVisualLineChartSeries.timerange}").trigger("change");
|
||||
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.ishistorydata}' == 'false') {
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.ishistorydata}' == 'true') {
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIshistorydata').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
|
||||
$('#switchBtnMaxshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.maxshow}' == 'false') {
|
||||
$('#switchBtnMaxshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.maxshow}' == 'true') {
|
||||
$('#switchBtnMaxshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnMaxshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnMinshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.minshow}' == 'false') {
|
||||
$('#switchBtnMinshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.minshow}' == 'true') {
|
||||
$('#switchBtnMinshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnMinshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAvgshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.avgshow}' == 'false') {
|
||||
$('#switchBtnAvgshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.avgshow}' == 'true') {
|
||||
$('#switchBtnAvgshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAvgshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAreastyle').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.areastyle}' == 'false') {
|
||||
$('#switchBtnAreastyle').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.areastyle}' == 'true') {
|
||||
$('#switchBtnAreastyle').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAreastyle').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnSymbolst').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.symbolst}' == 'false') {
|
||||
$('#switchBtnSymbolst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.symbolst}' == 'true') {
|
||||
$('#switchBtnSymbolst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnSymbolst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnSelectst').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartSeries.selectst}' == 'false') {
|
||||
$('#switchBtnSelectst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartSeries.selectst}' == 'true') {
|
||||
$('#switchBtnSelectst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnSelectst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function doLineChartSeriesSave() {
|
||||
let form = $("#lineChartSeriesForm").serialize();
|
||||
|
||||
const ishistorydata = $('#switchBtnIshistorydata').bootstrapSwitch('state');
|
||||
if (ishistorydata) {
|
||||
form = form + "&ishistorydata=true";
|
||||
} else {
|
||||
form = form + "&ishistorydata=false";
|
||||
}
|
||||
const switchBtnMaxshow = $('#switchBtnMaxshow').bootstrapSwitch('state');
|
||||
if (switchBtnMaxshow) {
|
||||
form = form + "&maxshow=true";
|
||||
} else {
|
||||
form = form + "&maxshow=false";
|
||||
}
|
||||
const switchBtnMinshow = $('#switchBtnMinshow').bootstrapSwitch('state');
|
||||
if (switchBtnMinshow) {
|
||||
form = form + "&minshow=true";
|
||||
} else {
|
||||
form = form + "&minshow=false";
|
||||
}
|
||||
const switchBtnAvgshow = $('#switchBtnAvgshow').bootstrapSwitch('state');
|
||||
if (switchBtnAvgshow) {
|
||||
form = form + "&avgshow=true";
|
||||
} else {
|
||||
form = form + "&avgshow=false";
|
||||
}
|
||||
const switchBtnAreastyle = $('#switchBtnAreastyle').bootstrapSwitch('state');
|
||||
if (switchBtnAreastyle) {
|
||||
form = form + "&areastyle=true";
|
||||
} else {
|
||||
form = form + "&areastyle=false";
|
||||
}
|
||||
const switchBtnSymbolst = $('#switchBtnSymbolst').bootstrapSwitch('state');
|
||||
if (switchBtnSymbolst) {
|
||||
form = form + "&symbolst=true";
|
||||
} else {
|
||||
form = form + "&symbolst=false";
|
||||
}
|
||||
const switchBtnSelectst = $('#switchBtnSelectst').bootstrapSwitch('state');
|
||||
if (switchBtnSelectst) {
|
||||
form = form + "&selectst=true";
|
||||
} else {
|
||||
form = form + "&selectst=false";
|
||||
}
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualLineChartSeries/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('lineChartSeriesSubModal');
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function selectmpids() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointList4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
$('#lineChartSeriesForm #mpid').val(data);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="lineChartSeriesSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="lineChartSeriesForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualLineChartSeries.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualLineChartSeries.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属轴</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="yaxisindex" name="yaxisindex" placeholder="所属轴"
|
||||
value="${dataVisualLineChartSeries.yaxisindex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">历史值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIshistorydata" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">时间范围</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="timerange" name="timerange" class="form-control select2" style="width: 170px;">
|
||||
<option value="${TimeRange_dateSelect}">日期控件</option>
|
||||
<option value="${TimeRange_hour}">小时</option>
|
||||
<option value="${TimeRange_day}">天</option>
|
||||
<option value="${TimeRange_week}">周</option>
|
||||
<option value="${TimeRange_month}">月</option>
|
||||
<option value="${TimeRange_year}">年</option>
|
||||
</select>
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualLineChartSeries.mpid}" onclick="selectmpids();">
|
||||
</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="urldata" name="urldata"
|
||||
placeholder="接口数据"
|
||||
value="${dataVisualLineChartSeries.urldata}">
|
||||
</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="fixedvalue" name="fixedvalue" placeholder="固定值"
|
||||
value="${dataVisualLineChartSeries.fixedvalue}">
|
||||
</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="markerline" name="markerline" placeholder="标记线"
|
||||
value="${dataVisualLineChartSeries.markerline}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">堆叠名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="stackst" name="stackst" placeholder="堆叠名称"
|
||||
value="${dataVisualLineChartSeries.stackst}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnMaxshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnMinshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">平均值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAvgshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">面积块</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAreastyle" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">拐点图形</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnSymbolst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图例状态</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnSelectst" type="checkbox"/>
|
||||
</div>
|
||||
</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="morder" name="morder" placeholder="排序"
|
||||
value="${dataVisualLineChartSeries.morder}">
|
||||
</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="doLineChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
313
src/main/webapp/jsp/process/dataVisualLineChartYAxisEdit.jsp
Normal file
313
src/main/webapp/jsp/process/dataVisualLineChartYAxisEdit.jsp
Normal file
@ -0,0 +1,313 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#linecolorContainer').colorpicker({format: null});
|
||||
$('#axislabelcolorContainer').colorpicker({format: null});
|
||||
$('#splitlinecolorContainer').colorpicker({format: null});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var positionData = JSON.parse("[{\"id\":\"left\",\"text\":\"左侧\"},{\"id\":\"right\",\"text\":\"右侧\"}]");
|
||||
var positionSelect = $("#position").select2({
|
||||
data: positionData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
positionSelect.val('${dataVisualLineChartYAxis.position}').trigger("change");//设置选中
|
||||
|
||||
|
||||
var splitlinetypeData = JSON.parse("[{\"id\":\"solid\",\"text\":\"实线\"},{\"id\":\"dashed\",\"text\":\"虚线\"},{\"id\":\"dotted\",\"text\":\"点线\"}]");
|
||||
var splitlinetypeSelect = $("#splitlinetype").select2({
|
||||
data: splitlinetypeData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
});
|
||||
splitlinetypeSelect.val('${dataVisualLineChartYAxis.splitlinetype}').trigger("change");//设置选中
|
||||
|
||||
|
||||
$('#switchBtnlineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartYAxis.lineshow}' == 'false') {
|
||||
$('#switchBtnlineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartYAxis.lineshow}' == 'true') {
|
||||
$('#switchBtnlineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnlineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartYAxis.axislabelshow}' == 'false') {
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartYAxis.axislabelshow}' == 'true') {
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnaxislabelshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartYAxis.axistickshow}' == 'false') {
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartYAxis.axistickshow}' == 'true') {
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnaxistickshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartYAxis.splitlineshow}' == 'false') {
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartYAxis.splitlineshow}' == 'true') {
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnsplitlineshow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnscale').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualLineChartYAxis.scale}' == 'false') {
|
||||
$('#switchBtnscale').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualLineChartYAxis.scale}' == 'true') {
|
||||
$('#switchBtnscale').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnscale').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function doLineChartSeriesSave() {
|
||||
let form = $("#lineChartYAxisForm").serialize();
|
||||
const lineshowStatus = $('#switchBtnlineshow').bootstrapSwitch('state');
|
||||
if (lineshowStatus) {
|
||||
form = form + "&lineshow=true";
|
||||
} else {
|
||||
form = form + "&lineshow=false";
|
||||
}
|
||||
|
||||
const axislabelshowStatus = $('#switchBtnaxislabelshow').bootstrapSwitch('state');
|
||||
if (axislabelshowStatus) {
|
||||
form = form + "&axislabelshow=true";
|
||||
} else {
|
||||
form = form + "&axislabelshow=false";
|
||||
}
|
||||
|
||||
const axistickshowStatus = $('#switchBtnaxistickshow').bootstrapSwitch('state');
|
||||
if (axistickshowStatus) {
|
||||
form = form + "&axistickshow=true";
|
||||
} else {
|
||||
form = form + "&axistickshow=false";
|
||||
}
|
||||
|
||||
const splitlineshowStatus = $('#switchBtnsplitlineshow').bootstrapSwitch('state');
|
||||
if (splitlineshowStatus) {
|
||||
form = form + "&splitlineshow=true";
|
||||
} else {
|
||||
form = form + "&splitlineshow=false";
|
||||
}
|
||||
|
||||
const scaleStatus = $('#switchBtnscale').bootstrapSwitch('state');
|
||||
if (scaleStatus) {
|
||||
form = form + "&scale=true";
|
||||
} else {
|
||||
form = form + "&scale=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualLineChartYAxis/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('lineChartYAxisSubModal');
|
||||
$("#yAxisTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="lineChartYAxisSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="lineChartYAxisForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualLineChartYAxis.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualLineChartYAxis.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">所属轴</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="morder" name="morder" placeholder="所属轴"
|
||||
value="${dataVisualLineChartYAxis.morder}">
|
||||
</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="unit" name="unit" placeholder="轴名"
|
||||
value="${dataVisualLineChartYAxis.unit}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="position" name="position"
|
||||
style="width: 170px;"></select>
|
||||
</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="max" name="max" placeholder="最大值"
|
||||
value="${dataVisualLineChartYAxis.max}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="min" name="min" placeholder="最小值"
|
||||
value="${dataVisualLineChartYAxis.min}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">y轴</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnlineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">y轴颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="linecolorContainer">
|
||||
<input name="linecolor" id="linecolor" type="text" class="form-control"
|
||||
placeholder="y轴颜色"
|
||||
value="${dataVisualLineChartYAxis.linecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">y轴数值</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnaxislabelshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数值颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="axislabelcolorContainer">
|
||||
<input name="axislabelcolor" id="axislabelcolor" type="text" class="form-control"
|
||||
placeholder="数值颜色"
|
||||
value="${dataVisualLineChartYAxis.axislabelcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="axislabelfontsize" name="axislabelfontsize" placeholder="数值大小"
|
||||
value="${dataVisualLineChartYAxis.axislabelfontsize}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">y轴刻度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnaxistickshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">y轴分割线</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnsplitlineshow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">分割线类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="splitlinetype"
|
||||
name="splitlinetype"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分割线颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="splitlinecolorContainer">
|
||||
<input name="splitlinecolor" id="splitlinecolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="数值颜色"
|
||||
value="${dataVisualLineChartYAxis.splitlinecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">不含0刻度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnscale" type="checkbox"/>
|
||||
</div>
|
||||
</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="doLineChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
363
src/main/webapp/jsp/process/dataVisualMpViewContainer.jsp
Normal file
363
src/main/webapp/jsp/process/dataVisualMpViewContainer.jsp
Normal file
@ -0,0 +1,363 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_MpView", DataVisualContent.Type_MpView); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$("#mpViewTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualMpView/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualContent.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'mpid', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editMpViewFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteMpViewFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("mpViewTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualMpView/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
$("#mpViewTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#mpViewTable").tableDnD();
|
||||
});
|
||||
|
||||
function doMpViewsave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
let form = $("#subForm").serialize();
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('containerMpViewSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doContentMpViewDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_MpView}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('containerMpViewSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addMpViewFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualMpView/doDetailSave.do", {cntentId: '${dataVisualContent.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#mpViewTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function editMpViewFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualMpView/containerEdit.do', {
|
||||
id: id,
|
||||
contentId: '${dataVisualContent.id}'
|
||||
}, function (data) {
|
||||
$("#containerEditDiv").html(data);
|
||||
openModal('mpViewSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteMpViewFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualMpView/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#mpViewTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doMpViewCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualMpView/doMpViewCopy.do', {
|
||||
contentId: '${dataVisualContent.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('containerMpViewSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="containerMpViewSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addMpViewFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<table id="mpViewTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doContentMpViewDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doMpViewCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doMpViewsave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
437
src/main/webapp/jsp/process/dataVisualMpViewContainerEdit.jsp
Normal file
437
src/main/webapp/jsp/process/dataVisualMpViewContainerEdit.jsp
Normal file
@ -0,0 +1,437 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualMpView" %>
|
||||
<%request.setAttribute("JsMethod_0", DataVisualMpView.JsMethod_0); %>
|
||||
<%request.setAttribute("JsMethod_1", DataVisualMpView.JsMethod_1); %>
|
||||
<%request.setAttribute("JsMethod_2", DataVisualMpView.JsMethod_2); %>
|
||||
<%request.setAttribute("JsMethod_3", DataVisualMpView.JsMethod_3); %>
|
||||
<%request.setAttribute("JsMethod_4", DataVisualMpView.JsMethod_4); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var masterId = '${dataVisualMpView.id}'
|
||||
var tbName = 'tb_pro_dataVisual_mpView_file'; //数据表
|
||||
var nameSpace = 'datavisual';//保存文件夹
|
||||
var bucketName = 'datavisual';
|
||||
var filelist = new Array();
|
||||
var previews = new Array();
|
||||
var previewConfigs = new Array();
|
||||
|
||||
$(function () {
|
||||
$('#colorContainer1').colorpicker({format: null});
|
||||
$('#colorContainer2').colorpicker({format: null});
|
||||
|
||||
$("#jsmethod").select2({minimumResultsForSearch: -1}).val("${dataVisualMpView.jsmethod}").trigger("change");
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualMpView.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
$("#outValueType").select2({minimumResultsForSearch: -1}).val("${dataVisualMpView.outValueType}").trigger("change");
|
||||
var outValueTypeJson = JSON.parse("[{\"id\":\"0\",\"text\":\"比较结果\"},{\"id\":\"1\",\"text\":\"测量点值\"}]");
|
||||
var selectoutValueType = $("#outValueType").select2({
|
||||
data: outValueTypeJson,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectoutValueType.on('change', function () {
|
||||
let v = $("#outValueType").val();
|
||||
if (v == '0') {
|
||||
$('#outValueTypeShow1').css('display', 'block');
|
||||
$('#outValueTypeShow2').css('display', 'block');
|
||||
$('#outValueTypeShow3').css('display', 'none');
|
||||
} else if (v == '1') {
|
||||
$('#outValueTypeShow1').css('display', 'none');
|
||||
$('#outValueTypeShow2').css('display', 'none');
|
||||
$('#outValueTypeShow3').css('display', 'block');
|
||||
}
|
||||
})
|
||||
selectoutValueType.val('${dataVisualMpView.outValueType}').trigger("change");//设置选中
|
||||
|
||||
|
||||
$("#autoBkTextType").select2({minimumResultsForSearch: -1}).val("${dataVisualMpView.autoBkTextType}").trigger("change");
|
||||
var autoBkTextTypeJson = JSON.parse("[{\"id\":\"1\",\"text\":\"数据值\"},{\"id\":\"2\",\"text\":\"百分比\"}]");
|
||||
var selectautoBkTextType = $("#autoBkTextType").select2({
|
||||
data: autoBkTextTypeJson,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectautoBkTextType.val('${dataVisualMpView.autoBkTextType}').trigger("change");//设置选中
|
||||
|
||||
|
||||
$('#switchBtnFilest').bootstrapSwitch({
|
||||
onText: '启用',
|
||||
offText: '禁用',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualMpView.filest}' == 'false') {
|
||||
$('#switchBtnFilest').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualMpView.filest}' == 'true') {
|
||||
$('#switchBtnFilest').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnFilest').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnAutoBkSt').bootstrapSwitch({
|
||||
onText: '开启',
|
||||
offText: '关闭',
|
||||
size: "small",
|
||||
// 当开关状态改变时触发
|
||||
onSwitchChange: function (event, state) {
|
||||
if (state) {//改input的值
|
||||
$('#autoBkSt_display').css('display', 'block');
|
||||
} else {
|
||||
$('#autoBkSt_display').css('display', 'none');
|
||||
}
|
||||
}
|
||||
});
|
||||
if ('${dataVisualMpView.autoBkSt}' == 'false') {
|
||||
$('#switchBtnAutoBkSt').bootstrapSwitch('state', false, true);
|
||||
$('#autoBkSt_display').css('display', 'none');
|
||||
} else if ('${dataVisualMpView.autoBkSt}' == 'true') {
|
||||
$('#switchBtnAutoBkSt').bootstrapSwitch('state', true, true);
|
||||
$('#autoBkSt_display').css('display', 'block');
|
||||
} else {
|
||||
$('#switchBtnAutoBkSt').bootstrapSwitch('state', false, true);
|
||||
$('#autoBkSt_display').css('display', 'none');
|
||||
}
|
||||
|
||||
$('#switchBtnAutoBkTextSt').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualMpView.autoBkTextSt}' == 'false') {
|
||||
$('#switchBtnAutoBkTextSt').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualMpView.autoBkTextSt}' == 'true') {
|
||||
$('#switchBtnAutoBkTextSt').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAutoBkTextSt').bootstrapSwitch('state', true, true);
|
||||
}
|
||||
|
||||
getFileListMinioPic('mpViewFileId', 'edit', masterId, previews, previewConfigs);
|
||||
});
|
||||
|
||||
|
||||
function doMpViewDSave() {
|
||||
let form = $("#mpViewForm").serialize();
|
||||
const filestStatus = $('#switchBtnFilest').bootstrapSwitch('state');
|
||||
if (filestStatus) {
|
||||
form = form + "&filest=true";
|
||||
} else {
|
||||
form = form + "&filest=false";
|
||||
}
|
||||
const autoBkStStatus = $('#switchBtnAutoBkSt').bootstrapSwitch('state');
|
||||
if (autoBkStStatus) {
|
||||
form = form + "&autoBkSt=true";
|
||||
} else {
|
||||
form = form + "&autoBkSt=false";
|
||||
}
|
||||
const autoBkTextStStatus = $('#switchBtnAutoBkTextSt').bootstrapSwitch('state');
|
||||
if (autoBkTextStStatus) {
|
||||
form = form + "&autoBkTextSt=true";
|
||||
} else {
|
||||
form = form + "&autoBkTextSt=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualMpView/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('mpViewSubModal');
|
||||
$("#mpViewTable").bootstrapTable('refresh');
|
||||
// showOneContent('${param.contentId}');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#mpViewForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
function selectmpid2() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone2'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone2(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#mpViewForm #jsmpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="mpViewSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="mpViewForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualMpView.id}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${dataVisualMpView.pid}"/>
|
||||
<input type="hidden" name="morder" id="morder" value="${dataVisualMpView.morder}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">输出类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="outValueType" name="outValueType" class="form-control select2" style="width: 100%">
|
||||
<option value="0" selected>比较结果</option>
|
||||
<option value="1">测量点值</option>
|
||||
</select>
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualMpView.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style=";width: 169px"></select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">比较方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="jsmethod" name="jsmethod" class="form-control select2" style="width: 100%">
|
||||
<option value="${JsMethod_0}" selected>></option>
|
||||
<option value="${JsMethod_1}">>=</option>
|
||||
<option value="${JsMethod_2}">=</option>
|
||||
<option value="${JsMethod_3}"><</option>
|
||||
<option value="${JsMethod_4}"><=</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">比较值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="jsvalue" name="jsvalue" placeholder="比较值"
|
||||
value="${dataVisualMpView.jsvalue}">
|
||||
</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="jsmpid" name="jsmpid" placeholder="比较测量点"
|
||||
value="${dataVisualMpView.jsmpid}" onclick="selectmpid2();">
|
||||
</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="background" name="background"
|
||||
placeholder="背景"
|
||||
value="${dataVisualMpView.background}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="outValueTypeShow1">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">url</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="url" name="url" placeholder="url"
|
||||
value="${dataVisualMpView.url}">
|
||||
</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="textshow" name="textshow" placeholder="文本"
|
||||
value="${dataVisualMpView.textshow}">
|
||||
</div>
|
||||
</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualMpView.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="文字颜色"
|
||||
value="${dataVisualMpView.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualMpView.fontweight}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">透明度</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input type="text" class="form-control" id="opacity" name="opacity"
|
||||
placeholder="0~1"
|
||||
value="${dataVisualMpView.opacity}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="outValueTypeShow3">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">动态背景</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAutoBkSt" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">动态背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer2">
|
||||
<input name="autoBkBackground" id="autoBkBackground" type="text"
|
||||
class="form-control"
|
||||
placeholder="动态背景色"
|
||||
value="${dataVisualMpView.autoBkBackground}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="autoBkStMaxvalue" name="autoBkStMaxvalue"
|
||||
placeholder="最大值"
|
||||
value="${dataVisualMpView.autoBkStMaxvalue}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="autoBkSt_display">
|
||||
<label class="col-sm-2 control-label">文本显示</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAutoBkTextSt" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">显示样式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="autoBkTextType" name="autoBkTextType" class="form-control select2">
|
||||
<option value="1" selected>数据值</option>
|
||||
<option value="2">百分比</option>
|
||||
</select>
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualMpView.style}">
|
||||
</div>
|
||||
</div>
|
||||
<div id="outValueTypeShow2">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">附件状态</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnFilest" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin:8px">
|
||||
<button type="button" class="btn btn-default btn-file"
|
||||
onclick="fileinputPic('mpViewFileId')"
|
||||
id="btn_save"><i
|
||||
class="fa fa-paperclip"></i>上传图片
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-group" style="margin:8px;">
|
||||
<input type="file" name="mpViewFileId" id="mpViewFileId" multiple
|
||||
class="file-loading"/>
|
||||
</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="doMpViewDSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
592
src/main/webapp/jsp/process/dataVisualPercentChartEdit.jsp
Normal file
592
src/main/webapp/jsp/process/dataVisualPercentChartEdit.jsp
Normal file
@ -0,0 +1,592 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_PercentChart", DataVisualContent.Type_PercentChart); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#titleColorContainer').colorpicker({format: null});
|
||||
$('#subtitleColorContainer').colorpicker({format: null});
|
||||
$('#unittitleColorContainer').colorpicker({format: null});
|
||||
$('#scoreringcolorContainer').colorpicker({format: null});
|
||||
$('#bgringcolorContainer').colorpicker({format: null});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var dataclockwise = JSON.parse("[{\"id\":\"true\",\"text\":\"顺时针\"},{\"id\":\"false\",\"text\":\"逆时针\"}]");
|
||||
var selectclockwise = $("#clockwise").select2({
|
||||
data: dataclockwise,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
// select.on("change", function (e) {
|
||||
//
|
||||
// });
|
||||
selectclockwise.val('${dataVisualPercentChart.clockwise}').trigger("change");//设置选中
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnUnitisneedbr').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualPercentChart.unitisneedbr}' == 'false') {
|
||||
$('#switchBtnUnitisneedbr').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualPercentChart.unitisneedbr}' == 'true') {
|
||||
$('#switchBtnUnitisneedbr').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnUnitisneedbr').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualPercentChart.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doPercentChartsave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#chartsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#chartsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let chartsubForm = $("#chartsubForm").serialize();
|
||||
const switchBtnUnitisneedbr = $('#switchBtnUnitisneedbr').bootstrapSwitch('state');
|
||||
if (switchBtnUnitisneedbr) {
|
||||
chartsubForm = chartsubForm + "&unitisneedbr=true";
|
||||
} else {
|
||||
chartsubForm = chartsubForm + "&unitisneedbr=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualPercentChart/doupdate.do", chartsubForm, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('percentChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doPercentChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualPercentChart.id}',
|
||||
type: '${Type_PercentChart}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('percentChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#chartsubForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
function doCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualPercentChart/doCopy.do', {
|
||||
contentId: '${dataVisualContent.id}',
|
||||
id: '${dataVisualPercentChart.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('percentChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="percentChartSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="chartsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualPercentChart.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="mpid" name="mpid"
|
||||
placeholder="测量点"
|
||||
value="${dataVisualPercentChart.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</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="urldata" name="urldata"
|
||||
placeholder="接口数据"
|
||||
value="${dataVisualPercentChart.urldata}">
|
||||
</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="titleText" name="titleText"
|
||||
placeholder="固定值"
|
||||
value="${dataVisualPercentChart.titleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">小数位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="numtail" name="numtail"
|
||||
placeholder="小数位"
|
||||
value="${dataVisualPercentChart.numtail}">
|
||||
</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="rate" name="rate"
|
||||
placeholder="系数"
|
||||
value="${dataVisualPercentChart.rate}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="titleColorContainer">
|
||||
<input name="titleColor" id="titleColor" type="text" class="form-control"
|
||||
placeholder="标题颜色"
|
||||
value="${dataVisualPercentChart.titleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleFontSize" name="titleFontSize"
|
||||
placeholder="标题大小"
|
||||
value="${dataVisualPercentChart.titleFontSize}">
|
||||
</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="titleFontWeight" name="titleFontWeight"
|
||||
placeholder="标题粗细"
|
||||
value="${dataVisualPercentChart.titleFontWeight}">
|
||||
</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="titleLeftPosition" name="titleLeftPosition"
|
||||
placeholder="与左侧距离"
|
||||
value="${dataVisualPercentChart.titleLeftPosition}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">与顶部距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleTopPosition" name="titleTopPosition"
|
||||
placeholder="与顶部距离"
|
||||
value="${dataVisualPercentChart.titleTopPosition}">
|
||||
</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="subtitleText" name="subtitleText"
|
||||
placeholder="副标题内容"
|
||||
value="${dataVisualPercentChart.subtitleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="subtitleColorContainer">
|
||||
<input name="subtitleColor" id="subtitleColor" type="text" class="form-control"
|
||||
placeholder="副标题颜色"
|
||||
value="${dataVisualPercentChart.subtitleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="subtitleFontSize" name="subtitleFontSize"
|
||||
placeholder="副标题大小"
|
||||
value="${dataVisualPercentChart.subtitleFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="subtitleFontWeight" name="subtitleFontWeight"
|
||||
placeholder="副标题粗细"
|
||||
value="${dataVisualPercentChart.subtitleFontWeight}">
|
||||
</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="subtitlePosition" name="subtitlePosition"
|
||||
placeholder="与标题距离"
|
||||
value="${dataVisualPercentChart.subtitlePosition}">
|
||||
</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="unittitleText" name="unittitleText"
|
||||
placeholder="单位"
|
||||
value="${dataVisualPercentChart.unittitleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="unittitleColorContainer">
|
||||
<input name="unittitleColor" id="unittitleColor" type="text" class="form-control"
|
||||
placeholder="单位颜色"
|
||||
value="${dataVisualPercentChart.unittitleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="unittitleFontSize" name="unittitleFontSize"
|
||||
placeholder="单位大小"
|
||||
value="${dataVisualPercentChart.unittitleFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unittitleFontWeight" name="unittitleFontWeight"
|
||||
placeholder="单位粗细"
|
||||
value="${dataVisualPercentChart.unittitleFontWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">是否换行</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnUnitisneedbr" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">旋转方向</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<select class="form-control select2 " id="clockwise" name="clockwise"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图形大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="radius" name="radius"
|
||||
placeholder="图形大小"
|
||||
value="${dataVisualPercentChart.radius}">
|
||||
</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="angleaxismax" name="angleaxismax"
|
||||
placeholder="刻度最大值"
|
||||
value="${dataVisualPercentChart.angleaxismax}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">刻度角度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="startangle" name="startangle"
|
||||
placeholder="刻度角度"
|
||||
value="${dataVisualPercentChart.startangle}">
|
||||
</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="scoreringwidth" name="scoreringwidth"
|
||||
placeholder="分值环大小"
|
||||
value="${dataVisualPercentChart.scoreringwidth}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分值环颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="scoreringcolorContainer">
|
||||
<input name="scoreringcolor" id="scoreringcolor" type="text" class="form-control"
|
||||
placeholder="分值环颜色"
|
||||
value="${dataVisualPercentChart.scoreringcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="bgringwidth" name="bgringwidth"
|
||||
placeholder="背景环大小"
|
||||
value="${dataVisualPercentChart.bgringwidth}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景环颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="bgringcolorContainer">
|
||||
<input name="bgringcolor" id="bgringcolor" type="text" class="form-control"
|
||||
placeholder="背景环颜色"
|
||||
value="${dataVisualPercentChart.bgringcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="bgringposition" name="bgringposition"
|
||||
placeholder="背景环位置"
|
||||
value="${dataVisualPercentChart.bgringposition}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualPercentChart.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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" onclick="doPercentChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPercentChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@ -0,0 +1,260 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_PersonnelPositioning", DataVisualContent.Type_PersonnelPositioning); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({format: null});
|
||||
$('#fontColorContainer').colorpicker({format: null});
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doPersonnelPositioningsave() {
|
||||
$("#datesubForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#datesubForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#datesubForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#datesubForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#datesubForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualPersonnelPositioning/doupdate.do", $("#datesubForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doPersonnelPositioningdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualPersonnelPositioning.id}',
|
||||
type: '${Type_PersonnelPositioning}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('subModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="datesubForm1" autocomplete="off">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">sec</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="datesubForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualPersonnelPositioning.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer">
|
||||
<input name="color" id="color" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualPersonnelPositioning.color}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">偏移_left</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="shiftingLeft" name="shiftingLeft"
|
||||
placeholder="偏移_left"
|
||||
value="${dataVisualPersonnelPositioning.shiftingLeft}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">偏移_top</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="shiftingTop" name="shiftingTop"
|
||||
placeholder="偏移_top"
|
||||
value="${dataVisualPersonnelPositioning.shiftingTop}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">人名颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="fontColorContainer">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="人名颜色"
|
||||
value="${dataVisualPersonnelPositioning.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">人名大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fontsize" name="fontsize"
|
||||
placeholder="人名大小"
|
||||
value="${dataVisualPersonnelPositioning.fontsize}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">mq主题</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="mqTheme" name="mqTheme" placeholder="mq主题名称"
|
||||
value="${dataVisualPersonnelPositioning.mqTheme}">
|
||||
</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" onclick="doPersonnelPositioningdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPersonnelPositioningsave()" id="btn_save">保存
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
621
src/main/webapp/jsp/process/dataVisualPieChartEdit.jsp
Normal file
621
src/main/webapp/jsp/process/dataVisualPieChartEdit.jsp
Normal file
@ -0,0 +1,621 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_PieChart", DataVisualContent.Type_PieChart); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#titleColorContainer').colorpicker({format: null});
|
||||
$('#subtitleColorContainer').colorpicker({format: null});
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#lableColorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnLableShow').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualPieChart.lableShow}' == 'false') {
|
||||
$('#switchBtnLableShow').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualPieChart.lableShow}' == 'true') {
|
||||
$('#switchBtnLableShow').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnLableShow').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var datalegendPosition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectlegendPosition = $("#legendPosition").select2({
|
||||
data: datalegendPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlegendPosition.val('${dataVisualPieChart.legendPosition}').trigger("change");//设置选中
|
||||
|
||||
var datalablePosition = JSON.parse("[{\"id\":\"outside\",\"text\":\"外侧\"},{\"id\":\"inside\",\"text\":\"内部\"}]");
|
||||
var selectlablePosition = $("#lablePosition").select2({
|
||||
data: datalablePosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlablePosition.val('${dataVisualPieChart.lablePosition}').trigger("change");//设置选中
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
function doPieChartsave() {
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let baseform = $("#baseForm").serialize();
|
||||
const lableShowStatus = $('#switchBtnLableShow').bootstrapSwitch('state');
|
||||
if (lableShowStatus) {
|
||||
baseform = baseform + "&lableShow=true";
|
||||
} else {
|
||||
baseform = baseform + "&lableShow=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualPieChart/doupdate.do", baseform, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('pieChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doPieChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualPieChart.id}',
|
||||
type: '${Type_PieChart}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('pieChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSeriesFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualPieChartSeries/dosave.do", {pid: '${dataVisualPieChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function initFun() {
|
||||
$("#seriesTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualPieChartSeries/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualPieChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSeriesFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSeriesFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("seriesTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualPieChartSeries/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#seriesTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function editSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualPieChartSeries/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('pieChartSeriesSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualPieChartSeries/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="pieChartSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">数据配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="baseForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualPieChart.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="titleText" name="titleText"
|
||||
placeholder="标题文本"
|
||||
value="${dataVisualPieChart.titleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="titleColorContainer">
|
||||
<input name="titleColor" id="titleColor" type="text" class="form-control"
|
||||
placeholder="标题颜色"
|
||||
value="${dataVisualPieChart.titleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="titleFontSize" name="titleFontSize"
|
||||
placeholder="标题大小"
|
||||
value="${dataVisualPieChart.titleFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleFontWeight" name="titleFontWeight"
|
||||
placeholder="标题粗细"
|
||||
value="${dataVisualPieChart.titleFontWeight}">
|
||||
</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="titlePositionX" name="titlePositionX"
|
||||
placeholder="标题左侧"
|
||||
value="${dataVisualPieChart.titlePositionX}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题上侧</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titlePositionY" name="titlePositionY"
|
||||
placeholder="标题上侧"
|
||||
value="${dataVisualPieChart.titlePositionY}">
|
||||
</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="subtitleText" name="subtitleText"
|
||||
placeholder="副标题文本"
|
||||
value="${dataVisualPieChart.subtitleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="subtitleColorContainer">
|
||||
<input name="subtitleColor" id="subtitleColor" type="text" class="form-control"
|
||||
placeholder="副标题颜色"
|
||||
value="${dataVisualPieChart.subtitleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="subtitleFontSize"
|
||||
name="subtitleFontSize"
|
||||
placeholder="副标题大小"
|
||||
value="${dataVisualPieChart.subtitleFontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">副标题粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="subtitleFontWeight"
|
||||
name="subtitleFontWeight"
|
||||
placeholder="副标题粗细"
|
||||
value="${dataVisualPieChart.subtitleFontWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">提示文本</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnLableShow" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="lablePosition" name="lablePosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文本颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="lableColorContainer">
|
||||
<input name="lableColor" id="lableColor" type="text" class="form-control"
|
||||
placeholder="文本颜色"
|
||||
value="${dataVisualPieChart.lableColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="lableFontsize"
|
||||
name="lableFontsize"
|
||||
placeholder="文本大小"
|
||||
value="${dataVisualPieChart.lableFontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文本粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="lableFontweight"
|
||||
name="lableFontweight"
|
||||
placeholder="文本粗细"
|
||||
value="${dataVisualPieChart.lableFontweight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualPieChart.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图例</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="legendPosition" name="legendPosition"
|
||||
style="width: 170px;"></select>
|
||||
</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="radius" name="radius"
|
||||
placeholder="图形大小"
|
||||
value="${dataVisualPieChart.radius}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">边框半径</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="borderradius" name="borderradius"
|
||||
placeholder="边框半径"
|
||||
value="${dataVisualPieChart.borderradius}">
|
||||
</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="colors" name="colors" placeholder="颜色组"
|
||||
value="${dataVisualPieChart.colors}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSeriesFun();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<table id="seriesTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doPieChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPieChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
139
src/main/webapp/jsp/process/dataVisualPieChartSeriesEdit.jsp
Normal file
139
src/main/webapp/jsp/process/dataVisualPieChartSeriesEdit.jsp
Normal file
@ -0,0 +1,139 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualLineChartSeries" %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualPieChartSeries.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doPieChartSeriesSave() {
|
||||
let form = $("#pieChartSeriesForm").serialize();
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualPieChartSeries/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('pieChartSeriesSubModal');
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#pieChartSeriesForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="pieChartSeriesSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="pieChartSeriesForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualPieChartSeries.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualPieChartSeries.name}">
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualPieChartSeries.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fixedvalue" name="fixedvalue" placeholder="固定值"
|
||||
value="${dataVisualPieChartSeries.fixedvalue}">
|
||||
</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="rate" name="rate" placeholder="系数"
|
||||
value="${dataVisualPieChartSeries.rate}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">小数位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="numtail" name="numtail" placeholder="小数位"
|
||||
value="${dataVisualPieChartSeries.numtail}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</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="doPieChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
539
src/main/webapp/jsp/process/dataVisualPolarCoordinatesEdit.jsp
Normal file
539
src/main/webapp/jsp/process/dataVisualPolarCoordinatesEdit.jsp
Normal file
@ -0,0 +1,539 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_PolarCoordinates", DataVisualContent.Type_PolarCoordinates); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#backgroundcolorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnBackgroundst').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualPolarCoordinates.backgroundst}' == 'false') {
|
||||
$('#switchBtnBackgroundst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualPolarCoordinates.backgroundst}' == 'true') {
|
||||
$('#switchBtnBackgroundst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnBackgroundst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnRoundcapst').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualPolarCoordinates.roundcapst}' == 'false') {
|
||||
$('#switchBtnRoundcapst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualPolarCoordinates.roundcapst}' == 'true') {
|
||||
$('#switchBtnRoundcapst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnRoundcapst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var datalegendPosition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectlegendPosition = $("#legendPosition").select2({
|
||||
data: datalegendPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlegendPosition.val('${dataVisualPolarCoordinates.legendPosition}').trigger("change");//设置选中
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
function doPolarCoordinatessave() {
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let baseform = $("#baseForm").serialize();
|
||||
const backgroundstStatus = $('#switchBtnBackgroundst').bootstrapSwitch('state');
|
||||
if (backgroundstStatus) {
|
||||
baseform = baseform + "&backgroundst=true";
|
||||
} else {
|
||||
baseform = baseform + "&backgroundst=false";
|
||||
}
|
||||
const roundcapstStatus = $('#switchBtnRoundcapst').bootstrapSwitch('state');
|
||||
if (roundcapstStatus) {
|
||||
baseform = baseform + "&roundcapst=true";
|
||||
} else {
|
||||
baseform = baseform + "&roundcapst=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualPolarCoordinates/doupdate.do", baseform, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('polarCoordinatesSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doPolarCoordinatesDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualPolarCoordinates.id}',
|
||||
type: '${Type_PolarCoordinates}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('polarCoordinatesSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSeriesFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualPolarCoordinatesSeries/dosave.do", {pid: '${dataVisualPolarCoordinates.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function initFun() {
|
||||
$("#seriesTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualPolarCoordinatesSeries/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualPolarCoordinates.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSeriesFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSeriesFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("seriesTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualPolarCoordinatesSeries/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#seriesTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function editSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualPolarCoordinatesSeries/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('polarCoordinatesSeriesSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualPolarCoordinatesSeries/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="polarCoordinatesSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">数据配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="baseForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualPolarCoordinates.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="max" name="max"
|
||||
placeholder="最大值"
|
||||
value="${dataVisualPolarCoordinates.max}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">图例</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="legendPosition" name="legendPosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图例大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="legendFontsize" name="legendFontsize"
|
||||
placeholder="图例大小"
|
||||
value="${dataVisualPolarCoordinates.legendFontsize}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualPolarCoordinates.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图形大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="radius" name="radius"
|
||||
placeholder="图形大小"
|
||||
value="${dataVisualPolarCoordinates.radius}">
|
||||
</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="barwidth" name="barwidth"
|
||||
placeholder="图形宽度"
|
||||
value="${dataVisualPolarCoordinates.barwidth}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">显示圆角</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnRoundcapst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">显示背景条</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnBackgroundst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景条颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundcolorContainer">
|
||||
<input name="backgroundcolor" id="backgroundcolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="背景条颜色"
|
||||
value="${dataVisualPolarCoordinates.backgroundcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</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="colors" name="colors" placeholder="颜色组"
|
||||
value="${dataVisualPolarCoordinates.colors}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSeriesFun();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<table id="seriesTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doPolarCoordinatesDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doPolarCoordinatessave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@ -0,0 +1,127 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualLineChartSeries" %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualPolarCoordinatesSeries.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doPolarCoordinatesSeriesSeriesSave() {
|
||||
let form = $("#polarCoordinatesSeriesForm").serialize();
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualPolarCoordinatesSeries/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('polarCoordinatesSeriesSubModal');
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#polarCoordinatesSeriesForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="polarCoordinatesSeriesSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="polarCoordinatesSeriesForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualPolarCoordinatesSeries.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualPolarCoordinatesSeries.name}">
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualPolarCoordinatesSeries.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fixedvalue" name="fixedvalue" placeholder="固定值"
|
||||
value="${dataVisualPolarCoordinatesSeries.fixedvalue}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</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="doPolarCoordinatesSeriesSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
449
src/main/webapp/jsp/process/dataVisualProgressBarChartEdit.jsp
Normal file
449
src/main/webapp/jsp/process/dataVisualProgressBarChartEdit.jsp
Normal file
@ -0,0 +1,449 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_ProgressBar", DataVisualContent.Type_ProgressBar); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#bkcolorsContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var datatextPosition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"inside\",\"text\":\"内部\"},{\"id\":\"top\",\"text\":\"顶部\"},{\"id\":\"bottom\",\"text\":\"底部\"},{\"id\":\"right\",\"text\":\"右侧\"}]");
|
||||
var selecttextPosition = $("#textPosition").select2({
|
||||
data: datatextPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selecttextPosition.val('${dataVisualProgressBarChart.textPosition}').trigger("change");//设置选中
|
||||
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualProgressBarChart.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
|
||||
});
|
||||
|
||||
function doProgressBarChartsave() {
|
||||
$("#contentsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#contentsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {0
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#chartsubForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#chartsubForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let chartsubForm = $("#chartsubForm").serialize();
|
||||
const switchBtnUnitisneedbr = $('#switchBtnUnitisneedbr').bootstrapSwitch('state');
|
||||
if (switchBtnUnitisneedbr) {
|
||||
chartsubForm = chartsubForm + "&unitisneedbr=true";
|
||||
} else {
|
||||
chartsubForm = chartsubForm + "&unitisneedbr=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualProgressBarChart/doupdate.do", chartsubForm, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('percentChartSubModal');
|
||||
if('${dataVisualContent.istab}'=='true'){
|
||||
showOneContent('${dataVisualContent.id}','tab');
|
||||
}else{
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doProgressBarChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualProgressBarChart.id}',
|
||||
type: '${Type_ProgressBar}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('percentChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doProgressBarChartCopy(){
|
||||
$.post(ext.contextPath + '/process/dataVisualProgressBarChart/doCopy.do', {
|
||||
contentId: '${dataVisualContent.id}',
|
||||
id: '${dataVisualProgressBarChart.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('percentChartSubModal');
|
||||
if('${dataVisualContent.istab}'=='true'){
|
||||
showOneContent(datajson.id,'tab');
|
||||
}else{
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#chartsubForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
function selectmpid2() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone2'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone2(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#chartsubForm #bkmptext').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="percentChartSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="chartsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualProgressBarChart.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="text" name="text"
|
||||
placeholder="数据固定值"
|
||||
value="${dataVisualProgressBarChart.text}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">数据测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpid" name="mpid"
|
||||
placeholder="数据测量点"
|
||||
value="${dataVisualProgressBarChart.mpid}" onclick="selectmpid();">
|
||||
</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="bktext" name="bktext"
|
||||
placeholder="最大值固定值"
|
||||
value="${dataVisualProgressBarChart.bktext}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最大值测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="bkmptext" name="bkmptext"
|
||||
placeholder="最大值测量点"
|
||||
value="${dataVisualProgressBarChart.bkmptext}" onclick="selectmpid2();">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本位置</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<select class="form-control select2 " id="textPosition" name="textPosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文本颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="textColor" name="textColor"
|
||||
placeholder="文本颜色"
|
||||
value="${dataVisualProgressBarChart.textColor}" >
|
||||
</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="textFontsize" name="textFontsize"
|
||||
placeholder="文本大小"
|
||||
value="${dataVisualProgressBarChart.textFontsize}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文本粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="textFontweight" name="textFontweight"
|
||||
placeholder="文本粗细"
|
||||
value="${dataVisualProgressBarChart.textFontweight}" >
|
||||
</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="databarwidth" name="databarwidth"
|
||||
placeholder="进度条粗细"
|
||||
value="${dataVisualProgressBarChart.databarwidth}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">进度条圆角</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="dataradius" name="dataradius"
|
||||
placeholder="进度条圆角"
|
||||
value="${dataVisualProgressBarChart.dataradius}" >
|
||||
</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="datacolors" name="datacolors"
|
||||
placeholder="进度条颜色"
|
||||
value="${dataVisualProgressBarChart.datacolors}" >
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景条颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="bkcolorsContainer">
|
||||
<input name="bkcolors" id="bkcolors" type="text" class="form-control"
|
||||
placeholder="背景条颜色"
|
||||
value="${dataVisualProgressBarChart.bkcolors}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="bkbarwidth" name="bkbarwidth"
|
||||
placeholder="背景条粗细"
|
||||
value="${dataVisualProgressBarChart.bkbarwidth}" >
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景条圆角</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="bkradius" name="bkradius"
|
||||
placeholder="背景条圆角"
|
||||
value="${dataVisualProgressBarChart.bkradius}" >
|
||||
</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" onclick="doProgressBarChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doProgressBarChartCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doProgressBarChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
68
src/main/webapp/jsp/process/dataVisualRadarChartAxisEdit.jsp
Normal file
68
src/main/webapp/jsp/process/dataVisualRadarChartAxisEdit.jsp
Normal file
@ -0,0 +1,68 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
|
||||
function doLineChartSeriesSave() {
|
||||
let form = $("#radarChartAxisForm").serialize();
|
||||
$.post(ext.contextPath + "/process/dataVisualRadarChartAxis/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('radarChartAxisSubModal');
|
||||
$("#axisTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="radarChartAxisSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="radarChartAxisForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualRadarChartAxis.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualRadarChartAxis.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="max" name="max" placeholder="最大值"
|
||||
value="${dataVisualRadarChartAxis.max}">
|
||||
</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="doLineChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
758
src/main/webapp/jsp/process/dataVisualRadarChartEdit.jsp
Normal file
758
src/main/webapp/jsp/process/dataVisualRadarChartEdit.jsp
Normal file
@ -0,0 +1,758 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_RadarChart", DataVisualContent.Type_RadarChart); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#titleColorContainer').colorpicker({format: null});
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#axisnamecolorContainer').colorpicker({format: null});
|
||||
$('#axislinecolorContainer').colorpicker({format: null});
|
||||
$('#splitlinecolorContainer').colorpicker({format: null});
|
||||
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var datalegendPosition = JSON.parse("[{\"id\":\"false\",\"text\":\"不显示\"},{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectlegendPosition = $("#legendPosition").select2({
|
||||
data: datalegendPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectlegendPosition.val('${dataVisualRadarChart.legendPosition}').trigger("change");//设置选中
|
||||
|
||||
var dataTitlePosition = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectTitlePosition = $("#titlePosition").select2({
|
||||
data: dataTitlePosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectTitlePosition.val('${dataVisualRadarChart.titlePosition}').trigger("change");//设置选中
|
||||
|
||||
var datashape = JSON.parse("[{\"id\":\"polygon\",\"text\":\"多边形\"},{\"id\":\"circle\",\"text\":\"圆形\"}]");
|
||||
var selectshape = $("#shape").select2({
|
||||
data: datashape,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectshape.val('${dataVisualRadarChart.titlePosition}').trigger("change");//设置选中
|
||||
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
function doRadarChartsave() {
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let baseform = $("#baseForm").serialize();
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualRadarChart/doupdate.do", baseform, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('radarChartSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doRadarChartDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualRadarChart.id}',
|
||||
type: '${Type_RadarChart}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('radarChartSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSeriesFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualRadarChartSeries/dosave.do", {pid: '${dataVisualRadarChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function addAxisFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualRadarChartAxis/dosave.do", {pid: '${dataVisualRadarChart.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#axisTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function initFun() {
|
||||
$("#seriesTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualRadarChartSeries/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualRadarChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSeriesFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSeriesFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("seriesTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualRadarChartSeries/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#seriesTable").tableDnD();
|
||||
|
||||
$("#axisTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualRadarChartAxis/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualRadarChart.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editAxisFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteAxisFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("axisTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualRadarChartAxis/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$("#axisTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function editSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualRadarChartSeries/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('radarChartSeriesSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteSeriesFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualRadarChartSeries/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editAxisFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualRadarChartAxis/doedit.do', {id: id}, function (data) {
|
||||
$("#chartDDiv").html(data);
|
||||
openModal('radarChartAxisSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteAxisFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualRadarChartAxis/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#axisTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="radarChartSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">数据配置</a></li>
|
||||
<li class=""><a href="#tab4" data-toggle="tab" index="3"
|
||||
aria-expanded="true">轴配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="baseForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualRadarChart.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="titleText" name="titleText"
|
||||
placeholder="标题文本"
|
||||
value="${dataVisualRadarChart.titleText}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="titlePosition" name="titlePosition"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标题颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="titleColorContainer">
|
||||
<input name="titleColor" id="titleColor" type="text" class="form-control"
|
||||
placeholder="标题颜色"
|
||||
value="${dataVisualRadarChart.titleColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">标题大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="titleFontSize" name="titleFontSize"
|
||||
placeholder="标题大小"
|
||||
value="${dataVisualRadarChart.titleFontSize}">
|
||||
</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="titleFontWeight" name="titleFontWeight"
|
||||
placeholder="标题粗细"
|
||||
value="${dataVisualRadarChart.titleFontWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualRadarChart.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图例</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="legendPosition" name="legendPosition"
|
||||
style="width: 170px;"></select>
|
||||
</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="radius" name="radius"
|
||||
placeholder="图形大小"
|
||||
value="${dataVisualRadarChart.radius}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图形形状</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="shape" name="shape"
|
||||
style="width: 170px;"></select>
|
||||
</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="splitnumber" name="splitnumber"
|
||||
placeholder="区域数量"
|
||||
value="${dataVisualRadarChart.splitnumber}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">区域颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="splitareacolors" name="splitareacolors"
|
||||
placeholder="区域颜色"
|
||||
value="${dataVisualRadarChart.splitareacolors}">
|
||||
</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="axisnameformatter"
|
||||
name="axisnameformatter"
|
||||
placeholder="轴名编辑(默认值为{value})"
|
||||
value="${dataVisualRadarChart.axisnameformatter}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">轴名颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="axisnamecolorContainer">
|
||||
<input name="axisnamecolor" id="axisnamecolor" type="text" class="form-control"
|
||||
placeholder="轴名颜色"
|
||||
value="${dataVisualRadarChart.axisnamecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="axisnamefontSize"
|
||||
name="axisnamefontSize"
|
||||
placeholder="轴名大小"
|
||||
value="${dataVisualRadarChart.axisnamefontSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">轴名粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="axisnamefontWeight"
|
||||
name="axisnamefontWeight"
|
||||
placeholder="轴名粗细"
|
||||
value="${dataVisualRadarChart.axisnamefontWeight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">轴线颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="axislinecolorContainer">
|
||||
<input name="axislinecolor" id="axislinecolor" type="text" class="form-control"
|
||||
placeholder="轴线颜色"
|
||||
value="${dataVisualRadarChart.axislinecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">分割线颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="splitlinecolorContainer">
|
||||
<input name="splitlinecolor" id="splitlinecolor" type="text"
|
||||
class="form-control"
|
||||
placeholder="分割线颜色"
|
||||
value="${dataVisualRadarChart.splitlinecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</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="colors" name="colors" placeholder="颜色组"
|
||||
value="${dataVisualRadarChart.colors}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSeriesFun();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<table id="seriesTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab4"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addAxisFun();"><i
|
||||
class="fa fa-plus"></i> 添加轴
|
||||
</button>
|
||||
</div>
|
||||
<table id="axisTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doRadarChartDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doRadarChartsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
168
src/main/webapp/jsp/process/dataVisualRadarChartSeriesEdit.jsp
Normal file
168
src/main/webapp/jsp/process/dataVisualRadarChartSeriesEdit.jsp
Normal file
@ -0,0 +1,168 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualLineChartSeries"%>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#areastylecolorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnAreastyle').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '不显示',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualRadarChartSeries.areastyle}' == 'false') {
|
||||
$('#switchBtnAreastyle').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualRadarChartSeries.areastyle}' == 'true') {
|
||||
$('#switchBtnAreastyle').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnAreastyle').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
var datavaluemethod = JSON.parse("[{\"id\":\"nowTime\",\"text\":\"nowTime\"},{\"id\":\"sum\",\"text\":\"sum\"},{\"id\":\"diff\",\"text\":\"diff\"},{\"id\":\"avg\",\"text\":\"avg\"},{\"id\":\"max\",\"text\":\"max\"},{\"id\":\"min\",\"text\":\"min\"},{\"id\":\"first\",\"text\":\"first\"},{\"id\":\"last\",\"text\":\"last\"}]");
|
||||
var selectvaluemethod = $("#valuemethod").select2({
|
||||
data: datavaluemethod,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectvaluemethod.val('${dataVisualRadarChartSeries.valuemethod}').trigger("change");//设置选中
|
||||
|
||||
});
|
||||
|
||||
function doLineChartSeriesSave() {
|
||||
let form = $("#radarChartSeriesForm").serialize();
|
||||
|
||||
const switchBtnAreastyle = $('#switchBtnAreastyle').bootstrapSwitch('state');
|
||||
if (switchBtnAreastyle) {
|
||||
form = form + "&areastyle=true";
|
||||
} else {
|
||||
form = form + "&areastyle=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualRadarChartSeries/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('radarChartSeriesSubModal');
|
||||
$("#seriesTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function selectmpids() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointList4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
$('#radarChartSeriesForm #mpid').val(data);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="radarChartSeriesSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="radarChartSeriesForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualRadarChartSeries.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="name" name="name" placeholder="名称"
|
||||
value="${dataVisualRadarChartSeries.name}">
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${dataVisualRadarChartSeries.mpid}" onclick="selectmpids();">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">计算方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="valuemethod" name="valuemethod"
|
||||
style="width: 170px;"></select>
|
||||
</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="fixedvalue" name="fixedvalue" placeholder="固定值"
|
||||
value="${dataVisualRadarChartSeries.fixedvalue}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">面积块</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnAreastyle" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">面积颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="areastylecolorContainer">
|
||||
<input name="areastylecolor" id="areastylecolor" type="text" class="form-control"
|
||||
placeholder="面积颜色"
|
||||
value="${dataVisualRadarChartSeries.areastylecolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="doLineChartSeriesSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
142
src/main/webapp/jsp/process/dataVisualSelectEdit.jsp
Normal file
142
src/main/webapp/jsp/process/dataVisualSelectEdit.jsp
Normal file
@ -0,0 +1,142 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer1').colorpicker({format: null});
|
||||
$('#colorContainer2').colorpicker({format: null});
|
||||
});
|
||||
|
||||
function doSelectSave() {
|
||||
let form = $("#selectForm").serialize();
|
||||
$.post(ext.contextPath + "/process/dataVisualSelect/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('selectJumpDSubModal');
|
||||
$("#selectJumpTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doSelectAllDSave(){
|
||||
let form = $("#selectForm").serialize();
|
||||
$.post(ext.contextPath + "/process/dataVisualSelect/doSelectAllDSave.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('selectJumpDSubModal');
|
||||
$("#selectJumpTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="selectJumpDSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="selectForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualSelect.id}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${dataVisualSelect.pid}"/>
|
||||
<input type="hidden" name="morder" id="morder" value="${dataVisualSelect.morder}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="textcontent" name="textcontent" placeholder="名称"
|
||||
value="${dataVisualSelect.textcontent}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">行高</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="行高"
|
||||
value="${dataVisualSelect.height}">
|
||||
</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualSelect.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="文字颜色"
|
||||
value="${dataVisualSelect.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualSelect.fontweight}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer2">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualSelect.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</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="style" name="style"
|
||||
placeholder="样式"
|
||||
value="${dataVisualSelect.style}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">url地址</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="urlstring" name="urlstring"
|
||||
placeholder="url地址"
|
||||
value="${dataVisualSelect.urlstring}">
|
||||
</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="doSelectAllDSave()">整体保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSelectSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
315
src/main/webapp/jsp/process/dataVisualSuspensionFrameEdit.jsp
Normal file
315
src/main/webapp/jsp/process/dataVisualSuspensionFrameEdit.jsp
Normal file
@ -0,0 +1,315 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_SuspensionFrame", DataVisualContent.Type_SuspensionFrame); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
||||
<%request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<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>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer1').colorpicker({format: null});
|
||||
$('#colorContainer2').colorpicker({format: null});
|
||||
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var dataTextalign = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selectTextalign = $("#textalign").select2({
|
||||
data: dataTextalign,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selectTextalign.val('${dataVisualSuspensionFrame.textalign}').trigger("change");//设置选中
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doSuspensionFrameSave() {
|
||||
$("#subForm3").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm3").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm3").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
$("#subForm4").bootstrapValidator('validate');//提交验证
|
||||
|
||||
let form = $("#subForm4").serialize();
|
||||
|
||||
const unitStStatus = $('#switchBtnUnitSt').bootstrapSwitch('state');
|
||||
if (unitStStatus) {
|
||||
form = form + "&unitst=true";
|
||||
} else {
|
||||
form = form + "&unitst=false";
|
||||
}
|
||||
if ($("#subForm4").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualSuspensionFrame/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('suspensionFrameSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doContentDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualSuspensionFrame.id}',
|
||||
type: '${Type_SuspensionFrame}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('suspensionFrameSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="suspensionFrameSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm3" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="subForm4" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualSuspensionFrame.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文本内容</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="textcontent" name="textcontent" style="width:100%;height:66px;"
|
||||
wrap="soft">${dataVisualSuspensionFrame.textcontent}</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="fontsize" name="fontsize"
|
||||
placeholder="文字大小"
|
||||
value="${dataVisualSuspensionFrame.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer1">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="文字颜色"
|
||||
value="${dataVisualSuspensionFrame.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontweight" name="fontweight"
|
||||
placeholder="文字粗细"
|
||||
value="${dataVisualSuspensionFrame.fontweight}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer2">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualSuspensionFrame.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文字位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="textalign" name="textalign"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">文字高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="textheight" name="textheight"
|
||||
placeholder="文字高度"
|
||||
value="${dataVisualSuspensionFrame.textheight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">id</label>
|
||||
<div class="col-sm-10">
|
||||
${dataVisualSuspensionFrame.id}
|
||||
</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" onclick="doContentDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSuspensionFrameSave()" id="btn_save">保存
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
103
src/main/webapp/jsp/process/dataVisualSvgAlarmEdit.jsp
Normal file
103
src/main/webapp/jsp/process/dataVisualSvgAlarmEdit.jsp
Normal file
@ -0,0 +1,103 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#strokeDContainer').colorpicker({format: null});
|
||||
$('#fillDContainer').colorpicker({format: null});
|
||||
|
||||
$("#jsmethod").select2({minimumResultsForSearch: -1}).val("${dataVisualSvgAlarm.jsmethod}").trigger("change");
|
||||
});
|
||||
|
||||
function doCameraAlarmSave() {
|
||||
let form = $("#mpViewForm").serialize();
|
||||
$.post(ext.contextPath + "/process/dataVisualSvgAlarm/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('svgAlarmSubModal');
|
||||
$("#svgAlarmTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="svgAlarmSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="mpViewForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualSvgAlarm.id}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${dataVisualSvgAlarm.pid}"/>
|
||||
<input type="hidden" name="morder" id="morder" value="${dataVisualSvgAlarm.morder}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">比较方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="jsmethod" name="jsmethod" class="form-control select2">
|
||||
<option value=">" selected>></option>
|
||||
<option value=">=">>=</option>
|
||||
<option value="=">=</option>
|
||||
<option value="<"><</option>
|
||||
<option value="<="><=</option>
|
||||
<option value="!=">!=</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">比较值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="jsvalue" name="jsvalue" placeholder="比较值"
|
||||
value="${dataVisualSvgAlarm.jsvalue}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">边框色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="strokeDContainer">
|
||||
<input name="stroke" id="stroke" type="text" class="form-control"
|
||||
placeholder="边框色"
|
||||
value="${dataVisualSvgAlarm.stroke}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">填充色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="fillDContainer">
|
||||
<input name="fill" id="fill" type="text" class="form-control" placeholder="填充色"
|
||||
value="${dataVisualSvgAlarm.fill}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="doCameraAlarmSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
462
src/main/webapp/jsp/process/dataVisualSvgEdit.jsp
Normal file
462
src/main/webapp/jsp/process/dataVisualSvgEdit.jsp
Normal file
@ -0,0 +1,462 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Svg", DataVisualContent.Type_Svg); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#fillContainer').colorpicker({format: null});
|
||||
$('#strokeContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnDashedlinetype').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualSvg.dashedlinetype}' == 'false') {
|
||||
$('#dashedlineDiv').css('display', 'none');
|
||||
$('#switchBtnDashedlinetype').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualSvg.dashedlinetype}' == 'true') {
|
||||
$('#dashedlineDiv').css('display', 'block');
|
||||
$('#switchBtnDashedlinetype').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#dashedlineDiv').css('display', 'none');
|
||||
$('#switchBtnDashedlinetype').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
$('#switchBtnDashedlinetype').on('switchChange.bootstrapSwitch', function (event, state) {
|
||||
if (state) {
|
||||
$('#dashedlineDiv').css('display', 'block');
|
||||
} else {
|
||||
$('#dashedlineDiv').css('display', 'none');
|
||||
}
|
||||
});
|
||||
|
||||
var typeSelectData = JSON.parse("[{\"id\":\"polyline\",\"text\":\"多段线\"},{\"id\":\"polygon\",\"text\":\"多边形\"}]");
|
||||
var typeSelect = $("#type").select2({
|
||||
data: typeSelectData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
typeSelect.val('${dataVisualSvg.type}').trigger("change");//设置选中
|
||||
|
||||
initDFun();
|
||||
});
|
||||
|
||||
function dosave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#subForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form2 = $("#subForm2").serialize();
|
||||
const dashedlinetypeStatus = $('#switchBtnDashedlinetype').bootstrapSwitch('state');
|
||||
if (dashedlinetypeStatus) {
|
||||
form2 = form2 + "&dashedlinetype=true";
|
||||
} else {
|
||||
form2 = form2 + "&dashedlinetype=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualSvg/doupdate.do", form2, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doSvgdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualSvg.id}',
|
||||
type: '${Type_Svg}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('subModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
<%--showContent('${param.frameId}');--%>
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function initDFun() {
|
||||
$("#svgAlarmTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualSvgAlarm/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualSvg.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'jsmethod', // 返回json数据中的name
|
||||
title: '比较方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'jsvalue', // 返回json数据中的name
|
||||
title: '比较值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editSvgAlarmFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSvgAlarmFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("svgAlarmTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualSvgAlarm/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
//$("#table").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#svgAlarmTable").tableDnD();
|
||||
|
||||
}
|
||||
|
||||
function addSvgAlarm() {
|
||||
$.post(ext.contextPath + "/process/dataVisualSvgAlarm/dosave.do", {pid: '${dataVisualSvg.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#svgAlarmTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function deleteSvgAlarmFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualSvgAlarm/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#svgAlarmTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function editSvgAlarmFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualSvgAlarm/doedit.do', {id: id}, function (data) {
|
||||
$("#contentDDiv").html(data);
|
||||
openModal('svgAlarmSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function addHQSvgAlarm() {
|
||||
$.post(ext.contextPath + "/process/dataVisualSvgAlarm/doHQSvgAlarmSave.do", {pid: '${dataVisualSvg.id}'}, function (data) {
|
||||
if (data.code >= 1) {
|
||||
$("#svgAlarmTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-horizontal" id="subForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualSvg.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="type" name="type"
|
||||
style="width: 170px;"></select>
|
||||
</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="strokeWidth" name="strokeWidth" placeholder="边框"
|
||||
value="${dataVisualSvg.strokeWidth}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">边框色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="strokeContainer">
|
||||
<input name="stroke" id="stroke" type="text" class="form-control" placeholder="边框色"
|
||||
value="${dataVisualSvg.stroke}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">填充色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="fillContainer">
|
||||
<input name="fill" id="fill" type="text" class="form-control" placeholder="填充色"
|
||||
value="${dataVisualSvg.fill}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">是否虚线</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnDashedlinetype" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dashedlineDiv" style="display: none;" class="form-group">
|
||||
<label class="col-sm-2 control-label">实线长度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="dashedline1" name="dashedline1"
|
||||
placeholder="实线长度"
|
||||
value="${dataVisualSvg.dashedline1}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">虚线长度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="dashedline2" name="dashedline2"
|
||||
placeholder="虚线长度"
|
||||
value="${dataVisualSvg.dashedline2}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">mq主题</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="mqTheme" name="mqTheme" placeholder="mq主题名称"
|
||||
value="${dataVisualSvg.mqTheme}">
|
||||
</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="points" name="points" placeholder="点"
|
||||
value="${dataVisualSvg.points}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 100px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSvgAlarm();"><i
|
||||
class="fa fa-plus"></i> 添加数据
|
||||
</button>
|
||||
</div>
|
||||
<%-- <div class="btn-group" style="width: 120px;padding-bottom:10px;">--%>
|
||||
<%-- <button type="button" class="btn btn-default" onclick="addHQSvgAlarm();"><i--%>
|
||||
<%-- class="fa fa-plus"></i> 初始数据_虹桥--%>
|
||||
<%-- </button>--%>
|
||||
<%-- </div>--%>
|
||||
<table id="svgAlarmTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doSvgdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
646
src/main/webapp/jsp/process/dataVisualSwitchEdit.jsp
Normal file
646
src/main/webapp/jsp/process/dataVisualSwitchEdit.jsp
Normal file
@ -0,0 +1,646 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Switch", DataVisualContent.Type_Switch); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
$('#ckColorContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnOpenst').bootstrapSwitch({
|
||||
onText: '显示',
|
||||
offText: '隐藏',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualSwitch.openst}' == 'false') {
|
||||
$('#switchBtnOpenst').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualSwitch.openst}' == 'true') {
|
||||
$('#switchBtnOpenst').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnOpenst').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
var typeSelectData = JSON.parse("[{\"id\":\"point\",\"text\":\"显示/隐藏点\"},{\"id\":\"url\",\"text\":\"弹出链接地址\"}]");
|
||||
var typeSelect = $("#type").select2({
|
||||
data: typeSelectData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
typeSelect.val('${dataVisualSwitch.type}').trigger("change");//设置选中
|
||||
typeSelect.on("change", function (e) {
|
||||
changeType();
|
||||
});
|
||||
changeType();
|
||||
|
||||
var urlTypeSelectData = JSON.parse("[{\"id\":\"0\",\"text\":\"模态框\"},{\"id\":\"1\",\"text\":\"jsp\"}]");
|
||||
var urlTypeSelect = $("#urlType").select2({
|
||||
data: urlTypeSelectData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
urlTypeSelect.val('${dataVisualSwitch.urlType}').trigger("change");//设置选中
|
||||
urlTypeSelect.on("change", function (e) {
|
||||
changeurlType();
|
||||
});
|
||||
|
||||
|
||||
var showStyleSelectData = JSON.parse("[{\"id\":\"switch\",\"text\":\"开关\"},{\"id\":\"check\",\"text\":\"勾选\"}]");
|
||||
var showStyleSelect = $("#showStyle").select2({
|
||||
data: showStyleSelectData,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
showStyleSelect.val('${dataVisualSwitch.showStyle}').trigger("change");//设置选中
|
||||
showStyleSelect.on("change", function (e) {
|
||||
changeShowStyle();
|
||||
});
|
||||
|
||||
changeurlType();
|
||||
changeShowStyle();
|
||||
|
||||
initFun();
|
||||
});
|
||||
|
||||
function changeType() {
|
||||
let typeValue = $('#type').val();
|
||||
if (typeValue == 'point') {
|
||||
$('#urlDiv').css('display', 'none');
|
||||
} else if (typeValue == 'url') {
|
||||
$('#urlDiv').css('display', 'block');
|
||||
}
|
||||
}
|
||||
|
||||
function changeShowStyle() {
|
||||
let typeValue = $('#showStyle').val();
|
||||
if (typeValue == 'switch') {
|
||||
$('#showStyleDiv').css('display', 'none');
|
||||
} else if (typeValue == 'check') {
|
||||
$('#showStyleDiv').css('display', 'block');
|
||||
}
|
||||
}
|
||||
|
||||
function changeurlType() {
|
||||
let urlTypeValue = $('#urlType').val();
|
||||
if (urlTypeValue == '0') {
|
||||
$('#urlType0Div').css('display', 'block');
|
||||
$('#urlType1Div').css('display', 'none');
|
||||
} else if (urlTypeValue == '1') {
|
||||
$('#urlType0Div').css('display', 'none');
|
||||
$('#urlType1Div').css('display', 'block');
|
||||
}
|
||||
}
|
||||
|
||||
function initFun() {
|
||||
$("#switchPointTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualSwitchPoint/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualSwitch.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'contentid', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
let html = "<input style='width: 240px;' id=\"" + row.id + "_SwitchPoint\" value=\"" + row.contentid + "\" onchange=\"changeSwitchPointCid('" + row.id + "');\" />";
|
||||
return html;
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteSwitchPointFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("switchPointTable");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function changeSwitchPointCid(id) {
|
||||
let contentId = $('#' + id + '_SwitchPoint').val();
|
||||
$.post(ext.contextPath + "/process/dataVisualSwitchPoint/doupdateForContentId.do", {
|
||||
id: id,
|
||||
contentId: contentId
|
||||
}, function (data) {
|
||||
if (data.code == 1) {
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doSwitchsave() {
|
||||
let form = $("#contentsubForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
let baseform = $("#baseForm").serialize();
|
||||
const openstStatus = $('#switchBtnOpenst').bootstrapSwitch('state');
|
||||
if (openstStatus) {
|
||||
baseform = baseform + "&openst=true";
|
||||
} else {
|
||||
baseform = baseform + "&openst=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualSwitch/doupdate.do", baseform, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('switchSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doSwitchDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualSwitch.id}',
|
||||
type: '${Type_Switch}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('switchSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addSwitchPoint() {
|
||||
$.post(ext.contextPath + "/process/dataVisualSwitchPoint/dosave.do", {pid: '${dataVisualSwitch.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#switchPointTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
|
||||
function deleteSwitchPointFun(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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualSwitchPoint/dodelete.do', {
|
||||
id: id
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
$("#switchPointTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function doSwitchCopy() {
|
||||
$.post(ext.contextPath + '/process/dataVisualSwitch/doSwitchCopy.do', {
|
||||
contentId: '${dataVisualContent.id}',
|
||||
id: '${dataVisualSwitch.id}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
closeModal('switchSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent(datajson.id, 'tab');
|
||||
} else {
|
||||
showOneContent(datajson.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="switchSubModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<ul class="nav nav-tabs" id="myTab">
|
||||
<li class="active"><a href="#tab1" data-toggle="tab"
|
||||
index="0" aria-expanded="true">区块配置</a></li>
|
||||
<li class=""><a href="#tab2" data-toggle="tab" index="1"
|
||||
aria-expanded="true">基础配置</a></li>
|
||||
<li class=""><a href="#tab3" data-toggle="tab" index="2"
|
||||
aria-expanded="true">点配置</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content no-padding">
|
||||
<div class="chart tab-pane active" id="tab1"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="contentsubForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">min</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">透明度</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="opacityst" name="opacityst"
|
||||
placeholder="透明度"
|
||||
value="${dataVisualContent.opacityst}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class=" tab-pane" id="tab2"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="baseForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualSwitch.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">展现模式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="showStyle" name="showStyle"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">默认状态</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnOpenst" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">点击效果</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="type" name="type"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="showStyleDiv" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualSwitch.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">对勾颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="ckColorContainer">
|
||||
<input name="ckColor" id="ckColor" type="text" class="form-control"
|
||||
placeholder="对勾颜色"
|
||||
value="${dataVisualSwitch.ckColor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="ckSize" name="ckSize"
|
||||
placeholder="对勾大小"
|
||||
value="${dataVisualSwitch.ckSize}">
|
||||
</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="ckStyle" name="ckStyle"
|
||||
placeholder="对勾样式"
|
||||
value="${dataVisualSwitch.ckStyle}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="urlDiv" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">url地址</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="url" name="url"
|
||||
placeholder="url地址"
|
||||
value="${dataVisualSwitch.url}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">弹出方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="urlType" name="urlType"
|
||||
style="width: 170px;"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div id="urlType0Div" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">模态框名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="submodalName"
|
||||
name="submodalName"
|
||||
placeholder="模态框名称"
|
||||
value="${dataVisualSwitch.submodalName}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="urlType1Div" style="display: none;">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">弹出框宽</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="urlWidth" name="urlWidth"
|
||||
placeholder="弹出框宽"
|
||||
value="${dataVisualSwitch.urlWidth}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">弹出框高</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="urlHeight" name="urlHeight"
|
||||
placeholder="弹出框高"
|
||||
value="${dataVisualSwitch.urlHeight}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" tab-pane" id="tab3"
|
||||
style="position: relative; padding:5px;">
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addSwitchPoint();"><i
|
||||
class="fa fa-plus"></i> 新增点
|
||||
</button>
|
||||
</div>
|
||||
<table id="switchPointTable"></table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doSwitchDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSwitchCopy()">拷贝</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doSwitchsave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
42
src/main/webapp/jsp/process/dataVisualSwitchUrlOpen.jsp
Normal file
42
src/main/webapp/jsp/process/dataVisualSwitchUrlOpen.jsp
Normal file
@ -0,0 +1,42 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Svg", DataVisualContent.Type_Svg); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
let switchUrl = ext.contextPath + '${param.switchUrl}';
|
||||
$('#switchUrl_iframe').attr("src", switchUrl);
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="urlOpenSubModal">
|
||||
<div class="modal-dialog" style="width: ${param.urlWidth}px;height: ${param.urlHeight+50+64}px;">
|
||||
<div class="modal-content" style="width: 100%;height: 100%;">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title"></h4>
|
||||
</div>
|
||||
<div class="modal-body" style="width: ${param.urlWidth}px;height: ${param.urlHeight}px;">
|
||||
<iframe id="switchUrl_iframe" scrolling="auto" allowtransparency="yes"
|
||||
style="height:100%;width:100%;border:0px;padding:0px;margin:0px;" src=""></iframe>
|
||||
</div>
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
377
src/main/webapp/jsp/process/dataVisualTabContainer.jsp
Normal file
377
src/main/webapp/jsp/process/dataVisualTabContainer.jsp
Normal file
@ -0,0 +1,377 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Tab", DataVisualContent.Type_Tab); %>
|
||||
<%request.setAttribute("Isfull_True", DataVisualContent.Isfull_True); %>
|
||||
<%request.setAttribute("Isfull_False", DataVisualContent.Isfull_False); %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualTab" %>
|
||||
<%request.setAttribute("TabType_Sheet", DataVisualTab.TabType_Sheet); %>
|
||||
<%request.setAttribute("TabType_Select", DataVisualTab.TabType_Select); %>
|
||||
<%request.setAttribute("TabType_Radio", DataVisualTab.TabType_Radio); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#switchBtnIsFull').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
$("#tabtype").select2({minimumResultsForSearch: -1}).val("${dataVisualContent.tabtype}").trigger("change");
|
||||
|
||||
if ('${dataVisualContent.isfull}' == '${Isfull_False}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfull}' == '${Isfull_True}') {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFull').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
$("#tabTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/dataVisualTab/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
paginationDetailHAlign: ' hidden',//去除分页的显示
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: '${dataVisualContent.id}'
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'morder', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'text', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
}, {
|
||||
field: 'firstck', // 返回json数据中的name
|
||||
title: '默认选项', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == 'true') {
|
||||
return '是'
|
||||
} else {
|
||||
return '否'
|
||||
}
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="编辑" onclick="editTabFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" type="button" title="删除" onclick="deleteTabFun(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("tabTable");
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
},
|
||||
onReorderRow: function (newData) {
|
||||
//这里的newData是整个表格数据,数组形式
|
||||
// console.log("data",newData); //调试用代码
|
||||
$.post(ext.contextPath + '/process/dataVisualTab/dosort.do', {jsondata: JSON.stringify(newData)},//将整张表数据 不能分页
|
||||
function (data) {
|
||||
if (data == 1) {
|
||||
$("#tabTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '数据错误', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
$("#tabTable").tableDnD();
|
||||
});
|
||||
|
||||
function doTabsave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm").serialize();
|
||||
const isFullStatus = $('#switchBtnIsFull').bootstrapSwitch('state');
|
||||
if (isFullStatus) {
|
||||
form = form + "&isfull=${Isfull_True}";
|
||||
} else {
|
||||
form = form + "&isfull=${Isfull_False}";
|
||||
}
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('containerTabSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
// showFrame(frameId);
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doContentTabDel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualContent.id}',
|
||||
type: '${Type_Tab}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('containerTabSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addTabFun() {
|
||||
$.post(ext.contextPath + "/process/dataVisualTab/doTabSave.do", {cntentId: '${dataVisualContent.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#tabTable").bootstrapTable('refresh');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function editTabFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/dataVisualTab/containerEdit.do', {
|
||||
id: id,
|
||||
contentId: '${dataVisualContent.id}',
|
||||
type:'${dataVisualContent.tabtype}'
|
||||
}, function (data) {
|
||||
$("#containerEditDiv").html(data);
|
||||
openModal('tabSubModal');
|
||||
});
|
||||
}
|
||||
|
||||
function deleteTabFun(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualTab/dodelete.do', {id: id}, function (data) {
|
||||
if (data.code == "1") {
|
||||
$("#tabTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="containerTabSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">自适应</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFull" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<%-- <label class="col-sm-2 control-label">刷新时间</label>--%>
|
||||
<%-- <div class="col-sm-3">--%>
|
||||
<%-- <input type="text" class="form-control" id="refreshtime" name="refreshtime"--%>
|
||||
<%-- placeholder="刷新时间"--%>
|
||||
<%-- value="${dataVisualContent.refreshtime}">--%>
|
||||
<%-- </div>--%>
|
||||
<%-- <div class="col-sm-1">--%>
|
||||
<%-- <div style="line-height: 34px;text-align: center;">min</div>--%>
|
||||
<%-- </div>--%>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">标签样式</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="tabtype" name="tabtype" class="form-control select2">
|
||||
<option value="${TabType_Sheet}">标签页</option>
|
||||
<option value="${TabType_Select}">下拉框</option>
|
||||
<option value="${TabType_Radio}">单选球</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="addTabFun();"><i
|
||||
class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<table id="tabTable" data-use-row-attr-func="true" data-reorderable-rows="true"></table>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn" onclick="doContentTabDel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doTabsave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
272
src/main/webapp/jsp/process/dataVisualTabContainerEdit.jsp
Normal file
272
src/main/webapp/jsp/process/dataVisualTabContainerEdit.jsp
Normal file
@ -0,0 +1,272 @@
|
||||
<%@ taglib prefix="c" uri="/jodd" %>
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualTab" %>
|
||||
<%request.setAttribute("TabType_Radio", DataVisualTab.TabType_Radio); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#ckfontcolorContainer').colorpicker({format: null});
|
||||
$('#unckfontcolorContainer').colorpicker({format: null});
|
||||
$('#radioBackgroundContainer').colorpicker({format: null});
|
||||
$('#radioCkBackgroundContainer').colorpicker({format: null});
|
||||
|
||||
$('#switchBtnFirstck').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
if ('${dataVisualTab.firstck}' == 'false') {
|
||||
$('#switchBtnFirstck').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualTab.firstck}' == 'true') {
|
||||
$('#switchBtnFirstck').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnFirstck').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
function doTabDSave() {
|
||||
let form = $("#tabForm").serialize();
|
||||
const firstcklStatus = $('#switchBtnFirstck').bootstrapSwitch('state');
|
||||
if (firstcklStatus) {
|
||||
form = form + "&firstck=true";
|
||||
} else {
|
||||
form = form + "&firstck=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualTab/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('tabSubModal');
|
||||
$("#tabTable").bootstrapTable('refresh');
|
||||
// showOneContent('${param.contentId}');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function doTabAllDSave() {
|
||||
let form = $("#tabForm").serialize();
|
||||
const firstcklStatus = $('#switchBtnFirstck').bootstrapSwitch('state');
|
||||
if (firstcklStatus) {
|
||||
form = form + "&firstck=true";
|
||||
} else {
|
||||
form = form + "&firstck=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualTab/doTabAllUpdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('tabSubModal');
|
||||
$("#tabTable").bootstrapTable('refresh');
|
||||
// showOneContent('${param.contentId}');
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="tabSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="tabForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualTab.id}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${dataVisualTab.pid}"/>
|
||||
<input type="hidden" name="morder" id="morder" value="${dataVisualTab.morder}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="text" name="text" placeholder="名称"
|
||||
value="${dataVisualTab.text}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">默认选项</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnFirstck" type="checkbox"/>
|
||||
</div>
|
||||
</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="width" name="width" placeholder="宽"
|
||||
value="${dataVisualTab.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高"
|
||||
value="${dataVisualTab.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
选中时文字
|
||||
</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="ckfontsize" name="ckfontsize" placeholder="大小"
|
||||
value="${dataVisualTab.ckfontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="ckfontweight" name="ckfontweight"
|
||||
placeholder="粗细"
|
||||
value="${dataVisualTab.ckfontweight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="ckfontcolorContainer">
|
||||
<input name="ckfontcolor" id="ckfontcolor" type="text" class="form-control"
|
||||
placeholder="颜色"
|
||||
value="${dataVisualTab.ckfontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="ckbackground" name="ckbackground"
|
||||
placeholder="背景"
|
||||
value="${dataVisualTab.ckbackground}">
|
||||
</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="ckstyle" name="ckstyle" placeholder="样式"
|
||||
value="${dataVisualTab.ckstyle}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
未选中时文字
|
||||
</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="unckfontsize" name="unckfontsize"
|
||||
placeholder="大小"
|
||||
value="${dataVisualTab.unckfontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unckfontweight" name="unckfontweight"
|
||||
placeholder="粗细"
|
||||
value="${dataVisualTab.unckfontweight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="unckfontcolorContainer">
|
||||
<input name="unckfontcolor" id="unckfontcolor" type="text" class="form-control"
|
||||
placeholder="颜色"
|
||||
value="${dataVisualTab.unckfontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">背景</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unckbackground" name="unckbackground"
|
||||
placeholder="背景"
|
||||
value="${dataVisualTab.unckbackground}">
|
||||
</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="unckstyle" name="unckstyle" placeholder="样式"
|
||||
value="${dataVisualTab.unckstyle}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<c:if test="${param.type==TabType_Radio}">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label"></label>
|
||||
<div class="col-sm-4">
|
||||
单选球
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="radioBackgroundContainer">
|
||||
<input name="radioBackground" id="radioBackground" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualTab.radioBackground}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">球颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="radioCkBackgroundContainer">
|
||||
<input name="radioCkBackground" id="radioCkBackground" type="text"
|
||||
class="form-control" placeholder="球颜色"
|
||||
value="${dataVisualTab.radioCkBackground}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="radioSize" name="radioSize" placeholder="背景大小"
|
||||
value="${dataVisualTab.radioSize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">球大小</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="radioCkSize" name="radioCkSize"
|
||||
placeholder="球大小"
|
||||
value="${dataVisualTab.radioCkSize}">
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
|
||||
</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="doTabAllDSave()">整体保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doTabDSave()">保存</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
183
src/main/webapp/jsp/process/dataVisualTaskPoints4Select.jsp
Normal file
183
src/main/webapp/jsp/process/dataVisualTaskPoints4Select.jsp
Normal file
@ -0,0 +1,183 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
<%@ page import="com.sipai.tools.SessionManager" %>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%@page import="com.sipai.entity.scada.MPoint" %>
|
||||
<%request.setAttribute("Flag_Enable", MPoint.Flag_Enable);%>
|
||||
<%request.setAttribute("Flag_Disable", MPoint.Flag_Disable);%>
|
||||
<script type="text/javascript">
|
||||
var dosearchTaskPoints = function () {
|
||||
$("#table_taskPoints").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doselect(dialog, grid) {
|
||||
var checkedItems = $("#table_taskPoints").bootstrapTable('getAllSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
if (datas != "") {
|
||||
datas += ",";
|
||||
}
|
||||
datas += item.id;
|
||||
});
|
||||
|
||||
$.post(ext.contextPath + '/process/dataVisualTaskPoints/dosave.do', {
|
||||
frameId: '${param.frameId}',
|
||||
datas: datas
|
||||
}, function (data) {
|
||||
closeModal("taskPointsSubModal");
|
||||
showContent('${param.frameId}');
|
||||
});
|
||||
closeModal("taskPointsSubModal")
|
||||
};
|
||||
|
||||
|
||||
var $table;
|
||||
|
||||
function queryParams(params) {
|
||||
var temp = {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
taskTypeSelect: $('#taskTypeSelect').val(),
|
||||
search_name: $('#search_name').val()
|
||||
};
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$table = $("#table_taskPoints").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/timeEfficiency/patrolPoint/getListSafe.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect: true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
// responseHandler:responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '40px'
|
||||
}, {
|
||||
field: 'name', // 返回json数据中的number
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},
|
||||
{
|
||||
field: 'pointCode', // 返回json数据中的owner
|
||||
title: '任务属性', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
switch (value) {
|
||||
case '0':
|
||||
return '区域点';
|
||||
case '1':
|
||||
return '安全用具';
|
||||
case '2':
|
||||
return '消防器具';
|
||||
default:
|
||||
return '';
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_taskPoints");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
// selectionIds = _[func](selectionIds, ids);
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="taskPointsSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择任务点</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div class="form-group pull-right form-inline">
|
||||
<div class="input-group input-group-sm " style="width: 190px;">
|
||||
<label class="form-label" style="float: left;padding-top: 5px;"> 任务属性:</label>
|
||||
<select class="form-control select2" type="text" id="taskTypeSelect"
|
||||
class="form-control pull-right" name="taskTypeSelect" style="width: 120px;float: left;">
|
||||
<option value="">全部</option>
|
||||
<option value="0">区域点</option>
|
||||
<option value="1">安全用具</option>
|
||||
<option value="2">消防器具</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group input-group-sm " style="width: 220px;">
|
||||
<input type="text" id="search_name" name="search_name" class="form-control " placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="dosearchTaskPoints();"><i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="addFun();"><i class="fa fa-plus"></i> 重置</button> -->
|
||||
</div>
|
||||
<div>
|
||||
<table id="table_taskPoints"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doselect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
189
src/main/webapp/jsp/process/dataVisualTaskPointsEdit.jsp
Normal file
189
src/main/webapp/jsp/process/dataVisualTaskPointsEdit.jsp
Normal file
@ -0,0 +1,189 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_TaskPoints", DataVisualContent.Type_TaskPoints); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doTaskPointsSave() {
|
||||
$("#subForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#subForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#subForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
|
||||
$.post(ext.contextPath + "/process/dataVisualTaskPoints/doupdate.do", $("#subForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('taskPointsSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doTaskPointsdel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualTaskPoints.id}',
|
||||
type: '${Type_TaskPoints}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('taskPointsSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="taskPointsSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm1" autocomplete="off">
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form class="form-horizontal" id="subForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualTaskPoints.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">mq主题</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="mqTheme" name="mqTheme" placeholder="mq主题名称"
|
||||
value="${dataVisualTaskPoints.mqTheme}">
|
||||
</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" onclick="doTaskPointsdel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doTaskPointsSave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
1046
src/main/webapp/jsp/process/dataVisualView.jsp
Normal file
1046
src/main/webapp/jsp/process/dataVisualView.jsp
Normal file
File diff suppressed because it is too large
Load Diff
1129
src/main/webapp/jsp/process/dataVisualViewList.jsp
Normal file
1129
src/main/webapp/jsp/process/dataVisualViewList.jsp
Normal file
File diff suppressed because it is too large
Load Diff
288
src/main/webapp/jsp/process/dataVisualWeatherEdit.jsp
Normal file
288
src/main/webapp/jsp/process/dataVisualWeatherEdit.jsp
Normal file
@ -0,0 +1,288 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DataVisualWeather" %>
|
||||
<%request.setAttribute("Type_Weather2", DataVisualWeather.Type_Weather); %>
|
||||
<%request.setAttribute("Type_Temp", DataVisualWeather.Type_Temp); %>
|
||||
<%request.setAttribute("Type_Wind", DataVisualWeather.Type_Wind); %>
|
||||
<%request.setAttribute("Type_WindPower", DataVisualWeather.Type_WindPower); %>
|
||||
<%request.setAttribute("Type_Humidity", DataVisualWeather.Type_Humidity); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DataVisualContent" %>
|
||||
<%request.setAttribute("Type_Weather", DataVisualContent.Type_Weather); %>
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$('#colorContainer').colorpicker({format: null});
|
||||
$('#backgroundContainer').colorpicker({format: null});
|
||||
|
||||
$("#type").select2({minimumResultsForSearch: -1}).val("${dataVisualWeather.type}").trigger("change");
|
||||
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});//选中元素上下居中
|
||||
|
||||
var textAlignPosition = JSON.parse("[{\"id\":\"center\",\"text\":\"居中\"},{\"id\":\"left\",\"text\":\"靠左\"},{\"id\":\"right\",\"text\":\"靠右\"}]");
|
||||
var selecttextAlign = $("#textAlign").select2({
|
||||
data: textAlignPosition,
|
||||
placeholder: '请选择',//默认文字提示
|
||||
allowClear: false,//允许清空
|
||||
escapeMarkup: function (markup) {
|
||||
return markup;
|
||||
}, // 自定义格式化防止xss注入
|
||||
language: "zh-CN",
|
||||
minimumInputLength: 0,
|
||||
minimumResultsForSearch: 10,//数据超过十个启用搜索框
|
||||
formatResult: function formatRepo(repo) {
|
||||
return repo.text;
|
||||
}, // 函数用来渲染结果
|
||||
formatSelection: function formatRepoSelection(repo) {
|
||||
return repo.text;
|
||||
} // 函数用于呈现当前的选择
|
||||
});
|
||||
selecttextAlign.val('${dataVisualWeather.textAlign}').trigger("change");//设置选中
|
||||
|
||||
$('#switchBtnIsFixed').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
});
|
||||
|
||||
if ('${dataVisualContent.isfixed}' == 'false') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
} else if ('${dataVisualContent.isfixed}' == 'true') {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', true, true);
|
||||
} else {
|
||||
$('#switchBtnIsFixed').bootstrapSwitch('state', false, true);
|
||||
}
|
||||
});
|
||||
|
||||
function doDatesave() {
|
||||
$("#datesubForm1").bootstrapValidator('validate');//提交验证
|
||||
if ($("#datesubForm1").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
let form = $("#datesubForm1").serialize();
|
||||
const isFixedStatus = $('#switchBtnIsFixed').bootstrapSwitch('state');
|
||||
if (isFixedStatus) {
|
||||
form = form + "&isfixed=true";
|
||||
} else {
|
||||
form = form + "&isfixed=false";
|
||||
}
|
||||
$.post(ext.contextPath + "/process/dataVisualContent/doupdate.do", form, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#datesubForm2").bootstrapValidator('validate');//提交验证
|
||||
if ($("#datesubForm2").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/dataVisualWeather/doupdate.do", $("#datesubForm2").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('dateSubModal');
|
||||
if ('${dataVisualContent.istab}' == 'true') {
|
||||
showOneContent('${dataVisualContent.id}', 'tab');
|
||||
} else {
|
||||
showOneContent('${dataVisualContent.id}');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
function doDatedel() {
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/dataVisualContent/dodelete.do', {
|
||||
id: '${dataVisualContent.id}',
|
||||
did: '${dataVisualWeather.id}',
|
||||
type: '${Type_Weather}'
|
||||
}, function (data) {
|
||||
var datajson = JSON.parse(data);
|
||||
if (datajson.code == 1) {
|
||||
closeModal('dateSubModal');
|
||||
$('#${dataVisualContent.id}').remove();
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="dateSubModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">编辑</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="datesubForm1" autocomplete="off">
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualContent.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="postx" name="postx" placeholder="左侧距离"
|
||||
value="${dataVisualContent.postx}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">上侧距离</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="posty" name="posty" placeholder="上侧距离"
|
||||
value="${dataVisualContent.posty}">
|
||||
</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="width" name="width" placeholder="宽度"
|
||||
value="${dataVisualContent.width}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">高度</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
||||
value="${dataVisualContent.height}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">固定组件</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtnIsFixed" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">刷新时间</label>
|
||||
<div class="col-sm-3">
|
||||
<input type="text" class="form-control" id="refreshtime" name="refreshtime"
|
||||
placeholder="刷新时间"
|
||||
value="${dataVisualContent.refreshtime}">
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<div style="line-height: 34px;text-align: center;">sec</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">图层</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="zIndex" name="zIndex" placeholder="图层"
|
||||
value="${dataVisualContent.zIndex}">
|
||||
</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="style" name="style" placeholder="样式"
|
||||
value="${dataVisualContent.style}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" id="datesubForm2" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${dataVisualWeather.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">天气类型</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control select2" id="type" name="type"
|
||||
style="width: 170px;">
|
||||
<option value="${Type_Weather2}">天气情况</option>
|
||||
<option value="${Type_Temp}">当前温度</option>
|
||||
<option value="${Type_Wind}">风向</option>
|
||||
<option value="${Type_WindPower}">风力</option>
|
||||
<option value="${Type_Humidity}">湿度</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">背景色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="backgroundContainer">
|
||||
<input name="background" id="background" type="text" class="form-control"
|
||||
placeholder="背景色"
|
||||
value="${dataVisualWeather.background}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体颜色</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group" id="colorContainer">
|
||||
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||||
placeholder="字体颜色"
|
||||
value="${dataVisualWeather.fontcolor}">
|
||||
<div class="input-group-addon">
|
||||
<i></i>
|
||||
</div>
|
||||
</div>
|
||||
</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="fontsize" name="fontsize" placeholder="字体大小"
|
||||
value="${dataVisualWeather.fontsize}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">字体粗细</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="fontweight" name="fontweight" placeholder="字体粗细"
|
||||
value="${dataVisualWeather.fontweight}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">文字位置</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="textAlign" name="textAlign"
|
||||
style="width: 170px;"></select>
|
||||
</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" onclick="doDatedel();">删除</button>
|
||||
<button type="button" class="btn btn-primary" onclick="doDatesave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
113
src/main/webapp/jsp/process/decisionExpertBaseAdd.jsp
Normal file
113
src/main/webapp/jsp/process/decisionExpertBaseAdd.jsp
Normal file
@ -0,0 +1,113 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DecisionExpertBase" %>
|
||||
<%request.setAttribute("Type_structure", DecisionExpertBase.Type_structure); %>
|
||||
<%request.setAttribute("Type_content", DecisionExpertBase.Type_content); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$('#type').select2({minimumResultsForSearch: 10}).val('${decisionExpertBase.type}').trigger('change');
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/decisionExpertBase/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#subForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</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="dosave()" 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="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="unitid" id="unitid" value="${param.unitId}"/>
|
||||
<input type="hidden" name="pid" id="pid" value="${param.pid}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="名称"
|
||||
value="${decisionExpertBase.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2">
|
||||
<option value="${Type_structure}">结构</option>
|
||||
<option value="${Type_content}">内容</option>
|
||||
</select>
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${decisionExpertBase.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
|
||||
value="${decisionExpertBase.morder}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">主要作用</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" style="height: 80px;" class="form-control" id="mainrole"
|
||||
name="mainrole" placeholder="主要作用">${decisionExpertBase.mainrole}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
389
src/main/webapp/jsp/process/decisionExpertBaseEdit.jsp
Normal file
389
src/main/webapp/jsp/process/decisionExpertBaseEdit.jsp
Normal file
@ -0,0 +1,389 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.entity.process.DecisionExpertBase" %>
|
||||
<%request.setAttribute("Type_structure", DecisionExpertBase.Type_structure); %>
|
||||
<%request.setAttribute("Type_content", DecisionExpertBase.Type_content); %>
|
||||
|
||||
<%@page import="com.sipai.entity.process.DecisionExpertBaseText" %>
|
||||
<%request.setAttribute("Type_alarmmax", DecisionExpertBaseText.Type_alarmmax); %>
|
||||
<%request.setAttribute("Type_alarmmin", DecisionExpertBaseText.Type_alarmmin); %>
|
||||
<%request.setAttribute("Type_halarmmax", DecisionExpertBaseText.Type_halarmmax); %>
|
||||
<%request.setAttribute("Type_lalarmmin", DecisionExpertBaseText.Type_lalarmmin); %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
if ('${decisionExpertBase.id}' != '') {
|
||||
$('#entity').css('display', 'block');
|
||||
}
|
||||
$('#type').select2({minimumResultsForSearch: 10}).val('${decisionExpertBase.type}').trigger('change');
|
||||
if ('${decisionExpertBase.type}' == '${Type_content}') {
|
||||
$('#tab').css('display', 'block');
|
||||
$("#table_Text").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/decisionExpertBaseText/getJson.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [15], // 设置页面可以显示的数据条数
|
||||
pageSize: 15, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
pid: '${decisionExpertBase.id}',
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '${Type_alarmmax}') {
|
||||
return '上限';
|
||||
} else if (value == '${Type_alarmmin}') {
|
||||
return '下限';
|
||||
} else if (value == '${Type_halarmmax}') {
|
||||
return '上极限';
|
||||
} else if (value == '${Type_lalarmmin}') {
|
||||
return '下极限';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'value', // 返回json数据中的name
|
||||
title: '限值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'text', // 返回json数据中的name
|
||||
title: '决策建议', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = "";
|
||||
|
||||
buts += '<button class="btn btn-default btn-sm" title="编辑" onclick="editTextFun(\'' + '${decisionExpertBase.id}' + '\',\'' + row.type + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
// buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts = '<div class="btn-group" >' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_Text");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
// onClickRow: function (row) {
|
||||
// showMPCurveView(row.id, row.bizid);
|
||||
// }
|
||||
});
|
||||
} else {
|
||||
$('#tab2').css('display', 'block');
|
||||
$("#table_AllText").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/decisionExpertBaseText/getJsonTextAll.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [15], // 设置页面可以显示的数据条数
|
||||
pageSize: 15, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: "client", //分页方式:client客户端分页,server服务端分页(*)
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
pid: '${decisionExpertBase.id}',
|
||||
search_code: $('#search_code').val(),
|
||||
search_name: $('#search_name').val(),
|
||||
}
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'name', // 返回json数据中的name
|
||||
title: '名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
field: 'mpointcode', // 返回json数据中的name
|
||||
title: '测量点', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '15%'
|
||||
},
|
||||
{
|
||||
field: 'mainrole', // 返回json数据中的name
|
||||
title: '主要作用', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
},
|
||||
{
|
||||
field: 'type', // 返回json数据中的name
|
||||
title: '类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
if (value == '${Type_alarmmax}') {
|
||||
return '上限';
|
||||
} else if (value == '${Type_alarmmin}') {
|
||||
return '下限';
|
||||
} else if (value == '${Type_halarmmax}') {
|
||||
return '上极限';
|
||||
} else if (value == '${Type_lalarmmin}') {
|
||||
return '下极限';
|
||||
}
|
||||
}
|
||||
}, {
|
||||
field: 'value', // 返回json数据中的name
|
||||
title: '限值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%'
|
||||
}, {
|
||||
field: 'text', // 返回json数据中的name
|
||||
title: '决策建议', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '25%'
|
||||
},
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_Text");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
// onClickRow: function (row) {
|
||||
// showMPCurveView(row.id, row.bizid);
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
function editTextFun(pid, type) {
|
||||
stopBubbleDefaultEvent();
|
||||
$.post(ext.contextPath + '/process/decisionExpertBaseText/doedit.do', {
|
||||
pid: pid,
|
||||
type: type
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
}
|
||||
|
||||
function doNamesearch() {
|
||||
$("#table_AllText").bootstrapTable('refresh');
|
||||
}
|
||||
function doCodesearch() {
|
||||
$("#table_AllText").bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
function doMainsave() {
|
||||
$("#subMainForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subMainForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/decisionExpertBase/doupdate.do", $("#subMainForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subMainForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '名称不能为空'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var dodel = function (id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/decisionExpertBase/dodelete.do', {id: '${decisionExpertBase.id}'}, function (data) {
|
||||
if (data.code == 1) {
|
||||
initTreeView();
|
||||
} else {
|
||||
showAlert('d', data.msg, 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
function selectmpid() {
|
||||
$.post(ext.contextPath + '/work/mpoint/mpointListSingle4LayerES.do', {
|
||||
// mpids: mpids,
|
||||
mpids: '',
|
||||
fucname: 'ckmpidDone'
|
||||
}, function (data) {
|
||||
$("#mpSelectDiv").html(data);
|
||||
openModal('subModalMpoint');
|
||||
});
|
||||
}
|
||||
|
||||
function ckmpidDone(data) {
|
||||
data = JSON.parse(data);
|
||||
$('#subMainForm #mpid').val(data[0].mpid);
|
||||
closeModal('subModalMpoint');
|
||||
}
|
||||
|
||||
</script>
|
||||
<div class="box box-primary">
|
||||
|
||||
<div div id="entity" class="box box-primary" style="display: none">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">修改</h3>
|
||||
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="doMainsave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
||||
class="glyphicon glyphicon-floppy-disk"></i></a>
|
||||
<a onclick="dodel()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i
|
||||
class="glyphicon glyphicon-trash"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<form class="form-horizontal" id="subMainForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${param.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="name" name="name" placeholder="名称"
|
||||
value="${decisionExpertBase.name}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select id="type" name="type" class="form-control select2">
|
||||
<option value="${Type_structure}">结构</option>
|
||||
<option value="${Type_content}">内容</option>
|
||||
</select>
|
||||
</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="mpid" name="mpid" placeholder="测量点"
|
||||
value="${decisionExpertBase.mpid}" onclick="selectmpid();">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">顺序</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
|
||||
value="${decisionExpertBase.morder}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">主要作用</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea type="text" style="height: 80px;" class="form-control" id="mainrole"
|
||||
name="mainrole" placeholder="主要作用">${decisionExpertBase.mainrole}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tab" class="box box-primary" style="display: none">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">决策内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<%-- <a onclick="doTextAdd()" class="btn btn-box-tool" data-toggle="tooltip" title="删除"><i class="glyphicon glyphicon-minus"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_Text"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tab2" class="box box-primary" style="display: none">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">决策内容</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
||||
<div class="form-group" style="padding:0;">
|
||||
<div class="form-group pull-right form-inline" >
|
||||
<div class="input-group input-group-sm" style="width: 250px;">
|
||||
<input type="text" id="search_code" name="search_code" class="form-control pull-right" placeholder="名称">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="doCodesearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<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="决策内容">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" onclick="doNamesearch();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
<!-- <div class="table-responsive">
|
||||
<table id="table"></table>
|
||||
</div> -->
|
||||
<table id="table"></table>
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_2">
|
||||
</div>
|
||||
<!-- /.tab-pane -->
|
||||
</div>
|
||||
<table id="table_AllText"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
85
src/main/webapp/jsp/process/decisionExpertBaseTextEdit.jsp
Normal file
85
src/main/webapp/jsp/process/decisionExpertBaseTextEdit.jsp
Normal file
@ -0,0 +1,85 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
})
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
let id = $('#id').val();
|
||||
if (id != '') {
|
||||
$.post(ext.contextPath + "/process/decisionExpertBaseText/doupdate.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table_Text").bootstrapTable('refresh');
|
||||
// initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
} else {
|
||||
$.post(ext.contextPath + "/process/decisionExpertBaseText/dosave.do", $("#subForm").serialize()+"&pid=${param.pid}&type=${param.type}", function (data) {
|
||||
if (data.code == 1) {
|
||||
closeModal('subModal');
|
||||
$("#table_Text").bootstrapTable('refresh');
|
||||
// initTreeView();
|
||||
} else if (data.code == 0) {
|
||||
showAlert('d', data.msg);
|
||||
} else {
|
||||
showAlert('d', data.code);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">修改</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${decisionExpertBaseText.id}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">解决方案</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea id="text" name="text" class="form-control" type="text"
|
||||
style="width: 100%;height: 100%;">${decisionExpertBaseText.text}</textarea>
|
||||
<%-- <input type="text" class="form-control" id="text" name="text" placeholder="名称"--%>
|
||||
<%-- value="${decisionExpertBaseText.text}">--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
130
src/main/webapp/jsp/process/decisionExpertBaseTreeList.jsp
Normal file
130
src/main/webapp/jsp/process/decisionExpertBaseTreeList.jsp
Normal file
@ -0,0 +1,130 @@
|
||||
<%@ 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-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var addFun = function () {
|
||||
var node = $('#tree').treeview('getSelected');
|
||||
var pid = "";
|
||||
if (node != null && node.length > 0) {
|
||||
pid = node[0].id;
|
||||
} else {
|
||||
pid = "-1";
|
||||
}
|
||||
if (pid == '' || pid == 'tree') {
|
||||
pid = "-1";
|
||||
}
|
||||
$.post(ext.contextPath + '/process/decisionExpertBase/doadd.do', {
|
||||
unitId: unitId,
|
||||
pid: pid
|
||||
}, function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
var editFun = function (id) {
|
||||
console.log(id)
|
||||
if (id == null) {
|
||||
$('#tree').treeview('unselectNode', $('#tree').treeview('getSelected'));
|
||||
}
|
||||
$.post(ext.contextPath + '/process/decisionExpertBase/doedit.do', {
|
||||
id: id
|
||||
}, function (data) {
|
||||
$("#menuBox").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/process/decisionExpertBase/getMenusJson.do', {
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
// console.info(data)
|
||||
$('#tree').treeview({
|
||||
data: data
|
||||
})
|
||||
$('#tree').on('nodeSelected', function (event, data) {
|
||||
editFun(data.id);
|
||||
});
|
||||
|
||||
}, 'json');
|
||||
$("#menuBox").html("");
|
||||
editFun()
|
||||
};
|
||||
$(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="mpSelectDiv"></div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"></h3>
|
||||
<h3 class="box-title" onclick="editFun()" style="cursor:pointer">专家决策分类</h3>
|
||||
<div class="box-tools">
|
||||
<button type="button" class="btn btn-box-tool" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:550px;overflow:auto;"></div>
|
||||
</div>
|
||||
<!-- /.box-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-10" id="menuBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
<!-- /.content -->
|
||||
</div>
|
||||
<%-- <jsp:include page="/jsp/bottom.jsp"></jsp:include> --%>
|
||||
<%-- <jsp:include page="/jsp/side.jsp"></jsp:include> --%>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
106
src/main/webapp/jsp/process/equipmentAdjustmentAdd.jsp
Normal file
106
src/main/webapp/jsp/process/equipmentAdjustmentAdd.jsp
Normal file
@ -0,0 +1,106 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustment/dosave.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
<%--$('#applyTime').datepicker('setDate', '${nowDate.substring(0, 10)}');--%>
|
||||
});
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${equipmentAdjustment.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${param.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="applyUser" name="applyUser" value="${userId}"/>
|
||||
<input type="text" class="form-control" id="applyName" name="applyName"
|
||||
value="${userName}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*申请时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="applyTime" name="applyTime"
|
||||
style="width: 132px;" value="${nowDate.substring(0, 10)}" readonly>
|
||||
</div>
|
||||
</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="unitName" name="unitName" value="${companyName}"
|
||||
readonly>
|
||||
</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 ="applyContent" name ="applyContent" placeholder="申请内容">${equipmentAdjustment.applyContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
129
src/main/webapp/jsp/process/equipmentAdjustmentDetailAdd.jsp
Normal file
129
src/main/webapp/jsp/process/equipmentAdjustmentDetailAdd.jsp
Normal file
@ -0,0 +1,129 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function dosave4equipmentAdjustmentDetail() {
|
||||
$('#subForm4equipmentAdjustmentDetail').data('bootstrapValidator')
|
||||
.updateStatus('equipname', 'NOT_VALIDATED',null)
|
||||
.validateField('equipname');
|
||||
$("#subForm4equipmentAdjustmentDetail").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm4equipmentAdjustmentDetail").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustmentDetail/dosave.do", $("#subForm4equipmentAdjustmentDetail").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
// showAlert('s','保存成功');
|
||||
closeModal('subModal4equipmentAdjustmentDetail')
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
});
|
||||
|
||||
$("#subForm4equipmentAdjustmentDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
equipname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
adjustMode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '调节方式不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
adjustValue: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设定值不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//选择保养的设备,根据厂区id选择厂内设备
|
||||
var selectEquipmentCard = function() {
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForSelect.do', {companyId:unitId, equipmentId:$("#equipid").val()} ,
|
||||
function(data) {
|
||||
$("#emSubDiv").html(data);
|
||||
openModal('emSubModal');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal4equipmentAdjustmentDetail">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">新增设备调整详情</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm4equipmentAdjustmentDetail">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${equipmentAdjustmentDetail.id}">
|
||||
<input type="hidden" class="form-control" id="pid" name ="pid" value ="${param.pid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*设备名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="equipid" name="equipmentId" type="hidden" value="" />
|
||||
<input class="form-control" id="equipname" name ="equipname" autocomplete="off"
|
||||
onclick="selectEquipmentCard()" placeholder="请点击选择" cursor= "pointer" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*设备编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="equipmentNumber" name ="equipmentNumber" placeholder="设备编号" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺段</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="processSectionId" name="processSectionId" type="hidden" value="" />
|
||||
<input type="text" class="form-control" id="processectionname" placeholder="工艺段" disabled="disabled" >
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*调节方式</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="adjustMode" name ="adjustMode" value="${equipmentAdjustmentDetail.adjustMode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*设定值</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="adjustValue" name ="adjustValue" value="${equipmentAdjustmentDetail.adjustValue}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave4equipmentAdjustmentDetail()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
129
src/main/webapp/jsp/process/equipmentAdjustmentDetailEdit.jsp
Normal file
129
src/main/webapp/jsp/process/equipmentAdjustmentDetailEdit.jsp
Normal file
@ -0,0 +1,129 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function dosave4equipmentAdjustmentDetail() {
|
||||
$('#subForm4equipmentAdjustmentDetail').data('bootstrapValidator')
|
||||
.updateStatus('equipname', 'NOT_VALIDATED',null)
|
||||
.validateField('equipname');
|
||||
$("#subForm4equipmentAdjustmentDetail").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm4equipmentAdjustmentDetail").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustmentDetail/doupdate.do", $("#subForm4equipmentAdjustmentDetail").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
// showAlert('s','保存成功');
|
||||
closeModal('subModal4equipmentAdjustmentDetail')
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
});
|
||||
|
||||
$("#subForm4equipmentAdjustmentDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
equipname: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设备名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
adjustMode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '调节方式不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
adjustValue: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '设定值不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
//选择保养的设备,根据厂区id选择厂内设备
|
||||
var selectEquipmentCard = function() {
|
||||
$.post(ext.contextPath + '/equipment/showEquipmentCardForSelect.do', {companyId:unitId, equipmentId:$("#equipid").val()} ,
|
||||
function(data) {
|
||||
$("#emSubDiv").html(data);
|
||||
openModal('emSubModal');
|
||||
});
|
||||
};
|
||||
</script>
|
||||
<div class="modal fade" id="subModal4equipmentAdjustmentDetail">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">编辑设备调整详情</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm4equipmentAdjustmentDetail">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${equipmentAdjustmentDetail.id}">
|
||||
<input type="hidden" class="form-control" id="pid" name ="pid" value ="${equipmentAdjustmentDetail.pid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*设备名称</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="equipid" name="equipmentId" type="hidden" value="${equipmentAdjustmentDetail.equipmentId}" />
|
||||
<input class="form-control" id="equipname" name ="equipname" autocomplete="off"
|
||||
onclick="selectEquipmentCard()" placeholder="请点击选择" cursor= "pointer" readonly value="${equipmentAdjustmentDetail.equipmentCard.equipmentname}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*设备编号</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control" id="equipmentNumber" name ="equipmentNumber" placeholder="设备编号" readonly value="${equipmentAdjustmentDetail.equipmentCard.equipmentcardid}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺段</label>
|
||||
<div class="col-sm-6">
|
||||
<input id="processSectionId" name="processSectionId" type="hidden" value="" />
|
||||
<input type="text" class="form-control" id="processectionname" placeholder="工艺段" disabled="disabled" value="${equipmentAdjustmentDetail.equipmentId}">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*调节方式</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="adjustMode" name ="adjustMode" value="${equipmentAdjustmentDetail.adjustMode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*设定值</label>
|
||||
<div class="col-sm-4">
|
||||
<input class="form-control" type="text" id="adjustValue" name ="adjustValue" value="${equipmentAdjustmentDetail.adjustValue}">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave4equipmentAdjustmentDetail()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
303
src/main/webapp/jsp/process/equipmentAdjustmentEdit.jsp
Normal file
303
src/main/webapp/jsp/process/equipmentAdjustmentEdit.jsp
Normal file
@ -0,0 +1,303 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//保存
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustment/doupdate.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
//提交
|
||||
function dosubmit() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustment/dosubmit.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#table_outStockDetail").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/equipmentAdjustmentDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
pid: $('#id').val(),
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'adjustMode', // 返回json数据中的name
|
||||
title: '调节方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'adjustValue', // 返回json数据中的name
|
||||
title: '设定值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editDetailFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"></span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteDetailFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg"></span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var addDetailFun = function() {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/doadd.do', {pid:$('#id').val()} , function(data) {
|
||||
$("#subDiv4equipmentAdjustmentDetail").html(data);
|
||||
openModal('subModal4equipmentAdjustmentDetail');
|
||||
});
|
||||
};
|
||||
var editDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv4equipmentAdjustmentDetail").html(data);
|
||||
openModal('subModal4equipmentAdjustmentDetail');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteDetailFun = 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(function(willDelete){
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesDetailFun = function() {
|
||||
var checkedItems = $("#table_outStockDetail").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(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">修改</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${equipmentAdjustment.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${equipmentAdjustment.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*申请人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="applyUser" name="applyUser" value="${equipmentAdjustment.applyUser}"/>
|
||||
<input type="text" class="form-control" id="applyName" name="applyName"
|
||||
value="${equipmentAdjustment.user.caption}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*申请时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="applyTime" name="applyTime"
|
||||
style="width: 132px;" value="${equipmentAdjustment.applyTime.substring(0, 10)}" readonly>
|
||||
</div>
|
||||
</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="unitName" name="unitName" value="${equipmentAdjustment.company.sname}"
|
||||
readonly>
|
||||
</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 ="applyContent" name ="applyContent" placeholder="申请内容">${equipmentAdjustment.applyContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">调整详情</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<a onclick="addDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosubmit()" >提交</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
291
src/main/webapp/jsp/process/equipmentAdjustmentFeedback.jsp
Normal file
291
src/main/webapp/jsp/process/equipmentAdjustmentFeedback.jsp
Normal file
@ -0,0 +1,291 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//保存
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustment/dofeedback.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#table_outStockDetail").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/equipmentAdjustmentDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
pid: $('#id').val(),
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'adjustMode', // 返回json数据中的name
|
||||
title: '调节方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'adjustValue', // 返回json数据中的name
|
||||
title: '设定值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}
|
||||
/*,{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editDetailFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"></span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteDetailFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg"></span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}*/
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var addDetailFun = function() {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/doadd.do', {pid:$('#id').val()} , function(data) {
|
||||
$("#subDiv4equipmentAdjustmentDetail").html(data);
|
||||
openModal('subModal4equipmentAdjustmentDetail');
|
||||
});
|
||||
};
|
||||
var editDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv4equipmentAdjustmentDetail").html(data);
|
||||
openModal('subModal4equipmentAdjustmentDetail');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteDetailFun = 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(function(willDelete){
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesDetailFun = function() {
|
||||
var checkedItems = $("#table_outStockDetail").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(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">反馈</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${equipmentAdjustment.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${equipmentAdjustment.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">申请人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="applyUser" name="applyUser" value="${equipmentAdjustment.applyUser}"/>
|
||||
<input type="text" class="form-control" id="applyName" name="applyName"
|
||||
value="${equipmentAdjustment.user.caption}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">申请时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="applyTime" name="applyTime"
|
||||
style="width: 132px;" value="${equipmentAdjustment.applyTime.substring(0, 10)}" readonly>
|
||||
</div>
|
||||
</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="unitName" name="unitName" value="${equipmentAdjustment.company.sname}"
|
||||
readonly>
|
||||
</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 ="applyContent" name ="applyContent" placeholder="申请内容" readonly>${equipmentAdjustment.applyContent}</textarea>
|
||||
</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 ="feedbackContent" name ="feedbackContent" placeholder="反馈内容">${equipmentAdjustment.feedbackContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">调整详情</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<%--<a onclick="addDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">反馈</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
256
src/main/webapp/jsp/process/equipmentAdjustmentList.jsp
Normal file
256
src/main/webapp/jsp/process/equipmentAdjustmentList.jsp
Normal file
@ -0,0 +1,256 @@
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 addFun = function() {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doadd.do', {unitId:unitId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
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(function(willDelete){
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
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(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
$(function() {
|
||||
initFun();
|
||||
});
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/equipmentAdjustment/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId,
|
||||
type:'0'
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},{
|
||||
field: 'applyTime', // 返回json数据中的name
|
||||
title: '申请时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '申请人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'applyContent', // 返回json数据中的name
|
||||
title: '申请内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return '未提交';
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
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+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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="subDiv"></div>
|
||||
<div id="subDiv4equipmentAdjustmentDetail"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="addFun();"><i
|
||||
class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default btn-sm" onclick="deletesFun();"><i
|
||||
class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
</html>
|
||||
255
src/main/webapp/jsp/process/equipmentAdjustmentListFeedback.jsp
Normal file
255
src/main/webapp/jsp/process/equipmentAdjustmentListFeedback.jsp
Normal file
@ -0,0 +1,255 @@
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 companyId = unitId;
|
||||
|
||||
$(function () {
|
||||
if('${param.unitId}'!=null && '${param.unitId}'!=''){
|
||||
//上位机请求
|
||||
companyId = '${param.unitId}';
|
||||
}else{
|
||||
//平台正常请求
|
||||
companyId = unitId;
|
||||
}
|
||||
initFun();
|
||||
});
|
||||
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doadd.do', {unitId:companyId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var editFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/feedback.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
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(function(willDelete){
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
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(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/equipmentAdjustment/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: companyId,
|
||||
type:'1'
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'applyTime', // 返回json数据中的name
|
||||
title: '申请时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '申请人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'applyContent', // 返回json数据中的name
|
||||
title: '申请内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return '待反馈';
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
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+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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="subDiv"></div>
|
||||
<div id="subDiv4equipmentAdjustmentDetail"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
</html>
|
||||
249
src/main/webapp/jsp/process/equipmentAdjustmentListView.jsp
Normal file
249
src/main/webapp/jsp/process/equipmentAdjustmentListView.jsp
Normal file
@ -0,0 +1,249 @@
|
||||
<%@ 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"%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%></title>
|
||||
|
||||
<!-- 引用页头及CSS页-->
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
.table-hover>tbody>tr:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
<!-- 文件上传-->
|
||||
<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 companyId = unitId;
|
||||
|
||||
$(function () {
|
||||
if('${param.unitId}'!=null && '${param.unitId}'!=''){
|
||||
//上位机请求
|
||||
companyId = '${param.unitId}';
|
||||
}else{
|
||||
//平台正常请求
|
||||
companyId = unitId;
|
||||
}
|
||||
initFun();
|
||||
});
|
||||
|
||||
var addFun = function() {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doadd.do', {unitId:companyId} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
var viewFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/doview.do', {id:id} , function(data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
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(function(willDelete){
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
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(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustment/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dosearch = function() {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
var initFun = function(){
|
||||
$("#table").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/equipmentAdjustment/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: companyId,
|
||||
type:'2'
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'applyTime', // 返回json数据中的name
|
||||
title: '申请时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'company.name', // 返回json数据中的name
|
||||
title: '所属', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'user.caption', // 返回json数据中的name
|
||||
title: '申请人', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'applyContent', // 返回json数据中的name
|
||||
title: '申请内容', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '状态', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return '已完成';
|
||||
}
|
||||
},{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="viewFun(\'' + row.id + '\')"><i class="fa fa-eye"></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
// buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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="subDiv"></div>
|
||||
<div id="subDiv4equipmentAdjustmentDetail"></div>
|
||||
<div id="emSubDiv"></div>
|
||||
<div id="fileInputDiv"></div>
|
||||
|
||||
<table id="table"></table>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js" charset="utf-8"></script>
|
||||
</html>
|
||||
309
src/main/webapp/jsp/process/equipmentAdjustmentView.jsp
Normal file
309
src/main/webapp/jsp/process/equipmentAdjustmentView.jsp
Normal file
@ -0,0 +1,309 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
//保存
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/equipmentAdjustment/dofeedback.do", $("#subForm").serialize(), function(data) {
|
||||
if (data.code == 1){
|
||||
showAlert('s','保存成功');
|
||||
closeModal('subModal')
|
||||
$("#table").bootstrapTable('refresh');
|
||||
}else if(data.code == 0){
|
||||
showAlert('d','保存失败');
|
||||
}else{
|
||||
showAlert('d',data.res);
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#table_outStockDetail").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/equipmentAdjustmentDetail/getlist.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20,50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset/params.limit+1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
search_name: $('#search_name').val(),
|
||||
pid: $('#id').val(),
|
||||
// pSectionId: $("#processSection").val(),
|
||||
// statusSelect:$("#statusSelect").val(),
|
||||
}
|
||||
},
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
// viewFun(row.id);
|
||||
// },
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
field: 'equipmentCard.equipmentname', // 返回json数据中的name
|
||||
title: '设备名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle'
|
||||
},{
|
||||
field: 'adjustMode', // 返回json数据中的name
|
||||
title: '调节方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
},{
|
||||
field: 'adjustValue', // 返回json数据中的name
|
||||
title: '设定值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle' // 上下居中
|
||||
}
|
||||
/*,{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: 120, // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts="";
|
||||
|
||||
buts+= '<button class="btn btn-default btn-sm" title="编辑" onclick="editDetailFun(\'' + row.id + '\')"><i class="fa fa-edit"></i><span class="hidden-md hidden-lg"></span></button>';
|
||||
buts+='<button class="btn btn-default btn-sm" title="删除" onclick="deleteDetailFun(\''+row.id+'\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg"></span></button';
|
||||
|
||||
buts='<div class="btn-group" >'+buts+'</div>';
|
||||
return buts;
|
||||
}
|
||||
}*/
|
||||
],
|
||||
onLoadSuccess: function(){ //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
|
||||
},
|
||||
onLoadError: function(){ //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var addDetailFun = function() {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/doadd.do', {pid:$('#id').val()} , function(data) {
|
||||
$("#subDiv4equipmentAdjustmentDetail").html(data);
|
||||
openModal('subModal4equipmentAdjustmentDetail');
|
||||
});
|
||||
};
|
||||
var editDetailFun = function(id) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/doedit.do', {id:id} , function(data) {
|
||||
$("#subDiv4equipmentAdjustmentDetail").html(data);
|
||||
openModal('subModal4equipmentAdjustmentDetail');
|
||||
});
|
||||
};
|
||||
|
||||
var deleteDetailFun = 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(function(willDelete){
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/dodelete.do', {id : id}, function(data) {
|
||||
if(data.code=="1"){
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesDetailFun = function() {
|
||||
var checkedItems = $("#table_outStockDetail").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(function(willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/equipmentAdjustmentDetail/dodeletes.do', {ids:datas} , function(data) {
|
||||
if(data.code>0){
|
||||
$("#table_outStockDetail").bootstrapTable('refresh');
|
||||
}else{
|
||||
showAlert('d','删除失败','mainAlertdiv');
|
||||
}
|
||||
},'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
applyContent: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '申请内容不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">反馈</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" id="id" name ="id" value ="${equipmentAdjustment.id}">
|
||||
<input type="hidden" class="form-control" id="unitId" name ="unitId" value ="${equipmentAdjustment.unitId}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">申请人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="applyUser" name="applyUser" value="${equipmentAdjustment.applyUser}"/>
|
||||
<input type="text" class="form-control" id="applyName" name="applyName"
|
||||
value="${equipmentAdjustment.user.caption}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">申请时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="applyTime" name="applyTime"
|
||||
style="width: 132px;" value="${equipmentAdjustment.applyTime.substring(0, 10)}" readonly>
|
||||
</div>
|
||||
</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="unitName" name="unitName" value="${equipmentAdjustment.company.sname}"
|
||||
readonly>
|
||||
</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 ="applyContent" name ="applyContent" placeholder="申请内容" readonly>${equipmentAdjustment.applyContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">反馈人</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="feedbackUser" name="feedbackUser" value="${equipmentAdjustment.feedbackUser}"/>
|
||||
<input type="text" class="form-control" id="feedbackName" name="feedbackName"
|
||||
value="${equipmentAdjustment.userF.caption}" readonly>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">反馈时间</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="input-group date">
|
||||
<div class="input-group-addon">
|
||||
<i class="fa fa-calendar"></i>
|
||||
</div>
|
||||
<input type="text" class="form-control" id="feedbackTime" name="feedbackTime"
|
||||
style="width: 132px;" value="${equipmentAdjustment.feedbackTime.substring(0, 10)}" readonly>
|
||||
</div>
|
||||
</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 ="feedbackContent" name ="feedbackContent" placeholder="反馈内容" readonly>${equipmentAdjustment.feedbackContent}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">调整详情</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<%--<a onclick="addDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="新增"><i class="glyphicon glyphicon-plus"></i></a>
|
||||
<a onclick="deletesDetailFun()" class="btn btn-box-tool" data-toggle="tooltip"
|
||||
title="删除"><i class="glyphicon glyphicon-minus"></i></a>--%>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body ">
|
||||
<table id="table_outStockDetail"></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
178
src/main/webapp/jsp/process/libraryProcessAbnormalAdd.jsp
Normal file
178
src/main/webapp/jsp/process/libraryProcessAbnormalAdd.jsp
Normal file
@ -0,0 +1,178 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessAbnormal/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#tableAbnormal").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
// typeName: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '工艺调整类型不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
abnormalCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
proCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasuresCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveRatedTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单额定工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasures: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//项目类型下拉数据
|
||||
// var selectType = $("#typeName").select2({ minimumResultsForSearch: 10 });
|
||||
// $.post(ext.contextPath + "/process/processAdjustmentType/getSelectList.do", {}, function (data) {
|
||||
// $("#typeName").empty();
|
||||
// var selelct_ = $("#typeName").select2({
|
||||
// data: data,
|
||||
// placeholder: '请选择',//默认文字提示
|
||||
// allowClear: false,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
// formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
// });
|
||||
// selelct_.val('').trigger("change");
|
||||
// selelct_.on('change', function (e) {
|
||||
// $('#typeId').val(e.target.value);
|
||||
// })
|
||||
// }, 'json');
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${id}"/>
|
||||
<input type="hidden" id="pid" name="pid" value="${param.classId}"/>
|
||||
<input type="hidden" id="unitId" name="unitId" value="${param.unitId}"/>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺调整类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="typeName" name="typeName" style="width: 170px;"></select>
|
||||
<input type="hidden" class="form-control" id="typeId" name="typeId" value="" />
|
||||
</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="abnormalCode" name="abnormalCode"
|
||||
placeholder="异常编号"
|
||||
value="${libraryProcessAbnormal.abnormalCode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*异常名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="abnormalName" name="abnormalName"
|
||||
placeholder="异常名称"
|
||||
value="${libraryProcessAbnormal.abnormalName}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">异常现象分析</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="abnormalAnalysis" name="abnormalAnalysis"
|
||||
placeholder="异常现象分析">${libraryProcessAbnormal.abnormalAnalysis}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
178
src/main/webapp/jsp/process/libraryProcessAbnormalEdit.jsp
Normal file
178
src/main/webapp/jsp/process/libraryProcessAbnormalEdit.jsp
Normal file
@ -0,0 +1,178 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessAbnormal/doupdate.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#tableAbnormal").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
// typeName: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '工艺调整类型不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
abnormalCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
proCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasuresCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveRatedTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单额定工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasures: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//项目类型下拉数据
|
||||
// var selectType = $("#typeName").select2({ minimumResultsForSearch: 10 });
|
||||
// $.post(ext.contextPath + "/process/processAdjustmentType/getSelectList.do", {}, function (data) {
|
||||
// $("#typeName").empty();
|
||||
// var selelct_ = $("#typeName").select2({
|
||||
// data: data,
|
||||
// placeholder: '请选择',//默认文字提示
|
||||
// allowClear: false,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
// formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
// });
|
||||
// selelct_.val('').trigger("change");
|
||||
// selelct_.on('change', function (e) {
|
||||
// $('#typeId').val(e.target.value);
|
||||
// })
|
||||
// }, 'json');
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${libraryProcessAbnormal.id}"/>
|
||||
<input type="hidden" id="pid" name="pid" value="${libraryProcessAbnormal.pid}"/>
|
||||
<input type="hidden" id="unitId" name="unitId" value="${libraryProcessAbnormal.unitId}"/>
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺调整类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="typeName" name="typeName" style="width: 170px;"></select>
|
||||
<input type="hidden" class="form-control" id="typeId" name="typeId" value="" />
|
||||
</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="abnormalCode" name="abnormalCode"
|
||||
placeholder="异常编号"
|
||||
value="${libraryProcessAbnormal.abnormalCode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*异常名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="abnormalName" name="abnormalName"
|
||||
placeholder="异常名称"
|
||||
value="${libraryProcessAbnormal.abnormalName}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">异常现象分析</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="abnormalAnalysis" name="abnormalAnalysis"
|
||||
placeholder="异常现象分析">${libraryProcessAbnormal.abnormalAnalysis}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
335
src/main/webapp/jsp/process/libraryProcessAdjustment4Select.jsp
Normal file
335
src/main/webapp/jsp/process/libraryProcessAdjustment4Select.jsp
Normal file
@ -0,0 +1,335 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<script type="text/javascript">
|
||||
var doSearchPatrolPoint = function () {
|
||||
$("#table_libraryProcessAdjustment4Select").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
function doSelect() {
|
||||
//var checkedItems = $("#table_user").bootstrapTable('getAllSelections');
|
||||
var datas = "";
|
||||
datas_name = "";
|
||||
$.each(selectionIds, function (index, item) {
|
||||
if (datas != "") {
|
||||
datas += ",";
|
||||
}
|
||||
datas += item;
|
||||
});
|
||||
//调用上一界面方法完成选择
|
||||
// var type = '${param.equipmentType}';
|
||||
doFinishSelectLibraryAdjustment4Select(datas);
|
||||
closeModal("libraryModal");
|
||||
};
|
||||
|
||||
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag = false;
|
||||
$.each(eval('${librarys}'), function (index, item) {
|
||||
if (row.id == item.id) {
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if (flag)
|
||||
return {
|
||||
checked: true//设置选中
|
||||
};
|
||||
return value;
|
||||
}
|
||||
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
function initialSelectionIds() {
|
||||
var check_array = eval('${librarys}');
|
||||
if (check_array != null && check_array.length > 0) {
|
||||
selectionIds = new Array(check_array.length);
|
||||
for (var i = 0; i < check_array.length; i++) {
|
||||
selectionIds[i] = check_array[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCheckedIds() {
|
||||
var ids = "";
|
||||
var check_array = eval('${librarys}');
|
||||
$.each(check_array, function (index, item) {
|
||||
if (ids != "") {
|
||||
ids += ",";
|
||||
}
|
||||
// ids += item.id;
|
||||
ids += item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
|
||||
function queryParams(params) {
|
||||
var temp = {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
classId: '${param.classId}',
|
||||
unitId: '${param.unitId}',
|
||||
abnormalName: '${param.abnormalName}'
|
||||
};
|
||||
var status = $('#switchBtn').bootstrapSwitch('state');
|
||||
if (status) {
|
||||
temp.checkedIds = getCheckedIds();
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#searchForm_Equ").attr("onsubmit", "return false;");
|
||||
$("#search_name_equ").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
//回车执行查询
|
||||
doSearchPatrolPoint();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
//jquery html()方法加载,导致box无法执行boxwidget(),手动初始化
|
||||
$('#searchBox').boxWidget();
|
||||
$('#switchBtn').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
})
|
||||
$(".select2-selection--single").css({'height': '30px', 'paddingTop': '4px'});
|
||||
|
||||
initialSelectionIds();
|
||||
$table = $("#table_libraryProcessAdjustment4Select").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/libraryProcessAdjustment/getList4Select.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect: true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
clickToSelect: true,
|
||||
responseHandler: responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
//formatter: stateFormatter
|
||||
formatter: function (i, row) { // 每次加载 checkbox 时判断当前 row 的 id 是否已经存在全局 Set() 里
|
||||
if ($.inArray(row.id, Array.from(selectionIds)) != -1) { // 因为 Set是集合,需要先转换成数组
|
||||
return {
|
||||
checked: true // 存在则选中
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.libraryProcessAbnormal.abnormalCode;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.libraryProcessAbnormal.abnormalName + "'>" + row.libraryProcessAbnormal.abnormalName + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整代码', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.proCode;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.proName + "'>" + row.proName + "</span>";
|
||||
}
|
||||
},
|
||||
/*{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整措施代码', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '15%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.proMeasuresCode;
|
||||
}
|
||||
},*/
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整措施', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '25%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.proMeasures + "'>" + row.proMeasures + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整监控指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.monitorTarget + "'>" + row.monitorTarget + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '额定工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.receiveRatedTime;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_libraryProcessAdjustment4Select");
|
||||
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows, obj) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
if ('check' == e.type) {
|
||||
obj.parent().addClass("checked");
|
||||
} else {
|
||||
obj.parent().removeClass("checked");
|
||||
}
|
||||
//adjustBootstrapTableView("table_user");
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = {"union": union, "difference": difference};
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="libraryModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择调整内容</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="box box-primary box-solid collapsed-box" id="searchBox" collapsed>
|
||||
<div class="box-header">
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right" data-widget="collapse"
|
||||
style="margin-right: 5px;">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /. tools -->
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="box-body collapse">
|
||||
<form class="form-horizontal " id="searchForm_Equ">
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<!-- <label class="col-sm-2 control-label">部门</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="search_pid" name ="search_pid" style="width:170px;"></select>
|
||||
</div> -->
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="search_name_equ" name="search_name_equ"
|
||||
class="form-control input-sm"
|
||||
placeholder="名称" style="width:170px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<label class="col-sm-2 control-label">只看选中</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtn" type="checkbox"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-sm-offset-6 button-group" style="padding: 0;">
|
||||
<button type="button" class="btn btn-default btn-sm pull-right"
|
||||
onclick="doSearchPatrolPoint();"><i
|
||||
class="fa fa-search"> 搜索</i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table_libraryProcessAdjustment4Select" style="table-layout:fixed;"></div>
|
||||
</div>
|
||||
</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="doSelect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
125
src/main/webapp/jsp/process/libraryProcessAdjustment4Tree.jsp
Normal file
125
src/main/webapp/jsp/process/libraryProcessAdjustment4Tree.jsp
Normal file
@ -0,0 +1,125 @@
|
||||
<%@ 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>
|
||||
<style type="text/css">
|
||||
.buttonDiv {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
var unitId = "";
|
||||
|
||||
var choiceFun = function (id) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAdjustment/showList.do', {classId: id}, function (data) {
|
||||
$("#contentListTable").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/process/processAdjustmentType/getTreeJson.do', {unitId: unitId}, function (data) {
|
||||
var treeData = data.result;
|
||||
$('#tree').treeview({data: treeData, levels: 1});
|
||||
$('#tree').on('nodeSelected', function (event, treeData) {
|
||||
choiceFun(treeData.id);
|
||||
});
|
||||
}, 'json');
|
||||
$("#contentListTable").html("");
|
||||
};
|
||||
|
||||
function importExcelFun2() {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAdjustment/importExcelFun.do', {unitId: unitId}, function (data) {
|
||||
$("#fileInputDiv").html(data);
|
||||
openModal('subfileInputModal');
|
||||
});
|
||||
}
|
||||
|
||||
function outExcelFun() {
|
||||
window.open(ext.contextPath + "/process/libraryProcessAdjustment/outExcelFun.do?unitId=" + unitId);
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
unitId = unitId;
|
||||
initTreeView();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<!-- 搜索状态 0为隐藏 1为显示 -->
|
||||
<input type="hidden" id="searchStatus" name="searchStatus" value="0">
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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 id="fileInputDiv"></div>
|
||||
<div id="docFileRelationDiv"></div>
|
||||
|
||||
<div style="width:100%;height:10px;background-color:#ECF0F5;">
|
||||
|
||||
</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="importExcelFun2();"><i
|
||||
class="fa fa-cloud-download"></i>
|
||||
导入
|
||||
</button>
|
||||
<button type="button" class="btn btn-box-tool" onclick="outExcelFun();"><i
|
||||
class="fa fa-cloud-upload"></i>
|
||||
导出
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="box-body no-padding">
|
||||
<div id="tree" style="height:700px;overflow:auto; "></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9" id="contentListTable"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
226
src/main/webapp/jsp/process/libraryProcessAdjustmentAdd.jsp
Normal file
226
src/main/webapp/jsp/process/libraryProcessAdjustmentAdd.jsp
Normal file
@ -0,0 +1,226 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.tools.CommString"%>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessAdjustment/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#tableAdjustment").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
// typeName: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '工艺调整类型不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
abnormalCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
proCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasuresCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveRatedTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单额定工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasures: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//项目类型下拉数据
|
||||
// var selectType = $("#typeName").select2({ minimumResultsForSearch: 10 });
|
||||
// $.post(ext.contextPath + "/process/processAdjustmentType/getSelectList.do", {}, function (data) {
|
||||
// $("#typeName").empty();
|
||||
// var selelct_ = $("#typeName").select2({
|
||||
// data: data,
|
||||
// placeholder: '请选择',//默认文字提示
|
||||
// allowClear: false,//允许清空
|
||||
// escapeMarkup: function (markup) { return markup; }, // 自定义格式化防止xss注入
|
||||
// language: "zh-CN",
|
||||
// minimumInputLength: 0,
|
||||
// minimumResultsForSearch: 10,//数据超过10个启用搜索框
|
||||
// formatResult: function formatRepo(repo) { return repo.text; }, // 函数用来渲染结果
|
||||
// formatSelection: function formatRepoSelection(repo) { return repo.text; } // 函数用于呈现当前的选择
|
||||
// });
|
||||
// selelct_.val('').trigger("change");
|
||||
// selelct_.on('change', function (e) {
|
||||
// $('#typeId').val(e.target.value);
|
||||
// })
|
||||
// }, 'json');
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${id}" />
|
||||
<input type="hidden" id="pid" name="pid" value="${param.abnormalId}" />
|
||||
<input type="hidden" id="unitId" name="unitId" value="${param.unitId}" />
|
||||
|
||||
<!-- <div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺调整类型</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="typeName" name="typeName" style="width: 170px;"></select>
|
||||
<input type="hidden" class="form-control" id="typeId" name="typeId" value="" />
|
||||
</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="abnormalCode" name="abnormalCode" placeholder="异常编号"
|
||||
value="${libraryProcessAdjustment.abnormalCode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*异常名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="abnormalName" name="abnormalName" placeholder="异常名称"
|
||||
value="${libraryProcessAdjustment.abnormalName}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">异常现象分析</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="abnormalAnalysis" name="abnormalAnalysis"
|
||||
placeholder="异常现象分析">${libraryProcessAdjustment.abnormalAnalysis}</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="proCode" name="proCode" placeholder="工艺调整代码"
|
||||
value="${libraryProcessAdjustment.proCode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*工艺调整名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="proName" name="proName" placeholder="工艺调整名称"
|
||||
value="${libraryProcessAdjustment.proName}">
|
||||
</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="proMeasuresCode" name="proMeasuresCode" placeholder="工艺调整措施代码"
|
||||
value="${libraryProcessAdjustment.proMeasuresCode}">
|
||||
</div>--%>
|
||||
<label class="col-sm-2 control-label">*接单额定工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="receiveRatedTime" name="receiveRatedTime"
|
||||
placeholder="接单额定工时" value="${libraryProcessAdjustment.receiveRatedTime}" step="0.01">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺调整措施</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="proMeasures" name="proMeasures"
|
||||
placeholder="工艺调整措施">${libraryProcessAdjustment.proMeasures}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工艺调整监控指标</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="monitorTarget" name="monitorTarget"
|
||||
placeholder="工艺调整监控指标">${libraryProcessAdjustment.monitorTarget}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工艺调整验收标准</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="checkStandard" name="checkStandard"
|
||||
placeholder="工艺调整验收标准">${libraryProcessAdjustment.checkStandard}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
321
src/main/webapp/jsp/process/libraryProcessAdjustmentEdit.jsp
Normal file
321
src/main/webapp/jsp/process/libraryProcessAdjustmentEdit.jsp
Normal file
@ -0,0 +1,321 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||||
<%@page import="com.sipai.tools.CommString" %>
|
||||
<% request.setAttribute("Flag_Active", CommString.Flag_Active); %>
|
||||
<% request.setAttribute("Flag_Unactive", CommString.Flag_Unactive); %>
|
||||
<%@page import="com.sipai.entity.document.DocFileRelation" %>
|
||||
<% request.setAttribute("Type_libraryProcessAdjustment", DocFileRelation.Type_libraryProcessAdjustment); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessAdjustment/doupdate.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#tableAdjustment").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
// typeName: {
|
||||
// validators: {
|
||||
// notEmpty: {
|
||||
// message: '工艺调整类型不能为空'
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
abnormalCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
abnormalName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '异常名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
proCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proName: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasuresCode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施代码不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
receiveRatedTime: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '接单额定工时不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
proMeasures: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '工艺调整措施'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var fileRelation = function () {
|
||||
$.post(ext.contextPath + '/document/docFileRelation/show4select.do', {
|
||||
unitId: unitId,
|
||||
type: '${Type_libraryProcessAdjustment}',
|
||||
masterid: $("#id").val()
|
||||
}, function (data) {
|
||||
$("#docFileRelationDiv").html(data);
|
||||
openModal('docFileRelationModal');
|
||||
});
|
||||
};
|
||||
|
||||
//下载文件
|
||||
var fileDownload = function (id) {
|
||||
window.open(ext.contextPath + "/base/downloadFile.do?key=" + id + "&tbName=tb_doc_file");
|
||||
};
|
||||
|
||||
function delRelation(id) {
|
||||
stopBubbleDefaultEvent();
|
||||
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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/document/docFileRelation/delete.do', {id: id}, function (data) {
|
||||
if (data.code == 1) {
|
||||
$("#fileRelationTable").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#fileRelationTable").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/document/docFileRelation/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
masterid: $("#id").val()
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'asc', // 排序规则
|
||||
// onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
|
||||
// },
|
||||
columns: [
|
||||
// {
|
||||
// checkbox: true, // 显示一个勾选框
|
||||
// },
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '资料名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return row.commonFile.filename;
|
||||
}
|
||||
}, {
|
||||
field: '', // 返回json数据中的name
|
||||
title: '上传者', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
formatter: function (value, row, index) {
|
||||
return row.insuserName;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '100',
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" title="下载" onclick="fileDownload(\'' + row.docId + '\')"><i class="fa fa-download"></i><span class="hidden-md hidden-lg">下载</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" title="删除" onclick="delRelation(\'' + row.id + '\')"><i class="fa fa fa-trash-o"></i><span class="hidden-md hidden-lg">删除</span></button>';
|
||||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">修改</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" id="id" name="id" value="${libraryProcessAdjustment.id}"/>
|
||||
<input type="hidden" id="pid" name="pid" value="${libraryProcessAdjustment.pid}"/>
|
||||
<input type="hidden" id="unitId" name="unitId" value="${libraryProcessAdjustment.unitId}"/>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺调整代码</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="proCode" name="proCode" placeholder="工艺调整代码"
|
||||
value="${libraryProcessAdjustment.proCode}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*工艺调整名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="proName" name="proName" placeholder="工艺调整名称"
|
||||
value="${libraryProcessAdjustment.proName}">
|
||||
</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="proMeasuresCode" name="proMeasuresCode"
|
||||
placeholder="工艺调整措施代码"
|
||||
value="${libraryProcessAdjustment.proMeasuresCode}">
|
||||
</div>--%>
|
||||
<label class="col-sm-2 control-label">*接单额定工时</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="receiveRatedTime" name="receiveRatedTime"
|
||||
placeholder="接单额定工时" value="${libraryProcessAdjustment.receiveRatedTime}"
|
||||
step="0.01">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*工艺调整措施</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="proMeasures" name="proMeasures"
|
||||
placeholder="工艺调整措施">${libraryProcessAdjustment.proMeasures}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工艺调整监控指标</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="monitorTarget" name="monitorTarget"
|
||||
placeholder="工艺调整监控指标">${libraryProcessAdjustment.monitorTarget}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">工艺调整验收标准</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="checkStandard" name="checkStandard"
|
||||
placeholder="工艺调整验收标准">${libraryProcessAdjustment.checkStandard}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<div class="btn-group" style="width: 220px;padding-bottom:10px;">
|
||||
<button type="button" class="btn btn-default" onclick="fileRelation();"><i
|
||||
class="fa fa-plus"></i>文件关联
|
||||
</button>
|
||||
<!-- <button type="button" class="btn btn-default" onclick="delDocFun();"><i class="fa fa-trash"></i> 删除</button> -->
|
||||
</div>
|
||||
<!-- <div class="input-group input-group-sm pull-right" style="width:250px" >
|
||||
<input type="text" id="search_fileName" name="search_fileName" autocomplete="off" style="height:35px" class="form-control pull-right" placeholder="资料名称...">
|
||||
<div class="input-group-btn">
|
||||
<button class="btn btn-default" style="height:35px" onclick="dosearchFile();"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div> -->
|
||||
<table id="fileRelationTable"></table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
@ -0,0 +1,101 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.tools.CommUtil"%>
|
||||
<%request.setAttribute("nowDate", CommUtil.nowDate().replaceAll("[[\\s-:punct:]]","")); %>
|
||||
<style type="text/css">
|
||||
.select2-container .select2-selection--single{
|
||||
height:34px;
|
||||
line-height: 34px;
|
||||
}
|
||||
.select2-selection__arrow{
|
||||
margin-top:3px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
var control;
|
||||
function initUpload(ctrlName, uploadUrl) {
|
||||
control = $('#' + ctrlName);
|
||||
control.fileinput({
|
||||
language: 'zh', //设置语言
|
||||
uploadUrl: uploadUrl, //上传的地址
|
||||
uploadAsync: true, //默认异步上传
|
||||
showCaption: true,//是否显示标题
|
||||
showUpload: false, //是否显示上传按钮
|
||||
browseClass: "btn btn-primary", //按钮样式
|
||||
allowedFileExtensions: ["xls", "xlsx"], //接收的文件后缀
|
||||
maxFileCount: 1,//最大上传文件数限制
|
||||
previewFileIcon: '<i class="glyphicon glyphicon-file"></i>',
|
||||
showPreview: false, //是否显示预览
|
||||
previewFileIconSettings: {
|
||||
'docx': '<i ass="fa fa-file-word-o text-primary"></i>',
|
||||
'xlsx': '<i class="fa fa-file-excel-o text-success"></i>',
|
||||
'xls': '<i class="fa fa-file-excel-o text-success"></i>',
|
||||
'pptx': '<i class="fa fa-file-powerpoint-o text-danger"></i>',
|
||||
'jpg': '<i class="fa fa-file-photo-o text-warning"></i>',
|
||||
'pdf': '<i class="fa fa-file-archive-o text-muted"></i>',
|
||||
'zip': '<i class="fa fa-file-archive-o text-muted"></i>',
|
||||
},
|
||||
//参数
|
||||
uploadExtraData: function () {
|
||||
var data = {
|
||||
"companyId": '${param.companyId}', //此处自定义传参
|
||||
};
|
||||
return data;
|
||||
}
|
||||
});
|
||||
control.on("fileuploaded", function (event, data, previewId, index) {
|
||||
if(data.response.status == true){
|
||||
closeModal('subfileInputModal');
|
||||
$("#table").bootstrapTable('refresh');
|
||||
showAlert('s',data.response.msg,'mainAlertdiv');
|
||||
}else{
|
||||
showAlert('d',data.response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(function(){
|
||||
initUpload("filelist", ext.contextPath+ "/process/libraryProcessAdjustment/saveExcelData.do?unitId="+unitId+"&type=${param.type}");
|
||||
})
|
||||
//导入上传文件的数据
|
||||
function importExcelFun(){
|
||||
if($("#filelist").val() == null || $("#filelist").val()==""){
|
||||
showAlert('d','上传的文件不能为空!');
|
||||
}else{
|
||||
control.fileinput("upload");
|
||||
}
|
||||
}
|
||||
|
||||
//模板下载
|
||||
function downExcelTemplate(){
|
||||
window.open(ext.contextPath + "/process/libraryProcessAdjustment/downloadExcelTemplate.do");
|
||||
}
|
||||
</script>
|
||||
<div class="modal fade" id="subfileInputModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">导入数据</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="importFile" name="importFile" class="form-horizontal" method="post"
|
||||
enctype="multipart/form-data">
|
||||
<div id="alertDiv"></div>
|
||||
<div class="box-body">
|
||||
<div>
|
||||
<input id="filelist" name="filelist" class="file-loading" type="file" multiple accept=".xls,.xlsx">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="downExcelTemplate()" id="btn_save">模板下载</button>
|
||||
<button type="button" class="btn btn-primary" onclick="importExcelFun()" id="btn_save">导入</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
516
src/main/webapp/jsp/process/libraryProcessAdjustmentList.jsp
Normal file
516
src/main/webapp/jsp/process/libraryProcessAdjustmentList.jsp
Normal file
@ -0,0 +1,516 @@
|
||||
<%@ 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" %>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
|
||||
<head>
|
||||
<title><%= ServerObject.atttable.get("TOPTITLE")%>
|
||||
</title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<link rel="stylesheet"
|
||||
href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css"/>
|
||||
<script type="text/javascript"
|
||||
src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
|
||||
charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
var companyId;
|
||||
|
||||
var dosearch = function () {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
};
|
||||
|
||||
//异常列表
|
||||
var getListFunAbnormal = function () {
|
||||
$('#tableAbnormal').bootstrapTable('destroy');
|
||||
$("#tableAbnormal").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/libraryProcessAbnormal/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
classId: '${param.classId}',
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId
|
||||
}
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
$('#abnormalId').val(row.id)
|
||||
getListFunAdjustment();
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
width: '40px',
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.abnormalCode;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.abnormalName + "'>" + row.abnormalName + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常现象及分析', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '50%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.abnormalAnalysis + "'>" + row.abnormalAnalysis + "</span>";
|
||||
}
|
||||
}, {
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editAbnormal(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteAbnormal(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("tableAbnormal");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
//工艺调整列表
|
||||
var getListFunAdjustment = function () {
|
||||
$('#tableAdjustment').bootstrapTable('destroy');
|
||||
$("#tableAdjustment").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/libraryProcessAdjustment/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10], // 设置页面可以显示的数据条数
|
||||
pageSize: 10, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: $('#abnormalId').val(),
|
||||
classId: '${param.classId}',
|
||||
search_name: $('#search_name').val(),
|
||||
unitId: unitId
|
||||
}
|
||||
},
|
||||
sortName: 'insdt', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
onClickRow: function (row) {//单击行事件,执行查看功能
|
||||
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
width: '40px',
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
/*{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.abnormalCode;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '异常名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.abnormalName + "'>" + row.abnormalName + "</span>";
|
||||
}
|
||||
},*/
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整代码', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.proCode;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.proName + "'>" + row.proName + "</span>";
|
||||
}
|
||||
},
|
||||
/*{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整措施代码', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.proMeasuresCode;
|
||||
}
|
||||
},*/
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整措施', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '30%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.proMeasures + "'>" + row.proMeasures + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺调整监控指标', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '30%',
|
||||
formatter: function (value, row, index) {
|
||||
return "<span style='display: block;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;' title='" + row.monitorTarget + "'>" + row.monitorTarget + "</span>";
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '额定工时', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.receiveRatedTime;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%',
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="editAdjustment(\'' + row.id + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="deleteAdjustment(\'' + row.id + '\')" data-toggle="tooltip" title="删除"><i class="fa fa-trash-o "></i><span class="hidden-md hidden-lg"> 删除</span></button>';
|
||||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("tableAdjustment");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
//新增异常
|
||||
var addAbnormal = function () {
|
||||
var pid = '${param.classId}';
|
||||
$.post(ext.contextPath + '/process/libraryProcessAbnormal/doadd.do', {
|
||||
classId: '${param.classId}',
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//修改异常
|
||||
var editAbnormal = function (id) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAbnormal/doedit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//新增工艺调整
|
||||
var addAdjustment = function () {
|
||||
var abnormalId = $('#abnormalId').val();
|
||||
$.post(ext.contextPath + '/process/libraryProcessAdjustment/doadd.do', {
|
||||
abnormalId: abnormalId,
|
||||
unitId: unitId
|
||||
}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//修改工艺调整
|
||||
var editAdjustment = function (id) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAdjustment/doedit.do', {id: id}, function (data) {
|
||||
$("#subDiv").html(data);
|
||||
openModal('subModal');
|
||||
});
|
||||
};
|
||||
|
||||
//删除异常(单删)
|
||||
var deleteAbnormal = 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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAbnormal/dodelete.do', {id: id}, function (data) {
|
||||
var datastr = eval('(' + data + ')');
|
||||
if (datastr.code == 1) {
|
||||
$("#tableAbnormal").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//删除工艺调整
|
||||
var deleteAdjustment = 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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAdjustment/dodelete.do', {id: id}, function (data) {
|
||||
var datastr = eval('(' + data + ')');
|
||||
if (datastr.code == 1) {
|
||||
$("#tableAdjustment").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
//删除异常(多删)
|
||||
var deletesAbnormal = function () {
|
||||
var checkedItems = $("#tableAbnormal").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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAbnormal/dodeletes.do', {ids: datas}, function (data) {
|
||||
if (data.code > 0) {
|
||||
$("#tableAbnormal").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
//删除工艺调整(多删)
|
||||
var deletesAdjustment = function () {
|
||||
var checkedItems = $("#tableAdjustment").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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessAdjustment/dodeletes.do', {ids: datas}, function (data) {
|
||||
if (data.code > 0) {
|
||||
$("#tableAdjustment").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv');
|
||||
}
|
||||
}, 'json');
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function () {
|
||||
//加载工艺异常
|
||||
getListFunAbnormal();
|
||||
//加载工艺调整
|
||||
getListFunAdjustment();
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<input type="hidden" id="abnormalId" name="abnormalId" value="${param.abnormalId}">
|
||||
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">异常列表</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-default" onclick="addAbnormal();"><i class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesAbnormal();"><i class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<table id="tableAbnormal" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">工艺调整</h3> <h3 class="box-title" style="color:#3C8DBC;font-size:14px;"
|
||||
id="projectNameId"></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-default" onclick="addAdjustment();"><i class="fa fa-plus"></i>
|
||||
新增
|
||||
</button>
|
||||
<button type="button" class="btn btn-default" onclick="deletesAdjustment();"><i class="fa fa-trash-o"></i>
|
||||
删除
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<div id="alertDiv_power"></div>
|
||||
<div id="powerDiv"></div>
|
||||
<div id="menu4SelectDiv_func"></div>
|
||||
|
||||
<table id="tableAdjustment" style="table-layout:fixed;"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</html>
|
||||
16
src/main/webapp/jsp/process/libraryProcessAdjustmentView.jsp
Normal file
16
src/main/webapp/jsp/process/libraryProcessAdjustmentView.jsp
Normal file
@ -0,0 +1,16 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: s123
|
||||
Date: 2020/11/24
|
||||
Time: 10:20
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
328
src/main/webapp/jsp/process/libraryProcessManage4Select.jsp
Normal file
328
src/main/webapp/jsp/process/libraryProcessManage4Select.jsp
Normal file
@ -0,0 +1,328 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<script type="text/javascript">
|
||||
var doSearchPatrolPoint = function () {
|
||||
$("#table_libraryProcessAdjustment4Select").bootstrapTable('refresh');
|
||||
};
|
||||
function doSelect() {
|
||||
//var checkedItems = $("#table_user").bootstrapTable('getAllSelections');
|
||||
var datas = "";
|
||||
datas_name = "";
|
||||
$.each(selectionIds, function (index, item) {
|
||||
if (datas != "") {
|
||||
datas += ",";
|
||||
}
|
||||
datas += item;
|
||||
});
|
||||
//调用上一界面方法完成选择
|
||||
// var type = '${param.equipmentType}';
|
||||
doFinishSelectLibraryAdjustment4Select(datas);
|
||||
closeModal("libraryModal");
|
||||
};
|
||||
|
||||
|
||||
function stateFormatter(value, row, index) {
|
||||
var flag = false;
|
||||
$.each(eval('${librarys}'), function (index, item) {
|
||||
if (row.id == item.id) {
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
if (flag)
|
||||
return {
|
||||
checked: true//设置选中
|
||||
};
|
||||
return value;
|
||||
}
|
||||
var $table;
|
||||
var switchStatus = false;
|
||||
var selectionIds = []; //保存选中ids
|
||||
function initialSelectionIds() {
|
||||
var check_array = eval('${librarys}');
|
||||
if (check_array != null && check_array.length > 0) {
|
||||
selectionIds = new Array(check_array.length);
|
||||
for (var i = 0; i < check_array.length; i++) {
|
||||
selectionIds[i] = check_array[i].id;
|
||||
}
|
||||
}
|
||||
}
|
||||
function getCheckedIds() {
|
||||
var ids = "";
|
||||
var check_array = eval('${librarys}');
|
||||
$.each(check_array, function (index, item) {
|
||||
if (ids != "") {
|
||||
ids += ",";
|
||||
}
|
||||
// ids += item.id;
|
||||
ids += item.id;
|
||||
});
|
||||
return ids;
|
||||
}
|
||||
function queryParams(params) {
|
||||
var temp = {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
typeId: '${param.typeId}',
|
||||
unitId: '${param.unitId}',
|
||||
};
|
||||
var status = $('#switchBtn').bootstrapSwitch('state');
|
||||
if (status) {
|
||||
temp.checkedIds = getCheckedIds();
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
$(function () {
|
||||
$("#searchForm_Equ").attr("onsubmit", "return false;");
|
||||
$("#search_name_equ").keyup(function () {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
//回车执行查询
|
||||
doSearchPatrolPoint();
|
||||
event.stopPropagation();
|
||||
}
|
||||
});
|
||||
//jquery html()方法加载,导致box无法执行boxwidget(),手动初始化
|
||||
$('#searchBox').boxWidget();
|
||||
$('#switchBtn').bootstrapSwitch({
|
||||
onText: '是',
|
||||
offText: '否',
|
||||
size: "small",
|
||||
})
|
||||
$(".select2-selection--single").css({ 'height': '30px', 'paddingTop': '4px' });
|
||||
|
||||
initialSelectionIds();
|
||||
$table = $("#table_libraryProcessAdjustment4Select").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/libraryProcessManage/getList4Select.do', // 获取表格数据的url
|
||||
//cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
clickToSelect: true,
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20], // 设置页面可以显示的数据条数
|
||||
pageSize: 20, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
clickToSelect: true,
|
||||
responseHandler: responseHandler, //在渲染页面数据之前执行的方法,此配置很重要!!!!!!!
|
||||
queryParams: queryParams,
|
||||
queryParamsType: "limit",
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
/* showColumns: true,
|
||||
showRefresh: true, */
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
width: '120',
|
||||
//formatter: stateFormatter
|
||||
formatter: function (i, row) { // 每次加载 checkbox 时判断当前 row 的 id 是否已经存在全局 Set() 里
|
||||
if ($.inArray(row.id, Array.from(selectionIds)) != -1) { // 因为 Set是集合,需要先转换成数组
|
||||
return {
|
||||
checked: true // 存在则选中
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '指标编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.code;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.name;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '工艺段', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.processSection.name;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '单位', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.unit;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '最小值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.targetValue1;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '最大值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.targetValue2;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '控制逻辑', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.controlLogic;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '额定分值', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '12%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.baseHours;
|
||||
}
|
||||
},
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_libraryProcessAdjustment4Select");
|
||||
|
||||
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
//绑定选中事件、取消事件、全部选中、全部取消
|
||||
$table.on('check.bs.table check-all.bs.table uncheck.bs.table uncheck-all.bs.table', function (e, rows, obj) {
|
||||
var ids = $.map(!$.isArray(rows) ? [rows] : rows, function (row) {
|
||||
return row.id;
|
||||
});
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
selectionIds = _[func](selectionIds, ids);
|
||||
if ('check' == e.type) {
|
||||
obj.parent().addClass("checked");
|
||||
} else {
|
||||
obj.parent().removeClass("checked");
|
||||
}
|
||||
//adjustBootstrapTableView("table_user");
|
||||
});
|
||||
});
|
||||
//选中事件操作数组
|
||||
var union = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
if ($.inArray(id, array) == -1) {
|
||||
array[array.length] = id;
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
//取消选中事件操作数组
|
||||
var difference = function (array, ids) {
|
||||
$.each(ids, function (i, id) {
|
||||
var index = $.inArray(id, array);
|
||||
if (index != -1) {
|
||||
array.splice(index, 1);
|
||||
}
|
||||
});
|
||||
return array;
|
||||
};
|
||||
var _ = { "union": union, "difference": difference };
|
||||
|
||||
//表格分页之前处理多选框数据
|
||||
function responseHandler(res) {
|
||||
$.each(res.rows, function (i, row) {
|
||||
row.checkStatus = $.inArray(row.id, selectionIds) != -1; //判断当前行的数据id是否存在与选中的数组,存在则将多选框状态变为true
|
||||
});
|
||||
return res;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="modal fade" id="libraryModal">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">选择调整内容</h4>
|
||||
</div>
|
||||
<div class="modal-body " style="width:100%">
|
||||
<div id="alertDiv"></div>
|
||||
|
||||
<div class="box box-primary box-solid collapsed-box" id="searchBox" collapsed>
|
||||
<div class="box-header">
|
||||
<!-- tools box -->
|
||||
<div class="pull-right box-tools">
|
||||
<button type="button" class="btn btn-primary btn-sm pull-right" data-widget="collapse"
|
||||
style="margin-right: 5px;">
|
||||
<i class="fa fa-plus"></i></button>
|
||||
</div>
|
||||
<!-- /. tools -->
|
||||
<i class="fa fa-search"></i>
|
||||
</div>
|
||||
<div class="box-body collapse">
|
||||
<form class="form-horizontal " id="searchForm_Equ">
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<!-- <label class="col-sm-2 control-label">部门</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2 " id="search_pid" name ="search_pid" style="width:170px;"></select>
|
||||
</div> -->
|
||||
<label class="col-sm-2 control-label">名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" id="search_name_equ" name="search_name_equ" class="form-control input-sm"
|
||||
placeholder="名称" style="width:170px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-right: 20px;">
|
||||
<label class="col-sm-2 control-label">只看选中</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="switch" data-on="primary" data-off="info">
|
||||
<input id="switchBtn" type="checkbox" />
|
||||
</div>
|
||||
</div>
|
||||
<div class=" col-sm-offset-6 button-group" style="padding: 0;">
|
||||
<button type="button" class="btn btn-default btn-sm pull-right" onclick="doSearchPatrolPoint();"><i
|
||||
class="fa fa-search"> 搜索</i></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div id="table_libraryProcessAdjustment4Select" style="table-layout:fixed;"></div>
|
||||
</div>
|
||||
</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="doSelect()">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
125
src/main/webapp/jsp/process/libraryProcessManage4Tree.jsp
Normal file
125
src/main/webapp/jsp/process/libraryProcessManage4Tree.jsp
Normal file
@ -0,0 +1,125 @@
|
||||
<%@ 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>
|
||||
|
||||
<style type="text/css">
|
||||
.buttonDiv {
|
||||
float: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
var unitId = "";
|
||||
|
||||
var choiceFun = function (id) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessManage/showList.do', { classId: id }, function (data) {
|
||||
$("#contentListTable").html(data);
|
||||
});
|
||||
};
|
||||
|
||||
var initTreeView = function () {
|
||||
$.post(ext.contextPath + '/process/libraryProcessManageType/getTreeJson.do', { unitId: unitId }, function (data) {
|
||||
var treeData = data.result;
|
||||
$('#tree').treeview({ data: treeData, levels: 1 });
|
||||
$('#tree').on('nodeSelected', function (event, treeData) {
|
||||
choiceFun(treeData.id);
|
||||
});
|
||||
}, 'json');
|
||||
$("#contentListTable").html("");
|
||||
};
|
||||
|
||||
//导入
|
||||
// function doImport() {
|
||||
// $.post(ext.contextPath + '/timeEfficiency/patrolContentsStandard/doImport.do', { unitId: unitId }, function (data) {
|
||||
// $("#subDiv").html(data);
|
||||
// openModal('subModal');
|
||||
// });
|
||||
// }
|
||||
|
||||
//导出
|
||||
// function doExport() {
|
||||
// window.open(ext.contextPath + "/timeEfficiency/patrolContentsStandard/doExport.do?unitId=" + unitId);
|
||||
// }
|
||||
|
||||
$(function () {
|
||||
unitId = unitId;
|
||||
initTreeView();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="initMenu()" class="hold-transition ${cu.themeclass} sidebar-mini">
|
||||
<!-- 搜索状态 0为隐藏 1为显示 -->
|
||||
<input type="hidden" id="searchStatus" name="searchStatus" value="0">
|
||||
|
||||
<div class="wrapper">
|
||||
<div class="content-wrapper">
|
||||
<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 id="equipmentProcessSectionSubDiv"></div>
|
||||
<div style="width:100%;height:10px;background-color:#ECF0F5;">
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">过程控制分类</h3>
|
||||
<div class="box-tools" id="addDiv" style="display:none">
|
||||
</div>
|
||||
|
||||
<!-- <div class="box-tools" id="addDiv">
|
||||
<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 class="box-body no-padding">
|
||||
<div id="tree" style="height:700px;overflow:auto; "></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-9" id="contentListTable"></div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
193
src/main/webapp/jsp/process/libraryProcessManageAdd.jsp
Normal file
193
src/main/webapp/jsp/process/libraryProcessManageAdd.jsp
Normal file
@ -0,0 +1,193 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.process.LibraryProcessManage" %>
|
||||
<% request.setAttribute("ControlLogic_H", LibraryProcessManage.ControlLogic_H); %>
|
||||
<% request.setAttribute("ControlLogic_L", LibraryProcessManage.ControlLogic_L); %>
|
||||
<% request.setAttribute("ControlLogic_I", LibraryProcessManage.ControlLogic_I); %>
|
||||
<% request.setAttribute("Cycle_Day", LibraryProcessManage.Cycle_Day); %>
|
||||
<% request.setAttribute("Cycle_Month", LibraryProcessManage.Cycle_Month); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessManage/dosave.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$(function (){
|
||||
$("#cycle").select2({minimumResultsForSearch: -1}).val("${Cycle_Day}").trigger("change");
|
||||
$("#controlLogic").select2({minimumResultsForSearch: -1}).val("${ControlLogic_H}").trigger("change");
|
||||
$("#controlLogic").on("select2:select",function(){
|
||||
var data = $(this).val();
|
||||
if(data=='${ControlLogic_H}'||data=='${ControlLogic_L}'){
|
||||
$('#targetValueSt1').css('display','block');
|
||||
$('#targetValueSt2').css('display','none');
|
||||
}else if(data=='${ControlLogic_I}'){
|
||||
$('#targetValueSt1').css('display','none');
|
||||
$('#targetValueSt2').css('display','block');
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', {formId:'subForm',hiddenId:'mpid',textId:'mpname'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
// $('#month').datepicker({
|
||||
// language: 'zh-CN',
|
||||
// autoclose: true,
|
||||
// todayHighlight: true,
|
||||
// format: 'yyyy-mm',
|
||||
// }).on('hide', function (e) {
|
||||
// //当日期选择框关闭时,执行刷新校验
|
||||
// $('#subForm').data('bootstrapValidator')
|
||||
// .updateStatus('month', 'NOT_VALIDATED', null)
|
||||
// .validateField('month');
|
||||
// });
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${id}" />
|
||||
<input type="hidden" name="unitId" id="unitId" value="${param.unitId}" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="code" name="code" placeholder="指标编号"
|
||||
value="${libraryProcessManage.code}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="指标名称"
|
||||
value="${libraryProcessManage.name}">
|
||||
</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="area" name="area" placeholder="控制区"
|
||||
value="${libraryProcessManage.area}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unit" name="unit" placeholder="单位"
|
||||
value="${libraryProcessManage.unit}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">周期</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="cycle" name="cycle" style="width: 170px;">
|
||||
<option value="${Cycle_Day}">天</option>
|
||||
<option value="${Cycle_Month}">月</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">额定分值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="baseHours" name="baseHours" placeholder="额定工分"
|
||||
value="${libraryProcessManage.baseHours}" step="0.01">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" name="mpname" id="mpname" />
|
||||
<input type="text" class="form-control" id="mpid" name="mpid" placeholder="单击选择" onclick="selectMPint();"
|
||||
value="${libraryProcessManage.mpid}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">控制逻辑</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="controlLogic" name="controlLogic" style="width: 170px;">
|
||||
<option value="${ControlLogic_H}">高于</option>
|
||||
<option value="${ControlLogic_L}">低于</option>
|
||||
<option value="${ControlLogic_I}">区间内</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="targetValueSt1" style="display: block;">
|
||||
<label class="col-sm-2 control-label">目标值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="targetValue" name="targetValue" placeholder="目标值"
|
||||
value="${libraryProcessManage.targetValue}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="targetValueSt2" class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="minValue" name="minValue" placeholder="最小值"
|
||||
value="${libraryProcessManage.minValue}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="maxValue" name="maxValue" placeholder="最大值"
|
||||
value="${libraryProcessManage.maxValue}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
118
src/main/webapp/jsp/process/libraryProcessManageDetailAdd.jsp
Normal file
118
src/main/webapp/jsp/process/libraryProcessManageDetailAdd.jsp
Normal file
@ -0,0 +1,118 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', { formId: "subFormDetail", hiddenId: "userId", textId: "userName", userIds: userIds }, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosaveDetail() {
|
||||
$("#subFormDetail").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormDetail").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessManageDetail/dosave.do", $("#subFormDetail").serialize(), function (data) {
|
||||
// $.post(ext.contextPath + "/process/libraryProcessManageDetail/dosave.do", {projectRole:'角色1'}, function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalDetail')
|
||||
$("#table_detail").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subFormDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
mpointcode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择测量点'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var selectMPint = function () {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', { formId: 'subFormDetail', hiddenId: 'measurePointId', textId: 'mpointname', codeId: 'mpointcode' }, function (data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalDetail">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">新增</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subFormDetail -->
|
||||
<form class="form-horizontal" id="subFormDetail" autocomplete="off">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${uuId2}">
|
||||
<input type="hidden" class="form-control" name="pid" value="${param.pid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="code" name="code" placeholder="指标名称"
|
||||
value="${libraryProcessManageDetail.code}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*取值方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="selectionMethod" name="selectionMethod" style="width: 170px;">
|
||||
<option value="" selected="selected">请选择</option>
|
||||
<option value="first">first</option>
|
||||
<option value="avg">avg</option>
|
||||
<option value="sum">sum</option>
|
||||
<option value="max">max</option>
|
||||
<option value="top">top</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="measurePointId" name="measurePointId"
|
||||
value="${libraryProcessManageDetail.measurePointId}">
|
||||
<input type="text" class="form-control" id="mpointcode" name="mpointcode" placeholder="测量点编号"
|
||||
value="${libraryProcessManageDetail.mPoint.mpointcode}" onclick="selectMPint()">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointname" name="mpointname" placeholder="测量点名称"
|
||||
value="${libraryProcessManageDetail.mPoint.parmname}" onclick="selectMPint()">
|
||||
</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="dosaveDetail()">保存</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
120
src/main/webapp/jsp/process/libraryProcessManageDetailEdit.jsp
Normal file
120
src/main/webapp/jsp/process/libraryProcessManageDetailEdit.jsp
Normal file
@ -0,0 +1,120 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
var showUser4SelectsFun = function () {
|
||||
var userIds = $("#solver").val();
|
||||
$.post(ext.contextPath + '/user/userForSelect.do', { formId: "subFormDetail", hiddenId: "userId", textId: "userName", userIds: userIds }, function (data) {
|
||||
$("#user4SelectDiv").html(data);
|
||||
openModal("user4SelectModal");
|
||||
});
|
||||
};
|
||||
|
||||
function dosaveDetail() {
|
||||
$("#subFormDetail").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subFormDetail").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessManageDetail/doupdate.do", $("#subFormDetail").serialize(), function (data) {
|
||||
// $.post(ext.contextPath + "/process/libraryProcessManageDetail/dosave.do", {projectRole:'角色1'}, function(data) {
|
||||
if (data.res == 1) {
|
||||
closeModal('subModalDetail')
|
||||
$("#table_detail").bootstrapTable('refresh');
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subFormDetail").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
mpointcode: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '请选择测量点'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var selectMPint = function () {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', { formId: 'subFormDetail', hiddenId: 'measurePointId', textId: 'mpointname', codeId: 'mpointcode' }, function (data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
$('#selectionMethod').select2({ minimumResultsForSearch: 10 }).val('${libraryProcessManageDetail.selectionMethod}').trigger('change');
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModalDetail">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">修改</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subFormDetail -->
|
||||
<form class="form-horizontal" id="subFormDetail" autocomplete="off">
|
||||
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" class="form-control" name="id" value="${libraryProcessManageDetail.id}">
|
||||
<input type="hidden" class="form-control" name="pid" value="${libraryProcessManageDetail.pid}">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="code" name="code" placeholder="指标名称"
|
||||
value="${libraryProcessManageDetail.code}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*取值方式</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="selectionMethod" name="selectionMethod" style="width: 170px;">
|
||||
<option value="" selected="selected">请选择</option>
|
||||
<option value="first">first</option>
|
||||
<option value="avg">avg</option>
|
||||
<option value="sum">sum</option>
|
||||
<option value="max">max</option>
|
||||
<option value="top">top</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*测量点编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" class="form-control" id="measurePointId" name="measurePointId"
|
||||
value="${libraryProcessManageDetail.measurePointId}">
|
||||
<input type="text" class="form-control" id="mpointcode" name="mpointcode" placeholder="测量点编号"
|
||||
value="${libraryProcessManageDetail.mPoint.mpointcode}" onclick="selectMPint()">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*测量点名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="mpointname" name="mpointname" placeholder="测量点名称"
|
||||
value="${libraryProcessManageDetail.mPoint.parmname}" onclick="selectMPint()">
|
||||
</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="dosaveDetail()">保存</button>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
164
src/main/webapp/jsp/process/libraryProcessManageDetailList.jsp
Normal file
164
src/main/webapp/jsp/process/libraryProcessManageDetailList.jsp
Normal file
@ -0,0 +1,164 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<script type="text/javascript">
|
||||
/*
|
||||
* 加载绩效附表
|
||||
*/
|
||||
function getDetailList(pid, unitId) {
|
||||
$("#table_detail").bootstrapTable({ // 对应table标签的id
|
||||
url: ext.contextPath + '/process/libraryProcessManageDetail/getList.do', // 获取表格数据的url
|
||||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||||
striped: true, //表格显示条纹,默认为false
|
||||
pagination: true, // 在表格底部显示分页组件,默认false
|
||||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||||
pageSize: 50, // 页面数据条数
|
||||
pageNumber: 1, // 首页页码
|
||||
sidePagination: 'server', // 设置为服务器端分页
|
||||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||||
return {
|
||||
rows: params.limit, // 每页要显示的数据条数
|
||||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||||
sort: params.sort, // 要排序的字段
|
||||
order: params.order,
|
||||
pid: pid,
|
||||
unitId: unitId
|
||||
}
|
||||
},
|
||||
sortName: 'id', // 要排序的字段
|
||||
sortOrder: 'desc', // 排序规则
|
||||
columns: [
|
||||
{
|
||||
checkbox: true, // 显示一个勾选框
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '指标名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.code;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '测量点编号', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '25%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.mPoint != null && row.mPoint != '') {
|
||||
return row.mPoint.mpointcode;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '测量点名称', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '25%',
|
||||
formatter: function (value, row, index) {
|
||||
if (row.mPoint != null && row.mPoint != '') {
|
||||
return row.mPoint.parmname;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
field: '', // 返回json数据中的name
|
||||
title: '取值方式', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle',
|
||||
width: '20%',
|
||||
formatter: function (value, row, index) {
|
||||
return row.selectionMethod;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
align: 'center',
|
||||
valign: 'middle',
|
||||
width: '10%', // 定义列的宽度,单位为像素px
|
||||
formatter: function (value, row, index) {
|
||||
var buts = '';
|
||||
buts += '<button class="btn btn-default btn-sm" onclick="doDetailEdit(\'' + row.id + '\',\'' + unitId + '\')" data-toggle="tooltip" title="编辑"><i class="fa fa-edit "></i><span class="hidden-md hidden-lg"> 编辑</span></button>';
|
||||
buts = '<div class = "btn-group">' + buts + '</div>';
|
||||
return buts;
|
||||
}
|
||||
}
|
||||
],
|
||||
onLoadSuccess: function () { //加载成功时执行
|
||||
adjustBootstrapTableView("table_detail");
|
||||
},
|
||||
onLoadError: function () { //加载失败时执行
|
||||
console.info("加载数据失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* 删除
|
||||
*/
|
||||
var deletesDetailFun = function () {
|
||||
var checkedItems = $("#table_detail").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
});
|
||||
if (datas == "") {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv2');
|
||||
} 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(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessManageDetail/dodeletes.do', { ids: datas }, function (data) {
|
||||
var datastr = eval('(' + data + ')');
|
||||
if (datastr.code == 1) {
|
||||
|
||||
//计算总工时及剩余工时
|
||||
// doCountWorkingHours();
|
||||
|
||||
$("#table_detail").bootstrapTable('refresh');
|
||||
} else {
|
||||
showAlert('d', '删除失败', 'mainAlertdiv2');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var doDetailAdd = function (pid) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessManageDetail/doadd.do', { pid: pid }, function (data) {
|
||||
$("#subDivDetail").html(data);
|
||||
openModal('subModalDetail');
|
||||
});
|
||||
}
|
||||
|
||||
var doDetailEdit = function (id, unitId) {
|
||||
$.post(ext.contextPath + '/process/libraryProcessManageDetail/doedit.do', { id: id, unitId: unitId }, function (data) {
|
||||
$("#subDivDetail").html(data);
|
||||
openModal('subModalDetail');
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
204
src/main/webapp/jsp/process/libraryProcessManageEdit.jsp
Normal file
204
src/main/webapp/jsp/process/libraryProcessManageEdit.jsp
Normal file
@ -0,0 +1,204 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@page import="com.sipai.entity.process.LibraryProcessManage" %>
|
||||
<% request.setAttribute("ControlLogic_H", LibraryProcessManage.ControlLogic_H); %>
|
||||
<% request.setAttribute("ControlLogic_L", LibraryProcessManage.ControlLogic_L); %>
|
||||
<% request.setAttribute("ControlLogic_I", LibraryProcessManage.ControlLogic_I); %>
|
||||
<% request.setAttribute("Cycle_Day", LibraryProcessManage.Cycle_Day); %>
|
||||
<% request.setAttribute("Cycle_Month", LibraryProcessManage.Cycle_Month); %>
|
||||
<style type="text/css">
|
||||
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function dosave() {
|
||||
$("#subForm").bootstrapValidator('validate');//提交验证
|
||||
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
||||
//获取验证结果,如果成功,执行下面代码
|
||||
$.post(ext.contextPath + "/process/libraryProcessManage/doupdate.do", $("#subForm").serialize(), function (data) {
|
||||
if (data.res == 1) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
closeModal("subModal");
|
||||
} else if (data.res == 0) {
|
||||
showAlert('d', '保存失败');
|
||||
} else {
|
||||
showAlert('d', data.res);
|
||||
}
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
$("#subForm").bootstrapValidator({
|
||||
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
||||
fields: {
|
||||
code: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标编号不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
name: {
|
||||
validators: {
|
||||
notEmpty: {
|
||||
message: '指标名称不能为空'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$('#controlLogic').select2({ minimumResultsForSearch: 10 }).val('${libraryProcessManage.controlLogic}').trigger('change');
|
||||
|
||||
// $('#month').datepicker({
|
||||
// language: 'zh-CN',
|
||||
// autoclose: true,
|
||||
// todayHighlight: true,
|
||||
// format: 'yyyy-mm',
|
||||
// }).on('hide', function (e) {
|
||||
// //当日期选择框关闭时,执行刷新校验
|
||||
// $('#subForm').data('bootstrapValidator')
|
||||
// .updateStatus('month', 'NOT_VALIDATED', null)
|
||||
// .validateField('month');
|
||||
// });
|
||||
|
||||
$(function (){
|
||||
$("#cycle").select2({minimumResultsForSearch: -1}).val("${libraryProcessManage.cycle}").trigger("change");
|
||||
$("#controlLogic").select2({minimumResultsForSearch: -1}).val("${libraryProcessManage.controlLogic}").trigger("change");
|
||||
$("#controlLogic").on("select2:select",function(){
|
||||
var data = $(this).val();
|
||||
if(data=='${ControlLogic_H}'||data=='${ControlLogic_L}'){
|
||||
$('#targetValueSt1').css('display','block');
|
||||
$('#targetValueSt2').css('display','none');
|
||||
}else if(data=='${ControlLogic_I}'){
|
||||
$('#targetValueSt1').css('display','none');
|
||||
$('#targetValueSt2').css('display','block');
|
||||
}
|
||||
});
|
||||
var controlLogicV= $("#controlLogic").val();
|
||||
if(controlLogicV=='${ControlLogic_H}'||controlLogicV=='${ControlLogic_L}'){
|
||||
$('#targetValueSt1').css('display','block');
|
||||
$('#targetValueSt2').css('display','none');
|
||||
}else if(controlLogicV=='${ControlLogic_I}'){
|
||||
$('#targetValueSt1').css('display','none');
|
||||
$('#targetValueSt2').css('display','block');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var selectMPint = function() {
|
||||
$.post(ext.contextPath + '/achievement/acceptanceModelMPoint/showlistForSelect.do', {formId:'subForm',hiddenId:'mpid',textId:'mpname'} , function(data) {
|
||||
$("#mpSubDiv").html(data);
|
||||
openModal('mpSubModal');
|
||||
});
|
||||
};
|
||||
|
||||
</script>
|
||||
<div class="modal fade" id="subModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">修改</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- 新增界面formid强制为subForm -->
|
||||
<form class="form-horizontal" id="subForm" autocomplete="off">
|
||||
<!-- 界面提醒div强制id为alertDiv -->
|
||||
<div id="alertDiv"></div>
|
||||
<input type="hidden" name="id" id="id" value="${libraryProcessManage.id}" />
|
||||
<input type="hidden" name="unitId" id="unitId" value="${libraryProcessManage.unitId}" />
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">*指标编号</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="code" name="code" placeholder="指标编号"
|
||||
value="${libraryProcessManage.code}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">*指标名称</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="name" name="name" placeholder="指标名称"
|
||||
value="${libraryProcessManage.name}">
|
||||
</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="area" name="area" placeholder="控制区"
|
||||
value="${libraryProcessManage.area}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">单位</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="unit" name="unit" placeholder="单位"
|
||||
value="${libraryProcessManage.unit}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">周期</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="cycle" name="cycle" style="width: 170px;">
|
||||
<option value="${Cycle_Day}">天</option>
|
||||
<option value="${Cycle_Month}">月</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">额定分值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" id="baseHours" name="baseHours" placeholder="额定工分"
|
||||
value="${libraryProcessManage.baseHours}" step="0.01">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">测量点</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="hidden" name="mpname" id="mpname" />
|
||||
<input type="text" class="form-control" id="mpid" name="mpid" placeholder="单击选择" onclick="selectMPint();"
|
||||
value="${libraryProcessManage.mpid}" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">控制逻辑</label>
|
||||
<div class="col-sm-4">
|
||||
<select class="form-control select2" id="controlLogic" name="controlLogic" style="width: 170px;">
|
||||
<option value="${ControlLogic_H}">高于</option>
|
||||
<option value="${ControlLogic_L}">低于</option>
|
||||
<option value="${ControlLogic_I}">区间内</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="targetValueSt1" style="display: block;">
|
||||
<label class="col-sm-2 control-label">目标值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="targetValue" name="targetValue" placeholder="目标值"
|
||||
value="${libraryProcessManage.targetValue}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="targetValueSt2" class="form-group" style="display: none;">
|
||||
<label class="col-sm-2 control-label">最小值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="minValue" name="minValue" placeholder="最小值"
|
||||
value="${libraryProcessManage.minValue}">
|
||||
</div>
|
||||
<label class="col-sm-2 control-label">最大值</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" id="maxValue" name="maxValue" placeholder="最大值"
|
||||
value="${libraryProcessManage.maxValue}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
|
||||
<button type="button" class="btn btn-primary" onclick="dosave()" id="btn_save">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user