作者 张佳

... ... @@ -6,6 +6,7 @@ use think\Db;
use think\Request;
use util\MCurl;
use think\Cookie;
use think\cache;
use think\Session;
use app\common\model\products\department as departmentModel;
header("Content-type: text/html; charset=utf-8");
... ... @@ -42,6 +43,10 @@ class Department extends BaseController
if(!empty($data['result'])){
$where['departmentName']=['like', '%' . $data['result'] . '%'];
}
if(Cache::get('name') != 'admin'){
$where['mechanismId']= Cache::get('id');
}
//$org_id = session('organization.org_id');
$list= Db::table('sos_user_department')->alias('d')->join("sos_user_mechanism m", "m.id=d.mechanismId")->field('d.id,d.departmentName,d.createTime,mechanismName')->where($where)->limit($offset,$rows)->select()->toArray();
$total= Db::table('sos_user_department')->where($where)->count();
... ...
... ... @@ -95,7 +95,7 @@ class Role extends BaseController
$user=Cache::get('name');
$user_id=Cache::get('id');
$where = array();
if($user !='admin'){
$where['id']=$user_id;
}
... ...
... ... @@ -176,7 +176,7 @@
}
//操作框
function formatOper(val, row, index) {
return '<a href="javascript:void(0)" onclick="showUser(' + val + ')">编辑</a> <a href="javascript:void(0)" onclick="showUser(' + val + ')">查看</a>';
return '<a href="javascript:void(0)" onclick="showUser(' + val + ')">编辑</a> ';
}
... ...
... ... @@ -343,7 +343,7 @@
title: '部门管理'
}
});
$(id_MainIframe).attr('src','/web/Fu_ji_tong/index');
$(id_MainIframe).attr('src','/web/Department/index');
objMainTabs.tabs('selectById', 'AgentCarManage');
},
/**
... ...