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

一期封版

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