Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
From-wh 2023-05-06 15:22:56 +08:00
commit 5196dde140
4 changed files with 13 additions and 5 deletions

View File

@ -40,12 +40,19 @@ class SystemMenus extends AuthController
/**
* 菜单展示列表
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 吴汐
* @email 442384644@qq.com
* @date 2023/05/06
*/
public function index()
{
$where = $this->request->getMore([
['is_show', ''],
['keyword', ''],
['auth_type', ''],
]);
return app('json')->success($this->services->getList($where));
}

View File

@ -231,6 +231,8 @@ class SystemMenus extends BaseModel
*/
public function searchAuthTypeAttr($query, $value)
{
$query->where('auth_type', $value);
if ($value !== '') {
$query->where('auth_type', $value);
}
}
}

View File

@ -152,8 +152,8 @@ class SystemMenusServices extends BaseServices
$field[] = Form::frameInput('icon', '图标', $this->url(config('app.admin_prefix', 'admin') . '/widget.widgets/icon', ['fodder' => 'icon']), $formData['icon'] ?? '')->icon('md-add')->height('505px')->modal(['footer-hide' => true]);
$field[] = Form::number('sort', '排序', (int)($formData['sort'] ?? 0))->precision(0);
$field[] = Form::radio('auth_type', '类型', $formData['auth_type'] ?? 1)->options([['value' => 2, 'label' => '接口'], ['value' => 1, 'label' => '菜单(包含页面按钮)']]);
$field[] = Form::radio('is_show', '状态', $formData['is_show'] ?? 1)->options([['value' => 0, 'label' => '关闭'], ['value' => 1, 'label' => '开启']]);
$field[] = Form::radio('is_show_path', '是否为前端隐藏菜单', $formData['is_show_path'] ?? 0)->options([['value' => 1, 'label' => '是'], ['value' => 0, 'label' => '否']]);
$field[] = Form::radio('is_show', '权限状态', $formData['is_show'] ?? 1)->options([['value' => 1, 'label' => '开启'], ['value' => 0, 'label' => '关闭']]);
$field[] = Form::radio('is_show_path', '是否显示', $formData['is_show_path'] ?? 0)->options([['value' => 1, 'label' => '显示'], ['value' => 0, 'label' => '隐藏']]);
[$menuList, $data] = $this->getFormCascaderMenus((int)($formData['pid'] ?? 0));
$field[] = Form::cascader('menu_list', '父级id', $data)->data($menuList)->filterable(true);
return $field;

View File

@ -66,8 +66,7 @@ class Arr
$temp['icon'] = $v['icon'];
$temp['header'] = $v['header'];
$temp['is_header'] = $v['is_header'];
$temp['is_show'] = $v['is_show'];
$temp['is_show_path'] = $v['is_show_path'];
$temp['is_show'] = $v['is_show_path'];
if ($v['is_show_path']) {
$temp['auth'] = ['hidden'];
}