Browse Source

Merge branch 'tech_pool_24'

hbchen 2 years ago
parent
commit
887505cf9c
2 changed files with 39 additions and 10 deletions
  1. 1 0
      src/views/question/List.vue
  2. 38 10
      src/views/sandBox/List.vue

+ 1 - 0
src/views/question/List.vue

@@ -540,6 +540,7 @@ onBeforeRouteLeave(()=>{
     z-index: 10;
     .first-nav-box{
       display:flex;
+      flex-wrap: wrap;
         span{
             display: inline-flex;
             align-items:center;

+ 38 - 10
src/views/sandBox/List.vue

@@ -24,6 +24,10 @@
             </div>
         </view>
     </template>
+    <!-- 部分有权限 分享进来没有权限 -->
+    <template v-if="sandBox.noAuthor ==4 && sandBox.isRequestFinished" >
+        <!-- 显示空白 一秒钟后跳转至有权限的沙盘图-->
+    </template>
     <div class="sandBox-contain" v-if="sandBox.noAuthor ==0 && sandBox.isRequestFinished">
         <div class="classify-box">
             <div class="firstClassify-box">
@@ -88,11 +92,11 @@
 </template>
 <script setup>
 import {h, reactive,computed,ref,onMounted,onActivated} from 'vue'
-import {useRouter,onBeforeRouteUpdate,useRoute} from "vue-router"
+import {useRouter,useRoute} from "vue-router"
 import {apiSandBoxPermission,apiSandBoxList,apiSandTableDetail} from "../../api/sandBox"
 import {apiReportIndexPageAuthList} from "../../api/report"
 import {apiApplyPermission} from "../../api/user"
-import { ElMessageBox } from 'element-plus'
+import { ElMessage, ElMessageBox } from 'element-plus'
 const router = useRouter()
 const route = useRoute()
 
@@ -159,10 +163,22 @@ const getSandBoxList=()=>{
                 // 申请
                 sandBox.noAuthor =1
             }else{
-                // 联系销售
-                sandBox.noAuthor =2
-                sandBox.salesData.name=data.name
-                sandBox.salesData.phone=data.mobile
+                if(data.jump){
+                    sandBox.noAuthor =4
+                    // jump 跳转,说明该用户是有部分权限,提示“暂无此权限”,跳转至有权限的分类
+                    ElMessage({
+                        message:"暂无此权限"
+                    })
+                    setTimeout(()=>{
+                        router.replace({path:'/sandBox/list'})
+                    },1000)
+                }else{
+                    // 联系销售
+                    sandBox.noAuthor =2
+                    sandBox.salesData.name=data.name
+                    sandBox.salesData.phone=data.mobile
+                }
+
             }
             return 
         }
@@ -192,10 +208,22 @@ const getSandTableDetail=()=>{
                 // 申请
                 sandBox.noAuthor =1
             }else{
-                // 联系销售
-                sandBox.noAuthor =2
-                sandBox.salesData.name=data.name
-                sandBox.salesData.phone=data.mobile
+                if(data.jump){
+                    sandBox.noAuthor =4
+                    // jump 跳转,说明该用户是有部分权限,提示“暂无此权限”,跳转至有权限的分类
+                    ElMessage({
+                        message:"暂无此权限"
+                    })
+                    setTimeout(()=>{
+                        router.replace({path:'/sandBox/list'})
+                    },1000)
+                }else{
+                    // 联系销售
+                    sandBox.noAuthor =2
+                    sandBox.salesData.name=data.name
+                    sandBox.salesData.phone=data.mobile
+                }
+
             }
             return 
         }