wangggziwen 1 hónapja
szülő
commit
4496d09fa6

+ 10 - 3
rc-admin/src/main/java/com/ruoyi/web/controller/rc/TStandardChapterController.java

@@ -41,10 +41,19 @@ public class TStandardChapterController extends BaseController
     private ITStandardChapterService tStandardChapterService;
 
     /**
-     * 查询标准模板章节列表
+     * 查询标准模板章节列表(list)
      */
     @GetMapping("/list")
     public AjaxResult list(TStandardChapter tStandardChapter)
+    {
+        return success(tStandardChapterService.selectTStandardChapterList(tStandardChapter));
+    }
+
+    /**
+     * 查询标准模板章节列表(tree)
+     */
+    @GetMapping("/listTree")
+    public AjaxResult listTree(TStandardChapter tStandardChapter)
     {
         //数组集合结构
         List<TStandardChapter> tStandardChapters = tStandardChapterService.selectTStandardChapterList(tStandardChapter);
@@ -108,9 +117,7 @@ public class TStandardChapterController extends BaseController
                 }
             }
         }
-
         return success(treeVo);
-//        return success(tStandardChapterService.selectTStandardChapterList(tStandardChapter));
     }
 
     /**

+ 8 - 0
ruoyi-ui/src/api/rc/standardchapter.js

@@ -9,6 +9,14 @@ export function listStandardChapter(query) {
   })
 }
 
+export function listStandardChapterTree(query) {
+  return request({
+    url: '/rc/standardchapter/listTree',
+    method: 'get',
+    params: query
+  })
+}
+
 // 查询标准模板章节详细
 export function getStandardChapter(id) {
   return request({

+ 2 - 5
ruoyi-ui/src/views/rc/standardchapter/index.vue

@@ -40,7 +40,7 @@
 </template>
 
 <script>
-import { listStandardChapter, getStandardChapter, delStandardChapter, addStandardChapter, updateStandardChapter } from "@/api/rc/standardchapter";
+import { listStandardChapterTree, getStandardChapter, delStandardChapter, addStandardChapter, updateStandardChapter } from "@/api/rc/standardchapter";
 
 export default {
   name: "StandardChapter",
@@ -102,11 +102,8 @@ export default {
     /** 查询章节列表 */
     getList() {
       this.loading = true;
-      listStandardChapter().then(response => {
-        // this.chapterList = response.data;
+      listStandardChapterTree().then(response => {
         this.treeData = response.data;
-        // console.log(this.treeData)
-        // console.log(response.data)
         this.total = response.total;
         this.loading = false;
       });