Browse Source

选择编辑 推荐加排序 选择原件取并集

xiebeibei 4 years ago
parent
commit
721fa9848b
3 changed files with 18 additions and 16 deletions
  1. 4 0
      src/api/editer.js
  2. 4 7
      src/components/edit/edit-dialog.vue
  3. 10 9
      src/components/edit/left_toolbar.vue

+ 4 - 0
src/api/editer.js

@@ -108,4 +108,8 @@ export function graphElementQuery(params){
 //草稿箱原理图删除
 export function deleteByCategory(params){
     return httputils.postJson(`${testApi}/graph/deleteByCategory`, params)
+}
+// 推荐
+export function graphElementOrderInfoLocal(params){
+    return httputils.getJson(`${testApi}/graphElement/orderInfoLocal`, params)
 }

+ 4 - 7
src/components/edit/edit-dialog.vue

@@ -103,7 +103,7 @@
         queryWzfldl,
         queryWzflByDl,
         queryGlsmsLocation,
-        graphElementQuery
+        graphElementOrderInfoLocal
     } from "@/api/editer";
     import bus from "@/bus";
     import {getUrlMsg} from '@/components/urlMsg.js'
@@ -277,14 +277,11 @@
             tuijian(){
                 this.treeData = [];
                 this.spinning = true
-                graphElementQuery({
-                    "Filters": "id="+this.GraphElementId,
-                    "Projection": [
-                        "infoLocal"
-                    ]
+                graphElementOrderInfoLocal({
+                    graphElementId:this.GraphElementId,
                 }).then(res=>{
                     this.spinning = false;
-                    let data = res.Content[0].InfoLocal;
+                    let data = res.Data;
                     (function recursion(newObj) {
                         newObj.map(item => {
                             item.label = item.name;

+ 10 - 9
src/components/edit/left_toolbar.vue

@@ -351,16 +351,17 @@ export default {
         // 接口请求
         this.itemList = [];
         this.spinning = true;
-        const data = {
-          GraphCategoryIds: this.categoryId,
-          Type: item.type
-        };
-      await  queryGroup(data).then(res => {
-          this.itemList = res.Data;
-        });
+      //   const data = {
+      //     GraphCategoryIds: this.categoryId,
+      //     Type: item.type
+      //   };
+      // await  queryGroup(data).then(res => {
+      //     this.itemList = res.Data;
+      //   });
         const arr = {
           InfoSystems: this.categoryIdS,
-          Type: item.type
+          Type: item.type,
+          categoryId:this.categoryId
         };
        await graphElementGroup(arr).then(res => {
           this.spinning = false;
@@ -519,7 +520,7 @@ export default {
       obj[arr[0]] = arr[1];
     });
     this.categoryId = obj.categoryId;
-    this.categoryIdS.push(obj.categoryId);
+    // this.categoryIdS.push(obj.categoryId);
     this.categoryId;
   }
 };