数据列表concat 修改api url
This commit is contained in:
parent
14d7d91c7c
commit
c747eee2b3
@ -47,7 +47,7 @@
|
|||||||
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
|
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col :span="12" :offset="1">
|
<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-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</div>
|
</div>
|
||||||
@ -147,7 +147,7 @@ export default {
|
|||||||
async getDataList () {
|
async getDataList () {
|
||||||
const result = await list(this.queryList)
|
const result = await list(this.queryList)
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.dataList = result.data.records
|
this.dataList = this.dataList.concat(result.data.records)
|
||||||
this.dataOption = result.data
|
this.dataOption = result.data
|
||||||
if (this.dataOption.total / 10 <= this.queryList.current) {
|
if (this.dataOption.total / 10 <= this.queryList.current) {
|
||||||
this.isOver = false
|
this.isOver = false
|
||||||
@ -169,9 +169,12 @@ export default {
|
|||||||
this.eqList = result.data
|
this.eqList = result.data
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 分页器
|
// 点击查询
|
||||||
onChange (v) {
|
handleSearch () {
|
||||||
|
this.dataList = []
|
||||||
|
this.$nextTick(() => {
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 返回上一页
|
// 返回上一页
|
||||||
onClickLeft () {
|
onClickLeft () {
|
||||||
@ -197,6 +200,7 @@ export default {
|
|||||||
this.eqName = null
|
this.eqName = null
|
||||||
this.timeStr = null
|
this.timeStr = null
|
||||||
this.timeSlot = []
|
this.timeSlot = []
|
||||||
|
this.dataList = []
|
||||||
},
|
},
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
async onRefresh () {
|
async onRefresh () {
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
|
<van-button class="eq-search-btn-item eq-search-btn-left" round @click="toAdd">扫描新增</van-button>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col :span="12" :offset="1">
|
<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-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</div>
|
</div>
|
||||||
@ -101,7 +101,7 @@ export default {
|
|||||||
async getDataList () {
|
async getDataList () {
|
||||||
const result = await list(this.queryList)
|
const result = await list(this.queryList)
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
this.dataList = result.data.records
|
this.dataList = this.dataList.concat(result.data.records)
|
||||||
this.dataOption = result.data
|
this.dataOption = result.data
|
||||||
if (this.dataOption.total / 10 <= this.queryList.current) {
|
if (this.dataOption.total / 10 <= this.queryList.current) {
|
||||||
this.isOver = false
|
this.isOver = false
|
||||||
@ -113,9 +113,12 @@ export default {
|
|||||||
this.isOver = true
|
this.isOver = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 分页器
|
// 点击查询
|
||||||
onChange (v) {
|
handleSearch () {
|
||||||
|
this.dataList = []
|
||||||
|
this.$nextTick(() => {
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 返回上一页
|
// 返回上一页
|
||||||
onClickLeft () {
|
onClickLeft () {
|
||||||
@ -136,6 +139,7 @@ export default {
|
|||||||
key: '',
|
key: '',
|
||||||
size: 10
|
size: 10
|
||||||
}
|
}
|
||||||
|
this.dataList = []
|
||||||
},
|
},
|
||||||
// 下拉刷新
|
// 下拉刷新
|
||||||
async onRefresh () {
|
async onRefresh () {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: gtz
|
* @Author: gtz
|
||||||
* @Date: 2022-07-25 14:18:00
|
* @Date: 2022-07-25 14:18:00
|
||||||
* @LastEditors: gtz
|
* @LastEditors: gtz
|
||||||
* @LastEditTime: 2022-08-02 15:08:29
|
* @LastEditTime: 2022-08-04 08:35:07
|
||||||
* @Description: file content
|
* @Description: file content
|
||||||
* @FilePath: \hf-pda\src\util\request.js
|
* @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.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) {
|
if (config.formState) {
|
||||||
|
Loading…
Reference in New Issue
Block a user