diff --git a/src/api/index.js b/src/api/index.js new file mode 100644 index 00000000..b0c4b31c --- /dev/null +++ b/src/api/index.js @@ -0,0 +1,81 @@ +import request from '@/utils/request' + +// 获取数据总览(今日营业额、订单等) +export function getDataScreeningModelApi(data) { + return request({ + url: '/smart-canteen/dataScreening/getDataScreeningModel', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 获取食堂订单及销量趋势 +export function getCanteenOrdersAndSalesTrendsApi(data) { + return request({ + url: '/smart-canteen/dataScreening/getCanteenOrdersAndSalesTrends', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 获取商超订单及销量趋势 +export function getSupermarketOrderAndSalesTrendApi(data) { + return request({ + url: '/smart-canteen/dataScreening/getSupermarketOrderAndSalesTrend', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 获取近30天菜品销量排名 +export function getThisMonthSDishSalesRankingApi(data) { + return request({ + url: '/smart-canteen/dataScreening/getThisMonthSDishSalesRanking', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + +// 订单类型占比 +export function getProportionOfOrderTypesApi(data) { + return request({ + url: '/smart-canteen/dataScreening/getProportionOfOrderTypes', + method: 'post', + headers: { + "merchant-id":"378915229716713472", + }, + data: data + }) +} + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/images/down.png b/src/assets/images/down.png new file mode 100644 index 00000000..58e8b05c Binary files /dev/null and b/src/assets/images/down.png differ diff --git a/src/assets/images/up.png b/src/assets/images/up.png new file mode 100644 index 00000000..22af5635 Binary files /dev/null and b/src/assets/images/up.png differ diff --git a/src/views/dashboard/PanelGroup.vue b/src/views/dashboard/PanelGroup.vue index 77305495..73aefe0e 100644 --- a/src/views/dashboard/PanelGroup.vue +++ b/src/views/dashboard/PanelGroup.vue @@ -1,16 +1,179 @@ @@ -22,6 +185,12 @@ export default { components: { CountTo }, + props: { + topData: { + type: Array, + default: [] + } + }, methods: { } @@ -42,7 +211,7 @@ export default { .card-panel { height: 140px; - cursor: pointer; + // cursor: pointer; font-size: 12px; position: relative; overflow: hidden; @@ -65,10 +234,12 @@ export default { font-weight: bold; margin: 0px; margin-left: 0px; + margin-bottom: 10px; .card-panel-text { line-height: 18px; - color: rgba(0, 0, 0, 0.5); + // color: rgba(0, 0, 0, 0.5); + font-weight: normal; font-size: 16px; margin-bottom: 15px; } diff --git a/src/views/index_v1.vue b/src/views/index_v1.vue index dc7b6c01..27146a1e 100644 --- a/src/views/index_v1.vue +++ b/src/views/index_v1.vue @@ -1,12 +1,36 @@