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;