From 7e68c1ee4d8b56dca3839903e8cf6d5a7dd42d2d Mon Sep 17 00:00:00 2001 From: CS-Tao <990296951@qq.com> Date: Thu, 19 Dec 2019 16:08:18 +0800 Subject: [PATCH 1/3] Add spark line for monitor --- package.json | 1 + src/renderer/api/mock/library.api.js | 2 +- .../components/Body/Monitor/index.vue | 106 ++++++++++++++++-- src/renderer/components/Body/Monitor/mixin.js | 2 +- yarn.lock | 5 + 5 files changed, 105 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 41d52013..c012e90d 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "vue-markdown": "^2.2.4", "vue-router": "^2.5.3", "vuepress-theme-vue": "^1.0.3", + "vuetrend": "^0.3.4", "vuex": "^2.3.1" }, "devDependencies": { diff --git a/src/renderer/api/mock/library.api.js b/src/renderer/api/mock/library.api.js index c57aed33..ea76f0a0 100644 --- a/src/renderer/api/mock/library.api.js +++ b/src/renderer/api/mock/library.api.js @@ -20,7 +20,7 @@ export default { Book: config => { console.log('Mock: ' + config.url) var num = Math.random() - if (num > 0.5) { + if (num > 0.02) { return {'status': 'fail', 'data': null, 'message': '预约失败,请尽快选择其他时段或座位', 'code': '1'} } else { return {'status': 'success', 'data': {'id': 3442608, 'receipt': '0175-608-1', 'onDate': '2018 年 07 月 23 日', 'begin': '21 : 30', 'end': '22 : 30', 'location': '信息馆2层东区东自然科学区,座位号009', 'checkedIn': false}, 'message': '', 'code': '0'} diff --git a/src/renderer/components/Body/Monitor/index.vue b/src/renderer/components/Body/Monitor/index.vue index 1efdfae4..916b8e34 100644 --- a/src/renderer/components/Body/Monitor/index.vue +++ b/src/renderer/components/Body/Monitor/index.vue @@ -48,7 +48,18 @@ :max="360"> -
+
+ + +
+