Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
冷月半明
Skyeye
提交
8d4b98e8
S
Skyeye
项目概览
冷月半明
/
Skyeye
与 Fork 源项目一致
Fork自
doc_wei / Skyeye
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8d4b98e8
编写于
12月 10, 2022
作者:
doc_wei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
团队权限校验
上级
b2de020a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
601 addition
and
3 deletion
+601
-3
base-server/src/main/resources/template/js/teamBusiness/teamBusinessDetails.js
...resources/template/js/teamBusiness/teamBusinessDetails.js
+136
-0
base-server/src/main/resources/template/js/teamBusiness/teamBusinessEdit.js
...in/resources/template/js/teamBusiness/teamBusinessEdit.js
+317
-0
base-server/src/main/resources/template/tpl/teamBusiness/teamBusinessDetails.html
...ources/template/tpl/teamBusiness/teamBusinessDetails.html
+57
-0
base-server/src/main/resources/template/tpl/teamBusiness/teamBusinessEdit.html
...resources/template/tpl/teamBusiness/teamBusinessEdit.html
+77
-0
crm/src/main/resources/template/js/customerManage/customerManage.js
...in/resources/template/js/customerManage/customerManage.js
+4
-1
web/src/main/resources/template/assets/lib/layui/customer/common/systemCommonUtil.js
...late/assets/lib/layui/customer/common/systemCommonUtil.js
+10
-2
未找到文件。
base-server/src/main/resources/template/js/teamBusiness/teamBusinessDetails.js
0 → 100644
浏览文件 @
8d4b98e8
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
tableTreeDj
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
,
tableTree
=
layui
.
tableTreeDj
,
form
=
layui
.
form
;
var
objectKey
=
GetUrlParam
(
"
objectKey
"
);
var
objectId
=
GetUrlParam
(
"
id
"
);
var
treeTableData
=
[];
// 已经选中的权限对应关系
var
checkTrueList
=
[];
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
queryTeamBusiness
"
,
params
:
{
businessId
:
objectId
},
pagination
:
false
,
method
:
"
GET
"
,
template
:
$
(
"
#showTemplate
"
).
html
(),
ajaxSendLoadBefore
:
function
(
hdb
,
json
)
{},
ajaxSendAfter
:
function
(
json
)
{
loadTreeTable
();
// 解析成员信息
$
.
each
(
json
.
bean
.
teamRoleList
,
function
(
i
,
item
)
{
treeTableData
.
push
({
id
:
item
.
roleId
,
pId
:
'
0
'
,
name
:
item
.
name
});
$
.
each
(
item
.
teamRoleUserList
,
function
(
j
,
bean
)
{
treeTableData
.
push
({
id
:
bean
.
userId
,
pId
:
item
.
roleId
,
name
:
bean
.
userMation
.
name
,
departmentName
:
bean
.
userMation
.
departmentName
,
phone
:
bean
.
userMation
.
phone
,
email
:
bean
.
userMation
.
email
});
});
});
// 解析权限信息
$
.
each
(
json
.
bean
.
teamObjectPermissionList
,
function
(
i
,
item
)
{
var
authGroupKey
=
item
.
permissionKey
;
var
authKey
=
item
.
permissionValue
;
var
checkParams
=
getInPoingArr
(
treeTableData
,
"
id
"
,
item
.
ownerId
);
if
(
checkParams
!=
null
)
{
var
roleId
=
checkParams
.
pId
==
'
0
'
?
checkParams
.
id
:
checkParams
.
pId
;
var
userId
=
checkParams
.
pId
==
'
0
'
?
''
:
checkParams
.
id
;
var
id
=
authGroupKey
+
'
_
'
+
authKey
+
'
_
'
+
roleId
+
'
_
'
+
userId
;
checkTrueList
.
push
(
id
);
}
});
reloadTreeTable
(
json
.
bean
.
objectType
);
matchingLanguage
();
form
.
render
();
}
});
function
loadTreeTable
()
{
tableTree
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
data
:
[],
// 该参数不能删除,分页参数无效,目前只能通过设置10000来保证当前页最大的数据量
limit
:
10000
,
cols
:
[[
{
field
:
'
name
'
,
title
:
'
名称
'
,
width
:
160
},
{
field
:
'
departmentName
'
,
title
:
'
部门
'
,
width
:
120
},
{
field
:
'
phone
'
,
title
:
'
联系方式
'
,
width
:
140
},
{
field
:
'
email
'
,
title
:
'
邮箱
'
,
width
:
200
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
}
},
{
keyId
:
'
id
'
,
keyPid
:
'
pId
'
,
title
:
'
name
'
,
defaultShow
:
true
,
});
}
// 刷新成员树表格
function
reloadTreeTable
(
objectType
)
{
var
data
=
$
.
extend
(
true
,
[],
treeTableData
);
tableTree
.
reload
(
"
messageTable
"
,
{
data
:
data
});
loadAuthList
(
objectType
);
}
function
loadAuthList
(
objectType
)
{
// 加载该受用类型的团队可以设置哪些权限
var
colsList
=
teamObjectPermissionUtil
.
getAuthColsDetails
(
objectType
);
$
(
'
#authList
'
).
html
(
getDataUseHandlebars
(
$
(
'
#authTableTemplate
'
).
html
(),
{
list
:
colsList
}));
$
.
each
(
colsList
,
function
(
i
,
item
)
{
var
data
=
$
.
extend
(
true
,
[],
treeTableData
);
// 给数据设置权限组的key,
$
.
each
(
data
,
function
(
j
,
bean
)
{
bean
.
authGroupKey
=
item
.
id
;
});
loadAuthTreeTable
(
item
.
id
,
item
.
cols
,
data
);
});
$
.
each
(
checkTrueList
,
function
(
i
,
id
)
{
$
(
`div[id='
${
id
}
']`
).
html
(
`<i class="fa fa-check" style="color: green"></i>`
);
});
}
function
loadAuthTreeTable
(
id
,
cols
,
data
)
{
tableTree
.
render
({
id
:
id
,
elem
:
'
#
'
+
id
,
data
:
data
,
// 该参数不能删除,分页参数无效,目前只能通过设置10000来保证当前页最大的数据量
limit
:
10000
,
cols
:
[
cols
],
},
{
keyId
:
'
id
'
,
keyPid
:
'
pId
'
,
title
:
'
name
'
,
defaultShow
:
true
,
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
});
\ No newline at end of file
base-server/src/main/resources/template/js/teamBusiness/teamBusinessEdit.js
0 → 100644
浏览文件 @
8d4b98e8
layui
.
config
({
base
:
basePath
,
version
:
skyeyeVersion
}).
extend
({
window
:
'
js/winui.window
'
}).
define
([
'
window
'
,
'
jquery
'
,
'
winui
'
,
'
textool
'
,
'
tableTreeDj
'
,
'
form
'
],
function
(
exports
)
{
winui
.
renderColor
();
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
var
$
=
layui
.
$
,
textool
=
layui
.
textool
,
tableTree
=
layui
.
tableTreeDj
,
form
=
layui
.
form
;
var
objectKey
=
GetUrlParam
(
"
objectKey
"
);
var
objectId
=
GetUrlParam
(
"
id
"
);
var
treeTableData
=
[];
// 已经选中的权限对应关系
var
checkTrueList
=
[];
showGrid
({
id
:
"
showForm
"
,
url
:
reqBasePath
+
"
queryTeamBusiness
"
,
params
:
{
businessId
:
objectId
},
pagination
:
false
,
method
:
"
GET
"
,
template
:
$
(
"
#showTemplate
"
).
html
(),
ajaxSendLoadBefore
:
function
(
hdb
,
json
)
{},
ajaxSendAfter
:
function
(
json
)
{
loadTreeTable
();
// 解析成员信息
$
.
each
(
json
.
bean
.
teamRoleList
,
function
(
i
,
item
)
{
treeTableData
.
push
({
id
:
item
.
roleId
,
pId
:
'
0
'
,
name
:
item
.
name
});
$
.
each
(
item
.
teamRoleUserList
,
function
(
j
,
bean
)
{
treeTableData
.
push
({
id
:
bean
.
userId
,
pId
:
item
.
roleId
,
name
:
bean
.
userMation
.
name
,
departmentName
:
bean
.
userMation
.
departmentName
,
phone
:
bean
.
userMation
.
phone
,
email
:
bean
.
userMation
.
email
});
});
});
// 解析权限信息
$
.
each
(
json
.
bean
.
teamObjectPermissionList
,
function
(
i
,
item
)
{
var
authGroupKey
=
item
.
permissionKey
;
var
authKey
=
item
.
permissionValue
;
var
checkParams
=
getInPoingArr
(
treeTableData
,
"
id
"
,
item
.
ownerId
);
if
(
checkParams
!=
null
)
{
var
roleId
=
checkParams
.
pId
==
'
0
'
?
checkParams
.
id
:
checkParams
.
pId
;
var
userId
=
checkParams
.
pId
==
'
0
'
?
''
:
checkParams
.
id
;
var
id
=
authGroupKey
+
'
_
'
+
authKey
+
'
_
'
+
roleId
+
'
_
'
+
userId
;
checkTrueList
.
push
(
id
);
}
});
reloadTreeTable
();
textool
.
init
({
eleId
:
'
remark
'
,
maxlength
:
200
});
matchingLanguage
();
form
.
render
();
form
.
on
(
'
submit(formEditBean)
'
,
function
(
data
)
{
if
(
winui
.
verifyForm
(
data
.
elem
))
{
var
teamRoleList
=
getTeamRoleList
();
if
(
teamRoleList
.
length
==
0
)
{
winui
.
window
.
msg
(
'
团队成员不能为空
'
,
{
icon
:
2
,
time
:
2000
});
return
false
;
}
var
teamObjectPermissionList
=
getTeamObjectPermissionList
();
var
params
=
{
id
:
json
.
bean
.
id
,
businessId
:
objectId
,
businessKey
:
objectKey
,
teamRoleList
:
JSON
.
stringify
(
teamRoleList
),
teamObjectPermissionList
:
JSON
.
stringify
(
teamObjectPermissionList
)
};
AjaxPostUtil
.
request
({
url
:
reqBasePath
+
"
updateTeamBusiness
"
,
params
:
params
,
type
:
'
json
'
,
method
:
"
POST
"
,
callback
:
function
(
json
)
{
parent
.
layer
.
close
(
index
);
parent
.
refreshCode
=
'
0
'
;
}});
}
return
false
;
});
}
});
function
loadTreeTable
()
{
tableTree
.
render
({
id
:
'
messageTable
'
,
elem
:
'
#messageTable
'
,
data
:
[],
// 该参数不能删除,分页参数无效,目前只能通过设置10000来保证当前页最大的数据量
limit
:
10000
,
cols
:
[[
{
field
:
'
name
'
,
title
:
'
名称
'
,
width
:
160
},
{
field
:
'
departmentName
'
,
title
:
'
部门
'
,
width
:
120
},
{
field
:
'
phone
'
,
title
:
'
联系方式
'
,
width
:
140
},
{
field
:
'
email
'
,
title
:
'
邮箱
'
,
width
:
200
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
150
,
toolbar
:
'
#tableBar
'
}
]],
done
:
function
(
json
)
{
matchingLanguage
();
}
},
{
keyId
:
'
id
'
,
keyPid
:
'
pId
'
,
title
:
'
name
'
,
defaultShow
:
true
,
});
tableTree
.
getTable
().
on
(
'
tool(messageTable)
'
,
function
(
obj
)
{
var
data
=
obj
.
data
;
var
layEvent
=
obj
.
event
;
if
(
layEvent
===
'
removeRole
'
)
{
// 移除角色和该角色下的用户
$
.
each
(
treeTableData
,
function
(
index
,
item
)
{
if
(
item
.
id
==
data
.
id
||
item
.
pId
==
data
.
id
)
{
treeTableData
.
splice
(
index
,
1
);
}
});
restCheckbox
();
reloadTreeTable
();
}
else
if
(
layEvent
===
'
addUser
'
)
{
// 添加成员
var
roleId
=
data
.
id
;
systemCommonUtil
.
userReturnList
=
[];
systemCommonUtil
.
chooseOrNotMy
=
"
1
"
;
// 人员列表中是否包含自己--1.包含;其他参数不包含
systemCommonUtil
.
chooseOrNotEmail
=
"
2
"
;
// 人员列表中是否必须绑定邮箱--1.必须;其他参数没必要
systemCommonUtil
.
checkType
=
"
1
"
;
// 人员选择类型,1.多选;其他。单选
systemCommonUtil
.
openSysUserStaffChoosePage
(
function
(
userReturnList
)
{
var
userList
=
[].
concat
(
userReturnList
);
$
.
each
(
userList
,
function
(
i
,
item
)
{
// 一个用户在一个团队中只能属于一个角色
var
checkParams
=
getInPoingArr
(
treeTableData
,
"
id
"
,
item
.
id
);
if
(
checkParams
==
null
)
{
item
[
'
pId
'
]
=
roleId
;
treeTableData
.
push
(
item
);
}
});
restCheckbox
();
reloadTreeTable
();
});
}
else
if
(
layEvent
===
'
removeUser
'
)
{
// 移除成员
var
roleId
=
data
.
pId
;
var
userId
=
data
.
id
;
$
.
each
(
treeTableData
,
function
(
index
,
item
)
{
if
(
!
isNull
(
item
)
&&
item
.
pId
==
roleId
&&
item
.
id
==
userId
)
{
treeTableData
.
splice
(
index
,
1
);
}
});
restCheckbox
();
reloadTreeTable
();
}
});
}
// 刷新成员树表格
function
reloadTreeTable
()
{
var
data
=
$
.
extend
(
true
,
[],
treeTableData
);
tableTree
.
reload
(
"
messageTable
"
,
{
data
:
data
});
loadAuthList
();
}
loadAuthList
();
form
.
on
(
'
select(objectType)
'
,
function
(
data
)
{
checkTrueList
=
[];
loadAuthList
();
});
function
getTeamRoleList
()
{
var
teamRoleList
=
[];
$
.
each
(
treeTableData
,
function
(
i
,
item
)
{
var
teamRole
=
{};
if
(
item
.
pId
==
'
0
'
)
{
// 角色
teamRole
[
'
roleId
'
]
=
item
.
id
;
// 查询这个角色下的用户
var
roleUserList
=
[];
$
.
each
(
treeTableData
,
function
(
j
,
bean
)
{
if
(
bean
.
pId
==
item
.
id
)
{
roleUserList
.
push
({
userId
:
bean
.
id
});
}
});
teamRole
[
'
teamRoleUserList
'
]
=
roleUserList
;
teamRoleList
.
push
(
teamRole
);
}
});
return
teamRoleList
;
}
function
getTeamObjectPermissionList
()
{
var
checkRow
=
$
(
"
#authList input[type='checkbox']:checked
"
);
var
teamObjectPermissionList
=
[];
$
.
each
(
checkRow
,
function
(
i
,
item
)
{
var
id
=
$
(
item
).
attr
(
'
id
'
);
var
str
=
id
.
split
(
'
_
'
);
var
authGroupKey
=
str
[
0
];
var
authKey
=
str
[
1
];
var
roleId
=
str
[
2
];
var
userId
=
str
[
3
];
teamObjectPermissionList
.
push
({
permissionKey
:
authGroupKey
,
permissionValue
:
authKey
,
ownerId
:
isNull
(
userId
)
?
roleId
:
userId
,
ownerKey
:
isNull
(
userId
)
?
sysServiceMation
[
"
dictData
"
][
"
key
"
]
:
sysServiceMation
[
"
userInfo
"
][
"
key
"
],
fromType
:
1
});
});
return
teamObjectPermissionList
;
}
function
loadAuthList
()
{
var
objectType
=
$
(
'
#objectType
'
).
val
();
// 加载该受用类型的团队可以设置哪些权限
var
colsList
=
teamObjectPermissionUtil
.
getAuthCols
(
objectType
);
$
(
'
#authList
'
).
html
(
getDataUseHandlebars
(
$
(
'
#authTableTemplate
'
).
html
(),
{
list
:
colsList
}));
$
.
each
(
colsList
,
function
(
i
,
item
)
{
var
data
=
$
.
extend
(
true
,
[],
treeTableData
);
// 给数据设置权限组的key,
$
.
each
(
data
,
function
(
j
,
bean
)
{
bean
.
authGroupKey
=
item
.
id
;
});
loadAuthTreeTable
(
item
.
id
,
item
.
cols
,
data
);
});
$
.
each
(
checkTrueList
,
function
(
i
,
id
)
{
$
(
`input[id='
${
id
}
']`
).
prop
(
"
checked
"
,
true
);
});
form
.
render
(
'
checkbox
'
);
form
.
on
(
'
checkbox(checkClick)
'
,
function
(
obj
)
{
var
id
=
$
(
this
).
attr
(
'
id
'
);
var
str
=
id
.
split
(
'
_
'
);
var
authGroupKey
=
str
[
0
];
var
authKey
=
str
[
1
];
var
roleId
=
str
[
2
];
var
userId
=
str
[
3
];
var
name
=
authGroupKey
+
'
_
'
+
authKey
+
'
_
'
+
roleId
;
var
_table
=
$
(
`div[lay-id='
${
authGroupKey
}
']`
);
if
(
isNull
(
userId
))
{
// 如果用户id为空,代表点击的是角色的选择box,需要把name是这个的都选中
if
(
obj
.
elem
.
checked
)
{
_table
.
find
(
`input[name='
${
name
}
']`
).
prop
(
"
checked
"
,
true
);
}
else
{
_table
.
find
(
`input[name='
${
name
}
']`
).
prop
(
"
checked
"
,
false
);
}
}
else
{
if
(
obj
.
elem
.
checked
)
{
if
(
_table
.
find
(
`input[name='
${
name
}
']:checked`
).
length
==
_table
.
find
(
`input[name='
${
name
}
']`
).
length
-
1
)
{
$
(
`input[id='
${
name
}
_']`
).
prop
(
"
checked
"
,
true
);
}
}
else
{
$
(
`input[id='
${
name
}
_']`
).
prop
(
"
checked
"
,
false
);
}
}
restCheckbox
();
form
.
render
(
'
checkbox
'
);
});
}
function
restCheckbox
()
{
// 将所有选中的重新放入 checkTrueList 中,防止出现操作成员信息时无法回显
var
checkRow
=
$
(
"
#authList input[type='checkbox']:checked
"
);
checkTrueList
=
[];
$
.
each
(
checkRow
,
function
(
i
,
item
)
{
checkTrueList
.
push
(
$
(
item
).
attr
(
'
id
'
));
});
}
function
loadAuthTreeTable
(
id
,
cols
,
data
)
{
tableTree
.
render
({
id
:
id
,
elem
:
'
#
'
+
id
,
data
:
data
,
// 该参数不能删除,分页参数无效,目前只能通过设置10000来保证当前页最大的数据量
limit
:
10000
,
cols
:
[
cols
],
},
{
keyId
:
'
id
'
,
keyPid
:
'
pId
'
,
title
:
'
name
'
,
defaultShow
:
true
,
});
}
$
(
"
body
"
).
on
(
"
click
"
,
"
#addRole
"
,
function
()
{
_openNewWindows
({
url
:
"
../../tpl/sysDictData/sysDictDataSelectChoose.html?sysDictType=teamRole
"
,
title
:
'
选择角色
'
,
pageId
:
"
sysDictDataSelectChoose
"
,
area
:
[
'
50vw
'
,
'
50vh
'
],
callBack
:
function
(
refreshCode
,
turnData
)
{
var
checkParams
=
getInPoingArr
(
treeTableData
,
"
id
"
,
turnData
.
id
);
if
(
checkParams
==
null
)
{
turnData
[
"
pId
"
]
=
'
0
'
;
turnData
[
"
lay_is_open
"
]
=
true
;
treeTableData
.
push
(
turnData
);
reloadTreeTable
();
}
else
{
winui
.
window
.
msg
(
"
角色重复
"
,
{
icon
:
2
,
time
:
2000
});
}
}});
});
$
(
"
body
"
).
on
(
"
click
"
,
"
#cancle
"
,
function
()
{
parent
.
layer
.
close
(
index
);
});
});
\ No newline at end of file
base-server/src/main/resources/template/tpl/teamBusiness/teamBusinessDetails.html
0 → 100644
浏览文件 @
8d4b98e8
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"padding:20px; margin:0 auto;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
</form>
</div>
<script
type=
"text/x-handlebars-template"
id=
"showTemplate"
>
{{
#
bean
}}
<
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
=
"
winui-tip alert-info
"
id
=
"
showInfo
"
>
一个用户在一个团队中只能属于一个角色
。
<
/div
>
<
div
style
=
"
margin:auto 10px;
"
>
<
table
id
=
"
messageTable
"
lay
-
filter
=
"
messageTable
"
><
/table
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
span
class
=
"
hr-title
"
>
权限信息
<
/span><hr
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
id
=
"
authList
"
>
<
/div
>
{{
/
bean
}}
</script>
<script
type=
"text/x-handlebars-template"
id=
"authTableTemplate"
>
{{
#
list
}}
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
{{
title
}}
:
<
/label
>
<
div
class
=
"
layui-input-block
"
>
<
table
id
=
"
{{id}}
"
lay
-
filter
=
"
{{id}}
"
><
/table
>
<
/div
>
<
/div
>
{{
/
list
}}
</script>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/teamBusiness/
'
}).
use
(
'
teamBusinessDetails
'
);
</script>
</body>
</html>
\ No newline at end of file
base-server/src/main/resources/template/tpl/teamBusiness/teamBusinessEdit.html
0 → 100644
浏览文件 @
8d4b98e8
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
/>
<title></title>
<link
href=
"../../assets/lib/layui/css/layui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
style=
"padding:20px; margin:0 auto;"
>
<form
class=
"layui-form"
action=
""
id=
"showForm"
autocomplete=
"off"
>
</form>
</div>
<script
type=
"text/x-handlebars-template"
id=
"showTemplate"
>
{{
#
bean
}}
<
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
=
"
winui-tip alert-info
"
id
=
"
showInfo
"
>
一个用户在一个团队中只能属于一个角色
。
<
/div
>
<
div
class
=
"
winui-toolbar
"
>
<
div
class
=
"
winui-tool
"
style
=
"
text-align: left;
"
>
<
button
id
=
"
addRole
"
class
=
"
winui-toolbtn
"
type
=
"
button
"
><
i
class
=
"
fa fa-plus
"
aria
-
hidden
=
"
true
"
><
/i>添加角色</
button
>
<
/div
>
<
/div
>
<
div
style
=
"
margin:auto 10px;
"
>
<
table
id
=
"
messageTable
"
lay
-
filter
=
"
messageTable
"
><
/table
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
span
class
=
"
hr-title
"
>
权限信息
<
/span><hr
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
id
=
"
authList
"
>
<
/div
>
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
div
class
=
"
layui-input-block
"
>
<
button
class
=
"
winui-btn
"
id
=
"
cancle
"
><
language
showName
=
"
com.skyeye.cancel
"
><
/language></
button
>
<
button
class
=
"
winui-btn
"
lay
-
submit
lay
-
filter
=
"
formEditBean
"
><
language
showName
=
"
com.skyeye.save
"
><
/language></
button
>
<
/div
>
<
/div
>
{{
/
bean
}}
</script>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
d
.
pId
==
'
0
'
){
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-normal
"
lay
-
event
=
"
addUser
"
>
添加成员
<
/a
>
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
removeRole
"
>
移除
<
/a
>
{{
#
}
else
{
}}
<
a
class
=
"
layui-btn layui-btn-xs layui-btn-danger
"
lay
-
event
=
"
removeUser
"
>
移除
<
/a
>
{{
#
}
}}
</script>
<script
type=
"text/x-handlebars-template"
id=
"authTableTemplate"
>
{{
#
list
}}
<
div
class
=
"
layui-form-item layui-col-xs12
"
>
<
label
class
=
"
layui-form-label
"
>
{{
title
}}
<
i
class
=
"
red
"
>*<
/i></
label
>
<
div
class
=
"
layui-input-block
"
>
<
table
id
=
"
{{id}}
"
lay
-
filter
=
"
{{id}}
"
><
/table
>
<
/div
>
<
/div
>
{{
/
list
}}
</script>
<script
src=
"../../assets/lib/layui/layui.js"
></script>
<script
src=
"../../assets/lib/layui/custom.js"
></script>
<script
type=
"text/javascript"
>
layui
.
config
({
base
:
'
../../js/teamBusiness/
'
}).
use
(
'
teamBusinessEdit
'
);
</script>
</body>
</html>
\ No newline at end of file
crm/src/main/resources/template/js/customerManage/customerManage.js
浏览文件 @
8d4b98e8
...
...
@@ -18,7 +18,10 @@ layui.config({
title
:
'
详情
'
,
pageUrl
:
'
../../tpl/customerManage/customerDetails.html
'
}],
suffixData
:
[],
suffixData
:
[{
title
:
'
团队
'
,
pageUrl
:
'
../../tpl/teamBusiness/teamBusinessDetails.html
'
}],
element
:
layui
.
element
,
objectType
:
"
1
"
,
object
:
{
...
...
web/src/main/resources/template/assets/lib/layui/customer/common/systemCommonUtil.js
浏览文件 @
8d4b98e8
...
...
@@ -784,13 +784,17 @@ var tabPageUtil = {
pageList
=
tabPageUtil
.
addPageMation
(
pageList
);
tabPageUtil
.
config
.
pageList
=
pageList
;
$
(
`#
${
tabPageUtil
.
config
.
id
}
`
).
html
(
tabPageUtil
.
manageTabHtml
);
// 初始化设置第一个为默认页面
$
(
"
#manageTab
"
).
find
(
"
.layui-tab-title
"
).
html
(
getDataUseHandlebars
(
$
(
'
#headerTemplate
'
).
html
()
,
{
rows
:
pageList
}));
$
(
"
#manageTab
"
).
find
(
"
.layui-tab-title
"
).
html
(
getDataUseHandlebars
(
tabPageUtil
.
headerTemplate
,
{
rows
:
pageList
}));
$
(
"
#manageTab
"
).
find
(
"
.layui-tab-title
"
).
find
(
'
li
'
).
eq
(
0
).
addClass
(
'
layui-this
'
);
$
(
"
#manageTab
"
).
find
(
"
.layui-tab-content
"
).
html
(
getDataUseHandlebars
(
$
(
'
#contentTemplate
'
).
html
()
,
{
rows
:
pageList
}));
$
(
"
#manageTab
"
).
find
(
"
.layui-tab-content
"
).
html
(
getDataUseHandlebars
(
tabPageUtil
.
contentTemplate
,
{
rows
:
pageList
}));
$
(
"
#manageTab
"
).
find
(
"
.layui-tab-content
"
).
find
(
'
.layui-tab-item
'
).
eq
(
0
).
addClass
(
'
layui-show
'
);
tabPageUtil
.
setPageUrl
(
pageList
[
0
]);
tabPageUtil
.
initEvent
();
},
initEvent
:
function
()
{
...
...
@@ -820,6 +824,10 @@ var tabPageUtil = {
pageList
.
push
(
item
);
});
}
// 移除权限文字
$
.
each
(
pageList
,
function
(
i
,
item
)
{
item
.
title
=
item
.
title
.
replace
(
'
权限
'
,
''
);
});
return
pageList
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录