wugg 8 months ago
parent
commit
7c0a283980
2 changed files with 9 additions and 0 deletions
  1. 8 0
      app/bug/controller/Work.php
  2. 1 0
      app/bug/route/app.php

+ 8 - 0
app/bug/controller/Work.php

@@ -99,6 +99,14 @@ class Work extends Base{
 			return error($exception->getMessage());
 		 }
 	}
+	public function info(){
+		$id=$this->request->post("id/d");
+		$info = $this->model->with(['workTemplate'])->findOrEmpty($id);
+		if($info->isEmpty()) error("未找到数据");
+		if(!is_null($info->workTemplate))$info->workTemplate->actionInfo= (new WorkAction())->GetTreeActionByIdArr
+		($info->workTemplate->action,$info->belong);
+		return success('查询成功',$info);
+	}
 	
 			//岗位模板新建
 	public function delete(){

+ 1 - 0
app/bug/route/app.php

@@ -46,6 +46,7 @@ Route::rule("manangeloglist","bug/Manange/loglist");
 Route::rule("work_create","bug/Work/create");
 Route::rule("work_save","bug/Work/save");
 Route::rule("work_delete","bug/Work/delete");
+Route::rule("work_info","bug/Work/info");
 Route::rule("work_list","bug/Work/list");
 Route::rule("work_status","bug/Work/status");
 Route::rule("work_action_create","bug/Work/WorkActionCreate");