From 89a4c3bda15b2e9b5671ea57fbe549f9cd24436d Mon Sep 17 00:00:00 2001 From: Pan Date: Wed, 19 Apr 2017 18:43:57 +0800 Subject: [PATCH] add --- package.json | 1 + src/api/article.js | 29 +++ src/components/Charts/keyboard.vue | 4 +- src/components/Charts/keyboard2.vue | 4 +- src/components/Charts/linemarker.vue | 219 +++++++++++++++++++++ src/components/Charts/mixchart.vue | 266 ++++++++++++++++++++++++++ src/components/ImageCropper/index.vue | 90 ++++++--- src/components/PanThumb/index.vue | 2 +- src/main.js | 1 + src/mock/index.js | 10 + src/router/index.js | 27 ++- src/views/charts/keyboard.vue | 9 +- src/views/charts/keyboard2.vue | 9 +- src/views/charts/line.vue | 26 +++ src/views/charts/markdown.vue | 22 --- src/views/charts/mixchart.vue | 25 +++ src/views/charts/tinymce.vue | 28 --- src/views/components/avatarUpload.vue | 42 ++++ src/views/excel/index.vue | 38 ++++ 19 files changed, 754 insertions(+), 98 deletions(-) create mode 100644 src/api/article.js create mode 100644 src/components/Charts/linemarker.vue create mode 100644 src/components/Charts/mixchart.vue create mode 100644 src/mock/index.js create mode 100644 src/views/charts/line.vue delete mode 100644 src/views/charts/markdown.vue create mode 100644 src/views/charts/mixchart.vue delete mode 100644 src/views/charts/tinymce.vue create mode 100644 src/views/components/avatarUpload.vue create mode 100644 src/views/excel/index.vue diff --git a/package.json b/package.json index 16f9cb11..e7f159d3 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "jquery": "3.1.1", "js-cookie": "2.1.3", "jsonlint": "1.6.2", + "mockjs": "^1.0.1-beta3", "normalize.css": "3.0.2", "nprogress": "0.2.0", "showdown": "1.6.4", diff --git a/src/api/article.js b/src/api/article.js new file mode 100644 index 00000000..a359329d --- /dev/null +++ b/src/api/article.js @@ -0,0 +1,29 @@ +import fetch, { tpFetch } from 'utils/fetch'; +import { param } from 'utils'; + +export function getList(query) { + return tpFetch({ + url: '/article/list', + method: 'get' + }); +} +export function upload(data) { + return tpFetch({ + url: 'https://upload.qbox.me', + method: 'post', + data + }); +} + + +/* 外部uri转七牛uri*/ +export function netUpload(token, net_url) { + const imgData = { + net_url + }; + return fetch({ + url: '/qiniu/upload/net/async', + method: 'post', + data: imgData + }); +} diff --git a/src/components/Charts/keyboard.vue b/src/components/Charts/keyboard.vue index 2266a546..8b866d83 100644 --- a/src/components/Charts/keyboard.vue +++ b/src/components/Charts/keyboard.vue @@ -17,11 +17,11 @@ props: { className: { type: String, - default: 'bar-percent-chart' + default: 'chart' }, id: { type: String, - default: 'bar-percent-chart' + default: 'chart' }, width: { type: String, diff --git a/src/components/Charts/keyboard2.vue b/src/components/Charts/keyboard2.vue index 8ba50545..605d7c1d 100644 --- a/src/components/Charts/keyboard2.vue +++ b/src/components/Charts/keyboard2.vue @@ -17,11 +17,11 @@ props: { className: { type: String, - default: 'bar-percent-chart' + default: 'chart' }, id: { type: String, - default: 'bar-percent-chart' + default: 'chart' }, width: { type: String, diff --git a/src/components/Charts/linemarker.vue b/src/components/Charts/linemarker.vue new file mode 100644 index 00000000..cbba78bc --- /dev/null +++ b/src/components/Charts/linemarker.vue @@ -0,0 +1,219 @@ + + diff --git a/src/components/Charts/mixchart.vue b/src/components/Charts/mixchart.vue new file mode 100644 index 00000000..c7c9fe58 --- /dev/null +++ b/src/components/Charts/mixchart.vue @@ -0,0 +1,266 @@ + + diff --git a/src/components/ImageCropper/index.vue b/src/components/ImageCropper/index.vue index d0e94ab2..1e60a5d4 100644 --- a/src/components/ImageCropper/index.vue +++ b/src/components/ImageCropper/index.vue @@ -104,7 +104,6 @@ @@ -23,7 +18,7 @@ .chart-container{ position: relative; width: 100%; - height: 100%; + height: 90%; } diff --git a/src/views/charts/keyboard2.vue b/src/views/charts/keyboard2.vue index f459ac7b..d46c3589 100644 --- a/src/views/charts/keyboard2.vue +++ b/src/views/charts/keyboard2.vue @@ -10,12 +10,7 @@ import keyboardChart2 from 'components/Charts/keyboard2'; export default { - components: { keyboardChart2 }, - data() { - return { - - } - } + components: { keyboardChart2 } }; @@ -23,7 +18,7 @@ .chart-container{ position: relative; width: 100%; - height: 100%; + height: 90%; } diff --git a/src/views/charts/line.vue b/src/views/charts/line.vue new file mode 100644 index 00000000..5992c502 --- /dev/null +++ b/src/views/charts/line.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/src/views/charts/markdown.vue b/src/views/charts/markdown.vue deleted file mode 100644 index 3bf5e1ac..00000000 --- a/src/views/charts/markdown.vue +++ /dev/null @@ -1,22 +0,0 @@ - - - - diff --git a/src/views/charts/mixchart.vue b/src/views/charts/mixchart.vue new file mode 100644 index 00000000..8b2afd02 --- /dev/null +++ b/src/views/charts/mixchart.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/src/views/charts/tinymce.vue b/src/views/charts/tinymce.vue deleted file mode 100644 index a88bd91c..00000000 --- a/src/views/charts/tinymce.vue +++ /dev/null @@ -1,28 +0,0 @@ - - - - diff --git a/src/views/components/avatarUpload.vue b/src/views/components/avatarUpload.vue new file mode 100644 index 00000000..a41558ac --- /dev/null +++ b/src/views/components/avatarUpload.vue @@ -0,0 +1,42 @@ + + + + diff --git a/src/views/excel/index.vue b/src/views/excel/index.vue new file mode 100644 index 00000000..6c18a78a --- /dev/null +++ b/src/views/excel/index.vue @@ -0,0 +1,38 @@ + +