From 8841443c350e8cd89033deb5a25ecef2d7551ffe Mon Sep 17 00:00:00 2001 From: duan Date: Fri, 12 Aug 2022 09:01:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/reagent/database):=20=E5=8C=96?= =?UTF-8?q?=E5=AD=A6=E5=93=81=E6=95=B0=E6=8D=AE=E5=BA=93=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=BF=BB=E9=A1=B5=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 2 ++ src/views/reagent/database/index.vue | 37 +++++++++++++++++++--------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index b7bf81c..92171ca 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -1,6 +1,7 @@ import axios from 'axios' import { MessageBox, Message } from 'element-ui' import store from '@/store' +import router from '@/router' // create an axios instance const service = axios.create({ @@ -70,6 +71,7 @@ service.interceptors.response.use( type: 'warning' }).then(() => { store.commit('user/RESET_STATE') + router.push('/login') }) } return Promise.reject(new Error(res.msg || 'Error')) diff --git a/src/views/reagent/database/index.vue b/src/views/reagent/database/index.vue index 0727ac7..b18d8f3 100644 --- a/src/views/reagent/database/index.vue +++ b/src/views/reagent/database/index.vue @@ -6,11 +6,11 @@ 搜索 -
最近搜索
- -
- {{ item }} -
+ + + + +
搜索结果
+
+ +
{{ $route.fullPath.indexOf('msds') !== -1 ? 'MSDS数据库' : '危化品数据库' }}
@@ -53,7 +64,8 @@ - {{ currentItem.storage_taboo }} + {{ currentItem.storage_taboo }} + {{ currentItem.storage_method }} {{ currentItem.client_storage_require }} {{ currentItem.provision }} @@ -69,12 +81,9 @@ export default { name: 'Database', data() { return { - searchItem: [], - total: 0, - searchKWs: [ - '氢氧化1-(3-硫代丙基)-2-13-(3-硫代丙基)-2(3H)-苯并噻唑亚基]甲基}萘并[1.2-d]噻唑内盐,三乙基铵盐', - '甲醛', '乙醇' + searchItem: [ ], + total: 0, value: '', currentItem: {}, show: true, @@ -115,6 +124,10 @@ export default { this.total = res.data.total_cout }).finally(() => { this.loading = false }) } + }, + pageChange(page) { + this.page = page + this.getList() } } } @@ -164,7 +177,7 @@ export default { } .search-item-container{ overflow-y: scroll; - max-height: 30%; + height: 60vh; .search-item{ display: flex; align-items: center;