提交 6f47c35f authored 作者: 宋雄's avatar 宋雄

一期封版

上级 8e4fc118
...@@ -157,6 +157,17 @@ export const postcommunityOwnerEditApi = (params = {}, config = {})=> { ...@@ -157,6 +157,17 @@ export const postcommunityOwnerEditApi = (params = {}, config = {})=> {
}) })
} }
// 编辑房屋认证
export const editIsAuditApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> {
http.post('/property-community/wechat/communityOwner/editIsAudit',
{ ...params },
{ ...config })
.then(res=> { resolve(res) })
.catch(err=> { reject(err) })
})
}
// 获取用户信息 // 获取用户信息
export const queryCommunityRoomByUnitIdApi = (params = {}, config = {})=> { export const queryCommunityRoomByUnitIdApi = (params = {}, config = {})=> {
return new Promise((resolve, reject)=> { return new Promise((resolve, reject)=> {
...@@ -217,7 +228,8 @@ export const getCommunityInfoApi = (params = {}, config = {})=> { ...@@ -217,7 +228,8 @@ export const getCommunityInfoApi = (params = {}, config = {})=> {
data: { data: {
...params, ...params,
residentPhone: uni.getStorageSync('user_phone'), residentPhone: uni.getStorageSync('user_phone'),
platformCode: uni.getStorageSync('platform_code') platformCode: uni.getStorageSync('platform_code'),
openId: uni.getStorageSync('openid')
}, },
...config ...config
}) })
...@@ -533,7 +545,6 @@ export const queryNoticePageApi = (params = {}, config = {})=> { ...@@ -533,7 +545,6 @@ export const queryNoticePageApi = (params = {}, config = {})=> {
data: { data: {
...params, ...params,
pageSize: 10, pageSize: 10,
openId: uni.getStorageSync('openid'),
communityCode: uni.getStorageSync('platform_code') communityCode: uni.getStorageSync('platform_code')
}, },
...config ...config
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
const serverConfig = { const serverConfig = {
baseURL: "https://life.cloud.hjxbc.cn", baseURL: "https://life.cloud.hjxbc.cn",
imageURL: "https://life.cloud.hjxbc.cn/sys/common/static/", imageURL: "https://life.cloud.hjxbc.cn/sys/common/static/",
// baseURL: "http://192.168.0.100:9999", // baseURL: "http://192.168.0.101:9999",
// baseURL: "http://192.168.0.119:9999", // baseURL: "http://192.168.0.119:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */ // baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */ // baseURL: "http://114.67.111.37:8001" /* 根域名 */
......
...@@ -30,6 +30,12 @@ ...@@ -30,6 +30,12 @@
}, },
{ {
"path": "pages/announcement/index", "path": "pages/announcement/index",
"style": {
"navigationBarTitleText": "通知公告"
}
},
{
"path": "pages/announcement/community",
"style": { "style": {
"navigationBarTitleText": "社区公告" "navigationBarTitleText": "社区公告"
} }
......
<template>
<view class="container">
<view class="news">
<view class="list" v-if="communityList.length">
<view class="item" v-for="item in communityList" :key="item.id" @click="toDetails(item.id)">
<image mode="aspectFill" :src="item.noticeImage" class="icon"></image>
<view class="con">
<view class="name">{{item.noticeTitle}}<view class="tag" v-if="item.urgentDegree === 'urgent'">非常紧急</view>
</view>
<view class="time">社区服务中心 {{item.releaseTime || ''}}</view>
</view>
</view>
</view>
<no-data :show="communityList.length === 0" text="暂无数据"></no-data>
</view>
</view>
</template>
<script>
import {queryNoticePageApi} from '@/config/api.js'
import serverConfig from '@/config/server_config.js';
import noData from '@/components/no-data/no-data'
export default {
components: {noData},
data() {
return {
pageNo: 1,
communityList: []
}
},
methods: {
async getList() {
let {result} = await queryNoticePageApi({
pageNo: this.pageNo,
source: 'councils'
})
let data = result.content.map(item=> {
return {
...item,
noticeImage: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg
}
})
if(this.pageNo === 1) {
this.communityList = data
} else {
this.communityList = this.communityList.concat(data)
}
},
toDetails(id) {
uni.navigateTo({
url: `/pages/announcementDetails/index?id=${id}`
});
}
},
onShow() {
this.getList()
}
}
</script>
<style>
page {
background-color: #F8F6F9;
}
</style>
<style lang="scss" scoped>
.page {
padding: 30rpx 0 0;
}
.news {
background-color: #ffffff;
border-radius: 16rpx;
.list {
background-color: #F8F6F9;
padding: 30rpx;
.item {
background-color: #ffffff;
border-radius: 16rpx;
display: flex;
padding: 30rpx;
margin-bottom: 30rpx;
box-shadow: 0 0 25rpx 0 rgba(81,89,234,0.06);
position: relative;
&::after {
content: " ";
position: absolute;
top: 30rpx;
right: 30rpx;
width: 14rpx;
height: 14rpx;
border-radius: 50%;
z-index: 11;
}
&.noRead::after {
background-color: #F6C864;;
}
.icon {
flex: none;
width: 186rpx;
height: 140rpx;
border-radius: 6rpx;
}
.con {
margin-left: 30rpx;
padding-right: 10rpx;
.name {
font-size: 30rpx;
color: #373737;
overflow : hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
word-break: break-all; /* 追加这一行代码 */
.tag {
font-size: 22rpx;
color: #F42E2E;
border: 1px solid #F42E2E;
padding: 4rpx 10rpx;
border-radius: 30rpx;
display: inline-block;
margin-left: 20rpx;
}
}
.time {
font-size: 24rpx;
color: #B6B6BA;
height: 30rpx;
line-height: 30rpx;
margin-top: 30rpx;
}
}
}
}
}
</style>
\ No newline at end of file
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
<view class="container"> <view class="container">
<view class="news"> <view class="news">
<view class="tab"> <view class="tab">
<view class="item" :class="{'active': activeStatus === ''}" @click="onLoadMessage('')">全部<image src="../../static/images/icon_press02.png" class="icon"></image></view> <view class="item" :class="{'active': activeStatus === 'all'}" @click="onLoadMessage('all')">全部<image src="../../static/images/icon_press02.png" class="icon"></image></view>
<view class="item" :class="{'active': activeStatus === 'not'}" @click="onLoadMessage('not')">未读<image src="../../static/images/icon_press02.png" class="icon"></image></view> <view class="item" :class="{'active': activeStatus === 'community'}" @click="onLoadMessage('community')">小区<image src="../../static/images/icon_press02.png" class="icon"></image></view>
<view class="item" :class="{'active': activeStatus === 'yes'}" @click="onLoadMessage('yes')">已读<image src="../../static/images/icon_press02.png" class="icon"></image></view> <view class="item" :class="{'active': activeStatus === 'committee'}" @click="onLoadMessage('committee')">业委会<image src="../../static/images/icon_press02.png" class="icon"></image></view>
</view> </view>
<view class="list" v-if="activeList.length"> <view class="list" v-if="activeList.length">
<view class="item" :class="{'noRead' : item.readStatus === '2'}" v-for="item in activeList" :key="item.id" @click="toDetails(item.id)"> <view class="item" v-for="item in activeList" :key="item.id" @click="toDetails(item.id)">
<image mode="aspectFill" :src="item.noticeImage" class="icon"></image> <image mode="aspectFill" :src="item.noticeImage" class="icon"></image>
<view class="con"> <view class="con">
<view class="name">{{item.noticeTitle}}<view class="tag" v-if="item.urgentDegree === 'urgent'">非常紧急</view> <view class="name">{{item.noticeTitle}}<view class="tag" v-if="item.urgentDegree === 'urgent'">非常紧急</view>
</view> </view>
<view class="time">{{item.source === 'community' ? '社区' : '物业服务中心'}} {{item.releaseTime || ''}}</view> <view class="time">{{item.source | sourceFilter}} {{item.releaseTime || ''}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -29,34 +29,49 @@ ...@@ -29,34 +29,49 @@
components: {noData}, components: {noData},
data() { data() {
return { return {
activeStatus: '', activeStatus: 'all',
allPageNo: 1, allPageNo: 1,
yesPageNo: 1, committeePageNo: 1,
notPageNo: 1, communityPageNo: 1,
allList: [], allList: [],
yseList: [], committeeList: [],
notList: [] communityList: []
}
},
filters: {
sourceFilter(value) {
switch(value) {
case 'community':
return '小区'
break
case 'committee':
return '业委会'
break
case 'councils':
return '社区服务中心'
break
}
} }
}, },
computed: { computed: {
activeList() { activeList() {
if(this.activeStatus === '') { if(this.activeStatus === 'all') {
return [...this.allList] return [...this.allList]
} }
if(this.activeStatus === 'not') { if(this.activeStatus === 'community') {
return [...this.notList] return [...this.communityList]
} }
if(this.activeStatus === 'yes') { if(this.activeStatus === 'committee') {
return [...this.yseList] return [...this.committeeList]
} }
} }
}, },
methods: { methods: {
async getList() { async getList() {
let obj = {readStatus: this.activeStatus} let obj = {source: this.activeStatus}
if(this.activeStatus === '') obj['pageNo'] = this.allPageNo if(this.activeStatus === 'all') obj['pageNo'] = this.allPageNo
if(this.activeStatus === 'not') obj['pageNo'] = this.notPageNo if(this.activeStatus === 'community') obj['pageNo'] = this.communityPageNo
if(this.activeStatus === 'yes') obj['pageNo'] = this.yesPageNo if(this.activeStatus === 'committee') obj['pageNo'] = this.committeePageNo
let {result} = await queryNoticePageApi({...obj}) let {result} = await queryNoticePageApi({...obj})
let data = result.content.map(item=> { let data = result.content.map(item=> {
return { return {
...@@ -64,25 +79,25 @@ ...@@ -64,25 +79,25 @@
noticeImage: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg noticeImage: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg
} }
}) })
if(this.activeStatus === '') { if(this.activeStatus === 'all') {
if(this.allPageNo === 1) { if(this.allPageNo === 1) {
this.allList = data this.allList = data
} else { } else {
this.allList = this.allList.concat(data) this.allList = this.allList.concat(data)
} }
} }
if(this.activeStatus === 'not') { if(this.activeStatus === 'community') {
if(this.notPageNo === 1) { if(this.communityPageNo === 1) {
this.notList = data this.communityList = data
} else { } else {
this.notList = this.notList.concat(data) this.communityList = this.communityList.concat(data)
} }
} }
if(this.activeStatus === 'yes') { if(this.activeStatus === 'committee') {
if(this.yesPageNo === 1) { if(this.committeePageNo === 1) {
this.yseList = data this.committeeList = data
} else { } else {
this.yseList = this.yseList.concat(data) this.committeeList = this.committeeList.concat(data)
} }
} }
}, },
...@@ -93,15 +108,15 @@ ...@@ -93,15 +108,15 @@
}, },
onLoadMessage(status) { onLoadMessage(status) {
this.activeStatus = status this.activeStatus = status
if(this.activeStatus === '' && this.allList.length === 0) this.getList() if(this.activeStatus === 'all' && this.allList.length === 0) this.getList()
if(this.activeStatus === 'not' && this.notList.length === 0) this.getList() if(this.activeStatus === 'community' && this.communityList.length === 0) this.getList()
if(this.activeStatus === 'yes' && this.yseList.length === 0) this.getList() if(this.activeStatus === 'committee' && this.committeeList.length === 0) this.getList()
} }
}, },
onShow() { onShow() {
this.allList = [] this.allList = []
this.yseList = [] this.committeeList = []
this.notList = [] this.communityList = []
this.getList() this.getList()
} }
} }
......
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
<view class="news-details"> <view class="news-details">
<view class="title">{{info.noticeTitle}}<view class="tag" v-if="info.urgentDegree === 'urgent'">非常紧急</view> <view class="title">{{info.noticeTitle}}<view class="tag" v-if="info.urgentDegree === 'urgent'">非常紧急</view>
</view> </view>
<view class="time">来源:{{info.source === 'community' ? '社区' : '物业服务中心'}} {{info.releaseTime || ''}}</view> <!-- <view class="time">来源:{{info.source === 'community' ? '社区' : '物业服务中心'}} {{info.releaseTime || ''}}</view> -->
<view class="time">来源:{{info.source | sourceFilter}} {{info.releaseTime || ''}}</view>
<view class="content"> <view class="content">
<rich-text :nodes="content"></rich-text> <rich-text :nodes="content"></rich-text>
</view> </view>
...@@ -24,6 +25,23 @@ ...@@ -24,6 +25,23 @@
content: '' content: ''
} }
}, },
filters: {
sourceFilter(value) {
switch(value) {
case 'community':
return '小区'
break
case 'committee':
return '业委会'
break
case 'councils':
return '社区服务中心'
break
default:
return '物业管理中心'
}
}
},
methods: { methods: {
async getDetail(id) { async getDetail(id) {
let {result} = await getNoticeDetailApi({id}) let {result} = await getNoticeDetailApi({id})
......
...@@ -27,13 +27,15 @@ ...@@ -27,13 +27,15 @@
</swiper> </swiper>
</view> </view>
<view class="quick-entry" v-if="userType !== '2'"> <view class="quick-entry" v-if="userType !== '2'">
<!-- <view class="item" @click="quickEntry(8)"> --> <view class="item" @click="quickEntry(8)">
<view class="item">
<image src="../../static/images/quick08.png" class="icon"></image> <image src="../../static/images/quick08.png" class="icon"></image>
<text>社区服务</text> <text>社区服务</text>
</view> </view>
<view class="item" @click="quickEntry(6)"> <view class="item" @click="quickEntry(6)">
<image src="../../static/images/quick06.png" class="icon"></image> <view class="item-img">
<image src="../../static/images/quick06.png" class="icon"></image>
<view v-if="communityInfo.notReadCount" class="num">{{communityInfo.notReadCount}}</view>
</view>
<text>公告公示</text> <text>公告公示</text>
</view> </view>
<view class="item" @click="quickEntry(2)"> <view class="item" @click="quickEntry(2)">
...@@ -121,21 +123,53 @@ ...@@ -121,21 +123,53 @@
<no-data :show="maintenanceList.length === 0" :isFull="false" text="暂无维修信息"></no-data> <no-data :show="maintenanceList.length === 0" :isFull="false" text="暂无维修信息"></no-data>
</view> </view>
<view class="news"> <view class="news" v-if="councilsList.length">
<view class="title"> <view class="title">
<text>社区活动公告</text> <text>社区活动公告</text>
<image src="../../static/images/icon_more.png" class="icon"></image> <image src="../../static/images/icon_more.png" class="icon"></image>
</view> </view>
<view class="list" v-if="noticeList.length"> <view class="list">
<view class="item" v-for="item in noticeList" :key="item.id" @click="onJump(`/pages/announcementDetails/index?id=${item.id}`)"> <view class="item" v-for="item in councilsList" :key="item.id" @click="onJump(`/pages/announcementDetails/index?id=${item.id}`)">
<image :src="item.coverImg" class="icon"></image> <image :src="item.coverImg" class="icon"></image>
<view class="con"> <view class="con">
<view class="name">{{item.noticeTitle}}</view> <view class="name">{{item.noticeTitle}}</view>
<view class="time">{{item.source === 'community' ? '社区' : '物业服务中心'}} {{item.releaseDate}}</view> <view class="time">社区服务中心 {{item.releaseDate}}</view>
</view>
</view>
</view>
</view>
<view class="news">
<view class="title">
<text>小区活动公告</text>
<image src="../../static/images/icon_more.png" class="icon"></image>
</view>
<view class="list" v-if="communityList.length">
<view class="item" v-for="item in communityList" :key="item.id" @click="onJump(`/pages/announcementDetails/index?id=${item.id}`)">
<image :src="item.coverImg" class="icon"></image>
<view class="con">
<view class="name">{{item.noticeTitle}}</view>
<view class="time">小区 {{item.releaseDate}}</view>
</view>
</view>
</view>
<no-data :show="communityList.length === 0" :isFull="false" text="暂无活动公告"></no-data>
</view>
<view class="news" v-if="committeeList.length">
<view class="title">
<text>业委会公告</text>
<image src="../../static/images/icon_more.png" class="icon"></image>
</view>
<view class="list">
<view class="item" v-for="item in committeeList" :key="item.id" @click="onJump(`/pages/announcementDetails/index?id=${item.id}`)">
<image :src="item.coverImg" class="icon"></image>
<view class="con">
<view class="name">{{item.noticeTitle}}</view>
<view class="time">业委会 {{item.releaseDate}}</view>
</view> </view>
</view> </view>
</view> </view>
<no-data :show="noticeList.length === 0" :isFull="false" text="暂无活动公告"></no-data>
</view> </view>
<authorization-modal ref="authorization" @loginEnd="onLoginEnd" @refuse="onRefuse" /> <authorization-modal ref="authorization" @loginEnd="onLoginEnd" @refuse="onRefuse" />
...@@ -157,7 +191,7 @@ ...@@ -157,7 +191,7 @@
} from '@/config/api.js' } from '@/config/api.js'
import {Moment} from '@/utils/moment.js' import {Moment} from '@/utils/moment.js'
import { authorizationModal } from '@/components/authorization.vue' import { authorizationModal } from '@/components/authorization.vue'
let timer = null; let timer = null, hasHouseFlag = false;
export default { export default {
name: 'home', name: 'home',
components: { components: {
...@@ -176,7 +210,9 @@ ...@@ -176,7 +210,9 @@
communityInfo: {}, communityInfo: {},
messageList: [], messageList: [],
noticeList: [], councilsList: [],
communityList: [],
committeeList: [],
activeStatus: 'waitReceive', activeStatus: 'waitReceive',
maintenanceTabs: [ maintenanceTabs: [
...@@ -232,9 +268,18 @@ ...@@ -232,9 +268,18 @@
url: '/pages/message/index' url: '/pages/message/index'
}); });
} else if (type == 2) { } else if (type == 2) {
if(this.waitList.length) { // if(this.waitList.length) {
// uni.navigateTo({
// url: `/pages/housingAudit/index?id=${this.waitList[0].id}`
// });
// } else {
// uni.navigateTo({
// url: '/pages/housing/index'
// });
// }
if(hasHouseFlag) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/housingAudit/index?id=${this.waitList[0].id}` url: '/pages/myHouse/index'
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
...@@ -263,7 +308,7 @@ ...@@ -263,7 +308,7 @@
}); });
} else if (type == 8) { } else if (type == 8) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/myReceipt/index' url: '/pages/announcement/community'
}); });
} }
} else { } else {
...@@ -348,6 +393,7 @@ ...@@ -348,6 +393,7 @@
if(platformCode) { if(platformCode) {
if(type === '1') { // 进入小区 if(type === '1') { // 进入小区
let houseData = result.communityOwners.filter(item=>item.platformCode === platformCode) let houseData = result.communityOwners.filter(item=>item.platformCode === platformCode)
hasHouseFlag = houseData.length > 0
this.waitList = houseData.filter(item=>item.auditStatus !== 'auditPass') this.waitList = houseData.filter(item=>item.auditStatus !== 'auditPass')
if(houseData.length) { // 用户当前小区有房屋认证 if(houseData.length) { // 用户当前小区有房屋认证
let passHouse = houseData.filter(item=> item.auditStatus === 'auditPass') let passHouse = houseData.filter(item=> item.auditStatus === 'auditPass')
...@@ -532,6 +578,7 @@ ...@@ -532,6 +578,7 @@
let communityInfo = { let communityInfo = {
waitWyPay: result.waitWyPay, waitWyPay: result.waitWyPay,
waitShPay: result.waitShPay, waitShPay: result.waitShPay,
notReadCount: result.notReadCount,
noticeNotRead: result.noticeNotRead, noticeNotRead: result.noticeNotRead,
adminAvatar: serverConfig.baseURL + '/sys/common/static/' + result.communityBuilding.adminAvatar, adminAvatar: serverConfig.baseURL + '/sys/common/static/' + result.communityBuilding.adminAvatar,
adminName: result.communityBuilding.buildingAdmin, adminName: result.communityBuilding.buildingAdmin,
...@@ -542,7 +589,21 @@ ...@@ -542,7 +589,21 @@
async getAdvertisement() { async getAdvertisement() {
let {result} = await getAdvertisementApi({communityCode: this.houseInfo.platformCode}) let {result} = await getAdvertisementApi({communityCode: this.houseInfo.platformCode})
this.messageList = result.degreeNotice this.messageList = result.degreeNotice
this.noticeList = result.companyNotice.map(item=> { this.councilsList = result.councils.map(item=> {
return {
...item,
releaseDate: new Moment(item.releaseTime).format('YYYY/MM/DD'),
coverImg: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg
}
})
this.communityList = result.community.map(item=> {
return {
...item,
releaseDate: new Moment(item.releaseTime).format('YYYY/MM/DD'),
coverImg: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg
}
})
this.committeeList = result.committee.map(item=> {
return { return {
...item, ...item,
releaseDate: new Moment(item.releaseTime).format('YYYY/MM/DD'), releaseDate: new Moment(item.releaseTime).format('YYYY/MM/DD'),
...@@ -742,17 +803,19 @@ ...@@ -742,17 +803,19 @@
.item-img { .item-img {
position: relative; position: relative;
font-size: 0;
.num { .num {
position: absolute; position: absolute;
top: -5px; top: -5px;
right: -5px; left: 75%;
font-size: 20rpx; font-size: 20rpx;
color: #FFFFFF; color: #FFFFFF;
padding: 4rpx 8rpx; padding: 2px 4px;
background-color: #F6C864; background-color: #F6C864;
border-radius: 20rpx; border-radius: 20rpx;
min-width: 20rpx;
text-align: center;
} }
} }
......
...@@ -153,6 +153,13 @@ export default { ...@@ -153,6 +153,13 @@ export default {
house.roomName = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].name : '' house.roomName = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].name : ''
house.floorSpace = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].floorSpace : '' house.floorSpace = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].floorSpace : ''
this.houseRoomName = `${this.houseList[0][newV[0]].name} ${this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].name : ''} ${this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].name : ''}` this.houseRoomName = `${this.houseList[0][newV[0]].name} ${this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].name : ''} ${this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].name : ''}`
let statusValue = this.houseList[2][newV[2]].roomStatus
let statusKey = this.statusList.findIndex(item=>item.value == statusValue)
this.statusKey = statusKey || 0
let typeValue = this.houseList[2][newV[2]].useTo
let typeKey = this.typeList.findIndex(item=>item.value == typeValue)
this.typeKey = typeKey || 0
}, },
deep: true deep: true
} }
......
...@@ -42,13 +42,29 @@ ...@@ -42,13 +42,29 @@
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk">*</view>业主名称 <view class="asterisk">*</view>住户名称
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" readonly v-model="formData.ownerName" focus placeholder="请输入名称" /> <input class="form-item-tit" v-model="formData.residentName" focus placeholder="请输入名称" />
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-fl">
<view class="asterisk">*</view>住户电话
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.residentPhone" focus placeholder="请输入电话" />
</view>
</view>
<!-- <view class="form-item">
<view class="form-item-fl">
<view class="asterisk">*</view>业主名称
</view>
<view class="form-item-fr">
<input class="form-item-tit" readonly v-model="formData.ownerName" focus placeholder="请输入名称" />
</view>
</view> -->
<!-- <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk">*</view>业主电话 <view class="asterisk">*</view>业主电话
</view> </view>
...@@ -56,7 +72,7 @@ ...@@ -56,7 +72,7 @@
<view class="form-item-tit" v-if="relationShipIndex === 0">{{formData.ownerPhone}}</view> <view class="form-item-tit" v-if="relationShipIndex === 0">{{formData.ownerPhone}}</view>
<input class="form-item-tit" v-else v-model="formData.ownerPhone" focus placeholder="请输入名称" /> <input class="form-item-tit" v-else v-model="formData.ownerPhone" focus placeholder="请输入名称" />
</view> </view>
</view> </view> -->
<view class="form-item"> <view class="form-item">
<view class="form-item-fl"> <view class="form-item-fl">
<view class="asterisk"></view>证件类型 <view class="asterisk"></view>证件类型
...@@ -73,7 +89,7 @@ ...@@ -73,7 +89,7 @@
<view class="asterisk"></view>证件号码 <view class="asterisk"></view>证件号码
</view> </view>
<view class="form-item-fr"> <view class="form-item-fr">
<input class="form-item-tit" v-model="formData.certificateNo" focus placeholder="请输入证件号码" /> <input class="form-item-tit" v-model="formData.certificateNo" placeholder="请输入证件号码" />
</view> </view>
</view> </view>
<view class="form-item"> <view class="form-item">
...@@ -84,24 +100,14 @@ ...@@ -84,24 +100,14 @@
<uni-data-checkbox v-model="formData.sex" :localdata="sexs" class="form-item-tit" /> <uni-data-checkbox v-model="formData.sex" :localdata="sexs" class="form-item-tit" />
</view> </view>
</view> </view>
<template v-if="relationShipIndex !== 0"> <view class="form-item">
<view class="form-item"> <view class="form-item-fl">
<view class="form-item-fl"> <view class="asterisk"></view>年龄
<view class="asterisk">*</view>住户名称
</view>
<view class="form-item-fr">
<input class="form-item-tit" readonly v-model="formData.residentName" focus placeholder="请输入名称" />
</view>
</view> </view>
<view class="form-item"> <view class="form-item-fr">
<view class="form-item-fl"> <input class="form-item-tit" v-model.number="formData.age" placeholder="请输入年龄" />
<view class="asterisk">*</view>住户电话
</view>
<view class="form-item-fr">
<view class="form-item-tit">{{formData.residentPhone}}</view>
</view>
</view> </view>
</template> </view>
</uni-forms> </uni-forms>
</view> </view>
...@@ -117,30 +123,26 @@ import { ...@@ -117,30 +123,26 @@ import {
postcommunityOwnerEditApi postcommunityOwnerEditApi
} from '@/config/api.js' } from '@/config/api.js'
import {isMoble, isValidIDCard, isValidPassport, isValidPermit} from '@/utils/util' import {isMoble, isValidIDCard, isValidPassport, isValidPermit} from '@/utils/util'
import {relationShipList} from '@/utils/dictionary'
export default { export default {
data() { data() {
return { return {
formData: { formData: {
ownerName: '', // ownerName: '',
ownerPhone: '', // ownerPhone: '',
relationShip: '', relationShip: '',
residentName: '', residentName: '',
residentPhone: '', residentPhone: '',
sex: 1, sex: 1,
certificateType: '', certificateType: '',
certificateNo: '' certificateNo: '',
age: ''
}, },
sexs: [ sexs: [
{ text: '男', value: 1 }, { text: '男', value: 1 },
{ text: '女', value: 2 } { text: '女', value: 2 }
], ],
relationShipList: [ relationShipList: relationShipList,
{label: '本人', value: 'self'},
{label: '租户', value: 'tenant'},
{label: '亲人', value: 'relative'},
{label: '朋友', value: 'friend'},
{label: '其他', value: 'other'}
],
relationShipIndex: 0, relationShipIndex: 0,
certificateList: [ certificateList: [
{label: '身份证', value: '1'}, {label: '身份证', value: '1'},
...@@ -157,32 +159,32 @@ export default { ...@@ -157,32 +159,32 @@ export default {
this.certificateIndex = Number(e.detail.value) this.certificateIndex = Number(e.detail.value)
} else { } else {
this.relationShipIndex = Number(e.detail.value) this.relationShipIndex = Number(e.detail.value)
if(this.relationShipIndex === 0) { // if(this.relationShipIndex === 0) {
this.formData.ownerPhone = uni.getStorageSync('user_phone') // this.formData.ownerPhone = uni.getStorageSync('user_phone')
} else { // } else {
this.formData.ownerPhone = '' // this.formData.ownerPhone = ''
this.formData.residentName = '' // this.formData.residentName = ''
} // }
} }
}, },
toAudit() { toAudit() {
if(!this.formData.ownerName) { if(!this.formData.residentName) {
uni.showToast({ uni.showToast({
title: '请输入业主名称', title: '请输入住户名称',
icon: 'none' icon: 'none'
}) })
return return
} }
if(!this.formData.ownerPhone) { if(!this.formData.residentPhone) {
uni.showToast({ uni.showToast({
title: '请输入业主电话', title: '请输入住户电话',
icon: 'none' icon: 'none'
}) })
return return
} }
if(!isMoble(this.formData.ownerPhone)) { if(!isMoble(this.formData.residentPhone)) {
uni.showToast({ uni.showToast({
title: '请输入正确的业主电话', title: '请输入正确的住户电话',
icon: 'none' icon: 'none'
}) })
return return
...@@ -210,18 +212,6 @@ export default { ...@@ -210,18 +212,6 @@ export default {
return return
} }
} }
if(this.relationShipIndex === 0) {
this.formData.residentName = this.formData.ownerName
this.formData.residentPhone = this.formData.ownerPhone
} else {
if(!this.formData.residentName) {
uni.showToast({
title: '请输入住户名称',
icon: 'none'
})
return
}
}
this.isSubmit = true this.isSubmit = true
this.formData.relationShip = this.relationShipList[this.relationShipIndex].value this.formData.relationShip = this.relationShipList[this.relationShipIndex].value
this.formData.certificateType = this.certificateList[this.certificateIndex].value this.formData.certificateType = this.certificateList[this.certificateIndex].value
...@@ -274,16 +264,15 @@ export default { ...@@ -274,16 +264,15 @@ export default {
onLoad() { onLoad() {
let registerInfo = getApp().globalData.registerInfo let registerInfo = getApp().globalData.registerInfo
if(registerInfo.id) { if(registerInfo.id) {
this.formData.ownerName = registerInfo.ownerName
this.formData.ownerPhone = registerInfo.ownerPhone
this.formData.residentName = registerInfo.residentName this.formData.residentName = registerInfo.residentName
this.formData.residentPhone = registerInfo.residentPhone this.formData.residentPhone = registerInfo.residentPhone
this.formData.sex = registerInfo.sex this.formData.sex = registerInfo.sex
this.formData.age = registerInfo.age
this.relationShipIndex = this.relationShipList.findIndex(item=>item.value === registerInfo.relationShip) this.relationShipIndex = this.relationShipList.findIndex(item=>item.value === registerInfo.relationShip)
this.certificateIndex = this.certificateList.findIndex(item=>item.value === registerInfo.certificateType) this.certificateIndex = this.certificateList.findIndex(item=>item.value === registerInfo.certificateType)
} else { } else {
this.formData.ownerPhone = this.formData.residentPhone = uni.getStorageSync('user_phone') // this.formData.ownerPhone = this.formData.residentPhone = uni.getStorageSync('user_phone')
} }
} }
} }
......
...@@ -34,7 +34,7 @@ import { getCommunityRepairListApi } from '@/config/api.js' ...@@ -34,7 +34,7 @@ import { getCommunityRepairListApi } from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
let statusList = { let statusList = {
initiateWaitAudit: { name: '待维修', color: 'green' }, // 待审核 initiateWaitAudit: { name: '待维修', color: 'green' }, // 待审核
waitDispatch: { name: '待维修', color: 'green' }, // 派单 waitDispatch: { name: '待维修', color: 'green' }, // 派单
waitReceive: { name: '待维修', color: 'green' }, // 待接单 waitReceive: { name: '待维修', color: 'green' }, // 待接单
initiateRefuse: { name: '已驳回', color: 'red' }, // 提单驳回 initiateRefuse: { name: '已驳回', color: 'red' }, // 提单驳回
finishRefuse: { name: '维修中', color: 'blue' }, // 回单驳回 finishRefuse: { name: '维修中', color: 'blue' }, // 回单驳回
......
...@@ -44,7 +44,13 @@ ...@@ -44,7 +44,13 @@
<view class="item text" v-if="imageList.length"> <view class="item text" v-if="imageList.length">
<view class="name">附件</view> <view class="name">附件</view>
<view class="image"> <view class="image">
<image @click="onPreviewImage(url)" v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image> <image @click="onPreviewImage(url, imageList)" v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
</view>
</view>
<view class="item text" v-if="formModel.repairStatus === 'finishAuditPass' && maintenancePhotos.length">
<view class="name">维修照片</view>
<view class="image">
<image @click="onPreviewImage(url, maintenancePhotos)" v-for="(url, index) in maintenancePhotos" :key="index" :src="url" class="icon"></image>
</view> </view>
</view> </view>
<view class="item text" v-if="formModel.evaluateCount"> <view class="item text" v-if="formModel.evaluateCount">
...@@ -91,7 +97,8 @@ ...@@ -91,7 +97,8 @@
formModel: {}, formModel: {},
imageList: [], imageList: [],
stepActive: 1, stepActive: 1,
stepList: [] stepList: [],
maintenancePhotos: []
} }
}, },
watch: { watch: {
...@@ -168,6 +175,10 @@ ...@@ -168,6 +175,10 @@
this.formModel = {...result} this.formModel = {...result}
let maintenanceImg = result.repairPhoto ? result.repairPhoto.split(',') : [] let maintenanceImg = result.repairPhoto ? result.repairPhoto.split(',') : []
this.imageList = maintenanceImg.map(item=> `${serverConfig.imageURL}${item}`) this.imageList = maintenanceImg.map(item=> `${serverConfig.imageURL}${item}`)
if(this.formModel.repairStatus === 'finishAuditPass') {
let maintenancePhotos = result.maintenancePhoto ? result.maintenancePhoto.split(',') : []
this.maintenancePhotos = maintenancePhotos.map(item=> `${serverConfig.imageURL}${item}`)
}
} catch(err) { } catch(err) {
this.formModel = null this.formModel = null
} }
...@@ -219,10 +230,10 @@ ...@@ -219,10 +230,10 @@
url: '/pages/maintenanceDetails/index?id=' + this.formModel.id url: '/pages/maintenanceDetails/index?id=' + this.formModel.id
}); });
}, },
onPreviewImage(currentUrl) { onPreviewImage(currentUrl, list) {
uni.previewImage({ uni.previewImage({
current: currentUrl, // 图片的地址url current: currentUrl, // 图片的地址url
urls: this.imageList // 预览的地址url urls: list // 预览的地址url
}) })
} }
}, },
......
...@@ -39,7 +39,13 @@ ...@@ -39,7 +39,13 @@
<view class="item text" v-if="imageList.length"> <view class="item text" v-if="imageList.length">
<view class="name">附件</view> <view class="name">附件</view>
<view class="image"> <view class="image">
<image v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image> <image @click="onPreviewImage(url, imageList)" v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
</view>
</view>
<view class="item text" style="margin-top:16rpx;" v-if="maintenancePhotos.length">
<view class="name">维修照片</view>
<view class="image">
<image @click="onPreviewImage(url, maintenancePhotos)" v-for="(url, index) in maintenancePhotos" :key="index" :src="url" class="icon"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -55,20 +61,25 @@ ...@@ -55,20 +61,25 @@
getCommunityRepairDetailApi, getCommunityRepairDetailApi,
editCommunityRepairApi editCommunityRepairApi
} from '@/config/api.js' } from '@/config/api.js'
import serverConfig from "@/config/server_config.js";
export default { export default {
data() { data() {
return { return {
rateValue: 5, rateValue: 5,
evaluation: '', evaluation: '',
formModel: {}, formModel: {},
imageList: [] imageList: [],
maintenancePhotos: []
} }
}, },
methods: { methods: {
async getDetail(id) { async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id}) let {result} = await getCommunityRepairDetailApi({id})
this.formModel = {...result} this.formModel = {...result}
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : [] let maintenanceImg = result.repairPhoto ? result.repairPhoto.split(',') : []
this.imageList = maintenanceImg.map(item=> `${serverConfig.imageURL}${item}`)
let maintenancePhotos = result.maintenancePhoto ? result.maintenancePhoto.split(',') : []
this.maintenancePhotos = maintenancePhotos.map(item=> `${serverConfig.imageURL}${item}`)
}, },
async onSubmit() { async onSubmit() {
await editCommunityRepairApi({ await editCommunityRepairApi({
...@@ -86,6 +97,12 @@ ...@@ -86,6 +97,12 @@
uni.navigateBack({delta: 2}); uni.navigateBack({delta: 2});
}, 1500) }, 1500)
}, 30) }, 30)
},
onPreviewImage(currentUrl, list) {
uni.previewImage({
current: currentUrl, // 图片的地址url
urls: list // 预览的地址url
})
} }
}, },
onLoad(option) { onLoad(option) {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<view class="content"> <view class="content">
<view class="item"> <view class="item">
<view class="name">业主</view> <view class="name">业主</view>
<view class="detail">{{item.ownerName}} {{item.ownerPhone}}</view> <view class="detail">{{item.residentName}} {{item.residentPhone}}</view>
</view> </view>
<view class="item"> <view class="item">
<view class="name">房屋状态</view> <view class="name">房屋状态</view>
...@@ -22,6 +22,14 @@ ...@@ -22,6 +22,14 @@
<view class="name">物业公司</view> <view class="name">物业公司</view>
<view class="detail">{{item.propertyName}}</view> <view class="detail">{{item.propertyName}}</view>
</view> </view>
<view class="item">
<view class="name">关系</view>
<view class="detail">{{item.relationShipName}}</view>
</view>
<view class="item">
<view class="name">认证状态</view>
<view class="tag" :class="item.isAuth ? 'green' : 'grey'">{{item.isAuth ? '已认证' : '未认证'}}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -34,14 +42,13 @@ ...@@ -34,14 +42,13 @@
</template> </template>
<script> <script>
import { import { getHouseListApi } from '@/config/api.js'
getHouseListApi import {relationShipList} from '@/utils/dictionary'
} from '@/config/api.js'
import noData from '@/components/no-data/no-data' import noData from '@/components/no-data/no-data'
let statusList = { let statusList = {
waitAudit: { name: '认证中', color: 'yellow' }, waitAudit: { name: '审核中', color: 'yellow' },
refuse: { name: '认证失败', color: 'red' }, refuse: { name: '审核失败', color: 'red' },
auditPass: { name: '认证成功', color: 'green' } auditPass: { name: '审核成功', color: 'green' }
} }
export default { export default {
components: {noData}, components: {noData},
...@@ -64,10 +71,12 @@ ...@@ -64,10 +71,12 @@
pageSize: 10 pageSize: 10
}) })
let data = result.records.map(item=> { let data = result.records.map(item=> {
let relationShipObj = relationShipList.find(row=>row.value === item.relationShip)
return { return {
...item, ...item,
statusName: statusList[item.auditStatus].name, statusName: statusList[item.auditStatus].name,
color: statusList[item.auditStatus].color color: statusList[item.auditStatus].color,
relationShipName: relationShipObj ? relationShipObj.label : ''
} }
}) })
if(flag) { if(flag) {
...@@ -205,6 +214,26 @@ ...@@ -205,6 +214,26 @@
font-size: 28rpx; font-size: 28rpx;
color: #373737; color: #373737;
} }
.tag {
width: 130rpx;
text-align: center;
height: 36rpx;
line-height: 36rpx;
font-size: 22rpx;
border-radius: 30rpx;
margin-top: 17rpx;
&.green {
color: #10D680;
border: 1px solid #10D680;
background-color: #F1FFF9;
}
&.grey {
color: #CDD0D6;
border: 1px solid #CDD0D6;
background-color: #FFFCF6;
}
}
} }
} }
......
...@@ -47,10 +47,13 @@ ...@@ -47,10 +47,13 @@
</view> </view>
</view> </view>
</view> </view>
<template v-if="formModel.auditStatus === 'refuse'"> <template v-if="formModel.isAuth === 0">
<view class="form-submit" @click="toEditor()">修改</view> <view class="form-submit" @click="toEditor()">修改</view>
</template>
<template v-if="formModel.auditStatus === 'refuse'">
<view class="form-delete" @click="onUnbinding(true)">删除</view> <view class="form-delete" @click="onUnbinding(true)">删除</view>
</template> </template>
<view v-if="formModel.auditStatus === 'auditPass' && formModel.isAuth === 0" class="form-submit" @click="onAuthentication()">认证房屋</view>
<view v-if="formModel.auditStatus === 'auditPass'" class="form-submit" @click="onUnbinding()">解除绑定</view> <view v-if="formModel.auditStatus === 'auditPass'" class="form-submit" @click="onUnbinding()">解除绑定</view>
</view> </view>
</view> </view>
...@@ -60,16 +63,13 @@ ...@@ -60,16 +63,13 @@
import { import {
getHouseDetailApi, getHouseDetailApi,
deleteByOpenIdApi, deleteByOpenIdApi,
getDictItemsApi getDictItemsApi,
editIsAuditApi
} from '@/config/api.js' } from '@/config/api.js'
let statusList = {
waitAudit: { name: '认证中', color: 'yellow' },
refuse: { name: '认证失败', color: 'red' },
auditPass: { name: '认证成功', color: 'green' }
}
export default { export default {
data() { data() {
return { return {
houseId: '',
formModel: {}, formModel: {},
typeList: [] typeList: []
} }
...@@ -78,10 +78,10 @@ ...@@ -78,10 +78,10 @@
ongetDictItems(name) { ongetDictItems(name) {
return getDictItemsApi(name) return getDictItemsApi(name)
}, },
async getDetail(id) { async getDetail() {
let {result} = await getHouseDetailApi({id}) let {result} = await getHouseDetailApi({id: this.houseId})
result['statusName'] = statusList[result.auditStatus].name result['statusName'] = result.isAuth ? '已认证' : '未认证'
result['color'] = statusList[result.auditStatus].color result['color'] = result.isAuth ? 'green' : 'grey'
result['buildingTypeName'] = this.typeList.find(item=>item.value === result.useTo)?.label result['buildingTypeName'] = this.typeList.find(item=>item.value === result.useTo)?.label
this.formModel = {...result} this.formModel = {...result}
}, },
...@@ -102,6 +102,20 @@ ...@@ -102,6 +102,20 @@
} }
}); });
}, },
onAuthentication() {
let _this = this
uni.showModal({
title: '提示',
content: "确认要认证此房屋吗?",
success: function (res) {
if (res.confirm) {
_this.authenticationConfirm()
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
async dialogConfirm(isDelete) { async dialogConfirm(isDelete) {
await deleteByOpenIdApi({id: this.formModel.id}) await deleteByOpenIdApi({id: this.formModel.id})
// let userType = uni.getStorageSync('user_type') // let userType = uni.getStorageSync('user_type')
...@@ -148,6 +162,12 @@ ...@@ -148,6 +162,12 @@
}, 1500) }, 1500)
}, 50) }, 50)
}, },
async authenticationConfirm() {
await editIsAuditApi({
id: this.formModel.id
})
this.getDetail()
},
toEditor() { toEditor() {
getApp().globalData.registerInfo = {...this.formModel} getApp().globalData.registerInfo = {...this.formModel}
uni.navigateTo({ uni.navigateTo({
...@@ -157,7 +177,8 @@ ...@@ -157,7 +177,8 @@
}, },
async onLoad(option) { async onLoad(option) {
this.typeList = await this.ongetDictItems('house_purpose') this.typeList = await this.ongetDictItems('house_purpose')
this.getDetail(option.id) this.houseId = option.id
this.getDetail()
} }
} }
</script> </script>
...@@ -172,6 +193,7 @@ ...@@ -172,6 +193,7 @@
} }
.house { .house {
margin-bottom: 60rpx;
.details { .details {
background-color: #ffffff; background-color: #ffffff;
...@@ -208,21 +230,15 @@ ...@@ -208,21 +230,15 @@
} }
.red .tag {
color: #F42E2E;
border: 1px solid #F42E2E;
background-color: #FFF5F5;
}
.green .tag { .green .tag {
color: #10D680; color: #10D680;
border: 1px solid #10D680; border: 1px solid #10D680;
background-color: #F1FFF9; background-color: #F1FFF9;
} }
.yellow .tag { .grey .tag {
color: #F1BE51; color: #CDD0D6;
border: 1px solid #F1BE51; border: 1px solid #CDD0D6;
background-color: #FFFCF6; background-color: #FFFCF6;
} }
...@@ -239,7 +255,7 @@ ...@@ -239,7 +255,7 @@
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
margin-top: 60rpx; margin-bottom: 30rpx;
} }
.form-delete { .form-delete {
height: 80rpx; height: 80rpx;
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
<image @click="onPreviewImage(item)" v-for="(item,index) in repairDetail.complaintImg" :key="index" :src="item" class="icon"></image> <image @click="onPreviewImage(item)" v-for="(item,index) in repairDetail.complaintImg" :key="index" :src="item" class="icon"></image>
</view> </view>
</view> </view>
<view class="item text" v-if="repairDetail.repairStatus === 'finishAuditPass'"> <view class="item text" v-if="repairDetail.repairStatus === 'finishWaitAudit' || repairDetail.repairStatus === 'finishRefuse' || repairDetail.repairStatus === 'finishAuditPass'">
<view class="name">维修照片</view> <view class="name">维修照片</view>
<view class="image"> <view class="image">
<image @click="onPreviewPhotos(item)" v-for="(item,index) in repairDetail.maintenancePhotos" :key="index" :src="item" class="icon"></image> <image @click="onPreviewPhotos(item)" v-for="(item,index) in repairDetail.maintenancePhotos" :key="index" :src="item" class="icon"></image>
......
/* 与业主关系 */
export const relationShipList = [
{label: '业主', value: 'self'},
{label: '租户', value: 'tenant'},
{label: '亲人', value: 'relative'},
{label: '朋友', value: 'friend'},
{label: '其他', value: 'other'}
]
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论