From 5897db910bd4d86e68f1c324860a54c926831c15 Mon Sep 17 00:00:00 2001 From: duan Date: Tue, 2 Aug 2022 13:44:24 +0800 Subject: [PATCH] =?UTF-8?q?refactor(api):=20=E4=BF=AE=E6=94=B9api=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/api/reagent/overView.js | 27 ++ src/api/{ => reagent}/receivingReturn.js | 0 src/api/{ => reagent}/report.js | 0 src/api/{ => reagent}/warehousing.js | 0 src/api/{ => user}/user.js | 0 src/components/Scannner/index.vue | 2 +- src/main.js | 3 - src/store/modules/user.js | 2 +- src/views/login/index.vue | 2 +- src/views/reagent/mainoverview/index.vue | 445 ++++++++++++++---- .../reagent/receivingandreturn/index.vue | 2 +- src/views/reagent/report/index.vue | 2 +- .../reagent/report/inventoryconsum/index.vue | 2 +- .../reagent/report/reagentconsum/index.vue | 2 +- .../reagent/report/reagentinfo/index.vue | 2 +- src/views/reagent/report/record/index.vue | 2 +- src/views/reagent/report/storeinfo/index.vue | 2 +- .../reagent/report/usefrequency/index.vue | 2 +- src/views/reagent/report/userconsum/index.vue | 2 +- .../reagent/report/warehousinginfo/index.vue | 2 +- src/views/reagent/warehousing/index.vue | 2 +- 22 files changed, 392 insertions(+), 113 deletions(-) create mode 100644 src/api/reagent/overView.js rename src/api/{ => reagent}/receivingReturn.js (100%) rename src/api/{ => reagent}/report.js (100%) rename src/api/{ => reagent}/warehousing.js (100%) rename src/api/{ => user}/user.js (100%) diff --git a/package.json b/package.json index 62a8626..361b337 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "axios": "0.18.1", "core-js": "3.6.5", "echarts": "^5.3.3", - "element-ui": "2.13.2", + "element-ui": "2.15.7", "js-cookie": "2.2.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", diff --git a/src/api/reagent/overView.js b/src/api/reagent/overView.js new file mode 100644 index 0000000..8185331 --- /dev/null +++ b/src/api/reagent/overView.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function home_info(data) { + return request({ + url: '/api/home/home_info', + method: 'post', + data + }) +} + +// /api/home/home_warning_list +export function home_warning_list(data) { + return request({ + url: '/api/home/home_warning_list', + method: 'post', + data + }) +} + +// /api/home/home_drug_remaining +export function home_drug_remaining(data) { + return request({ + url: '/api/home/home_drug_remaining', + method: 'post', + data + }) +} diff --git a/src/api/receivingReturn.js b/src/api/reagent/receivingReturn.js similarity index 100% rename from src/api/receivingReturn.js rename to src/api/reagent/receivingReturn.js diff --git a/src/api/report.js b/src/api/reagent/report.js similarity index 100% rename from src/api/report.js rename to src/api/reagent/report.js diff --git a/src/api/warehousing.js b/src/api/reagent/warehousing.js similarity index 100% rename from src/api/warehousing.js rename to src/api/reagent/warehousing.js diff --git a/src/api/user.js b/src/api/user/user.js similarity index 100% rename from src/api/user.js rename to src/api/user/user.js diff --git a/src/components/Scannner/index.vue b/src/components/Scannner/index.vue index 7da951d..b89f564 100644 --- a/src/components/Scannner/index.vue +++ b/src/components/Scannner/index.vue @@ -2,7 +2,7 @@ export default { name: 'Scannner', // eslint-disable-next-line vue/require-prop-types - props: ['getCode'], + props: ['getcode'], data() { return { codeValue: '', diff --git a/src/main.js b/src/main.js index c17d5c1..fde92f5 100644 --- a/src/main.js +++ b/src/main.js @@ -25,9 +25,6 @@ import '@/permission' // permission contro * please remove it before going online ! ! ! */ import * as echarts from 'echarts' -// 扫描 -import VueBarcodeScanner from 'vue-barcode-scanner' -Vue.use(VueBarcodeScanner) Vue.prototype.$echarts = echarts // 挂载到Vue实例上面 diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 8aacc6d..4d20d97 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,4 +1,4 @@ -import { logout } from '@/api/user' +import { logout } from '@/api/user/user' import { getToken, removeToken } from '@/utils/auth' import { resetRouter } from '@/router' diff --git a/src/views/login/index.vue b/src/views/login/index.vue index ceda04e..371de06 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -71,7 +71,7 @@