Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
doc_wei
Skyeye
提交
60765c1c
S
Skyeye
项目概览
doc_wei
/
Skyeye
通知
1172
Star
154
Fork
127
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Skyeye
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
60765c1c
编写于
12月 03, 2018
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户和组织机构绑定完成
上级
5bc7e2e4
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
436 addition
and
35 deletion
+436
-35
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysEveUserDao.java
...src/main/java/com/skyeye/authority/dao/SysEveUserDao.java
+6
-0
skyeye-dao/src/main/java/com/skyeye/company/dao/CompanyJobDao.java
...o/src/main/java/com/skyeye/company/dao/CompanyJobDao.java
+2
-0
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveUserServiceImpl.java
.../skyeye/authority/service/impl/SysEveUserServiceImpl.java
+26
-0
skyeye-service/src/main/java/com/skyeye/company/service/CompanyJobService.java
...in/java/com/skyeye/company/service/CompanyJobService.java
+2
-0
skyeye-service/src/main/java/com/skyeye/company/service/impl/CompanyJobServiceImpl.java
...om/skyeye/company/service/impl/CompanyJobServiceImpl.java
+26
-0
skyeye-web/src/main/java/com/skyeye/company/controller/CompanyJobController.java
...a/com/skyeye/company/controller/CompanyJobController.java
+16
-0
skyeye-web/src/main/resources/dbmapper/CompanyJobMapper.xml
skyeye-web/src/main/resources/dbmapper/CompanyJobMapper.xml
+14
-0
skyeye-web/src/main/resources/dbmapper/SysEveUserMapper.xml
skyeye-web/src/main/resources/dbmapper/SysEveUserMapper.xml
+52
-1
skyeye-web/src/main/resources/mapping/reqmapping.xml
skyeye-web/src/main/resources/mapping/reqmapping.xml
+9
-0
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
+16
-0
skyeye-web/src/main/webapp/js/companydepartment/companydepartmentlist.js
...main/webapp/js/companydepartment/companydepartmentlist.js
+1
-1
skyeye-web/src/main/webapp/js/companyjob/companyjoblist.js
skyeye-web/src/main/webapp/js/companyjob/companyjoblist.js
+2
-2
skyeye-web/src/main/webapp/js/syseveuser/syseveuseradd.js
skyeye-web/src/main/webapp/js/syseveuser/syseveuseradd.js
+91
-3
skyeye-web/src/main/webapp/js/syseveuser/syseveuseredit.js
skyeye-web/src/main/webapp/js/syseveuser/syseveuseredit.js
+90
-4
skyeye-web/src/main/webapp/js/syseveuser/syseveuserlist.js
skyeye-web/src/main/webapp/js/syseveuser/syseveuserlist.js
+20
-7
skyeye-web/src/main/webapp/tpl/syseveuser/syseveuseradd.html
skyeye-web/src/main/webapp/tpl/syseveuser/syseveuseradd.html
+36
-10
skyeye-web/src/main/webapp/tpl/syseveuser/syseveuseredit.html
...ye-web/src/main/webapp/tpl/syseveuser/syseveuseredit.html
+1
-1
skyeye-web/src/main/webapp/tpl/syseveuser/syseveusereditTemplate.tpl
...src/main/webapp/tpl/syseveuser/syseveusereditTemplate.tpl
+26
-6
未找到文件。
skyeye-dao/src/main/java/com/skyeye/authority/dao/SysEveUserDao.java
浏览文件 @
60765c1c
...
...
@@ -48,6 +48,12 @@ public interface SysEveUserDao {
public
int
insertSysUserInstallMation
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
int
editUserPassword
(
Map
<
String
,
Object
>
bean
)
throws
Exception
;
public
int
insertSysUserJobMation
(
Map
<
String
,
Object
>
jobBean
)
throws
Exception
;
public
int
editSysUserJobMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
Map
<
String
,
Object
>
querySysUserJobMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
...
...
skyeye-dao/src/main/java/com/skyeye/company/dao/CompanyJobDao.java
浏览文件 @
60765c1c
...
...
@@ -20,4 +20,6 @@ public interface CompanyJobDao {
public
int
editCompanyJobMationById
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
public
List
<
Map
<
String
,
Object
>>
queryCompanyJobListTreeByDepartmentId
(
Map
<
String
,
Object
>
map
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/authority/service/impl/SysEveUserServiceImpl.java
浏览文件 @
60765c1c
...
...
@@ -150,6 +150,17 @@ public class SysEveUserServiceImpl implements SysEveUserService{
bean
.
put
(
"winTaskPosition"
,
"bottom"
);
bean
.
put
(
"createId"
,
user
.
get
(
"id"
));
bean
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
Map
<
String
,
Object
>
jobBean
=
new
HashMap
<>();
jobBean
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
jobBean
.
put
(
"userId"
,
userId
);
jobBean
.
put
(
"createId"
,
user
.
get
(
"id"
));
jobBean
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
jobBean
.
put
(
"companyId"
,
map
.
get
(
"companyId"
));
jobBean
.
put
(
"departmentId"
,
map
.
get
(
"departmentId"
));
jobBean
.
put
(
"jobId"
,
map
.
get
(
"jobId"
));
sysEveUserDao
.
insertSysUserJobMation
(
jobBean
);
sysEveUserDao
.
insertSysUserMation
(
map
);
sysEveUserDao
.
insertSysUserInstallMation
(
bean
);
}
else
{
...
...
@@ -171,6 +182,21 @@ public class SysEveUserServiceImpl implements SysEveUserService{
public
void
editSysUserMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
sysEveUserDao
.
editSysUserMationById
(
map
);
Map
<
String
,
Object
>
userJob
=
sysEveUserDao
.
querySysUserJobMationById
(
map
);
if
(
userJob
==
null
){
Map
<
String
,
Object
>
user
=
inputObject
.
getLogParams
();
Map
<
String
,
Object
>
jobBean
=
new
HashMap
<>();
jobBean
.
put
(
"id"
,
ToolUtil
.
getSurFaceId
());
jobBean
.
put
(
"userId"
,
map
.
get
(
"id"
));
jobBean
.
put
(
"createId"
,
user
.
get
(
"id"
));
jobBean
.
put
(
"createTime"
,
ToolUtil
.
getTimeAndToString
());
jobBean
.
put
(
"companyId"
,
map
.
get
(
"companyId"
));
jobBean
.
put
(
"departmentId"
,
map
.
get
(
"departmentId"
));
jobBean
.
put
(
"jobId"
,
map
.
get
(
"jobId"
));
sysEveUserDao
.
insertSysUserJobMation
(
jobBean
);
}
else
{
sysEveUserDao
.
editSysUserJobMationById
(
map
);
}
}
/**
...
...
skyeye-service/src/main/java/com/skyeye/company/service/CompanyJobService.java
浏览文件 @
60765c1c
...
...
@@ -15,4 +15,6 @@ public interface CompanyJobService {
public
void
editCompanyJobMationById
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
public
void
queryCompanyJobListTreeByDepartmentId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
;
}
skyeye-service/src/main/java/com/skyeye/company/service/impl/CompanyJobServiceImpl.java
浏览文件 @
60765c1c
...
...
@@ -4,6 +4,9 @@ import java.util.List;
import
java.util.Map
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.github.miemiedev.mybatis.paginator.domain.PageBounds
;
import
com.github.miemiedev.mybatis.paginator.domain.PageList
;
import
com.skyeye.company.dao.CompanyJobDao
;
...
...
@@ -119,5 +122,28 @@ public class CompanyJobServiceImpl implements CompanyJobService{
outputObject
.
setreturnMessage
(
"该公司部门职位信息名称已存在,不可进行二次保存"
);
}
}
/**
*
* @Title: queryCompanyJobListTreeByDepartmentId
* @Description: 获取公司部门职位信息列表展示为树根据公司id
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
@Override
public
void
queryCompanyJobListTreeByDepartmentId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
Map
<
String
,
Object
>
map
=
inputObject
.
getParams
();
List
<
Map
<
String
,
Object
>>
beans
=
companyJobDao
.
queryCompanyJobListTreeByDepartmentId
(
map
);
JSONArray
result
=
ToolUtil
.
listToTree
(
JSONArray
.
parseArray
(
JSON
.
toJSONString
(
beans
)),
"id"
,
"parentId"
,
"children"
);
beans
=
(
List
)
result
;
if
(!
beans
.
isEmpty
()){
outputObject
.
setBeans
(
beans
);
outputObject
.
settotal
(
beans
.
size
());
}
}
}
skyeye-web/src/main/java/com/skyeye/company/controller/CompanyJobController.java
浏览文件 @
60765c1c
...
...
@@ -94,4 +94,20 @@ public class CompanyJobController {
companyJobService
.
editCompanyJobMationById
(
inputObject
,
outputObject
);
}
/**
*
* @Title: queryCompanyJobListTreeByDepartmentId
* @Description: 获取公司部门职位信息列表展示为树根据公司id
* @param @param inputObject
* @param @param outputObject
* @param @throws Exception 参数
* @return void 返回类型
* @throws
*/
@RequestMapping
(
"/post/CompanyJobController/queryCompanyJobListTreeByDepartmentId"
)
@ResponseBody
public
void
queryCompanyJobListTreeByDepartmentId
(
InputObject
inputObject
,
OutputObject
outputObject
)
throws
Exception
{
companyJobService
.
queryCompanyJobListTreeByDepartmentId
(
inputObject
,
outputObject
);
}
}
skyeye-web/src/main/resources/dbmapper/CompanyJobMapper.xml
浏览文件 @
60765c1c
...
...
@@ -72,4 +72,18 @@
WHERE id = #{id}
</update>
<select
id=
"queryCompanyJobListTreeByDepartmentId"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
a.job_name title,
a.p_id parentId,
CASE a.p_id WHEN '0' THEN false ELSE true END isLast,
'[{"type": "0", "isChecked": "0"}]' checkArr,
CASE a.p_id WHEN '0' THEN '1' ELSE '2' END level
FROM
company_job a
WHERE a.department_id = #{departmentId}
ORDER BY a.p_id ASC
</select>
</mapper>
\ No newline at end of file
skyeye-web/src/main/resources/dbmapper/SysEveUserMapper.xml
浏览文件 @
60765c1c
...
...
@@ -14,9 +14,25 @@
a.user_lock userLock,
(SELECT c.user_name FROM sys_eve_user c WHERE a.creater = c.id) createName,
(SELECT group_concat(distinct b.role_name) FROM sys_eve_role b WHERE INSTR(CONCAT(',', a.role_id, ','), CONCAT(',', b.id, ','))) roleName,
m.company_name companyName,
m.department_name departmentName,
m.job_name jobName,
CONVERT(a.create_time, char) createTime
FROM
sys_eve_user a
LEFT JOIN (SELECT
o.user_id,
p.job_name,
q.department_name,
u.company_name
FROM
company_user o,
company_job p,
company_department q,
company_mation u
WHERE o.company_id = u.id
AND o.department_id = q.id
AND o.job_id = p.id) m ON a.id = m.user_id
WHERE 1 = 1
<if
test=
"userCode != '' and userCode != null"
>
AND a.user_code like '%${userCode}%'
...
...
@@ -60,9 +76,13 @@
a.user_name userName,
a.user_photo userPhoto,
a.user_idcard userIdCard,
a.user_sex userSex
a.user_sex userSex,
b.company_id companyId,
b.department_id departmentId,
b.job_id jobId
FROM
sys_eve_user a
LEFT JOIN company_user b ON b.user_id = a.id
WHERE a.id = #{id}
</select>
...
...
@@ -79,6 +99,30 @@
WHERE id = #{id}
</update>
<select
id=
"querySysUserJobMationById"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id
FROM
company_user a
WHERE a.user_id = #{id}
</select>
<update
id=
"editSysUserJobMationById"
parameterType=
"java.util.Map"
>
UPDATE company_user
<set>
<if
test=
"companyId != '' and companyId != null"
>
company_id = #{companyId},
</if>
<if
test=
"departmentId != '' and departmentId != null"
>
department_id = #{departmentId},
</if>
<if
test=
"jobId != '' and jobId != null"
>
job_id = #{jobId},
</if>
</set>
WHERE user_id = #{id}
</update>
<select
id=
"queryMationByUserCode"
parameterType=
"java.util.Map"
resultType=
"java.util.Map"
>
SELECT
a.id,
...
...
@@ -224,6 +268,13 @@
a.user_code = #{userCode}
</select>
<insert
id=
"insertSysUserJobMation"
parameterType=
"java.util.Map"
>
INSERT into company_user
(id, company_id, department_id, job_id, user_id, create_id, create_time)
VALUES
(#{id}, #{companyId}, #{departmentId}, #{jobId}, #{userId}, #{createId}, #{createTime})
</insert>
<insert
id=
"insertSysUserMation"
parameterType=
"java.util.Map"
>
INSERT into sys_eve_user
(id, user_code, pwd_num_enc, password, user_name, user_photo, user_idcard, user_sex, user_lock, creater, create_time)
...
...
skyeye-web/src/main/resources/mapping/reqmapping.xml
浏览文件 @
60765c1c
...
...
@@ -75,6 +75,9 @@
<property
id=
"userIdCard"
name=
"userIdCard"
ref=
"idcard"
var=
"身份证"
/>
<property
id=
"userName"
name=
"userName"
ref=
"required"
var=
"用户名"
/>
<property
id=
"userPhoto"
name=
"userPhoto"
ref=
"required"
var=
"头像"
/>
<property
id=
"companyId"
name=
"companyId"
ref=
"required"
var=
"所属公司"
/>
<property
id=
"departmentId"
name=
"departmentId"
ref=
"required"
var=
"所属部门"
/>
<property
id=
"jobId"
name=
"jobId"
ref=
"required"
var=
"所属职位"
/>
</url>
<url
id=
"sysAdd005"
path=
"/post/SysEveUserController/insertSysUserMationById"
val=
"创建账号"
allUse=
"1"
>
<property
id=
"userCode"
name=
"userCode"
ref=
"required"
var=
"账号"
/>
...
...
@@ -83,6 +86,9 @@
<property
id=
"userIdCard"
name=
"userIdCard"
ref=
"idcard"
var=
"身份证"
/>
<property
id=
"userName"
name=
"userName"
ref=
"required"
var=
"用户名"
/>
<property
id=
"userPhoto"
name=
"userPhoto"
ref=
"required"
var=
"头像"
/>
<property
id=
"companyId"
name=
"companyId"
ref=
"required"
var=
"所属公司"
/>
<property
id=
"departmentId"
name=
"departmentId"
ref=
"required"
var=
"所属部门"
/>
<property
id=
"jobId"
name=
"jobId"
ref=
"required"
var=
"所属职位"
/>
</url>
<url
id=
"sys006"
path=
"/post/SysEveMenuController/querySysMenuList"
val=
"获取菜单列表"
allUse=
"1"
>
<property
id=
"limit"
name=
"limit"
ref=
"required,num"
var=
"分页参数,每页多少条数据"
/>
...
...
@@ -822,6 +828,9 @@
<property
id=
"jobName"
name=
"jobName"
ref=
""
var=
"部门职位名称"
/>
<property
id=
"jobDesc"
name=
"jobDesc"
ref=
""
var=
"部门职位简介"
/>
</url>
<url
id=
"companyjob006"
path=
"/post/CompanyJobController/queryCompanyJobListTreeByDepartmentId"
val=
"获取公司部门职位信息列表展示为树根据公司id"
allUse=
"1"
>
<property
id=
"departmentId"
name=
"departmentId"
ref=
"required"
var=
"部门id"
/>
</url>
<!-- 公司管理结束 -->
<!-- 项目规划开始 -->
...
...
skyeye-web/src/main/webapp/assets/lib/winui/css/winui.css
浏览文件 @
60765c1c
...
...
@@ -1815,6 +1815,7 @@ body .layer-ext-winconfirm {
.photo-img
{
width
:
30px
;
height
:
30px
;
cursor
:
pointer
;
}
/***非表格分页加载插件start***/
...
...
@@ -2882,6 +2883,10 @@ body .layer-ext-winconfirm {
}
/*** 滑块结束 ***/
.layui-form-item
{
clear
:
none
;
}
/*** 小程序页面管理start ***/
.smpro
{
height
:
calc
(
100vh
-
45px
);
...
...
@@ -4155,6 +4160,17 @@ body .layer-ext-winconfirm {
/*** 公司展示列表样式end ***/
.mar-left-5px
{
margin-left
:
4.22222%
;
}
.hr-title
{
font-size
:
15px
;
font-style
:
oblique
;
color
:
#6379bb
;
margin
:
10px
0px
0px
10px
;
}
/*******************************************自定义样式end********************************************/
skyeye-web/src/main/webapp/js/companydepartment/companydepartmentlist.js
浏览文件 @
60765c1c
...
...
@@ -21,7 +21,7 @@ layui.config({
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
initLoatTable
();
//初始化加载表格
if
(
!
isNull
(
$
(
"
#demoTree1 li
"
).
eq
(
0
))
){
if
(
$
(
"
#demoTree1 li
"
).
length
>
0
){
$
(
"
#demoTree1 li
"
).
eq
(
0
).
children
(
'
div
'
).
click
();
}
}
...
...
skyeye-web/src/main/webapp/js/companyjob/companyjoblist.js
浏览文件 @
60765c1c
...
...
@@ -21,7 +21,7 @@ layui.config({
url
:
reqBasePath
+
'
companymation007
'
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
if
(
!
isNull
(
$
(
"
#demoTree1 li
"
).
eq
(
0
))
){
if
(
$
(
"
#demoTree1 li
"
).
length
>
0
){
$
(
"
#demoTree1 li
"
).
eq
(
0
).
children
(
'
div
'
).
click
();
}
}
...
...
@@ -37,7 +37,7 @@ layui.config({
done
:
function
(){
departmentId
=
""
;
initLoatTable
();
//初始化加载表格
if
(
!
isNull
(
$
(
"
#demoTree2 li
"
).
eq
(
0
))
){
if
(
$
(
"
#demoTree2 li
"
).
length
>
0
){
$
(
"
#demoTree2 li
"
).
eq
(
0
).
children
(
'
div
'
).
click
();
}
}
...
...
skyeye-web/src/main/webapp/js/syseveuser/syseveuseradd.js
浏览文件 @
60765c1c
var
companyId
=
""
;
var
departmentId
=
""
;
var
jobId
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
fileUpload
'
],
function
(
exports
)
{
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
fileUpload
'
,
'
dtree
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
;
var
$
=
layui
.
$
,
dtree
=
layui
.
dtree
;
//初始化上传
$
(
"
#userPhoto
"
).
upload
({
...
...
@@ -18,19 +24,101 @@ layui.config({
}
});
form
.
verify
({
password
:
function
(
value
,
item
){
if
(
value
.
length
<
6
){
return
"
密码长度不能小于6位
"
;
}
},
confirmPwd
:
function
(
value
,
item
){
if
(
$
(
"
#password
"
).
val
()
!=
value
){
return
"
两次输入密码不一致,请重新输入!
"
;
}
}
});
//初始化公司
dtree
.
render
({
elem
:
"
#demoTree1
"
,
//绑定元素
url
:
reqBasePath
+
'
companymation007
'
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
if
(
$
(
"
#demoTree1 li
"
).
length
>
0
){
$
(
"
#demoTree1 li
"
).
eq
(
0
).
children
(
'
div
'
).
click
();
}
}
});
dtree
.
on
(
"
node('demoTree1')
"
,
function
(
param
){
companyId
=
param
.
nodeId
;
//初始化部门
dtree
.
render
({
elem
:
"
#demoTree2
"
,
//绑定元素
url
:
reqBasePath
+
'
companydepartment006?companyId=
'
+
companyId
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
departmentId
=
""
;
if
(
$
(
"
#demoTree2 li
"
).
length
>
0
){
$
(
"
#demoTree2 li
"
).
eq
(
0
).
children
(
'
div
'
).
click
();
}
else
{
jobId
=
""
;
//初始化职位
dtree
.
render
({
elem
:
"
#demoTree3
"
,
//绑定元素
url
:
reqBasePath
+
'
companyjob006?departmentId=0
'
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
}
});
}
}
});
});
dtree
.
on
(
"
node('demoTree2')
"
,
function
(
param
){
departmentId
=
param
.
nodeId
;
//初始化职位
dtree
.
render
({
elem
:
"
#demoTree3
"
,
//绑定元素
url
:
reqBasePath
+
'
companyjob006?departmentId=
'
+
departmentId
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
jobId
=
""
;
if
(
$
(
"
#demoTree3 li
"
).
length
>
0
){
$
(
"
#demoTree3 li
"
).
eq
(
0
).
children
(
'
div
'
).
click
();
}
}
});
});
dtree
.
on
(
"
node('demoTree3')
"
,
function
(
param
){
jobId
=
param
.
nodeId
;
});
form
.
render
();
form
.
on
(
'
submit(formAddBean)
'
,
function
(
data
)
{
//表单验证
if
(
winui
.
verifyForm
(
data
.
elem
))
{
if
(
isNull
(
jobId
)){
top
.
winui
.
window
.
msg
(
'
请选择职位信息
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
var
params
=
{
userCode
:
$
(
"
#userCode
"
).
val
(),
userName
:
$
(
"
#userName
"
).
val
(),
password
:
$
(
"
#password
"
).
val
(),
userIdCard
:
$
(
"
#userIdCard
"
).
val
(),
userSex
:
$
(
"
input[name='userSex']:checked
"
).
val
(),
companyId
:
companyId
,
departmentId
:
departmentId
,
jobId
:
jobId
,
};
params
.
userPhoto
=
$
(
"
#userPhoto
"
).
find
(
"
input[type='hidden'][name='upload']
"
).
attr
(
"
oldurl
"
);
if
(
isNull
(
params
.
userPhoto
)){
top
.
winui
.
window
.
msg
(
'
请上传头像
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
sysAdd005
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
parent
.
layer
.
close
(
index
);
...
...
skyeye-web/src/main/webapp/js/syseveuser/syseveuseredit.js
浏览文件 @
60765c1c
var
companyId
=
""
;
var
departmentId
=
""
;
var
jobId
=
""
;
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
fileUpload
'
],
function
(
exports
)
{
}).
define
([
'
table
'
,
'
jquery
'
,
'
winui
'
,
'
fileUpload
'
,
'
dtree
'
],
function
(
exports
)
{
winui
.
renderColor
();
layui
.
use
([
'
form
'
],
function
(
form
)
{
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
//获取窗口索引
var
$
=
layui
.
$
;
var
userPhoto
=
""
;
var
picArray
=
new
Array
();
//已加载的上传文件的ID
var
$
=
layui
.
$
,
dtree
=
layui
.
dtree
;
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
sys004
"
,
...
...
@@ -38,6 +43,80 @@ layui.config({
show
(
"
#userPhoto
"
,
data
);
}
});
//初始化公司
dtree
.
render
({
elem
:
"
#demoTree1
"
,
//绑定元素
url
:
reqBasePath
+
'
companymation007
'
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
if
(
$
(
"
#demoTree1 li
"
).
length
>
0
){
for
(
var
i
=
0
;
i
<
$
(
"
#demoTree1 li
"
).
length
;
i
++
){
if
(
$
(
"
#demoTree1 li
"
).
eq
(
i
).
attr
(
"
data-id
"
)
==
json
.
bean
.
companyId
){
$
(
"
#demoTree1 li
"
).
eq
(
i
).
children
(
'
div
'
).
click
();
return
;
}
}
}
}
});
dtree
.
on
(
"
node('demoTree1')
"
,
function
(
param
){
companyId
=
param
.
nodeId
;
//初始化部门
dtree
.
render
({
elem
:
"
#demoTree2
"
,
//绑定元素
url
:
reqBasePath
+
'
companydepartment006?companyId=
'
+
companyId
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
departmentId
=
""
;
if
(
$
(
"
#demoTree2 li
"
).
length
>
0
){
for
(
var
i
=
0
;
i
<
$
(
"
#demoTree2 li
"
).
length
;
i
++
){
if
(
$
(
"
#demoTree2 li
"
).
eq
(
i
).
attr
(
"
data-id
"
)
==
json
.
bean
.
departmentId
){
$
(
"
#demoTree2 li
"
).
eq
(
i
).
children
(
'
div
'
).
click
();
return
;
}
}
}
else
{
jobId
=
""
;
//初始化职位
dtree
.
render
({
elem
:
"
#demoTree3
"
,
//绑定元素
url
:
reqBasePath
+
'
companyjob006?departmentId=0
'
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
}
});
}
}
});
});
dtree
.
on
(
"
node('demoTree2')
"
,
function
(
param
){
departmentId
=
param
.
nodeId
;
//初始化职位
dtree
.
render
({
elem
:
"
#demoTree3
"
,
//绑定元素
url
:
reqBasePath
+
'
companyjob006?departmentId=
'
+
departmentId
,
//异步接口
dataStyle
:
'
layuiStyle
'
,
done
:
function
(){
jobId
=
""
;
if
(
$
(
"
#demoTree3 li
"
).
length
>
0
){
for
(
var
i
=
0
;
i
<
$
(
"
#demoTree3 li
"
).
length
;
i
++
){
if
(
$
(
"
#demoTree3 li
"
).
eq
(
i
).
attr
(
"
data-id
"
)
==
json
.
bean
.
jobId
){
$
(
"
#demoTree3 li
"
).
eq
(
i
).
children
(
'
div
'
).
click
();
return
;
}
}
}
}
});
});
dtree
.
on
(
"
node('demoTree3')
"
,
function
(
param
){
jobId
=
param
.
nodeId
;
});
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
//表单验证
...
...
@@ -47,8 +126,15 @@ layui.config({
userName
:
$
(
"
#userName
"
).
val
(),
userIdCard
:
$
(
"
#userIdCard
"
).
val
(),
userSex
:
$
(
"
input[name='userSex']:checked
"
).
val
(),
companyId
:
companyId
,
departmentId
:
departmentId
,
jobId
:
jobId
,
};
params
.
userPhoto
=
$
(
"
#userPhoto
"
).
find
(
"
input[type='hidden'][name='upload']
"
).
attr
(
"
oldurl
"
);
if
(
isNull
(
params
.
userPhoto
)){
top
.
winui
.
window
.
msg
(
'
请上传头像
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
sys005
"
,
params
:
params
,
type
:
'
json
'
,
callback
:
function
(
json
){
if
(
json
.
returnCode
==
0
){
...
...
skyeye-web/src/main/webapp/js/syseveuser/syseveuserlist.js
浏览文件 @
60765c1c
...
...
@@ -16,21 +16,21 @@ layui.config({
elem
:
'
#messageTable
'
,
method
:
'
post
'
,
url
:
reqBasePath
+
'
sys001
'
,
where
:{
userCode
:
$
(
"
#userCode
"
).
val
(),
userName
:
$
(
"
#userName
"
).
val
()},
even
:
true
,
//隔行变色
where
:
{
userCode
:
$
(
"
#userCode
"
).
val
(),
userName
:
$
(
"
#userName
"
).
val
()},
even
:
true
,
//隔行变色
page
:
true
,
limits
:
[
8
,
16
,
24
,
32
,
40
,
48
,
56
],
limit
:
8
,
cols
:
[[
{
title
:
'
序号
'
,
type
:
'
numbers
'
},
{
field
:
'
userCode
'
,
title
:
'
账号
'
,
width
:
120
},
{
field
:
'
pwdNumEnc
'
,
title
:
'
加密次数
'
,
width
:
1
2
0
},
{
field
:
'
userName
'
,
title
:
'
用户名
'
,
width
:
1
2
0
},
{
field
:
'
userPhoto
'
,
title
:
'
头像
'
,
align
:
'
center
'
,
width
:
12
0
,
templet
:
function
(
d
){
{
field
:
'
pwdNumEnc
'
,
title
:
'
加密次数
'
,
width
:
1
0
0
},
{
field
:
'
userName
'
,
title
:
'
用户名
'
,
width
:
1
0
0
},
{
field
:
'
userPhoto
'
,
title
:
'
头像
'
,
align
:
'
center
'
,
width
:
6
0
,
templet
:
function
(
d
){
if
(
isNull
(
d
.
userPhoto
)){
return
'
<img src="../../assets/images/os_windows.png" class="photo-img">
'
;
}
else
{
return
'
<img src="
'
+
fileBasePath
+
d
.
userPhoto
+
'
" class="photo-img">
'
;
return
'
<img src="
'
+
fileBasePath
+
d
.
userPhoto
+
'
" class="photo-img"
lay-event="userPhoto"
>
'
;
}
}},
{
field
:
'
userIdCard
'
,
title
:
'
身份证
'
,
width
:
160
},
...
...
@@ -45,8 +45,11 @@ layui.config({
return
"
参数错误
"
;
}
}},
{
field
:
'
companyName
'
,
title
:
'
所属公司
'
,
width
:
120
},
{
field
:
'
departmentName
'
,
title
:
'
所属部门
'
,
width
:
120
},
{
field
:
'
jobName
'
,
title
:
'
担任职位
'
,
width
:
120
},
{
field
:
'
userLock
'
,
title
:
'
是否锁定
'
,
width
:
120
,
templet
:
'
#checkboxTpl
'
,
unresize
:
true
},
{
field
:
'
roleName
'
,
title
:
'
角色
'
},
{
field
:
'
roleName
'
,
title
:
'
角色
'
,
width
:
120
},
{
field
:
'
createName
'
,
title
:
'
创建人
'
,
width
:
120
},
{
field
:
'
createTime
'
,
title
:
'
创建时间
'
,
width
:
180
},
{
title
:
'
操作
'
,
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
240
,
toolbar
:
'
#tableBar
'
}
...
...
@@ -62,6 +65,16 @@ layui.config({
edit
(
data
);
}
else
if
(
layEvent
===
'
bindRole
'
)
{
//绑定角色
bindRole
(
data
);
}
else
if
(
layEvent
===
'
userPhoto
'
)
{
//头像预览
layer
.
open
({
type
:
1
,
title
:
false
,
closeBtn
:
0
,
skin
:
'
demo-class
'
,
shadeClose
:
true
,
content
:
'
<img src="
'
+
fileBasePath
+
data
.
userPhoto
+
'
" style="max-height:600px;max-width:100%;">
'
,
scrollbar
:
false
});
}
});
...
...
skyeye-web/src/main/webapp/tpl/syseveuser/syseveuseradd.html
浏览文件 @
60765c1c
...
...
@@ -8,33 +8,42 @@
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"
width:600px;margin:0 auto;padding-top:20px;
"
>
<div
style=
"
padding-top:20px;"
class=
"layui-col-xs11 mar-left-5px
"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
基础信息
</span><hr>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
账号
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"userCode"
name=
"userCode"
win-verify=
"required"
placeholder=
"请输入账号"
class=
"layui-input"
/>
<input
type=
"text"
id=
"userCode"
name=
"userCode"
win-verify=
"required"
placeholder=
"请输入账号"
class=
"layui-input"
maxlength=
"18"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item
layui-col-xs6
"
>
<label
class=
"layui-form-label"
>
用户名
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"userName"
name=
"userName"
win-verify=
"required"
placeholder=
"请输入用户名"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item
layui-col-xs6
"
>
<label
class=
"layui-form-label"
>
密码
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"password"
id=
"password"
name=
"password"
win-verify=
"required"
placeholder=
"请输入密码"
class=
"layui-input"
/>
<input
type=
"password"
id=
"password"
name=
"password"
win-verify=
"required"
placeholder=
"请输入密码"
class=
"layui-input"
maxlength=
"18"
lay-verify=
"password"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
确认密码
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block"
>
<input
type=
"password"
id=
"confirmPwd"
name=
"confirmPwd"
win-verify=
"required"
placeholder=
"请再次输入密码"
class=
"layui-input"
maxlength=
"18"
lay-verify=
"confirmPwd"
/>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
身份证
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"userIdCard"
name=
"userIdCard"
placeholder=
"请输入身份证"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item
"
pane
>
<div
class=
"layui-form-item
layui-col-xs6"
>
<label
class=
"layui-form-label"
>
性别
</label>
<div
class=
"layui-input-block winui-radio"
>
<input
type=
"radio"
name=
"userSex"
value=
"0"
title=
"保密"
checked=
"checked"
/>
...
...
@@ -42,13 +51,30 @@
<input
type=
"radio"
name=
"userSex"
value=
"2"
title=
"女"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item
layui-col-xs6
"
>
<label
class=
"layui-form-label"
>
头像
</label>
<div
class=
"layui-input-block"
>
<div
class=
"upload"
id=
"userPhoto"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
组织机构
</span><hr>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
职位信息
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-item layui-col-xs4"
>
<ul
id=
"demoTree1"
class=
"dtree"
data-id=
"0"
style=
"overflow-y: auto;height: 250px;"
></ul>
</div>
<div
class=
"layui-form-item layui-col-xs4"
>
<ul
id=
"demoTree2"
class=
"dtree"
data-id=
"0"
style=
"overflow-y: auto;height: 250px;"
></ul>
</div>
<div
class=
"layui-form-item layui-col-xs4"
>
<ul
id=
"demoTree3"
class=
"dtree"
data-id=
"0"
style=
"overflow-y: auto;height: 250px;"
></ul>
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formAddBean"
>
保存
</button>
...
...
skyeye-web/src/main/webapp/tpl/syseveuser/syseveuseredit.html
浏览文件 @
60765c1c
...
...
@@ -8,7 +8,7 @@
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"
width:600px;margin:0 auto;padding-top:20px;
"
>
<div
style=
"
padding-top:20px;"
class=
"layui-col-xs11 mar-left-5px
"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
>
</form>
...
...
skyeye-web/src/main/webapp/tpl/syseveuser/syseveusereditTemplate.tpl
浏览文件 @
60765c1c
{{
#
bean
}}
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
基础信息
</span><hr>
</div>
<div
class=
"layui-form-item layui-col-xs6"
>
<label
class=
"layui-form-label"
>
账号
<i
class=
"red"
>
*
</i></label>
<div
class=
"layui-input-block ver-center"
>
{
{
userCode
}
}
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item
layui-col-xs6
"
>
<label
class=
"layui-form-label"
>
用户名
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"userName"
name=
"userName"
win-verify=
"required"
placeholder=
"请输入用户名"
class=
"layui-input"
value=
"{
{
userName
}
}"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item
layui-col-xs6
"
>
<label
class=
"layui-form-label"
>
身份证
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
id=
"userIdCard"
name=
"userIdCard"
placeholder=
"请输入身份证"
class=
"layui-input"
value=
"{
{
userIdCard
}
}"
/>
</div>
</div>
<div
class=
"layui-form-item
"
pane
>
<div
class=
"layui-form-item
layui-col-xs6"
>
<label
class=
"layui-form-label"
>
性别
</label>
<div
class=
"layui-input-block winui-radio"
>
<input
type=
"radio"
name=
"userSex"
value=
"0"
title=
"保密"
/>
...
...
@@ -25,13 +28,30 @@
<input
type=
"radio"
name=
"userSex"
value=
"2"
title=
"女"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item
layui-col-xs6
"
>
<label
class=
"layui-form-label"
>
头像
</label>
<div
class=
"layui-input-block"
>
<div
class=
"upload"
id=
"userPhoto"
></div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item layui-col-xs12"
>
<span
class=
"hr-title"
>
组织机构
</span><hr>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<label
class=
"layui-form-label"
>
职位信息
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-form-item layui-col-xs4"
>
<ul
id=
"demoTree1"
class=
"dtree"
data-id=
"0"
style=
"overflow-y: auto;height: 250px;"
></ul>
</div>
<div
class=
"layui-form-item layui-col-xs4"
>
<ul
id=
"demoTree2"
class=
"dtree"
data-id=
"0"
style=
"overflow-y: auto;height: 250px;"
></ul>
</div>
<div
class=
"layui-form-item layui-col-xs4"
>
<ul
id=
"demoTree3"
class=
"dtree"
data-id=
"0"
style=
"overflow-y: auto;height: 250px;"
></ul>
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-xs12"
>
<div
class=
"layui-input-block"
>
<button
class=
"winui-btn"
id=
"cancle"
>
取消
</button>
<button
class=
"winui-btn"
lay-submit
lay-filter=
"formEditBean"
>
保存
</button>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录