Blame view

src/views/index/mainIndex.vue 7.96 KB
c1b532ad   梁保满   权限配置,路由基础设置
1
  <template>
d4283687   梁保满   首页布局完成,页面顶部返回组件
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
    <div class="container">
      <ul class="nav-list" v-if="type == '学校管理员'">
        <li class="nav-item item1" @click="links('setUpAccount')">
          <img class="icon" src="../../assets/nav/setUpAccount.png" alt="" />
          <div class="text">
            <p class="p1">账号管理</p>
            <p class="p2">管理32个任课教师,14个班主任,3个备课组长账号信息。</p>
          </div>
        </li>
        <li class="nav-item item1" @click="links('setUpSchool')">
          <img class="icon" src="../../assets/nav/setUpSchool.png" alt="" />
          <div class="text">
            <p class="p1">学校管理</p>
            <p class="p2">管理6个年级,3个班级,397名学生信息。</p>
          </div>
        </li>
        <li class="nav-item item2" @click="links('device')">
          <img class="icon" src="../../assets/nav/device.png" alt="" />
          <div class="text">
            <p class="p1">设备状态</p>
            <p class="p2">管理14个基站,396套答题器设备。</p>
          </div>
        </li>
        <li class="item3">
          <div class="nav-item item1 item-child1" @click="links('analysis')">
            <img class="icon" src="../../assets/nav/analysis.png" alt="" />
            <div class="text">
              <p class="p1">使用分析</p>
              <p class="p2">按班级、科目等维度分析设备使用频率。</p>
            </div>
          </div>
          <div class="nav-item item1 item-child2" @click="links('card')">
            <img class="icon" src="../../assets/nav/card.png" alt="" />
            <p class="p1">发卡补卡</p>
            <p class="p2">为学生办理发卡、补卡业务。</p>
          </div>
          <div class="nav-item item1 item-child2" @click="links('down')">
            <img class="icon" src="../../assets/nav/down.png" alt="" />
            <p class="p1">软件下载</p>
            <p class="p2">设置参数,下载授课端软件。</p>
          </div>
        </li>
      </ul>
      <ul class="nav-list" v-if="type == '集团管理员'">
        <li v-for="item in navList" :key="item.path" class="nav-item item4" @click="links(item.path)">
          <img class="icon" :src="getImgs(item.path)" alt="" />
            <div class="text" v-if="item.path == 'setUpConglomerate'">
              <p class="p1">学校管理</p>
              <p class="p2">管理3个区域,14个学校。</p>
            </div>
            <div class="text" v-else-if="item.path == 'setUpAccount'">
              <p class="p1">账号管理</p>
              <p class="p2">共35个各层级管理员账号。</p>
            </div>
            <div class="text" v-else-if="item.path == 'device'">
              <p class="p1">设备状态</p>
              <p class="p2">管理14个基站,396套答题器设备。</p>
            </div>
            <div class="text" v-else>
              <p class="p1">使用分析</p>
              <p class="p2">按软件功能、题型统计使用频率。</p>
            </div>
        </li>
      </ul>
      <ul class="nav-list" v-if="type == '班主任' || type == '任课老师' ">
        <li v-for="item in navList" :key="item.path" class="nav-item item4" @click="links(item.path)">
          <img class="icon" :src="getImgs(item.path)" alt="" />
            <div class="text" v-if="item.path == 'examinationPaper'">
              <p class="p1">备题组卷</p>
              <p class="p2">管理32套答题卡。</p>
            </div>
            <div class="text" v-else-if="item.path == 'portrait'">
              <p class="p1">学生画像</p>
              <p class="p2">共分析532名学生成绩。</p>
            </div>
            <div class="text" v-else-if="item.path == 'ask'">
              <p class="p1">随堂问报表</p>
              <p class="p2">对41套随堂问答题记录分析。</p>
            </div>
            <div class="text" v-else>
              <p class="p1">即时测报表</p>
              <p class="p2">对28套即时测答题记录分析。</p>
            </div>
        </li>
      </ul>
    </div>
c1b532ad   梁保满   权限配置,路由基础设置
88
89
90
  </template>
  
  <script>
c1b532ad   梁保满   权限配置,路由基础设置
91
92
  export default {
    name: "mainIndex",
d4283687   梁保满   首页布局完成,页面顶部返回组件
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
    data() {
      return {
        // type: "学校管理员",
        // type: "集团管理员",
        // type: "班主任",
        type: "任课老师",
        navList: [
          // {
          //   name: "学校管理",
          //   path: "setUpConglomerate",
          // },
          // {
          //   name: "账号管理",
          //   path: "setUpAccount",
          // },
          // {
          //   name: "设备状态",
          //   path: "device",
          // },
          // {
          //   name: "使用分析",
          //   path: "analysis",
          // },
          {
            name: "备题组卷",
            path: "examinationPaper",
          },
          {
            name: "学生画像",
            path: "portrait",
          },
          {
            name: "随堂问报表",
            path: "ask",
          },
          {
            name: "即时测报表",
            path: "test",
          },
        ],
      };
c1b532ad   梁保满   权限配置,路由基础设置
134
    },
d4283687   梁保满   首页布局完成,页面顶部返回组件
135
    mounted() {},
c1b532ad   梁保满   权限配置,路由基础设置
136
    methods: {
d4283687   梁保满   首页布局完成,页面顶部返回组件
137
138
139
140
141
142
143
      getImgs(path) {
        return require(`@/assets/nav/${path}.png`)
      },
      links(path) {
        this.$router.push({
          path: `/${path}`,
        });
c1b532ad   梁保满   权限配置,路由基础设置
144
145
146
147
148
149
      },
    },
  };
  </script>
  
  <style lang="scss">
d4283687   梁保满   首页布局完成,页面顶部返回组件
150
  .container {
c1b532ad   梁保满   权限配置,路由基础设置
151
    display: flex;
d4283687   梁保满   首页布局完成,页面顶部返回组件
152
153
154
155
156
157
158
159
160
161
162
163
164
165
    justify-content: center;
    align-items: center;
    padding: 100px 90px 0 50px;
    .nav-list {
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      .nav-item {
        background: #f8f8f8;
        border-radius: 20px;
        box-shadow: 3px 3px 3px #aaaaaa59;
        cursor: pointer;
        &:hover {
          background-color: #ededed;
c1b532ad   梁保满   权限配置,路由基础设置
166
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
167
168
169
170
        .icon {
          width: 110px;
          height: 110px;
          border-radius: 50%;
c1b532ad   梁保满   权限配置,路由基础设置
171
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
172
173
174
175
176
177
        .p1 {
          font-size: 18px;
          color: #333;
          line-height: 18px;
          margin-bottom: 12px;
          font-weight: 500;
c1b532ad   梁保满   权限配置,路由基础设置
178
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
179
180
181
        .p2 {
          font-size: 14px;
          color: #999;
c1b532ad   梁保满   权限配置,路由基础设置
182
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
183
184
185
186
187
188
189
190
191
192
193
194
      }
      .item1 {
        width: calc(50% - 10px);
        flex-shrink: 0;
        display: flex;
        justify-content: center;
        margin-right: 20px;
        margin-bottom: 20px;
        box-sizing: border-box;
        padding: 40px 80px;
        &:nth-child(2) {
          margin-right: 0;
c1b532ad   梁保满   权限配置,路由基础设置
195
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
196
197
        .icon {
          margin-right: 20px;
c1b532ad   梁保满   权限配置,路由基础设置
198
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
199
200
201
202
203
        .text {
          display: flex;
          flex-direction: column;
          justify-content: center;
          padding-top: 10px;
c1b532ad   梁保满   权限配置,路由基础设置
204
        }
d4283687   梁保满   首页布局完成,页面顶部返回组件
205
206
207
208
209
210
211
212
213
214
215
216
        .p2 {
          line-height: 24px;
        }
        &.item-child1 {
          width: 100%;
          height: calc(50% - 8px);
          margin-bottom: 16px;
          padding: 0 20px;
          align-items: center;
          .icon {
            width: 80px;
            height: 80px;
c1b532ad   梁保满   权限配置,路由基础设置
217
          }
d4283687   梁保满   首页布局完成,页面顶部返回组件
218
219
220
221
222
223
224
225
226
        }
        &.item-child2 {
          height: calc(50% - 8px);
          margin-right: 20px;
          flex-wrap: wrap;
          padding: 12px 30px;
          .icon {
            width: 60px;
            height: 60px;
c1b532ad   梁保满   权限配置,路由基础设置
227
          }
d4283687   梁保满   首页布局完成,页面顶部返回组件
228
229
230
231
          .p1 {
            flex: 1;
            line-height: 60px;
            margin-bottom: 0;
c1b532ad   梁保满   权限配置,路由基础设置
232
          }
d4283687   梁保满   首页布局完成,页面顶部返回组件
233
234
          .p2 {
            width: 100%;
c1b532ad   梁保满   权限配置,路由基础设置
235
          }
d4283687   梁保满   首页布局完成,页面顶部返回组件
236
237
          &:last-of-type {
            margin-right: 0;
c1b532ad   梁保满   权限配置,路由基础设置
238
239
240
          }
        }
      }
d4283687   梁保满   首页布局完成,页面顶部返回组件
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
      .item2 {
        width: calc(50% - 10px);
        height: 240px;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-right: 20px;
        box-sizing: border-box;
        padding: 30px 0;
        text-align: center;
        &:last-of-type {
          margin-right: 0;
        }
        .icon {
          margin-bottom: 20px;
        }
        .p2 {
          line-height: 16px;
        }
      }
      .item3 {
        width: calc(50% - 10px);
        height: 240px;
        display: flex;
        flex-wrap: wrap;
      }
      .item4 {
        width: calc(50% - 10px);
        flex-shrink: 0;
        display: flex;
        justify-content: flex-start;
        margin-right: 20px;
        margin-bottom: 20px;
        box-sizing: border-box;
        padding: 40px 80px;
        &:nth-child(2n) {
          margin-right: 0;
        }
        .icon {
          margin-right: 20px;
        }
        .text {
          display: flex;
          flex-direction: column;
          justify-content: center;
          padding-top: 10px;
        }
        .p2 {
          line-height: 24px;
        }
      }
c1b532ad   梁保满   权限配置,路由基础设置
294
295
    }
  }
c1b532ad   梁保满   权限配置,路由基础设置
296
  </style>