wugg 9 months ago
parent
commit
0764cf5fc1
2 changed files with 5 additions and 2 deletions
  1. 1 1
      app/admin/model/AdminMenu.php
  2. 4 1
      app/bug/controller/Work.php

+ 1 - 1
app/admin/model/AdminMenu.php

@@ -31,7 +31,7 @@ class AdminMenu extends Base
     public static function GetMenu($menuid){
     	$info=self::where(["id"=>$menuid,"is_del"=>0])->findOrEmpty();
     	if($info->pid>0){
-    		$paren = self::where(['pid'=>$info->pid,'is_del'=>0])->findOrEmpty();
+    		$paren = self::where(['id'=>$info->pid,'is_del'=>0])->findOrEmpty();
     	}
     	return ["menu_name"=>$info->menu_name,"parent_name"=>$paren->menu_name??"","parent_id"=>$info->pid];
     }

+ 4 - 1
app/bug/controller/Work.php

@@ -262,7 +262,10 @@ class Work extends Base{
 		$id=$this->request->post('id/d');
 		$info = WorkAction::where(['id'=>$id])->findOrEmpty();
 		if($info->isEmpty()) error('未找到数据');
-		return success('获取成功',$info);
+		$meun = $info->GetMenuList($info->menu_id,$info->belong);
+		$info->belong_action_info = $info->GetActionList($info->belong_action,$info->belong);
+		$info->belong_process_info = $info->GetProcessList($info->belong_process,$info->belong);
+		return success('获取成功',array_merge($info->toArray(),$meun));
 	}
 	public function WorkActionList(){
 		$param=$this->request->param(['menu_id'=>'','belong'=>0,'action_name'=>'',"page"=>1,"size"=>15],'post','trim');