表单布局 属性页面

This commit is contained in:
ly19960718 2021-08-02 11:21:53 +08:00
parent 8861bd04ff
commit 128854f6af
2 changed files with 184 additions and 0 deletions

View File

@ -0,0 +1,105 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<form class="layui-form layui-form-pane" lay-filter="dateForm">
<div class="layui-form-item" style="text-align: center;width:100% !important;font-size: 17px">
<b>附加配置</b>
</div>
<div class="layui-form-item">
<label class="layui-form-label">日期类型<span style="color: red">*</span></label>
<div class="layui-input-block">
<select id="dateType" name="dateType">
<option value="">请选择日期类型</option>
<option value="year">年选择器</option>
<option value="month">年月选择器</option>
<option value="date">日期选择器</option>
<option value="time">时间选择器</option>
<option value="datetime">日期时间选择器</option>
</select>
</div>
</div>
<div class="layui-form-item" pane>
<label class="layui-form-label">范围选择<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="checkbox" id="range" name="range" lay-filter="range" lay-skin="switch" lay-text="开启|关闭">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">日期格式<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="text" id="format" name="format" class="layui-input" value="yyyy-MM-dd HH:mm:ss" placeholder="请输入日期格式" maxlength="500">
</div>
</div>
</form>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl', 'table'], function(){
var $ = layui.$;
var form = layui.form;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var laydate = layui.laydate;
var id = top.restAjax.params(window.location.href).id;
form.on('switch(range)', function(obj){
var value = obj.elem.checked
console.log(value)
});
//alert(window.parent.aa)
$('.attr').change(function () {
window.parent.setData("2",$(this).attr('name'),this.value);
})
// 初始化内容
function initData() {
}
initData();
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,79 @@
<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<base th:href="${#request.getContextPath() + '/'}">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<form class="layui-form layui-form-pane" lay-filter="inputForm">
<div class="layui-form-item" style="text-align: center;width:100% !important;font-size: 17px">
<b>附加配置</b>
</div>
<div class="layui-form-item" >
<label class="layui-form-label">最大上传数<span style="color: red">*</span></label>
<div class="layui-input-block">
<input type="number" id="fileMaxNum" name="fileMaxNum" class="layui-input" value="" placeholder="请输入最大上传数" maxlength="10">
</div>
</div>
</form>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl', 'table'], function(){
var $ = layui.$;
var form = layui.form;
var $win = $(window);
var laytpl = layui.laytpl;
var table = layui.table;
var laydate = layui.laydate;
var id = top.restAjax.params(window.location.href).id;
//alert(window.parent.aa)
$('#fileMaxNum').bind('input', function(e) {
var value = $(this).val();
window.parent.setMapCustomData(id,'fileMaxNum',value);
});
// 初始化内容
function initData() {
var custom = window.parent.getMapCustomData(id);
var fileMaxNum = custom.fileMaxNum;
if(typeof(fileMaxNum) != "undefined" || fileMaxNum != null || fileMaxNum != ''){
$("#fileMaxNum").val(fileMaxNum)
}
}
initData();
// 校验
form.verify({
});
});
</script>
</body>
</html>