Commit eb5c6387 by 胡悦

zancun

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