zouling пре 3 месеци
родитељ
комит
be9ac93538

+ 58 - 0
user_ui/api/work/news.js

@@ -39,3 +39,61 @@ export function suggestionlDet(data) {
   })
 }
 
+// 评论-新增wuYe:commentIndex:add
+export function commentIndex(data) {
+  return request({
+    url: '/wuYe/commentIndex',
+    method: 'post',
+    'data': data
+  })
+}
+// 进行点赞操作
+export function giveTheThumbs(data) {
+  return request({
+    url: '/wuYe/commentLikes/giveTheThumbs',
+    method: 'post',
+    'data': data
+  })
+}
+// 进行收藏操作
+export function getStars(data) {
+  return request({
+    url: '/wuYe/commentStars/getStars',
+    method: 'post',
+    'data': data
+  })
+}
+//评论-列表父集
+//根据查询所有一级评论组带子集总数组装成前端所需要的数据结构 带分页
+export function getRootComment(data) {
+  return request({
+    url: '/wuYe/commentIndex/getRootComment',
+    method: 'post',
+    'data': data
+  })
+}
+// 列表子集
+//根据parent_id查询所有评论组装成前端所需要的子集数据结构 带分页
+export function getParentComment(data) {
+  return request({
+    url: '/wuYe/commentIndex/getParentComment',
+    method: 'post',
+    'data': data
+  })
+}
+// 审核列表wuYe:commentIndex:commentSh
+export function commentSh(data) {
+  return request({
+    url: '/wuYe/commentIndex/commentSh',
+    method: 'get',
+    'data': data
+  })
+}
+// 评论-审核wuYe:commentContent:edit
+export function commentContentPut(data) {
+  return request({
+    url: '/wuYe/commentContent/put',
+    method: 'post',
+    'data': data
+  })
+}

+ 39 - 0
user_ui/api/work/people.js

@@ -76,4 +76,43 @@ export function reservDel(data) {
     url: '/wuYe/reservRecord/delete/'+data,
     method: 'get',
   })
+}
+
+// 居住人员-列表wuYe:residentInfo:list
+export function residentInfoList(data) {
+  return request({
+    url: '/wuYe/residentInfo/list',
+    method: 'get',
+    data: data
+  })
+}
+// 居住人员-详情wuYe:residentInfo:query
+export function residentInfoDet(data) {
+  return request({
+    url: '/wuYe/residentInfo/'+data,
+    method: 'get',
+  })
+}
+// 居住人员-新增wuYe:residentInfo:add
+export function residentInfoAdd(data) {
+  return request({
+    url: '/wuYe/residentInfo',
+    method: 'post',
+    data: data
+  })
+}
+// 居住人员-修改wuYe:residentInfo:edit
+export function residentInfoPut(data) {
+  return request({
+    url: '/wuYe/residentInfo/put',
+    method: 'post',
+    data: data
+  })
+}
+// 居住人员-删除wuYe:residentInfo:remove
+export function residentInfoDel(data) {
+  return request({
+    url: '/wuYe/residentInfo/delete/'+data,
+    method: 'get',
+  })
 }

+ 295 - 0
user_ui/health/pages/health/add - 副本.vue

@@ -0,0 +1,295 @@
+<template>
+	<view class="check" :style="'padding-top:'+nvaHeight+'px;'">
+		<view class="navbox">
+			<uni-nav-bar  color="#ffffff" left-icon="left" title="健康档案"  :background-color="backgroundColor" :border="false" statusBar='true' fixed="true" @clickLeft="getBackFn">
+			</uni-nav-bar>
+		</view>
+		<uni-forms ref="form" :model="datainfo">
+			<view class="cbox">
+				<view class="chmain">
+					<view class="plr6">
+						<view class="rztit">请上传身份证照片</view>
+						<view class="flexcj mb10">
+							<view class="carbox" @click="getaddImage('front')">
+								<image :src="baseUrl+datainfo.front" class="img" v-if="datainfo.front"></image>
+								<image :src="cardz" class="img" v-else></image>
+								<view class="tit">拍摄人像面</view>
+								<!-- <view class="tit">身份证正面</view> -->
+							</view>
+							<view class="carbox" @click="getaddImage('back')">
+								<image :src="baseUrl+datainfo.back" class="img" v-if="datainfo.back"></image>
+								<image :src="cardf" class="img" v-else></image>
+								<view class="tit">拍摄国徽面</view>
+								<!-- <view class="tit">身份证反面</view> -->
+							</view>
+						</view>
+						<view class="mb4">
+							<view class="cardtip">身份信息会根据上传的证件照片自动识别,支持手动输入。</view>
+							<view class="cardtip">如果识别错误,可尝试再次拍照。</view>
+						</view>
+					</view>
+					<uni-forms-item label="身份证号" required name="phonenumber">
+						<view class="flexc">
+							<uni-easyinput disabled v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="姓名" required name="phonenumber">
+						<view class="flexc">
+							<uni-easyinput disabled v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="性别" required name="phonenumber">
+						<view class="flexc">
+							<uni-easyinput disabled v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="家庭地址" required name="phonenumber">
+						<view class="flexc">
+							<uni-easyinput disabled  v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+						</view>
+					</uni-forms-item>
+					<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+						<uni-forms-item label="与户主关系" required name="phonenumber">
+							<view class="flexc ml10">
+								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'选择与户主关系'}}</view>
+							</view>
+						</uni-forms-item>
+					</picker>
+					<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+						<uni-forms-item label="是否党员" required name="phonenumber">
+							<view class="flexc ml10">
+								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择是/否'}}</view>
+							</view>
+						</uni-forms-item>
+					</picker>
+					<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+						<uni-forms-item label="特殊类型" name="phonenumber">
+							<view class="flexc ml10">
+								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'如有五保户等特殊类型,请选择'}}</view>
+							</view>
+						</uni-forms-item>
+					</picker>
+					<uni-forms-item label="兴趣爱好" name="phonenumber">
+						<view class="flexc ml10">
+							<uni-easyinput type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="请输入兴趣爱好" />
+						</view>
+					</uni-forms-item>
+					
+					<uni-forms-item label="上传头像" name="phonenumber">			
+						<view class="flexe mt10">
+							<view class="addimgs">
+								<view class="assimg">
+									<image :src="aphoto" class="img"></image>
+									<image :src="rdelimg" class="delimg" @click="getDelFn"></image>
+								</view>
+							</view>
+							<view class="addbox">
+								<image :src="aphoto"></image>
+								<view>添加头图</view>
+							</view>
+						</view>	
+					</uni-forms-item>
+				</view>
+				<view class="rhbtn mt30 bga" @click="getNext">提交</view>
+			</view>
+		</uni-forms>
+		
+
+		<loading></loading>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	import {
+		checkPermi,
+		checkRole
+	} from "@/utils/permission"; // 权限判断函数
+	import {
+		uploadIdentify
+	} from '@/utils/common.js'
+	export default {
+		components: {},
+		data() {
+			return {
+				cardz:require('@/health/static/health/cardz.png'),
+				cardf:require('@/health/static/health/cardf.png'),
+				aphoto: require('@/work/static/service/photo.png'),
+				rdelimg: require('@/work/static/service/rdel.png'),
+				baseUrl: config.baseUrl,
+				checkflag:true,
+				nvaHeight:44,
+				backgroundColor: "transparent",
+				datainfo: {
+					sex:0,
+					realName: '',
+					idCard: '',
+					address: '',
+					expirationDate: '',
+					phonenumber: '',
+					front: '',
+					back: '',
+				},
+				syqxidx:'',
+				sexs: [{
+					text: '男',
+					value: 0
+				}, {
+					text: '女',
+					value: 1
+				}],
+			}
+		},
+		onLoad: function() {
+			uni.getSystemInfo({
+				success: (e) => {
+					this.nvaHeight = Number(e.statusBarHeight)+44;
+				}
+			})
+		},
+		onPageScroll(e) {
+			var scrollTop = Number(e.scrollTop);
+			if (scrollTop > 0) {
+				this.backgroundColor = '#48CC9A'
+			} else {
+				this.backgroundColor = 'transparent'
+			}
+		},
+		methods: {
+			checkPermi,
+			checkRole,
+			getBackFn(){
+				uni.navigateBack({
+					delta:1
+				})
+			},
+			bindDateChange(e){
+				var val=e.detail.value;
+				// this.datainfo.applicationBank=this.sdyhlist[val].value;
+				// this.applicationBank=this.sdyhlist[val].label;
+			},
+			getaddImage(e) {
+				let that = this;
+				// var rs=['D:\\idcard.png']
+				// if(rs&&rs.length>0){
+				// 	var obj={
+				// 		type:e,
+				// 		// url:baseUrl+rs.join(',')
+				// 		url:rs.join(',')
+				// 	}
+				// 	that.getOcrIdCard(obj)
+				// }
+				// return
+				let file = [],
+					count = 9
+				uni.chooseImage({
+					count: 1,
+					success: function(res) {
+						let img = res.tempFilePaths;
+						if (img.length + file.length > count) {
+							uni.showToast({
+								title: '最多上传' + count + '张图片',
+								icon: 'none',
+								duration: 2000
+							})
+						} else {
+							let imglen = res.tempFilePaths.length;
+							var fuwufile = [];
+							uploadIdentify('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
+								var resurl = rs[0];
+								if (e == 'front') {
+									that.datainfo.front = resurl.fileName;
+								} else {
+									that.datainfo.back = resurl.fileName;
+								}
+								if (rs && rs.length > 0) {
+									var obj = {
+										type: e,
+										url: resurl.urlOnline
+									}
+									that.getOcrIdCard(obj)
+								}
+							})
+						}
+					}
+				});
+			},
+			getOcrIdCard(obj) {
+				var params = {
+					image: obj.url,
+					idCardSide: obj.type
+				}
+				getOcrIdCard(params).then(res => {
+					if (res.code == 200) {
+						var datainfo = res.data;
+						if (obj.type == 'front') {
+							this.datainfo.realName = datainfo.realName;
+							this.datainfo.idCard = datainfo.idCard;
+							this.datainfo.address = datainfo.address;
+						} else {
+							this.datainfo.expirationDate = datainfo.expirationDate
+						}
+					}
+				})
+			}
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+	.bga{background-color: #46CB99;}
+.check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
+// .check .cbox /deep/ .uni-forms-item:last-child{border: none;}
+.check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}
+.check /deep/ .uni-easyinput{flex: 1;text-align: right;font-size: 26rpx;color: #222327;}
+.check /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;}
+.check /deep/ .uni-easyinput__placeholder-class{font-size: 26rpx;color: #AAAAAA;}
+.check /deep/ .uni-input-input{font-size: 26rpx;}
+.check /deep/ .uni-textarea-textarea{font-size: 26rpx;}
+.check /deep/ .is-disabled{color: #222327;background-color: #ffffff !important;}
+.check /deep/ .uni-data-checklist .checklist-group .checklist-box{margin:10rpx 8rpx 10rpx 16rpx;}
+.check /deep/ .uni-data-checklist{flex: 0 0 auto;}
+.check /deep/ .is-required{font-size: 26rpx;color: #F40027;margin-right: 4rpx;}
+.check{background: linear-gradient(180deg, #45CB99 0%, rgba(238,227,197,0) 100%) no-repeat;background-size: 100% 782rpx;min-height: 100vh;box-sizing: border-box;padding: 0 18rpx 22rpx;}
+.cbox{background: #FFFFFF;border-radius: 20rpx;flex: 1;padding: 30rpx 24rpx 46rpx;
+	.chmain{
+		padding: 0 8rpx;
+		.upbox{height: 224rpx;background: #EFF4FF;border-radius: 20rpx;display: flex;align-items: center;justify-content: center;flex-direction: column;margin-bottom: 8rpx;overflow: auto;
+			.img{width: 100%;height: 100%;}
+			.addimg{width: 70rpx;height: 70rpx;margin-bottom: 16rpx;}
+			view{font-weight: bold;font-size: 26rpx;color: #4C6686;}
+		}
+		.rimg{width: 16rpx;height: 28rpx;flex: 0 0 auto;margin-left: 20rpx;
+			image{width: 100%;height: 100%;}
+		}
+		.checkimg{width: 80rpx;height: 40rpx;margin-right: 8rpx;}
+		.aphoto{padding: 0 24rpx;border-left: 2rpx solid #e6e6e6;margin-left: 26rpx;
+			image{width: 40rpx;height: 38rpx;}
+		}
+	}
+	
+}
+.navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;	}
+.rztit{font-weight: bold;font-size: 30rpx;color: #222327;margin-bottom: 30rpx;}
+	.carbox{width: 300rpx;border-radius: 14rpx;overflow: hidden;
+		.img{width: 300rpx;height: 208rpx;}
+		.tit{width: 100%;height: 56rpx;background: #7CC2A8;text-align: center;font-weight: 500;
+font-size: 26rpx;line-height: 56rpx;
+color: #FFFFFF;}
+	}
+	.cardtip{font-weight: 500;font-size: 24rpx;color: #999999;line-height: 40rpx;}
+.addimgs{display: flex;align-items: center;flex-wrap: wrap;justify-content: flex-end;
+	
+	.assimg{width: 128rpx;height: 128rpx;position: relative;overflow: hidden;margin: 0 0 20rpx 24rpx;
+		.img{width: 100%;height: 100%;}
+		.delimg{width: 24rpx;height: 24rpx;position: absolute;right: 0;top: 0;}
+	}
+}
+.addbox{width: 160rpx;height: 128rpx;background: #F0F0F0;border-radius: 20rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;margin-left: 24rpx;margin-bottom: 20rpx;flex: 0 0 auto;
+		image{width: 48rpx;height: 42rpx;margin-bottom: 12rpx;}
+		view{font-weight: 500;font-size: 24rpx;color: #666666;}
+	}
+.tips{font-weight: bold;color: #272727;font-size: 26rpx;margin-left: 8rpx;}
+</style>

+ 396 - 112
user_ui/health/pages/health/add.vue

@@ -4,7 +4,7 @@
 			<uni-nav-bar  color="#ffffff" left-icon="left" title="健康档案"  :background-color="backgroundColor" :border="false" statusBar='true' fixed="true" @clickLeft="getBackFn">
 			</uni-nav-bar>
 		</view>
-		<uni-forms ref="form" :model="datainfo">
+		<uni-forms ref="form" :model="datainfo" :rules="rules">
 			<view class="cbox">
 				<view class="chmain">
 					<view class="plr6">
@@ -14,13 +14,11 @@
 								<image :src="baseUrl+datainfo.front" class="img" v-if="datainfo.front"></image>
 								<image :src="cardz" class="img" v-else></image>
 								<view class="tit">拍摄人像面</view>
-								<!-- <view class="tit">身份证正面</view> -->
 							</view>
 							<view class="carbox" @click="getaddImage('back')">
 								<image :src="baseUrl+datainfo.back" class="img" v-if="datainfo.back"></image>
 								<image :src="cardf" class="img" v-else></image>
 								<view class="tit">拍摄国徽面</view>
-								<!-- <view class="tit">身份证反面</view> -->
 							</view>
 						</view>
 						<view class="mb4">
@@ -28,69 +26,116 @@
 							<view class="cardtip">如果识别错误,可尝试再次拍照。</view>
 						</view>
 					</view>
-					<uni-forms-item label="身份证号" required name="phonenumber">
+					<uni-forms-item label="身份证号" required name="residentIdCard">
 						<view class="flexc">
-							<uni-easyinput disabled v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+							<uni-easyinput  :disabled="isdisabled" v-model="datainfo.residentIdCard"  :inputBorder='false' placeholder="自动识别" />
 						</view>
 					</uni-forms-item>
-					<uni-forms-item label="姓名" required name="phonenumber">
+					<uni-forms-item label="姓名" required name="residentName">
 						<view class="flexc">
-							<uni-easyinput disabled v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+							<uni-easyinput  :disabled="isdisabled" v-model="datainfo.residentName"  :inputBorder='false' placeholder="自动识别" />
 						</view>
 					</uni-forms-item>
-					<uni-forms-item label="性别" required name="phonenumber">
+					<uni-forms-item label="性别" required name="residentGender">
 						<view class="flexc">
-							<uni-easyinput disabled v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+							<view class="flex1"></view>
+							<uni-data-checkbox  :map="map" :disabled="isdisabled" selectedColor="#0156FE" selectedTextColor="#272727" :value="datainfo.residentGender" :localdata="xbList" />
 						</view>
 					</uni-forms-item>
-					<uni-forms-item label="家庭地址" required name="phonenumber">
+					<uni-forms-item label="手机号码" required name="residentPhone">
 						<view class="flexc">
-							<uni-easyinput disabled  v-model="datainfo.phonenumber"  :inputBorder='false' placeholder="自动识别" />
+							<uni-easyinput  :disabled="isdisabled"  v-model="datainfo.residentPhone"  :inputBorder='false' placeholder="请输入手机号码" />
 						</view>
 					</uni-forms-item>
-					<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
-						<uni-forms-item label="与户主关系" required name="phonenumber">
-							<view class="flexc ml10">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'选择与户主关系'}}</view>
+					<uni-forms-item label="居住门户" name="portalId">
+						<w-select
+						      style="margin-left: 20rpx;" 
+						     v-model="chooseValue"
+						      :list='fwlist'
+						      valueName='label' 
+						      keyName="value"
+							  :chosevalue="datainfo.detailedAddress"
+							  :filterable='filterable'
+						      @change='getchange'
+						    >
+						    </w-select>
+					</uni-forms-item>
+					<!-- <uni-forms-item label="家庭地址" required name="detailedAddress">
+						<view class="flexc">
+							<uni-easyinput  disabled  v-model="datainfo.detailedAddress"  :inputBorder='false' placeholder="自动识别" />
+						</view>
+					</uni-forms-item> -->
+					<picker range-key='dictLabel' :disabled="isdisabled" :value="sfhzidx" :range="sfList"   @change='bindDateChange'>
+						<uni-forms-item label="是否户主" required name="isHouseholder">
+							<view class="flexc mh35">
+								<view class="flex1 txr f13 co27" v-if="datainfo.isHouseholder&&!sfhz">{{statusFormats(datainfo.isHouseholder,sfList,'sfhz')}}</view>
+								<view class="flex1 txr f13" v-else :class="sfhz?'co27':'coa'">{{sfhz||"请选择是/否"}}</view>
+								
 							</view>
 						</uni-forms-item>
 					</picker>
-					<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
-						<uni-forms-item label="是否党员" required name="phonenumber">
-							<view class="flexc ml10">
-								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'请选择是/否'}}</view>
+					<picker range-key='dictLabel' :disabled="isdisabled" :value="hzgxidx" :range="hzgxList"   @change='bindDateChangea'>
+						<uni-forms-item label="与户主关系" required name="residentRelationship">
+							<view class="flexc mh35">
+								<view class="flex1 txr f13 co27" v-if="datainfo.residentRelationship&&!hzgx">{{statusFormats(datainfo.residentRelationship,hzgxList,'hzgx')}}</view>
+								<view class="flex1 txr f13" v-else :class="hzgx?'co27':'coa'">{{hzgx||"请选择与户主关系"}}</view>
+								
+							</view>
+						</uni-forms-item>
+					</picker>
+					<picker range-key='dictLabel' :disabled="isdisabled" :value="sfzhidx" :range="sfList"   @change='bindDateChangeb'>
+						<uni-forms-item label="是否租户" required name="isTenant">
+							<view class="flexc mh35">
+								<view class="flex1 txr f13 co27" v-if="datainfo.isTenant&&!sfzh">{{statusFormats(datainfo.isTenant,sfList,'sfzh')}}</view>
+								<view class="flex1 txr f13" v-else :class="sfzh?'co27':'coa'">{{sfzh||"请选择是/否"}}</view>
+								
 							</view>
 						</uni-forms-item>
 					</picker>
-					<picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
+					<picker range-key='dictLabel' :disabled="isdisabled" :value="rymmidx" :range="rymmList"   @change='bindDateChangec'>
+						<uni-forms-item label="人员面貌" required name="residentAppearance">
+							<view class="flexc mh35">
+								<view class="flex1 txr f13 co27" v-if="datainfo.residentAppearance&&!rymm">{{statusFormats(datainfo.residentAppearance,rymmList,'rymm')}}</view>
+								<view class="flex1 txr f13" v-else :class="rymm?'co27':'coa'">{{rymm||"请选择人员面貌"}}</view>
+								
+							</view>
+						</uni-forms-item>
+					</picker>
+					<!-- <picker range-key='dictLabel' :value="syqxidx" :range="sexs"   @change='bindDateChange'>
 						<uni-forms-item label="特殊类型" name="phonenumber">
 							<view class="flexc ml10">
 								<view class="flex1 txr f13" :class="datainfo.iszc?'co27':'coa'">{{datainfo.iszc?'是':'如有五保户等特殊类型,请选择'}}</view>
 							</view>
 						</uni-forms-item>
-					</picker>
-					<uni-forms-item label="兴趣爱好" name="phonenumber">
+					</picker> -->
+					<uni-forms-item label="工作单位"  name="residentEmployer">
+						<view class="flexc">
+							<uni-easyinput :disabled="isdisabled"  v-model="datainfo.residentEmployer"  :inputBorder='false' placeholder="请输入工作单位" />
+						</view>
+					</uni-forms-item>
+					<uni-forms-item label="兴趣爱好" name="hobby">
 						<view class="flexc ml10">
-							<uni-easyinput type="textarea" autoHeight v-model="text" :inputBorder='false' placeholder="请输入兴趣爱好" />
+							<uni-easyinput type="textarea" :disabled="isdisabled" autoHeight v-model="datainfo.hobby" :inputBorder='false' placeholder="请输入兴趣爱好" />
 						</view>
 					</uni-forms-item>
 					
 					<uni-forms-item label="上传头像" name="phonenumber">			
-						<view class="flexe mt10">
-							<view class="addimgs">
-								<view class="assimg">
-									<image :src="aphoto" class="img"></image>
-									<image :src="rdelimg" class="delimg" @click="getDelFn"></image>
+						<view class="addimgs">
+							<block v-if="phofile&&phofile.length">
+								<view class="assimg" v-for="(ite,idx) in phofile" :key="idx" @click="getPreview(idx,phofile)">
+									<image :src="baseUrl+ite" class="img"></image>
+									<image :src="rdelimg" class="delimg" @click.stop="getDelFn(idx,'fm')"></image>
 								</view>
-							</view>
-							<view class="addbox">
+							</block>
+							<view class="addbox" @click="getaddImage">
 								<image :src="aphoto"></image>
-								<view>添加图</view>
+								<view>添加图</view>
 							</view>
-						</view>	
+						</view>
 					</uni-forms-item>
 				</view>
-				<view class="rhbtn mt30 bga" @click="getNext">提交</view>
+				<view class="rhbtn mt30 bga" @click="getEditFn" v-if="isdisabled">修改</view>
+				<view class="rhbtn mt30 bga" @click="getSubmit" v-else>提交</view>
 			</view>
 		</uni-forms>
 		
@@ -101,15 +146,15 @@
 
 <script>
 	import config from '@/config'
-	import {
-		checkPermi,
-		checkRole
-	} from "@/utils/permission"; // 权限判断函数
-	import {
-		uploadIdentify
-	} from '@/utils/common.js'
+	import {checkPermi,checkRole} from "@/utils/permission"; // 权限判断函数
+	import {uploadIdentify,uploadmore} from '@/utils/common.js'
+	import {houseInfolistNoPage} from "@/api/work/work.js"
+	import {residentInfoAdd,residentInfoPut,residentInfoDet} from "@/api/work/people.js"
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import {selectValueKey} from "@/utils/common.js"
+	import wSelect from "@/work/components/w-select/w-select.vue"
 	export default {
-		components: {},
+		components: {wSelect},
 		data() {
 			return {
 				cardz:require('@/health/static/health/cardz.png'),
@@ -121,26 +166,65 @@
 				nvaHeight:44,
 				backgroundColor: "transparent",
 				datainfo: {
-					sex:0,
-					realName: '',
-					idCard: '',
-					address: '',
-					expirationDate: '',
-					phonenumber: '',
-					front: '',
-					back: '',
+					// "residentId":"",//居住人员主键
+					"houseId":"",//关联房屋信息表的house_id
+					// "userId":"",//关联sys_user表中user_id
+					"detailedAddress":"",//居住人员的详细门牌号
+					"residentName":"",//居住人员姓名
+					"residentIdCard":"",//居住人员身份证号码,18位
+					"residentBirthday":"",//居住人员出生日期
+					// "yearsOld":"",//年龄
+					"residentPhone":"",//居住人员手机号
+					"residentGender":1,//居住人员性别:1-男,2-女
+					"residentRelationship":"",//居住人员与户主的关系,如父子、夫妻等
+					"isHouseholder":"",//是否是户主 N不是 Y是
+					"isTenant":"",//是否是租户:Y-是,N-否
+					"residentEmployer":"",//居住人员工作单位
+					"residentAppearance":""//居住人员面貌,如党员、群众等
 				},
-				syqxidx:'',
-				sexs: [{
-					text: '男',
-					value: 0
-				}, {
-					text: '女',
-					value: 1
-				}],
+				rules:{
+					residentIdCard: {rules: [{required: true,errorMessage: '请输入身份证号码' }]},
+					residentName: {rules: [{required: true,errorMessage: '请输入姓名' }]},
+					residentGender: {rules: [{required: true,errorMessage: '请选择性别' }]},
+					houseId: {rules: [{required: true,errorMessage: '请选择居住门户' }]},
+					detailedAddress: {rules: [{required: true,errorMessage: '请输入居住地址' }]},
+					isHouseholder: {rules: [{required: true,errorMessage: '请选择是否户主' }]},
+					// residentRelationship: {rules: [{required: true,errorMessage: '请选择与户主关系' }]},
+					// isTenant: {rules: [{required: true,errorMessage: '请选择是否租户' }]},
+					// residentAppearance: {rules: [{required: true,errorMessage: '请选择人员面貌' }]},
+					residentPhone: {rules: [{required: true,errorMessage: '请输入手机号'}, {pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,errorMessage:'请输入正确的手机号码'}]},
+				  },
+				sfhz:"",
+				hzgx:"",
+				sfzh:"",
+				rymm:"",
+				sfhzidx:0,
+				hzgxidx:0,
+				sfzhidx:0,
+				rymmidx:0,
+				sfhzidx:0,
+				list:[],
+				sfList:[],
+				hzgxList:[],
+				rymmList:[],
+				xbList:[],
+				phofile:[],
+				fwlist:[],
+				isdisabled:false,
+				ptype:'add',
+				filterable:true,
+				chooseValue:'',
+				map:{text:'dictLabel',value:'dictValue'}
 			}
 		},
-		onLoad: function() {
+		onLoad: function(e) {
+			if(e.id){
+				this.id=e.id;
+				this.ptype="edit";
+				this.isdisabled=true;
+				this.getDetail()
+			}
+			this.init()
 			uni.getSystemInfo({
 				success: (e) => {
 					this.nvaHeight = Number(e.statusBarHeight)+44;
@@ -158,6 +242,84 @@
 		methods: {
 			checkPermi,
 			checkRole,
+			getEditFn(){
+				this.isdisabled=false;
+			},
+			statusFormats(data, list,type) {
+				var aite=selectValueKey(list, data);
+				if(type=='sfhz'){
+					this.sfhzidx=aite.key
+				}else if(type=='hzgx'){
+					this.hzgxidx=aite.key;
+				}else if(type=='sfzh'){
+					this.sfzhidx=aite.key;
+				}else if(type=='rymm'){
+					this.rymmidx=aite.key;
+				}
+				return aite.actions;
+			},
+			getchange(e){
+				this.datainfo.houseId=e.value;
+				this.datainfo.detailedAddress=e.label;
+			},
+			init(){
+				houseInfolistNoPage().then(res=>{
+					if(res.code==200){
+						this.fwlist= res.rows.map(v => {
+							return {
+								label: v.detailedAddress,
+								value: v.houseId,
+								location: v.location
+							}
+						})
+					}
+				})
+				// 是否
+				getDictionaryFn('sys_yes_no').then(res=>{
+					if(res.code==200){
+						this.sfList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//户主关系
+				getDictionaryFn('relationship_householder').then(res=>{
+					if(res.code==200){
+						this.hzgxList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//人员面貌
+				getDictionaryFn('affiliation_personnel').then(res=>{
+					if(res.code==200){
+						this.rymmList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+				//性别
+				getDictionaryFn('gender').then(res=>{
+					if(res.code==200){
+						this.xbList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: Number(v.dictValue)
+							}
+						})
+					}
+				})
+				
+			},
 			getBackFn(){
 				uni.navigateBack({
 					delta:1
@@ -165,73 +327,193 @@
 			},
 			bindDateChange(e){
 				var val=e.detail.value;
-				// this.datainfo.applicationBank=this.sdyhlist[val].value;
-				// this.applicationBank=this.sdyhlist[val].label;
+				this.datainfo.isHouseholder=this.sfList[val].dictValue;
+				this.sfhz=this.sfList[val].dictLabel;
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.datainfo.residentRelationship=this.hzgxList[val].dictValue;
+				this.hzgx=this.hzgxList[val].dictLabel;
+			},
+			bindDateChangeb(e){
+				var val=e.detail.value;
+				this.datainfo.isTenant=this.sfList[val].dictValue;
+				this.sfzh=this.sfList[val].dictLabel;
+			},
+			bindDateChangec(e){
+				var val=e.detail.value;
+				this.datainfo.residentAppearance=this.rymmList[val].dictValue;
+				this.rymm=this.rymmList[val].dictLabel;
 			},
-			getaddImage(e) {
+			getDetail(){
+				residentInfoDet(this.id).then(res=>{
+					if(res.code==200){
+						this.datainfo=res.data
+					}
+				})
+			},
+			getSubmit(){
+				var that=this;
+				this.$refs.form.validate().then(res => {
+					var params=JSON.parse(JSON.stringify(this.datainfo))
+					// var phofile=JSON.parse(JSON.stringify(this.phofile))
+					// if(phofile&&phofile.length){
+					// 	params.equipmentPhotos=this.phofile.join(',');
+					// }
+					// if(!params.assetId){
+					// 	this.$toast('请选择资产类型')
+					// 	return
+					// }
+					// if(!params.equipmentName){
+					// 	this.$toast('请输入资产名称')
+					// 	return
+					// }
+					if(!params.detailedAddress){
+						this.$toast('请选择居住门户')
+						return
+					}
+					let _IDRe18 =
+						/^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
+					let _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
+					// 校验身份证:
+					if (params.residentIdCard&&!_IDRe18.test(params.residentIdCard) && !_IDre15.test(params.residentIdCard)) {
+						this.$toast("请输入正确身份证号")
+						return
+					}
+					if(this.ptype=='add'){
+						residentInfoAdd(params).then(res=>{
+							if(res.code==200){
+								this.$toast("新增成功")
+								setTimeout(function(){
+									uni.$emit("residentInfoList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}else{
+						residentInfoPut(params).then(res=>{
+							if(res.code==200){
+								this.$toast("修改成功")
+								setTimeout(function(){
+									uni.$emit("residentInfoList")
+									uni.navigateBack({
+										delta:1
+									})
+								},1500)
+							}
+						})
+					}	
+				})
+			},
+			getPreview(idx,arr) {
+				var newArr=[];
+				arr.forEach(ite=>{
+					var ds=this.baseUrl+ite
+					newArr.push(ds)
+				})
+				uni.previewImage({
+					urls: newArr,
+					current:idx,
+					success: function(data) {},
+					fail: function(err) {}
+				});
+			},
+			getDelFn(idx,type){
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							that.phofile.splice(idx,1)	
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			getaddImage(type){
+				if(this.isdisabled){
+					return
+				}
 				let that = this;
-				// var rs=['D:\\idcard.png']
-				// if(rs&&rs.length>0){
-				// 	var obj={
-				// 		type:e,
-				// 		// url:baseUrl+rs.join(',')
-				// 		url:rs.join(',')
-				// 	}
-				// 	that.getOcrIdCard(obj)
-				// }
-				// return
-				let file = [],
-					count = 9
+				let file =[],count=9
 				uni.chooseImage({
-					count: 1,
-					success: function(res) {
-						let img = res.tempFilePaths;
-						if (img.length + file.length > count) {
+					success:function(res){
+						let img= res.tempFilePaths;
+						if(img.length + file.length > count){
 							uni.showToast({
-								title: '最多上传' + count + '张图片',
+								title: '最多上传'+count+'张图片',
 								icon: 'none',
 								duration: 2000
 							})
-						} else {
+						}else{
 							let imglen = res.tempFilePaths.length;
 							var fuwufile = [];
-							uploadIdentify('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
-								var resurl = rs[0];
-								if (e == 'front') {
-									that.datainfo.front = resurl.fileName;
-								} else {
-									that.datainfo.back = resurl.fileName;
-								}
-								if (rs && rs.length > 0) {
-									var obj = {
-										type: e,
-										url: resurl.urlOnline
-									}
-									that.getOcrIdCard(obj)
-								}
-							})
+							uploadmore('/common/upload',img,0,0,0,imglen,fuwufile,function(rs){
+								that.phofile = that.phofile.concat(rs);
+							})	
 						}
 					}
 				});
 			},
-			getOcrIdCard(obj) {
-				var params = {
-					image: obj.url,
-					idCardSide: obj.type
-				}
-				getOcrIdCard(params).then(res => {
-					if (res.code == 200) {
-						var datainfo = res.data;
-						if (obj.type == 'front') {
-							this.datainfo.realName = datainfo.realName;
-							this.datainfo.idCard = datainfo.idCard;
-							this.datainfo.address = datainfo.address;
-						} else {
-							this.datainfo.expirationDate = datainfo.expirationDate
-						}
-					}
-				})
-			}
+			// getaddImage(e) {
+			// 	let that = this;
+			// 	let file = [],
+			// 		count = 9
+			// 	uni.chooseImage({
+			// 		count: 1,
+			// 		success: function(res) {
+			// 			let img = res.tempFilePaths;
+			// 			if (img.length + file.length > count) {
+			// 				uni.showToast({
+			// 					title: '最多上传' + count + '张图片',
+			// 					icon: 'none',
+			// 					duration: 2000
+			// 				})
+			// 			} else {
+			// 				let imglen = res.tempFilePaths.length;
+			// 				var fuwufile = [];
+			// 				uploadIdentify('/common/upload', img, 0, 0, 0, imglen, fuwufile, function(rs) {
+			// 					var resurl = rs[0];
+			// 					if (e == 'front') {
+			// 						that.datainfo.front = resurl.fileName;
+			// 					} else {
+			// 						that.datainfo.back = resurl.fileName;
+			// 					}
+			// 					if (rs && rs.length > 0) {
+			// 						var obj = {
+			// 							type: e,
+			// 							url: resurl.urlOnline
+			// 						}
+			// 						that.getOcrIdCard(obj)
+			// 					}
+			// 				})
+			// 			}
+			// 		}
+			// 	});
+			// },
+			// getOcrIdCard(obj) {
+			// 	var params = {
+			// 		image: obj.url,
+			// 		idCardSide: obj.type
+			// 	}
+			// 	getOcrIdCard(params).then(res => {
+			// 		if (res.code == 200) {
+			// 			var datainfo = res.data;
+			// 			if (obj.type == 'front') {
+			// 				this.datainfo.realName = datainfo.realName;
+			// 				this.datainfo.idCard = datainfo.idCard;
+			// 				this.datainfo.address = datainfo.address;
+			// 			} else {
+			// 				this.datainfo.expirationDate = datainfo.expirationDate
+			// 			}
+			// 		}
+			// 	})
+			// }
 		}
 	}
 </script>
@@ -240,6 +522,8 @@
 </style>
 <style lang="scss" scoped>
 	.bga{background-color: #46CB99;}
+.check /deep/ .select-wrap{border: none;width: 100%;}
+.mh35{min-height: 70rpx;display: flex;align-items: center;}
 .check /deep/ .uni-forms-item{min-height: 106rpx;box-sizing: border-box;display: flex;align-items: center;margin-bottom: 0;border-bottom: 2rpx solid #E6E6E6;padding:10rpx 0;}
 // .check .cbox /deep/ .uni-forms-item:last-child{border: none;}
 .check /deep/ .uni-forms-item__label{font-weight: bold;font-size: 26rpx;color: #222327;flex: 0 0 auto;width: auto !important;}

BIN
user_ui/health/static/house.png


BIN
user_ui/health/static/housea.png


BIN
user_ui/health/static/houseb.png


BIN
user_ui/health/static/housec.png


BIN
user_ui/health/static/man.png


BIN
user_ui/health/static/woman.png


+ 266 - 18
user_ui/mine/components/box/list.vue

@@ -3,26 +3,34 @@
 	<!-- 第一种样式  人员管理-->
 	<block v-if="datainfo.length>0">
 		<block v-if="type=='mycar'">
-			<view class="carlist" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.houseId)">
-				<view class="carltop flexc">
-					<view class="flex1">
-						<view class="tit mb6" :class="ite.vehicleType==1?'co01':'co16'">{{ite.plateNumber}}</view>
-						<view class="txt flexc">{{ite.plateNumber}}
-							<view class="txtbtn flexcc">{{ite.vehicleType}}</view>
-							<!-- <view class="txtbtn flexcc" v-if="ite.vehicleType==2">新能源</view> -->
+			<view class="carlist pr" v-for="(ite,idx) in datainfo" :key="idx" @click="getDetail(ite.carId)"
+				:data-idx="idx"
+				@touchstart="drawStart" @touchmove="drawMove" @touchend="drawEnd" :style="'right:'+ite.right+'px'"
+			>
+				<view class="delleft" style="padding: 0 24rpx;">
+					<view class="carltop flexc">
+						<view class="flex1">
+							<view class="tit mb6" :class="ite.vehicleType==1?'co01':'co16'">{{ite.plateNumber}}</view>
+							<view class="txt flexc">
+								<!-- {{ite.plateNumber}} -->
+								<view class="txtbtn flexcc">{{kaType(ite.vehicleBrand,clcxList)}}</view>
+								<!-- <view class="txtbtn flexcc" v-if="ite.vehicleType==2">新能源</view> -->
+							</view>
 						</view>
+						<image :src="cara" class="cara" v-if="ite.vehicleType==1"></image>
+						<image :src="carb" class="carb" v-if="ite.vehicleType==2"></image>
 					</view>
-					<image :src="cara" class="cara" v-if="ite.vehicleType==1"></image>
-					<image :src="carb" class="carb" v-if="ite.vehicleType==2"></image>
-				</view>
-				<view class="carlf">
-					<view class="clflist">发动机号码 :{{ite.engineNumber}}</view>
-					<view class="clflist">车辆识别代号:{{ite.identificationNumber}}</view>
-					<view class="flexc">
-						<view class="clflist w50">注册日期:{{ite.registrationDate}}</view>
-						<view class="clflist w50">发证日期:{{ite.issueDate}}</view>
+					<view class="carlf">
+						<view class="clflist">发动机号码 :{{ite.engineNumber}}</view>
+						<view class="clflist">车辆识别代号:{{ite.identificationNumber}}</view>
+						<view class="flexc">
+							<view class="clflist w50">注册日期:{{ite.registrationDate}}</view>
+							<view class="clflist w50">发证日期:{{ite.issueDate}}</view>
+						</view>
 					</view>
 				</view>
+				
+				<view class="spdel" v-if="ite.right>0&&checkPermi(['wuYe:car:remove'])" @click.stop="getDelFn(ite.carId)">删除</view>
 			</view>
 		</block>
 		<!-- 地址 -->
@@ -84,6 +92,75 @@
 				</view>
 			</view>
 		</block>
+		<!-- 人员管理 -->
+		<block v-if="type=='people'">
+			<view class="carlist peolist" v-for="(ite,idx) in datainfo" :key="idx">
+				<view class="ctop flexc">
+					<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>
+					<view class="tit">{{ite.detailedAddress}}</view>
+					<view class="flex1"></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 class="plists">
+					<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 class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
+						</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 class="spdel" v-if="aite.right>0&&checkPermi(['wuYe:residentInfo:remove'])" @click.stop="getDelFn(aite.residentId)">删除</view>
+						</view>
+					</block>
+					<image :src="upimg" v-if="ite.residentInfoList.length>1" :class="ite.zhanflag?'act':''" class="upimg" @click="getZhan(idx)"></image>
+				</view>
+			</view>
+		</block>
 		<view class="shax" v-if="wtdt">{{wtdt}}</view>
 	</block>
 	<!-- 无数据 -->
@@ -97,6 +174,8 @@
 </template>
 
 <script>
+	import {selectDictValue} from "@/utils/common.js"
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	import config from '@/config'
 	export default{
 		props:{
@@ -118,26 +197,105 @@
 					return 0
 				}
 			},
+			clcxList:{
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			rymmList:{
+				type: Array,
+				default () {
+					return []
+				}
+			}
 		},
 		data(){
 			return{
+				house:require("@/health/static/house.png"),
+				housea:require("@/health/static/housea.png"),
+				houseb:require("@/health/static/houseb.png"),
+				housec:require("@/health/static/housec.png"),
 				noiconpimg:require("@/static/images/nodata.png"),
+				upimg:require("@/mine/static/house/up.png"),
 				cara:require("@/mine/static/house/cara.png"),
 				carb:require("@/mine/static/house/carb.png"),
 				edit:require("@/mine/static/edit.png"),
 				cira:require('@/news/static/complaint/cira.png'),
 				cirb:require('@/news/static/complaint/cirb.png'),
+				man:require("@/health/static/man.png"),
+				woman:require("@/health/static/woman.png"),
 				baseUrl:config.baseUrl,
-				
+				delBtnWidth:66,//左滑默认宽度
 			}
 		},
 		mounted() {
 			
 		},
 		methods:{
+			checkPermi, checkRole,
+			kaType(data, list) {
+				return selectDictValue(list, data);
+			},
 			getDetail(e){
 				this.$emit('getDetail',e)
 			},
+			getDelFn(e){
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							that.$emit('getDelFn',e)
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			getZhan(idx){
+				// var obj=JSON.parse(JSON.stringify(this.datainfo))[idx]
+				// obj.zhanflag=!obj.zhanflag;
+				// this.datainfo.splice(idx,1,obj);
+				this.datainfo[idx].zhanflag=!this.datainfo[idx].zhanflag
+			},
+			getDelFn(id){
+				var that=this;
+				uni.showModal({
+					title: '确认删除',
+					content: "是否确认删除",
+					cancelText: '取消',
+					confirmText: '确认',
+					success: function(res) {
+						if (res.confirm) {
+							that.$emit('getDelFn',id)
+						} else if (res.cancel) {
+						}
+					}
+				});
+			},
+			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;
+				}         
+			 },
 			getPreview(idx,arr) {
 				var newArr=[];
 				arr.forEach(ite=>{
@@ -151,6 +309,59 @@
 					fail: function(err) {}
 				});
 			},
+			//开始触摸滑动
+			drawStart(e) {
+				// console.log("开始触发");
+				var touch = e.touches[0];
+				this.startX = touch.clientX;
+			},
+			//触摸滑动
+			drawMove(e) {
+				var idx=e.currentTarget.dataset.idx
+				var aidx=e.currentTarget.dataset.aidx
+				var type=e.currentTarget.dataset.type;
+				for (var index in this.datainfo) {
+					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 touch = e.touches[0];
+				var item = this.datainfo[idx];
+				var disX = this.startX - touch.clientX;
+				if (disX >= 20) {
+				        if (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
+				       
+				} else {
+					// this.csListArrl[idx].right=0
+					this.$set(this.datainfo[idx],'right',0);
+				}
+			},
+			//触摸滑动结束
+			drawEnd(e) {
+				// console.log("滑动结束");
+				var idx=e.currentTarget.dataset.idx
+				var item = this.datainfo[idx];
+				if (item.right >= this.delBtnWidth / 2) {
+					// this.datainfo[idx].right=this.delBtnWidth
+					// this.$set(this.datainfo[idx],'right',this.delBtnWidth);
+				} else {
+					this.datainfo[idx].right=0
+				}
+			},
 		}
 	}
 </script>
@@ -159,7 +370,7 @@
 .flex{display: flex;}
 .flexc{display: flex;align-items: center;}
 .mb10{margin-bottom: 20rpx;}
-.carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;padding: 0 24rpx;
+.carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
 	.carltop{min-height: 154rpx;border-bottom: 2rpx solid #E5E5E5;
 		.tit{font-weight: bold;font-size: 32rpx;}
 		.txt{font-weight: 500;font-size: 26rpx;color: #272727;}
@@ -210,6 +421,43 @@ border-radius: 10rpx;}
 		.hfstxt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;padding-left: 8rpx;}
 	}
 }
+.carlist{background: #FFFFFF;border-radius: 20rpx;margin-bottom: 24rpx;
+	.ctop{border-bottom: 2rpx solid #E5E5E5;padding:26rpx 24rpx;
+		.imgs{width: 40rpx;height: 42rpx;margin-right: 30rpx;}
+		.tit{font-size: 32rpx;color: #272727;font-weight: bold;margin-right: 14rpx;}
+		.txt{font-weight: 500;font-size: 26rpx;
+			&.ca{color: #3565ED;}
+			&.cb{color: #FE5A0E;}	
+			&.cc{color: #28C529;}	
+		}
+		.txta{font-weight: 500;font-size: 24rpx;color: #AAAAAA;}
+		.num{font-size: 24rpx;color: #AAAAAA;}
+	}
+	.btn{height: 34rpx;border-radius: 18rpx;display: flex;align-items: center;justify-content: center;padding: 0 10rpx;font-size: 22rpx;margin-right: 24rpx;
+		&.btna{border: 2rpx solid #06C770;color: #06C770;}
+		&.btnb{border: 2rpx solid #3565ED;color: #3565ED;}
+		&.btnc{border: 2rpx solid #FE5A0E;color: #FE5A0E;}
+		&.btnbga{border: 1px solid #0156FE;color: #3565ED;background: #DFEAFF;height: 36rpx;}
+		&.btnbgb{border: 1px solid #C1C1C1;color: #666666;background: #F1F1F1;height: 36rpx;}
+		&.btnbgc{border: 1px solid #FE5A0E;color:#FE5A0E;background:#FFEEE6;height: 36rpx;}
+	}
+}
+// 人员
+.peolist{
+	.ctop{padding: 24rpx 24rpx 22rpx;}
+	.imgs{margin-right: 16rpx !important;}
+	.tit{font-size: 28rpx !important;}
+	.plists{padding: 30rpx 24rpx 6rpx;
+		.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;}
+		.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;}
+		}
+	}
+	.upimg{width: 26rpx;height: 22rpx;display: block;transform: rotate(180deg);transition: all 0.3s;margin: 0 auto 18rpx;
+		&.act{transform: rotate(0deg);}
+	}
+}
 // 无数据
 .nodata{display: flex;flex-direction: column;align-items: center;
 	image{width: 440rpx;height: 440rpx;}

+ 9 - 3
user_ui/mine/pages/car/addcar.vue

@@ -16,6 +16,12 @@
 						<view class="tit mb16 lh18"><text class="cof4">*</text>车牌号码</view>
 						<view>需车牌插件</view>
 					</view>
+					<uni-forms-item label="车牌号" name="plateNumber">
+						<view class="flexc" @click.stop="">
+							<uni-easyinput :disabled="isdisabled" v-model="datainfo.plateNumber" :inputBorder='false' placeholder="请输入车牌号" />
+							<view class="rimg"><image :src="rimg"></image></view>
+						</view>
+					</uni-forms-item>
 					<block v-if="zhanfalg">
 						<uni-forms-item label="居住门户" name="houseId">
 							<w-select
@@ -39,12 +45,12 @@
 							</view>
 						</picker>
 					</uni-forms-item>
-					<uni-forms-item label="车辆类型" name="vehicleType">
+					<!-- <uni-forms-item label="车辆类型" name="vehicleType">
 						<view class="flexc" @click.stop="">
 							<uni-easyinput :disabled="isdisabled" v-model="datainfo.vehicleType" :inputBorder='false' placeholder="请输入车辆类型" />
 							<view class="rimg"><image :src="rimg"></image></view>
 						</view>
-					</uni-forms-item>
+					</uni-forms-item> -->
 					<uni-forms-item label="车辆颜色" name="vehicleColour">
 						<view class="flexc" @click.stop="">
 							<uni-easyinput :disabled="isdisabled" v-model="datainfo.vehicleColour" :inputBorder='false' placeholder="请输入车辆颜色" />
@@ -115,7 +121,7 @@
 					"residentPhone":"",//业主手机号
 					"plateNumber":"",//车牌号码
 					"vehicleBrand":"",//车辆车型
-					"vehicleType":"",//车辆类型
+					// "vehicleType":"",//车辆类型
 				},
 				zhanfalg:true,
 				syqxidx:'',

+ 17 - 5
user_ui/mine/pages/car/index.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="carbox">
 		<view class="flex1 cartop">
-			<box-list :datainfo="list" type="mycar" @getDetail="getDetail"></box-list>
+			<box-list :datainfo="list" type="mycar" :clcxList="clcxList" @getDetail="getDetail" @getDelFn="getDelFn"></box-list>
 			<view class="cartips flexc mt16 mb16" @click="getChargeFn">
 				<view class="tit flex1">当前有车辆<text class="co025">充电中…</text></view>
 				<image :src="rimg"></image>
@@ -19,7 +19,7 @@
 	const baseUrl = config.baseUrl
 	import boxList from "@/mine/components/box/list.vue"
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
-	import {carList} from "@/api/work/car.js"
+	import {carList,carDel} from "@/api/work/car.js"
 	import {getDictionaryFn} from "@/api/system/user.js"
 	export default{
 		components:{boxList},
@@ -31,13 +31,14 @@
 				pageNum: 1,
 				reachflag: true,
 				wtdt:'',
+				clcxList:[]
 			}
 		},
 		onUnload() {
-			uni.$off('refcarList')
+			uni.$off('carlist')
 		},
 		onLoad: function() {
-			uni.$on('refcarList',(res)=>{
+			uni.$on('carlist',(res)=>{
 				this.getDataFn()
 			})
 			this.init()
@@ -56,7 +57,7 @@
 				// 车型
 				getDictionaryFn('cartype').then(res=>{
 					if(res.code==200){
-						this.sfList = res.data.map(v => {
+						this.clcxList = res.data.map(v => {
 							return {
 								dictLabel: v.dictLabel,
 								dictValue: v.dictValue
@@ -65,6 +66,17 @@
 					}
 				})
 			},
+			getDelFn(data){
+				var that=this;
+				carDel(data).then(res=>{
+					if(res.code==200){
+						this.$toast("删除成功");
+						setTimeout(function(){
+							that.getDataFn()
+						},1500)
+					}
+				})
+			},
 			getAddFn(){
 				this.$tab.navigateTo("/mine/pages/car/addcar")
 			},

+ 4 - 0
user_ui/mine/pages/house/index.vue

@@ -138,6 +138,10 @@
 			getAddFn(){
 				this.$tab.navigateTo("/mine/pages/house/addhouse")
 			},
+			getListFn(){
+				console.log(2)
+				this.$tab.navigateTo("/mine/pages/house/people")
+			},
 			getEdit(id){
 				this.$tab.navigateTo("/mine/pages/house/addhouse?id="+id)
 			},

+ 211 - 0
user_ui/mine/pages/house/people.vue

@@ -0,0 +1,211 @@
+<template>
+	<view class="car">
+		<view class="cartop">
+			<view class="topa flexc">
+				<image :src="reset" class="resetimg" @click="getReset"></image>
+				<picker range-key='dictLabel' 	:range="rymmList"    @change='bindDateChangea'>
+					<view class="chekt flexc">
+						<view class="over">{{rymm|| "选择身份"}}</view>
+						<image :src="up"></image>
+					</view>
+				</picker>
+				<view class="search flexc">
+					<image :src="search"></image>
+					<!-- confirm-type="search" @confirm="getConfirm" -->
+					<input placeholder="请输入人员姓名进行搜索"  v-model="text"/>
+					<view class="btn" @click="getConfirm">搜索</view>
+				</view>
+			</view>
+		</view>
+		<!-- 列表 -->
+		<view class="carlists">
+			<box-list :datainfo="list" :rymmList="rymmList" :wtdt="wtdt" type='people' @getDelFn="getDelFn" @getDetail="getDetail"></box-list>
+		</view>
+		<block v-if="checkPermi(['wuYe:residentInfo:add'])">
+			<view style="height: 100rpx;"></view>
+			<view class="rfbtn" @click="getAddFn">添加人员</view>
+		</block>
+		<loading></loading>
+	</view>
+</template>
+
+<script>
+	import config from '@/config'
+	const baseUrl = config.baseUrl
+	import boxList from "@/mine/components/box/list.vue"
+	import {getDictionaryFn} from "@/api/system/user.js"
+	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+	import {houseInfoList} from "@/api/work/work.js"
+	import {residentInfoList,residentInfoDel} from "@/api/work/people.js"
+	export default{
+		components:{boxList},
+		data(){
+			return{
+				reset:require('@/mine/static/reset.png'),
+				search:require('@/mine/static/search.png'),
+				up:require('@/mine/static/up.png'),
+				sfxx:"",
+				text:'',
+				rymm:'',
+				rymmid:"",
+				rymmList:[],
+				list:[],
+				pageSize: 10,
+				pageNum: 1,
+				reachflag: true,
+				wtdt:'',
+				houseId:'',
+			}
+		},
+		onUnload() {
+			uni.$off('residentInfoList')
+		},
+		onLoad: function(e) {
+			uni.$on('residentInfoList',(res)=>{
+				this.getrefreshData()
+			})
+			if(e.id){
+				this.houseId=e.id;
+			}
+			this.init()
+			this.getDataFn()
+		},
+		// 上拉触底加载更多触发事件
+		onReachBottom() {
+			if (this.reachflag) {
+				this.pageNum++
+				this.getDataFn()
+			}
+		},
+		methods:{
+			checkPermi, checkRole,
+			init(){
+				//人员面貌
+				getDictionaryFn('affiliation_personnel').then(res=>{
+					if(res.code==200){
+						this.rymmList = res.data.map(v => {
+							return {
+								dictLabel: v.dictLabel,
+								dictValue: v.dictValue
+							}
+						})
+					}
+				})
+			},
+			getAddFn(){
+				this.$tab.navigateTo("/health/pages/health/add")
+			},
+			getDetail(id){
+				this.$tab.navigateTo("/health/pages/health/add?id="+id)
+			},
+			getConfirm(){
+				this.getrefreshData()
+			},
+			getReset(){
+				this.rymm='';
+				this.text='';
+				this.getrefreshData()
+			},
+			getrefreshData(){
+				this.pageNum=1;
+				this.list=[];
+				this.reachflag=true;
+				this.getDataFn()
+			},
+			getTabFn(val){
+				this.tabval=val
+			},
+			bindDateChangea(e){
+				var val=e.detail.value;
+				this.rymm=this.rymmList[val].dictLabel;
+				this.rymmid=this.rymmList[val].dictValue;
+				this.getrefreshData()
+			},
+			getDelFn(id){
+				var that=this;
+				residentInfoDel(id).then(res=>{
+					if(res.code==200){
+						that.$toast("删除成功")
+						setTimeout(function(){
+							that.getrefreshData()
+						},1500)
+					}
+				})
+			},
+			getDataFn(){
+				var params={
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+				}
+				if(this.houseId){
+					params.houseId=this.houseId
+				}
+				if(this.text){
+					params.residentName=this.text
+				}
+				if(this.rymm){
+					params.residentAppearance=this.rymmid
+				}
+				houseInfoList(params).then(res=>{
+					if(res.code==200){
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						var newArr=JSON.parse(JSON.stringify(res.rows))
+						newArr.forEach(ite=>{
+							var newArr=ite.residentInfoList;
+							if(ite.residentInfoList){
+								newArr.forEach(itea=>{
+									itea.right=0
+								})
+							}
+							ite.zhanflag=false;
+						})
+						if (this.pageNum == 1) {
+							this.list = newArr;
+						} else {
+							this.list = this.list.concat(newArr)
+						}
+					}else{
+						this.$toast(res.msg)
+					}
+				})
+				
+			},
+		}
+	}
+</script>
+<style>
+	page{background: #F3F3F0;}
+</style>
+<style lang="scss" scoped>
+.car{padding-top: 140rpx;}
+.cartop{position: fixed;left: 0;right: 0;top: 0;background-color: #ffffff;z-index: 2;
+	.topa{padding: 20rpx 20rpx 32rpx;
+		.resetimg{width: 36rpx;height: 36rpx;margin-right: 24rpx;flex: 0 0 auto;}
+		.chekt{width: 150rpx;overflow: hidden;
+			view{font-weight: 500;font-size: 26rpx;color: #272727;flex: 1;}
+			image{width: 24rpx;height: 16rpx;margin-left: 18rpx;flex: 0 0 auto;}
+		}
+		.search{flex: 1;margin-left: 16rpx;height: 64rpx;background: #EEEEEE;border-radius: 32rpx;border: 2rpx solid #E6E6E6;padding-left: 24rpx;box-sizing: border-box;
+		image{width: 32rpx;height: 34rpx;margin-right: 22rpx;flex: 0 0 auto;}
+		input{flex: 1;font-size: 26rpx;color: #272727;}
+		.btn{width: 100rpx;height: 64rpx;background: #3565ED;border-radius: 32rpx;flex: 0 0 auto;font-weight: bold;text-align: center;line-height: 64rpx;
+font-size: 26rpx;
+color: #FFFFFF;}
+		}
+	}
+
+}
+.carlists{padding: 0 18rpx;}
+</style>

BIN
user_ui/mine/static/reset.png


BIN
user_ui/mine/static/search.png


BIN
user_ui/mine/static/up.png


+ 89 - 0
user_ui/news/components/box/list.vue

@@ -58,6 +58,54 @@
 			</view>
 			<!-- checkPermi(['system:menuFood:remove'])&& -->
 		</block>
+		<!-- 评论信息 -->
+		<block v-if="type=='comment'">
+			<view class="pllist flex" v-for="(ite,idx) in datainfo" :key="`yj${idx}`">
+				<image :src="ite.commentUser.avatar?baseUrl+ite.commentUser.avatar:head" class="head"></image>
+				<view class="flex1 overh">
+					<view class="flexat mb14 ">
+						<view class="plname flex1 over">{{ite.commentUser.nickName}}</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="nicond" v-if="ite.isLike=='Y'"></image>
+							<image :src="niconb" class="imga" v-else></image>
+							<view>点赞</view>
+						</view>
+						<view class="plrbtn flexc flex0">
+							<image :src="nicone" class="imgb"></image>
+							<view>回复</view>
+						</view>
+					</view>
+					<view class="infotxt mb6">{{ite.content}}<view class="infotime">{{ite.createDate}}</view></view>
+				
+					<!-- 二级回复 -->
+					<view class="pllist flex" v-for="(aite,aidx) in ite.childrenList" :key="`ej${aidx}`">
+						<image :src="aite.commentUser.avatar?baseUrl+aite.commentUser.avatar:head" class="head"></image>
+						<view class="flex1 overh">
+							<view class="flexat mb14 ">
+								<view class="plname flex1 over">{{aite.commentUser.nickName}}</view>
+								<view class="plrbtn flexc flex0">
+									<image :src="nicond" v-if="aite.isLike=='Y'"></image>
+									<image :src="niconb" class="imga" v-else></image>
+									<view>点赞</view>
+								</view>
+								<view class="plrbtn flexc flex0">
+									<image :src="nicone" class="imgb"></image>
+									<view>回复</view>
+								</view>
+							</view>
+							<view class="infotxt mb6">{{aite.content}}<view class="infotime">{{aite.createDate}}</view></view>
+						</view>
+					</view>
+					<view class="flexc" v-if="ite.childrenListCount>0">
+						<view class="zhanbox flexc" @click.stop="getZhanFn(ite,idx)">
+							展开{{ite.childrenListCount}}条回复<image :src="upimg" class="zhan"></image>
+						</view>
+						<view class="zhanbox flexc ml10" @click.stop="getShouFn(ite,idx)">收起<image :src="upimg"></view>
+					</view>
+					<view style="height: 16rpx;" v-else></view>	
+				</view>
+			</view>
+		</block>
 		<view class="shax" v-if="wtdt">{{wtdt}}</view>
 	</block>
 	<!-- 无数据 -->
@@ -108,6 +156,13 @@
 				stara:require('@/news/static/news/stara.png'),
 				star:require('@/news/static/news/starb.png'),
 				eye:require('@/news/static/news/eye.png'),
+				nicona:require('@/news/static/news/nicona.png'),
+				niconb:require('@/news/static/news/niconb.png'),
+				niconc:require('@/news/static/news/niconc.png'),
+				nicond:require('@/news/static/news/nicond.png'),
+				nicone:require('@/news/static/news/nicone.png'),
+				head:require('@/news/static/news/head.png'),
+				upimg:require('@/mine/static/house/up.png'),
 				baseUrl:config.baseUrl,
 				delBtnWidth:66,//左滑默认宽度
 			}
@@ -122,6 +177,16 @@
 			},
 			getDetail(e){
 				this.$emit('getDetail',e)
+			},
+			getZhanFn(ite,idx){
+				var obj={
+					ite:ite,
+					idx:idx
+				}
+				this.$emit("getZhanFn",obj)
+			},
+			getShouFn(idx){
+				
 			},
 			getPreview(idx,arr) {
 				var newArr=[];
@@ -234,6 +299,30 @@
 		}	
 	}
 }
+//评论
+.pllist{padding-top: 20rpx;margin-bottom: 16rpx;border-bottom: 2rpx solid #DADADA;
+	.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;}
+	.plname{font-weight: bold;font-size: 30rpx;color: #161616;}
+	.plrbtn{margin-left: 36rpx;
+		image{width: 26rpx;height: 24rpx;margin-right: 16rpx;
+			&.imga{width: 26rpx;height: 26rpx;}
+			&.imgb{width: 26rpx;height: 22rpx;}
+		}
+		view{font-weight: bold;font-size: 24rpx;color: #314081;}
+	}
+	.infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;
+		&:before {content: "";float: right;width: 0;height: calc(100% - 16px);background: red;}
+		.infotime{font-weight: 500;font-size: 24rpx;color: #666666; float: right;clear: both;}	
+	}
+	.pllist{
+		padding-top: 0;border-bottom: none;margin-bottom: 0;
+	}
+	.zhanbox{font-weight: 500;font-size: 24rpx;color: #AAAAAA;padding: 16rpx 0;
+		image{width: 20rpx;height: 12rpx;margin-left: 18rpx;transition: all 0.3s;
+			&.zhan{transform: rotate(-180deg);}
+		}
+	}
+}
 // 无数据
 .nodata{display: flex;flex-direction: column;align-items: center;
 	image{width: 440rpx;height: 440rpx;}

+ 72 - 76
user_ui/news/pages/news/detail.vue

@@ -25,63 +25,9 @@
 			</view>
 		</view>
 		<view class="ndbox mb12 plr15">
-			<view class="pltit">评论<text>(31)</text></view>
+			<view class="pltit">评论<text>({{commenttotal}})</text></view>
 			<!-- 评论列表 -->
-			<view class="pllist flex">
-				<image :src="head" class="head"></image>
-				<view class="flex1 overh">
-					<view class="flexat mb14 ">
-						<view class="plname flex1 over">床前明月光</view>
-						<view class="plrbtn flexc flex0">
-							<!-- <image :src="niconb" class="imga"></image> -->
-							<image :src="nicond"></image>
-							<view>点赞</view>
-						</view>
-						<view class="plrbtn flexc flex0">
-							<image :src="nicone" class="imgb"></image>
-							<view>回复</view>
-						</view>
-					</view>
-					<view class="infotxt mb15">支持!去看一下优惠政策!<view class="infotime">12-3</view></view>
-				</view>
-			</view>
-			<view class="pllist flex">
-				<image :src="head" class="head"></image>
-				<view class="flex1 overh">
-					<view class="flexat mb14 ">
-						<view class="plname flex1 over">疑是地上霜</view>
-						<view class="plrbtn flexc flex0">
-							<image :src="niconb" class="imga"></image>
-							<!-- <image :src="nicond"></image> -->
-							<view>点赞</view>
-						</view>
-						<view class="plrbtn flexc flex0">
-							<image :src="nicone" class="imgb"></image>
-							<view>回复</view>
-						</view>
-					</view>
-					<view class="infotxt mb15">提前缴一年的物业费,可以免一个月吗?<view class="infotime">12-3</view></view>
-					<!-- 二级回复 -->
-					<view class="pllist flex">
-						<image :src="head" class="head"></image>
-						<view class="flex1 overh">
-							<view class="flexat mb14 ">
-								<view class="plname flex1 over">幸福小区物业</view>
-								<view class="plrbtn flexc flex0">
-									<image :src="niconb" class="imga"></image>
-									<!-- <image :src="nicond"></image> -->
-									<view>点赞</view>
-								</view>
-								<view class="plrbtn flexc flex0">
-									<image :src="nicone" class="imgb"></image>
-									<view>回复</view>
-								</view>
-							</view>
-							<view class="infotxt mb15">尊敬的业主朋友,您的建议我司已收到,将在内 部讨论后于物业公告中告知结果,谢谢您的宝贵 建议!<view class="infotime">12-3</view></view>
-						</view>
-					</view>
-				</view>
-			</view>
+			<box-list :datainfo="commentlist" type="comment" @getZhanFn="getZhanFn"></box-list>
 		</view>
 		<!-- 评论 -->
 		<view class="pjfbtn">
@@ -99,8 +45,10 @@
 	const baseUrl = config.baseUrl
 	import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 	import {newsDet} from "@/api/work/manage.js"
+	import boxList from "@/news/components/box/list.vue"
+	import {getRootComment,getParentComment,commentIndex,giveTheThumbs,getStars,commentContentPut} from "@/api/work/news.js"
 	export default{
-		components:{},
+		components:{boxList},
 		data(){
 			return{
 				nicona:require('@/news/static/news/nicona.png'),
@@ -109,17 +57,24 @@
 				nicond:require('@/news/static/news/nicond.png'),
 				nicone:require('@/news/static/news/nicone.png'),
 				head:require('@/news/static/news/head.png'),
+				upimg:require('@/mine/static/house/up.png'),
+				baseUrl:config.baseUrl,
 				datainfo:{
 					
 				},
 				communityContent:'<span>hello uni-app x!</span><br/><span>uni-app x,终极跨平台方案</span>',
 				text:'',
 				id:"",
+				commentlist:[],//评论列表
+				commenttotal:"0",
+				pageSize: 10,
+				pageNum: 1,
 			}
 		},
 		onLoad: function(e) {
 			this.id=e.id;
-			this.getDetailFn()
+			// this.getDetailFn();
+			this.getRootComment()
 		},
 		// 上拉触底加载更多触发事件
 		onReachBottom() {
@@ -141,6 +96,63 @@
 					}
 				})
 			},
+			getZhanFn(obj){
+				// 获取自己
+				var obj=JSON.parse(JSON.stringify(obj));
+				var idx=obj.idx;
+				var list=JSON.parse(JSON.stringify(this.commentlist))[idx]
+				var params={
+					parentId:obj.id,
+					pageSize:obj.pageSize,
+					pageNum: obj.pageNum,
+				}
+				getParentComment(params).then(res=>{
+					if(res.code==200){
+						var reachflag=true;
+						var data=JSON.parse(JSON.stringify(res.data))
+						list.childrenList=list.childrenList.concat(res.data)
+						this.commentlist.splice(idx,0,list)
+					}
+				})
+			},
+			getRootComment(){
+				var that=this;
+				var params={
+					communityId:this.id,
+					pageSize:this.pageSize,
+					pageNum: this.pageNum,
+				}
+				// userid,头像,nickname,标题(或者评论对象的内容)  点赞收藏评论,   
+				getRootComment(params).then(res=>{
+					if(res.code==200){
+						this.commenttotal=res.total;
+						if (res.rows.length < this.pageSize) {
+							this.reachflag = false
+							this.wtdt = '到底了~';
+						} else {
+							var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -	1)
+							if (num < res.total) {
+								this.reachflag = true
+								this.wtdt = ''
+							} else {
+								this.reachflag = false
+								this.wtdt = '到底了~';
+							}
+						}
+						var newArr=JSON.parse(JSON.stringify(res.rows))
+						newArr.forEach(ite=>{
+							ite.pageSize=1
+							ite.pageNum=10
+							ite.reachflag=true
+						})
+						if (this.pageNum == 1) {
+							this.commentlist = newArr;
+						} else {
+							this.commentlist = this.list.concat(newArr)
+						}
+					}
+				})
+			},
 			//解析富文本方法
 			formatRichText(html) {
 					let newContent = html.replace(/<img[^>]*>/gi, function(match, capture) {
@@ -183,24 +195,7 @@
 .pltit{font-weight: bold;font-size: 30rpx;color: #272727;
 	text{margin-left: 24rpx;font-size: 24rpx;color: #666666;}
 }
-.pllist{padding-top: 20rpx;margin-bottom: 16rpx;border-bottom: 2rpx solid #DADADA;
-	.head{width: 40rpx;height: 40rpx;margin-right: 18rpx;flex: 0 0 auto;}
-	.plname{font-weight: bold;font-size: 30rpx;color: #161616;}
-	.plrbtn{margin-left: 36rpx;
-		image{width: 26rpx;height: 24rpx;margin-right: 16rpx;
-			&.imga{width: 26rpx;height: 26rpx;}
-			&.imgb{width: 26rpx;height: 22rpx;}
-		}
-		view{font-weight: bold;font-size: 24rpx;color: #314081;}
-	}
-	.infotxt{font-weight: 500;font-size: 26rpx;color: #161616;line-height: 40rpx;
-		&:before {content: "";float: right;width: 0;height: calc(100% - 16px);background: red;}
-		.infotime{font-weight: 500;font-size: 24rpx;color: #666666; float: right;clear: both;}	
-	}
-	.pllist{
-		padding-top: 0;border-bottom: none;margin-bottom: 0;
-	}
-}
+
 .pjfbtn{background: #FFFFFF;position: fixed;bottom: 0;left: 0;right: 0;padding:20rpx 48rpx;box-shadow: 0px 0px 18rpx 0px rgba(159,159,159,0.47);
 	.pjfbox{background: #E6E6E6;border-radius: 10rpx;
 		.btns{nt-weight: bold;padding: 0 34rpx;height: 60rpx;line-height: 60rpx;flex: 0 0 auto;
@@ -209,6 +204,7 @@
 	
 color: #314081;}
 }
+
 .pjfbtn /deep/ .uni-easyinput{flex: 1;font-size: 26rpx;color: #222327;}
 .pjfbtn /deep/ .uni-easyinput__content-textarea{min-height: 40rpx;font-size: 26rpx;margin: 0;background: #E6E6E6;box-sizing: border-box;padding: 10rpx 0 10rpx 36rpx;border-radius:10rpx 0 0 10rpx;}
 </style>

+ 8 - 0
user_ui/pages.json

@@ -120,6 +120,7 @@
 			"h5":{"titleNView":false}
 		  }
 		}
+		
 	  ]
 	  },
   	{
@@ -281,6 +282,13 @@
 				  "navigationStyle": "custom"
 			  }
 			},
+			{
+			  "path": "pages/house/people",
+			  "style": {
+			    "navigationBarTitleText": "家庭成员",
+				"h5":{"titleNView":false}
+			  }
+			},
 			{
 			  "path": "pages/house/addhouse",
 			  "style": {

+ 1 - 1
user_ui/static/style.css

@@ -34,7 +34,7 @@ font-weight: bold;font-size: 26rpx;color: #FFFFFF;background: #0256FD;border-rad
 .rfbtn{height: 100rpx;display: flex;align-items: center;justify-content: center;font-weight: bold;position: fixed;left: 0;right: 0;bottom: 0;z-index: 4;font-size: 26rpx;color: #FFFFFF;background: #0156FE;}
 .linetit{width: 14rpx;height: 48rpx;background: #0256FD;border-radius:0 12rpx 12rpx 0;margin-right: 18rpx;}
 .spdel{width: 164rpx;background: #EA2D2D;font-weight: bold;font-size: 26rpx;color: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;right: -146rpx;top: 0;bottom: 0;padding-left: 14rpx;}
-.delleft{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;}
+.delleft{background-color: #ffffff;border-radius: 20rpx;position: relative;z-index: 1;width: 100%;}
 .pr{position: relative;}