139 lines
6.3 KiB
Plaintext
139 lines
6.3 KiB
Plaintext
|
|
<%@ 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>
|