164 lines
7.2 KiB
Plaintext
164 lines
7.2 KiB
Plaintext
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|||
|
|
<%@page import="com.sipai.entity.process.DataVisualFrame" %>
|
|||
|
|
<%request.setAttribute("Type_structure", DataVisualFrame.Type_structure); %>
|
|||
|
|
<%request.setAttribute("Type_frame", DataVisualFrame.Type_frame); %>
|
|||
|
|
<%request.setAttribute("Active_0", DataVisualFrame.Active_0); %>
|
|||
|
|
<%request.setAttribute("Active_1", DataVisualFrame.Active_1); %>
|
|||
|
|
|
|||
|
|
<style type="text/css">
|
|||
|
|
|
|||
|
|
</style>
|
|||
|
|
<script type="text/javascript">
|
|||
|
|
function dosave() {
|
|||
|
|
$("#subForm").bootstrapValidator('validate');//提交验证
|
|||
|
|
if ($("#subForm").data('bootstrapValidator').isValid()) {
|
|||
|
|
//获取验证结果,如果成功,执行下面代码
|
|||
|
|
$.post(ext.contextPath + "/process/dataVisualFrame/doFrameSave.do", $("#subForm").serialize(), function (data) {
|
|||
|
|
if (data.code == 1) {
|
|||
|
|
initTreeView();
|
|||
|
|
} else if (data.code == 0) {
|
|||
|
|
showAlert('d', data.msg);
|
|||
|
|
} else {
|
|||
|
|
showAlert('d', data.code);
|
|||
|
|
}
|
|||
|
|
}, 'json');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
$("#subForm").bootstrapValidator({
|
|||
|
|
live: 'disabled',//验证时机,enabled是内容有变化就验证(默认),disabled和submitted是提交再验证
|
|||
|
|
fields: {
|
|||
|
|
name: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '名称不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
morder: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '排序不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
},
|
|||
|
|
code: {
|
|||
|
|
validators: {
|
|||
|
|
notEmpty: {
|
|||
|
|
message: '编码不能为空'
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
var showUser4SelectsFun = function() {
|
|||
|
|
var userIds= $("#rolepeople").val();
|
|||
|
|
$.post(ext.contextPath + '/user/userForSelectByStructure.do', {formId:"subForm",hiddenId:"rolepeople",textId:"rolepeopleName",userIds:userIds} , function(data) {
|
|||
|
|
$("#user4SelectDiv").html(data);
|
|||
|
|
openModal("user4SelectModal");
|
|||
|
|
});
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
function typechange(is) {
|
|||
|
|
var st = is.value;
|
|||
|
|
if (st == '${Type_frame}') {
|
|||
|
|
$("#frameSt").css('display', 'block');
|
|||
|
|
} else if (st == '${Type_structure}') {
|
|||
|
|
$("#frameSt").css('display', 'none');
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
</script>
|
|||
|
|
<div class="box box-primary">
|
|||
|
|
<div class="box-header with-border">
|
|||
|
|
<h3 class="box-title">新增</h3>
|
|||
|
|
|
|||
|
|
<div class="box-tools pull-right">
|
|||
|
|
<a onclick="dosave()" class="btn btn-box-tool" data-toggle="tooltip" title="保存"><i
|
|||
|
|
class="glyphicon glyphicon-floppy-disk"></i></a>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<!-- /.box-header -->
|
|||
|
|
<div class="box-body ">
|
|||
|
|
<form class="form-horizontal" id="subForm" autocomplete="off">
|
|||
|
|
<!-- 界面提醒div强制id为alertDiv -->
|
|||
|
|
<div id="alertDiv"></div>
|
|||
|
|
<input type="hidden" name="unitid" id="unitid" value="${param.unitId}"/>
|
|||
|
|
<input type="hidden" name="pid" id="pid" value="${param.pid}"/>
|
|||
|
|
<input type="hidden" name="menutype" id="menutype" value="${param.menuType}"/>
|
|||
|
|
|
|||
|
|
<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="${dataVisualFrame.name}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">类型</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select id="type" name="type" class="form-control select2" onchange="typechange(this);">
|
|||
|
|
<option value="${Type_structure}">结构</option>
|
|||
|
|
<option value="${Type_frame}">画面</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">启用</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<select id="active" name="active" class="form-control select2">
|
|||
|
|
<option value="${Active_1}">启用</option>
|
|||
|
|
<option value="${Active_0}">禁用</option>
|
|||
|
|
</select>
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">顺序</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="number" class="form-control" id="morder" name="morder" placeholder="顺序"
|
|||
|
|
value="${dataVisualFrame.morder}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div id="frameSt" style="display: none;">
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">宽度</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="width" name="width" placeholder="宽度"
|
|||
|
|
value="${dataVisualFrame.width}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">高度</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="height" name="height" placeholder="高度"
|
|||
|
|
value="${dataVisualFrame.height}">
|
|||
|
|
</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="background" name="background" placeholder="背景色"
|
|||
|
|
value="${dataVisualFrame.background}">
|
|||
|
|
</div>
|
|||
|
|
<label class="col-sm-2 control-label">编码</label>
|
|||
|
|
<div class="col-sm-4">
|
|||
|
|
<input type="text" class="form-control" id="code" name="code" placeholder="编码"
|
|||
|
|
value="${dataVisualFrame.code}">
|
|||
|
|
</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="style" name="style" placeholder="样式"
|
|||
|
|
value="${dataVisualFrame.style}">
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
<div class="form-group">
|
|||
|
|
<label class="col-sm-2 control-label">查看人员</label>
|
|||
|
|
<div class="col-sm-10">
|
|||
|
|
<textarea type="text" style="height: 80px;" class="form-control" id="rolepeopleName"
|
|||
|
|
name="rolepeopleName" placeholder="查看人员" onclick="showUser4SelectsFun();"
|
|||
|
|
readonly>${dataVisualFrame.rolepeopleName}</textarea>
|
|||
|
|
<input id="rolepeople" name="rolepeople" type="hidden"
|
|||
|
|
value="${dataVisualFrame.rolepeople}"/>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</div>
|
|||
|
|
</form>
|
|||
|
|
</div>
|
|||
|
|
</div>
|