liuqiao 3 年之前
父节点
当前提交
8f5705224e
共有 5 个文件被更改,包括 41 次插入125 次删除
  1. 1 1
      src/components/Forget/index.vue
  2. 1 1
      src/components/Login/index.vue
  3. 15 41
      src/layout/index.vue
  4. 13 13
      src/router/index.js
  5. 11 69
      src/views/indexLayout/index.vue

+ 1 - 1
src/components/Forget/index.vue

@@ -338,7 +338,7 @@ export default {
 }
 .marsk {
   @include position(fixed, 0, 0, 0, 0, 1000);
-  background: rgba(4, 112, 204, 0.05);
+  // background: rgba(4, 112, 204, 0.05);
 }
 
 .slide-fade-enter-active {

+ 1 - 1
src/components/Login/index.vue

@@ -484,7 +484,7 @@ div /deep/.mobileItem .el-input__inner{
   }
 .marsk {
   @include position(fixed, 0, 0, 0, 0, 1000);
-  background: rgba(4, 112, 204, 0.05);
+  // background: rgba(4, 112, 204, 0.05);
 }
 .title {
    padding-bottom: 20px;

+ 15 - 41
src/layout/index.vue

@@ -5,9 +5,7 @@
           <router-link to="/home">
         <div class="logo">
         <el-image :src="logo" fit="cover" /> </div>
-        <!-- <span class="title">CADWEB</span> -->
         </router-link> 
-
       <div
         v-if="
           $route.path !== '/login' &&
@@ -41,7 +39,7 @@
             </div>
     
           <el-menu-item index="/index/optics" >
-            <router-link to="/index/optics" ><span>首页</span></router-link>
+            <router-link to="/index/optics" ><span class="text_color">首页</span></router-link>
           </el-menu-item>
     
           <el-menu-item      background-color="background-color: rgba($color: #0158a8, $alpha: 0.1);"
@@ -71,7 +69,7 @@
       </div>
     </div>
 
-    <section class="app-main">
+    <section class="app-main  lbg_color2">
       <transition name="fade-transform" mode="out-in">
         <router-view :key="key" />
       </transition>
@@ -178,29 +176,19 @@ export default {
     $route: {
       handler: function (route) {
         this.redirect = route.query && route.query.redirect
-        this.getCount() // 获取统计信息
-         //判断是否是前沿的logo;
-     
-        if(route.path=="/indexLayout/workbench"||route.path=="/indexLayout/home"||route.path=="/indexLayout/guanyuwe"){
-          this.flag=false;
-          this.yingyong=true;
-        }  else{
-          this.flag=true;
-          this.yingyong=true;
-        }
       },
       immediate: true,
     },
   },
   mounted(){
-       if(localStorage.getItem("num")==1){
-       document.getElementById('theme').href="/static/white.css"
-    }else{
-      console.log(localStorage.getItem("num"))
-               document.getElementById('theme').href="/static/black.css"
-  
-    }
-  },
+ setTimeout(function(){
+if(localStorage.getItem("num")==0){
+        document.getElementById('theme').href="/static/black.css"
+      }else{
+         document.getElementById('theme').href="/static/white.css"
+      }
+ },100)
+},
   created() {
    
   },
@@ -208,7 +196,6 @@ export default {
   provide() {
     return {
       toLogin: this.toLogin,
-      getCount: this.getCount,
     }
   },
   computed: {
@@ -254,7 +241,7 @@ export default {
           let pretreatment= sessionStorage.getItem("pretreatment",pretreatment);
           let solver=  sessionStorage.getItem("pretreatment",solver);
              this.$router.replace({
-                path: '/indexLayout/workbench',
+                path: '/indexLayout/index',
               query: {id, pretreatment, solver },
               })
       //  if(path=="/indexLayout/design"){
@@ -321,7 +308,7 @@ export default {
       this.$message.success('退出成功!')
       setTimeout(() => {
         // this.$router.replace(`/login?redirect=${this.$route.fullPath}`)
-        this.$router.replace(`/indexLayout/workbench`)
+        this.$router.replace(`/indexLayout/index`)
       }, 1000)
     },
     logout() {
@@ -344,24 +331,11 @@ export default {
           this.$message.info('已取消')
         })
     },
-    getCount() {
-      this.runProject = 0
-      this.totalProject = 0
-      this.user = 0
-      this.activeUser = 0
-      request({ transCode: 'C00005' })
-        .then((res) => {
-          this.runProject = parseInt(res.runProject)
-          this.totalProject = parseInt(res.totalProject)
-          this.user = parseInt(res.user)
-          this.activeUser = parseInt(res.activeUser)
-        })
-        .catch((err) => {})
-    },
+  
        //  主题替换
   clicksel(index){
       if(index==0){
-        this.num=0;
+        this.num=index;
       localStorage.setItem("num",this.num);
         document.getElementById('theme').href="/static/black.css"
       }else if(index==1){
@@ -481,7 +455,7 @@ export default {
 }
 .app-main {
     width: 100%;
-    height: calc(100vh - 85px);
+    height: calc(100vh - 75px);
 }
 .footer {
   @include w_h(100%, 35px);

+ 13 - 13
src/router/index.js

@@ -25,7 +25,18 @@ export const constantRoutes = [
     component: Layout,
     redirect: 'noRedirect',
   },
-
+  {
+    path: '/indexLayout/index',
+    component: Layout,
+    children:[{
+      path: '/indexLayout/index',
+      name: '/indexLayout/index',
+      component: () => import('@/views/indexLayout/index'),
+      meta: { title: '首页', icon: '' },
+      hidden: true,
+    }]
+  
+  },
     //CDA的路由
     {
       path: '/home',
@@ -68,18 +79,7 @@ export const constantRoutes = [
       }]
     
     },
-    {
-      path: '/indexLayout/index',
-      component: Layout,
-      children:[{
-        path: '/index',
-        name: 'index',
-        component: () => import('@/views/indexLayout/index'),
-        meta: { title: '项目新建', icon: '' },
-        hidden: true,
-      }]
-    
-    },
+  
   // 登陆
   {
     path: '/login',

+ 11 - 69
src/views/indexLayout/index.vue

@@ -1,40 +1,12 @@
-/*workbench*/
+/*登陆页*/
 <template>
   <div class="workbench">
-    <div class="tab" v-show="tab">
-      <div
-        :class="[
-          'tab-list',
-          'tab-before',
-          currentPage === 'pretreatment' ? 'tab-on' : '',
-        ]"
-        @click="selectTab('pretreatment')"
-      >
-        前处理
-      </div>
-      <div class="logo">
-        <img
-          :src="dataList[0] ? getImage(dataList[0].platformTitlePicId) : ''"
-        />
-      </div>
-      <div
-        :class="[
-          'tab-list',
-          'tab-after',
-          currentPage === 'solver' ? 'tab-on' : '',
-        ]"
-        @click="selectTab('solver')"
-      >
-        求解器
-      </div>
-    </div>
-    <!-- <div class="container" v-if="currentPage === 'pretreatment'">
-      <h3>前处理</h3>
-      <div class="content">敬请期待!</div>
-    </div>
-    <div class="container" v-if="currentPage === 'solver'"> -->
     <div class="container">
       <div class="solver">
+            <el-image
+            :src="getImage('b7b4532a3085457a9d7260439ae00002')"
+            :fit="fit"
+          ></el-image>
         <div
           :class="[
             'solver-list',
@@ -47,8 +19,7 @@
           :key="index"
         >
           <el-image
-            v-if="list.kindId"
-            :src="getImage(list.kindId)"
+            :src="getImage('b7b4532a3085457a9d7260439ae00004')"
             :fit="fit"
           ></el-image>
           <!-- <img v-if="list.kindId" :src="getImage(list.kindId)" /> -->
@@ -80,7 +51,7 @@
             <div class="title">
               <span>{{ list.kindName }}</span>
               <div class="img" v-if="list.kindPicIconId">
-                <img :src="getImage(list.kindPicIconId)" />
+                <img :src="getImage('list.kindPicIconId')" />
               </div>
               <svg-icon v-else icon-class="acoustics" />
             </div>
@@ -114,7 +85,7 @@ export default {
   data() {
     return {
       currentPage: 'solver',
-      platformIds: '',
+      // platformIds: 'ed4f8bb6257344878d9d68783787fc3d',
       pretreatment: '',
       solver: '',
       dataList: [],
@@ -144,45 +115,17 @@ export default {
     })
   },
   mounted(){
-this.jiazai();
+   // this.getData() 
   },
   methods: {
-    // 获取id
-  jiazai(){
-        const params = {
-          transCode: 'C00038',
-        }
-        request(params)
-          .then((res) => {;
-            let id=res.rows[0].platformId;
-            let pretreatment=res.rows[0].preprocessDisplayStyle;
-            let solver=res.rows[0].cfdDisplayStyle;
-          this.platformIds = id;
-           this.pretreatment =pretreatment;
-           this.solver =solver;
-           this.currentPage = solver != 0 ? 'solver' : 'pretreatment';
-           this.getData();
-          })
-          .catch((err) => {})
-  },
-       // 切换tab
-  
-    selectTab(index) {
-      if (
-        (index == 'pretreatment' && this.pretreatment == 0) ||
-        (index == 'solver' && this.solver == 0)
-      )
-        return
-      this.currentPage = index
-      this.getData()
-    },
     getImage(id) {
+      console.log(id);
       return getImage(id)
     },
     getData() {
       const params = {
         transCode: 'C00035',
-        platformIds: this.platformIds,
+         platformIds: this.platformIds,
         cfdType:
           this.currentPage == 'solver'
             ? '2'
@@ -261,7 +204,6 @@ this.jiazai();
   font-size: 12px;
   color: $color_b;
   padding: 0 $pad;
-  background: #181818;
   overflow: hidden;
   .tab {
     @include flex(space-between, flex-start);