You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
232 lines
8.2 KiB
232 lines
8.2 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<%@ page language="java" pageEncoding="UTF-8" %>
|
|
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
|
<%@ include file="/common/ctx.jsp" %>
|
|
<html>
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
|
<title>用户系统配置</title> <!-- jQuery -->
|
|
<!-- jQuery -->
|
|
<script src="${ctx}/js/jquery-3.7.0.min.js"></script>
|
|
<script src="${ctx}/js/jquery.form.js"></script>
|
|
<!-- checkbox 单选多选美化 -->
|
|
<script src="${ctx}/hbcyjc/resourceNew/js/checkbox.js"></script>
|
|
<script type="text/javascript"> <!-- checkbox 单选多选美化 -->
|
|
$(function () {
|
|
$('input').customInput();
|
|
$('.toggle').each(function () {
|
|
$('div:first', this).addClass('first');
|
|
$('div:last', this).addClass('last');
|
|
});
|
|
});
|
|
</script>
|
|
<%--弹框--%>
|
|
<script src="${ctx}/js/layer/layer.js"></script>
|
|
<%--表单工具--%>
|
|
<script src="${ctx}/js/common/cjy_form.js"></script>
|
|
<script src="${ctx}/js/common/cjy_common.js"></script>
|
|
<%--json工具--%>
|
|
<script type="text/javascript" src="${ctx}/js/common/json_form.js"></script>
|
|
<!-- 字体图标 -->
|
|
<link href="${ctx}/assets/font-awesome/css/font-awesome.min.css" rel="stylesheet"/>
|
|
<link href="${ctx}/assets/ionicon/css/ionicons.min.css" rel="stylesheet"/>
|
|
<link href="${ctx}/css/material-design-iconic-font.min.css" rel="stylesheet">
|
|
<!-- 自定义样式 -->
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_style.css" rel="stylesheet"/>
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_style2.css" rel="stylesheet"/>
|
|
<link href="${ctx}/hbcyjc/resourceNew/css/cjy_zlmxg.css" rel="stylesheet"/>
|
|
|
|
|
|
</head>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
//取消
|
|
function my_cancel() {
|
|
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
|
parent.layer.close(index) //关闭弹出框
|
|
}
|
|
|
|
|
|
//提示
|
|
function mytip(text) {
|
|
layer.open({
|
|
type : 1,
|
|
content : '<div style="padding: 20px 100px;">' + text + '</div>',
|
|
btn : '确定',
|
|
shade: [0.7, '#333'],
|
|
btnAlign : 'c', //按钮居中
|
|
yes : function() {
|
|
parent.layer.closeAll(); //疯狂模式,关闭所有层
|
|
},
|
|
success: function (index, layero) {
|
|
$(':focus').blur();//让按钮失去焦点
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
function isEmpty(text) {
|
|
if (text != null && text != "null" && text != "" && text != "undefined" && text!=undefined) {
|
|
return false;
|
|
} else {
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
$(function(){
|
|
huixianuserxtqx();
|
|
})
|
|
|
|
//显示该用户系统权限
|
|
//可见系统选项中显示所有的系统内容(选中的系统为所有可操作的系统)
|
|
//可操作系统只显示自己可见的系统(选中的为自己可操作的系统)
|
|
function huixianuserxtqx(){
|
|
var xtcdzh = ${list}; //所有的菜单
|
|
var userxtcd = ${hxlist}; //该用户拥有的系统菜单--1启用(可登录操作)--0停用(灰色,只可看不可操作)
|
|
var userid = "${userid}"; //该人员id
|
|
var kjxthtml = ""; //可见系统html
|
|
var kczxthtml = ""; // 可操作
|
|
|
|
// var xtcdzhjson = eval('(' + xtcdzh + ')');
|
|
for(var i = 0;i < xtcdzh.length;i++){
|
|
var id = xtcdzh[i].id;
|
|
var sysname = xtcdzh[i].sysnameexplain;
|
|
kjxthtml +=
|
|
"<div class='checkbox '>"+
|
|
"<input type='checkbox' onclick=\"kjxtdj('"+id+"','"+sysname+"')\" id='kj"+id+"' name='kjname' value='"+id+"'/><label for='kj"+id+"'>"+sysname+"</label>"+
|
|
"</div>";
|
|
}
|
|
$("#userkjxtid").html(kjxthtml);
|
|
|
|
for(var i = 0;i < userxtcd.length;i++){
|
|
var id = userxtcd[i].id;
|
|
var sysname = userxtcd[i].sysnameexplain;
|
|
var ynenable = userxtcd[i].ynenable;
|
|
//var sysxsid = userxtcd[i].sysxsid; //可显示的系统id
|
|
if(ynenable == "1"){ //选中
|
|
kczxthtml +=
|
|
"<div class='checkbox '>"+
|
|
"<input type='checkbox' checked=\"checked\" id='kcz"+id+"' name='kczname' value='"+id+"'/><label for='kcz"+id+"'>"+sysname+"</label>"+
|
|
"</div>";
|
|
$("#kj"+id).attr("checked","true"); //设置可操作系统拥有的,可见系统都选中
|
|
}else{ //不选中
|
|
kczxthtml +=
|
|
"<div class='checkbox '>"+
|
|
"<input type='checkbox' id='kcz"+id+"' name='kczname' value='"+id+"'/><label for='kcz"+id+"'>"+sysname+"</label>"+
|
|
"</div>";
|
|
$("#kj"+id).attr("checked","true"); //设置可操作系统拥有的,可见系统都选中
|
|
}
|
|
}
|
|
|
|
$("#userkczxtid").html(kczxthtml);
|
|
dxdxxr();
|
|
}
|
|
|
|
|
|
//可见系统点击
|
|
function kjxtdj(id,value){
|
|
// alert(id);
|
|
// alert(value);
|
|
if ($('#kj'+id).is(':checked')) { //如果是选中,给可操作系统增加一个多选,如果是取消选中,删除下方可操作系统的对用多选框
|
|
var idfjhtml =
|
|
"<div class='checkbox '>"+
|
|
"<input type='checkbox' id='kcz"+id+"' name='kczname' value='"+id+"'/><label for='kcz"+id+"'>"+value+"</label>"+
|
|
"</div>";
|
|
$("#userkczxtid").append(idfjhtml);
|
|
}else{
|
|
$("#kcz"+id).parent().remove();
|
|
}
|
|
|
|
dxdxxr();//渲染
|
|
}
|
|
|
|
/**
|
|
* 保存用户系统汇聚信息
|
|
*/
|
|
function my_Verification(){
|
|
var obj = document.getElementsByName("kczname");
|
|
// var check_val = []; //选中的多选框值
|
|
// var check_nal = []; // 未选中的多选框值
|
|
var xzdata = ""; //选中的多选框值
|
|
var wxzdata = ""; // 未选中的多选框值
|
|
for(k in obj){
|
|
if(obj[k].checked){
|
|
// check_val.push(obj[k].value);
|
|
xzdata += obj[k].value+",";
|
|
}else{
|
|
// check_nal.push(obj[k].value);
|
|
wxzdata += obj[k].value+",";
|
|
}
|
|
}
|
|
|
|
var userid = '${userid}';
|
|
var subdata = "{\"xzdata\":\""+xzdata+"\",\"wxzdata\":\""+wxzdata+"\",\"userid\":\""+userid+"\"}";
|
|
|
|
$.ajax({
|
|
type: 'POST',
|
|
url: "${ctx}/syssystemfunctioncontroller/saveuserxtdata.do",
|
|
dataType: 'json',
|
|
async: false,
|
|
data: 'subdata=' + subdata,
|
|
success: function (data) {
|
|
var state = data.state;
|
|
mytip(state);//提示
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//单选多选渲染
|
|
function dxdxxr(){
|
|
$('input').customInput();
|
|
$('.toggle').each(function () {
|
|
$('div:first', this).addClass('first');
|
|
$('div:last', this).addClass('last');
|
|
});
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="xingk_nr"></div>
|
|
<div class="header_top">
|
|
<p class="header_xtbt">用户系统配置</p>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<form class="form_meren" method="post" action="${ctx}/syssystemfunctioncontroller/savesyssystem.do" name="userForm" id="userForm">
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label class="form_label " >可见系统:</label>
|
|
<div class="form_dynr " id = "userkjxtid">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form_hang form_hang_tongh">
|
|
<label class="form_label " >可操作系统:</label>
|
|
<div class="form_dynr " id = "userkczxtid">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="clear"></div>
|
|
<p class="form-btncz">
|
|
<button class="bttn bttn_bc" type="button" onclick="my_Verification()"><i class="fa fa-save"></i>保存</button>
|
|
<button class="bttn" type="button" onclick="my_cancel()"><i class="fa fa-reply"></i>取消</button>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
</body>
|
|
</html> |