From 6d0488f775611a46580e374ce8a7829ace67a3d5 Mon Sep 17 00:00:00 2001
From: iczer <1126263215@qq.com>
Date: Sun, 22 Jul 2018 22:50:33 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Etable=20card=E3=80=81pie=20ca?=
=?UTF-8?q?rd?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 1 +
src/components/analysis/HotSearch.vue | 127 +++++++++++++++++++
src/components/analysis/SalesData.vue | 71 +++++++++++
src/components/chart/RankingList.vue | 59 +++++++++
src/components/dashboard/Dashboard.vue | 42 ++++++-
yarn.lock | 168 +++++++++++++++++++++++--
6 files changed, 456 insertions(+), 12 deletions(-)
create mode 100644 src/components/analysis/HotSearch.vue
create mode 100644 src/components/analysis/SalesData.vue
create mode 100644 src/components/chart/RankingList.vue
diff --git a/package.json b/package.json
index 95e6209..237bff4 100644
--- a/package.json
+++ b/package.json
@@ -14,6 +14,7 @@
"build": "node build/build.js"
},
"dependencies": {
+ "@antv/data-set": "^0.8.9",
"moment": "^2.22.2",
"viser-vue": "^2.2.5",
"vue": "^2.5.2",
diff --git a/src/components/analysis/HotSearch.vue b/src/components/analysis/HotSearch.vue
new file mode 100644
index 0000000..874d38a
--- /dev/null
+++ b/src/components/analysis/HotSearch.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{text}}
+ {{text}} %
+
+
+
+
+
+
+
diff --git a/src/components/analysis/SalesData.vue b/src/components/analysis/SalesData.vue
new file mode 100644
index 0000000..b03a983
--- /dev/null
+++ b/src/components/analysis/SalesData.vue
@@ -0,0 +1,71 @@
+
+
+
+ 全渠道
+ 线上
+ 门店
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/chart/RankingList.vue b/src/components/chart/RankingList.vue
new file mode 100644
index 0000000..f34a726
--- /dev/null
+++ b/src/components/chart/RankingList.vue
@@ -0,0 +1,59 @@
+
+
+
{{title}}
+
+ -
+ {{index + 1}}
+ {{item.name}}
+ {{item.total}}
+
+
+
+
+
+
+
+
diff --git a/src/components/dashboard/Dashboard.vue b/src/components/dashboard/Dashboard.vue
index 14f522d..bd2b07e 100644
--- a/src/components/dashboard/Dashboard.vue
+++ b/src/components/dashboard/Dashboard.vue
@@ -73,7 +73,7 @@
- 123
+
@@ -82,12 +82,27 @@
- 123
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -103,13 +118,34 @@ import MiniBar from '../chart/MiniBar'
import MiniProgress from '../chart/MiniProgress'
import ATabs from 'vue-antd-ui/es/tabs'
import ADatePicker from 'vue-antd-ui/es/date-picker'
-import Bar from "../chart/Bar";
+import Bar from '../chart/Bar'
+import RankingList from '../chart/RankingList'
+import HotSearch from '../analysis/HotSearch'
+import SalesData from '../analysis/SalesData'
+
+
+const rankList = []
+
+for (let i = 0; i < 8; i++) {
+ rankList.push({
+ name: '桃源村' + i + '号店',
+ total: 1234.56 - i * 100
+ })
+}
const ATabPane = ATabs.TabPane
const ARangePicker = ADatePicker.RangePicker
export default {
name: 'dashboard',
+ data () {
+ return {
+ rankList
+ }
+ },
components: {
+ SalesData,
+ HotSearch,
+ RankingList,
Bar,
ARangePicker,
ATabPane,
diff --git a/yarn.lock b/yarn.lock
index dfb0308..249d14f 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -14,6 +14,28 @@
dependencies:
"@antv/util" "~1.0.6"
+"@antv/data-set@^0.8.9":
+ version "0.8.9"
+ resolved "http://registry.npm.taobao.org/@antv/data-set/download/@antv/data-set-0.8.9.tgz#019b3ec73a1309d57dfb379200b8ae02486fa613"
+ dependencies:
+ "@antv/hierarchy" "~0.1.0-beta.2"
+ d3-array "~1.2.0"
+ d3-composite-projections "~1.2.0"
+ d3-dsv "~1.0.5"
+ d3-geo "~1.6.4"
+ d3-geo-projection "~2.1.2"
+ d3-hexjson "~1.0.1"
+ d3-hierarchy "~1.1.5"
+ d3-sankey "~0.7.1"
+ d3-voronoi "~1.1.2"
+ dagre "~0.8.2"
+ lodash "~4.17.4"
+ point-at-length "~1.0.2"
+ regression "~2.0.0"
+ simple-statistics "~4.1.0"
+ topojson-client "~3.0.0"
+ wolfy87-eventemitter "~5.1.0"
+
"@antv/g2-brush@^0.0.2":
version "0.0.2"
resolved "http://registry.npm.taobao.org/@antv/g2-brush/download/@antv/g2-brush-0.0.2.tgz#0b65f3ebbf82690202913d0b6759ab2900faa841"
@@ -58,6 +80,10 @@
gl-matrix "~2.6.1"
wolfy87-eventemitter "~5.1.0"
+"@antv/hierarchy@~0.1.0-beta.2":
+ version "0.1.2"
+ resolved "http://registry.npm.taobao.org/@antv/hierarchy/download/@antv/hierarchy-0.1.2.tgz#d736fe5c4cf8ae664ba51bca194a1786c028ad9d"
+
"@antv/interaction@~0.0.5":
version "0.0.5"
resolved "http://registry.npm.taobao.org/@antv/interaction/download/@antv/interaction-0.0.5.tgz#8455e72afe3523bc478e4c58dd6e1e361f614255"
@@ -198,6 +224,10 @@ abbrev@1:
version "1.1.1"
resolved "http://registry.npm.taobao.org/abbrev/download/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
+abs-svg-path@~0.1.1:
+ version "0.1.1"
+ resolved "http://registry.npm.taobao.org/abs-svg-path/download/abs-svg-path-0.1.1.tgz#df601c8e8d2ba10d4a76d625e236a9a39c2723bf"
+
accepts@~1.3.4, accepts@~1.3.5:
version "1.3.5"
resolved "http://registry.npm.taobao.org/accepts/download/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
@@ -1782,7 +1812,7 @@ combined-stream@1.0.6, combined-stream@~1.0.5:
dependencies:
delayed-stream "~1.0.0"
-commander@2.16.x, commander@^2.13.0, commander@^2.9.0, commander@~2.16.0:
+commander@2, commander@2.16.x, commander@^2.13.0, commander@^2.9.0, commander@~2.16.0:
version "2.16.0"
resolved "http://registry.npm.taobao.org/commander/download/commander-2.16.0.tgz#f16390593996ceb4f3eeb020b31d78528f7f8a50"
@@ -2141,14 +2171,37 @@ cyclist@~0.2.2:
version "0.2.2"
resolved "http://registry.npm.taobao.org/cyclist/download/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
+d3-array@1, d3-array@~1.2.0:
+ version "1.2.1"
+ resolved "http://registry.npm.taobao.org/d3-array/download/d3-array-1.2.1.tgz#d1ca33de2f6ac31efadb8e050a021d7e2396d5dc"
+
+d3-collection@1:
+ version "1.0.4"
+ resolved "http://registry.npm.taobao.org/d3-collection/download/d3-collection-1.0.4.tgz#342dfd12837c90974f33f1cc0a785aea570dcdc2"
+
d3-color@1:
version "1.2.0"
resolved "http://registry.npm.taobao.org/d3-color/download/d3-color-1.2.0.tgz#d1ea19db5859c86854586276ec892cf93148459a"
+d3-composite-projections@~1.2.0:
+ version "1.2.0"
+ resolved "http://registry.npm.taobao.org/d3-composite-projections/download/d3-composite-projections-1.2.0.tgz#fa0e6f1442f17d04643843a3a883c7d94e0c27c0"
+ dependencies:
+ d3-geo "1.2.4"
+ d3-path "^1.0.1"
+
d3-dispatch@1:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-dispatch/download/d3-dispatch-1.0.3.tgz#46e1491eaa9b58c358fce5be4e8bed626e7871f8"
+d3-dsv@~1.0.5:
+ version "1.0.8"
+ resolved "http://registry.npm.taobao.org/d3-dsv/download/d3-dsv-1.0.8.tgz#907e240d57b386618dc56468bacfe76bf19764ae"
+ dependencies:
+ commander "2"
+ iconv-lite "0.4"
+ rw "1"
+
d3-ease@1, d3-ease@~1.0.3:
version "1.0.3"
resolved "http://registry.npm.taobao.org/d3-ease/download/d3-ease-1.0.3.tgz#68bfbc349338a380c44d8acc4fbc3304aa2d8c0e"
@@ -2157,6 +2210,42 @@ d3-format@^1.2.0:
version "1.3.0"
resolved "http://registry.npm.taobao.org/d3-format/download/d3-format-1.3.0.tgz#a3ac44269a2011cdb87c7b5693040c18cddfff11"
+d3-geo-projection@~2.1.2:
+ version "2.1.2"
+ resolved "http://registry.npm.taobao.org/d3-geo-projection/download/d3-geo-projection-2.1.2.tgz#7df8e1e9d046d631c6509f7e531357d4adc24aa3"
+ dependencies:
+ commander "2"
+ d3-array "1"
+ d3-geo "^1.1.0"
+
+d3-geo@1.2.4:
+ version "1.2.4"
+ resolved "http://registry.npm.taobao.org/d3-geo/download/d3-geo-1.2.4.tgz#d179f3baa76e623ef1e0d83693db705b7c599006"
+ dependencies:
+ d3-array "1"
+
+d3-geo@^1.1.0:
+ version "1.10.0"
+ resolved "http://registry.npm.taobao.org/d3-geo/download/d3-geo-1.10.0.tgz#2972d18014f1e38fc1f8bb6d545377bdfb00c9ab"
+ dependencies:
+ d3-array "1"
+
+d3-geo@~1.6.4:
+ version "1.6.4"
+ resolved "http://registry.npm.taobao.org/d3-geo/download/d3-geo-1.6.4.tgz#f20e1e461cb1845f5a8be55ab6f876542a7e3199"
+ dependencies:
+ d3-array "1"
+
+d3-hexjson@~1.0.1:
+ version "1.0.1"
+ resolved "http://registry.npm.taobao.org/d3-hexjson/download/d3-hexjson-1.0.1.tgz#6a23111e8359f1e214f5d0afa379c02b2b67df0b"
+ dependencies:
+ d3-array "1"
+
+d3-hierarchy@~1.1.5:
+ version "1.1.6"
+ resolved "http://registry.npm.taobao.org/d3-hierarchy/download/d3-hierarchy-1.1.6.tgz#842c1372090f870b7ea013ebae5c0c8d9f56229c"
+
d3-interpolate@1:
version "1.2.0"
resolved "http://registry.npm.taobao.org/d3-interpolate/download/d3-interpolate-1.2.0.tgz#40d81bd8e959ff021c5ea7545bc79b8d22331c41"
@@ -2169,10 +2258,28 @@ d3-interpolate@~1.1.5:
dependencies:
d3-color "1"
+d3-path@1, d3-path@^1.0.1:
+ version "1.0.5"
+ resolved "http://registry.npm.taobao.org/d3-path/download/d3-path-1.0.5.tgz#241eb1849bd9e9e8021c0d0a799f8a0e8e441764"
+
+d3-sankey@~0.7.1:
+ version "0.7.1"
+ resolved "http://registry.npm.taobao.org/d3-sankey/download/d3-sankey-0.7.1.tgz#d229832268fc69a7fec84803e96c2256a614c521"
+ dependencies:
+ d3-array "1"
+ d3-collection "1"
+ d3-shape "^1.2.0"
+
d3-selection@^1.0.2, d3-selection@^1.1.0:
version "1.3.0"
resolved "http://registry.npm.taobao.org/d3-selection/download/d3-selection-1.3.0.tgz#d53772382d3dc4f7507bfb28bcd2d6aed2a0ad6d"
+d3-shape@^1.2.0:
+ version "1.2.0"
+ resolved "http://registry.npm.taobao.org/d3-shape/download/d3-shape-1.2.0.tgz#45d01538f064bafd05ea3d6d2cb748fd8c41f777"
+ dependencies:
+ d3-path "1"
+
d3-timer@1, d3-timer@~1.0.6:
version "1.0.7"
resolved "http://registry.npm.taobao.org/d3-timer/download/d3-timer-1.0.7.tgz#df9650ca587f6c96607ff4e60cc38229e8dd8531"
@@ -2188,12 +2295,23 @@ d3-transition@^1.0.1:
d3-selection "^1.1.0"
d3-timer "1"
+d3-voronoi@~1.1.2:
+ version "1.1.2"
+ resolved "http://registry.npm.taobao.org/d3-voronoi/download/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c"
+
d@1:
version "1.0.0"
resolved "http://registry.npm.taobao.org/d/download/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
dependencies:
es5-ext "^0.10.9"
+dagre@~0.8.2:
+ version "0.8.2"
+ resolved "http://registry.npm.taobao.org/dagre/download/dagre-0.8.2.tgz#755b79f4d5499d63cf74c3368fb08add93eceafe"
+ dependencies:
+ graphlib "^2.1.5"
+ lodash "^4.17.4"
+
dashdash@^1.12.0:
version "1.14.1"
resolved "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
@@ -3504,6 +3622,12 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.2:
version "1.0.1"
resolved "http://registry.npm.taobao.org/graceful-readlink/download/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
+graphlib@^2.1.5:
+ version "2.1.5"
+ resolved "http://registry.npm.taobao.org/graphlib/download/graphlib-2.1.5.tgz#6afe1afcc5148555ec799e499056795bd6938c87"
+ dependencies:
+ lodash "^4.11.1"
+
growl@1.9.2:
version "1.9.2"
resolved "http://registry.npm.taobao.org/growl/download/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f"
@@ -3770,16 +3894,16 @@ https-proxy-agent@1:
debug "2"
extend "3"
-iconv-lite@0.4.19:
- version "0.4.19"
- resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
-
-iconv-lite@0.4.23, iconv-lite@^0.4.17, iconv-lite@^0.4.4:
+iconv-lite@0.4, iconv-lite@0.4.23, iconv-lite@^0.4.17, iconv-lite@^0.4.4:
version "0.4.23"
resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
dependencies:
safer-buffer ">= 2.1.2 < 3"
+iconv-lite@0.4.19:
+ version "0.4.19"
+ resolved "http://registry.npm.taobao.org/iconv-lite/download/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
+
icss-replace-symbols@^1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/icss-replace-symbols/download/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"
@@ -4169,7 +4293,7 @@ is-wsl@^1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/is-wsl/download/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
-isarray@0.0.1:
+isarray@0.0.1, isarray@~0.0.1:
version "0.0.1"
resolved "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
@@ -4949,7 +5073,7 @@ lodash.uniq@^4.5.0:
version "4.5.0"
resolved "http://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
-lodash@4.x, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0:
+lodash@4.x, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@~4.17.4:
version "4.17.10"
resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
@@ -5784,6 +5908,10 @@ parse-json@^4.0.0:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
+parse-svg-path@~0.1.1:
+ version "0.1.2"
+ resolved "http://registry.npm.taobao.org/parse-svg-path/download/parse-svg-path-0.1.2.tgz#7a7ec0d1eb06fa5325c7d3e009b859a09b5d49eb"
+
parse5@4.0.0:
version "4.0.0"
resolved "http://registry.npm.taobao.org/parse5/download/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
@@ -5910,6 +6038,14 @@ pn@^1.1.0:
version "1.1.0"
resolved "http://registry.npm.taobao.org/pn/download/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
+point-at-length@~1.0.2:
+ version "1.0.2"
+ resolved "http://registry.npm.taobao.org/point-at-length/download/point-at-length-1.0.2.tgz#9176d8d6d7c8162f12b646f707db9f0ea728125e"
+ dependencies:
+ abs-svg-path "~0.1.1"
+ isarray "~0.0.1"
+ parse-svg-path "~0.1.1"
+
portfinder@^1.0.13, portfinder@^1.0.9:
version "1.0.13"
resolved "http://registry.npm.taobao.org/portfinder/download/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9"
@@ -6616,6 +6752,10 @@ regjsparser@^0.1.4:
dependencies:
jsesc "~0.5.0"
+regression@~2.0.0:
+ version "2.0.1"
+ resolved "http://registry.npm.taobao.org/regression/download/regression-2.0.1.tgz#8d29c3e8224a10850c35e337e85a8b2fac3b0c87"
+
relateurl@0.2.x:
version "0.2.7"
resolved "http://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
@@ -6808,7 +6948,7 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
-rw@^1.3.2:
+rw@1, rw@^1.3.2:
version "1.3.3"
resolved "http://registry.npm.taobao.org/rw/download/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4"
@@ -7024,6 +7164,10 @@ signal-exit@^3.0.0, signal-exit@^3.0.2:
version "3.0.2"
resolved "http://registry.npm.taobao.org/signal-exit/download/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+simple-statistics@~4.1.0:
+ version "4.1.1"
+ resolved "http://registry.npm.taobao.org/simple-statistics/download/simple-statistics-4.1.1.tgz#533c48d48336ba3d350d8135f20fa7138acb0c7d"
+
slash@^1.0.0:
version "1.0.0"
resolved "http://registry.npm.taobao.org/slash/download/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@@ -7556,6 +7700,12 @@ to-regex@^3.0.1, to-regex@^3.0.2:
regex-not "^1.0.2"
safe-regex "^1.1.0"
+topojson-client@~3.0.0:
+ version "3.0.0"
+ resolved "http://registry.npm.taobao.org/topojson-client/download/topojson-client-3.0.0.tgz#1f99293a77ef42a448d032a81aa982b73f360d2f"
+ dependencies:
+ commander "2"
+
toposort@^1.0.0:
version "1.0.7"
resolved "http://registry.npm.taobao.org/toposort/download/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029"