From cc8fa259ce39e3daebb8a5f7a8cddfc52323662c Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Thu, 14 Dec 2023 18:09:00 +0800
Subject: [PATCH] 首页样式调整,综治网格、公安网格数据渲染,楼盘列表演示调整
---
components/noticeList/noticeList.vue | 4
components/noticeList/tagCell.vue | 4
pages/home/index3.vue | 861 ++++++++++++++++++++++++++++++++++
subPackage/grid/publicSecurity.vue | 29 +
components/caption/caption.vue | 14
static/img/center-bg.png | 0
api/grid/grid.js | 34 +
/dev/null | 12
subPackage/grid/comprehensive.vue | 58 +
pages/home/index.vue | 133 +++-
common/setting.js | 4
subPackage/house/family/index.vue | 4
pages/user/center4.vue | 306 ++++++++++++
subPackage/grid/tenement.vue | 13
14 files changed, 1,390 insertions(+), 86 deletions(-)
diff --git a/api/grid/grid.js b/api/grid/grid.js
new file mode 100644
index 0000000..6171903
--- /dev/null
+++ b/api/grid/grid.js
@@ -0,0 +1,34 @@
+import http from '@/http/api.js'
+
+//获取物业详情
+export const getTenementDetail = (params) => {
+ return http.request({
+ url: 'blade-propertyCompany/propertyCompany/getDetail',
+ method: 'GET',
+ params: {
+ ...params
+ }
+ })
+}
+
+//获取网格详情
+export const getGridDetail = (params) => {
+ return http.request({
+ url: 'blade-grid/grid/gridInfoByHouseCode',
+ method: 'GET',
+ params: {
+ ...params
+ }
+ })
+}
+
+//获取公安详情
+export const getPublicSecurityDetail = (params) => {
+ return http.request({
+ url: 'blade-doorplateAddress/doorplateAddress/detail',
+ method: 'GET',
+ params: {
+ ...params
+ }
+ })
+}
diff --git a/api/tenement/tenement.js b/api/tenement/tenement.js
deleted file mode 100644
index 9715f1b..0000000
--- a/api/tenement/tenement.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import http from '@/http/api.js'
-
-//获取物业详情
-export const getDetail = (params) => {
- return http.request({
- url: 'blade-propertyCompany/propertyCompany/getDetail',
- method: 'GET',
- params: {
- ...params
- }
- })
-}
\ No newline at end of file
diff --git a/common/setting.js b/common/setting.js
index cfa849f..4afc933 100644
--- a/common/setting.js
+++ b/common/setting.js
@@ -14,8 +14,8 @@
// devUrl:'http://192.168.1.50:9528',
// devUrl: 'http://192.168.0.102:9528',
// devUrl:'https://srgdjczzxtpt.com:2080/api',
- // devUrl: 'http://192.168.0.102:9528',
- devUrl: 'https://srgdjczzxtpt.com:2080/api',
+ devUrl: 'http://192.168.0.106:9528',
+ // devUrl: 'https://srgdjczzxtpt.com:2080/api',
minioBaseUrl: "https://srgdjczzxtpt.com:2080/gminio/jczz/",
// minioBaseUrl:"http://192.168.0.103:9528/",
// minioBaseUrl: 'https://srgdjczzxtpt.com:2080/',
diff --git a/components/caption/caption.vue b/components/caption/caption.vue
index da5198c..2fec3fd 100644
--- a/components/caption/caption.vue
+++ b/components/caption/caption.vue
@@ -1,10 +1,14 @@
<template>
- <view class="caption flex a-i-c j-c-s-b" @click="navTo()">
+ <view class="caption flex a-i-c j-c-s-b">
<view class="flex a-i-c">
<view class="line"></view>
<text class="f-32 fw">{{title}}</text>
</view>
- <u-icon name="arrow-right" v-if="isLink"></u-icon>
+ <view class="caption-right" v-if="isLink" @click="navTo()">
+ <text class="f-26 c-99">更多</text>
+ <u-icon name="arrow-right" color="#999" size="14" ></u-icon>
+ </view>
+
</view>
</template>
@@ -40,5 +44,11 @@
background-color: #017BFC;
margin-right: 14rpx;
}
+ .caption-right{
+ width:120rpx;
+ display: flex;
+ justify-content: flex-end;
+ align-items: center;
+ }
}
</style>
\ No newline at end of file
diff --git a/components/noticeList/noticeList.vue b/components/noticeList/noticeList.vue
index cf1be03..c61d51b 100644
--- a/components/noticeList/noticeList.vue
+++ b/components/noticeList/noticeList.vue
@@ -3,7 +3,7 @@
<view class="notice-list" @click="navToDetail(item.id,item.eventType,item.pdId)" v-for="(item,index) in data" :key="index">
<view v-if="item.url" class="notice-inner flex j-c-s-b">
<view class="notice-list-left flex f-d-c j-c-s-b">
- <text class="notice-title f-28 fw">{{item.title}}</text>
+ <text class="notice-title f-28">{{item.title}}</text>
<view class="flex j-c-s-b a-i-c">
<view class="flex a-i-c">
<tag-cell :text="item.dictValue" />
@@ -18,7 +18,7 @@
<u-image :src="setUrl(item.url)" width="200rpx" height="140rpx"></u-image>
</view>
<view v-else class="notice-inner flex f-d-c j-c-s-b">
- <text class="notice-title f-28 fw">{{item.title}}</text>
+ <text class="notice-title f-28">{{item.title}}</text>
<view class="flex j-c-s-b a-i-c">
<view class="flex a-i-c">
<tag-cell :text="item.dictValue" />
diff --git a/components/noticeList/tagCell.vue b/components/noticeList/tagCell.vue
index 1dac34f..e7345bb 100644
--- a/components/noticeList/tagCell.vue
+++ b/components/noticeList/tagCell.vue
@@ -1,6 +1,6 @@
<template>
<view class="">
- <view class="tag-cell f-24 c-main">
+ <view class="tag-cell f-20 c-main">
{{text}}
</view>
</view>
@@ -18,7 +18,7 @@
<style scoped>
.tag-cell{
- padding:3rpx 10rpx;
+ padding:2rpx 5rpx;
border-radius:30rpx;
background-color: rgb(236,244,255);
border:1px solid currentColor;
diff --git a/pages/home/index.vue b/pages/home/index.vue
index 5a5dc63..6faa7f0 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -1,20 +1,21 @@
<template>
<view class="layout">
- <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder
- @leftClick="selectBoxShow = !selectBoxShow">
+ <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder @leftClick="selectBoxShow = !selectBoxShow"
+ bgColor="#017BFC">
<view slot="left" class="top flex">
- <view class="top-text f-30 fw">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
+ <view class="top-text f-30 fw c-ff">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
</view>
- <u-icon name="/static/icon/change-icon.png"></u-icon>
+ <u-icon name="arrow-down" color="#fff"></u-icon>
</view>
</u-navbar>
+
+ <view class="swiper">
+ <u-swiper :list="bannerList" height="320rpx" radius="10"></u-swiper>
+ </view>
<view class="content">
- <view class="swiper mb-30">
- <u-swiper :list="bannerList" height="260rpx"></u-swiper>
- </view>
<view class="">
- <view class="section flex j-c-s-a a-i-c mt-40" v-if="isShowContact && curSelectSite.addressType == 1">
- <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name">
+ <view class="section flex j-c-s-a a-i-c mb-20" v-if="isShowContact && curSelectSite.addressType == 1">
+ <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name" @click="navigatorPage(`${i.path}?id=${i.id}`)">
<image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
<view class="item-box">
<view class="f-28">{{i.title}}</view>
@@ -26,7 +27,7 @@
</view>
</view>
- <view class="block flex a-i-c j-c-s-b" v-if="roleType == 1">
+ <view class="block flex a-i-c j-c-s-b mb-20" v-if="roleType == 1">
<view @click="scan" class="block-item">
<image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
<view class="block-item-box flex a-i-c ">
@@ -52,27 +53,37 @@
<view class="block-item-box flex a-i-c">
<u-icon name="/static/icon/nav-12.png" width="65rpx" height="65rpx"></u-icon>
<view class="item-text flex f-d-c j-c-s-b">
- <text class="f-24 fw">数据驾驶舱</text>
+ <text class="f-24 fw">驾驶舱</text>
<text class="f-22 opacity">数据统计</text>
</view>
</view>
</view>
</view>
- <view class="" v-if="liveList.length">
- <caption-row title="生活" />
- <view class="grid">
- <u-grid :border="false" :col="liveList.length">
+ <view class="nav bgc-ff" v-if="liveList.length || roleType == 2">
+ <!-- <caption-row title="生活" /> -->
+ <u-grid :border="false" col="4">
+ <block v-if="liveList.length">
<u-grid-item @click.native="navigatorPage(i.path)" v-for="(i,k) in liveList" :key="k">
- <u-icon :name="i.pictureImg" width="90rpx" height="90rpx"></u-icon>
- <text class="f-26 mt-20">{{i.name}}</text>
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon :name="i.pictureImg" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-20">{{i.name}}</text>
+ </view>
</u-grid-item>
- </u-grid>
- </view>
+ </block>
+ <block v-if="roleType == 2">
+ <u-grid-item @click="navigatorPage(i.path)" v-for="(i,k) in communityList" :key="k">
+ <view class="nav-item flex f-d-c a-i-c">
+ <u-icon :name="i.icon" width="80rpx" height="80rpx"></u-icon>
+ <text class="nav-item-text f-26 mt-10">{{i.title}}</text>
+ </view>
+ </u-grid-item>
+ </block>
+ </u-grid>
</view>
</view>
- <view class="" v-if="isShowHouse">
+ <view class="bgc-ff p-20 mb-20 pb-20" v-if="isShowHouse">
<caption-row title="楼盘表" />
<view class="flex flex-wrap">
<view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"
@@ -83,7 +94,7 @@
</view>
</view>
- <view class="mb-20" v-if="roleType == 2">
+ <!-- <view class="mb-20 p-20" v-if="roleType == 2">
<caption-row title="社区" />
<view class="mt-20">
<u-grid :border="false" col="3">
@@ -101,9 +112,9 @@
</u-grid-item>
</u-grid>
</view>
- </view>
+ </view> -->
- <view class="" v-if="jobList.length && roleType == 1">
+ <view class="bgc-ff mb-20 p-20 pb-20" v-if="jobList.length && roleType == 1">
<caption-row title="工作台" />
<u-grid :border="false" col="4">
<u-grid-item @click="navigatorPage(item.path)" v-for="(item, index) in jobList" :index="index"
@@ -115,7 +126,7 @@
</u-grid-item>
</u-grid>
</view>
- <view class="" v-if="roleType == 2 && curSelectSite.addressType == 2">
+ <view class="bgc-ff mb-20 p-20 pb-20" v-if="roleType == 2 && curSelectSite.addressType == 2">
<caption-row title="工作台" />
<u-grid :border="false" col="4">
<u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"
@@ -135,7 +146,7 @@
</u-grid-item>
</u-grid>
</view>
- <view class="notic" v-if="isShowNotice">
+ <view class="p-20 bgc-ff mb-20" v-if="isShowNotice">
<caption-row title="通知公告" :is-link="true" url="/subPackage/article/list" />
<notice-list :data="notice" />
</view>
@@ -290,6 +301,25 @@
phone: ""
},
],
+ communityList: [{
+ title: "选举调查",
+ icon: "/static/icon/nav-14.png",
+ path: "/subPackage/article/communityList?type=1"
+
+ },
+ {
+ title: "公益报名",
+ icon: "/static/icon/nav-13.png",
+ path: "/subPackage/article/communityList?type=0"
+
+ },
+ {
+ title: "公共收益",
+ icon: "/static/icon/nav-15.png",
+ path: ""
+
+ }
+ ]
}
},
@@ -311,6 +341,10 @@
// url: "/pages/login/login-account"
// })
// }
+ },
+
+ onShareAppMessage() {
+
},
computed: {
@@ -392,7 +426,7 @@
if (data.wg) {
this.contactList[1].name = data.wg.name;
this.contactList[1].phone = data.wg.phone
- this.contactList[1].path = "";
+ this.contactList[1].path = "/subPackage/grid/comprehensive";
this.contactList[1].id = data.wg.code;
}
if (data.wy) {
@@ -404,7 +438,7 @@
if (data.ga) {
this.contactList[2].name = data.ga.name;
this.contactList[2].phone = data.ga.phone;
- this.contactList[2].path = "";
+ this.contactList[2].path = "/subPackage/grid/publicSecurity";
this.contactList[2].id = data.ga.code;
}
})
@@ -732,13 +766,12 @@
color: #333;
width: 100%;
height: 100%;
- background-color: #fff;
+ background-color: #f5f5f5;
}
.layout {
width: 100%;
height: 100%;
- background-color: #fff;
}
.top {
@@ -755,17 +788,35 @@
.swiper {
width: 100%;
- height: 260rpx;
+ height: 340rpx;
+ background: linear-gradient(180deg, #017BFC 0%, rgba(1, 123, 252, 0) 100%);
+ padding: 0 30rpx;
+ box-sizing: border-box;
}
.content {
padding: 0 30rpx;
}
- .grid {
- margin-top: 20rpx;
- margin-bottom: 10rpx;
+ // .grid {
+ // margin-top: 20rpx;
+ // margin-bottom: 10rpx;
+ // }
+ .nav {
+ padding: 10rpx 0;
+ margin-bottom: 20rpx;
+ border-radius: 10rpx;
+
+ .nav-item {
+ padding: 10rpx 0;
+ }
+ .nav-item-text{
+ font-family: PingFang SC;
+ font-weight: 500;
+ color: #585b61;
+ }
}
+
.section {
.section-item {
@@ -790,9 +841,7 @@
}
}
- .notic {
- width: 100%;
- }
+
.block {
.block-item {
@@ -803,9 +852,9 @@
.block-item,
.block-item-bg,
.block-item-box {
- width: 226rpx;
+ width: 220rpx;
height: 150rpx;
- border-radius: 12rpx;
+ border-radius: 10rpx;
}
.block-item-box {
@@ -858,4 +907,12 @@
border-radius: 16rpx 16rpx 16rpx 16rpx;
}
}
+
+ .p-20 {
+ padding: 0 20rpx;
+ border-radius: 10rpx;
+ }
+ .pb-20{
+ padding-bottom:20rpx;
+ }
</style>
\ No newline at end of file
diff --git a/pages/home/index3.vue b/pages/home/index3.vue
new file mode 100644
index 0000000..3dfd908
--- /dev/null
+++ b/pages/home/index3.vue
@@ -0,0 +1,861 @@
+<template>
+ <view class="layout">
+ <u-navbar height="48" :autoBack="false" safeAreaInsetTop placeholder
+ @leftClick="selectBoxShow = !selectBoxShow">
+ <view slot="left" class="top flex">
+ <view class="top-text f-30 fw">{{curSelectSite.name?curSelectSite.name:'暂无绑定' +roleTypeName+'信息'}}
+ </view>
+ <u-icon name="/static/icon/change-icon.png"></u-icon>
+ </view>
+ </u-navbar>
+ <view class="content">
+ <view class="swiper mb-30">
+ <u-swiper :list="bannerList" height="260rpx"></u-swiper>
+ </view>
+ <view class="">
+ <view class="section flex j-c-s-a a-i-c mt-40" v-if="isShowContact && curSelectSite.addressType == 1">
+ <view class="section-item" v-for="(i,k) in contactList" :key="k" v-if="i.name">
+ <image class="section-item-bg" :src="i.bgImg" mode="aspectFill"></image>
+ <view class="item-box">
+ <view class="f-28">{{i.title}}</view>
+ <view class="flex j-c-s-b">
+ <text class="f-22">{{i.name}}</text>
+ <u-icon :name="i.icon" @click.stop="callPhone(i.phone)"></u-icon>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="block flex a-i-c j-c-s-b" v-if="roleType == 1">
+ <view @click="scan" class="block-item">
+ <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
+ <view class="block-item-box flex a-i-c ">
+ <u-icon name="/static/icon/nav-05.png" width="65rpx" height="65rpx"></u-icon>
+ <view class="item-text flex f-d-c j-c-s-b">
+ <text class="f-24 fw">扫一扫</text>
+ <text class="f-22 opacity">场所采集</text>
+ </view>
+ </view>
+ </view>
+ <view class="block-item" @click="navigatorPage('/subPackage/user/clockIn/index')">
+ <image class="block-item-bg" src="/static/icon/nav-bg-05.png" mode="aspectFill" />
+ <view class="block-item-box flex a-i-c">
+ <u-icon name="/static/icon/nav-06.png" width="65rpx" height="65rpx"></u-icon>
+ <view class="item-text flex f-d-c j-c-s-b">
+ <text class="f-24 fw">打卡登记</text>
+ <text class="f-22 opacity">在线打卡</text>
+ </view>
+ </view>
+ </view>
+ <view class="block-item" @click="navigatorPage('/subPackage/statistics/index')">
+ <image class="block-item-bg" src="/static/icon/nav-bg-04.png" mode="aspectFill" />
+ <view class="block-item-box flex a-i-c">
+ <u-icon name="/static/icon/nav-12.png" width="65rpx" height="65rpx"></u-icon>
+ <view class="item-text flex f-d-c j-c-s-b">
+ <text class="f-24 fw">数据驾驶舱</text>
+ <text class="f-22 opacity">数据统计</text>
+ </view>
+ </view>
+ </view>
+ </view>
+
+ <view class="" v-if="liveList.length">
+ <caption-row title="生活" />
+ <view class="grid">
+ <u-grid :border="false" :col="liveList.length">
+ <u-grid-item @click.native="navigatorPage(i.path)" v-for="(i,k) in liveList" :key="k">
+ <u-icon :name="i.pictureImg" width="90rpx" height="90rpx"></u-icon>
+ <text class="f-26 mt-20">{{i.name}}</text>
+ </u-grid-item>
+ </u-grid>
+ </view>
+ </view>
+ </view>
+
+ <view class="" v-if="isShowHouse">
+ <caption-row title="楼盘表" />
+ <view class="flex flex-wrap">
+ <view class="cell bgc-main flex a-i-c" v-for="(item, index) in houseDataList.slice(0, 6)"
+ @click.native="pushPage(item)" :key="index">
+ <u-icon name="/static/icon/floor.png" width="32rpx" height="32rpx"></u-icon>
+ <text class="cell-text f-26 c-ff">{{item.title}}</text>
+ </view>
+ </view>
+ </view>
+
+ <view class="mb-20" v-if="roleType == 2">
+ <caption-row title="社区" />
+ <view class="mt-20">
+ <u-grid :border="false" col="3">
+ <u-grid-item @click="navigatorPage(`/subPackage/article/communityList?type=1`)">
+ <u-icon name="/static/icon/nav-14.png" width="90rpx" height="90rpx"></u-icon>
+ <text class="f-26 mt-10">选举调查</text>
+ </u-grid-item>
+ <u-grid-item @click="navigatorPage(`/subPackage/article/communityList?type=0`)">
+ <u-icon name="/static/icon/nav-13.png" width="90rpx" height="90rpx"></u-icon>
+ <text class="f-26 mt-10">公益报名</text>
+ </u-grid-item>
+ <u-grid-item @click="navigatorPage('')">
+ <u-icon name="/static/icon/nav-15.png" width="90rpx" height="90rpx"></u-icon>
+ <text class="f-26 mt-10">公共收益</text>
+ </u-grid-item>
+ </u-grid>
+ </view>
+ </view>
+
+ <view class="" v-if="jobList.length && roleType == 1">
+ <caption-row title="工作台" />
+ <u-grid :border="false" col="4">
+ <u-grid-item @click="navigatorPage(item.path)" v-for="(item, index) in jobList" :index="index"
+ :key="index" :customStyle="{paddingTop:20+'rpx'}">
+ <view class="grid-item flex f-d-c a-i-c" :style="{background:item.background}">
+ <u-icon :name="item.pictureImg" width="60rpx" height="60rpx"></u-icon>
+ <text class="grid-text f-24 fw mt-10">{{item.name}}</text>
+ </view>
+ </u-grid-item>
+ </u-grid>
+ </view>
+ <view class="" v-if="roleType == 2 && curSelectSite.addressType == 2">
+ <caption-row title="工作台" />
+ <u-grid :border="false" col="4">
+ <u-grid-item @click="navigatorPage('/subPackage/workbench/views/editExamine')"
+ :customStyle="{paddingTop:20+'rpx'}">
+ <view class="grid-item flex f-d-c a-i-c"
+ style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
+ <u-icon name="/static/icon/menu-05.png" width="60rpx" height="60rpx"></u-icon>
+ <text class="grid-text f-24 fw mt-10">场所维护</text>
+ </view>
+ </u-grid-item>
+ <u-grid-item @click="navigatorPage('')" :customStyle="{paddingTop:20+'rpx'}">
+ <view class="grid-item flex f-d-c a-i-c"
+ style="background:linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)">
+ <u-icon name="/static/icon/menu-02.png" width="60rpx" height="60rpx"></u-icon>
+ <text class="grid-text f-24 fw mt-10">场所任务</text>
+ </view>
+ </u-grid-item>
+ </u-grid>
+ </view>
+ <view class="notic" v-if="isShowNotice">
+ <caption-row title="通知公告" :is-link="true" url="/subPackage/article/list" />
+ <notice-list :data="notice" />
+ </view>
+
+ <u-picker :title="roleTypeName" :defaultIndex="selectSiteIndex" :closeOnClickOverlay="true"
+ @close="selectBoxShow = false" :show="selectBoxShow" keyName="name" ref="uPicker" :columns="siteColumns"
+ @confirm="confirmSite" @change="changeSite" @cancel="selectBoxShow = false"></u-picker>
+ </view>
+
+ </view>
+</template>
+
+<script>
+ import {
+ getFuncList,
+ getHouseList
+ } from "@/api/doorplateAddress/doorplateAddress";
+
+ import {
+ getPage
+ } from "@/api/article/article";
+ import {
+ getBannerList,
+ getContact
+ } from "@/api/system/index"
+ import {
+ minioBaseUrl
+ } from "@/common/setting"
+ import noticeList from "@/components/noticeList/noticeList";
+ import captionRow from "@/components/caption/caption.vue"
+ export default {
+ components: {
+ noticeList,
+ captionRow
+ },
+ data() {
+ return {
+ jobList: [{
+ icon: "/static/icon/menu-01.png",
+ text: "场所记录",
+ style: {
+ background: 'linear-gradient(133deg, #FFFCF9 0%, rgba(255,252,249,0) 100%)',
+ },
+ path: "/subPackage/workbench/views/csjl"
+ },
+ {
+ icon: "/static/icon/menu-02.png",
+ text: "场所采集",
+ style: {
+ background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
+ },
+ path: "/subPackage/workbench/views/cscj"
+ },
+ {
+ icon: "/static/icon/menu-03.png",
+ text: "出租房管理",
+ style: {
+ background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)',
+ },
+ path: "/subPackage/workbench/views/rental"
+ },
+ {
+ icon: "/static/icon/menu-04.png",
+ text: "标签事件",
+ style: {
+ background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
+ },
+ path: "/subPackage/workbench/views/audit"
+ },
+ {
+ icon: "/static/icon/menu-05.png",
+ text: "场所维护",
+ style: {
+ background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)',
+ },
+ path: "/subPackage/workbench/views/cshw"
+ },
+ {
+ icon: "/static/icon/menu-06.png",
+ text: "报事审核",
+ style: {
+ background: 'linear-gradient(137deg, #FFF4F3 0%, rgba(255,244,243,0) 100%)',
+ },
+ path: "/subPackage/workbench/views/report"
+ },
+ {
+ icon: "/static/icon/menu-10.png",
+ text: "我的任务",
+ style: {
+ background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)'
+ },
+ path: "/subPackage/task/index"
+ },
+ {
+ icon: "/static/icon/menu-02.png",
+ text: "工作日志",
+ style: {
+ background: 'linear-gradient(131deg, #FCF8FF 0%, rgba(252,248,255,0) 100%)'
+ },
+ path: "/subPackage/workbench/views/workLog"
+ },
+ {
+ icon: "/static/icon/menu-02.png",
+ text: "网格巡查",
+ style: {
+ background: 'linear-gradient(133deg, #F9FAFE 0%, rgba(249,250,254,0) 100%)'
+ },
+ path: "/subPackage/workbench/views/patrol"
+ }
+ ],
+ roleType: 2, // 1网格员/系统管理员 、 2居民
+ roleTypeName: "街道社区网格",
+ selectBoxShow: false,
+ siteColumns: [],
+ curSelectSite: {
+ addressType: 1
+ },
+ columnData: [],
+ houseDataList: [{
+ title: '-',
+ useSlot: true
+ }],
+ menuList: [],
+ curHouseCode: '',
+ notice: [],
+ selectSiteIndex: [0, 0],
+ liveList: [], //生活菜单
+ contactList: [], //便民服务联系方式
+ isShowHouse: false, //显示楼盘表
+ isShowNotice: true, //显示通知公告
+ isShowContact: false,
+ bannerList: [],
+ navList: [{
+ title: "物业",
+ name: "",
+ icon: "/static/icon/tel-green.png",
+ bgImg: "/static/icon/nav-bg-01.png",
+ phone: ""
+ },
+ {
+ title: "综治网格",
+ name: "",
+ icon: "/static/icon/tel-orange.png",
+ bgImg: "/static/icon/nav-bg-02.png",
+ phone: ""
+ },
+ {
+ title: "公安网格",
+ name: "",
+ icon: "/static/icon/tel-blue.png",
+ bgImg: "/static/icon/nav-bg-03.png",
+ phone: ""
+ },
+ ],
+ }
+ },
+
+ onLoad() {
+ this.getBanner();
+ this.init()
+ uni.$on('refresh', () => {
+ this.selectSiteIndex = [0, 0]
+ this.curSelectSite = {
+ addressType: 1
+ }
+ this.init()
+ })
+ },
+
+ onReady() {
+ // if (!uni.getStorageSync("userInfo")) {
+ // uni.redirectTo({
+ // url: "/pages/login/login-account"
+ // })
+ // }
+ },
+
+ computed: {
+ hasMenu() {
+ return (name) => {
+ let resultArr = this.getMenu(name, this.menuList)
+ if (resultArr.length) {
+ return resultArr
+ } else {
+ return []
+ }
+ }
+ }
+ },
+
+ watch: {
+ 'curSelectSite.id': {
+ handler(newVal, oldVal) {
+ if (newVal) {
+ this.$store.commit("setSiteInfo", this.curSelectSite)
+ }
+ },
+ deep: true,
+ immediate: true
+ },
+
+ 'curSelectSite.addressType': {
+ handler(newVal, oldVal) {
+ if (newVal) {
+ this.$store.dispatch("getMenuList").then(res => {
+ this.getMenuList()
+ });
+ }
+ },
+ deep: true,
+ // immediate: true
+ }
+ },
+ onPullDownRefresh() {
+ this.$store.dispatch("getMenuList").then(res => {
+ this.getMenuList()
+ });
+ setTimeout(() => {
+ uni.stopPullDownRefresh();
+ }, 300)
+ },
+
+ methods: {
+
+ //初始化
+ init() {
+ this.selectRole = uni.getStorageSync("activeRole")
+ this.getMenuList()
+ this.getSiteList()
+ this.getNoticeList()
+ },
+
+ getBanner() {
+ getBannerList({
+ current: 1,
+ size: 5
+ }).then(res => {
+ let data = res.data.records;
+ if (data.length) {
+ for (let i of data) {
+ i.url = `${minioBaseUrl}${i.url}`
+ }
+ this.bannerList = data;
+ }
+ })
+ },
+
+ getContactList() {
+ getContact({
+ houseCode: this.curHouseCode
+ }).then(res => {
+ let data = res.data;
+ this.contactList = this.navList;
+ if (data.wg) {
+ this.contactList[1].name = data.wg.name;
+ this.contactList[1].phone = data.wg.phone
+ this.contactList[1].path = "";
+ this.contactList[1].id = data.wg.code;
+ }
+ if (data.wy) {
+ this.contactList[0].name = data.wy.name;
+ this.contactList[0].phone = data.wy.phone;
+ this.contactList[0].path = "/subPackage/grid/tenement";
+ this.contactList[0].id = data.wy.code;
+ }
+ if (data.ga) {
+ this.contactList[2].name = data.ga.name;
+ this.contactList[2].phone = data.ga.phone;
+ this.contactList[2].path = "";
+ this.contactList[2].id = data.ga.code;
+ }
+ })
+ },
+
+ callPhone(phone) {
+ uni.makePhoneCall({
+ phoneNumber: phone
+ })
+ },
+
+
+
+ async getNoticeList() {
+ const param = {
+ size: 10,
+ current: 1,
+ houseCode: uni.getStorageSync("siteInfo").houseCode
+ }
+ const res = await getPage(param)
+ this.notice = res.data.records
+ },
+
+ //获取场所列表
+ async getSiteList() {
+ let type = null
+ let roleName = this.selectRole.roleName
+ if (roleName == '网格员' || roleName == '系统管理员') {
+ type = 1
+ this.roleType = 1;
+ this.roleTypeName = "街道社区网格"
+ } else if (roleName == '居民') {
+ type = 2
+ this.roleType = 2
+ this.roleTypeName = "居民"
+ }
+ const res = await getFuncList(type, roleName)
+ this.columnData = res.data;
+ let data = res.data
+ this.siteColumns = []
+ this.buildSiteColumn(data, 0)
+ },
+
+ buildSiteColumn(dataList, index) {
+ if (dataList.length > 0) {
+ this.siteColumns[index] = dataList
+ if (dataList[0].children && dataList[0].children.length > 0) {
+ this.curSelectSite = dataList[0].children[0];
+ this.getHouseDataList(dataList[0].children[0].id)
+ this.buildSiteColumn(dataList[0].children, index + 1)
+ } else {
+ this.curSelectSite = dataList[0];
+ }
+ this.curHouseCode = this.curSelectSite.id
+ }
+ },
+
+
+ // 获取楼盘
+ async getHouseDataList(code) {
+ const param = {
+ type: 1,
+ code: code,
+ roleName: uni.getStorageSync('activeRole').roleName
+ }
+ const res = await getHouseList(param)
+ res.data.forEach(item => {
+ item.title = item.name
+ item.useSlot = true
+ delete item.name
+ })
+ this.houseDataList = res.data || [{
+ title: '-',
+ useSlot: true
+ }]
+ },
+
+ changeSite(e) {
+ const {
+ columnIndex,
+ value,
+ values, // values为当前变化列的数组内容
+ index,
+ // 微信小程序无法将picker实例传出来,只能通过ref操作
+ picker = this.$refs.uPicker
+ } = e
+ // 当第一列值发生变化时,变化第二列(后一列)对应的选项
+ if (columnIndex === 0 && this.columnData.length > 0) {
+ // picker为选择器this实例,变化第二列对应的选项
+ picker.setColumnValues(1, this.columnData[index])
+ // this.siteColumns[1] = this.columnData[index].children
+ this.$set(this.siteColumns, 1, this.columnData[index].children)
+ };
+ },
+ // 回调参数为包含columnIndex、value、values
+ confirmSite(e) {
+ console.log('confirm', e)
+ this.selectSiteIndex = e.indexs;
+ this.curSelectSite = e.value[e.value.length - 1]
+ this.selectBoxShow = false
+ this.getHouseDataList(e.value[1]?.id)
+ this.curHouseCode = e.value[0].id
+ console.log("curSite=>", this.curSelectSite);
+ },
+ getMenu(menuName) {
+ let list = [];
+ for (let i of this.menuList) {
+ if (i.name == menuName) {
+ if (i.children && i.children.length) {
+ list = i.children;
+ break;
+ }
+ }
+ }
+ return list;
+ },
+
+ //获取首页菜单
+ getMenuList() {
+ this.menuList = uni.getStorageSync("menu")
+ this.liveList = this.setLiveMenu(this.hasMenu('生活'));
+ // this.contactList = this.hasMenu('快捷拨号');
+ this.jobList = this.hasMenu('工作台')
+ if (this.menuList.length) {
+ this.getContactMenu();
+ this.getHouseMenu();
+ this.getNoticeMenu();
+ }
+ setTimeout(() => {
+ if (this.jobList.length) {
+ let taskList = this.jobList.filter(item => item.name == "我的任务")
+ if (taskList.length) {
+ uni.setStorageSync("taskMenu", taskList[0].children);
+ } else {
+ uni.setStorageSync("taskMenu", []);
+ }
+ } else {
+ uni.setStorageSync("taskMenu", []);
+ }
+ }, 200)
+ },
+
+ getContactMenu() {
+ let list = [];
+ list = this.menuList.filter(item => item.name == "快捷拨号")
+ this.isShowContact = list.length ? true : false;
+ if (list.length) {
+ this.getContactList()
+ }
+ },
+
+ getHouseMenu() {
+ let list = [];
+ list = this.menuList.filter(item => item.name == "楼盘表")
+ this.isShowHouse = list.length ? true : false;
+ },
+
+ getNoticeMenu() {
+ let list = [];
+ list = this.menuList.filter(item => item.name == "通知公告")
+ this.isShowNotice = list.length ? true : false;
+ if (list.length) {
+ this.getNoticeList()
+ }
+ },
+
+
+ setLiveMenu(arr) {
+ if (arr.length) {
+ let index = this.getLiveMenuItem(arr, 1)
+ let index2 = this.getLiveMenuItem(arr, 2)
+ if (this.curSelectSite.addressType == 1) {
+ if (index != -1) {
+ arr.splice(index, 1)
+ index = this.getLiveMenuItem(arr, 1)
+ index2 = this.getLiveMenuItem(arr, 2)
+ }
+ if (index2 == -1) {
+ arr.push({
+ name: "租客上报",
+ path: "/subPackage/bs/views/zhsb",
+ pictureImg: "/static/icon/nav-04.png"
+ })
+ index = this.getLiveMenuItem(arr, 1)
+ index2 = this.getLiveMenuItem(arr, 2)
+ }
+
+ } else {
+ if (index == -1) {
+ arr.unshift({
+ name: "标签报事",
+ path: "/subPackage/label/index",
+ pictureImg: "/static/icon/nav-11.png"
+ })
+ index = this.getLiveMenuItem(arr, 1)
+ index2 = this.getLiveMenuItem(arr, 2)
+ }
+ if (index2 != -1) {
+ arr.splice(index2, 1)
+ index = this.getLiveMenuItem(arr, 1)
+ index2 = this.getLiveMenuItem(arr, 2)
+ }
+ }
+ }
+ return arr;
+ },
+
+ getLiveMenuItem(arr, type) {
+ if (type == 1) {
+ let index = arr.findIndex(item => item.name == "标签报事")
+ return index;
+ } else {
+ let index2 = arr.findIndex(item => item.name == "租户上报")
+ return index2
+ }
+ },
+
+ // 页面跳转
+ pushPage(item) {
+ const {
+ id,
+ title,
+ addressType
+ } = item;
+ if (id !== void 0) {
+ let url = `/subPackage/house/list/index?id=${id}&title=${title}&addressType=${addressType}`
+ this.$u.func.globalNavigator(url, "navTo")
+ }
+ },
+
+ navTo() {
+ if (this.curHouseCode === '') {
+ uni.showToast({
+ title: "请选择地址",
+ icon: "error"
+ })
+ return
+ }
+ this.$u.func.globalNavigator(`/subPackage/bs/views/zhsb?houseCode=${this.curHouseCode}`, "navTo")
+ },
+
+ navigatorPage(path) {
+ if (path) {
+ if ((path == '/subPackage/bs/views/zhsb' || path == '/subPackage/bs/views/repair') && this
+ .curHouseCode === '') {
+ uni.showToast({
+ title: "尚无绑定房屋信息",
+ icon: "error"
+ })
+ }
+ // else if (path == "/subPackage/statistics/index") {
+ // uni.showToast({
+ // title: "功能开发中~",
+ // icon: "none"
+ // })
+ // }
+ else {
+ this.$u.func.globalNavigator(`${path}?houseCode=${this.curHouseCode}`, "navTo")
+ }
+
+ } else {
+ uni.showToast({
+ title: "功能开发中~",
+ icon: "none"
+ })
+ }
+ },
+
+ //扫一扫
+ scan() {
+ const that = this
+ uni.scanCode({
+ success: function(res) {
+ console.log(res)
+ console.log('条码类型:' + res.scanType);
+ console.log('条码内容:' + res.result);
+ let eventType = 0;
+ let obj = that.getUrlParams(res.result)
+ console.log(obj)
+ if (obj.stdId == "3C77B40EFC5F4C899AA74BEE747D9DF1") {
+ eventType = 1;
+ }
+ if (obj.stdId == "CDF5528D617342228F3C84EF5C3C8780") {
+ eventType = 2;
+ }
+ if (eventType) {
+ that.$u.func.globalNavigator(
+ `/subPackage/house/houseNumber/index?stdId=${obj.stdId}&eventType=${eventType}`,
+ "navTo")
+ } else {
+ that.$u.func.globalNavigator(
+ `/subPackage/house/houseNumber/index?stdId=${obj.stdId}`, "navTo")
+ }
+
+ //"3C77B40EFC5F4C899AA74BEE747D9DF1"
+ // let url = "/subPackage/workbench/views/cscj?stdId=" + obj.stdId
+ // let url = "/subPackage/workbench/views/cscj?houseCode=" + obj.stdId
+
+ // let url = `/subPackage/house/houseNumber/index?stdId=${obj.stdId}`
+ // that.$u.func.globalNavigator(url, "navTo")
+ }
+ });
+ },
+
+ getUrlParams(url) {
+ // 通过 ? 分割获取后面的参数字符串
+ let urlStr = url.split('?')[1]
+ // 创建空对象存储参数
+ let obj = {};
+ // 再通过 & 将每一个参数单独分割出来
+ let paramsArr = urlStr.split('&')
+ for (let i = 0, len = paramsArr.length; i < len; i++) {
+ // 再通过 = 将每一个参数分割为 key:value 的形式
+ let arr = paramsArr[i].split('=')
+ obj[arr[0]] = arr[1];
+ }
+ return obj
+ },
+ }
+ }
+</script>
+
+<style lang="scss">
+ page {
+ color: #333;
+ width: 100%;
+ height: 100%;
+ background-color: #fff;
+ }
+
+ .layout {
+ width: 100%;
+ height: 100%;
+ background-color: #fff;
+ }
+
+ .top {
+ width: 530rpx;
+
+ .top-text {
+ max-width: 85%;
+ margin-right: 20rpx;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+
+ .swiper {
+ width: 100%;
+ height: 260rpx;
+ }
+
+ .content {
+ padding: 0 30rpx;
+ }
+
+ .grid {
+ margin-top: 20rpx;
+ margin-bottom: 10rpx;
+ }
+
+ .section {
+ .section-item {
+ width: 216rpx;
+ height: 120rpx;
+ position: relative;
+ }
+
+ .section-item-bg {
+ width: 216rpx;
+ height: 120rpx;
+ }
+
+ .item-box {
+ width: 216rpx;
+ height: 120rpx;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 20rpx 20rpx 0;
+ box-sizing: border-box;
+ }
+ }
+
+ .notic {
+ width: 100%;
+ }
+
+ .block {
+ .block-item {
+ position: relative;
+
+ }
+
+ .block-item,
+ .block-item-bg,
+ .block-item-box {
+ width: 226rpx;
+ height: 150rpx;
+ border-radius: 12rpx;
+ }
+
+ .block-item-box {
+ padding: 0 12rpx;
+ box-sizing: border-box;
+ position: absolute;
+ top: 0;
+ left: 0;
+
+ }
+
+ .item-text {
+ height: 65rpx;
+ margin-left: 20rpx;
+ color: #fff;
+ }
+
+ .opacity {
+ opacity: .4;
+ }
+ }
+
+ .cell {
+ padding: 0 16rpx;
+ height: 64rpx;
+ border-radius: 8rpx;
+ margin-right: 20rpx;
+ margin-top: 30rpx;
+
+ .cell-text {
+ margin-left: 16rpx;
+ }
+ }
+
+ .grid-item {
+ width: 153rpx;
+ height: 153rpx;
+ border-radius: 16rpx 16rpx 16rpx 16rpx;
+ justify-content: center;
+ }
+
+ .row {
+ width: 100%;
+ margin: 30rpx 0;
+
+ .row-item {
+ width: 330rpx;
+ height: 134rpx;
+ box-shadow: 0rpx 10rpx 10rpx 0rpx rgba(0, 0, 0, 0.02);
+ border-radius: 16rpx 16rpx 16rpx 16rpx;
+ }
+ }
+</style>
\ No newline at end of file
diff --git a/pages/user/center4.vue b/pages/user/center4.vue
new file mode 100644
index 0000000..5890843
--- /dev/null
+++ b/pages/user/center4.vue
@@ -0,0 +1,306 @@
+<template>
+ <view class="container">
+ <view class="head" :style="{height: `${headHeight}rpx`}">
+ <u-navbar :is-fixed="false" :border-bottom="false" title="个人中心" :background="{ background: 'transprent' }" title-color="#FFFFFF">
+ <view @click="$u.func.route('/pages/system/setting')" slot="right">
+ <image src="/static/images/user/setting.png" class="set-icon" mode="widthFix"></image>
+ </view>
+ </u-navbar>
+ <image src="/static/img/center-bg.png" class="head-bg" :style="{height: `${headHeight}rpx`}" />
+
+ <!-- 用户信息 -->
+ <view class="user-box">
+ <view class="left">
+ <image :src="userInfo.avatar" class="avatar" mode=""></image>
+ <view class="user-name">{{ userInfo.nick_name }}</view>
+ <view class="tag">{{ userInfo.tenant_id }}</view>
+ </view>
+ <view @click="$u.func.route('/pages/user/profile')" class="edit-btn">编辑资料</view>
+ </view>
+ <!-- 操作按钮 -->
+ <view class="nav" v-if="roleType == 1">
+ <navigator url="" hover-class="none" class="nav-item">
+ <image src="/static/images/user/n1.png" class="icon" mode=""></image>
+ <view class="name">我的家人</view>
+ </navigator>
+ <navigator url="" hover-class="none" class="nav-item">
+ <image src="/static/images/user/n2.png" class="icon" mode=""></image>
+ <view class="name">我的房屋</view>
+ </navigator>
+ <navigator url="" hover-class="none" class="nav-item">
+ <image src="/static/images/user/n3.png" class="icon" mode=""></image>
+ <view class="name">我的小区</view>
+ </navigator>
+ <navigator url="" hover-class="none" class="nav-item">
+ <image src="/static/images/user/n4.png" class="icon" mode=""></image>
+ <view class="name">出租信息</view>
+ </navigator>
+ </view>
+ </view>
+ <!-- 功能列表 -->
+ <!-- <view class="cell-box">
+ <u-cell-group :border="false">
+ <u-cell-item title="我的评价">
+ <image slot="icon" src="/static/images/user/c1.png" class="icon" mode=""></image>
+ </u-cell-item>
+ <u-cell-item title="常见问题">
+ <image slot="icon" src="/static/images/user/c2.png" class="icon" mode=""></image>
+ </u-cell-item>
+ <u-cell-item title="客服中心" :border-bottom="false">
+ <image slot="icon" src="/static/images/user/c3.png" class="icon" mode=""></image>
+ </u-cell-item>
+ </u-cell-group>
+ </view> -->
+ <view class="cell-box">
+ <u-cell-group :border="false">
+ <u-cell title="切换角色" isLink url="/subPackage/user/role/index">
+ <image slot="icon" src="/static/images/user/c4.png" class="icon" mode=""></image>
+ </u-cell>
+ <u-cell title="修改密码" :border="false" isLink url="/subPackage/user/password/index">
+ <image slot="icon" src="/static/images/user/c4.png" class="icon" mode=""></image>
+ </u-cell>
+ <!-- <u-cell-item title="评分">
+ <image slot="icon" src="/static/images/user/c5.png" class="icon" mode=""></image>
+ </u-cell-item>
+ <u-cell-item title="反馈">
+ <image slot="icon" src="/static/images/user/c6.png" class="icon" mode=""></image>
+ </u-cell-item>
+ <u-cell-item title="关于" :border-bottom="false">
+ <image slot="icon" src="/static/images/user/c7.png" class="icon" mode=""></image>
+ </u-cell-item> -->
+ </u-cell-group>
+ </view>
+ <view class="cell-box">
+ <u-cell-group :border="false">
+ <u-cell title="退出登录" :border="false" @click="logOut" isLink>
+ <image slot="icon" src="/static/images/user/c8.png" class="icon" mode=""></image>
+ </u-cell>
+ </u-cell-group>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ headHeight: 582,
+ menuList: [{
+ icon: "/static/icon/menu-center-02.png",
+ title: "切换角色",
+ url: "/subPackage/user/role/index"
+ },
+ {
+ icon: "/static/icon/menu-center-03.png",
+ title: "修改密码",
+ url: "/subPackage/user/password/index"
+ }
+ ],
+ roleType: 1
+ };
+ },
+
+ onShow() {
+ let role = uni.getStorageSync('activeRole')
+ if (role.roleAlias == "inhabitant") {
+ this.roleType = 1
+ } else {
+ this.roleType = 2;
+ }
+ },
+
+ mounted() {
+ this.setHeadHeight()
+ },
+ methods: {
+ setHeadHeight() {
+ const that = this
+
+ uni.getSystemInfo({
+ success: function(res) {
+ that.headHeight = Number(res.statusBarHeight) + Number(res.platform == 'ios' ? 44 : 48) + 582
+ }
+ });
+
+ },
+
+ navigator(url) {
+ this.$u.func.globalNavigator(url)
+ },
+
+ navToLogin() {
+ uni.redirectTo({
+ url: "/pages/login/login-account"
+ })
+ },
+
+ logOut() {
+ uni.showModal({
+ title: "提示",
+ content: "是否要退出该账号?",
+ success: (res) => {
+ if (res.confirm) {
+ uni.setStorageSync("responIndex", 0)
+ uni.clearStorageSync()
+ uni.reLaunch({
+ url: "/pages/login/login-account"
+ })
+ }
+ }
+ })
+ },
+
+
+
+ }
+ };
+</script>
+
+<style lang="scss">
+ .container {
+ background-color: #f7f7f7;
+ min-height: 100vh;
+ overflow: hidden;
+ }
+
+ .head {
+ position: relative;
+ top: 0;
+ left: 0;
+ z-index: 1;
+ min-height: 582rpx;
+ overflow: hidden;
+ background: #55A2F9;
+
+ .set-icon {
+ vertical-align: middle;
+ width: 41rpx;
+ height: auto;
+ margin-right: 35rpx;
+ }
+
+ .head-bg {
+ position: absolute;
+ left: 0px;
+ top: 0px;
+ z-index: -1;
+ width: 750rpx;
+ height: 582rpx;
+ background: #55A2F9;
+ }
+ }
+
+ .user-box {
+ display: flex;
+ justify-content: space-between;
+ padding: 0 20rpx 0 64rpx;
+ margin-top: 36rpx;
+
+ .left {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ .avatar {
+ width: 128rpx;
+ height: 128rpx;
+ background: #ffffff;
+ border-radius: 50%;
+ }
+
+ .user-name {
+ margin-top: 20rpx;
+ font-size: 36rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 500;
+ color: #ffffff;
+ }
+
+ .tag {
+ margin-top: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 5rpx 16rpx;
+ border: 1px solid #f5f5f5;
+ border-radius: 7rpx;
+
+ font-size: 19rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 300;
+ color: #ffffff;
+ }
+ }
+
+ .edit-btn {
+ margin-top: 20rpx;
+ flex-shrink: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+
+ width: 165rpx;
+ height: 54rpx;
+ border: 2rpx solid #f5f5f5;
+ border-radius: 11rpx;
+
+ font-size: 27rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 400;
+ color: #ffffff;
+ }
+ }
+
+ .nav {
+ display: flex;
+ //border-top: 2rpx solid #7dcdd6;
+ margin: 36rpx 38rpx 0;
+ padding: 36rpx 0 42rpx;
+
+ .nav-item {
+ width: calc(100% / 4);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: space-between;
+
+ font-size: 25rpx;
+ font-family: Source Han Sans CN;
+ font-weight: 400;
+ color: #ffffff;
+
+ &:not(:last-of-type) {
+ position: relative;
+
+ &::after {
+ position: absolute;
+ right: 0;
+ top: 50%;
+ transform: translateY(-50%);
+ content: '';
+ display: block;
+ width: 2rpx;
+ background-color: #fff;
+ height: 30rpx;
+ }
+ }
+
+ .icon {
+ width: 48rpx;
+ height: 48rpx;
+ margin-bottom: 6rpx;
+ }
+ }
+ }
+
+ .cell-box {
+ background: #ffffff;
+ margin: 18rpx;
+
+ .icon {
+ width: 32rpx;
+ height: 32rpx;
+ margin-right: 22rpx;
+ }
+ }
+</style>
diff --git a/static/img/center-bg.png b/static/img/center-bg.png
new file mode 100644
index 0000000..178ab7d
--- /dev/null
+++ b/static/img/center-bg.png
Binary files differ
diff --git a/subPackage/grid/comprehensive.vue b/subPackage/grid/comprehensive.vue
index 5cc82fa..4a1caa2 100644
--- a/subPackage/grid/comprehensive.vue
+++ b/subPackage/grid/comprehensive.vue
@@ -1,28 +1,29 @@
<template>
<view class="">
- <view class="tab">
+ <!-- <view class="tab">
<u-tabs :list="tabList" :current="tabIndex" @click="changeTab" :inactiveStyle="{color:'#999999'}"
:activeStyle="{color:'#017BFC'}"></u-tabs>
- </view>
+ </view> -->
- <view class="grid flex flex-wrap">
- <view class="grid-item flex f-d-c a-i-c j-c-c">
- <text class="mb-20 f-28"></text>
- <u-image width="150" height="100"></u-image>
- <text class="mt-20"></text>
- <text class="c-99 f-26"></text>
+ <view class="grid flex flex-wrap bgc-ff">
+ <view class="grid-item flex f-d-c a-i-c j-c-c" v-for="i in gridList">
+ <!-- <text class="mb-20 f-28"></text> -->
+ <u-image v-if="i.picUrl" :src="i.picUrl" width="100" height="100"></u-image>
+ <u-image v-else src="/static/icon/user-01.png" width="100" height="100"></u-image>
+ <text class="mt-20">{{i.gridmanName}}</text>
+ <text class="c-99 f-26">{{i.mobile}}</text>
</view>
</view>
<view class="detail bgc-ff">
- <caption-row text="网格基本情况" />
- <view class="detail-content">
-
+ <caption-row title="网格基本情况" />
+ <view class="detail-content f-28">
+ <text v-for="i in houseList">{{i.aoiName}}{{i.buildingName}}</text>
</view>
</view>
- <view class="comment">
- <caption-row text="留言" />
+ <view class="comment" v-if="false">
+ <caption-row title="留言" />
<view class="comment-list ">
<view class="comment-item flex " v-for="(item,index) in commentList" :key="index">
<u-avatar size="45" src="/static/icon/user-01.png"></u-avatar>
@@ -38,25 +39,44 @@
</view>
</view>
</view>
- <view class="footer">
+ <!-- <view class="footer">
<u-search searchIcon='edit-pen' :animation="true" placeholder="写评论" disabled
@click="navToComment"></u-search>
- </view>
+ </view> -->
</view>
</template>
<script>
import captionRow from "@/components/caption/caption.vue"
+ import { getGridDetail } from "@/api/grid/grid.js"
export default {
components:{
captionRow
},
data(){
return {
+ gridList:[],
+ houseList:[],
commentList:[]
}
},
+
+ onLoad(option) {
+ this.getDetailInfo()
+ },
+
methods:{
+
+ getDetailInfo() {
+ getGridDetail({
+ houseCode:uni.getStorageSync("siteInfo").houseCode
+ }).then(res => {
+ console.log(res)
+ this.houseList = res.data.doorplateAddress;
+ this.gridList = res.data.grid;
+ })
+ },
+
navToComment() {
uni.navigateTo({
url: `comment?id=${this.params.id}`
@@ -93,17 +113,21 @@
}
.grid{
width:100%;
+ padding:20rpx;
+ box-sizing: border-box;
.grid-item{
- width:150rpx;
+ width:32.8%;
padding:20rpx 0;
+ // border:1px solid #333;
}
}
.detail{
padding: 0 30rpx;
- margin:20rpx 0;
+ margin:40rpx 0 20rpx;
.detail-content{
padding:20rpx 0;
+ text-indent: 2em;
}
}
.comment {
diff --git a/subPackage/grid/publicSecurity.vue b/subPackage/grid/publicSecurity.vue
index eacbee9..0e9d2d0 100644
--- a/subPackage/grid/publicSecurity.vue
+++ b/subPackage/grid/publicSecurity.vue
@@ -2,24 +2,45 @@
<view class="bgc-ff">
<view class="item-row flex j-c-s-b a-i-c">
<text>公安局</text>
- <text></text>
+ <text>{{detailInfo.branchName}}</text>
</view>
<view class="item-row flex j-c-s-b a-i-c">
<text>派出所</text>
- <text></text>
+ <text>{{detailInfo.localPoliceStationName}}</text>
</view>
<view class="item-row flex j-c-s-b a-i-c">
<text>社区民警</text>
- <text></text>
+ <text>{{detailInfo.policeman}}</text>
</view>
<view class="item-row flex j-c-s-b a-i-c">
<text>联系方式</text>
- <text></text>
+ <text>{{detailInfo.policemanPhone}}</text>
</view>
</view>
</template>
<script>
+ import { getPublicSecurityDetail } from "@/api/grid/grid.js"
+ export default {
+ data(){
+ return {
+ detailInfo:{}
+ }
+ },
+ onLoad() {
+ this.getDetail()
+ },
+ methods:{
+ getDetail(){
+ getPublicSecurityDetail({
+ addressCode:uni.getStorageSync("siteInfo").houseCode
+ }).then(res=>{
+ console.log(res)
+ this.detailInfo = res.data;
+ })
+ }
+ }
+ }
</script>
<style>
diff --git a/subPackage/grid/tenement.vue b/subPackage/grid/tenement.vue
index 7aad32a..de5e20f 100644
--- a/subPackage/grid/tenement.vue
+++ b/subPackage/grid/tenement.vue
@@ -1,7 +1,7 @@
<template>
<view class="container">
<view class="hander flex ">
- <u-avatar size="70"></u-avatar>
+ <u-avatar size="70" src="/static/icon/blue_floor.png"></u-avatar>
<view class="flex f-d-c ml-20">
<text class="f-30 fw mb-30">{{detailInfo.name}}</text>
<view class="flex a-i-c">
@@ -37,7 +37,7 @@
</view>
</view>
</view>
- <view class="">
+ <view class="" v-if="false">
<caption-row title="留言" />
<view class="comment-list bgc-ff mt-20">
<view class="comment-item flex " v-for="(item,index) in commentList" :key="index">
@@ -64,8 +64,8 @@
<script>
import captionRow from "@/components/caption/caption.vue"
import {
- getDetail
- } from "@/api/tenement/tenement.js"
+ getTenementDetail
+ } from "@/api/grid/grid.js"
export default {
components: {
captionRow
@@ -84,11 +84,14 @@
methods: {
getDetailInfo(id) {
- getDetail({
+ getTenementDetail({
id
}).then(res => {
console.log(res)
this.detailInfo = res.data;
+ this.$nextTick(() => {
+ this.$refs.uReadMore.init();
+ })
})
},
diff --git a/subPackage/house/family/index.vue b/subPackage/house/family/index.vue
index 973ef2b..554fd72 100644
--- a/subPackage/house/family/index.vue
+++ b/subPackage/house/family/index.vue
@@ -314,14 +314,14 @@
.room-content {
flex: 1;
- padding: 12rpx;
+ padding: 6rpx;
.room-box {
padding: 10rpx;
justify-content: center;
align-items: center;
// width: calc(100% - 30rpx);
- width: calc(50% - 20rpx);
+ width: calc(50% - 12rpx);
min-height: 110rpx;
box-sizing: border-box;
// background-color: #FAFBFE;
--
Gitblit v1.9.3