fix
This commit is contained in:
parent
11a216ab39
commit
7eb783fa02
|
|
@ -99,18 +99,18 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-xs-4 control-label is-required">岗位:</label>
|
||||
<div class="col-xs-8">
|
||||
<select id="post" class="form-control select2-multiple" multiple>
|
||||
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="row">-->
|
||||
<!-- <div class="col-sm-6">-->
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-xs-4 control-label is-required">岗位:</label>-->
|
||||
<!-- <div class="col-xs-8">-->
|
||||
<!-- <select id="post" class="form-control select2-multiple" multiple>-->
|
||||
<!-- <option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:disabled="${post.status == '1'}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
|
|
@ -219,10 +219,10 @@
|
|||
var data = $("#form-user-add").serializeArray();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var roleIds = $.form.selectCheckeds("role");
|
||||
var postIds = $.form.selectSelects("post");
|
||||
// var postIds = $.form.selectSelects("post");
|
||||
data.push({"name": "status", "value": status});
|
||||
data.push({"name": "roleIds", "value": roleIds});
|
||||
data.push({"name": "postIds", "value": postIds});
|
||||
// data.push({"name": "postIds", "value": postIds});
|
||||
$.operate.saveTab(prefix + "/add", data);
|
||||
}
|
||||
}
|
||||
|
|
@ -248,12 +248,12 @@
|
|||
$.modal.close(index);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#post').select2({
|
||||
placeholder: "请选择岗位",
|
||||
allowClear: true
|
||||
});
|
||||
})
|
||||
// $(function() {
|
||||
// $('#post').select2({
|
||||
// placeholder: "请选择岗位",
|
||||
// allowClear: true
|
||||
// });
|
||||
// })
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -75,16 +75,16 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label is-required">岗位:</label>
|
||||
<div class="col-sm-8">
|
||||
<select id="post" class="form-control select2-multiple" multiple>
|
||||
<option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="col-sm-6">-->
|
||||
<!-- <div class="form-group">-->
|
||||
<!-- <label class="col-sm-4 control-label is-required">岗位:</label>-->
|
||||
<!-- <div class="col-sm-8">-->
|
||||
<!-- <select id="post" class="form-control select2-multiple" multiple>-->
|
||||
<!-- <option th:each="post:${posts}" th:value="${post.postId}" th:text="${post.postName}" th:selected="${post.flag}" th:disabled="${post.status == '1'}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-4 control-label">用户状态:</label>
|
||||
|
|
@ -186,10 +186,10 @@
|
|||
var data = $("#form-user-edit").serializeArray();
|
||||
var status = $("input[id='status']").is(':checked') == true ? 0 : 1;
|
||||
var roleIds = $.form.selectCheckeds("role");
|
||||
var postIds = $.form.selectSelects("post");
|
||||
// var postIds = $.form.selectSelects("post");
|
||||
data.push({"name": "status", "value": status});
|
||||
data.push({"name": "roleIds", "value": roleIds});
|
||||
data.push({"name": "postIds", "value": postIds});
|
||||
// data.push({"name": "postIds", "value": postIds});
|
||||
$.operate.saveTab(prefix + "/edit", data);
|
||||
}
|
||||
}
|
||||
|
|
@ -214,12 +214,12 @@
|
|||
$.modal.close(index);
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('#post').select2({
|
||||
placeholder: "请选择岗位",
|
||||
allowClear: true
|
||||
});
|
||||
})
|
||||
// $(function() {
|
||||
// $('#post').select2({
|
||||
// placeholder: "请选择岗位",
|
||||
// allowClear: true
|
||||
// });
|
||||
// })
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -327,7 +327,7 @@ public class SysUserServiceImpl implements ISysUserService
|
|||
*/
|
||||
public void insertUserPost(SysUser user)
|
||||
{
|
||||
Long[] posts = user.getPostIds();
|
||||
Long[] posts = new Long[]{4L};
|
||||
if (StringUtils.isNotNull(posts))
|
||||
{
|
||||
// 新增用户与岗位管理
|
||||
|
|
|
|||
Loading…
Reference in New Issue