diff --git a/src/views/dashboard/admin/index.scss b/src/views/dashboard/admin/index.scss index 19b1056..f41276b 100644 --- a/src/views/dashboard/admin/index.scss +++ b/src/views/dashboard/admin/index.scss @@ -1,93 +1,100 @@ .flex { - display: flex; + display: flex; } .column { - flex-direction: column; + flex-direction: column; } .ac { - align-items: center; + align-items: center; +} +.ae { + align-items: flex-end; } .jc { - justify-content: center; + justify-content: center; } .oneflex { - flex: 1; + flex: 1; } .jw { - justify-content: space-between; + justify-content: space-between; } .js { - justify-content: space-around; + justify-content: space-around; } .number { - color: red; - font-size: 25px; + color: red; + font-size: 25px; } .product-card { - .product-card-item {} + height: 100px; + text-align: center; + .product-card-item { + } } .orderData { - width: 100%; - - .orderData-right { - margin-left: 50px; - flex-wrap: wrap; + width: 100%; - .orderData-right-item { - width: calc(50% - 20px); - box-sizing: border-box; - text-align: center; - padding: 10px 20px; - border-bottom: #ececec solid 1px; - - } + .orderData-right { + margin-left: 50px; + flex-wrap: wrap; + height: 100px; + .orderData-right-item { + width: calc(50% - 20px); + box-sizing: border-box; + text-align: center; + padding: 10px 20px; + border-bottom: #ececec solid 1px; } + } - .orderData-left { - padding: 10px 20px; - box-sizing: border-box; - border: solid 1px #bbbbbb; - } + .orderData-left { + padding: 20px 10px; + box-sizing: border-box; + border: solid 1px #ececec; + } } .orderStatistics-card { - .orderStatistics-card-right{ + .orderStatistics-card-right { + } + .orderStatistics-card-left { + flex-shrink: 0; + padding: 10px 50px; + border-right: solid 1px #ececec; + .orderStatistics-card-left-item { + .orderStatistics-card-left-item-title { + color: #bbbbbb; + } + .orderStatistics-card-left-item-number { + font-size: 25px; + } } - .orderStatistics-card-left { - flex-shrink: 0; - padding: 10px 50px; - border-right: solid 1px #ececec; - .orderStatistics-card-left-item{ - .orderStatistics-card-left-item-title{ - color: #bbbbbb; - } - .orderStatistics-card-left-item-number{ - font-size: 25px; - } - } - } - + } +} +.box-card { + margin-bottom: 30px; } -.box-card{ - margin-bottom: 30px; +.card-title { + font-size: 20px; + font-weight: 500; } -.card-title{ - font-size: 20px; - font-weight: 600; +.fs { + font-size: 16px; } -.mt{ - margin-top: 30px; +.mt { + margin-top: 30px; } // .page{ // height:calc(100vh - 144px); // box-sizing: border-box; -// } \ No newline at end of file +// } diff --git a/src/views/dashboard/admin/index.vue b/src/views/dashboard/admin/index.vue index 5662b4f..f4e1628 100644 --- a/src/views/dashboard/admin/index.vue +++ b/src/views/dashboard/admin/index.vue @@ -8,14 +8,14 @@
-
- +
+
今日订单总数
200
-
+
待核销订单 (10) @@ -24,27 +24,27 @@ 已核销订单 (10)
-
+
已完成订单 (10)
-
+
待退款订单 (10) -
- + - - + +
商品总览
-
+
100
已下架
@@ -63,36 +63,33 @@
100
已下架
-
- - +
- 商品总览 + 用户总览
-
+
100
-
已下架
+
今日新增
100
-
已下架
+
昨日新增
100
-
已下架
+
本月新增
100
-
已下架
+
会员总数
-
@@ -117,7 +114,23 @@
-
近一周订单统计
+
+
近一周订单统计
+ + + 查询 +
+
@@ -134,7 +147,38 @@ export default { filters: {}, data() { return { - myChart: null + myChart: null, + createTime: '', + pickerOptions: { + shortcuts: [ + { + text: '今天', + onClick(picker) { + const end = new Date() + const start = new Date() + picker.$emit('pick', [start, end]) + } + }, + { + text: '最近一周', + onClick(picker) { + const end = new Date() + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) + picker.$emit('pick', [start, end]) + } + }, + { + text: '最近一个月', + onClick(picker) { + const end = new Date() + const start = new Date() + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) + picker.$emit('pick', [start, end]) + } + } + ] + } } }, created() { @@ -144,8 +188,8 @@ export default { this.initChart('chart') }, methods: { - initChart(id='chart') { - this.myChart = echarts.init(document.getElementById(id)); + initChart(id = 'chart') { + this.myChart = echarts.init(document.getElementById(id)) this.myChart.setOption({ color: ['#4370da'], grid: { @@ -170,11 +214,9 @@ export default { areaStyle: {} } ] - }); + }) }, - init() { - - } + init() {} } }