数据列表concat 修改api url

This commit is contained in:
gtz217 2022-08-04 09:07:34 +08:00
parent 14d7d91c7c
commit c747eee2b3
3 changed files with 20 additions and 12 deletions

View File

@ -47,7 +47,7 @@
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
</van-col>
<van-col :span="12" :offset="1">
<van-button class="eq-search-btn-item eq-search-btn-right" round @click="getDataList"> </van-button>
<van-button class="eq-search-btn-item eq-search-btn-right" round @click="handleSearch"> </van-button>
</van-col>
</van-row>
</div>
@ -147,7 +147,7 @@ export default {
async getDataList () {
const result = await list(this.queryList)
if (result.success) {
this.dataList = result.data.records
this.dataList = this.dataList.concat(result.data.records)
this.dataOption = result.data
if (this.dataOption.total / 10 <= this.queryList.current) {
this.isOver = false
@ -169,9 +169,12 @@ export default {
this.eqList = result.data
}
},
//
onChange (v) {
this.getDataList()
//
handleSearch () {
this.dataList = []
this.$nextTick(() => {
this.getDataList()
})
},
//
onClickLeft () {
@ -197,6 +200,7 @@ export default {
this.eqName = null
this.timeStr = null
this.timeSlot = []
this.dataList = []
},
//
async onRefresh () {

View File

@ -31,7 +31,7 @@
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
</van-col>
<van-col :span="12" :offset="1">
<van-button class="eq-search-btn-item eq-search-btn-right" round @click="getDataList"> </van-button>
<van-button class="eq-search-btn-item eq-search-btn-right" round @click="handleSearch"> </van-button>
</van-col>
</van-row>
</div>
@ -101,7 +101,7 @@ export default {
async getDataList () {
const result = await list(this.queryList)
if (result.success) {
this.dataList = result.data.records
this.dataList = this.dataList.concat(result.data.records)
this.dataOption = result.data
if (this.dataOption.total / 10 <= this.queryList.current) {
this.isOver = false
@ -113,9 +113,12 @@ export default {
this.isOver = true
}
},
//
onChange (v) {
this.getDataList()
//
handleSearch () {
this.dataList = []
this.$nextTick(() => {
this.getDataList()
})
},
//
onClickLeft () {
@ -136,6 +139,7 @@ export default {
key: '',
size: 10
}
this.dataList = []
},
//
async onRefresh () {

View File

@ -2,7 +2,7 @@
* @Author: gtz
* @Date: 2022-07-25 14:18:00
* @LastEditors: gtz
* @LastEditTime: 2022-08-02 15:08:29
* @LastEditTime: 2022-08-04 08:35:07
* @Description: file content
* @FilePath: \hf-pda\src\util\request.js
*/
@ -27,7 +27,7 @@ service.interceptors.request.use((config) => {
// config.headers['token'] = JSON.parse(sessionStorage.getItem('userInfo')).token
// }
// 输出到安卓版本的时候开启下面的配置项
// config.url = 'https://xiaobu.zhaobu.wang' + config.url
config.url = 'http://hfxny.mes.picaiba.com' + config.url
// ***************
if (config.formState) {