From ca3a9e8fa3070148e8e3f0096b3f20424c162484 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 6 Dec 2021 17:13:19 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E9=9C=80=E6=B1=82=E6=A8=A1=E5=9D=97=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scss/{ => modules/visual}/people.scss | 69 +++++-- src/router/index.js | 3 +- .../visual/basicinfo/cpts/people-more.vue | 2 +- src/views/modules/visual/basicinfo/people.vue | 101 +++++++++- .../communityGovern/cpts/people-more.vue | 2 +- .../modules/visual/communityGovern/people.vue | 2 +- src/views/modules/visual/cpts/loading.vue | 68 +++++++ src/views/modules/visual/cpts/tb.vue | 184 ++++++++++++++++++ 8 files changed, 408 insertions(+), 23 deletions(-) rename src/assets/scss/{ => modules/visual}/people.scss (90%) create mode 100644 src/views/modules/visual/cpts/loading.vue create mode 100644 src/views/modules/visual/cpts/tb.vue diff --git a/src/assets/scss/people.scss b/src/assets/scss/modules/visual/people.scss similarity index 90% rename from src/assets/scss/people.scss rename to src/assets/scss/modules/visual/people.scss index ea88d05f..0f6ca331 100644 --- a/src/assets/scss/people.scss +++ b/src/assets/scss/modules/visual/people.scss @@ -1,22 +1,24 @@ -@import "c/config"; -@import "c/function"; +@import "../../c/config"; +@import "../../c/function"; .g-cpt { display: flex; flex-wrap: wrap; justify-content: center; - // justify-content: space-around; - // .g-l { - // margin-right: auto; - // } - // .g-r { - // margin-left: auto; - // } + .g-l { + width: 850px; + margin-bottom: 20px; + } + + .g-r { + margin-left: 6px; + width: calc(100% - 850px - 6px); + min-width: 850px; + } } .m-people { position: relative; - width: 850px; .title { padding: 10px; @@ -286,7 +288,6 @@ .m-relation { position: relative; margin-top: 20px; - width: 850px; .title { padding: 10px; @@ -432,3 +433,49 @@ } } } + +.m-tb { + .title { + padding: 10px; + font-size: 22px; + font-family: PingFang SC; + font-weight: 800; + color: #ffffff; + display: flex; + align-items: center; + + img { + display: block; + margin-right: 5px; + } + span { + display: block; + } + } +} + +.m-pagination { + box-sizing: border-box; + margin-top: 20px; + width: 100%; + height: 40px; + display: flex; + justify-content: flex-end; + + /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active { + background: #0266d1; + color: #000d3f; + } + + /deep/ .el-pagination .el-pager li { + background: #002e74; + } + + /deep/ .el-pagination .btn-prev { + background: #002e74; + } + + /deep/ .el-pagination .btn-next { + background: #002e74; + } +} diff --git a/src/router/index.js b/src/router/index.js index 74065fe0..9d627dfa 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -98,7 +98,8 @@ export const moduleShujuRoutes = { }, }, { - path: "/main-shuju/visual-basicinfo-people", + path: "/main-shuju/visual-basicinfo-people/:uid", + props: true, component: () => import("@/views/modules/visual/basicinfo/people"), name: "visual-basicinfo-people", meta: { diff --git a/src/views/modules/visual/basicinfo/cpts/people-more.vue b/src/views/modules/visual/basicinfo/cpts/people-more.vue index a634aade..6198cc91 100644 --- a/src/views/modules/visual/basicinfo/cpts/people-more.vue +++ b/src/views/modules/visual/basicinfo/cpts/people-more.vue @@ -500,4 +500,4 @@ export default { }; - + diff --git a/src/views/modules/visual/basicinfo/people.vue b/src/views/modules/visual/basicinfo/people.vue index a75bebad..4ecfb1e9 100644 --- a/src/views/modules/visual/basicinfo/people.vue +++ b/src/views/modules/visual/basicinfo/people.vue @@ -133,7 +133,7 @@
-
+
+
+ +
+ + 居民需求 +
+ +
+ + +
+ + +
+
+
+
+
@@ -299,6 +328,7 @@ import { Loading } from "element-ui"; //引入Loading服务 import { requestPost } from "@/js/dai/request"; import cptCard from "@/views/modules/visual/cpts/card"; import peopleMore from "@/views/modules/visual/basicinfo/cpts/people-more"; +import cptTb from "@/views/modules/visual/cpts/tb"; export default { name: "HomeMap", @@ -329,6 +359,15 @@ export default { // }, ], }, + + demand: { + loading: true, + header: ["序号", "服务时间", "需求类型", "需求内容", "状态", "操作"], + list: [], + pageSize: 5, + pageNo: 1, + total: 0, + }, }; }, @@ -345,6 +384,7 @@ export default { components: { cptCard, peopleMore, + cptTb, }, watch: { @@ -368,6 +408,11 @@ export default { getApiData() { this.getInfo(); this.getHouseInfo(); + this.getDemandData(); + }, + + toUserInfo(uid) { + this.$router.push({ path: `/main-shuju/visual-basicinfo-people/${uid}` }); }, //加载组织数据 @@ -401,8 +446,48 @@ export default { this.$message.error(msg); } }, + + handlePageNoChange_demand(val) { + this.demand.pageNo = val; + this.getDemandData(); + }, + + //加载组织数据 + async getDemandData() { + const url = + "http://yapi.elinkservice.cn/mock/245/heart/userdemand/mydemand"; + let params = { + userId: this.userId, + pageNo: this.demand.pageNo, + pageSize: this.demand.pageSize, + }; + + this.demand.loading = true; + const { data, code, msg } = await requestPost(url, params); + this.demand.loading = false; + + if (code === 0) { + this.demand.total = data.total; + this.demand.list = data.list.map((item) => { + return [ + { type: "index" }, + item.wantServiceTime, + item.content, + item.categoryName, + item.statusName, + { type: "operate", list: ["查看"] }, + ]; + }); + } else { + this.$message.error(msg); + } + }, }, }; - + diff --git a/src/views/modules/visual/communityGovern/cpts/people-more.vue b/src/views/modules/visual/communityGovern/cpts/people-more.vue index a634aade..6198cc91 100644 --- a/src/views/modules/visual/communityGovern/cpts/people-more.vue +++ b/src/views/modules/visual/communityGovern/cpts/people-more.vue @@ -500,4 +500,4 @@ export default { }; - + diff --git a/src/views/modules/visual/communityGovern/people.vue b/src/views/modules/visual/communityGovern/people.vue index a75bebad..63f5c754 100644 --- a/src/views/modules/visual/communityGovern/people.vue +++ b/src/views/modules/visual/communityGovern/people.vue @@ -405,4 +405,4 @@ export default { }; - + diff --git a/src/views/modules/visual/cpts/loading.vue b/src/views/modules/visual/cpts/loading.vue new file mode 100644 index 00000000..cc8bda6f --- /dev/null +++ b/src/views/modules/visual/cpts/loading.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/views/modules/visual/cpts/tb.vue b/src/views/modules/visual/cpts/tb.vue new file mode 100644 index 00000000..fa1b0730 --- /dev/null +++ b/src/views/modules/visual/cpts/tb.vue @@ -0,0 +1,184 @@ + + + + + From 57d81d56ecf802726255f762cd6c023466a23208 Mon Sep 17 00:00:00 2001 From: dai <851733175@qq.com> Date: Mon, 6 Dec 2021 17:49:52 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=AF=A6=E6=83=85-?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E9=9C=80=E6=B1=82=E6=A8=A1=E5=9D=97=E5=BC=80?= =?UTF-8?q?=E5=8F=912?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/scss/modules/visual/c/common.scss | 19 +++++++ src/assets/scss/modules/visual/people.scss | 39 +++++++++++++++ src/views/modules/visual/basicinfo/people.vue | 50 ++++++++++++++++++- src/views/modules/visual/cpts/tb.vue | 45 ++++++++++++----- 4 files changed, 140 insertions(+), 13 deletions(-) create mode 100644 src/assets/scss/modules/visual/c/common.scss diff --git a/src/assets/scss/modules/visual/c/common.scss b/src/assets/scss/modules/visual/c/common.scss new file mode 100644 index 00000000..0f86e52d --- /dev/null +++ b/src/assets/scss/modules/visual/c/common.scss @@ -0,0 +1,19 @@ +@mixin scrollBar { + &::-webkit-scrollbar { + /*滚动条整体样式*/ + width: 8px; /*高宽分别对应横竖滚动条的尺寸*/ + height: 1px; + } + &::-webkit-scrollbar-thumb { + /*滚动条里面小方块*/ + border-radius: 8px; + box-shadow: inset 0 0 5px rgba(#00023f, 0.2); + background: linear-gradient(270deg, #0063fe, #0095ff); + } + &::-webkit-scrollbar-track { + /*滚动条里面轨道*/ + box-shadow: inset 0 0 5px rgba(#00023f, 0.2); + border-radius: 8px; + background: darken(#0c81fe, 20); + } +} diff --git a/src/assets/scss/modules/visual/people.scss b/src/assets/scss/modules/visual/people.scss index 0f6ca331..dc7217eb 100644 --- a/src/assets/scss/modules/visual/people.scss +++ b/src/assets/scss/modules/visual/people.scss @@ -1,5 +1,6 @@ @import "../../c/config"; @import "../../c/function"; +@import "./c/common"; .g-cpt { display: flex; @@ -452,6 +453,44 @@ display: block; } } + .tb { + height: 300px; + overflow-y: scroll; + @include scrollBar; + } +} + +.m-row { + display: flex; + justify-content: space-between; + margin-top: 20px; + + .m-list { + width: calc(50% - 3px); + + .title { + padding: 10px; + font-size: 22px; + font-family: PingFang SC; + font-weight: 800; + color: #ffffff; + display: flex; + align-items: center; + + img { + display: block; + margin-right: 5px; + } + span { + display: block; + } + } + .list { + height: 480px; + overflow-y: scroll; + @include scrollBar; + } + } } .m-pagination { diff --git a/src/views/modules/visual/basicinfo/people.vue b/src/views/modules/visual/basicinfo/people.vue index 4ecfb1e9..e62bd04b 100644 --- a/src/views/modules/visual/basicinfo/people.vue +++ b/src/views/modules/visual/basicinfo/people.vue @@ -300,6 +300,7 @@
+ +
+
+ +
+ + 上报事件 +
+
+
+
+ +
+ +
+ + 积分记录 +
+
+
+
+
@@ -362,6 +385,32 @@ export default { demand: { loading: true, + colList: [ + { + align: "center", + width: "10%", + }, + { + align: "center", + width: "15%", + }, + { + align: "center", + width: "15%", + }, + { + align: "center", + width: "40%", + }, + { + align: "center", + width: "10%", + }, + { + align: "center", + width: "10%", + }, + ], header: ["序号", "服务时间", "需求类型", "需求内容", "状态", "操作"], list: [], pageSize: 5, @@ -462,7 +511,6 @@ export default { pageSize: this.demand.pageSize, }; - this.demand.loading = true; const { data, code, msg } = await requestPost(url, params); this.demand.loading = false; diff --git a/src/views/modules/visual/cpts/tb.vue b/src/views/modules/visual/cpts/tb.vue index fa1b0730..2222a582 100644 --- a/src/views/modules/visual/cpts/tb.vue +++ b/src/views/modules/visual/cpts/tb.vue @@ -1,11 +1,20 @@