Commit 1f72c48f authored by 786817560's avatar 786817560

Merge branch 'ren' into develop

parents 279f6a6d 07a62d80
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2019-10-31 09:49:57 * @Date: 2019-10-31 09:49:57
* @LastEditTime: 2019-11-22 10:28:20 * @LastEditTime: 2019-11-22 16:17:31
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 合同查询--明细 * @Description: 合同查询--明细
* @FilePath: * @FilePath:
...@@ -52,6 +52,11 @@ ...@@ -52,6 +52,11 @@
</list-item> </list-item>
<div class="header">设备清单</div> <div class="header">设备清单</div>
<scroll
ref="scroll"
:updateData="[lists]"
:pullUp="true"
@pullingUp="loadMore">
<list-item :item-height="104" class="equipment-list"> <list-item :item-height="104" class="equipment-list">
<item v-for="(item,index) in lists" :proportion="[2,1]" :key="index"> <item v-for="(item,index) in lists" :proportion="[2,1]" :key="index">
<div slot="name" class="parameters"> <div slot="name" class="parameters">
...@@ -81,6 +86,8 @@ ...@@ -81,6 +86,8 @@
</div> </div>
</item> </item>
</list-item> </list-item>
</scroll>
</h-content> </h-content>
</h-view> </h-view>
...@@ -95,6 +102,7 @@ export default { ...@@ -95,6 +102,7 @@ export default {
data () { data () {
return { return {
lists: [], lists: [],
pagenum: 1,
detailInfo: {}, detailInfo: {},
} }
}, },
...@@ -105,6 +113,7 @@ export default { ...@@ -105,6 +113,7 @@ export default {
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
if (from.name === 'ContractRecords') { if (from.name === 'ContractRecords') {
vm.pagenum = 1
vm.detailQuery() vm.detailQuery()
vm.equipQuery() vm.equipQuery()
} }
...@@ -143,6 +152,8 @@ export default { ...@@ -143,6 +152,8 @@ export default {
let vm = this let vm = this
let url = $config.basePath + 'con_equip_list' let url = $config.basePath + 'con_equip_list'
let param = { let param = {
pagesize: 10,
pagenum: vm.pagenum,
project_id: vm.$route.params.project_id, project_id: vm.$route.params.project_id,
} }
vm.hlsPopup.showLoading('数据加载中') vm.hlsPopup.showLoading('数据加载中')
...@@ -150,6 +161,44 @@ export default { ...@@ -150,6 +161,44 @@ export default {
vm.hlsPopup.hideLoading() vm.hlsPopup.hideLoading()
if (res.result === 'S') { if (res.result === 'S') {
vm.lists = res.lists vm.lists = res.lists
if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) {
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
loadMore () {
let vm = this
let url = $config.basePath + 'con_equip_list'
vm.pagenum++
let param = {
pagesize: 10,
pagenum: vm.pagenum,
project_id: vm.$route.params.project_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(false)
}
} else { } else {
hlsPopup.showLongCenter(res.message) hlsPopup.showLongCenter(res.message)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment