提交 17ac553d authored 作者: chengye's avatar chengye

解决合并冲突

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
......@@ -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
......@@ -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'])){
......
......@@ -42,9 +42,7 @@
<a title="设置数据权限" onclick="xadmin.open('数据权限配置','/staff_role_department/{$item.id}')" href="javascript:;">
<i class="layui-icon iconfont">&#xe70c;</i>
</a>
<!-- <a title="删除" onclick="member_del(this,'{$item.id}')" href="javascript:;">
<i class="layui-icon">&#xe640;</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;
}
}
});
});
......
{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">&#xe7e4;</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">&#xe642;</i>
</a>
<a title="设置数据权限" onclick="xadmin.open('数据权限配置','/staff_role_department/{$item.id}')" href="javascript:;">
<i class="layui-icon iconfont">&#xe70c;</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('&#xe62f;');
$(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('&#xe601;');
$(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
......@@ -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)
......
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论