Commit eb5c6387 by 胡悦

zancun

1 parent fe06bc0d
......@@ -517,14 +517,13 @@ export default {
amapManager._map.remove(marker)
marker = []
if (lng && lat) this.center = [+lng, +lat]
var geocoder = new AMap.Geocoder({
var geocoder = new AMap.Geocoder({ // eslint-disable-line
radius: 1000,
extensions: 'all'
})
geocoder.getAddress(this.center, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
// console.dir(result)
const mar = new AMap.Marker({
const mar = new AMap.Marker({ // eslint-disable-line
position: this.center,
title: result.regeocode.formattedAddress
})
......
......@@ -150,16 +150,16 @@ export default {
})
},
handleClose() {
this.eventBus.$emit('reset')
// this.eventBus.$emit('reset')
this.$emit('hideDialog', true)
},
handleComfrim() {
if (this.merchantSearch.times) {
this.merchantSearch.startTime = this.merchantSearch.times[0] + ' 00:00:00'
this.merchantSearch.endTime = this.merchantSearch.times[1] + ' 23:59:59'
delete this.merchantSearch.times
// delete this.merchantSearch.times
}
this.eventBus.$emit('reset')
// this.eventBus.$emit('reset')
this.$emit('comfirmDialog')
},
hideDialog() {
......
......@@ -8,11 +8,28 @@
<gl-button type="primary" @click="handleAdd">新增商户</gl-button>
</div>
<div>
<gl-table
class="m-b10"
:table="ListTableData"
v-loading="tableLoading"
></gl-table>
<gl-table
class="m-b10"
:table="ListTableData"
v-loading="tableLoading"
>
<!-- <gl-table-column
align="center"
v-for="(i, index) in ListTableData.column"
:key="index"
:label='i.label'
:prop='i.prop'
:width='i.width'>
<template slot-scope="scope">
<template v-if='i.prop === "areaAddress"'>
{{ListTableData.data[scope.scope.$index][i.prop] ? ListTableData.data[scope.scope.$index][i.prop] : ''}}
</template>
<template v-else>
{{ListTableData.data[scope.scope.$index][i.prop]}}
</template>
</template>
</gl-table-column> -->
</gl-table>
<gl-pagination
background
@size-change="handleSizeChange"
......@@ -189,6 +206,7 @@ export default {
methods: {
// 获取页面参数
getParams() {
console.log(this.merchantSearch)
const params = this.$deep_clone(this.merchantSearch)
params.pageSize = this.pageNum
params.pageCount = this.pageSize
......@@ -202,14 +220,15 @@ export default {
getList() {
const params = this.getParams()
params.method = bizMethods.Search
console.log(params)
request.req(params).then(res => {
this.ListTableData.data = res.merchants
res.pagination && (this.totalCount = res.pagination.totalCount)
resetSearch(this.merchantSearch)
// resetSearch(this.merchantSearch)
this.tableLoading = false
}).catch(err => {
notice.errorTips(err)
resetSearch(this.merchantSearch)
// resetSearch(this.merchantSearch)
this.tableLoading = false
})
},
......@@ -217,6 +236,7 @@ export default {
this.merchantForm = Object.assign(this.merchantForm, areaInfo)
const params = this.merchantForm
params.method = bizMethods.Create
params.operatorId = this.$get_session_config().user.id
request.req(params).then(res => {
notice.okTips()
this.handleAddHide()
......@@ -227,10 +247,13 @@ export default {
},
// 接口请求-end
handleSizeChange(val) {
console.log(val)
this.pageSize = val
this.loadingGetList()
},
handleCurrentChange(val) {
console.log(val)
console.log(this.merchantSearch)
this.pageNum = val
this.loadingGetList()
},
......@@ -240,11 +263,14 @@ export default {
},
// 隐藏/重置
handleSearchHide(hide) {
resetSearch(this.merchantSearch)
hide && this.handleSearch()
// hide 有值为关闭
// resetSearch(this.merchantSearch)
// hide && this.handleSearch()
hide ? this.handleSearch() : resetSearch(this.merchantSearch) && this.handleSearch()
},
// 搜索
handleSearchComfirm() {
console.log(this.merchantSearch)
this.handleSearch()
this.loadingGetList()
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!