From 6b4cb7b82673e10216fab8fee550e4730ebdab4d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?=
<819653817@qq.com>
Date: Mon, 14 Oct 2024 09:05:04 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=89=E6=B1=82=E7=B1=BB=E5=88=AB=E7=9A=84?=
=?UTF-8?q?=E9=80=89=E4=B8=AD=EF=BC=8C=E9=A6=96=E9=A1=B5=E7=9A=84=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E5=B1=85=E6=B0=91=E8=AE=AE=E4=BA=8B=EF=BC=8C=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E4=BF=A1=E6=81=AF=E7=9A=84=E4=BF=AE=E6=94=B9=EF=BC=8C?=
=?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BF=A1=E6=81=AF=E7=9A=84=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/event/index.vue | 65 ++++++++++------------------
src/views/home/index.vue | 84 ++++++++++++++++++++++++++++--------
src/views/register/index.vue | 5 ++-
src/views/userInfo/index.vue | 11 +++--
4 files changed, 98 insertions(+), 67 deletions(-)
diff --git a/src/views/event/index.vue b/src/views/event/index.vue
index 89df915..14b5ecb 100644
--- a/src/views/event/index.vue
+++ b/src/views/event/index.vue
@@ -29,7 +29,7 @@
- {{ selectedValue }}
+ {{ cascaderValue }}
@@ -53,9 +53,9 @@
-
+
@@ -83,7 +83,7 @@ export default {
components: {Recording,Audio,Picker, Perfect, Map, appeal},
data() {
return {
- cascaderValue:"",
+ cascaderValue:"",//诉求类别
cateOptions:[],
showType:false,
streetId:"",
@@ -125,49 +125,33 @@ export default {
this.agencyId = this.$store.state.app.agencyId;
},
methods: {
- onChange(value,selectedOptions) {
- console.log(value,selectedOptions,"skjlkfdjs");
- const lastOption = this.findSelectedOption(value, this.cateOptions);
- if (!lastOption || !lastOption.children || lastOption.children.length === 0) {
- this.selectedValue = value;
- this.showType = false;
- console.log('选中项:', lastOption);
- }
+ onChange(value) {
+ console.log(value ,"skjlkfdjs");
+ this.cascaderValue = value.selectedOptions[value.tabIndex].categoryName;
+ logic(value.selectedOptions[value.tabIndex].categoryName,"skdlsklfjslkfjl");
+ this.showType=false
+
+ // const lastOption = this.findSelectedOption(value, this.cateOptions);
+ // if (!lastOption || !lastOption.children || lastOption.children.length === 0) {
+ // this.selectedValue = value;
+ // this.showType = false;
+ // console.log('选中项:', lastOption);
+ // }
},
//获取时间类型
async getCateOptions() {
const url = '/governance/icEvent/getCategoryTree';
let params = {};
getCategoryTree(params).then(res => {
- // let treeDataNew = this.deepTree(res.data, "children");
+ //对子集为空数据的做null处理
+ let treeDataNew = this.deepTree(res.data, "children");
if (res.code === 0) {
- //组织级联数据
- // ++this.iscascaderShow;
- // this.cateOptions = [];
- this.cateOptions = res.data;
- console.log(this.cateOptions,"SDSDKLJLKSDFJLK");
-
+ this.cateOptions = [];
+ this.cateOptions = treeDataNew;
} else {
this.$message.error(msg);
}
- // if (this.eventDetailCopy.parentCategoryId) {
- // const pids = this.eventDetailCopy.parentCategoryId.split(',');
- // pids.push(this.eventDetailCopy.categoryId);
- // let nodes = this.cateOptions;
- // for (let i = 0; i < pids.length; i++) {
- // nodes = this.buildNode(nodes, pids[i])
- // }
- // if (nodes) {
- // this.formData.categoryList.push(nodes)
- // }
- // }
-
-
})
- console.log(this.cateOptions,"SDSDKLJLKSDFJLK");
- // const { data, code, msg } = await requestPost(url, params);
-
-
},
//重构树,去除网格
deepTree(arr, children) {
@@ -175,11 +159,8 @@ export default {
return arr.map((item) => {
return {
...item,
- [children]:
- (item[children] &&
- item[children].length > 0 &&
- this.deepTree(item[children], children)) ||
- null,
+ [children]:item[children] &&item[children].length > 0?this.deepTree(item[children], children):null
+
};
});
}
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 1509ceb..60bb993 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -87,28 +87,78 @@
更多
-
-
-
- {{ item.eventContent }}
-
-
-

-
参与 {{ item.total }}
+
+
+
+
+
+
+
+ {{ item.title }}
+
+
+
+
+
+
+ {{filterTagId(item.tagId)}}
+
{{item.releaseTime}}
+
+
+
{{ item.likes || 0}}
+
+
+
+
-
-

-
支持 {{ item.supportNum }}
+
+ 暂无数据~
-
反对
- {{ item.opposeNum }}
-
+
+
+
+
+
+
+
+
+

+
居民议事
+
更多
+
+
+
+
+ {{ item.eventContent }}
+
+
+

+
参与 {{ item.total }}
+
+
+

+
支持 {{ item.supportNum }}
+
+
+
反对
+ {{ item.opposeNum }}
+
+
+
+
+
+
diff --git a/src/views/register/index.vue b/src/views/register/index.vue
index abf8508..fbcaeb7 100644
--- a/src/views/register/index.vue
+++ b/src/views/register/index.vue
@@ -13,9 +13,10 @@
注册
-
+
-
+
+
diff --git a/src/views/userInfo/index.vue b/src/views/userInfo/index.vue
index 884405f..f93daef 100644
--- a/src/views/userInfo/index.vue
+++ b/src/views/userInfo/index.vue
@@ -1,18 +1,18 @@
-
+
+
+
@@ -348,7 +348,6 @@ export default {
// 获取街道
getAllAgencyStreet() {
getAllAgencyStreet({}).then(res => {
-
this.streetOptions = res.data
? res.data.map(item => {
return {