فهرست منبع

7.27登陆页完成

liuqiao 3 سال پیش
والد
کامیت
f29ac858ce
4فایلهای تغییر یافته به همراه75 افزوده شده و 37 حذف شده
  1. 15 13
      src/components/Login/index.vue
  2. 4 4
      src/layout/index.vue
  3. 4 3
      src/permission.js
  4. 52 17
      src/views/indexLayout/index.vue

+ 15 - 13
src/components/Login/index.vue

@@ -366,23 +366,25 @@ export default {
       };
       request(param)
         .then(res=>{
-          if(res.mobileNo&&res.userType==='2'&&this.loginTitle === 0){
-            this.mobileForm.zmobile=res.mobileNo
-            this.mobileFlog='5'
-            this.formFlog=1
-            this.closeShow=false
-            return
-          }
-          if(!res.mobileNo&&res.userType==='0'){
-            this.mobileFlog='6'
-            this.formFlog=1
-            this.closeShow=false
-            return
-          }
+          // if(res.mobileNo&&res.userType==='2'&&this.loginTitle === 0){
+          //   this.mobileForm.zmobile=res.mobileNo
+          //   this.mobileFlog='5'
+          //   //this.formFlog=1
+          //   this.closeShow=false
+          //   return
+          // }
+          // if(!res.mobileNo&&res.userType==='0'){
+          //   this.mobileFlog='6'
+          //   //this.formFlog=1
+          //   this.closeShow=false
+          //   return
+          // }
               this.$message.success("登录成功!");
               this.loginForm.password = "";
               this.loading = false;
               this.close();
+             this.$router.replace(`/home/myproject`) 
+
         })
         .catch(err=>{})
     },

+ 4 - 4
src/layout/index.vue

@@ -50,7 +50,7 @@
               <div class="user">
                 <el-dropdown>
                   <div>
-                    <span :title="name">{{ name }}</span>
+                    <span class="login text_color" :title="name">{{ name }}</span>
                     <i class="el-icon-arrow-down" />
                   </div>
                   <el-dropdown-menu slot="dropdown">
@@ -105,15 +105,15 @@
     </div>
      <el-dialog
   :visible.sync="dialogsystem"
-  title="系统设置"
-  width="800px"
+  title="主题更换"
+  width="480px"
   >
   <div>
    <button v-for="(item,index) in itemlist" :key='index'  @click="clicksel(index)">{{item.name}}</button>
     </div>
     <!-- <span :data-theme='theme'></span> -->
   <span slot="footer" class="dialog-footer">
-    <el-button @click="dialogsystem = false">清 除</el-button>
+    <el-button @click="dialogsystem = false">关闭</el-button>
   </span>
 </el-dialog>
     <Login :loginShow="loginShow" @putLogin="getLogin" />

+ 4 - 3
src/permission.js

@@ -8,7 +8,7 @@ import { Caegw_LogUrl } from '@/settings' // 引入settings.js
 
 NProgress.configure({ showSpinner: false }) // NProgress配置
 
-const whiteList = ['/fail404', '/home','/sso','/home/myproject','/home/openproject','/index','/login/index','/register/index', '/forget/index', '/protocol/index','/indexLayout/index']// 免登录的'白名单
+const whiteList = ['/fail404', '/home','/sso','/login/index','/register/index', '/forget/index', '/protocol/index','/indexLayout/index']// 免登录的'白名单
 // 前置路由守卫
 router.beforeEach(async (to, from, next) => {
   NProgress.start() // 开启进度条
@@ -37,9 +37,10 @@ router.beforeEach(async (to, from, next) => {
         type: 'warning'
       })
         .then(() => {
+          next(`/indexLayout/index'?type=reLogin`) 
           // next(`/login/index?redirect=${to.path}`) // 在没有访问权限的其他页面将重定向到登录页
-          const errUril = window.location.protocol+"//"+window.location.host+"/"+this.$store.getters.logUrl
-          window.location.href=errUril
+          // const errUril = window.location.protocol+"//"+window.location.host+"/"+this.$store.getters.logUrl
+          // window.location.href=errUril
           NProgress.done() // 关闭进度条
         })
         .catch(() => {

+ 52 - 17
src/views/indexLayout/index.vue

@@ -3,23 +3,12 @@
   <div class="workbench">
     <div class="container">
       <div class="solver">
-            <el-image
-            :src="getImage('b7b4532a3085457a9d7260439ae00002')"
-            :fit="fit"
-          ></el-image>
-        <div
-          :class="[
-            'solver-list',
-            dataList[0].preprocessDisplayStyle == 2 ||
-            dataList[0].cfdDisplayStyle == 2
-              ? 'full'
-              : '',
-          ]"
-          v-for="(list, index) in dataList[0] ? dataList[0].kindRows : []"
+        <div class="solver-list"
+          v-for="(list, index) in dataList"
           :key="index"
         >
           <el-image
-            :src="getImage('b7b4532a3085457a9d7260439ae00004')"
+            :src="getImage(list.imgid)"
             :fit="fit"
           ></el-image>
           <!-- <img v-if="list.kindId" :src="getImage(list.kindId)" /> -->
@@ -88,7 +77,43 @@ export default {
       // platformIds: 'ed4f8bb6257344878d9d68783787fc3d',
       pretreatment: '',
       solver: '',
-      dataList: [],
+      dataList: [
+        {
+          imgid:"b7b4532a3085457a9d7260439ae00004",
+          kindName:"声学分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10001"
+        },
+         {
+          imgid:"b7b4532a3085457a9d7260439ae00005",
+          kindName:"光学分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10004"
+        },
+         {
+          imgid:"b7b4532a3085457a9d7260439ae00006",
+          kindName:"多物理场分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10005"
+        },
+         {
+          imgid:"b7b4532a3085457a9d7260439ae00007",
+          kindName:"辐射分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10006"
+        },
+         {
+          imgid:"b7b4532a3085457a9d7260439ae00008",
+          kindName:"结构分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10007"
+        },
+         {
+          imgid:"b7b4532a3085457a9d7260439ae00003",
+          kindName:"电磁分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10002"
+        },
+         {
+          imgid:"b7b4532a3085457a9d7260439ae00004",
+          kindName:"流体分析",
+          kindPicIconId:"b7b4532a3085457a9d7260439ae10003"
+        },
+      ],
       fit: 'fill',
       tab:false,
       displaystyle:false,
@@ -118,8 +143,8 @@ export default {
    // this.getData() 
   },
   methods: {
+ 
     getImage(id) {
-      console.log(id);
       return getImage(id)
     },
     getData() {
@@ -203,8 +228,12 @@ export default {
   @include w_h(100%);
   font-size: 12px;
   color: $color_b;
-  padding: 0 $pad;
+  padding: 0 20px;
   overflow: hidden;
+ height: calc(100vh - 75px);
+     display: flex;
+    justify-content: center;
+    align-items: center;
   .tab {
     @include flex(space-between, flex-start);
     overflow: hidden;
@@ -272,6 +301,7 @@ export default {
     min-height: 378px;
     max-height: 720px;
     padding: 21px 0 12px;
+    height: 800px;
     h3 {
       font-size: 18px;
       line-height: 40px;
@@ -336,6 +366,7 @@ export default {
           opacity: 0;
           transition: all 0.8s;
           overflow: auto;
+          display: none;
           .title {
             @include w_h(100%, 40px);
             @include flex();
@@ -474,4 +505,8 @@ color: rgba($color: #ffffff, $alpha: 0.4);
     }
   }
 }
+.solver-list .el-image{
+  height: 800px;
+
+}
 </style>