From 1655a625e3c4791b2a25ffa4555433ad7dc65b07 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期三, 23 三月 2022 23:36:18 +0800
Subject: [PATCH] 限制不允许修改basic用户权限

---
 src/pages/ai/index/App.vue |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/src/pages/ai/index/App.vue b/src/pages/ai/index/App.vue
index 1ab5b8a..36972a1 100644
--- a/src/pages/ai/index/App.vue
+++ b/src/pages/ai/index/App.vue
@@ -143,7 +143,10 @@
                   class="front-page-item"
                   v-for="(item, index) in tempList"
                   :key="index"
-                  @click="checkDetail(item)"
+                  @click="checkDetail(item, 'Appcenter')"
+                  :class="{
+                    disabled: activeName == '搴旂敤涓績' && !item.canUpOrIns,
+                  }"
                 >
                   <div class="icon-img">
                     <span class="icon iconfont" v-if="item.isUpgrade"
@@ -170,7 +173,7 @@
                       type="primary"
                       class="other-btn"
                       round
-                      @click="checkDetail(item)"
+                      @click="checkDetail(item, 'Appcenter')"
                       v-if="activeName == '搴旂敤涓績' && item.price > 0"
                       >婵�娲�</el-button
                     >
@@ -619,6 +622,10 @@
       }
     },
     checkDetail(item, typ) {
+      if (!item.canUpOrIns && typ == "Appcenter") {
+        return false;
+      }
+
       this.inDetail = true;
       this.detailProductID = item.id;
       this.detailPrice = item.price;
@@ -688,7 +695,7 @@
           }
         })
         .catch((e) => {
-          _this.$notify.warning(e.data);
+          _this.$notify.warning(e.msg);
           clearInterval(timer);
           app.upgradeLoading = false;
         });
@@ -794,6 +801,10 @@
       });
     },
     actived(item) {
+      if (!item.canUpOrIns) {
+        return false;
+      }
+
       let _this = this;
       if (this.activeTab == "sdk") {
         actPageAlg(item.id, "")
@@ -1324,6 +1335,10 @@
             height: 76px;
             border-radius: 4px;
 
+            &.disabled {
+              cursor: default;
+            }
+
             .icon-img {
               width: 58px;
               height: 58px;

--
Gitblit v1.8.0