278 lines
13 KiB
Plaintext
278 lines
13 KiB
Plaintext
<%@ 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> |