From bb2a1d89e3cca461e0c5764204b71b1e9301f9b4 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Sun, 31 Jan 2021 19:18:13 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90user=E3=80=91=E7=BB=9F=E4=B8=80xm-sele?= =?UTF-8?q?ct=E4=B8=8B=E6=8B=89=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/assets/modular/system/user/user_add.js | 6 ++---- src/main/webapp/assets/modular/system/user/user_edit.js | 8 ++------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/assets/modular/system/user/user_add.js b/src/main/webapp/assets/modular/system/user/user_add.js index 98aa3ea0..4f3865cb 100644 --- a/src/main/webapp/assets/modular/system/user/user_add.js +++ b/src/main/webapp/assets/modular/system/user/user_add.js @@ -14,7 +14,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func el: '#organization', data: data.data, model: {label: {type: 'text'}}, - prop: {name: 'title', value: 'id'}, radio: true, layVerify: 'required', clickClose: true, @@ -34,8 +33,7 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func radio: true, layVerify: 'required', clickClose: true, - data: data.data, - prop: {name: 'positionName', value: 'positionId'}, + data: data.data }); }).start(); @@ -73,4 +71,4 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func request.set(data.field); request.start(true); }); -}); \ No newline at end of file +}); diff --git a/src/main/webapp/assets/modular/system/user/user_edit.js b/src/main/webapp/assets/modular/system/user/user_edit.js index 45653f2c..056d7a94 100644 --- a/src/main/webapp/assets/modular/system/user/user_edit.js +++ b/src/main/webapp/assets/modular/system/user/user_edit.js @@ -21,12 +21,10 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func clickClose: true, layVerify: 'required', data: data.data, - initValue: [result.data.positionId], - prop: {name: 'positionName', value: 'positionId'}, + initValue: [result.data.positionId] }); }).start(); - // 初始化组织树 new HttpRequest(Feng.ctxPath + "/hrOrganization/treeLayui", 'get', function (data) { organizationXmSel = xmSelect.render({ @@ -35,7 +33,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func initValue: [result.data.orgId], layVerify: 'required', model: {label: {type: 'text'}}, - prop: {name: 'title', value: 'id'}, radio: true, clickClose: true, tree: { @@ -47,7 +44,6 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func }); }).start(); - // 添加表单验证方法 form.verify({ psw: [/^[\S]{6,12}$/, '密码必须6到12位,且不能出现空格'], @@ -83,4 +79,4 @@ layui.use(['layer', 'form', 'admin', 'laydate', 'HttpRequest', 'xmSelect'], func }); -}); \ No newline at end of file +});