Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/process/dataVisualRadarChartSeriesEdit.jsp

168 lines
7.6 KiB
Plaintext
Raw Normal View History

2026-01-16 14:13:44 +08:00
<%@ 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">&times;</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>