|
|
@@ -0,0 +1,243 @@
|
|
|
+<template>
|
|
|
+ <div class="mainBox">
|
|
|
+ <!-- 搜索区域 -->
|
|
|
+ <div class="searchBox">
|
|
|
+ <div>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="dateValue"
|
|
|
+ type="daterange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="到"
|
|
|
+ start-placeholder="开始时间"
|
|
|
+ end-placeholder="结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ size="large"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 服务调用card -->
|
|
|
+ <div class="flex">
|
|
|
+ <card
|
|
|
+ class="card flex"
|
|
|
+ :title="'服务机构总数'"
|
|
|
+ :value="8"
|
|
|
+ :growth="'较上个月增长了12%'"
|
|
|
+ iconColor="#2563db"
|
|
|
+ :upStatus="1"
|
|
|
+ />
|
|
|
+ <card
|
|
|
+ class="card flex"
|
|
|
+ :title="'服务总数'"
|
|
|
+ :value="100"
|
|
|
+ :growth="'较上个月下降了12%'"
|
|
|
+ iconColor="#16a34a"
|
|
|
+ :upStatus="-1"
|
|
|
+ />
|
|
|
+ <card
|
|
|
+ class="card flex"
|
|
|
+ :title="'服务调用总次数'"
|
|
|
+ :value="1000"
|
|
|
+ :growth="'较上个月增长了12%'"
|
|
|
+ iconColor="#9333ea"
|
|
|
+ :upStatus="1"
|
|
|
+ />
|
|
|
+ <card
|
|
|
+ class="card flex"
|
|
|
+ :title="'服务类别数量'"
|
|
|
+ :value="10"
|
|
|
+ :growth="'与上月持平'"
|
|
|
+ iconColor="#ca8a04"
|
|
|
+ :upStatus="0"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <!-- 服务类信息统计 -->
|
|
|
+ <div class="bigCard">
|
|
|
+ <div class="bigCard_title">服务类信息统计</div>
|
|
|
+ <div class="tools">
|
|
|
+ <el-button>
|
|
|
+ <el-icon><Upload /></el-icon> 导出数据
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary">
|
|
|
+ <el-icon><TrendCharts /></el-icon>
|
|
|
+ 详细报告
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="flex">
|
|
|
+ <div style="width: 48%; height: 400px">
|
|
|
+ <EchartsDome title="服务调用趋势(近30天)" />
|
|
|
+ </div>
|
|
|
+ <div style="width: 48%; height: 400px">echarts2</div>
|
|
|
+ </div>
|
|
|
+ <div style="width: 100%; height: 400px">tables</div>
|
|
|
+ </div>
|
|
|
+ <!-- 用户信息统计 -->
|
|
|
+ <div class="bigCard">用户信息统计</div>
|
|
|
+ <!-- 应用类信息统计 -->
|
|
|
+ <div class="bigCard">应用类信息统计</div>
|
|
|
+ <!-- 数据类信息统计 -->
|
|
|
+ <div class="bigCard">数据类信息统计</div>
|
|
|
+ <!-- 区级特色信息统计 -->
|
|
|
+ <div class="bigCard">区级特色信息统计</div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import card from "@/components/yxgl/card.vue";
|
|
|
+import EchartsDome from "@/components/yxgl/EchartsDome.vue";
|
|
|
+export default {
|
|
|
+ name: "",
|
|
|
+ components: {
|
|
|
+ card,
|
|
|
+ EchartsDome,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ dateValue: "",
|
|
|
+ shortcuts: this.shortcuts(),
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {},
|
|
|
+ methods: {
|
|
|
+ shortcuts() {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ text: "最近7天",
|
|
|
+ value: () => {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ return [start, end];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "最近30天",
|
|
|
+ value: () => {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
+ return [start, end];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "最近90天",
|
|
|
+ value: () => {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
+ return [start, end];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ text: "最近1年",
|
|
|
+ value: () => {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
|
|
|
+ return [start, end];
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped>
|
|
|
+.mainBox {
|
|
|
+ width: calc(100% - 60px);
|
|
|
+ margin: 30px;
|
|
|
+ & > div {
|
|
|
+ margin: 20px 0;
|
|
|
+ display: flex;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ .card {
|
|
|
+ width: calc(25% - 56px);
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 20px 18px;
|
|
|
+ background: #ffffff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .bigCard {
|
|
|
+ width: calc(100% - 36px);
|
|
|
+ border-radius: 5px;
|
|
|
+ padding: 20px 18px;
|
|
|
+ background: #ffffff;
|
|
|
+ position: relative;
|
|
|
+ flex-direction: column;
|
|
|
+ .tools {
|
|
|
+ position: absolute;
|
|
|
+ top: 20px;
|
|
|
+ right: 20px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: flex-end;
|
|
|
+ }
|
|
|
+ &_title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .flex {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+
|
|
|
+ .searchBox {
|
|
|
+ width: 100%;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 日期选择框样式
|
|
|
+.demo-date-picker {
|
|
|
+ display: flex;
|
|
|
+ width: 100%;
|
|
|
+ padding: 0;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-date-picker .block {
|
|
|
+ padding: 1.5rem 0;
|
|
|
+ text-align: center;
|
|
|
+ border-right: solid 1px var(--el-border-color);
|
|
|
+ flex: 1;
|
|
|
+ min-width: 400px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-date-picker .block:last-child {
|
|
|
+ border-right: none;
|
|
|
+}
|
|
|
+
|
|
|
+.demo-date-picker .demonstration {
|
|
|
+ display: block;
|
|
|
+ color: var(--el-text-color-secondary);
|
|
|
+ font-size: 14px;
|
|
|
+ margin-bottom: 1rem;
|
|
|
+}
|
|
|
+
|
|
|
+@media screen and (max-width: 1200px) {
|
|
|
+ .demo-date-picker .block {
|
|
|
+ flex: 0 0 100%;
|
|
|
+ padding: 1rem 0;
|
|
|
+ min-width: auto;
|
|
|
+ border-right: none;
|
|
|
+ border-bottom: solid 1px var(--el-border-color);
|
|
|
+ }
|
|
|
+
|
|
|
+ .demo-date-picker .block:last-child {
|
|
|
+ border-bottom: none;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|