|
@@ -4,41 +4,73 @@
|
|
<block v-if="datainfo.length>0">
|
|
<block v-if="datainfo.length>0">
|
|
<!-- 人员管理 -->
|
|
<!-- 人员管理 -->
|
|
<block v-if="type=='people'">
|
|
<block v-if="type=='people'">
|
|
- <view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail">
|
|
|
|
|
|
+ <view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
|
|
<view class="ctop flexc">
|
|
<view class="ctop flexc">
|
|
- <image :src="hicoa" class="imgs" v-if="ite.type==1"></image>
|
|
|
|
- <image :src="hicob" class="imgs" v-if="ite.type==2"></image>
|
|
|
|
- <view class="tit">一号楼3单元1101</view>
|
|
|
|
|
|
+ <image :src="house" class="imgs" v-if="ite.houseStatus==1"></image>
|
|
|
|
+ <image :src="housea" class="imgs" v-if="ite.houseStatus==2"></image>
|
|
|
|
+ <image :src="houseb" class="imgs" v-if="ite.houseStatus==3"></image>
|
|
|
|
+ <image :src="housec" class="imgs" v-if="ite.houseStatus==4"></image>
|
|
|
|
+ <!-- <image :src="hicoa" class="imgs" v-if="ite.type==1"></image>
|
|
|
|
+ <image :src="hicob" class="imgs" v-if="ite.type==2"></image> -->
|
|
|
|
+ <view class="tit">{{ite.detailedAddress}}</view>
|
|
<view class="flex1"></view>
|
|
<view class="flex1"></view>
|
|
- <view class="txt ca" v-if="ite.type==1">业主</view>
|
|
|
|
- <view class="txt cb" v-if="ite.type==2">租户</view>
|
|
|
|
|
|
+ <!-- <view class="txt ca" v-if="ite.type==1">业主</view>
|
|
|
|
+ <view class="txt cb" v-if="ite.type==2">租户</view> -->
|
|
|
|
+ <view class="txt ca" v-if="ite.houseStatus==1">自住</view>
|
|
|
|
+ <view class="txt cb" v-if="ite.houseStatus==2">出租</view>
|
|
|
|
+ <view class="txt cc" v-if="ite.houseStatus==3">空闲</view>
|
|
|
|
+ <view class="txt co6" v-if="ite.houseStatus==4">代售</view>
|
|
</view>
|
|
</view>
|
|
<view class="plists">
|
|
<view class="plists">
|
|
- <view class="plist flexc">
|
|
|
|
- <image :src="man" class="head" v-if="ite.sex==0"></image>
|
|
|
|
- <image :src="woman" class="head" v-else></image>
|
|
|
|
- <view class="flex1">
|
|
|
|
- <view class="ptit">张伟<view class="btn btnc ml10" v-if="ite.hzflag">户主</view></view>
|
|
|
|
- <view class="ptxt">身份证号 | 41072719880603022X</view>
|
|
|
|
- <view class="flexc">
|
|
|
|
- <view class="ptxt">性别 | {{ite.sex==0?'男':'女'}}</view>
|
|
|
|
- <view class="ptxt">年龄 | 36岁</view>
|
|
|
|
|
|
+ <block v-for="(aite,aidx) in ite.residentInfoList">
|
|
|
|
+ <view class="flexc pr mb12" :key="`peo${aidx}`" v-if="aidx==0" @click="getDetail(aite.residentId)"
|
|
|
|
+ :data-idx="idx" :data-aidx="aidx" data-type="peo"
|
|
|
|
+ @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+aite.right+'px'"
|
|
|
|
+ >
|
|
|
|
+ <view class="plist flexc">
|
|
|
|
+ <image :src="man" class="head" v-if="aite.residentGender==1"></image>
|
|
|
|
+ <image :src="woman" class="head" v-else></image>
|
|
|
|
+ <view class="flex1">
|
|
|
|
+ <view class="ptit">{{aite.residentName}}
|
|
|
|
+ <view class="btn btnc ml10" v-if="aite.isHouseholder=='Y'">户主</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="ptxt">身份证号 | {{aite.residentIdCard}}</view>
|
|
|
|
+ <view class="flexc">
|
|
|
|
+ <view class="ptxt">性别 | {{aite.residentGender==1?'男':'女'}}</view>
|
|
|
|
+ <view class="ptxt">年龄 | {{getAgeFromID(aite.residentIdCard)}}岁</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flexc" v-if="aite.residentAppearance">
|
|
|
|
+ <view class="ptxt">人员面貌 | {{kaType(aite.residentAppearance,rymmList)}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="plist flexc" v-if="ite.zhanflag">
|
|
|
|
- <image :src="man" class="head" v-if="ite.sex==0"></image>
|
|
|
|
- <image :src="woman" class="head" v-else></image>
|
|
|
|
- <view class="flex1">
|
|
|
|
- <view class="ptit">张伟<view class="btn btnc ml10" v-if="ite.hzflag">户主</view></view>
|
|
|
|
- <view class="ptxt">身份证号 | 41072719880603022X</view>
|
|
|
|
- <view class="flexc">
|
|
|
|
- <view class="ptxt">性别 | {{ite.sex==0?'男':'女'}}</view>
|
|
|
|
- <view class="ptxt">年龄 | 36岁</view>
|
|
|
|
|
|
+ <view class="flexc pr mb12" :key="`peo${aidx}`" v-if="aidx>0&&ite.zhanflag" @click="getDetail(aite.residentId)"
|
|
|
|
+ :data-idx="idx" :data-aidx="aidx" data-type="peo"
|
|
|
|
+ @touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+aite.right+'px'"
|
|
|
|
+ >
|
|
|
|
+ <view class="plist flexc">
|
|
|
|
+ <image :src="man" class="head" v-if="aite.residentGender==1"></image>
|
|
|
|
+ <image :src="woman" class="head" v-else></image>
|
|
|
|
+ <view class="flex1">
|
|
|
|
+ <view class="ptit">{{aite.residentName}}
|
|
|
|
+ <view class="btn btnc ml10" v-if="aite.isHouseholder=='Y'">户主</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="ptxt">身份证号 | {{aite.residentIdCard}}</view>
|
|
|
|
+ <view class="flexc">
|
|
|
|
+ <view class="ptxt">性别 | {{aite.residentGender==1?'男':'女'}}</view>
|
|
|
|
+ <view class="ptxt">年龄 | {{getAgeFromID(aite.residentIdCard)}}岁</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="flexc" v-if="aite.residentAppearance">
|
|
|
|
+ <view class="ptxt">人员面貌 | {{kaType(aite.residentAppearance,rymmList)}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <view class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <image :src="upimg" :class="ite.zhanflag?'act':''" class="upimg" @click="getZhan(idx)"></image>
|
|
|
|
|
|
+ </block>
|
|
|
|
+ <image :src="upimg" v-if="ite.residentInfoList.length>1" :class="ite.zhanflag?'act':''" class="upimg" @click="getZhan(idx)"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
@@ -164,10 +196,20 @@
|
|
default () {
|
|
default () {
|
|
return ''
|
|
return ''
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ rymmList:{//人员面貌
|
|
|
|
+ type:Array,
|
|
|
|
+ default () {
|
|
|
|
+ return []
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
|
|
+ house:require("@/work/static/manage/house.png"),
|
|
|
|
+ housea:require("@/work/static/manage/housea.png"),
|
|
|
|
+ houseb:require("@/work/static/manage/houseb.png"),
|
|
|
|
+ housec:require("@/work/static/manage/housec.png"),
|
|
noiconpimg:require("@/static/nodata.png"),
|
|
noiconpimg:require("@/static/nodata.png"),
|
|
car:require("@/car/static/car/car.png"),
|
|
car:require("@/car/static/car/car.png"),
|
|
cara:require("@/car/static/car/cara.png"),
|
|
cara:require("@/car/static/car/cara.png"),
|
|
@@ -185,7 +227,6 @@
|
|
neye:require("@/people/static/people/neye.png"),
|
|
neye:require("@/people/static/people/neye.png"),
|
|
time:require("@/work/static/manage/time.png"),
|
|
time:require("@/work/static/manage/time.png"),
|
|
house:require("@/work/static/manage/house.png"),
|
|
house:require("@/work/static/manage/house.png"),
|
|
- housea:require("@/work/static/manage/housea.png"),
|
|
|
|
home:require("@/service/static/service/home.png"),
|
|
home:require("@/service/static/service/home.png"),
|
|
upimg:require("@/static/images/home/up.png"),
|
|
upimg:require("@/static/images/home/up.png"),
|
|
star:require('@/manage/static/community/star.png'),
|
|
star:require('@/manage/static/community/star.png'),
|
|
@@ -202,6 +243,26 @@
|
|
kaType(data, list) {
|
|
kaType(data, list) {
|
|
return selectDictValue(list, data);
|
|
return selectDictValue(list, data);
|
|
},
|
|
},
|
|
|
|
+ getAgeFromID(idNumber) {
|
|
|
|
+ if(idNumber){
|
|
|
|
+ const birthDateStr = idNumber.substring(6, 14);
|
|
|
|
+ const birthYear = parseInt(birthDateStr.substring(0, 4));
|
|
|
|
+ const birthMonth = parseInt(birthDateStr.substring(4, 6));
|
|
|
|
+ const birthDay = parseInt(birthDateStr.substring(6, 8));
|
|
|
|
+
|
|
|
|
+ const today = new Date();
|
|
|
|
+ const currentYear = today.getFullYear();
|
|
|
|
+ const currentMonth = today.getMonth() + 1;
|
|
|
|
+ const currentDay = today.getDate();
|
|
|
|
+
|
|
|
|
+ let age = currentYear - birthYear;
|
|
|
|
+ if (currentMonth < birthMonth || (currentMonth === birthMonth && currentDay < birthDay)) {
|
|
|
|
+ age--;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return age;
|
|
|
|
+ }
|
|
|
|
+ },
|
|
getDetail(e){
|
|
getDetail(e){
|
|
this.$emit('getDetail',e)
|
|
this.$emit('getDetail',e)
|
|
},
|
|
},
|
|
@@ -213,12 +274,6 @@
|
|
},
|
|
},
|
|
getDelFn(e){
|
|
getDelFn(e){
|
|
var that=this;
|
|
var that=this;
|
|
- var id=''
|
|
|
|
- if(this.tabval==1){
|
|
|
|
- id=e.reservRecordId
|
|
|
|
- }else{
|
|
|
|
- id=e.visitorManageId
|
|
|
|
- }
|
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '确认删除',
|
|
title: '确认删除',
|
|
content: "是否确认删除",
|
|
content: "是否确认删除",
|
|
@@ -226,7 +281,7 @@
|
|
confirmText: '确认',
|
|
confirmText: '确认',
|
|
success: function(res) {
|
|
success: function(res) {
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
- that.$emit('getDelFn',id)
|
|
|
|
|
|
+ that.$emit('getDelFn',e)
|
|
} else if (res.cancel) {
|
|
} else if (res.cancel) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -262,12 +317,18 @@
|
|
},
|
|
},
|
|
//触摸滑动
|
|
//触摸滑动
|
|
drawMove(e) {
|
|
drawMove(e) {
|
|
- // console.log("滑动");
|
|
|
|
|
|
+ var idx=e.currentTarget.dataset.idx
|
|
|
|
+ var aidx=e.currentTarget.dataset.aidx
|
|
|
|
+ var type=e.currentTarget.dataset.type;
|
|
for (var index in this.datainfo) {
|
|
for (var index in this.datainfo) {
|
|
- // this.csListArrl[index].right=0
|
|
|
|
- this.$set(this.datainfo[index],'right',0);
|
|
|
|
|
|
+ if(type&&type=='peo'){
|
|
|
|
+ for(var i in this.datainfo[idx].residentInfoList){
|
|
|
|
+ this.$set(this.datainfo[idx].residentInfoList[i],'right',0);
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(this.datainfo[index],'right',0);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- var idx=e.currentTarget.dataset.idx
|
|
|
|
var touch = e.touches[0];
|
|
var touch = e.touches[0];
|
|
var item = this.datainfo[idx];
|
|
var item = this.datainfo[idx];
|
|
var disX = this.startX - touch.clientX;
|
|
var disX = this.startX - touch.clientX;
|
|
@@ -275,8 +336,13 @@
|
|
if (disX > this.delBtnWidth) {
|
|
if (disX > this.delBtnWidth) {
|
|
disX = this.delBtnWidth;
|
|
disX = this.delBtnWidth;
|
|
}
|
|
}
|
|
|
|
+ if(type&&type=='peo'){
|
|
|
|
+ this.$set(this.datainfo[idx].residentInfoList[aidx],'right',disX);
|
|
|
|
+ }else{
|
|
|
|
+ this.$set(this.datainfo[idx],'right',disX);
|
|
|
|
+ }
|
|
// this.csListArrl[idx].right=disX
|
|
// this.csListArrl[idx].right=disX
|
|
- this.$set(this.datainfo[idx],'right',disX);
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
// this.csListArrl[idx].right=0
|
|
// this.csListArrl[idx].right=0
|
|
this.$set(this.datainfo[idx],'right',0);
|
|
this.$set(this.datainfo[idx],'right',0);
|
|
@@ -289,7 +355,7 @@
|
|
var item = this.datainfo[idx];
|
|
var item = this.datainfo[idx];
|
|
if (item.right >= this.delBtnWidth / 2) {
|
|
if (item.right >= this.delBtnWidth / 2) {
|
|
// this.datainfo[idx].right=this.delBtnWidth
|
|
// this.datainfo[idx].right=this.delBtnWidth
|
|
- this.$set(this.datainfo[idx],'right',this.delBtnWidth);
|
|
|
|
|
|
+ // this.$set(this.datainfo[idx],'right',this.delBtnWidth);
|
|
} else {
|
|
} else {
|
|
this.datainfo[idx].right=0
|
|
this.datainfo[idx].right=0
|
|
}
|
|
}
|
|
@@ -341,7 +407,7 @@ font-size: 26rpx;color: #272727;display: flex;line-height: 34rpx;
|
|
.imgs{margin-right: 16rpx !important;}
|
|
.imgs{margin-right: 16rpx !important;}
|
|
.tit{font-size: 28rpx !important;}
|
|
.tit{font-size: 28rpx !important;}
|
|
.plists{padding: 30rpx 24rpx 6rpx;
|
|
.plists{padding: 30rpx 24rpx 6rpx;
|
|
- .plist{background: linear-gradient(-90deg, #F2F5FF 0%, #FBFDFF 100%);border-radius: 20rpx;border: 2rpx solid #E6E6E6;margin-bottom: 24rpx;padding: 18rpx 26rpx 4rpx;
|
|
|
|
|
|
+ .plist{background: linear-gradient(-90deg, #F2F5FF 0%, #FBFDFF 100%);border-radius: 20rpx;border: 2rpx solid #E6E6E6;padding: 18rpx 26rpx 4rpx;width: 100%;z-index: 1;
|
|
.head{width: 96rpx;height: 98rpx;margin-right: 32rpx;flex: 0 0 auto;}
|
|
.head{width: 96rpx;height: 98rpx;margin-right: 32rpx;flex: 0 0 auto;}
|
|
.ptit{font-weight: bold;font-size: 30rpx;color: #272727;display: flex;align-items: center;margin-bottom: 14rpx;}
|
|
.ptit{font-weight: bold;font-size: 30rpx;color: #272727;display: flex;align-items: center;margin-bottom: 14rpx;}
|
|
.ptxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 14rpx;min-width: 176rpx;}
|
|
.ptxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;margin-bottom: 14rpx;min-width: 176rpx;}
|