李志伟 3 年之前
父節點
當前提交
97b2b790a5
共有 3 個檔案被更改,包括 69 行新增60 行删除
  1. 2
    1
      src/components/ECharts/Apache.vue
  2. 33
    26
      src/views/dashboard/index.vue
  3. 34
    33
      src/views/photoWall/index.vue

+ 2
- 1
src/components/ECharts/Apache.vue 查看文件

17
       type: Array,
17
       type: Array,
18
       default: () => ([])
18
       default: () => ([])
19
     },
19
     },
20
+    type: String,
20
     loading: Boolean
21
     loading: Boolean
21
   },
22
   },
22
   computed: {
23
   computed: {
40
         ],
41
         ],
41
         series: [
42
         series: [
42
           {
43
           {
43
-            name: '人数',
44
+            name: this.type,
44
             type: 'bar',
45
             type: 'bar',
45
             data: this.value[1]
46
             data: this.value[1]
46
           }
47
           }

+ 33
- 26
src/views/dashboard/index.vue 查看文件

10
     <el-row class="sec" type="flex" justify="space-between" :gutter="20">
10
     <el-row class="sec" type="flex" justify="space-between" :gutter="20">
11
       <el-col :span="12">
11
       <el-col :span="12">
12
         <el-card style="height:496px">
12
         <el-card style="height:496px">
13
-          <div slot="header">
13
+          <div slot="header" class="clearfix">
14
             <span>各学期总人数柱状图</span>
14
             <span>各学期总人数柱状图</span>
15
           </div>
15
           </div>
16
-          <apache-chart :value="termData" />
16
+          <apache-chart type="人数" :value="termData" />
17
         </el-card>
17
         </el-card>
18
       </el-col>
18
       </el-col>
19
       <el-col :span="12">
19
       <el-col :span="12">
20
         <el-card style="height:496px">
20
         <el-card style="height:496px">
21
-          <div slot="header">
21
+          <div slot="header" class="clearfix">
22
             <span>班级人数列表</span>
22
             <span>班级人数列表</span>
23
+            <el-select v-model="termId" style="float: right; padding: 3px 0" size="medium" filterable placeholder="请选择" @change="changeTerm">
24
+              <el-option
25
+                v-for="item in options"
26
+                :key="item.termId"
27
+                :label="item.name"
28
+                :value="item.termId"
29
+              />
30
+            </el-select>
23
           </div>
31
           </div>
24
-          学期名称:
25
-          <el-select v-model="termId" filterable placeholder="请选择" @change="changeTerm">
26
-            <el-option
27
-              v-for="item in options"
28
-              :key="item.termId"
29
-              :label="item.name"
30
-              :value="item.termId"
31
-            />
32
-          </el-select>
33
           <el-table stripe :data="tableData" border style="width: 100%; margin-top:16px">
32
           <el-table stripe :data="tableData" border style="width: 100%; margin-top:16px">
34
             <el-table-column prop="key" label="班级" />
33
             <el-table-column prop="key" label="班级" />
35
             <el-table-column prop="value" label="人数" />
34
             <el-table-column prop="value" label="人数" />
51
     <el-row class="sec" type="flex" justify="space-between" :gutter="20">
50
     <el-row class="sec" type="flex" justify="space-between" :gutter="20">
52
       <el-col :span="12">
51
       <el-col :span="12">
53
         <el-card style="height:496px">
52
         <el-card style="height:496px">
54
-          <div slot="header">
53
+          <div slot="header" class="clearfix">
55
             <span>年龄分布图</span>
54
             <span>年龄分布图</span>
56
-          </div>
57
-          <div style="display: inline-block;">
58
-            学期名称:
59
-            <el-select v-model="termId2" filterable placeholder="请选择" @change="changeTermAge">
55
+            <el-select v-model="termId2" style="float: right; padding: 3px 0" size="medium" filterable placeholder="请选择" @change="changeTermAge">
60
               <el-option
56
               <el-option
61
                 v-for="item in options"
57
                 v-for="item in options"
62
                 :key="item.termId"
58
                 :key="item.termId"
70
       </el-col>
66
       </el-col>
71
       <el-col :span="12">
67
       <el-col :span="12">
72
         <el-card style="height:496px">
68
         <el-card style="height:496px">
73
-          <div slot="header">
69
+          <div slot="header" class="clearfix">
74
             <span>{{ radio }}签到率折线图</span>
70
             <span>{{ radio }}签到率折线图</span>
71
+            <el-radio-group v-model="radio" style="float: right; padding: 3px 0" @change="handleChangeDate">
72
+              <el-radio-button label="每日" />
73
+              <el-radio-button label="每周" />
74
+              <el-radio-button label="每月" />
75
+            </el-radio-group>
75
           </div>
76
           </div>
76
-          <el-radio-group v-model="radio" style="margin-right:32px" @change="handleChangeDate">
77
-            <el-radio-button label="每日" />
78
-            <el-radio-button label="每周" />
79
-            <el-radio-button label="每月" />
80
-          </el-radio-group>
81
           <line-chart :value="lineData" />
77
           <line-chart :value="lineData" />
82
         </el-card>
78
         </el-card>
83
       </el-col>
79
       </el-col>
85
     <el-row class="sec" type="flex" justify="space-between" :gutter="20">
81
     <el-row class="sec" type="flex" justify="space-between" :gutter="20">
86
       <el-col :span="24">
82
       <el-col :span="24">
87
         <el-card style="height:496px">
83
         <el-card style="height:496px">
88
-          <div slot="header">
84
+          <div slot="header" class="clearfix">
89
             <span>各培训签到率柱状图</span>
85
             <span>各培训签到率柱状图</span>
90
           </div>
86
           </div>
91
-          <apache-chart :value="signData" />
87
+          <apache-chart type="签到率" :value="signData" />
92
         </el-card>
88
         </el-card>
93
       </el-col>
89
       </el-col>
94
     </el-row>
90
     </el-row>
267
       const arr2 = []
263
       const arr2 = []
268
       res.data.map(item => {
264
       res.data.map(item => {
269
         arr1.push(item.key)
265
         arr1.push(item.key)
270
-        arr2.push(item.value)
266
+        arr2.push(item.value / 100)
271
       })
267
       })
272
       this.signData.push(arr1)
268
       this.signData.push(arr1)
273
       this.signData.push(arr2)
269
       this.signData.push(arr2)
343
 .sec {
339
 .sec {
344
   margin: 24px 0;
340
   margin: 24px 0;
345
 }
341
 }
342
+.clearfix {
343
+  line-height: 46px;
344
+}
345
+.clearfix:before,
346
+  .clearfix:after {
347
+    display: table;
348
+    content: "";
349
+  }
350
+  .clearfix:after {
351
+    clear: both
352
+  }
346
 </style>
353
 </style>

+ 34
- 33
src/views/photoWall/index.vue 查看文件

14
               <div v-for="item in images" :key="item.attchId" style="display:inline-block;position:relative;margin:16px">
14
               <div v-for="item in images" :key="item.attchId" style="display:inline-block;position:relative;margin:16px">
15
                 <el-card :body-style="{ padding: '0px', height:'100%' }" style="width:320px; height:280px;text-align:center;border:0">
15
                 <el-card :body-style="{ padding: '0px', height:'100%' }" style="width:320px; height:280px;text-align:center;border:0">
16
                   <el-image fit="cover" :preview-src-list="[item.url]" :src="item.url" style="height: calc(100% - 40px); display:block" />
16
                   <el-image fit="cover" :preview-src-list="[item.url]" :src="item.url" style="height: calc(100% - 40px); display:block" />
17
-                  <div style="width:100%;height:40px"><div class="imgbtn"><i class="el-icon-more" /></div><div class="imgbtn" style="color:red" @click="deletePhoto(item)"><i class="el-icon-delete" />删除</div></div>
17
+                  <div style="width:100%;height:40px"><div class="imgbtn"><i class="el-icon-more" /></div><div class="imgbtn" style="color:red;font-size:14px" @click="deletePhoto(item)"><i class="el-icon-delete" style="margin-right:6px" />删除</div></div>
18
                 </el-card>
18
                 </el-card>
19
               </div>
19
               </div>
20
             </div>
20
             </div>
21
           </el-col>
21
           </el-col>
22
           <el-col :span="6">
22
           <el-col :span="6">
23
-            <el-collapse v-model="activeNames" accordion>
24
-              <el-collapse-item title="照片墙分组" name="1">
25
-                <el-tag
26
-                  v-for="tag in dynamicTags"
27
-                  :key="tag"
28
-                  closable
29
-                  style="margin-bottom:8px"
30
-                  :type="currentPack===tag?'':'info' "
31
-                  :disable-transitions="false"
32
-                  @close="handleClose(tag)"
33
-                  @click="handleCurrent(tag)"
34
-                >
35
-                  {{ tag }}
36
-                </el-tag>
37
-                <el-input
38
-                  v-if="inputVisible"
39
-                  ref="saveTagInput"
40
-                  v-model="inputValue"
41
-                  class="input-new-tag"
42
-                  size="small"
43
-                  style="width:200px"
44
-                  @keyup.enter.native="handleInputConfirm"
45
-                  @blur="handleInputConfirm"
46
-                />
47
-                <el-button
48
-                  v-else
49
-                  class="button-new-tag"
50
-                  size="small"
51
-                  @click="showInput"
52
-                >新建照片墙分组</el-button>
53
-              </el-collapse-item>
54
-            </el-collapse>
23
+            <el-card style="border: 0;box-shadow: none;">
24
+              <div slot="header">
25
+                <span>照片墙分组</span>
26
+              </div>
27
+              <el-tag
28
+                v-for="tag in dynamicTags"
29
+                :key="tag"
30
+                closable
31
+                style="margin-bottom:8px"
32
+                :type="currentPack===tag?'':'info' "
33
+                :disable-transitions="false"
34
+                @close="handleClose(tag)"
35
+                @click="handleCurrent(tag)"
36
+              >
37
+                {{ tag }}
38
+              </el-tag>
39
+              <el-input
40
+                v-if="inputVisible"
41
+                ref="saveTagInput"
42
+                v-model="inputValue"
43
+                class="input-new-tag"
44
+                size="small"
45
+                style="width:200px"
46
+                @keyup.enter.native="handleInputConfirm"
47
+                @blur="handleInputConfirm"
48
+              />
49
+              <el-button
50
+                v-else
51
+                class="button-new-tag"
52
+                size="small"
53
+                @click="showInput"
54
+              >新建照片墙分组</el-button>
55
+            </el-card>
55
           </el-col>
56
           </el-col>
56
         </el-row>
57
         </el-row>
57
       </div>
58
       </div>