first commit
This commit is contained in:
409
WebRoot/jsp/process/dataVisualBarChartSeriesEdit.jsp
Normal file
409
WebRoot/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>
|
||||
Reference in New Issue
Block a user