소스 검색

首页样式;

庄逸洲 5 년 전
부모
커밋
ea6fe05b24
4개의 변경된 파일102개의 추가작업 그리고 27개의 파일을 삭제
  1. 2 2
      src/router/index.js
  2. 24 9
      src/router/modules/site.js
  3. 57 9
      src/scrm_pages/home/index.vue
  4. 19 7
      src/views/layout/components/Sidebar/SidebarItem.vue

+ 2 - 2
src/router/index.js 파일 보기

@@ -84,9 +84,9 @@ var _asy_router_map = [
84 84
   article,
85 85
   marketing_tool,
86 86
   org,
87
-  role,
88 87
   system,
89
-  site
88
+  site,
89
+  role,
90 90
 ]
91 91
 
92 92
 var is_asy_router = process.env.NODE_ENV === 'production' // true; 设置为 true 强制进行路由验证

+ 24 - 9
src/router/modules/site.js 파일 보기

@@ -4,17 +4,32 @@ export default {
4 4
   path: '',
5 5
   component: Layout,
6 6
   redirect: '/site',
7
+  alwaysShow: true,
8
+  // name: '微网站',
9
+  meta: {
10
+    title: '微网站',
11
+    icon: 'dashboard'
12
+  },
7 13
   children: [{
8
-    path: '/site',
9
-    component: () => import('@/scrm_pages/site/index'),
10
-    name: 'site',
11
-    meta: {
12
-      title: '微网站',
13
-      icon: 'dashboard',
14
-      noCache: true
14
+      path: '/site',
15
+      component: () => import('@/scrm_pages/site/index'),
16
+      name: 'site',
17
+      unfinished: true,
18
+      meta: {
19
+        title: '微网站',
20
+        noCache: true,
21
+      }
22
+    },
23
+    {
24
+      path: '/site/preview',
25
+      component: () => import('@/scrm_pages/site/preview'),
26
+      name: '预览',
27
+      meta: {
28
+        title: 'preview'
29
+      },
30
+      hidden: true,
31
+      is_menu: false
15 32
     }
16
-  },
17
-  { path: '/site/preview', component: () => import('@/scrm_pages/site/preview'), name: '预览', meta: { title: 'preview' }, hidden: true, is_menu: false }
18 33
 
19 34
   ]
20 35
 }

+ 57 - 9
src/scrm_pages/home/index.vue 파일 보기

@@ -10,6 +10,21 @@
10 10
        </li>
11 11
      </ul>
12 12
    </div>
13
+   <div class="notice">
14
+     <el-table ref="notice_table" :data="notices" @row-click="expandRow">
15
+       <el-table-column
16
+        type="selection"
17
+        width="30">
18
+       </el-table-column>
19
+       <el-table-column type="expand" width="20">
20
+         <template slot-scope="scope">
21
+           <p class="notice_expand_content">{{ scope.row.content }}</p>
22
+           <p class="notice_expand_publisher">酷医聚客团队</p>
23
+         </template>
24
+       </el-table-column>
25
+       <el-table-column prop="title" label="所有通知"></el-table-column>
26
+     </el-table>
27
+   </div>
13 28
   </div>
14 29
 </div>
15 30
 
@@ -21,16 +36,34 @@ export default {
21 36
     return {
22 37
       numbers: [
23 38
         { num: '0', name: '新增数量', time: '昨日: 0' },
24
-        { num: '1', name: '总粉丝', time: '昨日: 0' },
25
-        { num: '1', name: '今日新增会员', time: '昨日: 0' },
26
-        { num: '1', name: '总会员', time: '昨日: 1' },
27
-        { num: '1', name: '商品浏览数', time: '昨日: 1' },
28
-        { num: '111', name: '文章浏览量', time: '昨日: 0' },
29
-        { num: '150', name: '活动浏览量', time: '昨日: 0' },
30
-        { num: '120', name: '新增订单', time: '昨日: 0' }
31
-      ]
39
+        { num: '0', name: '总粉丝', time: '昨日: 0' },
40
+        { num: '0', name: '今日新增会员', time: '昨日: 0' },
41
+        { num: '0', name: '总会员', time: '昨日: 0' },
42
+        { num: '0', name: '商品浏览数', time: '昨日: 0' },
43
+        { num: '0', name: '文章浏览量', time: '昨日: 0' },
44
+        { num: '0', name: '活动浏览量', time: '昨日: 0' },
45
+        { num: '0', name: '新增订单', time: '昨日: 0' }
46
+      ],
47
+
48
+      expanding_row: null,
49
+      notices: [
50
+        // { id: 1, title: "第一个通知", content: "第一个通知第一个通知第一个通知第一个通知第一个通知第一个通知第一个通知第一个通知第一个通知第一个通知" }, 
51
+        // { id: 2, title: "第二个通知", content: "第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知第二个通知" }, 
52
+      ],
32 53
     }
33
-  }
54
+  },
55
+  methods: {
56
+    expandRow: function(row, column, event) {
57
+      if (this.expanding_row == null || this.expanding_row.id != row.id) {
58
+        this.$refs.notice_table.toggleRowExpansion(this.expanding_row, false)
59
+        this.$refs.notice_table.toggleRowExpansion(row, true)
60
+        this.expanding_row = row
61
+      } else {
62
+        this.$refs.notice_table.toggleRowExpansion(this.expanding_row, false)
63
+        this.expanding_row = null
64
+      }
65
+    }
66
+  },
34 67
 }
35 68
 </script>
36 69
 
@@ -65,5 +98,20 @@ export default {
65 98
       }
66 99
     }
67 100
   }
101
+
102
+  .notice {
103
+    box-shadow: 4px 4px 8px #dde7f2;
104
+    margin-top: 20px;
105
+
106
+    .notice_expand_content {
107
+      color: #89949b;
108
+      font-size: 15px;
109
+      line-height: 25px;
110
+    }
111
+    .notice_expand_publisher {
112
+      font-size: 14px;
113
+      margin-top: 10px;
114
+    }
115
+  }
68 116
 }
69 117
 </style>

+ 19 - 7
src/views/layout/components/Sidebar/SidebarItem.vue 파일 보기

@@ -17,12 +17,21 @@
17 17
         <template v-for="child in item.children" v-if="!child.hidden">
18 18
           <sidebar-item :is-nest="true" class="nest-menu" v-if="child.children&&child.children.length>0" :item="child" :key="child.path" :base-path="resolvePath(child.path)"></sidebar-item>
19 19
 
20
-          <router-link v-else :to="resolvePath(child.path)" :key="child.name">
21
-            <el-menu-item :index="resolvePath(child.path)">
22
-              <svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
23
-              <span v-if="child.meta&&child.meta.title" slot="title">{{generateTitle(child.meta.title)}}</span>
24
-            </el-menu-item>
25
-          </router-link>
20
+          <template v-else>
21
+            <!-- <router-link :key="child.name" :to="resolvePath(child.path)"> -->
22
+              <el-menu-item v-if="child.unfinished == true" :key="child.name" @click.native="unfinishAction()"  :index="resolvePath(child.path)">
23
+                <svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
24
+                <span v-if="child.meta&&child.meta.title" slot="title">{{generateTitle(child.meta.title)}}</span>
25
+              </el-menu-item>
26
+            <!-- </router-link> -->
27
+            <router-link v-else :to="resolvePath(child.path)" :key="child.name">
28
+              <el-menu-item :index="resolvePath(child.path)">
29
+                <svg-icon v-if="child.meta&&child.meta.icon" :icon-class="child.meta.icon"></svg-icon>
30
+                <span v-if="child.meta&&child.meta.title" slot="title">{{generateTitle(child.meta.title)}}</span>
31
+              </el-menu-item>
32
+            </router-link>
33
+          </template>
34
+          
26 35
         </template>
27 36
       </el-submenu>
28 37
 
@@ -74,7 +83,10 @@ export default {
74 83
     resolvePath(...paths) {
75 84
       return path.resolve(this.basePath, ...paths)
76 85
     },
77
-    generateTitle
86
+    generateTitle,
87
+    unfinishAction: function() {
88
+      this.$message.error("功能开发中")
89
+    },
78 90
   }
79 91
 }
80 92
 </script>