Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
17ac553d
提交
17ac553d
authored
5月 06, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
差异文件
解决合并冲突
上级
b953579c
acbbf49d
显示空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
252 行增加
和
63 行删除
+252
-63
.gitattributes
.gitattributes
+5
-0
.gitignore
.gitignore
+3
-0
Basestation.php
application/admin/controller/Basestation.php
+14
-14
role.html
application/admin/view/staff/role.html
+1
-48
role1.html
application/admin/view/staff/role1.html
+227
-0
getUserToken.js
public/dist/js/getUserToken.js
+1
-1
admin.php
route/admin.php
+1
-0
没有找到文件。
.gitattributes
0 → 100644
浏览文件 @
17ac553d
config/cache.php merge=ours
config/admin.php merge=ours
config/session.php merge=ours
config/admin.php merge=ours
\ No newline at end of file
.gitignore
浏览文件 @
17ac553d
...
...
@@ -15,7 +15,9 @@
/config/cache.php
/config/session.php
/config/cookie.php
/config/jz.php
/public/dist
/public/dist2
/public/static/uploads
/public/static/xadmin
/application/admin/view/staff/role.html
\ No newline at end of file
application/admin/controller/Basestation.php
浏览文件 @
17ac553d
...
...
@@ -484,13 +484,13 @@ class Basestation extends Base
public
function
basestation_map
(
Request
$request
){
$id
=
$request
->
get
(
'station_name'
);
$db
=
Db
::
connect
([
'type'
=>
'mysql'
,
'hostname'
=>
'127.0.0.1'
,
'database'
=>
'jzdb'
,
'username'
=>
'root'
,
'password'
=>
'pvv5718J0CwhNfn4B^8^H3igPj#oiQkX'
,
'hostport'
=>
'10036'
,
'charset'
=>
'utf8'
,
'type'
=>
config
(
'jz.jztype'
)
,
'hostname'
=>
config
(
'jz.jzhostname'
)
,
'database'
=>
config
(
'jz.jzdatabase'
)
,
'username'
=>
config
(
'jz.jzusername'
)
,
'password'
=>
config
(
'jz.jzpassword'
)
,
'hostport'
=>
config
(
'jz.jzhostport'
)
,
'charset'
=>
config
(
'jz.jzcharset'
)
,
]);
$data
=
$db
->
table
(
'jz_message'
)
->
field
(
'business_id'
)
->
where
([
'jz_name'
=>
$id
])
->
find
();
$this
->
assign
(
'data'
,
$data
[
'business_id'
]);
...
...
@@ -499,13 +499,13 @@ class Basestation extends Base
public
function
basestation_region
(
Request
$request
){
$db
=
Db
::
connect
([
'type'
=>
'mysql'
,
'hostname'
=>
'127.0.0.1'
,
'database'
=>
'jzdb'
,
'username'
=>
'root'
,
'password'
=>
'pvv5718J0CwhNfn4B^8^H3igPj#oiQkX'
,
'hostport'
=>
'10036'
,
'charset'
=>
'utf8'
,
'type'
=>
config
(
'jz.jztype'
)
,
'hostname'
=>
config
(
'jz.jzhostname'
)
,
'database'
=>
config
(
'jz.jzdatabase'
)
,
'username'
=>
config
(
'jz.jzusername'
)
,
'password'
=>
config
(
'jz.jzpassword'
)
,
'hostport'
=>
config
(
'jz.jzhostport'
)
,
'charset'
=>
config
(
'jz.jzcharset'
)
,
]);
$data
[
'business_id'
]
=
$request
->
get
(
'station_id'
);
if
(
empty
(
$data
[
'business_id'
])){
...
...
application/admin/view/staff/role.html
浏览文件 @
17ac553d
...
...
@@ -42,9 +42,7 @@
<a
title=
"设置数据权限"
onclick=
"xadmin.open('数据权限配置','/staff_role_department/{$item.id}')"
href=
"javascript:;"
>
<i
class=
"layui-icon iconfont"
>

</i>
</a>
<!-- <a title="删除" onclick="member_del(this,'{$item.id}')" href="javascript:;">
<i class="layui-icon"></i>
</a> -->
</td>
</tr>
{/foreach}
...
...
@@ -65,52 +63,7 @@
<script
src=
"dist/js/getUserToken.js"
></script>
<script>
layui
.
use
([
'laydate'
,
'form'
,
'upload'
],
function
(){
var
laydate
=
layui
.
laydate
;
var
form
=
layui
.
form
;
upload
=
layui
.
upload
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#start'
//指定元素
});
//执行一个laydate实例
laydate
.
render
({
elem
:
'#end'
//指定元素
});
var
EmImport
=
upload
.
render
({
elem
:
'#EmImport'
,
url
:
'/basestation_import'
,
accept
:
'file'
,
field
:
'file_name'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
if
(
res
.
status
==
0
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
else
{
//layMsg(res.message,5)
return
;
}
}
});
});
...
...
application/admin/view/staff/role1.html
0 → 100644
浏览文件 @
17ac553d
{extend name="public:form" /}
{block name="body"}
<div
class=
"layui-fluid"
>
<div
class=
"layui-row layui-col-space15"
>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<form
class=
"layui-form"
>
</form>
</div>
<div
class=
"layui-card-header"
>
<button
class=
"layui-btn"
onclick=
"synUser()"
id=
"sameIsadmin"
><i
class=
"layui-icon layui-icon-refresh"
></i>
同步
</button>
<button
class=
"layui-btn"
id=
"EmImport"
>
<i
class=
"layui-icon iconfont"
>

</i></button>
</div>
<div
class=
"layui-card-body "
>
<table
class=
"layui-table layui-form"
>
<thead>
<tr>
<th>
姓名
</th>
<th>
部门
</th>
<th>
角色权限
</th>
<th>
操作
</th>
</thead>
<tbody>
{foreach $data as $item}
<tr>
<td>
{$item.name}
</td>
<td>
{$item.department.name|default='广厦网络'}
</td>
<td>
{volist name="$item.roles" id="role" empty="$empty"}
[{$role.title}]
{/volist}
</td>
<td
class=
"td-manage"
>
<a
title=
"设置功能权限"
onclick=
"xadmin.open('设置功能权限','/staff_role_edit/{$item.id}')"
href=
"javascript:;"
>
<i
class=
"layui-icon"
>

</i>
</a>
<a
title=
"设置数据权限"
onclick=
"xadmin.open('数据权限配置','/staff_role_department/{$item.id}')"
href=
"javascript:;"
>
<i
class=
"layui-icon iconfont"
>

</i>
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
<script
src=
"dist/js/api.js"
></script>
<script
src=
"dist/js/layer.js"
></script>
<script
src=
"dist/js/md5.js"
></script>
<script
src=
"dist/js/sha1.js"
></script>
<script
src=
"dist/js/util.js"
></script>
<script
src=
"dist/js/getUserToken.js"
></script>
<script>
layui
.
use
([
'laydate'
,
'form'
,
'upload'
],
function
(){
var
laydate
=
layui
.
laydate
;
var
form
=
layui
.
form
;
upload
=
layui
.
upload
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#start'
//指定元素
});
//执行一个laydate实例
laydate
.
render
({
elem
:
'#end'
//指定元素
});
var
EmImport
=
upload
.
render
({
elem
:
'#EmImport'
,
url
:
'/basestation_import'
,
accept
:
'file'
,
field
:
'file_name'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
if
(
res
.
status
==
0
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
else
{
//layMsg(res.message,5)
return
;
}
}
});
});
/*用户-停用*/
function
member_stop
(
obj
,
id
){
layer
.
confirm
(
'确认要停用吗?'
,
function
(
index
){
if
(
$
(
obj
).
attr
(
'title'
)
==
'启用'
){
//发异步把用户状态进行更改
$
(
obj
).
attr
(
'title'
,
'停用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
addClass
(
'layui-btn-disabled'
).
html
(
'已停用'
);
layer
.
msg
(
'已停用!'
,{
icon
:
5
,
time
:
1000
});
}
else
{
$
(
obj
).
attr
(
'title'
,
'启用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
removeClass
(
'layui-btn-disabled'
).
html
(
'已启用'
);
layer
.
msg
(
'已启用!'
,{
icon
:
5
,
time
:
1000
});
}
});
}
/*用户-删除*/
function
member_del
(
obj
,
id
){
layer
.
confirm
(
'确认要删除吗?'
,
function
(
index
){
//发异步删除数据
var
url
=
'/staff_role_del'
;
$
.
ajax
({
url
:
url
,
method
:
"POST"
,
data
:
{
id
:
id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
){
layer
.
msg
(
data
.
message
,{
icon
:
1
,
time
:
1000
});
location
.
reload
()
}
else
{
layer
.
alert
(
data
.
message
,
{
icon
:
5
});
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrow
)
{
console
.
log
(
'AJAX 执行删除失败...'
);
}
});
});
}
function
delAll
(
argument
)
{
var
data
=
tableCheck
.
getData
();
layer
.
confirm
(
'确认要删除吗?'
+
data
,
function
(
index
){
//捉到所有被选中的,发异步进行删除
layer
.
msg
(
'删除成功'
,
{
icon
:
1
});
$
(
".layui-form-checked"
).
not
(
'.header'
).
parents
(
'tr'
).
remove
();
});
}
function
synUser
()
{
layer
.
confirm
(
'确定要同步吗?'
,
{
skin
:
'layui-layer-lan'
,
btn
:[
'取消'
,
'确认'
],
icon
:
3
,
title
:
'提示'
},
function
(
index
,
layero
){
layer
.
close
(
index
);
},
function
(
index
,
layero
){
var
indexload
=
layer
.
load
(
0
,
{
shade
:
[
0.7
,
'#fff'
]
//0.7透明度的白色背景
});
let
time
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
let
app_secret
=
'4d8e605fa7ed546c4bcb33dee1381179'
;
let
serverAuthenticateStaticKey
=
'de5kio2f'
;
var
temp
=
hex_sha1
(
app_secret
+
time
+
serverAuthenticateStaticKey
);
var
sign
=
hex_md5
(
temp
);
util
.
ajax
({
type
:
'get'
,
dataType
:
'json'
,
url
:
util
.
interfaceUrl
+
interfacenName
.
synSuser
,
data
:
{
timestamp
:
time
,
sign
:
sign
},
success
:
(
res
)
=>
{
if
(
res
.
code
==
"200"
){
setTimeout
(
function
()
{
layer
.
close
(
indexload
)
},
1500
)
layer
.
msg
(
"同步成功"
)
}
else
{
setTimeout
(
function
()
{
layer
.
close
(
indexload
)
},
1500
)
layer
.
msg
(
res
.
message
)
}
},
error
:
function
(
err
)
{
layer
.
msg
(
'网络接口异常'
)
}
});
})
}
</script>
{/block}
\ No newline at end of file
public/dist/js/getUserToken.js
浏览文件 @
17ac553d
...
...
@@ -2,7 +2,7 @@ let userIdLocal = document.cookie.split('user=')[1]?(document.cookie.split('user
let
temp
=
sessionStorage
.
getItem
(
'userIdLocal'
)?
sessionStorage
.
getItem
(
'userIdLocal'
):
''
if
(
userIdLocal
==
''
)
top
.
location
.
href
=
"http://oa
.gonn.com.cn
/"
;
if
(
userIdLocal
==
''
)
top
.
location
.
href
=
"http://oa
-test.gonn.tech
/"
;
if
(
temp
!=
userIdLocal
||
!
sessionStorage
.
getItem
(
'userToken'
)){
sessionStorage
.
setItem
(
"userIdLocal"
,
userIdLocal
)
...
...
route/admin.php
浏览文件 @
17ac553d
...
...
@@ -147,6 +147,7 @@ Route::get('useage/:useage_id','em/useage/detail');
Route
::
get
(
'useage_add/:id'
,
'em/useage/create'
);
Route
::
post
(
'useage_add'
,
'em/useage/store'
);
Route
::
post
(
'useage_del'
,
'em/useage/del'
);
Route
::
get
(
'useage_update/:useage_id'
,
'em/useage/update'
);
Route
::
post
(
'upFile'
,
'em/UploadFile/upFile'
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论