Browse Source

草稿箱发布接口联调

xiebeibei 4 years ago
parent
commit
d49962c71e
3 changed files with 439 additions and 412 deletions
  1. 417 409
      package-lock.json
  2. 6 1
      src/api/editer.js
  3. 16 2
      src/views/drafts.vue

File diff suppressed because it is too large
+ 417 - 409
package-lock.json


+ 6 - 1
src/api/editer.js

@@ -70,7 +70,12 @@ export function queryStatistic(data,params){
 export function queryDraftGroup(data,params){
     return httputils.getJson(`${testApi}/graph/draftGroup`,data, params)
 }
-// 草稿箱专业楼层结构查询
+//根据id删除图形信息
 export function deleteGraph(params){
     return httputils.postJson(`${testApi}/graph/delete`, params)
+}
+
+// 发布系统图
+export function publishGraph(params){
+    return httputils.getJson(`${testApi}/graph/publish`, params)
 }

+ 16 - 2
src/views/drafts.vue

@@ -12,7 +12,7 @@
             <div class="tit-left" v-if="floorName">{{systemName}}-{{floorName}}</div>
             <div class="tit-right">
               <a-button @click="deleteBtn">删除</a-button>
-              <a-button>发布</a-button>
+              <a-button @click="publishBtn">发布</a-button>
               <a-button type="primary" @click="goToEditer">编辑</a-button>
             </div>
           </div>
@@ -69,7 +69,8 @@ import {
   readGroup,
   queryDraftGroup,
   queryStatistic,
-  deleteGraph
+  deleteGraph,
+  publishGraph
 } from "@/api/editer.js";
 import { STopologyParser } from "./../lib/parsers/STopologyParser";
 import { uuid } from "@/components/mapClass/until";
@@ -254,6 +255,19 @@ export default {
         }
       })
     },
+    //发布
+    publishBtn(){
+      this.spinning = true;
+      publishGraph({graphId :this.graphId ,pubUser:''}).then(res=>{
+        this.spinning = false;
+        if(res.Result =='success'){
+          this.$message.success(res.Message)
+        }else{
+          this.$message.error(res.Message)
+
+        }
+      })
+    },
     /**
      * @name goToEditer
      * @description t跳转editer编辑器