|
@@ -30,7 +30,7 @@
|
30
|
30
|
<img style="width: 50px; height: 50px;" src="../../../assets/collect.png"/>
|
31
|
31
|
</div>
|
32
|
32
|
<div style="width: 74%; line-height: 50px;">
|
33
|
|
- <p class="sub-title"><span/>收藏总量<span style="margin-left: 5px;" :class="`font-collect`">1553</span></p>
|
|
33
|
+ <p class="sub-title"><span/>收藏总量<span style="margin-left: 5px;" :class="`font-collect`">{{ collectTotal }}</span></p>
|
34
|
34
|
</div>
|
35
|
35
|
</div>
|
36
|
36
|
</div>
|
|
@@ -56,10 +56,10 @@
|
56
|
56
|
:bottom="90"
|
57
|
57
|
:xlabelFormat="xLabelFormat"
|
58
|
58
|
:top="60"
|
59
|
|
- :yAxisName="['(张)', '(兆)']"
|
|
59
|
+ :yAxisName="['(张)']"
|
60
|
60
|
:tooltip="tooltipFormat"
|
61
|
61
|
:dataset="barData"
|
62
|
|
- :encode="[{x: 'qyjc', y: 'hs', seriesName: '数据量'}, {x: 'qyjc', y: 'hs1', seriesName: '数据表'}]"
|
|
62
|
+ :encode="[{x: 'name', y: 'num', seriesName: '数据表'}]"
|
63
|
63
|
:labelSize="15"
|
64
|
64
|
id="dqfb"
|
65
|
65
|
/>
|
|
@@ -75,10 +75,10 @@
|
75
|
75
|
:bottom="90"
|
76
|
76
|
:xlabelFormat="xLabelFormat"
|
77
|
77
|
:top="60"
|
78
|
|
- :yAxisName="['(张)', '(兆)']"
|
|
78
|
+ :yAxisName="['(张)']"
|
79
|
79
|
:tooltip="tooltipFormat"
|
80
|
80
|
:dataset="specialAssetsData"
|
81
|
|
- :encode="[{x: 'qyjc', y: 'hs', seriesName: '数据量'}, {x: 'qyjc', y: 'hs1', seriesName: '数据表'}]"
|
|
81
|
+ :encode="[{x: 'name', y: 'num', seriesName: '数据表'}]"
|
82
|
82
|
:labelSize="15"
|
83
|
83
|
id="ztzc"
|
84
|
84
|
/>
|
|
@@ -94,10 +94,10 @@
|
94
|
94
|
:bottom="90"
|
95
|
95
|
:xlabelFormat="xLabelFormat"
|
96
|
96
|
:top="60"
|
97
|
|
- :yAxisName="['(个)', '(兆)']"
|
|
97
|
+ :yAxisName="['(个)']"
|
98
|
98
|
:tooltip="tooltipFormat"
|
99
|
99
|
:dataset="indicatorStatData"
|
100
|
|
- :encode="[{x: 'qyjc', y: 'hs', seriesName: '数据量'}, {x: 'qyjc', y: 'hs1', seriesName: '数据表'}]"
|
|
100
|
+ :encode="[{x: 'name', y: 'num', seriesName: '数据表'}]"
|
101
|
101
|
:labelSize="15"
|
102
|
102
|
id="bmzb"
|
103
|
103
|
/>
|
|
@@ -108,7 +108,7 @@
|
108
|
108
|
<div class="chart rank-chart">
|
109
|
109
|
<el-button-group>
|
110
|
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>
|
|
111
|
+ <!-- <el-button :type="rankType === 'MQ' ? 'primary' : ''" @click="rankType = 'MQ'" size="small">MQ</el-button> -->
|
112
|
112
|
</el-button-group>
|
113
|
113
|
<div class="rank-block">
|
114
|
114
|
<div class="rank-item clearfix" v-for="(item, index) in rankData" :key="index">
|
|
@@ -119,7 +119,7 @@
|
119
|
119
|
<div class="name">{{item.name}}</div>
|
120
|
120
|
<div class="unit" v-if="index === 0">次</div>
|
121
|
121
|
</div>
|
122
|
|
- <el-progress :percentage="item.percent"
|
|
122
|
+ <el-progress :percentage="item.percent || item.num"
|
123
|
123
|
:class="`progress progress${index}`"
|
124
|
124
|
:format="(per) => format(per, item.num)"
|
125
|
125
|
define-back-color="#5c6779"></el-progress>
|
|
@@ -134,6 +134,7 @@
|
134
|
134
|
<script>
|
135
|
135
|
|
136
|
136
|
import barchart from "@/components/barChart";
|
|
137
|
+import api from "@/api/homepage/homepage.js";
|
137
|
138
|
|
138
|
139
|
export default {
|
139
|
140
|
components: {
|
|
@@ -163,22 +164,19 @@ export default {
|
163
|
164
|
history: 1553,
|
164
|
165
|
pageType: 'service'
|
165
|
166
|
}],
|
166
|
|
- 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},],
|
167
|
|
- 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},],
|
168
|
|
- 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},],
|
|
167
|
+ barData: [],
|
|
168
|
+ specialAssetsData: [],
|
|
169
|
+ indicatorStatData: [],
|
169
|
170
|
rankType: 'API',
|
170
|
|
- rankData: [{ percent: 75, num: 160, name: 'xxxApi' },
|
171
|
|
- { percent: 72, num: 120, name: 'xxxApi' },
|
172
|
|
- { percent: 70, num: 100, name: 'xxxApi' },
|
173
|
|
- { percent: 65, num: 80, name: 'xxxApi' },
|
174
|
|
- { percent: 55, num: 70, name: 'xxxApi' },
|
175
|
|
- { percent: 50, num: 60, name: 'xxxApi' },
|
176
|
|
- { percent: 45, num: 50, name: 'xxxApi' },
|
177
|
|
- { percent: 35, num: 40, name: 'xxxApi' },
|
178
|
|
- { percent: 25, num: 30, name: 'xxxApi' },]
|
|
171
|
+ rankData: [],
|
|
172
|
+ collectTotal: 0
|
179
|
173
|
}
|
180
|
174
|
},
|
181
|
175
|
mounted() {
|
|
176
|
+ this.getResourceData()
|
|
177
|
+ this.getCollectTotal()
|
|
178
|
+ this.getThemeSpecialIndex()
|
|
179
|
+ this.getApiRankData()
|
182
|
180
|
},
|
183
|
181
|
watch: {
|
184
|
182
|
|
|
@@ -209,6 +207,51 @@ export default {
|
209
|
207
|
},
|
210
|
208
|
format(percentage, num) {
|
211
|
209
|
return num
|
|
210
|
+ },
|
|
211
|
+ getResourceData() {
|
|
212
|
+ api.resourceData().then(res => {
|
|
213
|
+ if (res.success) {
|
|
214
|
+ this.menus[0].new = res.data.themeAdd
|
|
215
|
+ this.menus[0].history = res.data.themeTotal
|
|
216
|
+ this.menus[1].new = res.data.specialSubjectAdd
|
|
217
|
+ this.menus[1].history = res.data.specialSubjectTotal
|
|
218
|
+ this.menus[2].new = res.data.indexAdd
|
|
219
|
+ this.menus[2].history = res.data.indexTotal
|
|
220
|
+ this.menus[3].new = res.data.serviceAdd
|
|
221
|
+ this.menus[3].history = res.data.serviceTotal
|
|
222
|
+ }
|
|
223
|
+ })
|
|
224
|
+ },
|
|
225
|
+ getCollectTotal() {
|
|
226
|
+ api.collectTotal().then(res => {
|
|
227
|
+ if (res.success) {
|
|
228
|
+ this.collectTotal = res.data
|
|
229
|
+ }
|
|
230
|
+ })
|
|
231
|
+ },
|
|
232
|
+ getThemeSpecialIndex() {
|
|
233
|
+ api.themeSpecialIndex({resourceType: 'theme'}).then(res => {
|
|
234
|
+ if (res.success) {
|
|
235
|
+ this.barData = res.data
|
|
236
|
+ }
|
|
237
|
+ })
|
|
238
|
+ api.themeSpecialIndex({resourceType: 'specialSubject'}).then(res => {
|
|
239
|
+ if (res.success) {
|
|
240
|
+ this.specialAssetsData = res.data
|
|
241
|
+ }
|
|
242
|
+ })
|
|
243
|
+ api.themeSpecialIndex({resourceType: 'index'}).then(res => {
|
|
244
|
+ if (res.success) {
|
|
245
|
+ this.indicatorStatData = res.data
|
|
246
|
+ }
|
|
247
|
+ })
|
|
248
|
+ },
|
|
249
|
+ getApiRankData() {
|
|
250
|
+ api.apiRank().then(res => {
|
|
251
|
+ if (res.success) {
|
|
252
|
+ this.rankData = res.data
|
|
253
|
+ }
|
|
254
|
+ })
|
212
|
255
|
}
|
213
|
256
|
}
|
214
|
257
|
}
|