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

完善流程

上级 c3c176e7
<script>
export default {
globalData: {
houseInfo: {},
configData: {
openid: '',
sessionKey: '',
unionid: null
},
user_phone: '',
registerInfo: {
propertyName: '',
propertyCode: '',
......@@ -36,20 +29,15 @@
ownerPhone: '',
reservationTime: '',
repairDesc: '',
repairPhoto: []
repairPhoto: ''
},
complaintInfo: {
// complaintTheme: '',
// userName: '',
// userPhone: '',
// problemDesc: '',
// complaintImg: []
complaintImg: "http://192.168.0.118:9999/sys/common/static/scott/pic/DZaw29g8jc2g8517134094d63c4f033b196de2d131c5_1686290068976.jpg,http://192.168.0.118:9999/sys/common/static/scott/pic/Zagv670TpdYHaf63c87fc76c404e7e94bcb7470a353d_1686290068677.jpg,http://192.168.0.118:9999/sys/common/static/scott/pic/rYyK6iZ8EKNEdf951feec766be4346aed5987fee273b_1686290068684.png",
complaintTheme: "邻居装修太吵",
problemDesc: "邻居每天两三点装修,太不厚道",
userId: "1666361228882726913",
userName: "张三",
userPhone: "13119098978"
complaintImg: "",
complaintTheme: "",
problemDesc: "",
userId: "",
userName: "",
userPhone: ""
}
},
onLaunch: function() {
......
......@@ -3,11 +3,26 @@
<uni-popup ref="authorization" background-color="#fff">
<view class="content-page" @touchmove="stopTouchMove">
<view class="img-box">
<!-- <image style="width: 100rpx; height: 100rpx;margin:22rpx;" mode="aspectFill" :src="`${serverConfig.pictureURL}/images/logo.png`"></image> -->
<image style="width: 100rpx; height: 100rpx;margin:22rpx;" mode="aspectFill" src="../static/images/logo.png"></image>
</view>
<view class="text">为了更完美的体验,请授权获取电话</view>
<button class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" hover-class="none">手机号登录/注册</button>
<button v-if="checked" class="login-btn" type="primary" open-type="getPhoneNumber" @getphonenumber="onGetPhoneNumber" hover-class="none">手机号登录/注册</button>
<button v-else class="login-btn" type="primary" @click="verifyPolicy" hover-class="none">手机号登录/注册</button>
<view class="refuse" @click="refuse">取消</view>
<view class="policy-fixed">
<checkbox-group @change="changePolicy">
<label>
<view class="policy-box">
<checkbox value="true" :checked="checked" color="#1677FF" style="transform:scale(0.7)" />
<text class="text">我已阅读并同意</text>
<text class="policy" @click.stop="readAgreement">《用户服务协议》</text>
<text class="text"></text>
<text class="policy" @click.stop="readPolicy">《隐私政策》</text>
</view>
</label>
</checkbox-group>
</view>
</view>
</uni-popup>
</view>
......@@ -19,34 +34,28 @@
getPropertyLoginApi,
bindingUserInfoApi
} from "@/config/api.js"
import serverConfig from "@/config/server_config.js";
export default {
data() {
return {
serverConfig,
configData: {
openid: '',
sessionKey: '',
unionid: null
}
}
},
onReady() {
const userOpenId = uni.getStorageSync('openid');
if(!userOpenId) {
wx.login({
success (res) {
if (res.code) {
getPropertyLoginApi({code: res.code}).then(row=> {
if(row.code === 200) {
getApp().globalData.configData = {...row.result}
}
})
}
}
})
checked: false
}
},
// onReady() {
// const userOpenId = uni.getStorageSync('openid');
// if(!userOpenId) {
// wx.login({
// success (res) {
// if (res.code) {
// getPropertyLoginApi({code: res.code}).then(row=> {
// if(row.code === 200) {
// getApp().globalData.configData = {...row.result}
// }
// })
// }
// }
// })
// }
// },
methods: {
onOpenLogin() {
this.$refs.authorization.open('center')
......@@ -62,8 +71,18 @@
title: '您拒绝了授权,登录失败!'
})
},
verifyPolicy(e) {
if(!this.checked) {
uni.showToast({
title: '请先同意协议和政策',
icon: 'none'
});
return
}
},
//获取手机号
async onGetPhoneNumber(e) {
onGetPhoneNumber(e) {
let _this = this
if (e.detail.errMsg === "getPhoneNumber:fail user deny") { //用户决绝授权
//拒绝授权后弹出一些提示
uni.showModal({
......@@ -71,33 +90,58 @@
showCancel: false
})
} else { //允许授权
wx.login({
success (res) {
if (res.code) {
_this.getUserPhone(e, res.code)
}
}
})
}
},
// 获取手机号
async getUserPhone(e, code) {
let {result} = await getPropertyLoginApi({code})
let res = await analysisMobileApi({
code: e.detail.code,
iv: e.detail.iv,
encryptedData: e.detail.encryptedData,
sessionKey: getApp().globalData.configData.sessionKey
sessionKey: result.sessionKey
})
if (res.code === 200 && res.result) {
this.onbindingUserInfo(res.result.purePhoneNumber)
getApp().globalData.userPhone = res.result.purePhoneNumber
}
uni.setStorageSync('openid', result.openid);
uni.setStorageSync('user_phone', res.result.purePhoneNumber);
this.$emit('loginEnd')
this.$refs.authorization.close()
}
},
// 绑定用户
async onbindingUserInfo(phone) {
const { openid } = getApp().globalData.configData;
let res = await bindingUserInfoApi({openId: openid, phone})
if(res.code === 200 && res.result) {
uni.setStorageSync('openid', res.result.communityUser.openid);
uni.setStorageSync('user_phone', res.result.communityUser.phone);
let userType = res.result.communityUser.userType
if(userType === '1') { // 业主
this.$emit('loginEnd', res.result.communityOwners)
} else { // 维修员
this.$emit('loginEnd', res.result.employeeVos)
}
this.$refs.authorization.close()
}
// async onbindingUserInfo(openId, phone) {
// let res = await bindingUserInfoApi({openId, phone})
// if(res.code === 200 && res.result) {
// uni.setStorageSync('openid', res.result.communityUser.openid);
// if(res.result.communityOwners && res.result.communityOwners.length) { // 业主
// this.$emit('loginEnd', true)
// } else if(res.result.employeeVos && res.result.employeeVos.comList.length) { // 维修员
// this.$emit('loginEnd', true)
// } else {
// this.$emit('loginEnd', false)
// }
// this.$refs.authorization.close()
// }
// },
changePolicy(e) {
this.checked = e.detail.value.length === 1
},
readPolicy() {
uni.navigateTo({
url: '/pages/policy/policy'
})
},
readAgreement() {
uni.navigateTo({
url: '/pages/policy/agreement'
})
}
}
}
......@@ -111,6 +155,7 @@
display: flex;
flex-direction: column;
align-items: center;
position: relative;
.img-box {
width: 144rpx;
height: 144rpx;
......@@ -140,5 +185,28 @@
line-height: 33rpx;
margin-top: 34rpx;
}
.policy-fixed {
position: fixed;
bottom: 160rpx;
left: 0;
right: 0;
z-index: 11;
.policy-box {
padding: 0 30rpx;
font-size: 14px;
vertical-align: middle;
.text {
color: #191A23;
vertical-align: middle;
}
.policy {
color: #1677FF;
vertical-align: middle;
}
}
}
}
</style>
<template>
<view class="nodate-box" v-if="show" :class="{'full': isFull}">
<image class="nodate" src="https://www.goldcloudy.com/group1/M00/00/7A/CgAAEWOYGf2ARB2zAADF0CpS_Pc912.png" mode="aspectFill"></image>
<image class="nodate" src="../../static/images/no-data.png" mode="aspectFill"></image>
<view class="text">{{text}}</view>
</view>
</template>
......@@ -45,8 +45,8 @@ export default {
.nodate {
margin-top: 280rpx;
width: 340rpx;
height: 254rpx;
width: 478rpx;
height: 322rpx;
}
.text {
......@@ -60,7 +60,7 @@ export default {
}
.text {
font-size: 28rpx;
font-size: 32rpx;
color: #191A23;
margin-top: 20rpx;
}
......
<template>
<view>
<uni-popup ref="userProfileShow" type="bottom" background-color="#fff">
<view class="userProfile-box">
<view class="title">获取你的昵称、头像</view>
<view class="describe">获取用户头像、昵称,主要用于向用户提供具有辨识度的用户中心界面</view>
<view class="form-box">
<view class="picture-box">
<text class="text">头像</text>
<button class="button" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" hover-class="none">
<image class="avatar" :src="userForm.userAvatarUrl || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" mode="aspectFill"></image>
</button>
</view>
<view class="picture-box">
<text class="text">昵称</text>
<input class="input" type="nickname" v-model="userForm.nickname" @change="getNickname" placeholder="请输入昵称" maxlength="14" />
</view>
</view>
<view class="submit-box"><button :disabled="isDisabled" style="width: 200px" type="primary" @click="userSubmit">确认</button></view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
userForm: {
userAvatarUrl: '',
nickname: '',
isTmp: false
}
}
},
computed: {
isDisabled() {
return !this.userForm.userAvatarUrl || !this.userForm.nickname;
}
},
methods: {
onChooseAvatar(data) {
this.userForm.userAvatarUrl = data.detail.avatarUrl;
this.userForm.isTmp = true
},
getNickname(e) {
this.userForm.nickname = e.detail.value;
},
userSubmit() {
this.$refs.userProfileShow.close()
this.$emit('saveUserOk', this.userForm)
}
}
}
</script>
<style lang="scss" scoped>
.userProfile-box {
width: 100%;
padding: 20px 25px;
box-sizing: border-box;
.title {
font-size: 18px;
font-weight: bold;
color: #000;
}
.describe {
font-size: 14px;
color: #9c9c9c;
margin-top: 15px;
}
.form-box {
margin-top: 10px;
.picture-box {
width: 100%;
height: 74px;
display: flex;
align-items: center;
border-bottom: 1rpx solid #f1f1f1;
&:first-child {
border-top: 1rpx solid #f1f1f1;
}
.text {
font-size: 14px;
color: #000;
margin-right: 20px;
}
.button {
width: 54px;
height: 54px;
padding: 0;
margin: inherit;
&::after {
border: none;
}
.avatar {
width: 54px;
height: 54px;
border-radius: 5px;
}
}
.input {
height: 74px;
line-height: 74px;
}
}
}
.submit-box {
margin-top: 30px;
}
}
</style>
差异被折叠。
......@@ -2,7 +2,8 @@
* 接口参数
*/
const serverConfig = {
baseURL: "http://192.168.0.100:9999",
baseURL: "https://life.cloud.hjxbc.cn",
// baseURL: "http://192.168.0.105:9999",
// baseURL: "http://192.168.0.118:9999",
// baseURL: "http://220.203.25.212:9999", /* 根域名 */
// baseURL: "http://114.67.111.37:8001" /* 根域名 */
......
......@@ -22,6 +22,13 @@
"backgroundColor": "#ffffff"
}
},
{
"path": "pages/personnel/index",
"style": {
"navigationBarTitleText": "维修转单",
"backgroundColor": "#ffffff"
}
},
{
"path": "pages/announcement/index",
"style": {
......@@ -51,6 +58,7 @@
"path": "pages/housing/index",
"style": {
"navigationBarTitleText": "房屋登记认证",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff"
}
},
......@@ -78,6 +86,7 @@
"path": "pages/maintenance/index",
"style": {
"navigationBarTitleText": "维修上报",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
......@@ -102,6 +111,7 @@
"path": "pages/complaints/index",
"style": {
"navigationBarTitleText": "投诉记录",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
......@@ -145,6 +155,7 @@
"path": "pages/myHouse/index",
"style": {
"navigationBarTitleText": "我的房屋认证",
"enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
......@@ -184,6 +195,22 @@
"navigationBarTitleText": "个人信息",
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/repairDetails/index",
"style": {
"navigationBarTitleText": "维修详情",
"navigationBarBackgroundColor": "#ffffff"
}
},{
"path": "pages/policy/agreement",
"style": {
"navigationBarTitleText": "用户服务协议"
}
},{
"path": "pages/policy/policy",
"style": {
"navigationBarTitleText": "隐私政策"
}
}
],
"globalStyle": {
......
<template>
<view class="container">
<view class="page">
<!-- <view class="nav-bar">
<image src="../../static/images/icon_press01.png" class="icon"></image>
<view class="nav-title">社区公告</view>
</view> -->
<view class="news">
<view class="tab">
<view class="item active">全部<image src="../../static/images/icon_press02.png" class="icon"></image>
</view>
<view class="item">未读</view>
<view class="item">已读</view>
<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>
<view class="list">
<view class="item" @click="toDetails()">
<image src="../../static/images/img02.png" class="icon"></image>
<view class="con">
<view class="name">开展民族团结进步创建进社区 活动<view class="tag">非常紧急</view>
</view>
<view class="time">物业服务中心 2020/09/08</view>
</view>
</view>
<view class="item">
<image src="../../static/images/img03.png" class="icon"></image>
<view class="item" :class="{'noRead' : item.readStatus === '2'}" 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">开展民族团结进步创建进社区 活动</view>
<view class="time">物业服务中心 2020/09/08</view>
<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>
</view>
</view>
......@@ -35,25 +21,82 @@
</template>
<script>
import {queryNoticePageApi} from '@/config/api.js'
import serverConfig from '@/config/server_config.js';
export default {
data() {
return {
activeStatus: '',
allPageNo: 1,
yesPageNo: 1,
notPageNo: 1,
allList: [],
yseList: [],
notList: []
}
},
computed: {
activeList() {
if(this.activeStatus === '') {
return [...this.allList]
}
if(this.activeStatus === 'not') {
return [...this.notList]
}
if(this.activeStatus === 'yes') {
return [...this.yseList]
}
}
},
methods: {
toDetails() {
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 {result} = await queryNoticePageApi({...obj})
let data = result.content.map(item=> {
return {
...item,
noticeImage: serverConfig.baseURL + '/sys/common/static/' + item.noticeImg
}
})
if(this.activeStatus === '') {
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
} else {
this.notList = this.notList.concat(data)
}
}
if(this.activeStatus === 'yes') {
if(this.yesPageNo === 1) {
this.yseList = data
} else {
this.yseList = this.yseList.concat(data)
}
}
},
toDetails(id) {
uni.navigateTo({
url: '/pages/announcementDetails/index',
url: `/pages/announcementDetails/index?id=${id}`
});
},
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()
}
},
onLoad() {
},
onShow() {
this.getList()
}
}
</script>
......@@ -67,30 +110,6 @@
padding: 30rpx 0 0;
}
// .nav-bar {
// padding: 0 30rpx;
// width: 100%;
// height: 44px;
// line-height: 44px;
// margin-top: 10rpx;
// display: flex;
// align-items: center;
// .icon {
// width: 15rpx;
// height: 24rpx;
// }
// .nav-title {
// font-size: 36rpx;
// color: #373737;
// font-weight: 500;
// width: 100%;
// text-align: center;
// margin-right: 35px;
// }
// }
.news {
background-color: #ffffff;
border-radius: 16rpx;
......@@ -104,10 +123,7 @@
font-size: 30rpx;
color: #9D9CA6;
position: relative;
}
.active {
color: #373737;
transition: color .5s;
.icon {
width: 40rpx;
......@@ -115,6 +131,16 @@
position: absolute;
bottom: -10px;
left: 5px;
opacity: 0;
transition: opacity .5s;
}
}
.active {
color: #373737;
.icon {
opacity: 1;
}
}
......@@ -128,18 +154,34 @@
background-color: #ffffff;
border-radius: 16rpx;
display: flex;
justify-content: space-between;
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 {
width: 280rpx;
height: 165rpx;
flex: none;
width: 186rpx;
height: 140rpx;
border-radius: 6rpx;
}
.con {
margin-left: 30rpx;
padding-right: 10rpx;
.name {
font-size: 30rpx;
......
......@@ -2,32 +2,42 @@
<view class="container">
<view class="page">
<view class="news-details">
<view class="title">核酸检测通知<view class="tag">非常紧急</view>
<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="content">
<rich-text :nodes="content"></rich-text>
</view>
<view class="time">来源:物业服务中心 2020/09/08</view>
<view class="content"><rich-text :nodes="content"></rich-text></view>
</view>
</view>
</view>
</template>
<script>
import {
getNoticeDetailApi
} from '@/config/api.js'
export default {
data() {
return {
content: '本报5月28日讯 为巩固老旧小区改造成果,健全和完善长效管理机制,近日,青岛市城市管理委员会印发了《加强老旧小区改造后物业管理工作方案》(以下简称《方案》)。《方案》明确,今年列入改造计划的470余个老旧小区实行物业管理全覆盖,通过嵌入式开展环卫保洁、环境秩序等全要素整治,综合提升老旧小区环境品质。同时将划分物业管理区域、选举产生业主委员会或居民委员会、选聘物业企业、筹措房屋专项维修资金等事项作为老旧小区改造的前置条件。力争用三年时间推动老旧小区改造后物业服务由“低水平、保基本”向“高质量、全覆盖”转变升级。《方案》指老旧小区改造前应根据房屋、环境、配套设施和房屋产权的状况、长效管理服务需求以及业主消费意愿等实际情况,合理规划物业管理区域。通过召开业主大会选举产生业主委员会或由居委会代行职责,组织召开业主大会决策老旧小区改造后物业管理模式,采取专业化物业服务和社区托管、社会组织代管、居民自管等分类管理方式,实现老旧小区改造后物业管理全覆盖,同步确定房屋专项维修资金的补交、续交及使用,为老旧小区改造后实施长效管理提供资金保障,切实巩固老旧小区改造成果。为确保工作有效落实,在强化保障上,《方案》提出了各区(市)政府可结合实际给予财政补助,补助范围、补助期限、补助标准及方式由区(市)政府自行确定。可利用国有平台企业盘活闲置资产,物业企业通过开展助老、助餐、零售等经营用于服务小区及周边业主,所得收益可以用于补助老旧小区物业服务经费的不足。对自愿投资改造、接管改造后老旧小区签订物业服务合同5年及以上且业主满意度较高的物业企业,区(市)政府可给予有关支持,并给予信用加分。另一方面,结合老旧小区改造工作,建立完善青岛市智慧物业管理服务平台中老旧小区信息大数据,加大前端感知设备的配建力度。引导业主、物业企业积极使用平台,逐步提升物业管理服务的智慧化水平。'
info: {},
content: ''
}
},
methods: {
},
onLoad() {
async getDetail(id) {
let {result} = await getNoticeDetailApi({id})
if(result.urgentDegree === 'urgent') {
uni.setNavigationBarTitle({
title: '紧急通知'
})
}
this.info = result
this.content = result.noticeContent
}
},
onShow() {
onLoad(option) {
this.getDetail(option.id)
}
}
</script>
......
......@@ -2,9 +2,12 @@
<view class="container">
<view class="page">
<view class="search">
<uni-search-bar placeholder="请输入您的小区名" bgColor="#EEEEEE" @confirm="search" />
<uni-search-bar placeholder="请输入您的小区名" bgColor="#EEEEEE" @confirm="search" @cancel="cancel" />
<view class="list">
<view class="item" :class="{'active': item.platformCode === currentHouseCode}" @click="onChangeHouse(item)" v-for="item in houseList" :key="item.platformCode">{{item.platformName}}</view>
<view class="item" :class="{'active': item.platformCode === currentHouseCode}" @click="onChangeHouse(item)" v-for="item in houseList" :key="item.platformCode">
{{item.platformName}}
{{item.auditStatus}}
</view>
</view>
</view>
</view>
......@@ -12,6 +15,7 @@
</template>
<script>
let houseAllList = []
export default {
data() {
return {
......@@ -28,19 +32,19 @@
})
},
search(value) {
console.log(value)
this.houseList = houseAllList.filter(item=> {
return item.platformName.includes(value.value)
})
},
cancel() {
this.houseList = [...houseAllList]
}
},
onLoad() {
this.currentHouseCode = uni.getStorageSync('platform_code')
let userType = uni.getStorageSync('user_type')
if(userType === '1') {
let data = uni.getStorageSync('user_house_list')
this.houseList = JSON.parse(data)
} else {
let data = uni.getStorageSync('employee_house_list')
this.houseList = JSON.parse(data)
}
houseAllList = JSON.parse(data)
this.houseList = [...houseAllList]
}
}
</script>
......
......@@ -3,7 +3,7 @@
<view class="page">
<view class="complaints" v-if="maintenanceList.length !== 0">
<view class="information" v-for="item in maintenanceList" :key="item.id" @click="toDetail(item.id)">
<view class="title" :class="item.handleStatus === 'finish' ? 'gray' : 'yellow'">{{item.complaintTheme}}<view class="tag">{{item.statusName}}</view>
<view class="title" :class="item.handleStatus">{{item.complaintTheme}}<view class="tag">{{item.statusName}}</view>
</view>
<view class="content">
<view class="item">
......@@ -106,7 +106,7 @@
}
}
.yellow {
.waitPending {
border-left: 2px solid #F1BD4D;
.tag {
......@@ -116,7 +116,17 @@
}
}
.gray {
.pending {
border-left: 2px solid #6A59F2;
.tag {
color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
}
.finish {
border-left: 2px solid #B6B6BA;
.tag {
......
......@@ -59,16 +59,45 @@
data() {
return {
formData: {
complaintTheme: '邻居装修太吵',
userName: '张三',
userPhone: '13119098978',
problemDesc: '邻居每天两三点装修,太不厚道',
complaintTheme: '',
userName: '',
userPhone: '',
problemDesc: '',
complaintImg: []
}
}
},
methods: {
async toAudit() {
if(!this.formData.complaintTheme) {
uni.showToast({
title: '请输入投诉主题',
icon: 'none'
})
return
}
if(!this.formData.userName) {
uni.showToast({
title: '请输入投诉人姓名',
icon: 'none'
})
return
}
if(!this.formData.userPhone) {
uni.showToast({
title: '请输入手机号码',
icon: 'none'
})
return
}
let reg = /^1(3|4|5|7|8)\d{9}$/
if(!reg.test(this.formData.userPhone)) {
uni.showToast({
title: '请输入正确的手机号码',
icon: 'none'
})
return
}
let complaintImg = this.formData.complaintImg.map(item=>item.url).join(',')
let data = await addCommunityComplaintApi({
...this.formData,
......@@ -85,7 +114,7 @@
icon: 'none'
});
setTimeout(()=> {
uni.navigateTo({
uni.redirectTo({
url: '/pages/complaintsDetail/index',
});
}, 1500)
......
......@@ -23,18 +23,18 @@
</view>
<view class="item">
<view class="name">状态</view>
<view class="detail" :class="item.handleStatus === 'finish' ? 'gray' : 'yellow'"><view class="tag">{{complaintsDetail.statusName}}</view></view>
<view class="detail" :class="complaintsDetail.handleStatus"><view class="tag">{{complaintsDetail.statusName}}</view></view>
</view>
<view class="item text" v-if="complaintsDetail.handleStatus === 'finish'">
<view class="name">处理结果</view>
<view class="detail">{{complaintsDetail.handleResult}}</view>
</view>
<view class="item text">
<view class="item text" v-if="complaintsDetail.complaintImg && complaintsDetail.complaintImg.length">
<view class="name">附件</view>
<view class="image">
<image v-for="(item,index) in complaintsDetail.complaintImg" :key="index" :src="item" class="icon"></image>
</view>
</view>
<view class="item text" v-if="complaintsDetail.handleStatus === 'finish'">
<view class="name">处理结果</view>
<view class="detail">{{complaintsDetail.handleResult}}</view>
</view>
</view>
</view>
</view>
......@@ -49,6 +49,7 @@
import {Moment} from '@/utils/moment.js'
const handleStatus = {
waitPending: '待处理',
pending: '处理中',
finish: '处理完成'
}
export default {
......@@ -70,7 +71,7 @@
let {result} = await getCommunityComplaintDetailApi({id})
this.complaintsDetail = {
...result,
complaintImg: result.complaintImg.split(','),
complaintImg: result.complaintImg ? result.complaintImg.split(',') : [],
complaintTime: new Moment(new Date(result.createTime).getTime()).format('YYYY-MM-DD HH:mm'),
statusName: handleStatus[result.handleStatus]
}
......@@ -139,13 +140,17 @@
width: 65%;
font-size: 28rpx;
color: #373737;
&.yellow .tag {
&.waitPending .tag {
color: #F1BD4D;
border: 1px solid #F1BD4D;
background-color: #FFFCF6;
}
&.gray .tag {
&.pending .tag {
color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
&.finish .tag {
color: #B6B6BA;
border: 1px solid #B6B6BA;
background-color: #F8F8F8;
......
差异被折叠。
......@@ -30,7 +30,7 @@
<view class="form">
<uni-forms>
<view class="form-item">
<view class="form-item-fl">物业公司</view>
<view class="form-item-fl"><view class="asterisk">*</view>物业公司</view>
<view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'property')" range-key="propertyName" :value="settledKey" :range="settledList" class="form-item-tit">
<view class="uni-input">{{settledList[settledKey].propertyName || '请选择'}}</view>
......@@ -39,7 +39,7 @@
</view>
</view>
<view class="form-item">
<view class="form-item-fl">小区</view>
<view class="form-item-fl"><view class="asterisk">*</view>小区</view>
<view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'company')" range-key="communityName" :value="companyKey" :range="companyList" class="form-item-tit">
<view class="uni-input">{{companyList[companyKey].communityName || '请选择'}}</view>
......@@ -48,7 +48,7 @@
</view>
</view>
<view class="form-item">
<view class="form-item-fl">房屋</view>
<view class="form-item-fl"><view class="asterisk">*</view>房屋</view>
<view class="form-item-fr">
<picker mode="multiSelector" :range="houseList" range-key="name" :value="houseRoomKey" @change="houseKeyChange" @columnchange="colChange" class="form-item-tit">
<view class="uni-input">{{houseRoomName || '请选择'}}</view>
......@@ -103,8 +103,8 @@ const house = {
propertyCode: '',
platformName: '',
platformCode: '',
buildingId: '',
buildingName: '',
buildingId: '',
unitId: '',
unitName: '',
roomId: '',
......@@ -126,9 +126,9 @@ export default {
houseRoomName: '',
statusList: [],
statusKey: '',
statusKey: 0,
typeList: [],
typeKey: '',
typeKey: 0,
isDefault: true
}
......@@ -138,11 +138,11 @@ export default {
handler(newV, oldName) {
house.buildingId = this.houseList[0][newV[0]].id
house.buildingName = this.houseList[0][newV[0]].name
house.unitId = this.houseList[1][newV[1]].id
house.unitName = this.houseList[1][newV[1]].name
house.roomId = this.houseList[2][newV[2]].id
house.roomName = this.houseList[2][newV[2]].name
this.houseRoomName = `${this.houseList[0][newV[0]].name} ${this.houseList[1][newV[1]].name} ${this.houseList[2][newV[2]].name}`
house.unitId = this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].id : ''
house.unitName = this.houseList[1][newV[1]] ? this.houseList[1][newV[1]].name : ''
house.roomId = this.houseList[2][newV[2]] ? this.houseList[2][newV[2]].id : ''
house.roomName = 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 : ''}`
},
deep: true
}
......@@ -168,7 +168,7 @@ export default {
break;
case 'type':
this.typeKey = Number(e.detail.value)
house.buildingType = this.statusList[this.typeKey].value
house.buildingType = this.typeList[this.typeKey].value
break;
default:
break
......@@ -177,10 +177,22 @@ export default {
async ongetSettledList() {
let {result} = await getSettledListApi({}, {custom: {load: false}})
this.settledList = result
if(result.length === 0) {
uni.showToast({
icon: "none",
title: '当前物业公司暂无小区'
})
}
},
async ongetCompanyList(platformCode) {
let {result} = await getCompanyListApi({platformCode}, {custom: {load: false}})
this.companyList = result
if(result.length === 0) {
uni.showToast({
icon: "none",
title: '当前小区下暂无楼栋'
})
}
},
async ongetBuildingList(platformCode) {
let {result} = await getBuildingListApi({platformCode}, {custom: {load: false}})
......@@ -192,6 +204,7 @@ export default {
})
this.houseList[0] = new Array().concat([...buildingList])
// this.houseList[0].push(...buildingList)
// this.$set(this.houseList, 0, buildingList)
if(buildingList.length) this.ongetCommunityList()
},
async ongetCommunityList() {
......@@ -205,7 +218,8 @@ export default {
}
})
this.houseList[1] = new Array().concat([...communityList])
this.ongetHouseList()
// this.$set(this.houseList, 1, communityList)
if(communityList.length) this.ongetHouseList()
},
async ongetHouseList() {
let platformCode = this.houseList[1][this.houseRoomKey[1]].platformCode
......@@ -218,6 +232,8 @@ export default {
}
})
this.houseList[2] = new Array().concat([...houseList])
// this.$set(this.houseList, 2, houseList)
this.$forceUpdate();
},
......@@ -241,10 +257,40 @@ export default {
this.houseRoomKey = e.detail.value
},
toNext() {
if(!house.propertyName) {
uni.showToast({
title: '请选择物业公司',
icon: 'none'
})
return
}
if(!house.platformName) {
uni.showToast({
title: '请选择小区',
icon: 'none'
})
return
}
if(!house.buildingName) {
uni.showToast({
title: '请选择房屋',
icon: 'none'
})
return
}
if(!house.roomId) {
uni.showToast({
title: '请选择完整的房屋',
icon: 'none'
})
return
}
house.isDefault = this.isDefault ? 1 : 0
let registerInfo = getApp().globalData.registerInfo
house.relationShip = this.statusList[this.statusKey].value
house.certificateType = this.typeList[this.typeKey].value
getApp().globalData.registerInfo = {...registerInfo, ...house}
uni.navigateTo({
uni.redirectTo({
url: '/pages/housingResidents/index',
});
}
......@@ -253,6 +299,22 @@ export default {
this.ongetSettledList()
this.statusList = await this.ongetDictItems('house_status')
this.typeList = await this.ongetDictItems('house_purpose')
let registerInfo = getApp().globalData.registerInfo
if(registerInfo.id) {
house.propertyName = registerInfo.propertyName
house.propertyCode = registerInfo.propertyCode
house.platformName = registerInfo.platformName
house.platformCode = registerInfo.platformCode
house.buildingName = registerInfo.buildingName
house.buildingId = registerInfo.buildingId
house.unitId = registerInfo.unitId
house.unitName = registerInfo.unitName
this.settledKey = 0
} else {
house.buildingStatus = this.statusList[this.statusKey].value
house.buildingType = this.typeList[this.typeKey].value
}
},
onShow() {
......@@ -337,6 +399,13 @@ export default {
.form-item-fl {
font-size: 28rpx;
color: #373737;
display: flex;
.asterisk {
color: #F42E2E;
width: 10rpx;
margin-right: 6rpx;
}
}
.form-item-fr {
......
......@@ -3,7 +3,9 @@
<view class="page">
<view class="housing">
<view class="audit">
<view class="uni-icons"><uni-icons type="more-filled" size="25" color="#F6C864"></uni-icons></view>
<view class="uni-icons" v-if="userHouse.auditStatus === 'refuse'"><uni-icons type="closeempty" size="25" color="#F42E2E"></uni-icons></view>
<view class="uni-icons" v-else-if="userHouse.auditStatus === 'auditPass'"><uni-icons type="checkmarkempty" size="25" color="#1BDA1B"></uni-icons></view>
<view class="uni-icons" v-else><uni-icons type="more-filled" size="25" color="#F6C864"></uni-icons></view>
<view class="name">房屋{{statusTitle}}</view>
</view>
<view class="steps">
......@@ -73,7 +75,7 @@
</view>
<view class="item">
<view class="name">性别</view>
<view class="detail">{{userHouse.sex ? '女' : '男'}}</view>
<view class="detail">{{userHouse.sex === 2 ? '女' : '男'}}</view>
</view>
<view class="item">
<view class="name">证件类型</view>
......@@ -81,7 +83,7 @@
</view>
<view class="item">
<view class="name">证件号码</view>
<view class="detail">{{userHouse.certificateNo || ''}}</view>
<view class="detail">{{userHouse.certificateNo || ''}}</view>
</view>
</view>
</view>
......@@ -127,6 +129,7 @@ export default {
statusTitle() {
if(this.userHouse.auditStatus === 'waitAudit') return '审核中,请耐心等待'
if(this.userHouse.auditStatus === 'refuse') return '已驳回,请确认'
if(this.userHouse.auditStatus === 'auditPass') return '房屋已认证成功'
return ''
}
},
......@@ -147,7 +150,7 @@ export default {
title: '删除成功!'
})
setTimeout(()=> {
uni.switchTab({
uni.reLaunch({
url: '/pages/home/index'
})
}, 1500)
......@@ -168,18 +171,14 @@ export default {
}
},
async onLoad(options) {
if(options.id) {
this.getHouseInfo(options.id)
} else {
let data = getApp().globalData.registerInfo
if(data.propertyCode && data.residentName) {
this.userHouse = {...data}
console.log(this.userHouse)
} else {
this.getHouseInfo(options.id)
}
this.statusList = await getDictItemsApi('house_status')
this.typeList = await getDictItemsApi('house_purpose')
},
onShow() {
}
}
</script>
......
......@@ -34,26 +34,27 @@
<view class="asterisk">*</view>与业主关系
</view>
<view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'relationShip')" range-key="label" :value="formData.relationShip" :range="relationShipList" class="form-item-tit">
<view class="uni-input">{{relationShipList[Number(formData.relationShip)].label || '请选择与业主关系'}}</view>
<picker mode="selector" @change="e=>bindPickerChange(e, 'relationShip')" range-key="label" :value="relationShipIndex" :range="relationShipList" class="form-item-tit">
<view class="uni-input">{{relationShipList[relationShipIndex].label}}</view>
</picker>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
</view>
<view class="form-item">
<view class="form-item-fl">
<view class="asterisk">*</view>{{formData.relationShip === '1' ? '业主' : '住户'}}姓名
<view class="asterisk">*</view>业主名称
</view>
<view class="form-item-fr">
<input class="form-item-tit" readonly v-model="formData.residentName" focus placeholder="请输入姓名" />
<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 class="asterisk">*</view>业主电话
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.residentPhone" focus placeholder="请输入手机号码" />
<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 class="form-item">
......@@ -61,8 +62,8 @@
<view class="asterisk"></view>证件类型
</view>
<view class="form-item-fr">
<picker @change="e=>bindPickerChange(e, 'certificate')" range-key="label" :value="formData.certificateType" :range="certificateList" class="form-item-tit">
<view class="uni-input">{{certificateList[formData.certificateType].label || '请选择证件类型'}}</view>
<picker @change="e=>bindPickerChange(e, 'certificate')" range-key="label" :value="certificateIndex" :range="certificateList" class="form-item-tit">
<view class="uni-input">{{certificateList[certificateIndex].label}}</view>
</picker>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
......@@ -77,12 +78,30 @@
</view>
<view class="form-item">
<view class="form-item-fl">
<view class="asterisk"></view>住户性别
<view class="asterisk"></view>性别
</view>
<view class="form-item-fr">
<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>
<view class="form-item-fr">
<view class="form-item-tit">{{formData.residentPhone}}</view>
</view>
</view>
</template>
</uni-forms>
</view>
......@@ -96,57 +115,100 @@
import {
postcommunityOwnerAddApi
} from '@/config/api.js'
import {isMoble} from '@/utils/util'
export default {
data() {
return {
formData: {
relationShip: '1',
ownerName: '',
ownerPhone: '',
relationShip: '',
residentName: '',
residentPhone: '',
sex: '',
sex: 1,
certificateType: '',
certificateNo: ''
},
sexs: [{
text: '男',
value: 0
}, {
text: '女',
value: 1
}],
sexs: [
{ text: '男', value: 1 },
{ text: '女', value: 2 }
],
relationShipList: [
{label: '本人', value: '1'},
{label: '租户', value: '2'},
{label: '亲人', value: '3'},
{label: '朋友', value: '4'}
],
relationShipIndex: 0,
certificateList: [
{label: '身份证', value: '1'},
{label: '港澳通行证', value: '2'},
{label: '护照', value: '3'}
]
],
certificateIndex: 0
}
},
methods: {
bindPickerChange(e, type) {
if(type === 'certificate') {
this.formData.certificateType = e.detail.value
this.certificateIndex = Number(e.detail.value)
} else {
this.formData.relationShip = e.detail.value
this.relationShipIndex = Number(e.detail.value)
if(this.relationShipIndex === 0) {
this.formData.ownerPhone = uni.getStorageSync('user_phone')
} else {
this.formData.ownerPhone = ''
this.formData.residentName = ''
}
}
},
toAudit() {
if(!this.formData.ownerName) {
uni.showToast({
title: '请输入业主名称',
icon: 'none'
})
return
}
if(!this.formData.ownerPhone) {
uni.showToast({
title: '请输入业主电话',
icon: 'none'
})
return
}
if(!isMoble(this.formData.ownerPhone)) {
uni.showToast({
title: '请输入正确的业主电话',
icon: 'none'
})
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.formData.relationShip = this.relationShipList[this.relationShipIndex].value
this.formData.certificateType = this.certificateList[this.certificateIndex].value
this.formData['auditStatus'] = 'waitAudit'
let data = getApp().globalData.registerInfo
postcommunityOwnerAddApi({ ...data, ...this.formData}).then(res=> {
getApp().globalData.registerInfo = { ...data, ...this.formData}
console.log(getApp().globalData.registerInfo)
uni.setStorageSync('current_house_verify', '1') // 当前小区有待审核数据
uni.showToast({
icon: "none",
title: res.message
})
setTimeout(()=> {
uni.navigateTo({
uni.redirectTo({
url: '/pages/housingAudit/index',
});
}, 1500)
......@@ -154,10 +216,7 @@ export default {
}
},
onLoad() {
this.formData.residentPhone = uni.getStorageSync('user_phone')
},
onShow() {
this.formData.ownerPhone = this.formData.residentPhone = uni.getStorageSync('user_phone')
}
}
</script>
......@@ -250,7 +309,6 @@ export default {
width: 10rpx;
margin-right: 6rpx;
}
}
.form-item-fr {
......
......@@ -20,36 +20,6 @@
</view>
</view>
</view>
<!-- <view class="information" @click="toDetails()">
<view class="title gray">浴霸不出水了<view class="tag">已评价</view><view class="tag">已完成</view>
</view>
<view class="content">
<view class="item">
<view class="name">报修地址</view>
<view class="detail">汉江之星小区101栋2单元401</view>
</view>
<view class="item">
<view class="name">报修物品</view>
<view class="detail">水暖-浴霸</view>
</view>
<view class="item">
<view class="name">预约上门时间</view>
<view class="detail">2021/09/09 13:00 - 14:00</view>
</view>
<view class="item">
<view class="name">维修员</view>
<view class="detail">张三</view>
</view>
<view class="item">
<view class="name">联系方式</view>
<view class="detail">15415234562</view>
</view>
<view class="item">
<view class="name">评价</view>
<view class="detail"><uni-rate :value="4" :size="20" /></view>
</view>
</view>
</view> -->
</view>
<no-data :show="maintenanceList.length === 0" text="暂无报修信息"></no-data>
</view>
......@@ -63,21 +33,22 @@
import { getCommunityRepairListApi } from '@/config/api.js'
import noData from '@/components/no-data/no-data'
let statusList = {
initiateWaitAudit: { name: '待维修', color: 'green' },
waitDispatch: { name: '待维修', color: 'green' },
waitReceive: { name: '待维修', color: 'green' },
initiateRefuse: { name: '已驳回', color: 'red' },
finishRefuse: { name: '已驳回', color: 'red' },
inRepair: { name: '维修中', color: 'blue' },
finishWaitAudit: { name: '维修中', color: 'blue' },
finishAuditPass: { name: '已完成', color: 'gray' }
// waitDispatch: { name: '待派单', color: 'yellow' }
initiateWaitAudit: { name: '待维修', color: 'green' }, // 待审核
waitDispatch: { name: '待维修', color: 'green' }, // 带派单
waitReceive: { name: '待维修', color: 'green' }, // 待接单
initiateRefuse: { name: '已驳回', color: 'red' }, // 提单驳回
finishRefuse: { name: '已驳回', color: 'red' }, // 回单驳回
inRepair: { name: '维修中', color: 'blue' }, // 维修中
finishWaitAudit: { name: '维修中', color: 'blue' }, // 回单待审核
finishAuditPass: { name: '已完成', color: 'gray' } // 完成
}
export default {
components: {noData},
data() {
return {
maintenanceList: []
pageNumber: 1,
maintenanceList: [],
isFinish: false
}
},
methods: {
......@@ -86,15 +57,29 @@ export default {
url: '/pages/maintenanceAdd/index',
});
},
async getList() {
let {result} = await getCommunityRepairListApi()
this.maintenanceList = result.records.map(item=> {
async getList(flag) {
let {result} = await getCommunityRepairListApi({
pageNo: this.pageNumber,
pageSize: 10
})
let data = result.pageList.records.map(item=> {
return {
...item,
statusName: statusList[item.repairStatus].name,
color: statusList[item.repairStatus].color
}
})
if(flag) {
uni.stopPullDownRefresh();
this.maintenanceList = [].concat(data)
} else {
this.maintenanceList = this.maintenanceList.concat(data)
}
if(data.length < 10) {
this.isFinish = true
} else {
this.pageNumber += 1
}
},
onDetail(id) {
uni.navigateTo({
......@@ -104,9 +89,21 @@ export default {
},
onLoad() {
this.getList()
uni.$on('change-maintenance',async ()=>{
this.getList()
})
},
onShow() {
onUnload() {
// 移除监听事件
uni.$off('change-maintenance');
},
onPullDownRefresh() {
this.pageNumber = 1
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......
......@@ -3,13 +3,16 @@
<view class="page">
<view class="housing">
<view class="audit">
<view class="uni-icons"><uni-icons type="checkmarkempty" size="25" color="#F6C864"></uni-icons>
<view class="uni-icons">
<uni-icons v-if="statusType === 1" type="more-filled" size="25" color="#F6C864"></uni-icons>
<uni-icons v-if="statusType === 2" type="closeempty" size="25" color="#F42E2E"></uni-icons>
<uni-icons v-if="statusType === 3" type="checkmarkempty" size="25" color="#1BDA1B"></uni-icons>
</view>
<view class="name">您的维修{{statusName}},请耐心等待</view>
<view class="name">{{statusName}}</view>
</view>
<view class="steps-landscape">
<view class="title">维修流程</view>
<uni-steps :options="list2" active-color="#6A59F2" :active="active" direction="column" />
<uni-steps :options="stepList" active-color="#6A59F2" :active="stepActive" direction="column" />
</view>
<view class="information">
<view class="title">报修信息</view>
......@@ -38,18 +41,30 @@
<view class="name">问题描述</view>
<view class="detail">{{formModel.repairDesc}}</view>
</view>
<view class="item text">
<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>
</view>
</view>
<view class="item text">
<view class="name">评价</view>
<view class="detail">
<view>
<uni-rate v-model="formModel.evaluateCount" :size="20" />
</view>
<view>{{formModel.repairEvaluate}}</view>
</view>
</view>
</view>
<template v-if="formModel.repairStatus === 'refuse'">
</view>
<template v-if="formModel.repairStatus === 'initiateRefuse'">
<view class="form-submit" @click="toEditor()">修改</view>
<view class="form-delete" @click="deleteDialog">删除</view>
</template>
<template v-if="formModel.repairStatus === 'finishAuditPass' && !formModel.evaluateCount">
<view class="form-submit" @click="toEvaluate()">评价</view>
</template>
</view>
</view>
<uni-popup ref="popup" type="dialog">
......@@ -64,36 +79,89 @@
getCommunityRepairDetailApi,
deleteCommunityRepairApi
} from '@/config/api.js'
const statusName = {
waitAudit: '待审核',
waitDispatch: '待派单',
inRepair: '维修中',
finish: '已完成',
refuse: '审核驳回'
}
import serverConfig from "@/config/server_config.js";
export default {
data() {
return {
statusType: 0,
statusName: '',
formModel: {},
imageList: [],
active: 1,
list2: [{
stepActive: 1,
stepList: []
}
},
watch: {
formModel: {
handler(newV) {
let status = newV.repairStatus
if(['initiateWaitAudit', 'waitDispatch', 'waitReceive'].includes(status)) {
this.statusType = 1
this.stepActive = 1
this.statusName = '您的维修提交成功,请耐心等待'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功 ' + newV.reservationTime
},{
title: '待维修',
desc: '派单中'
})
}
if(['initiateRefuse', 'finishRefuse'].includes(status)) {
this.statusType = 2
this.stepActive = 1
this.statusName = '您的维修被驳回,请重新提交'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功'
}, {
title: '物业派单中',
desc: '物业派单中'
}]
desc: '提交成功 ' + newV.reservationTime
},{
title: '审核驳回',
desc: newV.auditOpinion + ' ' + newV.updateTime
})
}
if(['inRepair', 'finishWaitAudit'].includes(status)) {
this.statusType = 1
this.stepActive = 2
this.statusName = '维修员正在维修中,请耐心等待'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功 ' + newV.reservationTime
},{
title: '派单中',
desc: '派单成功 ' + newV.dispatchTime
},{
title: '维修中',
desc: '维修员' + newV.maintenanceName + '已接单 ' + newV.updateTime
})
}
if(status === 'finishAuditPass') {
this.statusType = 3
this.stepActive = 3
this.statusName = '您的维修已完成'
this.stepList.push({
title: '提交维修申请',
desc: '提交成功 ' + newV.reservationTime
},{
title: '派单中',
desc: '派单成功 ' + newV.dispatchTime
},{
title: '维修中',
desc: '维修员' + newV.maintenanceName + '已接单'
},{
title: '已完成',
desc: '维修员完成维修 ' + newV.updateTime
})
}
},
immediate: true,
deep: true
}
},
methods: {
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
this.statusName = statusName[result.repairStatus]
this.formModel = {...result}
this.imageList = result.repairPhoto.split(',')
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
},
deleteDialog() {
this.$refs.popup.open()
......@@ -106,14 +174,15 @@
icon: 'none'
});
// 页面重载
const pages = getCurrentPages()
// const pages = getCurrentPages()
// 声明一个pages使用getCurrentPages方法
const curPage = pages[pages.length - 1]
// const curPage = pages[pages.length - 1]
// 声明一个当前页面
// curPage.onLoad(curPage.options) // 传入参数
setTimeout(()=> {
uni.navigateBack();
}, 1500)
uni.$emit('change-maintenance');
}, 30)
},
dialogClose() {
......@@ -122,18 +191,25 @@
toEditor() {
getApp().globalData.maintenanceInfo = {
...this.formModel,
repairPhoto: this.formModel.repairPhoto.split(',').map(url=>{
repairPhoto: this.imageList.map(url=>{
let chunk = url.split('.')
return {
url: serverConfig.baseURL + '/sys/common/static/' + url,
name: chunk[0],
extname: chunk[1]
extname: chunk[1],
initUrl: url
}
})
}
console.log(getApp().globalData.maintenanceInfo)
uni.navigateTo({
url: '/pages/maintenanceAdd/index?type=edit',
});
},
toEvaluate() {
uni.navigateTo({
url: '/pages/maintenanceDetails/index?id=' + this.formModel.id
});
}
},
onLoad(option) {
......@@ -141,9 +217,8 @@
this.getDetail(option.id)
} else {
let result = getApp().globalData.maintenanceInfo
this.statusName = statusName[result.repairStatus]
this.formModel = {...result}
this.imageList = result.repairPhoto.split(',')
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
}
},
onShow() {
......@@ -230,8 +305,9 @@
.item {
display: flex;
height: 70rpx;
line-height: 70rpx;
&:not(:last-child) {
margin-bottom: 26rpx;
}
.name {
width: 35%;
......
......@@ -6,7 +6,7 @@
<uni-forms>
<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" v-model="formData.repairTitle" placeholder="请输入标题" />
......@@ -49,14 +49,14 @@
<view class="asterisk">*</view>预约上门时间
</view>
<view class="form-item-fr">
<uni-datetime-picker type="datetime" v-model="formData.reservationTime" return-type="timestamp" :hide-second="true" :clear-icon="false" :icon="false" :border="false" />
<uni-datetime-picker type="datetime" v-model="formData.reservationTime" return-type="timestamp" :start="startTime" :hide-second="true" :clear-icon="false" :icon="false" :border="false" />
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
</view>
<view class="form-item-text">
<view class="title">问题描述</view>
<view class="textarea">
<uni-easyinput type="textarea" v-model="formData.repairDesc" placeholder="请输入问题描述" />
<uni-easyinput type="textarea" :clearable="false" v-model="formData.repairDesc" placeholder="请输入问题描述" />
</view>
</view>
<view class="form-item-text">
......@@ -86,82 +86,90 @@
data() {
return {
isPageEdit: false,
startTime: Date.now(),
formData: {
repairTitle: '上报小区垃圾桶太少',
repairAddress: '10栋一单元101',
repairArticle: '垃圾桶',
repairTitle: '',
repairAddress: '',
repairArticle: '',
reservationTime: '',
ownerPhone: '13109890986',
repairDesc: '啥都好说SDK房价是SDK积分是',
ownerPhone: '',
repairDesc: '',
repairPhoto: []
},
}
},
methods: {
async toAudit() {
if(!this.formData.repairTitle) {
uni.showToast({
title: '请输入标题',
icon: 'none'
})
return
}
if(!this.formData.repairAddress) {
uni.showToast({
title: '请输入报修位置',
icon: 'none'
})
return
}
if(!this.formData.repairArticle) {
uni.showToast({
title: '请输入报修物品',
icon: 'none'
})
return
}
if(!this.formData.ownerPhone) {
uni.showToast({
title: '请输入手机号码',
icon: 'none'
})
return
}
let repairPhoto = this.formData.repairPhoto.map(item=>item.url).join(',')
if(this.isPageEdit) { // 编辑
let data = await editCommunityRepairApi({
await editCommunityRepairApi({
...this.formData,
repairPhoto
})
// getApp().globalData.maintenanceInfo = {
// ...this.formData,
// repairPhoto,
// repairStatus: 'waitAudit',
// reservationTime: new Moment(this.formData.reservationTime, 'YYYY-MM-DD HH-mm')
// }
// setTimeout(()=> {
// uni.showToast({
// title: '编辑成功!',
// icon: 'none'
// });
// setTimeout(()=> {
// uni.navigateTo({
// url: '/pages/maintenanceAaudit/index',
// });
// }, 1500)
// }, 30)
var pages = getCurrentPages();
var page = pages[pages.length - 3];
page.$vm.getList()
setTimeout(()=> {
uni.showToast({
title: '编辑成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack({delta: 2});
}, 1500)
}, 30)
} else {
let data = await addCommunityRepairApi({
await addCommunityRepairApi({
...this.formData,
repairPhoto
})
// getApp().globalData.maintenanceInfo = {
// ...this.formData,
// repairPhoto,
// repairStatus: 'waitAudit',
// reservationTime: new Moment(this.formData.reservationTime, 'YYYY-MM-DD HH-mm')
// }
// setTimeout(()=> {
// uni.showToast({
// title: '提交成功!',
// icon: 'none'
// });
// setTimeout(()=> {
// uni.navigateTo({
// url: '/pages/maintenanceAaudit/index',
// });
// }, 1500)
// }, 30)
}
getApp().globalData.maintenanceInfo = {
...this.formData,
repairPhoto,
repairStatus: 'waitAudit',
reservationTime: new Moment(this.formData.reservationTime, 'YYYY-MM-DD HH-mm')
repairStatus: 'initiateWaitAudit',
reservationTime: Moment.unix(this.formData.reservationTime).format('YYYY-MM-DD HH:mm')
}
uni.$emit('change-maintenance');
setTimeout(()=> {
uni.showToast({
title: `${this.isPageEdit ? '编辑' : '提交'}成功!`,
icon: 'none'
});
setTimeout(()=> {
uni.navigateTo({
uni.redirectTo({
url: '/pages/maintenanceAaudit/index',
});
}, 1500)
}, 30)
}
},
uploadImage(path) {
return new Promise((resolve, reject)=> {
......@@ -219,10 +227,9 @@
if(option.type === 'edit') {
this.isPageEdit = true
this.formData = getApp().globalData.maintenanceInfo
} else {
this.formData.reservationTime = Date.now() + 24*60*60*1000
}
},
onShow() {
}
}
</script>
......
......@@ -7,68 +7,92 @@
<view class="rate">
<view class="name">评价:</view><uni-rate v-model="rateValue" @change="onChange" :size="20" />
</view>
<view class="textarea"><uni-easyinput type="textarea" v-model="evaluation"
placeholder="请输入您的评价" /></uni-easyinput></view>
<view class="textarea">
<uni-easyinput type="textarea" v-model="evaluation" placeholder="请输入您的评价" />
</view>
</view>
<view class="content">
<view class="item">
<view class="name">报修地址</view>
<view class="detail">汉江之星小区01栋2单元402</view>
<view class="detail">{{formModel.repairAddress}}</view>
</view>
<view class="item">
<view class="name">维修物品</view>
<view class="detail">电梯</view>
<view class="detail">{{formModel.repairArticle}}</view>
</view>
<view class="item">
<view class="name">标题</view>
<view class="detail">电梯坏了</view>
<view class="detail">{{formModel.repairTitle}}</view>
</view>
<view class="item">
<view class="name">手机号码</view>
<view class="detail">16589000078</view>
<view class="detail">{{formModel.ownerPhone}}</view>
</view>
<view class="item">
<view class="name">预约上门时间</view>
<view class="detail">2022/09/09 14: 00 -16:00</view>
<view class="detail">{{formModel.reservationTime}}</view>
</view>
<view class="item text">
<view class="name">问题描述</view>
<view class="detail">9月9号上午电梯突然无法运行9月9号上午电梯突然无法运行9月9号上午电梯突然无法运行</view>
<view class="detail">{{formModel.repairDesc}}</view>
</view>
<view class="item text">
<view class="item text" v-if="imageList.length">
<view class="name">附件</view>
<view class="image">
<image src="../../static/images/img02.png" class="icon"></image>
<image src="../../static/images/img03.png" class="icon"></image>
<image v-for="(url, index) in imageList" :key="index" :src="url" class="icon"></image>
</view>
</view>
</view>
</view>
<view class="form-submit">提交</view>
<view class="form-submit" @click="onSubmit">提交</view>
</view>
</view>
</view>
</template>
<script>
import {
getCommunityRepairDetailApi,
editCommunityRepairApi
} from '@/config/api.js'
export default {
data() {
return {
rateValue: 3,
evaluation: ''
rateValue: 5,
evaluation: '',
formModel: {},
imageList: []
}
},
methods: {
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
this.formModel = {...result}
this.imageList = result.repairPhoto ? result.repairPhoto.split(',') : []
},
onChange(e) {
console.log('rate发生改变:' + JSON.stringify(e))
// console.log(this.rateValue);
}
},
onLoad() {
async onSubmit() {
await editCommunityRepairApi({
id: this.formModel.id,
repairEvaluate: this.evaluation,
evaluateCount: this.rateValue
})
setTimeout(()=> {
uni.showToast({
title: '评价成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack({delta: 1});
}, 1500)
}, 30)
}
},
onShow() {
onLoad(option) {
this.getDetail(option.id)
}
}
</script>
......
<template>
<view class="container">
<view class="page">
<view class="message">
<view class="item" v-for="(item, index) in noticeList" :key="item.id" @click="toDetail(item.id, index)">
<view class="top">
<view class="title">
......@@ -13,7 +12,7 @@
</view>
<view class="con">{{item.noticeContent}}</view>
</view>
<view class="item" @click="toDetail()">
<!-- <view class="item" @click="toDetail()">
<view class="top">
<view class="title">
<view class="point"></view>
......@@ -51,10 +50,10 @@
<view class="con">
您2022年3月物业费账单已经生成,请及时缴费,谢谢配合!
</view>
</view>
</view> -->
</view>
</view>
<no-data :show="noticeList.length === 0" text="暂无消息"></no-data>
</view>
</template>
......@@ -62,7 +61,9 @@
import {
getUserNoticeListApi
} from '@/config/api.js'
import noData from '@/components/no-data/no-data'
export default {
components: {noData},
data() {
return {
noticeList: []
......@@ -96,9 +97,9 @@ export default {
}
</style>
<style lang="scss" scoped>
.page {
padding: 30rpx;
}
// .page {
// padding: 30rpx;
// }
.message {
......
......@@ -38,9 +38,6 @@ export default {
},
onLoad(option) {
this.getDetail(option.id)
},
onShow() {
}
}
</script>
......
<template>
<view class="container">
<view class="page">
<!-- <view class="user" style="background-image: url('../../static/images/bg_mine.png');"> -->
<view class="user">
<image src="../../static/images/img01.png" class="icon"></image>
<view class="name">{{userName}}</view>
<view class="phone">{{userPhone}}</view>
<image :src="userAvatar || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" class="icon"></image>
<view class="name" v-if="userName">{{userName}}</view>
<view class="name" v-else @click="quickEntry">请认证</view>
<view class="phone" v-if="userName">{{userPhone}}</view>
</view>
<view class="service">
<view class="item" @click="quickEntry(1)">
......@@ -15,7 +15,7 @@
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view class="item" @click="quickEntry(2)">
<view v-if="userType !== '2'" class="item" @click="quickEntry(2)">
<view class="left">
<image src="../../static/images/user02.png" class="icon"></image>
<div class="title">我的房屋</div>
......@@ -29,35 +29,35 @@
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view class="item" @click="quickEntry(4)">
<view v-if="userType !== '2'" class="item" @click="quickEntry(4)">
<view class="left">
<image src="../../static/images/user04.png" class="icon"></image>
<div class="title">我的投诉</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view class="item" @click="quickEntry(5)">
<view v-if="userType !== '2'" class="item" @click="quickEntry(5)">
<view class="left">
<image src="../../static/images/user05.png" class="icon"></image>
<div class="title">缴费记录</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view class="item" @click="quickEntry(6)">
<view v-if="userType !== '2'" class="item" @click="quickEntry(6)">
<view class="left">
<image src="../../static/images/user06.png" class="icon"></image>
<div class="title">我的收据</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="isUser && userType === '2'" class="item" @click="quickEntry(7)">
<view v-if="userType === '2'" class="item" @click="quickEntry(7)">
<view class="left">
<image src="../../static/images/user07.png" class="icon"></image>
<div class="title">切换业主</div>
</view>
<image src="../../static/images/icon_more.png" class="arrow"></image>
</view>
<view v-if="isEmployee && userType === '1'" class="item" @click="quickEntry(8)">
<view v-if="isEmployee && userType !== '2'" class="item" @click="quickEntry(8)">
<view class="left">
<image src="../../static/images/user08.png" class="icon"></image>
<div class="title">维修员</div>
......@@ -66,24 +66,25 @@
</view>
</view>
</view>
<authorization-modal ref="authorization" @loginEnd="onLoginEnd" @refuse="onRefuse" />
</view>
</template>
<script>
import authorizationModal from '@/components/authorization.vue'
let timer = null
export default {
components: {
authorizationModal
},
data() {
return {
userType: '0',
userName: '',
userAvatar: '',
userPhone: '',
}
},
computed: {
isUser() {
return !!uni.getStorageSync('user_house_list')
},
isEmployee() {
return !!uni.getStorageSync('employee_house_list')
isEmployee: false
}
},
methods: {
......@@ -91,6 +92,10 @@
uni.navigateTo({url});
},
quickEntry(type) {
let isLogin = uni.getStorageSync('openid')
if (!!isLogin) {
let code = uni.getStorageSync('platform_code')
if(code) {
if (type == 1) {
uni.navigateTo({
url: '/pages/myInformation/index',
......@@ -128,7 +133,7 @@
}
}
});
} else {
} else if (type == 8) {
const that = this
uni.showModal({
title: '提示',
......@@ -141,11 +146,39 @@
}
}
});
} else {
return false
}
} else {
uni.showToast({
icon: "none",
title: '暂未查到业主信息,请认证!'
})
if(timer) clearTimeout(timer)
timer = null
timer = setTimeout(()=> {
uni.navigateTo({
url: '/pages/housing/index',
});
}, 1500)
}
} else {
uni.hideTabBar()
this.$nextTick(() => {
this.$refs.authorization.onOpenLogin()
});
}
},
onLoginEnd() {
uni.showTabBar()
uni.reLaunch({
url: '/pages/home/index'
})
},
onRefuse() {
uni.showTabBar()
},
onChangeEmployee(type) {
let data = JSON.parse(uni.getStorageSync('employee_house_list'))
uni.setStorageSync('platform_code', data[0].platformCode)
uni.setStorageSync('user_type', type)
uni.reLaunch({
url: '/pages/home/index'
......@@ -154,15 +187,14 @@
},
onLoad() {
this.userType = uni.getStorageSync('user_type')
this.userPhone = uni.getStorageSync('user_phone')
if(this.userType === '1') {
this.userName = uni.getStorageSync('user_name')
} else {
this.userName = uni.getStorageSync('employee_name')
}
this.userAvatar = uni.getStorageSync('user_avatar')
this.userPhone = uni.getStorageSync('user_phone')
this.isEmployee = !!uni.getStorageSync('employee_code')
},
onShow() {
onHide() {
if(timer) clearTimeout(timer)
timer = null
}
}
</script>
......@@ -177,7 +209,7 @@
}
.user {
background-image: url('http://192.168.0.118:9999/sys/common/static/scott/pic/bg_mine_1686729855474.png');
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_mine_1686974128612.png');
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
......
......@@ -2,13 +2,13 @@
<view class="container">
<view class="page">
<view class="house">
<view class="information" @click="toDetails()">
<view class="title green">十堰汉江之星小区<view class="tag">认证成功</view>
<view class="information" @click="toDetails(item.id)" v-for="item in houseList" :key="item.id">
<view class="title" :class="item.color">{{item.platformName}}<view class="tag">{{item.statusName}}</view>
</view>
<view class="content">
<view class="item">
<view class="name">业主</view>
<view class="detail">张三123</view>
<view class="detail">{{item.ownerName}} {{item.ownerPhone}}</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
......@@ -16,59 +16,11 @@
</view>
<view class="item">
<view class="name">房间号</view>
<view class="detail">101栋2单元1401</view>
<view class="detail">{{item.buildingName}}{{item.unitName}}{{item.roomName}}</view>
</view>
<view class="item">
<view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view>
</view>
</view>
</view>
<view class="information" @click="toDetails()">
<view class="title yellow">十堰阳光花园小区<view class="tag">认证中</view>
</view>
<view class="content">
<view class="item">
<view class="name">业主</view>
<view class="detail">张三123</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail">自住</view>
</view>
<view class="item">
<view class="name">房间号</view>
<view class="detail">101栋2单元1401</view>
</view>
<view class="item">
<view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view>
</view>
</view>
</view>
<view class="information">
<view class="title red">十堰阳光花园小区<view class="tag">认证失败</view>
</view>
<view class="content">
<view class="item">
<view class="name">业主</view>
<view class="detail">张三123</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail">自住</view>
</view>
<view class="item">
<view class="name">房间号</view>
<view class="detail">101栋2单元1401</view>
</view>
<view class="item">
<view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view>
</view>
<view class="item">
<view class="name">失败原因</view>
<view class="detail">手机号码错误</view>
<view class="detail">{{item.propertyName}}</view>
</view>
</view>
</view>
......@@ -81,27 +33,68 @@
</template>
<script>
import {
getHouseListApi
} from '@/config/api.js'
let statusList = {
waitAudit: { name: '认证中', color: 'yellow' },
refuse: { name: '认证失败', color: 'red' },
auditPass: { name: '认证成功', color: 'green' }
}
export default {
data() {
return {}
return {
pageNumber: 1,
houseList: [],
isFinish: false
}
},
methods: {
async getList(flag) {
let {result} = await getHouseListApi({
pageNo: this.pageNumber,
pageSize: 10
})
let data = result.records.map(item=> {
return {
...item,
statusName: statusList[item.auditStatus].name,
color: statusList[item.auditStatus].color
}
})
if(flag) {
uni.stopPullDownRefresh();
this.houseList = [].concat(data)
} else {
this.houseList = this.houseList.concat(data)
}
if(data.length < 10) {
this.isFinish = true
} else {
this.pageNumber += 1
}
},
toEditor() {
uni.navigateTo({
url: '/pages/housing/index',
});
},
toDetails() {
toDetails(id) {
uni.navigateTo({
url: '/pages/myHouseDetails/index',
url: '/pages/myHouseDetails/index?id=' + id
});
}
},
onLoad() {
this.getList()
},
onShow() {
onPullDownRefresh() {
this.pageNumber = 1
this.getList(true)
},
onReachBottom() {
if(this.isFinish) return
this.getList()
}
}
</script>
......
......@@ -5,81 +5,141 @@
<view class="details">
<view class="item">
<view class="name">物业公司</view>
<view class="detail">汉江之星物业公司</view>
<view class="detail">{{formModel.propertyName}}</view>
</view>
<view class="item">
<view class="name">小区</view>
<view class="detail">十堰汉江之星小区</view>
<view class="detail">{{formModel.platformName}}</view>
</view>
<view class="item">
<view class="name">房屋ID</view>
<view class="detail">25845628</view>
<view class="detail">{{formModel.id}}</view>
</view>
<view class="item">
<view class="name">楼栋</view>
<view class="detail">9号楼</view>
<view class="detail">{{formModel.buildingName}}</view>
</view>
<view class="item">
<view class="name">单元</view>
<view class="detail">1单元</view>
<view class="detail">{{formModel.unitName}}</view>
</view>
<view class="item">
<view class="name">房屋编号</view>
<view class="detail">1-1</view>
<view class="detail">{{formModel.roomName}}</view>
</view>
<view class="item">
<view class="name">房屋用途</view>
<view class="detail">商用</view>
<view class="detail">{{formModel.useTo}}</view>
</view>
<view class="item">
<view class="name">户型</view>
<view class="detail">两室一厅一厨一卫</view>
<view class="detail">{{formModel.propertyName}}</view>
</view>
<view class="item">
<view class="name">建筑面积</view>
<view class="detail">95平方米</view>
<view class="detail">{{formModel.floorSpace}}</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail green">
<view class="tag">认证成功</view>
<view class="detail" :class="formModel.color">
<view class="tag">{{formModel.statusName}}</view>
</view>
</view>
<view class="item">
<view class="name">房屋状态</view>
<view class="detail red">
<view class="tag">认证失败</view>
</view>
</view>
</view>
<template v-if="formModel.auditStatus === 'refuse'">
<view class="form-submit" @click="toEditor()">修改</view>
<view class="form-delete" @click="onUnbinding(true)">删除</view>
</template>
<view v-if="formModel.auditStatus === 'auditPass'" class="form-submit" @click="onUnbinding()">解除绑定</view>
</view>
<view class="form-submit" @click="toEditor()">解除绑定/修改</view>
<view class="form-delete" @click="deleteDialog">删除</view>
</view>
<uni-popup ref="popup" type="dialog">
<uni-popup-dialog type="error" cancelText="关闭" confirmText="同意" title="删除信息" content="确定要删除此信息吗?!"
@confirm="dialogConfirm" @close="dialogClose"></uni-popup-dialog>
</uni-popup>
</view>
</template>
<script>
import {
getHouseDetailApi,
deleteByOpenIdApi
} from '@/config/api.js'
let statusList = {
waitAudit: { name: '认证中', color: 'yellow' },
refuse: { name: '认证失败', color: 'red' },
auditPass: { name: '认证成功', color: 'green' }
}
export default {
data() {
return {}
return {
formModel: {}
}
},
methods: {
async getDetail(id) {
let {result} = await getHouseDetailApi({id})
result['statusName'] = statusList[result.auditStatus].name
result['color'] = statusList[result.auditStatus].color
this.formModel = {...result}
},
deleteDialog() {
this.$refs.popup.open()
},
toEditor() {
// uni.navigateTo({
// url: '/pages/housing/index',
// });
onUnbinding(isDelete) {
let _this = this
uni.showModal({
title: '提示',
content: `确认要${isDelete ? '删除' : '解绑'}此房屋吗?`,
success: function (res) {
if (res.confirm) {
_this.dialogConfirm(isDelete)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
async dialogConfirm(isDelete) {
await deleteByOpenIdApi({id: this.formModel.id})
let userType = uni.getStorageSync('user_type')
if(userType === '1') {
// let houseList = JSON.parse(uni.getStorageSync('user_house_list'))
// if(houseList > 1) {
// let newList = houseList.filter(item=>item.platformCode !== this.formModel.platformCode)
// uni.setStorageSync('user_house_list', JSON.stringify(newList))
// } else {
// uni.setStorageSync('user_type', JSON.stringify([]))
// }
let code = uni.getStorageSync('platform_code')
if(this.formModel.platformCode === code) {
uni.setStorageSync('platform_code', '')
setTimeout(()=> {
uni.showToast({
icon: "none",
title: `${isDelete ? '删除' : '解绑'}成功!`
})
setTimeout(()=> {
uni.reLaunch({
url: '/pages/home/index'
});
}, 1500)
}, 50)
} else {
setTimeout(()=> {
uni.showToast({
icon: "none",
title: `${isDelete ? '删除' : '解绑'}成功!`
})
var pages = getCurrentPages();
var page = pages[pages.length - 2];
page.$vm.getList()
setTimeout(()=> {
uni.navigateBack({delta: 1});
}, 1500)
}, 50)
}
}
},
onLoad() {
},
onLoad(option) {
this.getDetail(option.id)
},
onShow() {
......@@ -101,7 +161,6 @@
.details {
background-color: #ffffff;
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 30rpx;
.yellow {
......@@ -144,31 +203,22 @@
}
.red {
.tag {
.red .tag {
color: #F42E2E;
border: 1px solid #F42E2E;
background-color: #FFF5F5;
}
}
.green {
.tag {
.green .tag {
color: #10D680;
border: 1px solid #10D680;
background-color: #F1FFF9;
}
}
.gray {
.tag {
color: #B6B6BA;
border: 1px solid #B6B6BA;
background-color: #F8F8F8;
}
.yellow .tag {
color: #F1BE51;
border: 1px solid #F1BE51;
background-color: #FFFCF6;
}
......@@ -184,7 +234,7 @@
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
margin-bottom: 30rpx;
margin-top: 60rpx;
}
.form-delete {
height: 80rpx;
......@@ -196,5 +246,6 @@
text-align: center;
font-size: 28rpx;
color: #6A59F2;
margin-top: 30rpx;
}
</style>
\ No newline at end of file
......@@ -4,12 +4,12 @@
<view class="information">
<view class="form">
<uni-forms>
<view class="form-item">
<view class="form-item" @click="onOpenAvatar">
<view class="form-item-fl">
头像
</view>
<view class="form-item-fr">
<image src="../../static/images/img01.png" class="icon"></image>
<image :src="formData.avatar || 'http://220.203.25.212:9999/sys/common/static/scott/pic/avatar_1687240791447.png'" class="icon"></image>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
</view>
......@@ -18,7 +18,7 @@
姓名
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name" focus placeholder="请输入姓名" />
<input class="form-item-tit" v-model="formData.residentName" focus placeholder="请输入姓名" />
</view>
</view>
<view class="form-item">
......@@ -34,7 +34,7 @@
年龄
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name1" focus placeholder="请输入年龄" />
<input class="form-item-tit" v-model="formData.age" focus placeholder="请输入年龄" />
</view>
</view>
<view class="form-item">
......@@ -42,7 +42,7 @@
<view class="asterisk">*</view>手机号码
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name1" focus placeholder="请输入手机号码" />
<view class="form-item-tit">{{formData.residentPhone}}</view>
</view>
</view>
<view class="form-item">
......@@ -50,43 +50,101 @@
地址
</view>
<view class="form-item-fr">
<input class="form-item-tit" v-model="formData.name1" focus placeholder="请输入地址" />
<view class="form-item-tit">{{formData.address}}</view>
</view>
</view><strong></strong>
</uni-forms>
</view>
<view class="form-submit">保存</view>
<view class="form-submit" @click="onSaveInfo">保存</view>
</view>
</view>
<user-vatar ref="userVatar" @saveUserOk="saveUserOk" />
</view>
</template>
<script>
import userVatar from '@/components/user-vatar.vue';
import {
uploadFile,
getUserInfoApi,
editOwnerApi
} from '@/config/api.js'
import serverConfig from "@/config/server_config.js";
export default {
components: {
userVatar
},
data() {
return {
formData: {
name: '',
name1: '',
avatar: '',
residentName: '',
sex: '',
name2: '',
age: '',
address: '',
residentPhone: '',
platformCode: ''
},
sexs: [{
text: '男',
value: 0
}, {
text: '女',
value: 1
}]
sexs: [
{ text: '男', value: 1 },
{ text: '女', value: 2 }
],
hasTmp: false
}
},
methods: {},
onLoad() {
methods: {
async getUserInfo() {
let {result} = await getUserInfoApi()
this.formData = {
avatar: result.avatar,
residentName: result.residentName,
sex: result.sex,
age: result.age,
residentPhone: result.residentPhone,
address: result.platformName,
platformCode: result.platformCode
}
},
onShow() {
onOpenAvatar() {
this.$refs.userVatar.$refs.userProfileShow.open()
},
saveUserOk(form) {
this.formData.avatar = form.userAvatarUrl
this.formData.residentName = form.nickname
this.hasTmp = form.isTmp
},
async onSaveInfo() {
let uploadImg = ''
if(this.hasTmp) {
let {message} = await uploadFile({
filePath: this.formData.avatar,
name: 'file',
formData: { //其他需要携带的参数
'biz': 'scott/pic'
}
})
uploadImg = serverConfig.baseURL + '/sys/common/static/' + message
}
await editOwnerApi({
avatar: uploadImg || this.formData.avatar,
residentName: this.formData.residentName,
sex: this.formData.sex,
age: this.formData.age,
residentPhone: this.formData.residentPhone,
platformCode: this.formData.platformCode
})
setTimeout(()=> {
uni.showToast({
title: '保存成功!',
icon: 'none'
});
}, 30)
}
},
onLoad() {
this.getUserInfo()
}
}
</script>
......
<template>
<view class="container" style="background-image: url('../../static/images/bg_pay.png');">
<view class="container">
<view class="page">
<view class="paycost">
<view class="item">
<view class="item" @click="onPayFree">
<view class="information">
<view class="image">
<image src="../../static/images/paycost01.png" class="icon"></image>
......@@ -15,7 +15,7 @@
</view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
<view class="item">
<view class="item" @click="onPayFree">
<view class="information">
<view class="image">
<image src="../../static/images/paycost02.png" class="icon"></image>
......@@ -28,7 +28,7 @@
</view>
<uni-icons type="forward" color="#E4E4EA"></uni-icons>
</view>
<view class="item">
<view class="item" @click="onPayFree">
<view class="information">
<view class="image">
<image src="../../static/images/paycost03.png" class="icon"></image>
......@@ -44,7 +44,6 @@
</view>
</view>
</view>
</view>
</template>
<script>
......@@ -55,7 +54,11 @@
}
},
methods: {
onPayFree() {
uni.navigateTo({
url: '/pages/payCostProperty/index',
});
}
},
onLoad() {
......@@ -72,7 +75,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_pay_1686974451058.png');
}
.page {
......
......@@ -3,7 +3,7 @@
<view class="page">
<view class="property">
<view class="top">
<view class="user" style="background-image: url('../../static/images/bg_cost.png');">
<view class="user">
<view class="name">张一 15214525682</view>
<view class="add">十堰市张湾区汉江之星小区1栋1302</view>
</view>
......@@ -108,6 +108,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_cost_1686974784681.png');
border-radius: 16rpx;
padding: 40rpx;
......
......@@ -2,7 +2,7 @@
<view class="container">
<view class="page">
<view class="property">
<view class="user" style="background-image: url('../../static/images/bg_cost.png');">
<view class="user">
<view class="name">张一 15214525682</view>
<view class="add">十堰市张湾区汉江之星小区1栋1302</view>
</view>
......@@ -111,6 +111,7 @@
background-position: top center;
background-repeat: no-repeat;
background-size: cover;
background-image: url('http://220.203.25.212:9999/sys/common/static/scott/pic/bg_cost_1686974784681.png');
border-radius: 16rpx;
padding: 40rpx;
......
<template>
<view class="container">
<view class="page">
<view class="search">
<uni-search-bar placeholder="请输入您的小区名" bgColor="#EEEEEE" @confirm="search" />
<view class="list">
<view class="item" @click="onChangeUser(item)" v-for="item in houseList" :key="item.platformCode">
<image class="avatar" :src="item.employeeAvatar"></image>
<text class="name">{{item.employeeName}}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
getEmployeeListApi,
editCommunityComplaintApi
} from '@/config/api.js'
let maintenanceId = ''
export default {
data() {
return {
houseList: []
}
},
methods: {
async getPersonList() {
let phone = uni.getStorageSync('user_phone')
let {result} = await getEmployeeListApi()
this.houseList = result.filter(item=>item.employeePhone !== phone)
},
search(value) {
console.log(value)
},
onChangeUser(row) {
let _this = this
uni.showModal({
title: '提示',
content: `确认转单给${row.employeeName}嘛?`,
success: function (res) {
if (res.confirm) {
_this.onTransferOrder(row)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
async onTransferOrder(row) {
await editCommunityComplaintApi({
id: maintenanceId,
maintainerId: row.id,
maintenanceName: row.employeeName,
maintenancePhone: row.employeePhone
})
setTimeout(()=> {
uni.showToast({
title: '转单成功!',
icon: 'none'
});
setTimeout(()=> {
uni.navigateBack();
}, 1500)
}, 30)
var pages = getCurrentPages();
var page = pages[pages.length - 2];
page.$vm.onChangeTab('waitReceive')
}
},
onLoad(options) {
maintenanceId = options.id
this.getPersonList()
}
}
</script>
<style lang="scss" scoped>
.page {
padding: 15rpx;
background-color: #ffffff;
}
.search {
.list {
padding:20rpx 30rpx;
.item {
height: 84rpx;
line-height: 84rpx;
border-bottom: 1px solid #F8F6F9;
.avatar {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.name {
font-size: 28rpx;
font-weight: 400;
color: #373737;
}
}
}
}
</style>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<view class="container">
<p style="font-size:16px;font-weight: 600;text-align:center;margin-bottom:10px">《隐私政策》</p>
<p style="font-weight: 600;margin:3px 0;">引言</p>
<p>本平台(&ldquo;金路智云客户平台&rdquo;,http://www.goldcloudy.com/)重视访问者(包括但不限于通过有线或移动设备访问本平台的个人及企业,以下统称&ldquo;用户&rdquo;)的隐私。用户在使用本平台的服务时,本平台可能会收集和使用用户的相关信息。本平台希望通过本《隐私政策》向用户说明,在使用本平台的服务时,本平台如何收集、使用、储存和分享这些信息,以及本平台为用户提供的访问、更新、控制和保护这些信息的方式。本《隐私政策》与用户所使用的本平台服务息息相关,希望用户仔细阅读,在需要时,按照本《隐私政策》的指引,作出用户认为适当的选择。本《隐私政策》中涉及的相关技术词汇,本平台尽量以简明扼要的表述,并提供进一步说明的链接,以便用户的理解。&nbsp;<text style="font-weight: 600;">用户使用或继续使用本平台的服务,即意味着同意本平台按照本《隐私政策》收集、使用、储存和分享用户的相关信息。</text>&nbsp;如对本《隐私政策》或相关事宜有任何问题,请通过客服热线:4001-618-891与本平台联系。</p>
<p>本平台(&ldquo;湖北汉江之星科技有限公司&rdquo;,https://www.syjxgtjt.com/)重视访问者(包括但不限于通过有线或移动设备访问本平台的个人及企业,以下统称&ldquo;用户&rdquo;)的隐私。用户在使用本平台的服务时,本平台可能会收集和使用用户的相关信息。本平台希望通过本《隐私政策》向用户说明,在使用本平台的服务时,本平台如何收集、使用、储存和分享这些信息,以及本平台为用户提供的访问、更新、控制和保护这些信息的方式。本《隐私政策》与用户所使用的本平台服务息息相关,希望用户仔细阅读,在需要时,按照本《隐私政策》的指引,作出用户认为适当的选择。本《隐私政策》中涉及的相关技术词汇,本平台尽量以简明扼要的表述,并提供进一步说明的链接,以便用户的理解。&nbsp;<text style="font-weight: 600;">用户使用或继续使用本平台的服务,即意味着同意本平台按照本《隐私政策》收集、使用、储存和分享用户的相关信息。</text>&nbsp;如对本《隐私政策》或相关事宜有任何问题,请通过客服热线:4001-618-891与本平台联系。</p>
<p style="font-weight: 600;margin:3px 0;">未成年人的特别注意事项</p>
<p>如果用户未满18周岁,用户无权使用本平台服务,因此本平台希望用户不要向本平台提供任何个人信息。如果用户未满18周岁,用户只能在父母或监护人的陪同下才可以使用本平台服务。</p>
<p style="font-weight: 600;margin:3px 0;">本平台可能收集的信息</p>
......@@ -20,7 +20,6 @@
<p style="font-weight: 600;margin:3px 0;">用户如何访问和控制自己的个人信息</p>
<p>本平台将尽一切可能采取适当的技术手段,保证用户可以访问、更新和更正自己的注册信息或使用本平台的服务时提供的其他个人信息。在访问、更新、更正和删除前述信息时,本平台可能会要求用户进行身份验证,以保障账户安全。</p>
<em>本平台可能分享的信息</em>
<p>除以下情形外,未经用户同意,本平台以及本平台的关联公司不会与任何第三方分享用户的个人信息:本平台以及本平台的关联公司,可能将用户的个人信息与本平台的关联公司、合作伙伴及第三方服务供应商、承包商及代理(例如代表本平台发出电子邮件或推送通知的通讯服务提供商、为本平台提供位置数据的地图服务供应商)分享(他们可能并非位于用户所在的法域),用作下列用途:向用户提供本平台的服务;实现&ldquo;本平台可能如何使用信息&rdquo;部分所述目的;履行本平台在《金路智云电商平台交易总则》或本《隐私政策》中的义务和行使本平台的权利;理解、维护和改善本平台的服务。如本平台或本平台的关联公司与任何上述第三方分享用户的个人信息,本平台将努力确保该等第三方在使用用户的个人信息时遵守本《隐私政策》及本平台要求其遵守的其他适当的保密和安全措施。随着本平台业务的持续发展,本平台以及本平台的关联公司有可能进行合并、收购、资产转让或类似的交易,用户的个人信息有可能作为此类交易的一部分而被转移。本平台将在转移前通知用户。本平台或本平台的关联公司还可能为以下需要而保留、保存或披露用户的个人信息:;遵守适用的法律法规;遵守法院命令或其他法律程序的规定;遵守相关政府机关的要求;为遵守适用的法律法规、维护社会公共利益,或保护本平台的客户、本平台或本平台的集团公司、其他用户或雇员的人身和财产安全或合法权益所合理必需的用途。</p>
<p style="font-weight: 600;margin:3px 0;">信息安全</p>
<p>本平台仅在本《隐私政策》所述目的所必需的期间和法律法规要求的时限内保留用户的个人信息。 本平台使用各种安全技术和程序,以防信息的丢失、不当使用、未经授权阅览或披露。例如,在某些服务中,本平台将利用加密技术来保护用户提供的个人信息。但请用户理解,由于技术的限制以及可能存在的各种恶意手段,在互联网行业,即便竭尽所能加强安全措施,也不可能始终保证信息百分之百的安全。用户需要了解,用户接入本平台的服务所用的系统和通讯网络,有可能因本平台可控范围外的因素而出现问题。</p>
<p style="font-weight: 600;margin:3px 0;">用户分享的信息</p>
......@@ -32,7 +31,7 @@
<p style="font-weight: 600;margin:3px 0;">隐私政策的适用例外</p>
<p>本平台的服务可能包括或链接至第三方提供的社交媒体或其他服务(包括网站)。例如:本平台通过广告或本平台服务的其他方式向用户提供链接,使用户可以接入第三方的服务或网站。该等第三方社交媒体或其他服务可能由相关的第三方或本平台运营。用户使用该等第三方的社交媒体服务或其他服务(包括用户向该等第三方提供的任何个人信息),须受该第三方的服务条款及隐私政策(而非《通用服务条款》或本《隐私政策》)约束,用户需要仔细阅读其条款。本《隐私政策》仅适用于本平台所收集的信息,并不适用于任何第三方提供的服务或第三方的信息使用规则,本平台对任何第三方使用由用户提供的信息不承担任何责任。</p>
<p style="font-weight: 600;margin:3px 0;">隐私政策的适用范围</p>
<p>除某些特定服务外,本平台所有的服务均适用本《隐私政策》。这些特定服务将适用特定的隐私政策。针对某些特定服务的特定隐私政策,将更具体地说明本平台在该等服务中如何使用用户的信息。该特定服务的隐私政策构成本《隐私政策》的一部分。&nbsp;如相关特定服务的隐私政策与本《隐私政策》有不一致之处,适用该特定服务的隐私政策。除本《隐私政策》另有规定外,本《隐私条款》所用词语将与《金路智云客户平台交易总则》所定义的词语具有相同的涵义。</p>
<p>除某些特定服务外,本平台所有的服务均适用本《隐私政策》。这些特定服务将适用特定的隐私政策。针对某些特定服务的特定隐私政策,将更具体地说明本平台在该等服务中如何使用用户的信息。该特定服务的隐私政策构成本《隐私政策》的一部分。&nbsp;如相关特定服务的隐私政策与本《隐私政策》有不一致之处,适用该特定服务的隐私政策。除本《隐私政策》另有规定外,本《隐私条款》所用词语将与《湖北汉江之星科技有限公司交易总则》所定义的词语具有相同的涵义。</p>
<p style="font-weight: 600;margin:3px 0;">变更</p>
<p>本平台可能适时修订本《隐私政策》的条款,该等修订构成本《隐私政策》的一部分。如该等修订造成用户在本《隐私政策》下权利的实质减少,本平台将在修订生效前通过在主页上显著位置提示或以其他方式通知用户。在该种情况下,若用户继续使用本平台的服务,即表示同意受经修订的本《隐私政策》的约束。</p>
</view>
......
<template>
<view class="container-page">
<view class="information">
<view class="form-item-text" v-if="repairDetail.repairStatus === 'inRepair' || repairDetail.repairStatus === 'finishRefuse'">
<view class="title">问题图片(最多传三张)</view>
<view class="upload">
<uni-file-picker v-model="repairPhoto" file-mediatype="image" limit="3" @select="onSelectImage"></uni-file-picker>
</view>
</view>
<view class="content">
<view class="item">
<view class="name">报修主题</view>
<view class="detail">{{repairDetail.repairTitle || ''}}</view>
</view>
<view class="item">
<view class="name">报修位置</view>
<view class="detail">{{repairDetail.repairAddress || ''}}</view>
</view>
<view class="item">
<view class="name">报修物品</view>
<view class="detail">{{repairDetail.repairArticle || ''}}</view>
</view>
<view class="item">
<view class="name">报修人</view>
<view class="detail">{{repairDetail.ownerName || ''}}</view>
</view>
<view class="item text">
<view class="name">联系方式</view>
<view class="detail">{{repairDetail.ownerPhone || ''}}</view>
</view>
<view class="item text">
<view class="name">预约上门时间</view>
<view class="detail">{{repairDetail.reservationTime || ''}}</view>
</view>
<view class="item">
<view class="name">状态</view>
<view class="detail" :class="repairDetail.color"><view class="tag">{{repairDetail.statusName}}</view></view>
</view>
<view class="item text">
<view class="name">问题描述</view>
<view class="detail">{{repairDetail.repairDesc || ''}}</view>
</view>
<view class="item text" v-if="repairDetail.complaintImg && repairDetail.complaintImg.length">
<view class="name">附件</view>
<view class="image">
<image v-for="(item,index) in repairDetail.complaintImg" :key="index" :src="item" class="icon"></image>
</view>
</view>
</view>
</view>
<view class="button-box" v-if="repairDetail.repairStatus === 'waitReceive'">
<view class="btn receiving" @click="onSubmit">转单</view>
<view class="btn ransfer" @click="onSubmit">接单</view>
</view>
<view class="button-box" v-if="repairDetail.repairStatus === 'inRepair' || repairDetail.repairStatus === 'finishRefuse'">
<view class="btn receiving" @click="onSubmit">完成</view>
</view>
</view>
</template>
<script>
import {
uploadFile,
getCommunityRepairDetailApi,
editCommunityComplaintApi
} from '@/config/api.js'
import serverConfig from "@/config/server_config.js";
const statusList = {
initiateWaitAudit: { name: '待维修', color: 'green' }, // 待审核
waitDispatch: { name: '待维修', color: 'green' }, // 带派单
waitReceive: { name: '待维修', color: 'green' }, // 待接单
initiateRefuse: { name: '已驳回', color: 'red' }, // 提单驳回
finishRefuse: { name: '回单驳回', color: 'red' }, // 回单驳回
inRepair: { name: '维修中', color: 'blue' }, // 维修中
finishWaitAudit: { name: '回单待审核', color: 'blue' }, // 回单待审核
finishAuditPass: { name: '已完成', color: 'gray' } // 完成
}
export default {
data() {
return {
repairDetail: {},
repairPhoto: []
}
},
methods: {
async getDetail(id) {
let {result} = await getCommunityRepairDetailApi({id})
this.repairDetail = {
...result,
statusName: statusList[result.repairStatus].name,
color: statusList[result.repairStatus].color,
complaintImg: result.maintenancePhoto ? result.maintenancePhoto.split(',') : []
}
},
uploadImage(path) {
return new Promise((resolve, reject)=> {
uploadFile({
filePath: path,
name: 'file',
formData: { //其他需要携带的参数
'biz': 'scott/pic'
}
}).then(({message})=> {
resolve(message)
}).catch(err=> {
reject(err)
})
})
},
// // 选择上传触发函数
onSelectImage(e) {
let serveList = []
e.tempFilePaths.forEach(url=> {
serveList.push(this.uploadImage(url))
})
Promise.all(serveList).then(data=> {
let list = data.map(url=> {
return serverConfig.baseURL + '/sys/common/static/' + url
})
this.repairPhoto = this.repairPhoto.concat(list)
setTimeout(()=> {
uni.showToast({
title: '上传成功!',
icon: 'none'
});
}, 30)
}).catch(err=> {
setTimeout(()=> {
uni.showToast({
title: '上传失败,请重试!',
icon: 'none'
});
}, 30)
})
},
async onSubmit() {
// if(!this.repairPhoto.length) {
// uni.showToast({
// title: '请上传维修成功照片!',
// icon: 'none'
// });
// return
// }
await editCommunityComplaintApi({
maintenancePhoto: this.repairPhoto.join(','),
id: this.repairDetail.id,
repairStatus: 'finishWaitAudit'
})
setTimeout(()=> {
uni.showToast({
title: '提交成功,正在审核!',
icon: 'none'
});
setTimeout(()=> {
uni.switchTab({
url: '/pages/home/index'
});
}, 1500)
}, 30)
}
},
onLoad(options) {
this.getDetail(options.id)
},
onShow() {
}
}
</script>
<style lang="scss" scoped>
.container-page {
box-sizing: border-box;
min-height: 100vh;
background-color: #F8F6F9;
padding: 30rpx;
}
.information {
background-color: #ffffff;
border-radius: 16rpx;
padding: 0 30rpx;
box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
.form-item-text {
padding-top: 30rpx;
.title {
font-size: 28rpx;
font-weight: 400;
color: #373737;
}
.upload {
padding: 30rpx 0;
border-bottom: 1rpx solid #F0F0F2;
}
}
.content {
padding: 30rpx 0;
.item {
display: flex;
&:not(:last-child) {
margin-bottom: 26rpx;
}
.name {
width: 35%;
font-size: 28rpx;
color: #CECED3;
}
.detail {
width: 65%;
font-size: 28rpx;
color: #373737;
&.green .tag {
color: #F1BD4D;
border: 1px solid #F1BD4D;
background-color: #FFFCF6;
}
&.red .tag {
color: #F42E2E;
border: 1px solid #F42E2E;
background-color: #FFF5F5;
}
&.blue .tag {
color: #6A59F2;
border: 1px solid #6A59F2;
background-color: #F6F5FF;
}
&.gray .tag {
color: #B6B6BA;
border: 1px solid #B6B6BA;
background-color: #F8F8F8;
}
.tag {
height: 40rpx;
line-height: 40rpx;
font-size: 22rpx;
padding: 2rpx 20rpx;
border-radius: 30rpx;
display: inline-block;
}
}
}
.text {
height: auto;
.detail {
line-height: 52rpx;
}
.image {
display: flex;
.icon {
width: 120rpx;
height: 120rpx;
border-radius: 10rpx;
margin-right: 10rpx;
}
}
}
}
}
.button-box {
margin-top: 60rpx;
.btn {
height: 80rpx;
border-radius: 40rpx;
text-align: center;
line-height: 80rpx;
font-size: 28rpx;
&.receiving {
background-color: #6A59F2;
color: #FFFFFF;
}
&.ransfer {
background-color: #FFFFFF;
border: 1rpx solid #B5B8ED;
box-shadow: 0rpx 0rpx 25rpx 0rpx rgba(81,89,234,0.06);
color: #6A59F2;
margin-top: 30rpx;
}
}
}
</style>
\ No newline at end of file
/* 简易版的moment.js
* new Moment() // 返回当前的时间对象
*
* new Moment().unix() // 返回当前时间的秒数
* new Moment().unix() // 返回当前时间的秒数
*
* Moment.unix(timestamp) // 传入秒数,返回传入秒数的时间对象
* Moment.unix(timestamp) // 传入豪秒数,返回传入豪秒数的时间对象
*
* new Moment().format('YYYY-MM-DD dd HH:mm:ss') // 返回值 2017-06-22 四 19:46:14
*
......@@ -18,11 +18,11 @@ export const Moment = class Moment {
}
static unix(timestamp) {
return new Moment(timestamp * 1000)
return new Moment(timestamp)
}
unix() {
return Math.round(this.date.getTime() / 1000)
return Math.round(this.date.getTime())
}
format(formatStr) {
......
......@@ -35,3 +35,9 @@ export const hasPerm = perm=> {
const hasExsit = perm ? btnPermList.includes(perm) : true;
return hasExsit
}
/* 是否电话号码 */
export const isMoble = phone=> {
const reg = /^1(3|4|5|7|8)\d{9}$/
return reg.test(phone)
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论