From 58022d51540e5f9169f824a6cf651924c1726955 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Sat, 2 Jul 2022 16:17:55 +0800 Subject: [PATCH] bug --- .../xicheng/AppMerchanGird/gridMembers.vue | 2 - .../AppMerchanStatistics.vue | 21 ++- .../AppMerchantManage/AppMerchantManage.vue | 75 +++++++++- src/project/xicheng/AppMerchantManage/add.vue | 138 ++++++++++-------- .../xicheng/AppMerchantManage/detail.vue | 8 +- .../xicheng/AppMerchantMap/AppMerchantMap.vue | 4 +- .../AppPageMerchant/AppPageMerchant.vue | 105 +++++++------ 7 files changed, 230 insertions(+), 123 deletions(-) diff --git a/src/project/xicheng/AppMerchanGird/gridMembers.vue b/src/project/xicheng/AppMerchanGird/gridMembers.vue index bad74aa6..034ba503 100644 --- a/src/project/xicheng/AppMerchanGird/gridMembers.vue +++ b/src/project/xicheng/AppMerchanGird/gridMembers.vue @@ -11,8 +11,6 @@
-
责任家庭
-
diff --git a/src/project/xicheng/AppMerchanStatistics/AppMerchanStatistics.vue b/src/project/xicheng/AppMerchanStatistics/AppMerchanStatistics.vue index fad74f3d..f1dcfc78 100644 --- a/src/project/xicheng/AppMerchanStatistics/AppMerchanStatistics.vue +++ b/src/project/xicheng/AppMerchanStatistics/AppMerchanStatistics.vue @@ -15,7 +15,7 @@

三级网格

-
+

专属网格

({{ tertiaryGrid.length }}个)

@@ -42,12 +42,12 @@

数据统计

-
+
-

网格数

+

{{ index }}

- 12 + {{ item }}

网格列表

@@ -75,7 +75,8 @@ isShowVillage: false, topGrid: [], secondaryGrid: [], - tertiaryGrid: [] + tertiaryGrid: [], + tertiaryInfo: {} } }, @@ -94,6 +95,16 @@ }) }, + getSubInfo () { + this.$loading() + this.$http.post(`/api/appgirdinfo/girdInfoCountByThree`).then(res => { + if (res.code === 0) { + this.isShowVillage = true + this.tertiaryInfo = res.data + } + }) + }, + getInfo () { this.$http.post(`/api/appgirdinfo/listAllByTop`).then(res => { if (res.code === 0) { diff --git a/src/project/xicheng/AppMerchantManage/AppMerchantManage.vue b/src/project/xicheng/AppMerchantManage/AppMerchantManage.vue index 3ca11471..4f9adf6f 100644 --- a/src/project/xicheng/AppMerchantManage/AppMerchantManage.vue +++ b/src/project/xicheng/AppMerchantManage/AppMerchantManage.vue @@ -4,7 +4,16 @@
-
+

{{ item.businessName }}

@@ -22,7 +31,7 @@
李毅-网格长
-
+
新增商户
@@ -40,7 +49,21 @@ keyword: '', current: 1, pages: 2, - list: [] + list: [], + options: [ + { + text: '编辑', + style: { + backgroundColor: '#007aff' + } + }, + { + text: '删除', + style: { + backgroundColor: '#dd524d' + } + } + ] } }, @@ -56,7 +79,7 @@ }, methods: { - getList() { + getList () { if (this.current > this.pages && this.current !== 1) return this.$http.post('/app/appcompany/list', null, { @@ -67,12 +90,54 @@ } }).then((res) => { if (res.code == 0) { - this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records + this.list = this.current > 1 ? [...this.list, ...res.data.records.map(v => { + return { + ...v, + show: false + } + })] : res.data.records.map(v => { + return { + ...v, + show: false + } + }) this.pages = res.data.pages } }) }, + toDetail (id, index) { + this.list[index].show = false + this.linkTo('./detail?id=' + id) + }, + + onClick (index, i) { + if (i == 1) { + this.$confirm('确定删除该数据?').then(() => { + this.$http.post('/app/appcompany/delete?id=' + this.list[index].id).then(res => { + if (res.code === 0) { + this.current = 1 + + this.getList() + } + }) + }).catch(() => { + }) + } else { + this.list[index].show = false + this.linkTo('./add?id=' + this.list[index].id) + } + }, + + onOpen (index) { + this.list[index].show = true + this.list.map((val, idx) => { + if(index != idx) { + this.list[idx].show = false + } + }) + }, + linkTo (url) { uni.navigateTo({ url diff --git a/src/project/xicheng/AppMerchantManage/add.vue b/src/project/xicheng/AppMerchantManage/add.vue index dbd51ca6..96be0ace 100644 --- a/src/project/xicheng/AppMerchantManage/add.vue +++ b/src/project/xicheng/AppMerchantManage/add.vue @@ -68,79 +68,93 @@ \ No newline at end of file +