Pārlūkot izejas kodu

Merge branch 'develop' of http://39.106.8.246:3003/web/persagy_topo_editer into develop

YaolongHan 4 gadi atpakaļ
vecāks
revīzija
a536de29f1

+ 8 - 4
src/components/homeView/recycle.vue

@@ -1,7 +1,8 @@
 <template>
   <el-dialog title="回收站" :visible.sync="dialogVisible" :fullscreen="true" custom-class="recycleDialog" @close="dialogClose">
     <div class="main-head">
-      <el-input placeholder="搜索" prefix-icon="el-icon-search" size="small" v-model="queryText" @keyup.native.enter="changeQueryText" style="width: 192px;">
+      <el-input placeholder="搜索" prefix-icon="el-icon-search" size="small" v-model="queryText" @keyup.native.enter="changeQueryText"
+        style="width: 192px;">
       </el-input>
       <div class="head-right">
         <Dropdown class="Dropdown" v-model="selVal" :data="dataSelect">
@@ -9,7 +10,7 @@
         </Dropdown>
       </div>
     </div>
-    <div class="main-body" :class="{'no-data': !cardList.length}">
+    <div class="main-body" :class="{'no-data': !cardList.length}" v-loading="recycleLoading">
       <template v-for="t in cardList">
         <topoImageCard :isRecycle="true" :data="t" :key="t.id" @recover="recover" @deleteRecycle="deleteRecycle"></topoImageCard>
       </template>
@@ -24,7 +25,7 @@
 </template>
 
 <script>
-import { recoveryGraph, queryDraftsGraph } from "@/api/home"
+import { queryDraftsGraph } from "@/api/home"
 import { Dropdown } from "meri-design";
 import topoImageCard from "@/components/homeView/topoImageCard.vue";
 import recycleDialog from "@/components/homeView/recycleDialog.vue";
@@ -43,7 +44,8 @@ export default {
         { id: "createTime", name: "按创建时间" }
       ], // 排序选项
       cardList: [],
-      title: '恢复'
+      title: '恢复',
+      recycleLoading: false,
     };
   },
   methods: {
@@ -56,6 +58,7 @@ export default {
     },
     // 查询图形信息
     queryGraph() {
+      this.recycleLoading = true;
       const pa = {
         Filters: `state=4`,
         Orders: `${this.selVal} desc`
@@ -69,6 +72,7 @@ export default {
           return t;
         });
         this.queryText = '';
+        this.recycleLoading = false;
       })
 
     },

+ 6 - 2
src/components/homeView/topoImageCard.vue

@@ -97,8 +97,12 @@ export default {
           break;
         case "publish":
           publishGraph(pa).then(res => {
-            this.$message.success("发布成功");
-            this.$emit('publishSuc')
+            if (res.result == "success") {
+              this.$message.success("发布成功");
+              this.$emit('publishSuc')
+            } else {
+              this.$message.success("发布失败");
+            }
           });
           break;
       }

+ 6 - 2
src/views/home.vue

@@ -47,7 +47,7 @@
             <i class="el-icon-close" style="float:right;line-height: 28px;margin-right: 5px;" @click="handleCheckAllChange(false)"></i>
           </div>
         </div>
-        <div class="main-body">
+        <div class="main-body" v-loading="cardLoading">
           <div class="has-data-body" v-if="cardList.length">
             <template v-for="t in cardList">
               <topoImageCard :isPub="isPub" :data="t" :key="t.id" @changeCheck="changeCheck" @rename="rename" @publishSuc="updateSuc" @moveTo="moveTo"
@@ -121,7 +121,8 @@ export default {
       noTreeFlag: true, // 左侧树是否有数据-默认有
       popVisible: false,
       categoryName: '', // 跳转编辑页面时分类名称
-      imgUrl: '/image-service/common/image_get?systemId=dataPlatform&key='
+      imgUrl: '/image-service/common/image_get?systemId=dataPlatform&key=',
+      cardLoading: false,
     };
   },
   methods: {
@@ -244,6 +245,7 @@ export default {
       if (!this.curCategory.code) {
         return
       }
+      this.cardLoading = true
       this.selectCard = [];
       const pa = {
         filters: `categoryId="${this.curCategory.code}"`,
@@ -259,6 +261,7 @@ export default {
             return t;
           });
           this.queryText = '';
+          this.cardLoading = false
         })
       } else {
         pa.filters += ";state=1"
@@ -268,6 +271,7 @@ export default {
             return t;
           });
           this.queryText = '';
+          this.cardLoading = false
         })
       }
     }