From c5c018ac0faf39d377394c0109a677a7e639eeb3 Mon Sep 17 00:00:00 2001 From: linxin Date: Fri, 1 Nov 2019 16:54:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8Dbug=E5=92=8C=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=9B=BE=E8=A1=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE | 2 +- README.md | 3 +- package.json | 4 +- public/table.json | 40 +++ src/api/index.js | 12 +- src/components/page/BaseCharts.vue | 178 ++++++----- src/components/page/BaseTable.vue | 1 + src/components/page/Dashboard.vue | 477 +++++++++++++++-------------- src/components/page/Donate.vue | 2 +- src/utils/request.js | 45 +-- 10 files changed, 442 insertions(+), 322 deletions(-) create mode 100644 public/table.json diff --git a/LICENSE b/LICENSE index 0c4dc81..1ef7d3e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016 vue-manage-system +Copyright (c) 2016-2019 vue-manage-system Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index fc4da78..7f681e0 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,8 @@ donate -基于 Vue.js + Element UI 的后台管理系统解决方案。[线上地址](https://lin-xin.github.io/example/work/) +基于 Vue + Element UI 的后台管理系统解决方案。[线上地址](https://lin-xin.github.io/example/work/) -本项目基于 vue-cli3 构建,如果是 vue-cli2 的请下载[旧版本 V3.2.0](https://github.com/lin-xin/vue-manage-system/releases/tag/V3.2.0) > React + Ant Design 的版本正在开发中,仓库地址:[react-manage-system](https://github.com/lin-xin/react-manage-system) diff --git a/package.json b/package.json index fe19de9..5d6ca3d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-manage-system", - "version": "4.1.0", + "version": "4.2.0", "private": true, "scripts": { "dev": "npm run serve", @@ -17,7 +17,7 @@ "vue-i18n": "^8.10.0", "vue-quill-editor": "^3.0.6", "vue-router": "^3.0.3", - "vue-schart": "^1.0.0", + "vue-schart": "^2.0.0", "vuedraggable": "^2.17.0" }, "devDependencies": { diff --git a/public/table.json b/public/table.json new file mode 100644 index 0000000..ddd2e32 --- /dev/null +++ b/public/table.json @@ -0,0 +1,40 @@ +{ + "list": [{ + "id": 1, + "name": "张三", + "money": 123, + "address": "广东省东莞市长安镇", + "state": "成功", + "date": "2019-11-1", + "thumb": "https://lin-xin.gitee.io/images/post/wms.png" + }, + { + "id": 2, + "name": "李四", + "money": 456, + "address": "广东省广州市白云区", + "state": "成功", + "date": "2019-10-11", + "thumb": "https://lin-xin.gitee.io/images/post/node3.png" + }, + { + "id": 3, + "name": "王五", + "money": 789, + "address": "湖南省长沙市", + "state": "失败", + "date": "2019-11-11", + "thumb": "https://lin-xin.gitee.io/images/post/parcel.png" + }, + { + "id": 4, + "name": "赵六", + "money": 1011, + "address": "福建省厦门市鼓浪屿", + "state": "成功", + "date": "2019-10-20", + "thumb": "https://lin-xin.gitee.io/images/post/notice.png" + } + ], + "pageTotal": 4 +} \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index 77cdf6a..3035ba9 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -1,9 +1,9 @@ import request from '../utils/request'; -export const fetchData = (query) => { +export const fetchData = query => { return request({ - url: '/ms/table/list', - method: 'post', - data: query - }) -} \ No newline at end of file + url: './table.json', + method: 'get', + params: query + }); +}; diff --git a/src/components/page/BaseCharts.vue b/src/components/page/BaseCharts.vue index b0ca9e1..a269925 100644 --- a/src/components/page/BaseCharts.vue +++ b/src/components/page/BaseCharts.vue @@ -2,108 +2,148 @@
- schart图表 + + schart图表 +
vue-schart:vue.js封装sChart.js的图表组件。 - 访问地址:vue-schart + 访问地址: + vue-schart
柱状图
- +
-
折线图
- +
折线图
+
-
饼状图
- +
饼状图
+
-
环形图
- +
环形图
+
\ No newline at end of file diff --git a/src/components/page/BaseTable.vue b/src/components/page/BaseTable.vue index 570be5b..f4d333d 100644 --- a/src/components/page/BaseTable.vue +++ b/src/components/page/BaseTable.vue @@ -130,6 +130,7 @@ export default { // 获取 easy-mock 的模拟数据 getData() { fetchData(this.query).then(res => { + console.log(res); this.tableData = res.list; this.pageTotal = res.pageTotal || 50; }); diff --git a/src/components/page/Dashboard.vue b/src/components/page/Dashboard.vue index 4c61e9b..d142c1e 100644 --- a/src/components/page/Dashboard.vue +++ b/src/components/page/Dashboard.vue @@ -4,27 +4,29 @@ - - + +
语言详情 -
- Vue - - JavaScript - - CSS - - HTML - + Vue + JavaScript + CSS + HTML +
@@ -68,7 +70,7 @@ 待办事项 添加 - +