Browse Source

新增首页顶部标题动态配置功能

Rockery 3 years ago
parent
commit
ab80339ba5
1 changed files with 12 additions and 2 deletions
  1. 12 2
      src/views/index.vue

+ 12 - 2
src/views/index.vue

@@ -6,7 +6,7 @@
           <el-col :xs="12" :sm="24" :md="24" :lg="12" :xl="12" class="mb20">
             <div class="home-head-left">
               <div class="head-left-top">
-                <div class="head-left-top-title">渔安街道党组织</div>
+                <div class="head-left-top-title">{{ homeHeadTitle }}</div>
                 <div
                   class="head-left-top-subtitle"
                 >上次登录时间:{{ parseTime($store.getters.loginDate, '{y}年{m}月{d}日 {h}:{i}:{s}') || '—' }}</div>
@@ -232,7 +232,8 @@ export default {
       currentRow: {},
       nodeDataObj: { ...NodeDataObj },
       atStageNodeDataObj: { ...AtStageNodeDataObj },
-      viewPdfFileUrlPrefix: `${window.origin}${process.env.VUE_APP_FILE_VIEW_API}`
+      viewPdfFileUrlPrefix: `${window.origin}${process.env.VUE_APP_FILE_VIEW_API}`,
+      homeHeadTitle: ''
     };
   },
   created() {
@@ -245,6 +246,15 @@ export default {
     initData() {
       this.getCountsHomeData();
       this.getUrgencyListHomeData();
+      this.getAllConfigKeyFunc();
+    },
+    /**
+     * 初始化数据
+     */
+    getAllConfigKeyFunc() {
+      this.getConfigKey("sys.home.head.title").then(response => {
+        this.homeHeadTitle = response.msg || '党组织';
+      });
     },
     /**
      * 分类统计党员数量