Commit 82b9014a7b25fb9ef393e99cabacab53ddebc117

Authored by 梁保满
1 parent 9e1c9c46

交互调整

src/views/layout/aside/aside.vue
... ... @@ -39,7 +39,7 @@
39 39 <span slot="title">{{ item.name }}</span>
40 40 </template>
41 41  
42   - <menu-tree :menuData="item.children"></menu-tree>
  42 + <menu-tree :menuData="item.children" :path="path"></menu-tree>
43 43 </el-submenu>
44 44 <el-menu-item
45 45 :index="item.path"
... ...
src/views/layout/aside/menuTree.vue
1 1 <template>
2   - <div>
3   - <template v-for="(child) in menuData">
4   - <el-submenu v-if="child.children.length > 0" :index="child.path" :key="child.path">
5   - <template slot="title">
6   - <i :class="child.iconCls?child.iconCls:[fa,fa-file]"/>
7   - <span slot="title">{{ child.name }}</span>
8   - </template>
9   - <menu-tree :menuData="child.children"/>
10   - </el-submenu>
  2 + <div>
  3 + <template v-for="child in menuData">
  4 + <el-submenu
  5 + v-if="child.children.length > 0"
  6 + :index="child.path"
  7 + :key="child.path"
  8 + >
  9 + <template slot="title">
  10 + <i :class="child.iconCls ? child.iconCls : [fa, fa - file]" />
  11 + <span slot="title">{{ child.name }}</span>
  12 + </template>
  13 + <menu-tree :menuData="child.children" />
  14 + </el-submenu>
11 15  
12   - <el-menu-item v-else-if="!child.hidden" :index="child.path" :key="child.path">
13   - <i :class="child.iconCls?child.iconCls:[fa,fa-file]"/>
14   - <span slot="title">{{ child.name}}</span>
15   - </el-menu-item>
16   - </template>
17   - </div>
  16 + <el-menu-item
  17 + v-else-if="!child.hidden"
  18 + :index="child.path"
  19 + :key="child.path"
  20 + :class="
  21 + child.path == '/setUpClazz' && path == '/archived' ? 'is-active' : ''
  22 + "
  23 + >
  24 + <i :class="child.iconCls ? child.iconCls : [fa, fa - file]" />
  25 + <span slot="title">{{ child.name }}</span>
  26 + </el-menu-item>
  27 + </template>
  28 + </div>
18 29 </template>
19 30  
20 31 <script>
21 32 export default {
22 33 name: "menuTree",
23   - props: ["menuData"]
24   -}
  34 + props: ["menuData", "path"],
  35 +};
25 36 </script>
26 37  
27 38 <style scoped>
28   -
29 39 </style>
... ...
src/views/standard/setUp/archived.vue
... ... @@ -48,7 +48,7 @@
48 48 </p>
49 49 </div>
50 50 <div class="btn-box">
51   - <el-button class="btn" round @click="classIds = []">取消</el-button>
  51 + <el-button class="btn" round @click="toClazz">取消</el-button>
52 52 <el-popconfirm
53 53 confirm-button-text="确定"
54 54 cancel-button-text="取消"
... ... @@ -267,7 +267,7 @@ export default {
267 267 });
268 268 this.loadingClass = false;
269 269 if (status === 0) {
270   - this.classList = [...data.list] || [];
  270 + this.classList = (data.list && [...data.list]) || [];
271 271 this.classIds = [];
272 272 } else {
273 273 this.$message.error(info);
... ...
src/views/standard/setUp/clazz.vue
... ... @@ -67,7 +67,7 @@
67 67 </p>
68 68 <div class="clazz-class">
69 69 <span>学生:{{ clazz.studentCount }}个</span>
70   - <span>教师:{{ clazz.studentCount }}个</span>
  70 + <span>教师:{{ clazz.teacherCount }}个</span>
71 71 </div>
72 72 </div>
73 73 </li>
... ...
src/views/standard/setUp/teacher.vue
... ... @@ -354,7 +354,7 @@
354 354 class="sel-t"
355 355 collapse
356 356 clearable
357   - placeholder="选择级-科目"
  357 + placeholder="选择级-科目"
358 358 v-model="item.classId"
359 359 :options="classList"
360 360 :props="{ expandTrigger: 'hover' }"
... ...