Explorar el Código

数据资源目录首页剩余块开发

chaihaorui hace 1 año
padre
commit
96c49b8039

+ 12 - 0
src/assets/image/u211.svg

@@ -0,0 +1,12 @@
1
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In  -->
2
+<svg version="1.1"
3
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
4
+	 x="0px" y="0px" width="17.7px" height="17.7px" viewBox="0 0 17.7 17.7" style="enable-background:new 0 0 17.7 17.7;"
5
+	 xml:space="preserve">
6
+<style type="text/css">
7
+	.st0{fill-rule:evenodd;clip-rule:evenodd;fill:#02C5FF;}
8
+</style>
9
+<defs>
10
+</defs>
11
+<circle id="XMLID_15_" class="st0" cx="8.9" cy="8.9" r="8.9"/>
12
+</svg>

+ 24 - 0
src/assets/image/u218.svg

@@ -0,0 +1,24 @@
1
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In  -->
2
+<svg version="1.1"
3
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
4
+	 x="0px" y="0px" width="27.7px" height="41.1px" viewBox="0 0 27.7 41.1" style="enable-background:new 0 0 27.7 41.1;"
5
+	 xml:space="preserve">
6
+<style type="text/css">
7
+	.st0{fill:#C13836;}
8
+	.st1{fill:#E14C4B;}
9
+	.st2{fill:#F5D93E;}
10
+	.st3{fill:#E0B335;}
11
+</style>
12
+<defs>
13
+</defs>
14
+<g id="XMLID_15_">
15
+	<path id="XMLID_27_" class="st0" d="M8.3,0L3.9,4.5h19.4L18.8,0H8.3z M8.3,0"/>
16
+	<path id="XMLID_23_" class="st1" d="M3.9,4.5L7.8,19l5.1-2L8.3,0.1L3.9,4.5z M14.4,17l5,2l3.9-14.4l-4.5-4.5L14.4,17z M14.4,17"/>
17
+	<path id="XMLID_20_" class="st2" d="M9.7,17.1l-5.6,0.3l-0.2,5.6L0,27.2l3.8,4.2L4.1,37l5.6,0.3l4.2,3.8l4.2-3.8l5.6-0.3l0.2-5.6
18
+		l3.8-4.2l-3.8-4.2l-0.2-5.6L18,17.1l-4.2-3.8L9.7,17.1z M9.7,17.1"/>
19
+	<path id="XMLID_19_" class="st3" d="M22.9,27.2c0,5-4.1,9.1-9.1,9.1c-5,0-9.1-4.1-9.1-9.1s4.1-9.1,9.1-9.1
20
+		C18.9,18.1,22.9,22.2,22.9,27.2"/>
21
+	<path id="XMLID_16_" class="st2" d="M13.8,20.1l2.3,4.3l4.8,0.9l-3.3,3.5l0.6,4.8l-4.3-2.1l-4.3,2.1l0.6-4.8l-3.3-3.5l4.8-0.9
22
+		L13.8,20.1z M13.8,20.1"/>
23
+</g>
24
+</svg>

+ 25 - 0
src/assets/image/u219.svg

@@ -0,0 +1,25 @@
1
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In  -->
2
+<svg version="1.1"
3
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
4
+	 x="0px" y="0px" width="27.4px" height="39.4px" viewBox="0 0 27.4 39.4" style="enable-background:new 0 0 27.4 39.4;"
5
+	 xml:space="preserve">
6
+<style type="text/css">
7
+	.st0{fill:#D3AB6B;}
8
+	.st1{fill:#EFC17F;}
9
+	.st2{fill:#EFCC9E;}
10
+	.st3{fill:#F1C98B;}
11
+</style>
12
+<defs>
13
+</defs>
14
+<g id="XMLID_15_">
15
+	<path id="XMLID_29_" class="st0" d="M8.2,0L3.9,4.4H23L18.6,0H8.2z M8.2,0"/>
16
+	<path id="XMLID_25_" class="st1" d="M3.9,4.5l3.8,13.1l5-2L8.2,0.1L3.9,4.5z M14.2,15.6l5,2L23,4.5l-4.4-4.4L14.2,15.6z M14.2,15.6
17
+		"/>
18
+	<path id="XMLID_22_" class="st2" d="M9.6,15.8L4,16.1l-0.2,5.6L0,25.8l3.8,4.1L4,35.4l5.6,0.3l4.1,3.7l4.1-3.7l5.6-0.3l0.2-5.6
19
+		l3.8-4.1l-3.8-4.1l-0.2-5.6l-5.6-0.3l-4.1-3.7L9.6,15.8z M9.6,15.8"/>
20
+	<path id="XMLID_19_" class="st0" d="M22.6,25.7c0,5-4,9-9,9c-5,0-9-4.1-9-9c0-4.9,4-9,9-9C18.6,16.7,22.6,20.8,22.6,25.7L22.6,25.7
21
+		z M22.6,25.7"/>
22
+	<path id="XMLID_16_" class="st3" d="M13.6,18.7l2.3,4.2l4.7,0.9l-3.3,3.4l0.6,4.8l-4.3-2.1L9.4,32l0.6-4.8l-3.3-3.4l4.7-0.9
23
+		L13.6,18.7z M13.6,18.7"/>
24
+</g>
25
+</svg>

+ 25 - 0
src/assets/image/u220.svg

@@ -0,0 +1,25 @@
1
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In  -->
2
+<svg version="1.1"
3
+	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
4
+	 x="0px" y="0px" width="25.8px" height="38.3px" viewBox="0 0 25.8 38.3" style="enable-background:new 0 0 25.8 38.3;"
5
+	 xml:space="preserve">
6
+<style type="text/css">
7
+	.st0{fill:#485CA8;}
8
+	.st1{fill:#6982C0;}
9
+	.st2{fill:#D6DEE3;}
10
+	.st3{fill:#ABB9C2;}
11
+</style>
12
+<defs>
13
+</defs>
14
+<g id="XMLID_15_">
15
+	<path id="XMLID_27_" class="st0" d="M7.8,0L3.7,4.2h18L17.6,0H7.8z M7.8,0"/>
16
+	<path id="XMLID_23_" class="st1" d="M3.7,4.2l3.6,13.5l4.8-1.9L7.8,0.1L3.7,4.2z M13.4,15.8l4.7,1.9l3.6-13.5l-4.2-4.2L13.4,15.8z
17
+		 M13.4,15.8"/>
18
+	<path id="XMLID_20_" class="st2" d="M9,16l-5.3,0.3l-0.2,5.3L0,25.4l3.6,3.9l0.2,5.3L9,34.8l3.9,3.5l3.9-3.5l5.3-0.3l0.2-5.3
19
+		l3.6-3.9l-3.6-3.9L22,16.2L16.8,16l-3.9-3.5L9,16z M9,16"/>
20
+	<path id="XMLID_19_" class="st3" d="M21.3,25.3c0,4.7-3.8,8.5-8.5,8.5c-4.7,0-8.5-3.8-8.5-8.5s3.8-8.5,8.5-8.5
21
+		C17.6,16.9,21.3,20.7,21.3,25.3"/>
22
+	<path id="XMLID_16_" class="st2" d="M12.9,18.7l2.1,4l4.4,0.8l-3.1,3.2l0.6,4.5l-4-2l-4,2l0.6-4.5l-3.1-3.2l4.4-0.8L12.9,18.7z
23
+		 M12.9,18.7"/>
24
+</g>
25
+</svg>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1 - 0
src/assets/image/u448.svg


+ 1 - 0
src/components/barChart.vue

@@ -108,6 +108,7 @@ export default {
108 108
             fontSize: this.labelSize
109 109
           },
110 110
           splitLine: {
111
+            show: false,
111 112
             lineStyle: {
112 113
               // color: '#082E81',
113 114
               type: 'dashed'

+ 259 - 50
src/pages/homepage/components/cardWrap.vue

@@ -1,16 +1,37 @@
1 1
 <template>
2 2
   <div class="body-wrapper">
3 3
     <div class="search-wrapper">
4
-      <div class="header-row">
5
-        <div v-for="(item, index) in menus" :key="index"  class="menu-btn" style="width: 16%" @click="jumpToSearchPage(item)">
6
-          <p>{{ item.title }}</p>
7
-          <div class="flex" style="padding-top: 10px;">
8
-            <div style="width: 26%;" class="middle-flex">
9
-              <img style="width: 50px; height: 50px;" :src="`../../../../static/homepage/group${index+1}.png`"/>
4
+      <div class="header-row clearfix">
5
+        <div class="data-repository">
6
+          <div class="data-repo-title">
7
+            <span class="icon"></span>
8
+            数据资源库
9
+          </div>
10
+          <div class="data-repo-wrap">
11
+            <div v-for="(item, index) in menus" :key="index"  class="menu-btn" style="width: 16%" @click="jumpToSearchPage(item)">
12
+              <p>{{ item.title }}</p>
13
+              <div class="flex" style="padding-top: 10px;">
14
+                <div style="width: 26%;" class="middle-flex">
15
+                  <img style="width: 50px; height: 50px;" :src="`../../../../static/homepage/group${index+1}.png`"/>
16
+                </div>
17
+                <div style="width: 74%; line-height: 30px;">
18
+                  <p class="sub-title"><span :class="['circle', `circle${index+1}`]"/>今日新增<span style="margin-left: 5px;" :class="`font${index+1}`">{{item.new}}</span></p>
19
+                  <p class="sub-title"><span :class="['circle', `circle${index+1}`]"/>历史总量<span style="margin-left: 5px;" :class="`font${index+1}`">{{item.history}}</span></p>
20
+                </div>
21
+              </div>
10 22
             </div>
11
-            <div style="width: 74%; line-height: 30px;">
12
-              <p class="sub-title"><span :class="['circle', `circle${index+1}`]"/>今日新增<span style="margin-left: 5px;" :class="`font${index+1}`">{{item.new}}</span></p>
13
-              <p class="sub-title"><span :class="['circle', `circle${index+1}`]"/>历史总量<span style="margin-left: 5px;" :class="`font${index+1}`">{{item.history}}</span></p>
23
+          </div>
24
+        </div>
25
+        <div class="my-collect clearfix">
26
+          <div  class="menu-btn" style="width: 80%" @click="jumpToSearchPage()">
27
+            <p>我的收藏</p>
28
+            <div class="flex" style="padding-top: 10px;">
29
+              <div style="width: 26%;" class="middle-flex">
30
+                <img style="width: 50px; height: 50px;" src="../../../assets/image/u448.svg"/>
31
+              </div>
32
+              <div style="width: 74%; line-height: 30px;">
33
+                <p class="sub-title"><span/>收藏总量<span style="margin-left: 5px;" :class="`font-collect`">1553</span></p>
34
+              </div>
14 35
             </div>
15 36
           </div>
16 37
         </div>
@@ -46,15 +67,66 @@
46 67
       </div>
47 68
       <div class="chart-card">
48 69
         <div class="title">各专题资产数量统计</div>
49
-        <div class="chart"></div>
70
+        <div class="chart">
71
+          <barchart
72
+            class="side-chart"
73
+            :autoStop="false"
74
+            legendIcon="circle"
75
+            :bottom="90"
76
+            :xlabelFormat="xLabelFormat"
77
+            :top="60"
78
+            :yAxisName="['(张)', '(兆)']"
79
+            :tooltip="tooltipFormat"
80
+            :dataset="specialAssetsData"
81
+            :encode="[{x: 'qyjc', y: 'hs', seriesName: '数据量'}, {x: 'qyjc', y: 'hs1', seriesName: '数据表'}]"
82
+            :labelSize="15"
83
+            id="ztzc"
84
+          />
85
+        </div>
50 86
       </div>
51 87
       <div class="chart-card">
52 88
         <div class="title">各部门指标统计</div>
53
-        <div class="chart"></div>
89
+        <div class="chart">
90
+          <barchart
91
+            class="side-chart"
92
+            :autoStop="false"
93
+            legendIcon="circle"
94
+            :bottom="90"
95
+            :xlabelFormat="xLabelFormat"
96
+            :top="60"
97
+            :yAxisName="['(个)', '(兆)']"
98
+            :tooltip="tooltipFormat"
99
+            :dataset="indicatorStatData"
100
+            :encode="[{x: 'qyjc', y: 'hs', seriesName: '数据量'}, {x: 'qyjc', y: 'hs1', seriesName: '数据表'}]"
101
+            :labelSize="15"
102
+            id="bmzb"
103
+          />
104
+        </div>
54 105
       </div>
55 106
       <div class="chart-card">
56 107
         <div class="title">服务调用排行</div>
57
-        <div class="chart"></div>
108
+        <div class="chart rank-chart">
109
+          <el-button-group>
110
+            <el-button :type="rankType === 'API' ? 'primary' : ''" @click="rankType = 'API'" size="small">API</el-button>
111
+            <el-button :type="rankType === 'MQ' ? 'primary' : ''" @click="rankType = 'MQ'" size="small">MQ</el-button>
112
+          </el-button-group>
113
+          <div class="rank-block">
114
+            <div class="rank-item clearfix" v-for="(item, index) in rankData" :key="index">
115
+              <div v-if="index < 3" :class="`icon-three icon${index}`"></div>
116
+              <div v-else :class="`icon`">{{index + 1}}</div>
117
+              <div class="right-block">
118
+                <div class="name-unit clearfix">
119
+                  <div class="name">{{item.name}}</div>
120
+                  <div class="unit" v-if="index === 0">次</div>
121
+                </div>
122
+                <el-progress :percentage="item.percent"
123
+                :class="`progress progress${index}`"
124
+                :format="(per) => format(per, item.num)"
125
+                define-back-color="#5c6779"></el-progress>
126
+              </div>
127
+            </div>
128
+          </div>
129
+        </div>
58 130
       </div>
59 131
     </div>
60 132
   </div>
@@ -87,7 +159,19 @@ export default {
87 159
             new: 35,
88 160
             history: 1553,
89 161
           }],
90
-          barData: [{qyjc: '2023-01', hs: 100, hs1: 200}, {qyjc: '2023-02', hs: 10, hs1: 20}, {qyjc: '2023-03', hs: 10, hs1: 20}, {qyjc: '2023-04', hs: 10, hs1: 20}, {qyjc: '2023-05', hs: 10, hs1: 20},]
162
+          barData: [{qyjc: '2023-01', hs: 100, hs1: 200}, {qyjc: '2023-02', hs: 10, hs1: 20}, {qyjc: '2023-03', hs: 10, hs1: 20}, {qyjc: '2023-04', hs: 10, hs1: 20}, {qyjc: '2023-05', hs: 10, hs1: 20},],
163
+          specialAssetsData: [{qyjc: '专题1', hs: 100, hs1: 200}, {qyjc: '2023-02', hs: 10, hs1: 20}, {qyjc: '2023-03', hs: 10, hs1: 20}, {qyjc: '2023-04', hs: 10, hs1: 20}, {qyjc: '2023-05', hs: 10, hs1: 20},],
164
+          indicatorStatData: [{qyjc: '部门1', hs: 100, hs1: 200}, {qyjc: '2023-02', hs: 10, hs1: 20}, {qyjc: '2023-03', hs: 10, hs1: 20}, {qyjc: '2023-04', hs: 10, hs1: 20}, {qyjc: '2023-05', hs: 10, hs1: 20},],
165
+          rankType: 'API',
166
+          rankData: [{ percent: 75, num: 160, name: 'xxxApi' },
167
+          { percent: 72, num: 120, name: 'xxxApi' },
168
+          { percent: 70, num: 100, name: 'xxxApi' },
169
+          { percent: 65, num: 80, name: 'xxxApi' },
170
+          { percent: 55, num: 70, name: 'xxxApi' },
171
+          { percent: 50, num: 60, name: 'xxxApi' },
172
+          { percent: 45, num: 50, name: 'xxxApi' },
173
+          { percent: 35, num: 40, name: 'xxxApi' },
174
+          { percent: 25, num: 30, name: 'xxxApi' },]
91 175
         }
92 176
     },
93 177
     mounted() {
@@ -118,6 +202,9 @@ export default {
118 202
         // ${params[0].name || "--"}月:
119 203
         return `<div class="${type==='bar' ? 'bar-tooltip-dz' : type==='line' ? 'line-tooltip-dz' : ''}">${data.hs || "--"}张</div>`;
120 204
       },
205
+      format(percentage, num) {
206
+        return num
207
+      }
121 208
     }
122 209
 }
123 210
 </script>
@@ -149,49 +236,80 @@ export default {
149 236
   }
150 237
 
151 238
   .header-row {
152
-    display: flex;
153
-    justify-content: space-around;
154
-    background: #fff;
155
-    padding: 20px 20px;
156
-    .menu-btn {
157
-      height: 98px;
158
-      width: 100%;
159
-      padding: 20px;
160
-      box-shadow: 2px 5px 10px #ddd;
239
+    padding-top: 10px;
240
+    .data-repository, .my-collect{
241
+      float: left;
242
+    }
243
+    .data-repository{
244
+      width: 80%;
161 245
       background: #fff;
162
-      border-radius: 5px;
163
-      >p {
164
-        font-size: 24px;
165
-        font-weight: bold;
166
-      }
167
-      .circle {
168
-        width: 10px;
169
-        height: 10px;
170
-        border-radius: 50%;
171
-        margin-right: 5px;
172
-      }
173
-      .circle1 {
174
-        border: 3px solid #084FC0;
175
-      }
176
-      .circle2 {
177
-        border: 3px solid #BE5205;
178
-      }
179
-      .circle3 {
180
-        border: 3px solid #58C627;
181
-      }
182
-      .circle4 {
183
-        border: 3px solid #BF44FF;
246
+      padding: 20px 20px;
247
+      border-right: 1px solid #f2f2f2;
248
+      box-sizing: border-box;
249
+      .data-repo-title{
250
+        margin-bottom: 5px;
251
+        .icon{
252
+          display: inline-block;
253
+          width: 11px;
254
+          height: 25px;
255
+          background: #8bb2ff;
256
+          vertical-align: middle;
257
+        }
184 258
       }
185
-      .sub-title {
259
+      .data-repo-wrap{
186 260
         display: flex;
187
-        align-items: center;
261
+        justify-content: space-between;
262
+        padding-left: 14px;
188 263
       }
189
-      .middle-flex{
190
-        display: flex;
191
-        align-items: center;
192
-        justify-content: center;
264
+    }
265
+    .my-collect{
266
+      padding-top: 50px;
267
+      padding-right: 10px;
268
+      width: 20%;
269
+      box-sizing: border-box;
270
+      .menu-btn{
271
+        float: right;
193 272
       }
194 273
     }
274
+    .menu-btn {
275
+        height: 98px;
276
+        width: 100%;
277
+        padding: 20px;
278
+        box-shadow: 2px 5px 10px #ddd;
279
+        background: #fff;
280
+        border-radius: 5px;
281
+        >p {
282
+          font-size: 24px;
283
+          font-weight: bold;
284
+        }
285
+        .circle {
286
+          width: 10px;
287
+          height: 10px;
288
+          border-radius: 50%;
289
+          margin-right: 5px;
290
+        }
291
+        .circle1 {
292
+          border: 3px solid #084FC0;
293
+        }
294
+        .circle2 {
295
+          border: 3px solid #BE5205;
296
+        }
297
+        .circle3 {
298
+          border: 3px solid #58C627;
299
+        }
300
+        .circle4 {
301
+          border: 3px solid #BF44FF;
302
+        }
303
+        .sub-title {
304
+          display: flex;
305
+          align-items: center;
306
+        }
307
+        .middle-flex{
308
+          display: flex;
309
+          align-items: center;
310
+          justify-content: center;
311
+        }
312
+      }
195 313
   }
196 314
 
197 315
   .chart-wrap {
@@ -215,6 +333,97 @@ export default {
215 333
         height: 280px;
216 334
         box-shadow: 2px 5px 10px #ddd;
217 335
       }
336
+      .rank-chart{
337
+        text-align: center;
338
+        box-sizing: border-box;
339
+        padding: 10px 20px 0;
340
+      }
341
+      .rank-block{
342
+        height: 238px;
343
+        overflow-y: auto;
344
+        scrollbar-width: none; /* firefox */
345
+      }
346
+      .rank-block::-webkit-scrollbar {
347
+        display: none; /* Chrome Safari */
348
+      }
349
+      .rank-item{
350
+        margin-bottom: 10px;
351
+        .icon, .right-block, .icon-three{
352
+          float: left;
353
+        }
354
+        .icon{
355
+          width: 18px;
356
+          height: 18px;
357
+          background: url('../../../assets/image/u211.svg');
358
+          font-size: 12px;
359
+          color: #FFFFFF;
360
+          line-height: 18px;
361
+        }
362
+        .icon-three{
363
+          width: 18px;
364
+          height: 26px;
365
+        }
366
+        .icon0{
367
+          background: url('../../../assets/image/u218.svg');
368
+          background-size: 100% 100%;
369
+        }
370
+        .icon1{
371
+          background: url('../../../assets/image/u219.svg');
372
+          background-size: 100% 100%;
373
+        }
374
+        .icon2{
375
+          background: url('../../../assets/image/u220.svg');
376
+          background-size: 100% 100%;
377
+        }
378
+        .right-block{
379
+          width: calc(100% - 18px);
380
+          .name-unit{
381
+            padding: 0 10px;
382
+            margin-bottom: 5px;
383
+          }
384
+          .name{
385
+            float: left;
386
+          }
387
+          .unit{
388
+            float: right;
389
+          }
390
+        }
391
+        /deep/ .progress .el-progress-bar__inner {
392
+          background-image: linear-gradient(
393
+            to right,
394
+            #00c8ff,   
395
+            #009bff
396
+          );
397
+        }
398
+        /deep/ .progress0 .el-progress-bar__inner {
399
+          background-image: linear-gradient(
400
+            to right,
401
+            #ec5a48,   
402
+            #d566d7
403
+          );
404
+        }
405
+        /deep/ .progress1 .el-progress-bar__inner {
406
+          background-image: linear-gradient(
407
+            to right,
408
+            #f9b101,   
409
+            #ff6a62
410
+          );
411
+        }
412
+        /deep/ .progress2 .el-progress-bar__inner {
413
+          background-image: linear-gradient(
414
+            to right,
415
+            #00f576,   
416
+            #009df7
417
+          );
418
+        }
419
+      }
420
+    }
421
+  }
422
+  .clearfix{
423
+    &:after {
424
+      content: "";
425
+      display: table;
426
+      clear: both;
218 427
     }
219 428
   }
220 429
 }