Browse Source

车辆、小区

slowslo 5 years ago
parent
commit
4141b6b489

+ 25 - 2
assets/http/api.js

@@ -24,9 +24,20 @@ const permissions = {
 //小区管理
 let residentialUrl={
 	page:"estate/residential/getListByLikeName",
+	pageBycondition: "estate/residential/showResidentialList",
+	add: "/estate/residential/addResidential",
+	update: "/estate/residential/updateResidential",
+	del: "/estate/residential/deleteResidential",
+	findListByPosition:"/estate/unit/findListByPosition"
 }
 const residential={
 	page:(params,header) => http.get(residentialUrl.page,{params:params,header: header}),
+	pageBycondition:(params,header) => http.get(estateUrl.residential.pageBycondition,{params:params,header: header}),
+	getListByLikeName:(params,header) => http.get(estateUrl.residential.getListByLikeName,{params:params,header: header}),
+	add: (params,header) => http.post(estateUrl.residential.add,params,{header: header}),
+	update: (params,header) => http.post(estateUrl.residential.update,params,{header: header}),
+	del: (params,header) => http.post(estateUrl.residential.del,params,{header: header}),
+	findListByPosition:(params,header) => http.get(estateUrl.residential.findListByPosition,{params:params,header: header}),
 }
 
 //楼栋管理
@@ -108,7 +119,8 @@ const userFeedBack={
 let estateRepairUrl={
 	page:'estate/estateRepair/showRepairList',
 	submit:'/estate/estateRepair/addOrEditEstateRepair',//新增修改
-	detail:'/estate/estateRepair/findEstateRepairById/app/'
+	detail:'/estate/estateRepair/findEstateRepairById/app/',
+	userFeedback:'estate/userFeedback/pagingQuery',//用户反馈
 }
 const estateRepair={
 	page:(params,header) => http.get(estateRepairUrl.page,{params:params,header: header}),
@@ -116,6 +128,15 @@ const estateRepair={
 	detail:(params,header) => http.get(estateRepairUrl.detail+params),
 }
 
+//车辆管理
+let carManageUrl={
+	page:"/permissions/xq/device/admin/user/pagingQuery",
+	pageBycondition:"community/car/list"
+}
+const carManage={
+	page:(params,header) => http.get(carManageUrl.page,{params:params,header: header}),
+	pageBycondition:(params,header) => http.get(carManageUrl.pageBycondition,{params:params,header:header})
+}
 
 export const api={
 	//权限管理
@@ -135,5 +156,7 @@ export const api={
 	//用户反馈
 	userFeedBack,
 	//物业报修
-	estateRepair
+	estateRepair,
+	//车辆管理
+	carManage
 }

+ 19 - 1
pages.json

@@ -112,11 +112,20 @@
             "path" : "pages/car/car",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "",
+                "navigationBarTitleText": "车辆管理",
                 "enablePullDownRefresh": false
             }
             
         }
+		,{
+		    "path" : "pages/car/add",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "添加车辆",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
 
         ,{
             "path" : "pages/room/add",
@@ -181,6 +190,15 @@
             }
             
         }
+		,{
+		    "path" : "pages/feedback/list",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "用户反馈",
+		        "enablePullDownRefresh": false
+		    }
+		    
+		}
 		,{
 		    "path" : "pages/setting/setting",
 		    "style" :                                                                                    

+ 187 - 0
pages/car/add.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="" >
+		<u-toast ref="uToast"/>
+		<view class="bg-white" style="padding: 10rpx 30rpx;margin: 20rpx;border-radius: 12rpx;">
+			<u-form :label-style="labelStyle" label-width="150" :model="form" ref="uForm">
+				<u-form-item label="车主姓名" :required="true"><u-input v-model="form.personName" placeholder="车主姓名"/></u-form-item>
+				<u-form-item v-if="!$isEmpty(form.id)" label="手机号码" :required="true"><u-input type="number" v-model="form.personPhone" placeholder="请输入手机号码"/></u-form-item>
+				<u-form-item label="所属小区" :required="true">
+					<u-input v-if="$isEmpty(form.id)"  type="select" :select-open="residentialShow" v-model="residentialName"  placeholder="请选择小区" @click="residentialShow=true"></u-input>
+					<u-input v-else   disabled v-model="form.residentialName" ></u-input>
+				</u-form-item>
+				<u-form-item label="车牌号" :required="true">
+					<u-input v-model="form.number" placeholder="请填写车牌号"></u-input>
+				</u-form-item>
+				<u-form-item label="车辆型号">
+					<u-input v-model="form.model"  placeholder="请填写车辆型号"></u-input>
+				</u-form-item>
+				<u-form-item label="燃油类别">
+					<u-input v-model="form.fuelCategory"  placeholder="请填写燃油类别"></u-input>
+				</u-form-item>
+				<u-form-item label="车身颜色">
+					<u-input v-model="form.color"  placeholder="请填写车身颜色"></u-input>
+				</u-form-item>
+				<u-form-item label="车辆照片">
+					<u-input v-model="form.carImg"  placeholder="车辆照片"></u-input>
+				</u-form-item>
+			</u-form>
+		</view>
+		
+		<!-- 小区 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="residentialShow">
+			<view class="fixed cu-bar search bg-white">
+				<view class="search-form round">
+					<text class="cuIcon-search"></text>
+					<u-input style="width: 90%;" v-model="residentialKeyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
+				</view>
+			</view>
+			<scroll-view v-if="!$isEmpty(residentialList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="residentialConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in residentialList" :key="index">
+					<text>{{item.name}}</text>
+				</view>
+				<u-divider v-if="residentialList.length>=10" height="80">只显示十条数据</u-divider>
+			</scroll-view>
+			<u-empty v-else name="search"></u-empty>
+		</u-popup>
+		
+		<view @click="confirm" class="bottom-bar" >
+			<view class="cu-btn bg-blue radius" style="width: 70%;height: 84rpx;">
+				提交
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: '',
+	data() {
+		return {
+			labelStyle:{
+				"fontWeight":"600"
+			},
+			form:{
+				personName:'',
+				residentialId:'',
+				personPhone:'',
+				fuelCategory:'',
+				number:'',
+				model:'',
+				carImg:'',
+				color:''
+			},
+			//小区
+			residentialName:'',
+			residentialShow:false,
+			residentialKeyword:'',
+			residentialList:[],
+		};
+	},
+	onLoad(options) {
+		//加载小区数据
+		this.fetchResidentialList()
+		if (!this.$isEmpty(options.id)) {
+			this.form.id=options.id
+			this.fetchDataDetail()
+			uni.setNavigationBarTitle({
+				title:"修改车辆信息"
+			})
+		}
+	},
+	watch:{
+		//小区
+		residentialKeyword(){
+			let that=this
+			if (this.timer){
+				clearTimeout(this.timer)
+			}
+			this.timer = setTimeout(() => {
+				that.residentialList=[]
+				that.getResidentailList()
+			}, 500)
+		},
+	},
+	methods:{
+		fetchDataDetail(){
+			this.$api.room.pageBycondition({id:this.form.id}).then(res=>{
+				this.form=res.list[0]
+			})
+		},
+		
+		/**
+		 * 获取小区数据列表
+		 */
+		fetchResidentialList(){
+			let params={
+				isSelect: true,
+				name:this.residentialKeyword
+			}
+			this.$api.residential.page(params).then(res=>{
+				this.residentialList = res.list
+			})
+		},
+		//点击选择小区时
+		residentialConfirm(item){
+			//赋值给提交的数据
+			this.form.residentialId=item.id
+			//赋值给回显的名称
+			this.residentialName=item.name
+			let params={
+				residentialId:item.id
+			}
+			this.residentialShow=false
+		},
+		showBuilding(){
+			if (this.$isEmpty(this.residentialName)) {
+				this.$showToast('请先选择小区','warning')
+				return
+			}
+			this.buildingShow=true
+		},
+		confirm(){
+			if (this.$isEmpty(this.form.personName)) {
+				this.$u.toast('请输入车主姓名')
+				return
+			}
+			if (this.$isEmpty(this.form.residentialId)) {
+				this.$u.toast("请选择小区")
+				return
+			}
+			console.log(this.form);
+			if (this.$isEmpty(this.form.id)) {
+				return
+				this.$api.room.add(this.form).then(res=>{
+					if (res.data) {
+						this.$dialog.showModal('操作成功',false).then(res=>{
+							uni.navigateBack()
+						})
+					}else{
+						this.$u.toast('操作失败')
+					}
+				})
+				//新增
+			}else{
+				let {oldId,orgPosition,...params}=this.form
+				//修改
+				this.$api.room.update(params).then(res=>{
+					if (res.data==true) {
+						this.$dialog.showModal('操作成功',false).then(res=>{
+							uni.navigateBack()
+						})
+					}else{
+						this.$u.toast('操作失败')
+					}
+				})
+			}
+		}
+		
+
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>

+ 346 - 0
pages/car/car.vue

@@ -1,18 +1,364 @@
 <template>
 	<view>
+		<!-- 详情 -->
+		<u-popup v-model="popupShow" mode="center" width="650" :closeable="true" border-radius="10">
+			<view style="padding: 60rpx 40rpx 10rpx;">
+				<u-form label-width="150" :model="form">
+					<u-form-item label="所属小区" :required="true">
+						<u-input type="select" disabled @click="operaType=1;residentialShow=true" v-model="form.residentialName" />
+					</u-form-item>
+					<u-form-item label="车主姓名" ><u-input v-model="form.personName" /></u-form-item>
+					<u-form-item label="车主电话" ><u-input v-model="form.personTel" /></u-form-item>
+				</u-form>
+				<view @click="submit" class="flex cu-btn bg-blue" style="margin: 60rpx 0 10rpx;padding: 40rpx;">
+					提交
+				</view>
+			</view>
+		</u-popup>
 		
+		<!-- 筛选标签条 -->
+		<view class="cu-bar bg-white flex justify-around" style="z-index: 100;width: 100%;position: fixed;top: -2rpx;">
+			<view class="u-line-1" @click="showDown(index)" v-for="(item,index) in filterMenu" :key="index"  style="width: 24%;text-align: center;height: 100%;">
+				{{data[index]==""? item:data[index]}}
+				<u-icon  name="arrow-down-fill" size="20" style="padding-left: 10rpx;"></u-icon>
+			</view>
+			
+			<view class="u-line-1" @click="filterShow=true"   style="width: 26%;position: relative;text-align: center;height: 100%;">
+				筛选
+				<text class="cuIcon-filter padding-left-10" ></text>
+				<u-badge  :offset="[2, 20]"  size="mini" type="error" :count="filterCount"></u-badge>
+			</view>
+		</view>
+		
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view style="margin-top: 110rpx;">
+				<card @delItem="delItem" @edit="edit" :list="list"></card>
+			</view>
+		</mescroll-body>
+		
+		<!-- 地区选择器 -->
+		<u-picker  @confirm="regionConfirm"  mode="region" v-model="regionShow"></u-picker>
+		<!-- 小区 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="residentialShow">
+			<view class="fixed cu-bar search bg-white">
+				<view class="search-form round">
+					<text class="cuIcon-search"></text>
+					<u-input style="width: 90%;" v-model="keyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
+				</view>
+			</view>
+			<scroll-view v-if="!$isEmpty(residentialList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="residentailConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in residentialList" :key="index">
+					<text>{{item.label}}</text>
+				</view>
+				<u-divider v-if="residentialList.length>=10" height="80">只显示十条数据</u-divider>
+			</scroll-view>
+			<u-empty v-else name="search"></u-empty>
+		</u-popup>
+		
+		<!-- 筛选 -->
+		<u-modal :show-cancel-button="true" cancel-text="重置"   @cancel="reset" @confirm="filterConfirm" title="筛选" :mask-close-able="true" v-model="filterShow" >
+			<view class="slot-content" style="margin: 20rpx;">
+				<u-form label-width="150" :model="params" ref="uForm">
+					<u-form-item :border-bottom="false" label="车主姓名"><u-input placeholder="请输入车主姓名" v-model="params.personName" /></u-form-item>
+					<u-form-item :border-bottom="false" label="车主号码"><u-input placeholder="请输入车主号码" v-model="params.personPhone" /></u-form-item>
+				</u-form>
+			</view>
+		</u-modal>
+		<!-- 添加按钮 -->
+		<add-btn @click.native="add"></add-btn>
+		<!-- 通知alert -->
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
+	import card from "./card.vue"
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
+	let that;
 	export default {
+		components:{
+			card
+		},
+		mixins:[MescrollMixin],
 		data() {
 			return {
+				//新增修改详情弹窗
+				popupShow:false,
+				form:{},
+				operaType:0,
+				
+				//顶部菜单栏
+				filterMenu: ["所属地区","所属小区"],
+				data:['','',''],
+				
+				//地区
+				regionShow:false,
+				areaValue:'',
+				
+				//小区
+				residentialShow:false,
+				residentialList:[],
 				
+				//筛选
+				filterShow:false,
+				filterCount:0,
+				
+				//参数
+				params:{},
+				//小区关键字
+				keyword:'',
+				
+				list: [],
+				downOption: { 
+					use: true,
+					auto: false
+				},
+				upOption: {
+					page: {
+						page: 0,
+						size: 10
+					},
+					noMoreSize: 5, 
+					empty: {
+						tip: '暂无相关数据'
+					}
+				},
+				
+			}
+		},
+		onLoad(){
+			that=this
+			this.getResidentailList({isSelect:true})
+		},
+		watch:{
+			keyword(){
+				let that=this
+				//节流函数
+				if (this.timer){
+					clearTimeout(this.timer)//阻止setTimeout函数的执行
+				}
+				this.timer = setTimeout(() => {
+					that.searchList=[]
+					let params = {
+						isSelect: true,
+						regionArea: that.areaValue,
+						name: that.keyword
+					}
+					this.getResidentailList(params)
+				}, 500)
 			}
+			
 		},
 		methods: {
+			//添加车辆
+			add(){
+				uni.navigateTo({
+					url:"./add"
+				})
+			},
+			edit(item){
+				let {orgId,orgPosition,...form}=item
+				this.form=form
+				this.popupShow=true
+				console.log(this.form);
+			},
+			delItem(item){
+				this.$dialog.showModal('确定要删除此记录吗?').then(res=>{
+					this.$api.building.del({id:item.id}).then(res=>{
+						if (res.data==true) {
+							this.$u.toast('删除成功')
+							this.mescroll.resetUpScroll()
+						}else{
+							this.$u.toast('删除失败')
+						}
+					})
+				})
+			},
+			
+			submit(){
+				if (this.$isEmpty(this.form.name)) {
+					this.$u.toast('请输入楼栋名')
+					return
+				}
+				if (this.$isEmpty(this.form.residentialId) || this.$isEmpty(this.form.residentialName)) {
+					this.$u.toast('请选择所属小区')
+					return
+				}
+				if (!this.$isEmpty(this.form.personTel)) {
+					if (!this.$verify.phone(this.form.personTel)&&!this.$verify.landline(this.form.personTel)) {
+						this.$u.toast('请输入正确的联系方式')
+						return
+					}
+				}
+				console.log(this.form);
+				if (this.$isEmpty(this.form.id)) {
+					console.log('我是新增');
+					this.$api.building.add(this.form).then(res=>{
+						if (res.code==200) {
+							this.popupShow=false
+							this.$u.toast('添加成功')
+							this.mescroll.resetUpScroll()
+						}
+					})
+				}else{
+					let {createAccountId,createDate,floorNumber,roomNumber,status,unitNumber,personNumber,...params}=this.form
+					console.log(params);
+					this.$api.building.update(params).then(res=>{
+						if (res.data==true) {
+							this.popupShow=false
+							this.$u.toast('修改成功')
+							this.mescroll.resetUpScroll()
+						}
+					})
+				}
+			},
+			//获取小区列表
+			getResidentailList(params){
+				let list = [];
+				this.$api.residential.page(params).then(res=>{
+					let list=[]
+					res.list.forEach(item=>{
+						let obj={
+							label:item.name,
+							value:item.id
+						}
+						list.push(obj)
+					})
+					this.residentialList =  list;
+				})
+			},
+			/**
+			 * 获取筛选的条件数
+			 */
+			getFilterCount(){
+				let n=0
+				console.log(this.areaValue);
+				if (!this.$isEmpty(this.areaValue)) {
+					//地区
+					n++
+				}
+				if (!this.$isEmpty(this.params.name)) {
+					//楼栋
+					n++
+				}
+				this.filterCount=n
+			},
 			
+			/**
+			 * 下拉回调
+			 */
+			downCallback(){
+				setTimeout(()=>{
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+			/**
+			 * 上拉回调
+			 * @param {Object} mescroll
+			 */
+			upCallback(mescroll) {
+				let params=this.params
+				params.current=mescroll.num
+				params.size=mescroll.size
+				this.getFilterCount()
+				try{
+					if(params.personName == null || params.personPhone == null){
+						console.log(params)
+						this.$api.carManage.page(params).then(res=>{
+							let data=res.data.records
+							let length=data.length
+							let total=res.data.total
+							mescroll.endBySize(length, total);
+							if(mescroll.num == 1) this.list = []; 
+							this.list=this.list.concat(data); 
+						})						
+					}else{
+						console.log(222)
+						this.$api.carManage.pageBycondition(params).then(res=>{
+							let data=res.data.records
+							let length=data.length
+							let total=res.data.total
+							mescroll.endBySize(length, total);
+							if(mescroll.num == 1) this.list = []; 
+							this.list=this.list.concat(data); 
+						})		
+					}
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+			/**
+			 * 重置
+			 */
+			reset(){
+				//查询数据列表的参数
+				this.params={}
+				this.data=['','']
+				//地区
+				this.areaValue=''
+				//小区列表
+				this.residentialList=[]
+				//小区关键字
+				this.keyword=''
+				//数据列表
+				this.list=[],
+				this.getResidentailList()
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 点击选择小区,重新获取楼栋列表
+			 */
+			residentailConfirm(res){
+				if (this.operaType==0) {
+					// 筛选楼栋列表的选择小区
+					this.params.residentialId =res.value
+					this.data[1] = res.label
+					this.residentialShow = false
+					this.mescroll.resetUpScroll()
+				}else if(this.operaType==1){
+					// 添加操作的选择小区
+					this.form.residentialName=res.label
+					this.form.residentialId=res.value
+					this.residentialShow=false
+					this.operaType=0
+				}
+			},
+			/**
+			 * 顶部菜单选择
+			 * @param {Object} index 菜单下标
+			 */
+			showDown(index){
+				if (index==0) {
+					//地区
+					this.regionShow=true
+					return
+				}
+				if(index==1){
+					//小区
+					this.residentialShow = true;
+					return;
+				}
+			},
+			/**
+			 * 确认筛选
+			 */
+			filterConfirm(){
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 地区确认回调
+			 * @param {Object} object
+			 */
+			regionConfirm(object){
+				this.data[0]= object.area.label;
+				this.areaValue = object.area.value;
+				let params = {
+					isSelect: true,
+					regionArea: this.areaValue
+				};
+				this.getFilterCount()
+				this.getResidentailList(params);
+			},
 		}
 	}
 </script>

+ 130 - 0
pages/car/card.vue

@@ -0,0 +1,130 @@
+<!-- 删除,单元,修改,添加,管理功能皆未实现 -->
+<template>
+	<view class="">
+		<view  class="data" v-for="(item, index) in list" :key="index">
+			<view class="top">
+				<view class="left">
+					<view class="title">
+						<u-icon name="xingming" custom-prefix="custom-icon" size="40" color="#51c75b"></u-icon>
+						<text class="padding-left-20">车主姓名:{{item.userName}}</text>
+						<text @click.stop="copy(item.userName)" style="text-decoration: underline;" class="text-blue padding-left-20">复制</text>
+					</view>
+				</view>
+			</view>
+			<view class="item">
+				<view class="left">
+					<view style="padding: 0 30rpx;">
+						<view class="content flex">
+							<u-icon name="chepaihao" custom-prefix="custom-icon" size="40" color="#1296db"></u-icon>
+							<text class="text-bold  padding-left-10">车牌号:</text>
+							<text>{{item.loginName}}</text>
+						</view>
+						<view  class="content flex">
+							<u-icon name="cheliang" custom-prefix="custom-icon" size="40" color="#fdba4e"></u-icon>
+							<text class="text-bold padding-left-10">车辆类型:</text>
+							<text class="text-bold" v-text="item.loginPwd?item.loginPwd:'未知'" ></text>
+						</view>
+						<view  class="content flex">
+							<u-icon name="color" custom-prefix="custom-icon" size="40" color="#7fc6ac"></u-icon>
+							<text class="text-bold padding-left-10">车身颜色:</text>
+							<text  v-text="item.remark?item.remark:'未知'"></text>
+						</view>
+						<view  class="content flex">
+							<u-icon name="shoujihaoma" custom-prefix="custom-icon" size="40" color="#5ca8f0"></u-icon>
+							<text class="text-bold padding-left-10">手机号码:</text>
+							<text class="text-bold" v-text="item.userMobile" ></text>
+						</view>
+					</view>
+				</view>
+			</view>
+<!-- 			<view class="bottom flex" >
+				<view @click="edit(item)" class="cu-btn  sm round line-blue" style="margin: 0 10rpx;">
+					修改车辆
+				</view>
+				<view @click="delItem(item)" class="cu-btn  sm round bg-red" style="margin: 0 10rpx;">
+					删除车辆
+				</view>
+			</view> -->
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'card',
+	props:{
+		list:{
+			type:Array,
+			default:()=>{
+				[]
+			}
+		}
+	},
+	data() {
+		return {
+			loading:false
+		};
+	},
+	created() {
+		
+	},
+	methods:{
+		copy(data){
+			uni.setClipboardData({
+				data:data
+			})
+		},
+		edit(item){
+			getApp().globalData.carData=item
+			uni.navigateTo({
+				url:"/pages/car/add?id="+item.id
+			})
+		},
+		delItem(item){
+			this.$emit('delItem',item)
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.data {
+	width: 710rpx;
+	background-color: #ffffff;
+	margin: 20rpx auto;
+	border-radius: 6rpx;
+	box-sizing: border-box;
+	padding: 20rpx 10rpx;
+	font-size: 28rpx;
+	.top {
+		display: flex;
+		justify-content: space-between;
+		padding-bottom: 20rpx;
+		border-bottom: 1rpx solid #dedede;
+		.left {
+			display: flex;
+			align-items: center;
+			.title {
+				margin: 0 10rpx;
+				font-size: 30rpx;
+			}
+		}
+		.right{
+			margin-right: 10rpx;
+		}
+	}
+	.item {
+		margin: 5rpx 0 20rpx 0;
+		.content {
+			border-bottom: 1rpx dashed #DDDDDD;
+			padding: 30rpx 0;
+		}
+	}
+	.bottom {
+		display: flex;
+		margin-top: 30rpx;
+		justify-content: flex-end;
+		align-items: center;
+	}
+}
+</style>

+ 75 - 0
pages/feedback/list.vue

@@ -0,0 +1,75 @@
+<template>
+	<view>
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view >
+				<card  :list="list"></card>
+			</view>
+		</mescroll-body>
+	</view>
+</template>
+
+<script>
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
+	import card from "@/components/feedback/feedback"
+	export default {
+		components:{
+			card
+		},
+		mixins:[MescrollMixin],
+		data() {
+			return {
+				list: [],
+				downOption: { 
+					use: true,
+					auto: false
+				},
+				upOption: {
+					page: {
+						page: 0,
+						size: 10
+					},
+					noMoreSize: 5, 
+					empty: {
+						tip: '暂无相关数据'
+					}
+				},
+			}
+		},
+		methods: {
+			/**
+			 * 下拉回调
+			 */
+			downCallback(){
+				setTimeout(()=>{
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+			/**
+			 * 上拉回调
+			 * @param {Object} mescroll
+			 */
+			upCallback(mescroll) {
+				let params={
+					current:mescroll.num,
+					size:mescroll.size
+				}
+				try{
+					this.$api.userFeedBack.page(params).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) this.list = []; 
+						this.list=this.list.concat(data); 
+					})
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 2 - 2
pages/repair/item.vue

@@ -59,7 +59,7 @@
 				item.handleStatus=1
 				item.estimateStatus=0
 				this.$showModel('确定把该工单置为已处理状态?').then(res=>{
-					this.$api.residential.addOrEditEstateRepair(item).then(res=>{
+					this.$api.estateRepair.submit(item).then(res=>{
 						this.$u.toast('操作成功')
 						this.mescroll.resetUpScroll()
 					})
@@ -86,7 +86,7 @@
 				// 	data.estimateStatus=0
 				// }
 				try{
-					this.$api.residential.showRepairList(data).then(res=>{
+					this.$api.estateRepair.page(data).then(res=>{
 						let data=res.data.records
 						console.log(data);
 						let length=data.length

+ 137 - 0
pages/residential/card.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="">
+		<view @click="goDetail(item)"  class="data" v-for="(item, index) in list" :key="index">
+			<view class="top">
+				<view class="left">
+					<view class="title">
+						<u-icon name="fangjian" custom-prefix="custom-icon" size="30" color="#50baca"></u-icon>
+						<text class="padding-left-20">房间名称:{{item.name}}</text>
+						<!-- <text @click.stop="copy(item.name)" style="text-decoration: underline;" class="text-blue padding-left-20">复制</text> -->
+					</view>
+				</view>
+			</view>
+			<view class="item">
+				<view class="left">
+					<view style="padding: 0 30rpx;">
+						<!-- <view class="content flex">
+							<u-icon name="menpaihao" custom-prefix="custom-icon" size="30" color="#fdb524"></u-icon>
+							<text class="text-bold  padding-left-10">门牌号:</text>
+							<text>{{item.houseNumber}}</text>
+						</view> -->
+						<view  class="content flex">
+							<u-icon name="xiaoqu" custom-prefix="custom-icon" size="30" color="#2fc500"></u-icon>
+							<text class="text-bold padding-left-10">所属小区:</text>
+							<text  v-text="item.residentialName?item.residentialName:'未知'"></text>
+						</view>
+						<view  class="content flex">
+							<u-icon name="zhuhuzongshu" custom-prefix="custom-icon" size="30" color="#d4237a"></u-icon>
+							<text class="text-bold padding-left-10">所属楼栋:</text>
+							<text  v-text="item.buildingName" ></text>
+						</view>
+						<view  class="content flex">
+							<u-icon name="danyuan" custom-prefix="custom-icon" size="30" color="#5ca8f0"></u-icon>
+							<text class="text-bold padding-left-10">所属单元:</text>
+							<text  v-text="item.unitName?item.unitName:'未知'" ></text>
+						</view>
+						<!-- <view  class="content flex">
+							<u-icon name="zhuhuzongshu" custom-prefix="custom-icon" size="30" color="#d4237a"></u-icon>
+							<text class="text-bold padding-left-10">住户总数:</text>
+							<text class="text-bold" v-text="item.userNumber" ></text>
+						</view> -->
+					</view>
+				</view>
+			</view>
+			<view class="bottom flex" >
+				<view @click.stop="edit(item)" class="cu-btn  sm round line-blue" style="margin: 0 10rpx;">
+					修改房间
+				</view>
+				<view @click.stop="delItem(item)" class="cu-btn  sm round bg-red" style="margin: 0 10rpx;">
+					删除房间
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	name: 'card',
+	props:{
+		list:{
+			type:Array,
+			default:()=>{
+				[]
+			}
+		}
+	},
+	data() {
+		return {
+			loading:false
+		};
+	},
+	created() {
+		
+	},
+	methods:{
+		copy(data){
+			uni.setClipboardData({
+				data:data
+			})
+		},
+		goDetail(item){
+			uni.navigateTo({
+				url:"/pages/room/detail?id="+item.id
+			})
+		},
+		edit(item){
+			uni.navigateTo({
+				url:"/pages/room/add?id="+item.id
+			})
+		},
+		delItem(item){
+			this.$emit('delItem',item)
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.data {
+	background-color: #ffffff;
+	margin: 10rpx ;
+	border-radius: 6rpx;
+	box-sizing: border-box;
+	padding: 20rpx 10rpx;
+	font-size: 28rpx;
+	.top {
+		display: flex;
+		justify-content: space-between;
+		padding-bottom: 20rpx;
+		border-bottom: 1rpx solid #dedede;
+		.left {
+			display: flex;
+			align-items: center;
+			.title {
+				margin: 0 10rpx;
+				font-size: 30rpx;
+			}
+		}
+		.right{
+			margin-right: 10rpx;
+		}
+	}
+	.item {
+		margin: 5rpx 0 20rpx 0;
+		.content {
+			border-bottom: 1rpx dashed #DDDDDD;
+			padding: 30rpx 0;
+		}
+	}
+	.bottom {
+		display: flex;
+		margin-top: 30rpx;
+		justify-content: flex-end;
+		align-items: center;
+	}
+}
+</style>

+ 371 - 0
pages/residential/residential.vue

@@ -1,18 +1,389 @@
 <template>
 	<view>
+		<!-- 筛选标签条 -->
+		<view class="cu-bar bg-white flex" style="z-index: 100;width: 100%;position: fixed;top: -2rpx;">
+			<view class="u-line-1" @click="showDown(index)" v-for="(item,index) in filterMenu" :key="index" style="width: 20%;text-align: center;height: 100%;">
+				<text v-text="data[index]==''?item:data[index]" :class="data[index]==''?'':'text-red'"></text>
+				<u-icon v-if="index!=4" name="arrow-down-fill" size="20" style="padding-left: 10rpx;"></u-icon>
+				<text class="cuIcon-filter padding-left-10" v-else></text>
+				<u-badge :offset="[10, 8]" v-if="index==4" size="mini" type="error" :count="filterCount"></u-badge>
+			</view>
+		</view>
+		<mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback" :down="downOption" :up="upOption">
+			<view style="margin-top: 110rpx;">
+				<card @delItem="delItem" :list="list"></card>
+			</view>
+		</mescroll-body>
+		<!-- 所属机构 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="popupShow">
+			<view class="fixed cu-bar search bg-white">
+				<view class="search-form round">
+					<text class="cuIcon-search"></text>
+					<u-input style="width: 90%;" v-model="keyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
+				</view>
+			</view>
+			<scroll-view v-if="!$isEmpty(searchList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="residentailConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in searchList" :key="index">
+					<text>{{item.label}}</text>
+				</view>
+				<u-divider v-if="searchList.length>=10" height="80">只显示十条数据</u-divider>
+			</scroll-view>
+			<u-empty v-else name="search"></u-empty>
+		</u-popup>
+		<!-- 楼栋 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="buildingShow">
+			<view class="fixed cu-bar search bg-white">
+				<view class="search-form round">
+					<text class="cuIcon-search"></text>
+					<u-input style="width: 90%;" v-model="buildingKeyWord" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
+				</view>
+			</view>
+			<scroll-view v-if="!$isEmpty(buildingList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="buildingConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in buildingList" :key="index">
+					<text>{{item.name}}</text>
+				</view>
+				<u-divider v-if="buildingList.length>=10" height="80">只显示十条数据</u-divider>
+			</scroll-view>
+			<u-empty v-else name="search"></u-empty>
+		</u-popup>
 		
+		<!-- 地区选择器 -->
+		<u-picker  @confirm="regionConfirm"  mode="region" v-model="regionShow"></u-picker>
+		
+		<!-- 筛选 -->
+		<u-modal :show-cancel-button="true" cancel-text="重置"   @cancel="reset" @confirm="filterConfirm" title="筛选" :mask-close-able="true" v-model="filterShow" >
+			<view class="slot-content" style="margin: 20rpx;">
+				<u-form label-width="150" :model="params" ref="uForm">
+					<u-form-item label="房间名"><u-input v-model="params.name" /></u-form-item>
+					<!-- <u-form-item :border-bottom="false" label="门牌号"><u-input v-model="params.houseNumber" /></u-form-item> -->
+				</u-form>
+			</view>
+		</u-modal>
+		
+		<!-- 单元选择器 -->
+		<u-picker @confirm="unitConfirm" range-key="name" :range="unitList" v-model="unitShow" mode="selector"></u-picker>
+		
+		<!-- 添加按钮 -->
+		<add-btn @click.native="add"></add-btn>
+		<!-- 通知alert -->
+		<u-toast ref="uToast" />
 	</view>
 </template>
 
 <script>
+	// import card from "./card.vue"
+	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
+	let that;
 	export default {
+		// components:{
+		// 	card
+		// },
+		mixins:[MescrollMixin],
 		data() {
 			return {
+			
+				//顶部菜单栏
+				filterMenu: ["地区","小区","楼栋","单元","筛选"],
+				data:['','','','',''],
+				
+				//地区
+				regionShow:false,
+				areaValue:'',
+				
+				//底部弹出框
+				popupShow:false,
+				searchList:[],
+				//筛选框
+				filterShow:false,
+				filterCount:0,
+				
+				// 列表数据
+				params:{},
+				keyword:'',
+				
+				//单元
+				unitShow:false,
+				unitList:[],
+				
+				//楼栋
+				buildingShow:false,
+				buildingKeyWord:'',
+				buildingList:[],
+				
+				list: [],
+				downOption: { 
+					use: true,
+					auto: false
+				},
+				upOption: {
+					page: {
+						page: 0,
+						size: 10
+					},
+					noMoreSize: 5, 
+					empty: {
+						tip: '暂无相关数据'
+					}
+				},
 				
 			}
 		},
+		onLoad(){
+			that=this
+			this.getResidentailList({isSelect:true})
+		},
+		onShow() {
+			if (this.canReset) {
+				this.mescroll.resetUpScroll()
+			}
+			this.canReset=true
+		},
+		watch:{
+			keyword(){
+				let that=this
+				//节流函数
+				if (this.timer){
+					clearTimeout(this.timer)//阻止setTimeout函数的执行
+				}
+				this.timer = setTimeout(() => {
+					that.searchList=[]
+					let params = {
+						isSelect: true,
+						regionArea: that.areaValue,
+						name: that.keyword
+					}
+					this.getResidentailList(params)
+				}, 500)
+			},
+			buildingKeyWord(){
+				let that=this
+				//节流函数
+				if (this.timer){
+					clearTimeout(this.timer)//阻止setTimeout函数的执行
+				}
+				this.timer = setTimeout(() => {
+					that.buildingList=[]
+					let params={
+						residentialId:that.params.residentialId,
+						name:that.buildingKeyWord
+					}
+					that.fetchBuildingList(params)
+				}, 500)
+			},
+		},
 		methods: {
+			/**
+			 * 获取筛选的条件数
+			 */
+			getFilterCount(){
+				let n=0
+				if (!this.$isEmpty(this.params.residentialId)) {
+					//小区
+					n++
+				}
+				if (!this.$isEmpty(this.params.buildingId)) {
+					//楼栋
+					n++
+				}
+				if (!this.$isEmpty(this.params.unitId)) {
+					//单元
+					n++
+				}
+				if (!this.$isEmpty(this.params.name)) {
+					//房间名
+					n++
+				}
+				this.filterCount=n
+			},
 			
+			/**
+			 * 下拉回调
+			 */
+			downCallback(){
+				setTimeout(()=>{
+					this.mescroll.resetUpScroll()
+				},1500)
+			},
+			/**
+			 * 上拉回调
+			 * @param {Object} mescroll
+			 */
+			upCallback(mescroll) {
+				let params=this.params
+				params.current=mescroll.num
+				params.size=mescroll.size
+				this.getFilterCount()
+				try{
+					this.$api.room.page(params).then(res=>{
+						let data=res.data.records
+						let length=data.length
+						let total=res.data.total
+						mescroll.endBySize(length, total);
+						if(mescroll.num == 1) this.list = []; 
+						this.list=this.list.concat(data); 
+					})
+				}catch(e){
+					mescroll.endErr();
+				}
+			},
+			/**
+			 * 重置
+			 */
+			reset(){
+				this.params={}
+				this.data=['','','','','']
+				this.areaValue=''
+				this.searchList=[]
+				this.keyword=''
+				this.unitList=[]
+				this.buildingKeyWord='',
+				this.buildingList=[],
+				this.list=[],
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 点击选择小区,获取楼栋列表
+			 */
+			residentailConfirm(res){
+				//筛选标题
+				this.params.residentialId =res.value
+				this.data[1] = res.label
+				this.popupShow = false
+				//获取楼栋列表
+				let params={
+					residentialId:this.params.residentialId
+				}
+				this.fetchBuildingList(params)
+				this.mescroll.resetUpScroll()
+			},
+			//点击选择楼栋,获取单元列表
+			buildingConfirm(res){
+				this.params.buildingId=res.id
+				this.data[2] = res.name
+				this.buildingShow = false
+				let params={
+					residentialId:this.params.residentialId,
+					buildingId:res.id
+				}
+				this.getUnitByResidentialId(params)
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 获取楼栋列表
+			 * @param {Object} 
+			 */
+			fetchBuildingList(params){
+				this.$api.building.page(params).then(res=>{
+					this.buildingList=res.data.records
+				})
+			},
+			/**
+			 * 根据小区id获取单元列表
+			 */	
+			getUnitByResidentialId(params){
+				this.$api.unit.page(params).then(res=>{
+					this.unitList=res.list
+				})
+			},
+			unitConfirm(index){
+				this.data[3]=this.unitList[index].name
+				this.params.unitId=this.unitList[index].id
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 顶部菜单选择
+			 * @param {Object} index 菜单下标
+			 */
+			showDown(index){
+				if (index==0) {
+					//地区
+					this.regionShow=true
+					return
+				}
+				if(index==1){
+					//小区
+					this.popupShow = true;
+				 return;
+				}else if(index==2){
+					//楼栋
+					if (this.$isEmpty(this.data[1])) {
+						this.$refs.uToast.show({
+							title: '请先选择小区',
+							type: 'warning',
+						})
+						return
+					}
+					this.buildingShow=true
+				}else if (index==3) {
+					//单元
+					if(this.$isEmpty(this.data[2])){
+						this.$refs.uToast.show({
+							title: '请先选择楼栋',
+							type: 'warning',
+						})
+						return
+					}
+					this.unitShow=true
+				}else if (index==4) {
+					//筛选
+					this.filterShow=true
+				}
+			},
+			/**
+			 * 确认筛选
+			 */
+			filterConfirm(){
+				this.mescroll.resetUpScroll()
+			},
+			/**
+			 * 地区确认回调
+			 * @param {Object} object
+			 */
+			regionConfirm(object){
+				this.data[0]= object.area.label;
+				this.areaValue = object.area.value;
+				let params = {
+					isSelect: true,
+					regionArea: this.areaValue
+				};
+				this.getResidentailList(params);
+			},
+			/**
+			 * 获取小区列表
+			 * @param {Object} params
+			 */
+			getResidentailList(params){
+				let list = [];
+				this.$api.residential.page(params).then(res=>{
+					let list=[]
+					res.list.forEach(item=>{
+						let obj={
+							label:item.name,
+							value:item.id
+						}
+						list.push(obj)
+					})
+					this.searchList =  list;
+				})
+			},
+			/**
+			 * 添加房间
+			 */
+			add(){
+				uni.navigateTo({
+					url:"./add"
+				})
+			},
+			delItem(item){
+				this.$dialog.showModal('确定要删除此项吗?').then(res=>{
+					this.$api,room.del({id:item.id}).then(res=>{
+						if (res.data) {
+							this.$showToast('删除成功')
+							that.mescroll.resetUpScroll()
+						}
+					})
+				})
+			}
 		}
 	}
 </script>

+ 8 - 3
pages/service-list/community-list.vue

@@ -12,7 +12,7 @@
 	export default {
 		data() {
 			return {
-				CommunityMenuList:["小区管理","楼栋管理","单元管理","房间管理","系统设置"],
+				CommunityMenuList:["小区管理","楼栋管理","单元管理","房间管理","住户管理","住户审核"],
 			}
 		},
 		methods: {
@@ -38,9 +38,14 @@
 							url: "../room/room"
 						})
 						break;
-					case "系统设置":
+					case "住户管理":
 						uni.navigateTo({
-							url:"../setting/setting"
+							url: "../user/user"
+						})
+						break;
+					case "住户审核":
+						uni.navigateTo({
+							url: "../user-auth/user-auth"
 						})
 						break;
 					default :

+ 1 - 1
pages/service-list/property-list.vue

@@ -28,7 +28,7 @@
 						break;
 					case "用户反馈":
 						uni.navigateTo({
-							url: "../../components/feedback/feedback"
+							url: "../feedback/list"
 						})
 						break;
 					default :