Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Skyeye云
Skyeye
提交
a2d68425
S
Skyeye
项目概览
Skyeye云
/
Skyeye
通知
1435
Star
162
Fork
130
代码
文件
提交
分支
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看板
提交
a2d68425
编写于
7月 24, 2022
作者:
Skyeye云
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【CRM】客户列表新增数据权限控制
上级
b34ab52c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
70 addition
and
72 deletion
+70
-72
crm/src/main/resources/template/js/customermanage/customerlist.js
...main/resources/template/js/customermanage/customerlist.js
+24
-28
crm/src/main/resources/template/tpl/customermanage/customerlist.html
...n/resources/template/tpl/customermanage/customerlist.html
+6
-30
userauth/src/main/resources/template/tpl/syseverole/syseverolelist.html
...ain/resources/template/tpl/syseverole/syseverolelist.html
+6
-8
web/src/main/resources/template/assets/lib/layui/custom.js
web/src/main/resources/template/assets/lib/layui/custom.js
+21
-5
web/src/main/resources/template/assets/lib/layui/lay/modules/table.js
.../resources/template/assets/lib/layui/lay/modules/table.js
+13
-1
未找到文件。
crm/src/main/resources/template/js/customermanage/customerlist.js
浏览文件 @
a2d68425
...
@@ -11,18 +11,16 @@ layui.config({
...
@@ -11,18 +11,16 @@ layui.config({
var
$
=
layui
.
$
,
var
$
=
layui
.
$
,
form
=
layui
.
form
,
form
=
layui
.
form
,
table
=
layui
.
table
;
table
=
layui
.
table
;
var
selectOption
=
getFileContent
(
'
tpl/template/select-option.tpl
'
);
// 新增
authBtn
(
'
1570454924611
'
);
authBtn
(
'
1570454924611
'
);
// 所有客户
authBtn
(
'
1658637723975
'
);
// 我创建的
authBtn
(
'
1658637741078
'
);
// 我负责的
authBtn
(
'
1658637775025
'
);
// 客户分类
$
(
"
#typeBox
"
).
find
(
'
button
'
).
eq
(
0
).
addClass
(
'
plan-select
'
);
sysDictDataUtil
.
showDictDataListByDictTypeCode
(
sysDictData
[
"
crmCustomerType
"
][
"
key
"
],
'
select
'
,
"
typeId
"
,
''
,
form
);
// 客户来源
sysDictDataUtil
.
showDictDataListByDictTypeCode
(
sysDictData
[
"
crmCustomerFrom
"
][
"
key
"
],
'
select
'
,
"
fromId
"
,
''
,
form
);
// 客户所属行业
sysDictDataUtil
.
showDictDataListByDictTypeCode
(
sysDictData
[
"
crmCustomerIndustry
"
][
"
key
"
],
'
select
'
,
"
industryId
"
,
''
,
form
);
// 表格渲染
// 表格渲染
table
.
render
({
table
.
render
({
...
@@ -49,8 +47,11 @@ layui.config({
...
@@ -49,8 +47,11 @@ layui.config({
{
field
:
'
lastUpdateTime
'
,
title
:
'
最后修改时间
'
,
align
:
'
center
'
,
width
:
100
},
{
field
:
'
lastUpdateTime
'
,
title
:
'
最后修改时间
'
,
align
:
'
center
'
,
width
:
100
},
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
150
,
toolbar
:
'
#tableBar
'
}
{
title
:
systemLanguage
[
"
com.skyeye.operation
"
][
languageType
],
fixed
:
'
right
'
,
align
:
'
center
'
,
width
:
150
,
toolbar
:
'
#tableBar
'
}
]],
]],
done
:
function
(
)
{
done
:
function
(
json
)
{
matchingLanguage
();
matchingLanguage
();
initTableSearchUtil
.
initAdvancedSearch
(
this
,
json
.
searchFilter
,
form
,
"
请输入客户名称
"
,
function
()
{
table
.
reload
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
});
}
}
});
});
...
@@ -66,8 +67,6 @@ layui.config({
...
@@ -66,8 +67,6 @@ layui.config({
}
}
});
});
form
.
render
();
// 新增
// 新增
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
()
{
$
(
"
body
"
).
on
(
"
click
"
,
"
#addBean
"
,
function
()
{
_openNewWindows
({
_openNewWindows
({
...
@@ -117,12 +116,16 @@ layui.config({
...
@@ -117,12 +116,16 @@ layui.config({
}});
}});
});
});
}
}
// 搜索表单
$
(
"
body
"
).
on
(
"
click
"
,
"
.type-btn
"
,
function
(
e
)
{
$
(
"
body
"
).
on
(
"
click
"
,
"
#formSearch
"
,
function
()
{
$
(
"
.type-btn
"
).
removeClass
(
"
plan-select
"
);
refreshTable
();
$
(
this
).
addClass
(
"
plan-select
"
);
loadTable
();
});
});
form
.
render
();
// 刷新数据
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
$
(
"
body
"
).
on
(
"
click
"
,
"
#reloadTable
"
,
function
()
{
loadTable
();
loadTable
();
});
});
...
@@ -131,17 +134,10 @@ layui.config({
...
@@ -131,17 +134,10 @@ layui.config({
table
.
reload
(
"
messageTable
"
,
{
where
:
getTableParams
()});
table
.
reload
(
"
messageTable
"
,
{
where
:
getTableParams
()});
}
}
function
refreshTable
(){
table
.
reload
(
"
messageTable
"
,
{
page
:
{
curr
:
1
},
where
:
getTableParams
()});
}
function
getTableParams
(){
function
getTableParams
(){
return
{
return
$
.
extend
(
true
,
{
name
:
$
(
"
#customerName
"
).
val
(),
type
:
$
(
"
.plan-select
"
).
data
(
"
type
"
)
typeId
:
$
(
"
#typeId
"
).
val
(),
},
initTableSearchUtil
.
getSearchValue
(
"
messageTable
"
));
fromId
:
$
(
"
#fromId
"
).
val
(),
industryId
:
$
(
"
#industryId
"
).
val
()
};
}
}
exports
(
'
customerlist
'
,
{});
exports
(
'
customerlist
'
,
{});
...
...
crm/src/main/resources/template/tpl/customermanage/customerlist.html
浏览文件 @
a2d68425
...
@@ -7,39 +7,15 @@
...
@@ -7,39 +7,15 @@
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
<link
href=
"../../assets/lib/winui/css/winui.css"
rel=
"stylesheet"
/>
</head>
</head>
<body>
<body>
<div
class=
"txtcenter"
style=
"margin:0 auto;padding-top:10px;"
>
<div
style=
"margin: 0 auto; padding-top: 0px;"
id=
"typeBox"
>
<form
class=
"layui-form layui-form-pane"
action=
""
autocomplete=
"off"
>
<button
type=
"button"
class=
"layui-btn layui-btn-primary type-btn"
data-type=
"All"
auth=
"1658637723975"
><i
class=
"layui-icon"
></i>
所有
</button>
<div
class=
"layui-form-item"
>
<button
type=
"button"
class=
"layui-btn layui-btn-primary type-btn"
data-type=
"myCreate"
auth=
"1658637741078"
><i
class=
"layui-icon"
></i>
我创建的
</button>
<div
class=
"layui-inline"
>
<button
type=
"button"
class=
"layui-btn layui-btn-primary type-btn"
data-type=
"myCharge"
auth=
"1658637775025"
><i
class=
"layui-icon"
></i>
我负责的
</button>
<label
class=
"layui-form-label"
>
客户名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"customerName"
name=
"customerName"
placeholder=
"请输入客户名称"
class=
"layui-input"
/>
</div>
<label
class=
"layui-form-label"
>
客户分类
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"typeId"
name=
"typeId"
lay-filter=
"typeId"
lay-search=
""
>
</select>
</div>
<label
class=
"layui-form-label"
>
客户来源
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"fromId"
name=
"fromId"
lay-filter=
"fromId"
lay-search=
""
>
</select>
</div>
<label
class=
"layui-form-label"
>
所属行业
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"industryId"
name=
"industryId"
lay-filter=
"industryId"
lay-search=
""
>
</select>
</div>
<button
type=
"reset"
class=
"layui-btn layui-btn-primary list-form-search"
><language
showName=
"com.skyeye.reset"
></language></button>
<button
class=
"layui-btn list-form-search"
type=
"button"
id=
"formSearch"
><language
showName=
"com.skyeye.search2"
></language></button>
</div>
</div>
</form>
</div>
</div>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"reloadTable"
class=
"winui-toolbtn
search-table-btn-right
"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn"
auth=
"1570454924611"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn
search-table-btn-right
"
auth=
"1570454924611"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<div
style=
"margin:auto 10px;"
>
...
...
userauth/src/main/resources/template/tpl/syseverole/syseverolelist.html
浏览文件 @
a2d68425
...
@@ -9,25 +9,23 @@
...
@@ -9,25 +9,23 @@
<body>
<body>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-toolbar"
>
<div
class=
"winui-tool"
>
<div
class=
"winui-tool"
>
<button
id=
"reloadTable"
class=
"winui-toolbtn
search-table-btn-right"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"reloadTable"
class=
"winui-toolbtn search-table-btn-right"
><i
class=
"fa fa-refresh"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.refreshDataBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn
search-table-btn-right"
auth=
"1552954959607"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
<button
id=
"addBean"
class=
"winui-toolbtn search-table-btn-right"
auth=
"1552954959607"
><i
class=
"fa fa-plus"
aria-hidden=
"true"
></i><language
showName=
"com.skyeye.addBtn"
></language></button>
</div>
</div>
</div>
</div>
<div
style=
"margin:auto 10px;"
>
<div
style=
"margin:auto 10px;"
>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<table
id=
"messageTable"
lay-filter=
"messageTable"
></table>
<script
type=
"text/html"
id=
"tableBar"
>
<script
type=
"text/html"
id=
"tableBar"
>
{{
#
if
(
auth
(
'
1552900944072
'
)){
}}
{{
#
if
(
auth
(
'
1552900944072
'
))
{
}}
<
a
class
=
"
layui-btn layui-btn-normal layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
<
a
class
=
"
layui-btn layui-btn-normal layui-btn-xs
"
lay
-
event
=
"
edit
"
><
language
showName
=
"
com.skyeye.editBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
}
}}
{{
#
if
(
d
.
userNum
==
0
&&
auth
(
'
1552877034665
'
)){
}}
{{
#
if
(
d
.
userNum
==
0
&&
auth
(
'
1552877034665
'
))
{
}}
<
a
class
=
"
layui-btn layui-btn-danger layui-btn-xs
"
lay
-
event
=
"
del
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
<
a
class
=
"
layui-btn layui-btn-danger layui-btn-xs
"
lay
-
event
=
"
del
"
><
language
showName
=
"
com.skyeye.deleteBtn
"
><
/language></
a
>
{{
#
}
}}
{{
#
}
}}
{{
#
if
(
auth
(
'
1644726632357
'
)){
}}
{{
#
if
(
auth
(
'
1644726632357
'
))
{
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
pcMenu
"
>
PC菜单授权
<
/a
>
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
pcMenu
"
>
PC菜单授权
<
/a
>
{{
#
}
}}
{{
#
}
}}
<!--
{{
#
if
(
auth
(
'
1644726632357
'
)){
}}
-->
{{
#
if
(
auth
(
'
1563605807171
'
))
{
}}
<!--
{{
#
}
}}
-->
{{
#
if
(
auth
(
'
1563605807171
'
)){
}}
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
appmenu
"
>
APP菜单授权
<
/a
>
<
a
class
=
"
layui-btn layui-btn-xs
"
lay
-
event
=
"
appmenu
"
>
APP菜单授权
<
/a
>
{{
#
}
}}
{{
#
}
}}
</script>
</script>
...
...
web/src/main/resources/template/assets/lib/layui/custom.js
浏览文件 @
a2d68425
...
@@ -270,16 +270,32 @@ var postDownLoadFile = function(options) {
...
@@ -270,16 +270,32 @@ var postDownLoadFile = function(options) {
*/
*/
function
auth
(
urlNum
){
function
auth
(
urlNum
){
var
authList
=
JSON
.
parse
(
localStorage
.
getItem
(
"
authpoints
"
));
var
authList
=
JSON
.
parse
(
localStorage
.
getItem
(
"
authpoints
"
));
if
(
!
isNull
(
authList
))
{
if
(
!
isNull
(
authList
))
{
for
(
var
i
=
0
;
i
<
authList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
authList
.
length
;
i
++
)
{
if
(
authList
[
i
].
menuNum
===
urlNum
)
{
if
(
authList
[
i
].
menuNum
===
urlNum
)
{
return
true
;
return
true
;
}
else
{
// 数据权限分组不为空
if
(
authList
[
i
].
children
.
length
>
0
)
{
var
dataGroup
=
authList
[
i
].
children
;
for
(
var
j
=
0
;
j
<
dataGroup
.
length
;
j
++
)
{
// 数据权限不为空
if
(
dataGroup
[
j
].
children
.
length
>
0
)
{
var
dataAuthPoint
=
dataGroup
[
j
].
children
;
for
(
var
k
=
0
;
k
<
dataAuthPoint
.
length
;
k
++
)
{
if
(
dataAuthPoint
[
k
].
menuNum
===
urlNum
)
{
return
true
;
}
}
}
}
}
}
}
}
}
}
else
{
}
else
{
winui
.
window
.
msg
(
'
登录超时,即将返回登录页面.
'
,
{
icon
:
2
,
time
:
2000
},
function
()
{
winui
.
window
.
msg
(
'
登录超时,即将返回登录页面.
'
,
{
icon
:
2
,
time
:
2000
},
function
()
{
var
win
=
window
;
var
win
=
window
;
while
(
win
!=
win
.
top
){
while
(
win
!=
win
.
top
)
{
win
=
win
.
top
;
win
=
win
.
top
;
}
}
win
.
location
.
href
=
"
../../tpl/index/login.html
"
;
win
.
location
.
href
=
"
../../tpl/index/login.html
"
;
...
...
web/src/main/resources/template/assets/lib/layui/lay/modules/table.js
浏览文件 @
a2d68425
...
@@ -740,7 +740,19 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
...
@@ -740,7 +740,19 @@ layui.define(['laytpl', 'laypage', 'layer', 'form', 'util'], function(exports){
,
error
:
function
(
e
,
msg
){
,
error
:
function
(
e
,
msg
){
//移除请求遮罩层
//移除请求遮罩层
$
(
"
body
"
).
find
(
"
.mask-req-str
"
).
remove
();
$
(
"
body
"
).
find
(
"
.mask-req-str
"
).
remove
();
that
.
errorView
(
'
请求异常,错误提示:
'
+
msg
);
var
sessionstatus
=
e
.
getResponseHeader
(
'
SESSIONSTATUS
'
);
if
(
sessionstatus
==
"
TIMEOUT
"
)
{
// 超时跳转
var
win
=
window
;
while
(
win
!=
win
.
top
)
{
win
=
win
.
top
;
}
win
.
location
.
href
=
"
../../tpl/index/login.html
"
;
}
else
if
(
sessionstatus
==
"
NOAUTHPOINT
"
)
{
that
.
errorView
(
'
您不具备该权限。
'
);
}
else
{
that
.
errorView
(
'
请求异常,错误提示:
'
+
msg
);
}
that
.
renderForm
();
that
.
renderForm
();
that
.
setColsWidth
();
that
.
setColsWidth
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录