|
|
|
@ -6,7 +6,8 @@
|
|
|
|
|
<title>编辑菜单</title>
|
|
|
|
|
<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">
|
|
|
|
|
<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="../../static/css/font.css">
|
|
|
|
|
<link rel="stylesheet" href="../../static/css/weadmin.css">
|
|
|
|
|
<link rel="stylesheet" href="../../lib/layui/css/layui.css">
|
|
|
|
@ -19,6 +20,7 @@
|
|
|
|
|
.layui-form-label {
|
|
|
|
|
width: 90px !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
input[type='text'] {
|
|
|
|
|
width: 320px !important;
|
|
|
|
|
}
|
|
|
|
@ -33,7 +35,8 @@
|
|
|
|
|
<span class="we-red">*</span>菜单名称:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-inline ">
|
|
|
|
|
<input type="text" id="name" name="name" lay-verify="required|contentLength" max="64" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" id="name" name="name" lay-verify="required|contentLength" max="64"
|
|
|
|
|
autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
@ -41,7 +44,27 @@
|
|
|
|
|
<span class="we-red">*</span>url地址:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-inline ">
|
|
|
|
|
<input type="text" id="url" name="url" lay-verify="required|contentLength" max="128" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" id="url" name="url" lay-verify="required|contentLength" max="128"
|
|
|
|
|
autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label for="name" class="layui-form-label">
|
|
|
|
|
<span class="we-red">*</span>图标:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-inline" style="display: flex;width: 300px;align-items: center;">
|
|
|
|
|
<input type="text" id="icon" name="icon" lay-verify="required" disabled autocomplete="off"
|
|
|
|
|
class="layui-input">
|
|
|
|
|
<div style="width: 50px;text-align: right;color: #1e9fff;cursor: pointer;" id="selectIcon">选择</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label for="name" class="layui-form-label">
|
|
|
|
|
<span class="we-red">*</span>是否全屏:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-inline" style="display: flex;width: 300px;align-items: center;">
|
|
|
|
|
<input type="checkbox" name="isfull" id="isfull" lay-skin="switch" lay-filter="switchTest"
|
|
|
|
|
lay-text="是|否">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
@ -49,7 +72,8 @@
|
|
|
|
|
<span class="we-red">*</span>排序号:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-inline ">
|
|
|
|
|
<input type="text" id="sort_id" name="sort_id" lay-verify="required|number" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" id="sort_id" name="sort_id" lay-verify="required|number" autocomplete="off"
|
|
|
|
|
class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
@ -57,7 +81,8 @@
|
|
|
|
|
<span class="we-red">*</span>描述信息:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-inline ">
|
|
|
|
|
<input type="text" id="memo" name="memo" lay-verify="required|contentLength" max="64" autocomplete="off" class="layui-input">
|
|
|
|
|
<input type="text" id="memo" name="memo" lay-verify="required|contentLength" max="64"
|
|
|
|
|
autocomplete="off" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
@ -65,11 +90,16 @@
|
|
|
|
|
<span class="we-red">*</span>可用身份:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-item" style="width: 70%;float: left;padding-top:8px;margin-left: -10px">
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk" title="超级管理员" value="1"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk" title="市级管理员" value="2"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk" title="县区管理员" value="3"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk" title="单位管理员" lay-filter="chk" value="4"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk" title="普通教师" value="5"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk"
|
|
|
|
|
title="超级管理员" value="1"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk"
|
|
|
|
|
title="市级管理员" value="2"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk"
|
|
|
|
|
title="县区管理员" value="3"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk"
|
|
|
|
|
title="单位管理员" lay-filter="chk" value="4"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" name="chk"
|
|
|
|
|
title="普通教师" value="5"></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item" id="school" style="display: none">
|
|
|
|
@ -77,8 +107,10 @@
|
|
|
|
|
<span class="we-red">*</span>学校管理员:
|
|
|
|
|
</label>
|
|
|
|
|
<div class="layui-input-item" style="width: 70%;float: left;padding-top:8px;margin-left: -10px">
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" lay-filter="school" name="school" title="学校管理员" ></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox" lay-filter="bureau" name="bureau" title="非学校管理员"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox"
|
|
|
|
|
lay-filter="school" name="school" title="学校管理员"></span>
|
|
|
|
|
<span style="display: inline-block;margin:0 10px 8px 10px"><input type="checkbox"
|
|
|
|
|
lay-filter="bureau" name="bureau" title="非学校管理员"></span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
@ -102,6 +134,7 @@
|
|
|
|
|
var for_school = "";//学校管理员
|
|
|
|
|
var for_bureau = "";//非学校管理员
|
|
|
|
|
var id;
|
|
|
|
|
var isfullFlag = 0;
|
|
|
|
|
$(function () {
|
|
|
|
|
id = GetQueryString("id");
|
|
|
|
|
selectSingle();
|
|
|
|
@ -119,8 +152,11 @@
|
|
|
|
|
name: lis1.menu_name,
|
|
|
|
|
memo: lis1.memo,
|
|
|
|
|
sort_id: lis1.sort_id,
|
|
|
|
|
url:lis1.url
|
|
|
|
|
url: lis1.url,
|
|
|
|
|
icon: lis1.icon,
|
|
|
|
|
isfull: lis1.isFull == 1 ? true : false
|
|
|
|
|
});
|
|
|
|
|
isfullFlag = lis1.isFull;
|
|
|
|
|
for_bureau = lis1.for_bureau;
|
|
|
|
|
for_school = lis1.for_school;
|
|
|
|
|
for (var i = 0; i < data.identity_info.length; i++) {
|
|
|
|
@ -185,7 +221,7 @@
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(f);
|
|
|
|
|
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: '/dsBase/menu/UpdateMenu',
|
|
|
|
|
type: "POST",
|
|
|
|
@ -198,7 +234,9 @@
|
|
|
|
|
memo: f.memo,
|
|
|
|
|
identity_ids: f.chk,
|
|
|
|
|
for_school: for_school,
|
|
|
|
|
for_bureau:for_bureau
|
|
|
|
|
for_bureau: for_bureau,
|
|
|
|
|
icon: $("#icon").val(),
|
|
|
|
|
isFull: isfullFlag
|
|
|
|
|
},
|
|
|
|
|
success: function (data) {
|
|
|
|
|
if (data.success) {
|
|
|
|
@ -216,6 +254,31 @@
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
window.setIconName = function (iconName) {
|
|
|
|
|
$("#icon").val(iconName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$("#selectIcon").click(function () {
|
|
|
|
|
layer.open({
|
|
|
|
|
type: 2,
|
|
|
|
|
area: ['500px', '450px'],
|
|
|
|
|
fix: false, //不固定
|
|
|
|
|
maxmin: true,
|
|
|
|
|
shadeClose: false,
|
|
|
|
|
shade: 0.4,
|
|
|
|
|
title: '选择图标',
|
|
|
|
|
content: './icons.html'
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
form.on('switch(switchTest)', function (data) {
|
|
|
|
|
if (this.checked) {
|
|
|
|
|
isfullFlag = 1;
|
|
|
|
|
} else {
|
|
|
|
|
isfullFlag = 0;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|