Ver código fonte

门户页面配置

GXL 1 ano atrás
pai
commit
21b1871bd3
4 arquivos alterados com 109 adições e 31 exclusões
  1. 1 1
      src/layout/components/Navbar.vue
  2. 6 6
      src/router/index.js
  3. 1 3
      src/views/login.vue
  4. 101 21
      src/views/navigation.vue

+ 1 - 1
src/layout/components/Navbar.vue

@@ -138,7 +138,7 @@ export default {
         .confirm("确定注销并退出系统吗?", "提示")
         .then(() => {
           this.$store.dispatch("LogOut").then(() => {
-            location.href = getPath("/index");
+            location.href = getPath("/navigation");
           });
         })
         .catch(() => { });

+ 6 - 6
src/router/index.js

@@ -39,11 +39,6 @@ export const constantRoutes = [
       }
     ]
   },
-  {
-    path: '/navigation',
-    component: (resolve) => require(['@/views/navigation'], resolve),
-    hidden: true
-  },
   {
     path: '/login',
     component: (resolve) => require(['@/views/login'], resolve),
@@ -87,10 +82,15 @@ export const constantRoutes = [
     component: (resolve) => require(['@/views/erp/warehouseOut/newDetail'], resolve),
     hidden: true
   },
+  {
+    path: '/navigation',
+    component: (resolve) => require(['@/views/navigation'], resolve),
+    hidden: true
+  },
   {
     path: '',
     component: Layout,
-    redirect: 'index',
+    redirect: 'navigation',
     children: [{
       path: 'index',
       component: (resolve) => require(['@/views/index'], resolve),

+ 1 - 3
src/views/login.vue

@@ -346,8 +346,6 @@ export default {
 
     // 验证码开关
     this.captchaEnable = getCaptchaEnable();
-    console.log(">>>>>>>>>>>>>>>>>>>>>",this.redirect)
-    console.log(">>>>>>>>>>>>>>>>>>>>>",this.$route.query.redirect)
     // 重定向地址
     this.redirect = this.$route.query.redirect
       ? decodeURIComponent(this.$route.query.redirect)
@@ -526,7 +524,7 @@ export default {
               this.loginForm
             )
             .then(() => {
-              this.$router.push({ path: this.redirect || "/" }).catch(() => {});
+              this.$router.push({ path: this.redirect || "/navigation" }).catch(() => {});
             })
             .catch(() => {
               console.log("登陆失败!!!!!!!!!!!");

+ 101 - 21
src/views/navigation.vue

@@ -23,7 +23,7 @@
                         </div>
 
                         <div style="margin-left: 10%;margin-right: 8%">
-                            <span style="cursor: pointer">注销</span>
+                            <span style="cursor: pointer" @click="logout">注销</span>
                         </div>
 
                     </div>
@@ -54,12 +54,13 @@
                         </div>
                     </div>
                     <div class="left_top right">
-                        <a class="moreMessage" @click="">更多</a>
+                        <a class="moreMessage" @click="leftTopMore">更多</a>
                         <el-tabs v-model="leftTopRight" @tab-click="" style="width: 98%; margin: 0px auto">
-                            <el-tab-pane label="机构资讯" name="">
+                            <el-tab-pane label="机构资讯" name="1">
                                 <div style="overflow-y: auto;height: 20vh;">
                                     <el-row v-for="(item, index) of leftTopOne" :key="index">
-                                        <div style="margin-bottom: 1.3vh;">
+                                        <div style="margin-bottom: 1.3vh;cursor: pointer;"
+                                            @click="leftTopOneDetail(index)">
                                             <el-row style="border-bottom: 1px solid #F2F2F2;">
                                                 <el-col :span="16">
                                                     <span class="leftContent"> {{ item.text }}</span>
@@ -72,15 +73,15 @@
                                     </el-row>
                                 </div>
                             </el-tab-pane>
-                            <el-tab-pane label="公司要闻" name=""></el-tab-pane>
-                            <el-tab-pane label="通知公告" name=""></el-tab-pane>
+                            <el-tab-pane label="公司要闻" name="2"></el-tab-pane>
+                            <el-tab-pane label="通知公告" name="3"></el-tab-pane>
                         </el-tabs>
                     </div>
                 </div>
                 <div class="left_middle">
                     <a class="moreMessage" @click="">更多</a>
                     <el-tabs v-model="leftMiddle" @tab-click="" style="width: 98%; margin: 0px auto">
-                        <el-tab-pane label="专栏" name="">
+                        <el-tab-pane label="专栏" name="1">
                             <div style="overflow-y: auto;height: 30vh;">
                                 <el-row v-for="(item, index) of dataList2" :key="index">
                                     <div style="margin-bottom: 1.3vh;">
@@ -101,19 +102,20 @@
                                 </el-row>
                             </div>
                         </el-tab-pane>
-                        <el-tab-pane label="党建" name=""></el-tab-pane>
-                        <el-tab-pane label="团建" name=""></el-tab-pane>
-                        <el-tab-pane label="工会" name=""></el-tab-pane>
-                        <el-tab-pane label="政策" name=""></el-tab-pane>
+                        <el-tab-pane label="党建" name="2"></el-tab-pane>
+                        <el-tab-pane label="团建" name="3"></el-tab-pane>
+                        <el-tab-pane label="工会" name="4"></el-tab-pane>
+                        <el-tab-pane label="政策" name="5"></el-tab-pane>
                     </el-tabs>
                 </div>
                 <div class="left_bottom">
-                    <a class="moreMessage" @click="">更多</a>
+                    <a class="moreMessage" @click="leftBottomMore">更多</a>
                     <el-tabs v-model="leftBottom" @tab-click="" style="width: 98%; margin: 0px auto">
                         <el-tab-pane label="平台资讯" name="">
                             <div class="sys_card" v-for="item in leftBottomList">
-                                <img :src="item.coverPic" style="width: 100%;height: 100%;border-radius: 4px;"
-                                    @click=""></img>
+                                <img :src="item.coverPic"
+                                    style="width: 100%;height: 100%;border-radius: 4px;cursor: pointer;"
+                                    @click="leftBottomDetail(item.id)"></img>
                                 <div class="sys_card_title">
                                     <div style="width: 98%;">
                                         <el-row>
@@ -138,7 +140,7 @@
             </div>
             <div class="right">
                 <div class="right_top">
-                    <a class="moreMessage" @click="">更多</a>
+                    <!-- <a class="moreMessage" @click="">更多</a> -->
                     <el-tabs @tab-click="" style="width: 98%; margin: 0px auto">
                         <el-tab-pane label="跳转模块" name="">
                             <div v-for="(item, index) of rightTopLink" :key="index" style="display: inline">
@@ -209,6 +211,10 @@
             </div>
             <div class="bottom">
             </div>
+            <el-dialog :title="detailTitle1" :visible.sync="openDetail1" width="800px" v-dialogDrag append-to-body>
+                <div style="padding: 5rpx;width: 700px" v-html="detail1">
+                </div>
+            </el-dialog>
         </div>
 
     </div>
@@ -219,8 +225,14 @@ import {
     getEnableList,
     getEnableListPic,
 } from "@/api/system/moduleConfig";
-import { getHomePlatFormForWeb, getXGZXForWeb } from "@/api/content/platformInfo";
+import {
+    getHomePlatFormForWeb,
+    getXGZXForWeb,
+    getPlatformInfo,
+} from "@/api/content/platformInfo";
 import { getThisAgencyInfo } from "@/api/content/agencyInfo";
+import { getPath } from "@/utils/ruoyi";
+import defaultLogo1 from '@/assets/logo/defaultLogo1.png'
 
 export default {
     name: "Navigation",
@@ -228,8 +240,11 @@ export default {
     },
     data() {
         return {
+            detailTitle1: "",
+            openDetail1: false,
+            detail1: undefined,
             //当前机构
-            thisTenant: undefined,
+            thisTenant: { agencyLogo: defaultLogo1, },
             //左上轮播图
             leftTopPics: [],
             //右上跳转模块
@@ -250,8 +265,8 @@ export default {
             //左下角平台咨询
             leftBottomList: [],
             queryWord: undefined,
-            leftTopRight: undefined,
-            leftMiddle: undefined,
+            leftTopRight: '1',
+            leftMiddle: '1',
             rightMiddle: undefined,
             leftBottom: undefined,
             rightBottom: undefined,
@@ -290,7 +305,6 @@ export default {
                 if (res.data.agencyLogo) {
                     this.thisTenant.agencyLogo = JSON.parse(res.data.agencyLogo)[0].url;
                 }
-                console.log(this.thisTenant)
             })
             //获得左上轮播图
             getEnableListPic().then(res => {
@@ -313,6 +327,17 @@ export default {
                 }
             });
         },
+        /** 注销 */
+        async logout() {
+            this.$modal
+                .confirm("确定注销并退出系统吗?", "提示")
+                .then(() => {
+                    this.$store.dispatch("LogOut").then(() => {
+                        location.href = getPath("/navigation");
+                    });
+                })
+                .catch(() => { });
+        },
         /** 处理搜索 */
         handleQuery() {
             console.log(this.queryWord)
@@ -324,12 +349,58 @@ export default {
         //导航栏跳转
         handleSelect(key, keyPath) {
             if (key == 2) {
-                this.$router.push("/");
+                this.$router.push("/index");
             }
             if (key == 3) {
                 this.$router.push("/user/profile");
             }
         },
+        /** 左上更多按钮跳转 */
+        leftTopMore() {
+            if (this.leftTopRight == '1') {
+                this.$router.push("/xzUnit/news");
+            } else if (this.leftTopRight == '2') {
+
+            } else if (this.leftTopRight == '3') {
+
+            }
+        },
+        leftTopOneDetail(index) {
+            this.detail1 = undefined;
+            this.detailTitle1 = "机构资讯详情";
+            this.detail1 = this.leftTopOne[index].link;
+            this.detail1 = this.detail1.replace('<img', '<img style="max-width:100%;height:100%"');
+            this.openDetail1 = true;
+        },
+        /** 左中更多按钮跳转 */
+        leftMiddleMore() {
+
+        },
+        /** 左下更多按钮跳转 */
+        leftBottomMore() {
+            this.$router.push("/xzUnit/platformInfo");
+        },
+        leftBottomDetail(id) {
+            this.detail1 = undefined;
+            this.detailTitle1 = "平台资讯详情";
+            getPlatformInfo(id).then(res => {
+                this.detail1 = res.data.content;
+                this.detail1 = this.detail1.replace('<img', '<img style="max-width:100%;height:100%"');
+                this.openDetail1 = true;
+            })
+        },
+        /** 右上更多按钮跳转 */
+        rightTopMore() {
+
+        },
+        /** 右中更多按钮跳转 */
+        rightMiddleMore() {
+
+        },
+        /** 右下更多按钮跳转 */
+        rightBottomMore() {
+
+        },
 
     },
 };
@@ -348,6 +419,13 @@ export default {
     border: 2px solid #FFFFFF;
 }
 
+::v-deep .el-menu--horizontal > .el-menu-item {
+    display: flex;
+    height: 85%;
+    align-items: center;
+    line-height: 100%;
+}
+
 .rightBottomButter {
     background: #FF9736;
     border-radius: 4px 4px 4px 4px;
@@ -568,6 +646,8 @@ export default {
     width: 20%;
     height: 85%;
     display: flex;
+    margin-top: 0;
+    align-items: center;
     justify-content: flex-start;
 
     span {