188 lines
9.0 KiB
Plaintext
188 lines
9.0 KiB
Plaintext
|
|
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||
|
|
<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 () {
|
||
|
|
$('#rowStylecolorContainer1').colorpicker({format: null});
|
||
|
|
$('#rowStylecolorContainer2').colorpicker({format: null});
|
||
|
|
});
|
||
|
|
|
||
|
|
function doFormShowStyleSave() {
|
||
|
|
$("#dataVisualFormShowStyleForm").bootstrapValidator('validate');//提交验证
|
||
|
|
if ($("#dataVisualFormShowStyleForm").data('bootstrapValidator').isValid()) {//获取验证结果,如果成功,执行下面代码
|
||
|
|
let form = $("#dataVisualFormShowStyleForm").serialize();
|
||
|
|
$.post(ext.contextPath + "/process/dataVisualFormShowStyle/doupdate.do", form, function (data) {
|
||
|
|
if (data.code == 1) {
|
||
|
|
$("#formRowStyleTable").bootstrapTable('refresh');
|
||
|
|
closeModal('formShowStyleSubModal');
|
||
|
|
} else if (data.code == 0) {
|
||
|
|
showAlert('d', '保存失败');
|
||
|
|
} else {
|
||
|
|
showAlert('d', data.res);
|
||
|
|
}
|
||
|
|
}, 'json');
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function doFormShowStyleDel() {
|
||
|
|
swal({
|
||
|
|
text: "您确定要删除此记录?",
|
||
|
|
dangerMode: true,
|
||
|
|
buttons: {
|
||
|
|
cancel: {
|
||
|
|
text: "取消",
|
||
|
|
value: null,
|
||
|
|
visible: true,
|
||
|
|
className: "btn btn-default btn-sm",
|
||
|
|
closeModal: true,
|
||
|
|
},
|
||
|
|
confirm: {
|
||
|
|
text: "确定",
|
||
|
|
value: true,
|
||
|
|
visible: true,
|
||
|
|
className: "btn btn-danger btn-sm",
|
||
|
|
closeModal: true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
})
|
||
|
|
.then(function (willDelete) {
|
||
|
|
if (willDelete) {
|
||
|
|
$.post(ext.contextPath + '/process/dataVisualFormShowStyle/dodelete.do', {
|
||
|
|
id: '${dataVisualFormShowStyle.id}'
|
||
|
|
}, function (data) {
|
||
|
|
var datajson = JSON.parse(data);
|
||
|
|
if (datajson.code == 1) {
|
||
|
|
$("#formRowStyleTable").bootstrapTable('refresh');
|
||
|
|
closeModal('formShowStyleSubModal');
|
||
|
|
} else {
|
||
|
|
showAlert('d', '删除失败', 'mainAlertdiv');
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
<div class="modal fade" id="formShowStyleSubModal">
|
||
|
|
<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 class="modal-body">
|
||
|
|
<!-- 新增界面formid强制为subForm -->
|
||
|
|
<form class="form-horizontal" id="dataVisualFormShowStyleForm" autocomplete="off">
|
||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
||
|
|
<div id="alertDiv"></div>
|
||
|
|
<input type="hidden" name="id" id="id" value="${dataVisualFormShowStyle.id}"/>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">变化范围</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<select id="showst" name="showst" class="form-control select2">
|
||
|
|
<option value="0"
|
||
|
|
<c:if test="${dataVisualFormShowStyle.showst=='0'}">selected</c:if> >单元格
|
||
|
|
</option>
|
||
|
|
<option value="1"
|
||
|
|
<c:if test="${dataVisualFormShowStyle.showst=='1'}">selected</c:if> >行
|
||
|
|
</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">比较方式</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<select id="ckmethod" name="ckmethod" class="form-control select2">
|
||
|
|
<option value=">"
|
||
|
|
<c:if test="${dataVisualFormShowStyle.ckmethod=='>'}">selected</c:if> >>
|
||
|
|
</option>
|
||
|
|
<option value=">="
|
||
|
|
<c:if test="${dataVisualFormShowStyle.ckmethod=='>='}">selected</c:if> >>=
|
||
|
|
</option>
|
||
|
|
<option value="="
|
||
|
|
<c:if test="${dataVisualFormShowStyle.ckmethod=='='}">selected</c:if> >=
|
||
|
|
</option>
|
||
|
|
<option value="<="
|
||
|
|
<c:if test="${dataVisualFormShowStyle.ckmethod=='<='}">selected</c:if> ><=
|
||
|
|
</option>
|
||
|
|
<option value="<"
|
||
|
|
<c:if test="${dataVisualFormShowStyle.ckmethod=='<'}">selected</c:if> ><
|
||
|
|
</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
<label class="col-sm-2 control-label">比较值</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<input type="text" class="form-control" id="ckcontent" name="ckcontent" placeholder="比较内容"
|
||
|
|
value="${dataVisualFormShowStyle.ckcontent}">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="form-group">
|
||
|
|
<label class="col-sm-2 control-label">背景色</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<div class="input-group" id="rowStylecolorContainer2">
|
||
|
|
<input name="background" id="background" type="text" class="form-control"
|
||
|
|
placeholder="背景颜色"
|
||
|
|
value="${dataVisualFormShowStyle.background}">
|
||
|
|
<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="fontsize" name="fontsize"
|
||
|
|
placeholder="文字大小"
|
||
|
|
value="${dataVisualFormShowStyle.fontsize}">
|
||
|
|
</div>
|
||
|
|
<label class="col-sm-2 control-label">文字颜色</label>
|
||
|
|
<div class="col-sm-4">
|
||
|
|
<div class="input-group" id="rowStylecolorContainer1">
|
||
|
|
<input name="fontcolor" id="fontcolor" type="text" class="form-control"
|
||
|
|
placeholder="背景颜色"
|
||
|
|
value="${dataVisualFormShowStyle.fontcolor}">
|
||
|
|
<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="fontweight" name="fontweight"
|
||
|
|
placeholder="文字粗细"
|
||
|
|
value="${dataVisualFormShowStyle.fontweight}">
|
||
|
|
</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" onclick="doFormShowStyleDel();">删除</button>
|
||
|
|
<button type="button" class="btn btn-primary" onclick="doFormShowStyleSave()">保存</button>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-content -->
|
||
|
|
</div>
|
||
|
|
<!-- /.modal-dialog -->
|
||
|
|
</div>
|