Merge pull request '设置权限、admin、市场总监可以看所有数据' (#398) from feature/wx_share into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/398
master
廖金灵 4 years ago
commit 87e3de37c4

@ -31,8 +31,9 @@ class SocietyInfoController extends ThinkController
{ {
$model = M($this->modelName, 'tab_'); $model = M($this->modelName, 'tab_');
$map = []; $map = [];
if ($this->admininfo['username'] == "admin" || isMarketLeader()) {
// admin 和 市场总监可以看所有数据 if ($this->checkRule("Admin/SocietyInfo/lists", array('in','1,2')) || isMarketLeader() || is_administrator()) {
// 设置权限、admin、市场总监可以看所有数据
} else { } else {
// 其他用户只能看自己的 // 其他用户只能看自己的
$map['create_account'] = $this->admininfo['username']; $map['create_account'] = $this->admininfo['username'];
@ -125,7 +126,6 @@ class SocietyInfoController extends ThinkController
return ; return ;
} else { } else {
$societyInfos = $order_query->page($page,$row)->field("*")->select(); $societyInfos = $order_query->page($page,$row)->field("*")->select();
// dump($order_query->_sql());die();
} }
//分页 //分页
@ -157,9 +157,13 @@ class SocietyInfoController extends ThinkController
if (IS_ROOT) { if (IS_ROOT) {
$this->assign('timeset_check',true); $this->assign('timeset_check',true);
$this->assign('delset_check',true); $this->assign('delset_check',true);
$this->assign('export_check', true);
$this->assign('import_check', true);
} else { } else {
$this->assign('timeset_check',$this->checkRule("Admin/SocietyInfo/timeset" ,array('in','1,2'))); $this->assign('timeset_check', $this->checkRule("Admin/SocietyInfo/timeset" ,array('in','1,2')));
$this->assign('delset_check',$this->checkRule("Admin/SocietyInfo/delset" ,array('in','1,2'))); $this->assign('delset_check', $this->checkRule("Admin/SocietyInfo/delset" ,array('in','1,2')));
$this->assign('export_check', $this->checkRule("Admin/Society/lists_export_check" ,array('in','1,2')));
$this->assign('import_check', $this->checkRule("Admin/SocietyInfo/excelImport" ,array('in','1,2')));
} }

@ -108,10 +108,12 @@
<a class="sch-btn" href="{:U('add')}">新增</a> <a class="sch-btn" href="{:U('add')}">新增</a>
</div> </div>
<div class="input-list"> <div class="input-list">
<a class="sch-btn" href="javascript:;" id="excel_in">导入</a> <if condition="$import_check eq true">
<a class="sch-btn" href="javascript:;" id="excel_in">导入</a>
</if>
</div> </div>
<div class="input-list"> <div class="input-list">
<if condition="$role_export_check eq true "> <if condition="$export_check eq true ">
<a class="sch-btn" href="javascript:;" id="downloadexcel" url="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')),false)}">导出</a> <a class="sch-btn" href="javascript:;" id="downloadexcel" url="{:U(CONTROLLER_NAME.'/'.ACTION_NAME,array_merge(['export'=>1],I('get.')),false)}">导出</a>
</if> </if>
</div> </div>

Loading…
Cancel
Save