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