slowslo 5 rokov pred
rodič
commit
d7bad5d082

+ 1 - 1
assets/http/api.js

@@ -23,7 +23,7 @@ const permissions = {
 
 //机构列表
 let agencyUrl={
-	page:"agency/agency/list"
+	page:"/agency/agency/list"
 }
 const agency={
 	page:(params,header) => http.get(agencyUrl.page,{params:params,header:header})

+ 176 - 0
components/g-upload.md

@@ -0,0 +1,176 @@
+## 注意事项:mode属性是从服务端获取图片回填的时候使用的,如果该数组长度大于0,则优先显示该数组的图片到控件上,否则显示临时路径。
+## 上传的时候如果控件上显示的图片不是临时路径,而是服务返回的图片,则无论是上传图片还是删除图片,触发完成后都需要更新一下mode的值,组件内部已做了更新监听
+
+本组件是对uni-app上传组件进行封装,上传控件支持在内部和外部(支持在父组件中调用上传方法),上传图片支持一行3个和4个,支持上传的图片预览,运用非常灵活。
+当前是第一版:后面有时间继续完善更多的功能,尽请期待。
+大家觉得不够完善,欢迎提出,写插件不易,好用的话请5星好评,打赏一杯奶茶也可以。
+本组件目前兼容小程序、H5、APP。
+
+### 有问题请加群询问,第一时间解决问题,邮件不经常看。
+### QQ交流群(学习干货多多) 811956471
+
+### 或者在页面script中引入组件,并注册组件
+```
+  import gUpload from "@/components/g-upload/g-upload.vue"
+export default {
+   gUpload
+}
+```
+
+### 下面是一个完整示例
+```
+<template>
+  <view class="content">
+    <g-upload ref='gUpload' :mode="imgList" @chooseFile='chooseFile' @imgDelete='imgDelete' :control='control' :columnNum="columnNum"></g-upload>
+    <view class="imglistItem" @click="uploadImg" v-if="!control">
+      <view class="uploadControl">外部控件</view>
+    </view>
+    <view>
+      <view>
+        <label>上传控件内部外部切换:</label>
+        <switch @change="switch1Change"></switch>
+        <label>{{control?'内部':'外部控件'}}</label>
+      </view>
+      <view>
+        <label>图片行个数:</label>
+        <switch @change="switch2Change"></switch>
+        <label>{{columnNum}}</label>
+      </view>
+    </view>
+
+  </view>
+</template>
+
+<script>
+  import gUpload from "@/components/g-upload/g-upload.vue"
+  export default {
+    components: {
+      gUpload
+    },
+    data() {
+      return {
+        title: 'Hello',
+        control: true,
+        columnNum: 4,
+        imgList: []
+        // imgList: ['/static/logo.png']
+      }
+    },
+    onLoad() {
+      /*
+      mode:
+      需要回填的图片数组,
+      上传的时候渲染临时路径,二次进入时可以选择渲染服务返回的图片,
+      此时删除图片完成后需要及时更新mode(imgList)的值
+      */
+    },
+    methods: {
+      //点击上传控件上传
+      uploadImg() {
+        this.$refs.gUpload.uploadImg()
+      },
+
+
+      /*
+      上传后返回的值:
+      list:上传后图片数组
+      v:返回当前上传图片的临时路径
+      */
+      chooseFile(list, v) {
+        console.log("上传图片_list:", list)
+        console.log("上传图片_v:", v);
+        this.uploadFileToServe(v)
+      },
+
+
+      /*
+      删除图片:
+      list:删除返回删除后剩余的图片数组
+      eq:返回删除的数组
+      */
+      imgDelete(list, eq) {
+        console.log("删除图片_list:", list)
+        console.log("删除图片_eq:", eq)
+      },
+
+
+      //控件内外部切换
+      switch1Change(e) {
+        this.control = !this.control
+      },
+
+
+      //图片行个数切换
+      switch2Change(e) {
+        this.columnNum = this.columnNum == 3 ? '4' : '3'
+      },
+
+      /*
+      执行上传服务:
+      urlList:要上传的图片:数组类型
+      */
+      uploadFileToServe(urlList) {
+        if (!urlList || urlList.length <= 0) {
+          return
+        };
+        for (let i = 0; i < urlList.length; i++) {
+          uni.uploadFile({
+            url: 'https://www.example.com/upload', //仅为示例,非真实的接口地址
+            filePath: urlList[i],
+            name: 'file',
+            formData: {
+              'user': 'test'
+            },
+            success: (uploadFileRes) => {
+              console.log(uploadFileRes.data);
+            }
+          });
+        }
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .content {
+    padding: 40rpx;
+  }
+
+  /* 上传控件 */
+  .uploadControl {
+    border: 1rpx solid #eee;
+    border-radius: 10rpx;
+    width: 130rpx;
+    display: block;
+    height: 130rpx;
+    text-align: center;
+    line-height: 130rpx;
+    font-size: 30rpx;
+    color: #888;
+    background-color: #EEEEEE;
+  }
+</style>
+
+
+
+```
+
+
+
+### 属性介绍
+| 名称                         | 类型            | 默认值                        | 描述                                               |
+| ----------------------------|---------------  | -------
+| control                     |Boolean          | true                          |是否显示上传控件|
+| deleteBtn                   |Boolean          | true                          |是否显示删除按钮|
+| columnNum                   |Number, String   |4                              | 行数量,可选值:3、4|
+| mode                        |Array            | []                            |服务返回回调的图片数组---图片回填 时候使用|
+| maxCount                    |Number           |4                              | 上传最大数量|
+
+### 事件介绍
+| 名称               | 说明            
+| -----------------  |------------------
+| chooseFile         | 选择图片后返回的值:第一个值是当前已选择图片临时路径路径集合,第二个参数是当前图片的临时路径
+| imgDelete         | 删除图片后返回的值:第一个值是当前剩余图片临时路径路径集合,第二个参数是所图片删除的图片下标
+
+
+

+ 170 - 0
components/g-upload/g-upload.vue

@@ -0,0 +1,170 @@
+<template>
+  <view class="imglistbx">
+    <view :class="['imglistItem',columnNum==3?'column3':'column4']" v-for="(item,index) in showList" :key='index'>
+      <image :src="item" class="itemImg" @click="previewImage(index)" mode="aspectFill"></image>
+      <icon size="18" type="cancel" class="cancelBtn" @click="deleteImg(index)" v-if="deleteBtn"></icon>
+    </view>
+    <!-- 上传控件 -->
+    <view :class="['imglistItem',columnNum==3?'column3':'column4']" @click="uploadImg" v-if="control&&showControl">
+      <view class="itemImg uploadControl">+</view>
+    </view>
+    <view class="clear"></view>
+  </view>
+</template>
+
+<script>
+  export default {
+    props: {
+      //是否显示上传控件
+      control: {
+        type: Boolean,
+        default: true
+      },
+      //是否显示上删除按钮
+      deleteBtn: {
+        type: Boolean,
+        default: true
+      },
+      //行数量 
+      columnNum: {
+        type: [Number, String],
+        default: 4
+      },
+      //上传最大数量
+      maxCount: {
+        type: Number,
+        default: 4
+      },
+      //服务返回回调的图片数组--回填
+      mode: {
+        type: Array,
+        default: function() {
+          return []
+        }
+      }
+    },
+    data() {
+      return {
+        imgList: [],
+        showList: [],
+        showControl: true
+      }
+    },
+    watch: {
+      mode(v) {
+        this.init(v)
+      },
+      showList(){
+        if (this.showList.length >= this.maxCount) {
+          this.showControl = false
+          return
+        };
+         this.showControl = true;
+      }
+    },
+    created() {
+      this.init(this.mode)
+    },
+    methods: {
+      init(v) {
+        if (this.mode.length != 0) {
+          this.showList = v;
+          return
+        };
+        this.showList = this.imgList;
+      },
+      // 上传图片
+      uploadImg() {
+        uni.chooseImage({
+          sizeType: ['compressed '],
+          count: this.maxCount,
+          success: (chooseImageRes) => {
+            let tempFilePaths = chooseImageRes.tempFilePaths;
+            tempFilePaths=tempFilePaths.slice(0,this.maxCount-this.showList.length);
+            tempFilePaths.forEach((item) => {
+              this.imgList.push(item);
+            })
+            this.$emit("chooseFile", this.imgList, tempFilePaths)
+          }
+        });
+      },
+      //删除图片
+      deleteImg(eq) {
+        let deleteImg = this.imgList;
+        deleteImg.splice(eq, 1); //删除临时路径
+        if (this.mode.length > 0) {
+          let deleteImg = this.showList;
+          deleteImg.splice(eq, 1); //删除服务那边的路径
+        }
+        this.$emit("imgDelete", this.handleImg(), eq)
+      },
+      // 预览图片
+      previewImage(eq) {
+        let getUrl = this.handleImg();
+        uni.previewImage({
+          current: getUrl[eq],
+          urls: getUrl
+        })
+      },
+      //返回需要操作的图片数组
+      //如果是回调了则操作回填后的数组 否则操作临时路径的图片数组
+      handleImg() {
+        return this.mode.length > 0 ? this.showList : this.imgList
+      },
+    }
+  }
+</script>
+
+<style scoped>
+  /* 上传  str */
+  .imglistbx {
+    width: 100%;
+    height: 100%;
+  }
+
+  .imglistItem {
+    position: relative;
+    float: left;
+    margin-bottom: 20rpx;
+    border-radius: 10rpx;
+  }
+
+  .column3 {
+    width: 33.3333%;
+    height: 160rpx;
+  }
+
+  .column4 {
+    width: 25%;
+    height: 130rpx;
+  }
+
+  .itemImg {
+    width: 70%;
+    height: 100%;
+    margin: 0 auto;
+    display: block;
+    border-radius: 10rpx;
+  }
+
+  .cancelBtn {
+    position: absolute;
+    top: -10rpx;
+    right: 10rpx;
+  }
+
+  /* 上传控件 */
+  .uploadControl {
+    font-size: 50rpx;
+    color: #888;
+    background-color: #EEEEEE;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+
+  /*  上传  str end*/
+  .clear {
+    clear: both;
+  }
+</style>

+ 3 - 3
components/repair/repair.vue

@@ -39,7 +39,7 @@
 			</view>
 			<view class="bottom">
 				<!-- 待处理状态 -->
-				<view v-if="item.handleStatus==0" @click.stop="handelRepair(item)"  class="cu-btn  sm round line-base" style="margin: 0 8rpx;padding: 0 20rpx;font-size: 22rpx;">
+				<view v-if="item.handleStatus==0" @click.stop="handleRepair(item)"  class="cu-btn  sm round line-base" style="margin: 0 8rpx;padding: 0 20rpx;font-size: 22rpx;">
 					处理工单
 				</view>
 				<view v-else class="cu-btn  sm round line-base" style="margin: 0 8rpx;padding: 0 20rpx;font-size: 22rpx;">
@@ -77,8 +77,8 @@ export default {
 				url:"/pages/repair/detail?id="+item.id
 			})
 		},
-		handelRepair(item){
-			this.$emit('handelRepair',item)
+		handleRepair(item){
+			this.$emit('handleRepair',item)
 		}
 	}
 };

+ 2 - 2
pages/building/card.vue

@@ -38,9 +38,9 @@
 				<view @click="edit(item)" class="cuIcon cu-btn round bg-blue light text-bold">
 					<text class="cuIcon-edit"></text>
 				</view>
-				<view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
+<!-- 				<view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
 					<text class="cuIcon-delete"></text>
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>

+ 2 - 2
pages/car/add.vue

@@ -6,8 +6,8 @@
 				<u-form-item label="车主姓名" :required="true"><u-input v-model="form.userName" placeholder="车主姓名"/></u-form-item>
 				<u-form-item v-if="!$isEmpty(form.id)" label="手机号码" :required="true"><u-input type="number" v-model="form.userMobile" 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.xqName" ></u-input>
+					<u-input type="select" :select-open="residentialShow" v-model="residentialName"  placeholder="请选择小区" @click="residentialShow=true"></u-input>
+					<!-- <u-input v-else   disabled v-model="form.xqName" ></u-input> -->
 				</u-form-item>
 				<u-form-item label="车牌号" :required="true">
 					<u-input v-model="form.loginName" placeholder="请填写车牌号"></u-input>

+ 3 - 3
pages/car/card.vue

@@ -7,7 +7,7 @@
 					<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>
+						<text @click.stop="this.$util.copy(item.userName)" style="text-decoration: underline;" class="text-blue padding-left-20">复制</text>
 					</view>
 				</view>
 			</view>
@@ -41,9 +41,9 @@
 				<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 @click="delItem(item)" class="cu-btn  sm round bg-red" style="margin: 0 10rpx;">
 					删除车辆
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>

+ 129 - 12
pages/index/index.vue

@@ -28,25 +28,61 @@
 			<u-tabs  bar-height="8" bar-width="80" active-color="#7dc7ae" :list="list" :is-scroll="false" :current="subsectionCurrent" @change="subsectionChange"></u-tabs>
 		</view>
 		<!-- 住户认证 -->
-		<repair v-if="subsectionCurrent==0" @handelRepair="handelRepair" :list="repairList"></repair>
+		<card v-if="subsectionCurrent==0" @handleRepair="handleRepair" :list="repairList"></card>
 		<feedback v-else :list="feedbackList"></feedback>
 		<view class="flex justify-center " style="padding:30rpx 0 ">
 			<view @click="more" class="cu-btn radius sm" style="border: 1rpx solid #7fc6ac;color: #7fc6ac;padding: 10rpx 40rpx;">
 				查看更多
 			</view>
 		</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" label-position="top">
+							<u-form-item label="照片上传" >
+								<view class="cu-form-group">
+									<view class="grid col-4 grid-square flex-sub">
+										<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
+											<image :src="imgList[index]" mode="aspectFill"></image>
+											<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
+												<text class='cuIcon-close'></text>
+											</view>
+										</view>
+										<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
+											<text class='cuIcon-cameraadd'></text>
+										</view>
+									</view>
+								</view>
+							</u-form-item>
+							<u-form-item label="处理情况" required=true><u-input v-model="detail"/></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>
 </template>
 
 <script>
-	import repair from "@/components/repair/repair" 
+	import card from "@/components/repair/repair" 
 	import feedback from "@/components/feedback/feedback"
+	var _this = this;
 	export default {
 		components:{
-			repair,feedback
+			card,feedback
 		},
 		data() {
 			return {
+				//照片上传及处理情况
+				imgList: [],
+				imgMaxNum: 4,
+				detail:'',
+				detailTemp:{},
+				
+				//弹出
+				popupShow:false,
+				
 				banner:'http://139.9.103.171:1888/miniofile/estate/banner.png',
 				isError:false,
 				
@@ -132,17 +168,98 @@
 			/**
 			 * 处理工单
 			 */
-			handelRepair(item){
-				//已完成,待评价
-				item.handleStatus=1
-				item.estimateStatus=0
-				this.$dialog.showModal('确定把该工单置为已处理状态?').then(res=>{
-					this.$api.estateRepair.submit(item).then(res=>{
-						this.$u.toast('操作成功')
-						this.fetchRepairList()
-					})
+			// handleRepair(item){
+			// 	//已完成,待评价
+			// 	console.log("item",item)
+			// 	item.handleStatus=1
+			// 	item.estimateStatus=0
+			// 	this.$dialog.showModal('确定把该工单置为已处理状态?').then(res=>{
+			// 		this.$api.estateRepair.submit(item).then(res=>{
+			// 			this.$u.toast('操作成功')
+			// 			this.fetchRepairList()
+			// 		})
+			// 	})
+			// },
+			/**
+			 * @param {Object} item
+			 * 点击处理工单
+			 */
+			handleRepair(item){
+				console.log("进入时item:", item)
+				this.detailTemp = item,
+				this.popupShow=true,
+				this.imgList = [],
+				this.detail = ''
+			},
+			/**
+			 * 确认提交工单情况s
+			 */
+			submit(){
+				this.detailTemp.picArr = this.imgList.join(",")
+				console.log("临时item",this.detailTemp)
+				// this.detailTemp.
+				this.$showModel('确定把该工单置为已处理状态?').then(res=>{
+					if(this.detail == ''){
+						this.$u.toast('请填写处理情况')
+						return
+					}else{
+						this.detailTemp.handleStatus=1,
+						this.detailTemp.estimateStatus=0
+						this.$api.estateRepair.submit(this.detailTemp).then(res=>{
+							this.$u.toast('操作成功')
+							this.mescroll.resetUpScroll()
+							this.popupShow=false
+						})
+					}
 				})
 			},
+			/**
+			 * @param {Object} index
+			 * 拍照或者从图库选择照片上传照片
+			 */
+			ChooseImage() {
+				_this = this;
+				uni.chooseImage({
+					count: 4, //默认9
+					sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['camera','album'], //从相机、相册选择
+					success: (res) => {
+						var tempFilePaths = res.tempFilePaths;
+						if (_this.imgList.length+tempFilePaths.length > _this.imgMaxNum) {
+							uni.showToast({
+								title: '超过上传图片的最大数量',
+								icon: 'none'
+							})
+						} else {
+							if (_this.imgList.length != 0) {
+								_this.imgList = _this.imgList.concat(res.tempFilePaths);
+							} else {
+								_this.imgList = res.tempFilePaths;
+							}
+							for (var i = 0; i < tempFilePaths.length; i++) { 
+								uni.uploadFile({
+									url: "https://www.example.com/upload",
+									filePath: tempFilePaths[i],
+									name: "file", // 一定要与后台@RequestParam("file") MultipartFile变量名一致
+									success(res) {
+										console.log(res);
+									}
+								});
+							}
+						}
+					}
+				});
+			},
+			ViewImage(e) {
+				uni.previewImage({
+					urls: this.imgList,
+					current: e.currentTarget.dataset.url
+				});
+			},
+			DelImg(e) {
+				this.imgList.splice(e.currentTarget.dataset.index, 1)
+			},
+			
 			more(){
 				if (this.subsectionCurrent==0) {
 					uni.navigateTo({

+ 131 - 14
pages/repair/detail.vue

@@ -29,8 +29,8 @@
 		<u-cell-group>
 			<u-cell-item :arrow="false" icon="home" title="所在小区" :value="dataDetail.residentialName"></u-cell-item>
 			<u-cell-item :arrow="false" icon="map" title="维修位置" :value="dataDetail.reportPosition"></u-cell-item>
-			<u-cell-item :arrow="false" icon="clock" title="创建时间" :value="dataDetail.createTime"></u-cell-item>
-			<u-cell-item v-if="dataDetail.handleStatus==1" :arrow="false" icon="clock" title="完成时间" :value="dataDetail.handleTime"></u-cell-item>
+			<u-cell-item :arrow="false" icon="clock" title="创建时间" :value="dataDetail.beginTime"></u-cell-item>
+			<u-cell-item v-if="dataDetail.handleStatus==1" :arrow="false" icon="clock" title="完成时间" :value="dataDetail.endTime"></u-cell-item>
 		</u-cell-group>
 		<view class="cu-card dynamic no-card bg-white" style="padding: 30rpx;">
 			<view class="cu-item shadow">
@@ -64,11 +64,38 @@
 				处理工单
 			</view>
 		</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" label-position="top">
+							<u-form-item label="照片上传" >
+								<view class="cu-form-group">
+									<view class="grid col-4 grid-square flex-sub">
+										<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
+											<image :src="imgList[index]" mode="aspectFill"></image>
+											<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
+												<text class='cuIcon-close'></text>
+											</view>
+										</view>
+										<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
+											<text class='cuIcon-cameraadd'></text>
+										</view>
+									</view>
+								</view>
+							</u-form-item>
+							<u-form-item label="处理情况" required=true><u-input v-model="detail"/></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>
 </template>
 <script>
 	var app=getApp()
 	var that=this
+	var _this = this;
 	export default {
 		data() {
 			return {
@@ -76,7 +103,15 @@
 				id:'',
 				content:'',
 				dataDetail:{},
-				picArr:[]
+				picArr:[],
+				
+				//照片上传及处理情况
+				imgList: [],
+				imgMaxNum: 4,
+				detail:'',
+				
+				//弹出
+				popupShow:false,
 			}
 		},
 		onLoad(options) {
@@ -86,9 +121,13 @@
 		},
 		methods: {
 			fetchDataDetail(){
-				this.$api.residential.findEstateRepairById(this.id).then(res=>{
+				this.$api.estateRepair.detail(this.id).then(res=>{
 					this.dataDetail=res.data
-					this.picArr=this.dataDetail.pic.split(',')
+					if(this.dataDetail.pic){
+						this.picArr=this.dataDetail.pic.split(',')
+					}else{
+						this.picArr=[]
+					}
 				})
 			},
 			previewPic(index,picArr){
@@ -103,20 +142,98 @@
 					data:data
 				})
 			},
+			// handleRepair(){
+			// 	this.$showModel('确定把该工单置为已处理状态?').then(res=>{
+			// 		let params=this.dataDetail
+			// 		params.handleStatus=1
+			// 		params.estimateStatus=0
+			// 		this.$api.residential.addOrEditEstateRepair(params).then(res=>{
+			// 			this.$showModel('操作成功',false).then(res=>{
+			// 				uni.navigateBack({
+			// 					delta:1
+			// 				})
+			// 			})
+			// 		})
+			// 	})
+			// },
+			/**
+			 * @param {Object} item
+			 * 点击处理工单
+			 */
 			handleRepair(){
+				this.popupShow=true,
+				this.imgList = [],
+				this.detail = ''
+			},
+			/**
+			 * 确认提交工单情况
+			 */
+			submit(){
+				this.dataDetail.pic = this.imgList.join(",")
+				// this.dataDetail.
 				this.$showModel('确定把该工单置为已处理状态?').then(res=>{
-					let params=this.dataDetail
-					params.handleStatus=1
-					params.estimateStatus=0
-					this.$api.residential.addOrEditEstateRepair(params).then(res=>{
-						this.$showModel('操作成功',false).then(res=>{
-							uni.navigateBack({
-								delta:1
-							})
+					if(this.detail == ''){
+						this.$u.toast('请填写处理情况')
+						return
+					}else{
+						this.detailTemp.handleStatus=1,
+						this.detailTemp.estimateStatus=0
+						this.$api.estateRepair.submit(this.detailTemp).then(res=>{
+							this.$u.toast('操作成功')
+							this.mescroll.resetUpScroll()
+							this.popupShow=false
 						})
-					})
+					}
 				})
 			},
+			/**
+			 * @param {Object} index
+			 * 拍照或者从图库选择照片上传照片
+			 */
+			ChooseImage() {
+				_this = this;
+				uni.chooseImage({
+					count: 4, //默认9
+					sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['camera','album'], //从相机、相册选择
+					success: (res) => {
+						var tempFilePaths = res.tempFilePaths;
+						if (_this.imgList.length+tempFilePaths.length > _this.imgMaxNum) {
+							uni.showToast({
+								title: '超过上传图片的最大数量',
+								icon: 'none'
+							})
+						} else {
+							if (_this.imgList.length != 0) {
+								_this.imgList = _this.imgList.concat(res.tempFilePaths);
+							} else {
+								_this.imgList = res.tempFilePaths;
+							}
+							for (var i = 0; i < tempFilePaths.length; i++) { 
+								uni.uploadFile({
+									url: "https://www.example.com/upload",
+									filePath: tempFilePaths[i],
+									name: "file", // 一定要与后台@RequestParam("file") MultipartFile变量名一致
+									success(res) {
+										console.log(res);
+									}
+								});
+							}
+						}
+					}
+				});
+			},
+			ViewImage(e) {
+				uni.previewImage({
+					urls: this.imgList,
+					current: e.currentTarget.dataset.url
+				});
+			},
+			DelImg(e) {
+				this.imgList.splice(e.currentTarget.dataset.index, 1)
+			},
+			
+			
 			cancel(){
 				let that=this
 				uni.showModal({

+ 118 - 10
pages/repair/item.vue

@@ -1,12 +1,41 @@
 <template>
-	<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
-		<card @handelRepair="handelRepair" :list="list" @></card>
-	</MeScroll>
+	<view>
+		<MeScroll  :up="up" :down="down" @up="upFn" :fixed="false" @down="downFn" @init="initMeScroll">
+			<card @handleRepair="handleRepair" :list="list"></card>
+			<!-- 详情 -->
+					<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" label-position="top">
+								<u-form-item label="照片上传" >
+									<view class="cu-form-group">
+										<view class="grid col-4 grid-square flex-sub">
+											<view class="bg-img" v-for="(item,index) in imgList" :key="index" @tap="ViewImage" :data-url="imgList[index]">
+												<image :src="imgList[index]" mode="aspectFill"></image>
+												<view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
+													<text class='cuIcon-close'></text>
+												</view>
+											</view>
+											<view class="solids" @tap="ChooseImage" v-if="imgList.length<4">
+												<text class='cuIcon-cameraadd'></text>
+											</view>
+										</view>
+									</view>
+								</u-form-item>
+								<u-form-item label="处理情况" required=true><u-input v-model="detail"/></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>
+		</MeScroll>
+	</view>
 </template>
 <script>
 	import MeScroll from '@/components/mescroll-body/mescroll-uni.vue'
 	import card from '@/components/repair/repair'
 	var app=getApp()
+	var _this = this;
 	export default {
 		components:{
 			MeScroll,card
@@ -19,6 +48,15 @@
 		},
 		data() {
 			return {
+				//照片上传及处理情况
+				imgList: [],
+				imgMaxNum: 4,
+				detail:'',
+				detailTemp:{},
+				
+				//弹出
+				popupShow:false,
+				
 				isInit: false, // 是否初始化
 				list: [], // 列表数据
 				mescroll: null, // mescroll 对象
@@ -55,16 +93,86 @@
 			}
 		},
 		methods: {
-			handelRepair(item){
-				item.handleStatus=1
-				item.estimateStatus=0
+			/**
+			 * @param {Object} item
+			 * 点击处理工单
+			 */
+			handleRepair(item){
+				console.log("进入时item:", item)
+				this.detailTemp = item,
+				this.popupShow=true,
+				this.imgList = [],
+				this.detail = ''
+			},
+			/**
+			 * 确认提交工单情况s
+			 */
+			submit(){
+				this.detailTemp.picArr = this.imgList.join(",")
+				console.log("临时item",this.detailTemp)
+				// this.detailTemp.
 				this.$showModel('确定把该工单置为已处理状态?').then(res=>{
-					this.$api.estateRepair.submit(item).then(res=>{
-						this.$u.toast('操作成功')
-						this.mescroll.resetUpScroll()
-					})
+					if(this.detail == ''){
+						this.$u.toast('请填写处理情况')
+						return
+					}else{
+						this.detailTemp.handleStatus=1,
+						this.detailTemp.estimateStatus=0
+						this.$api.estateRepair.submit(this.detailTemp).then(res=>{
+							this.$u.toast('操作成功')
+							this.mescroll.resetUpScroll()
+							this.popupShow=false
+						})
+					}
 				})
 			},
+			/**
+			 * @param {Object} index
+			 * 拍照或者从图库选择照片上传照片
+			 */
+			ChooseImage() {
+				_this = this;
+				uni.chooseImage({
+					count: 4, //默认9
+					sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['camera','album'], //从相机、相册选择
+					success: (res) => {
+						var tempFilePaths = res.tempFilePaths;
+						if (_this.imgList.length+tempFilePaths.length > _this.imgMaxNum) {
+							uni.showToast({
+								title: '超过上传图片的最大数量',
+								icon: 'none'
+							})
+						} else {
+							if (_this.imgList.length != 0) {
+								_this.imgList = _this.imgList.concat(res.tempFilePaths);
+							} else {
+								_this.imgList = res.tempFilePaths;
+							}
+							for (var i = 0; i < tempFilePaths.length; i++) { 
+								uni.uploadFile({
+									url: "https://www.example.com/upload",
+									filePath: tempFilePaths[i],
+									name: "file", // 一定要与后台@RequestParam("file") MultipartFile变量名一致
+									success(res) {
+										console.log(res);
+									}
+								});
+							}
+						}
+					}
+				});
+			},
+			ViewImage(e) {
+				uni.previewImage({
+					urls: this.imgList,
+					current: e.currentTarget.dataset.url
+				});
+			},
+			DelImg(e) {
+				this.imgList.splice(e.currentTarget.dataset.index, 1)
+			},
+			
 			/**
 			 * @param {Object} mescroll 初始化组件
 			 */

+ 1 - 0
pages/repair/list.vue

@@ -29,6 +29,7 @@
 		},
 		data() {
 			return {
+				
 				//是否第一次进入页面
 				isfirst:false,
 				//动态让item主动刷新

+ 308 - 2
pages/residential/add.vue

@@ -1,8 +1,314 @@
 <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.name" placeholder="请输入小区名称"/>
+				</u-form-item>
+				<u-form-item label="归属" :required="true">
+					<u-input type="select" :select-open="agencyShow" v-model="form.agencyName"  placeholder="请选择归属" @click="agencyShow=true"></u-input>
+				</u-form-item>
+<!-- 				<u-form-item v-if="!$isEmpty(form.id)" label="详细地址" :required="true">
+					<u-input v-model="form.address" type="number" placeholder="详细地址"></u-input>
+				</u-form-item> -->
+				<u-form-item v-if="!$isEmpty(form.id)" label="物业" :required="true">
+					<u-input v-model="form.estatePidName" placeholder="请输入物业名称"/>
+				</u-form-item>
+				<u-form-item label="物业电话" required="true">
+					<u-input v-model="form.estatePidPhone"  placeholder="请填写物业电话"></u-input>
+				</u-form-item>
+				<u-form-item label="负责人姓名">
+					<u-input v-model="form.personName"  placeholder="请填写负责人姓名"></u-input>
+				</u-form-item>
+				<u-form-item label="负责人电话">
+					<u-input v-model="form.personTel"  placeholder="请填写负责人电话"></u-input>
+				</u-form-item>
+				<u-form-item label="小区图片" :border-bottom="false"></u-form-item>
+				<u-form-item>
+					<g-upload ref='gUpload' :mode="imgList" @chooseFile='chooseFile' @imgDelete='imgDelete' :columnNum="columnNum"></g-upload>
+				</u-form-item>
+				<u-form-item label="选择地址">
+					<input v-model="form.address"  placeholder="请选择地址"/>
+				</u-form-item>
+				<view>
+					<map style="width: 100%; height: 300px;" :latitude="form.latitude" :longitude="form.longitude" @click="getpoint">
+					</map>
+				</view>
+				<u-form-item label="备注" label-position="top">
+					<u-input type="textarea" height="300" maxlength="300" v-model="form.remark"  placeholder="请输入300字以内的备注介绍"></u-input>
+				</u-form-item>
+			</u-form>
+		</view>
+		
+		<!-- 归属筛选 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="agencyShow">
+			<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="agencyKeyword" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
+				</view>
+			</view>
+			<scroll-view v-if="!$isEmpty(agencyList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="agencyConfirm(item)" hover-class="hoverClass" class="text-center padding-30 solid-bottom"  v-for="(item,index) in agencyList" :key="index">
+					<text>{{item.label}}</text>
+				</view>
+				<u-divider v-if="agencyList.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>
+import gUpload from "@/components/g-upload/g-upload.vue"
+export default {
+	components:{gUpload},
+	name: '',
+	data() {
+		return {
+			//图片上传
+			title: '上传图片',
+			columnNum: 4,
+			imgList: [],
+			
+			labelStyle:{
+				"fontWeight":"600"
+			},
+			form:{
+				name:'',
+				agencyName:'',
+				agencyId:'',
+				houseType:'',
+				address:'',
+				orientation:'',
+				estatePidName:'',
+				estatePidPhone:'',
+				latitude: 38.473929061,
+				longitude: 106.288550642,
+				remark:'',
+				pic:[],
+			},
+			id:0, // 使用 marker点击事件 需要填写id
+			title: 'map',
+			covers: [{
+				latitude: 39.909,
+				longitude: 116.39742,
+				iconPath: '../../static/tarbar/ditubiaoji.png'
+			}],
+			//归属
+			agencyName:'',
+			agencyShow:false,
+			residentialKeyword:'',
+			agencyList:[],
+		};
+	},
+	onLoad(options) {
+		//加载小区数据
+		console.log(555,options)
+		this.fetchagencyList()
+		if (!this.$isEmpty(options.item)) {
+			this.form=JSON.parse(options.item)
+			// this.fetchDataDetail()
+			uni.setNavigationBarTitle({
+				title:"修改小区信息"
+			})
+		}
+	},
+	watch:{
+		//归属
+		agencyKeyword(){
+			let that=this
+			if (this.timer){
+				clearTimeout(this.timer)
+			}
+			this.timer = setTimeout(() => {
+				that.agencyList=[]
+				let params = {
+					isSelect: true,
+					regionArea: that.areaValue,
+					agencyName: that.agencyKeyword
+				}
+				that.fetchagencyList(params)
+			}, 500)
+		},
+	},
+	methods:{
+		/**
+		 * 获取地图位置
+		 */
+		getpoint(){
+			let that = this
+			uni.chooseLocation({
+				success: function (res) {
+					console.log(res)
+					console.log(333,that.form)
+					that.form.address = res.address+res.name
+					that.form.latitude = res.latitude
+					that.form.longitude = res.longitude
+				}
+			})
+		},
+		/**
+		 * 获取上个界面携带小区信息
+		 */
+		fetchDataDetail(){
+			this.$api.residential.page({id:this.form.id}).then(res=>{
+				console.log(res.list[0])
+				this.form=res.list[0]
+			})
+		},
+		/**
+		 * 上传图片方法
+		 */
+		//点击上传控件上传
+		uploadImg() {
+		  this.$refs.gUpload.uploadImg()
+		},
+		
+		/*
+		上传后返回的值:
+		list:上传后图片数组
+		v:返回当前上传图片的临时路径
+		*/
+		chooseFile(list, v) {
+		  console.log("上传图片_list:", list)
+		  console.log("上传图片_v:", v);
+		  this.uploadFileToServe(v)
+		},
+		
+		/*
+		删除图片:
+		list:删除返回删除后剩余的图片数组
+		eq:返回删除的数组
+		*/
+		imgDelete(list, eq) {
+		  console.log("删除图片_list:", list)
+		  console.log("删除图片_eq:", eq)
+		},
+		
+		/*
+		执行上传服务:
+		urlList:要上传的图片:数组类型
+		*/
+		uploadFileToServe(urlList) {
+		  if (!urlList || urlList.length <= 0) {
+		    return
+		  };
+		  for (let i = 0; i < urlList.length; i++) {
+		    uni.uploadFile({
+		      url: 'https://www.example.com/upload', //上传接口
+		      filePath: urlList[i],
+		      name: 'file',
+		      formData: {
+		        'user': 'test'
+		      },
+		      success: (uploadFileRes) => {
+		        console.log(uploadFileRes.data);
+		      }
+		    });
+		  }
+		},
+		/**
+		 * 获取小区数据列表
+		 */
+		// fetchagencyList(){
+		// 	let params={
+		// 		isSelect: true,
+		// 		name:this.residentialKeyword
+		// 	}
+		// 	this.$api.residential.page(params).then(res=>{
+		// 		this.agencyList = res.list
+		// 	})
+		// },
+		//点击选择归属时
+		agencyConfirm(item){
+			//赋值给提交的数据
+			this.form.agencyId=item.value
+			//赋值给回显的名称
+			this.form.agencyName=item.label
+			this.agencyShow=false
+		},
+		/**
+		 * 获取机构列表
+		 * @param {Object} params
+		 */
+		fetchagencyList(params){
+			let list = [];
+			this.$api.permissions.orgList(params).then(res=>{
+				console.log(res)
+				let list = [];
+					for(let item of res.data.records){
+						let element = {
+							label: item.parentName,
+							value: item.id
+						}
+						list.splice(list.length,0,element);
+						// list.push(obj);
+					}
+					this.agencyList = list;
+					console.log(444,this.agencyList)
+					// this.mescroll.resetUpScroll()
+			})
+		},
+		confirm(){
+			if (this.$isEmpty(this.form.name)) {
+				this.$u.toast('请输入小区名称')
+				return
+			}
+			if (this.$isEmpty(this.form.agencyId)) {
+				this.$u.toast("请选择归属")
+				return
+			}
+			if (this.$isEmpty(this.form.estatePidName)) {
+				this.$u.toast("请输入物业")
+				return
+			}
+			if (this.$isEmpty(this.form.estatePidPhone)) {
+				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>
-</style>
+<style lang="scss" scoped>
+	page{
+		background-color: #FFFFFF;
+	}
+</style>

+ 16 - 5
pages/residential/card.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="">
-		<view  class="data" v-for="(item, index) in list" :key="index">
+		<view @click="goDetail(item)" class="data" v-for="(item, index) in list" :key="index">
 			<view class="top">
 				<view class="left">
 					<view class="title">
@@ -10,7 +10,7 @@
 					</view>
 				</view>
 				
-				<!-- cichu -->
+				<!-- 物业 -->
 				<view class="right">
 					<text>{{item.estatePidName}}</text>
 				</view>
@@ -45,9 +45,9 @@
 				<view @click="edit(item)" class="cuIcon cu-btn round bg-blue light text-bold">
 					<text class="cuIcon-edit"></text>
 				</view>
-				<view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
+<!-- 				<view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
 					<text class="cuIcon-delete"></text>
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>
@@ -78,8 +78,18 @@ export default {
 				data:data
 			})
 		},
+		goDetail(item){
+			console.log(item)
+			uni.navigateTo({
+				// url:"/pages/residential/detail?id="+item.id
+				url:"/pages/residential/detail?item="+JSON.stringify(item)
+			})
+		},
 		edit(item){
-			this.$emit('edit',item)
+			uni.navigateTo({
+				// url:"/pages/residential/add?id="+item.id
+				url:"/pages/residential/add?item="+JSON.stringify(item)
+			})
 		},
 		delItem(item){
 			this.$emit('delItem',item)
@@ -118,6 +128,7 @@ export default {
 			}
 		}
 		.right{
+			margin-left: 30rpx;
 			margin-right: 10rpx;
 		}
 	}

+ 8 - 2
pages/residential/detail.vue

@@ -22,6 +22,9 @@
 					<u-form-item label="房间总数">
 						<u-input v-model="form.totalRoomNumber"  placeholder="暂无信息" disabled></u-input>
 					</u-form-item>
+					<u-form-item label="详细地址">
+						<u-input v-model="form.address"  placeholder="暂无信息" disabled></u-input>
+					</u-form-item>
 				</u-form>
 			</scroll-view>
 		</view>
@@ -59,7 +62,9 @@
 			}
 		},
 		onLoad(options) {
-			this.fetchDetail(options.id)
+			// this.fetchDetail(options.id)
+			console.log(options)
+			this.form = JSON.parse(options.item)
 		},
 		methods: {
 			//获取详情
@@ -77,7 +82,8 @@
 			//修改
 			edit(){
 				uni.navigateTo({
-					url:"./add?id="+this.form.id
+					// url:"./add?id="+this.form.id
+					url:"./add?item="+JSON.stringify(this.form)
 				})
 			},
 			//删除

+ 99 - 43
pages/residential/residential.vue

@@ -1,5 +1,21 @@
 <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 v-model="form.name" /></u-form-item>
+					<u-form-item label="所属机构" :required="true">
+						<u-input type="select" disabled @click="operaType=1;agencypopupShow=true" v-model="form.agencyName" />
+					</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" 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%;">
@@ -15,7 +31,7 @@
 			</view>
 		</mescroll-body>
 		<!-- 所属机构 -->
-		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="popupShow">
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="agencypopupShow">
 			<view class="fixed cu-bar search bg-white">
 				<view class="search-form round">
 					<text class="cuIcon-search"></text>
@@ -30,19 +46,19 @@
 			</scroll-view>
 			<u-empty v-else name="search"></u-empty>
 		</u-popup>
-		<!-- 小区名字筛选 -->
-		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="residentailShow">
+		<!-- 物业名称筛选 -->
+		<u-popup  border-radius="60" height="60%"  mode="bottom" v-model="estateShow">
 			<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"/>
+					<u-input style="width: 90%;" v-model="estateKeyWord" type="text" :adjust-position="false" placeholder="请输入关键字搜索" confirm-type="search"/>
 				</view>
 			</view>
-			<scroll-view v-if="!$isEmpty(list)"  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 list" :key="index">
-					<text>{{item.name}}</text>
+			<scroll-view v-if="!$isEmpty(searchList)"  style="padding-top: 110rpx;height: 100%;" :scroll-y="true" >
+				<view @click="estateComfirm(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="list.length>=10" height="80">只显示十条数据</u-divider>
+				<u-divider v-if="searchList.length>=10" height="80">只显示十条数据</u-divider>
 			</scroll-view>
 			<u-empty v-else name="search"></u-empty>
 		</u-popup>
@@ -70,6 +86,7 @@
 <script>
 	import card from "./card.vue"
 	import MescrollMixin from "@/components/mescroll-body/mescroll-mixins.js";
+	import util from "../../utils/util";
 	let that;
 	export default {
 		components:{
@@ -78,6 +95,10 @@
 		mixins:[MescrollMixin],
 		data() {
 			return {
+				//新增修改详情弹窗
+				agencypopupShow:false,
+				form:{},
+				operaType:0,
 
 				//顶部菜单栏
 				filterMenu: ["地区","归属","物业名称","筛选"],
@@ -99,8 +120,8 @@
 				agencyKeyword:'',
 				
 				//小区
-				residentailShow:false,
-				residentialKeyWord:'',
+				estateShow:false,
+				estateKeyWord:'',
 				list: [],
 				downOption: { 
 					use: true,
@@ -121,7 +142,7 @@
 		},
 		onLoad(){
 			that=this
-			this.getResidentailList()
+			this.getAgencyList()
 		},
 		onShow() {
 			if (this.canReset) {
@@ -146,7 +167,7 @@
 					this.getAgencyList(params)
 				}, 500)
 			},
-			residentialKeyWord(){
+			estateKeyWord(){
 				let that=this
 				//节流函数
 				if (this.timer){
@@ -156,7 +177,7 @@
 					that.residentialList=[]
 					let params={
 						agencyId:that.params.agencyId,
-						name:that.residentialKeyWord
+						estatePidName:that.estateKeyWord
 					}
 					that.getResidentailList(params)
 				}, 500)
@@ -204,8 +225,10 @@
 					this.$api.residential.pageBycondition(params).then(res=>{
 						console.log(res)
 						let data=res.data.records
+						// let data=res.list
 						let length=data.length
 						let total=res.data.total
+						// let total = res.list.length
 						mescroll.endBySize(length, total);
 						if(mescroll.num == 1) this.list = []; 
 						this.list=this.list.concat(data); 
@@ -223,8 +246,7 @@
 				this.areaValue=''
 				this.searchList=[]
 				this.agencyKeyword=''
-				this.unitList=[]
-				this.residentialKeyWord='',
+				this.estateKeyWord='',
 				this.list=[],
 				this.mescroll.resetUpScroll()
 			},
@@ -234,9 +256,13 @@
 			 */
 			getResidentailList(params){
 				console.log(params)
-				this.$api.residential.page(params).then(res=>{
+				// this.$api.residential.page(params).then(res=>{
+				// 	console.log(122,res)
+				// 	this.list =  res.list;
+				// })
+				this.$api.residential.pageBycondition(params).then(res=>{
 					console.log(122,res)
-					this.list =  res.list;
+					this.list =  res.data.records;
 				})
 			},
 			/**
@@ -251,11 +277,11 @@
 				}
 				if(index==1){
 					//归属
-					this.popupShow = true;
+					this.agencypopupShow = true;
 				 return;
 				}else if(index==2){
 					//物业名称
-					this.residentailShow=true
+					this.estateShow=true
 				}else if (index==3) {
 					//筛选
 					this.filterShow=true
@@ -276,50 +302,79 @@
 				this.data[0]= object.area.label;
 				this.areaValue = object.area.value;
 				let params = {
-					isSelect: true,
 					regionArea: this.areaValue
 				};
-				this.getAgencyList(params);
+				this.getAgencyList(params)
+				this.getResidentailList(params)
 			},
 			/**
-			 * 获取机构列表
+			 * 获取物业列表
 			 * @param {Object} params
 			 */
-			// getListByLikeName(params){
-			// 	let list = [];
-			// 	this.$api.permissions.orgList(params).then(res=>{
-			// 		console.log(res)
-			// 		let list = [];
-			// 			for(let item of res.data.records){
-			// 				let element = {
-			// 					label: item.name,
-			// 					value: item.id
-			// 				}
-			// 				list.splice(list.length,0,element);
-			// 				// list.push(obj);
-			// 			}
-			// 			this.searchList = list;
-			// 	})
-			// },
+			getListByLikeName(params){
+				let list = [];
+				this.$api.permissions.orgList(params).then(res=>{
+					console.log(res)
+					let list = [];
+						for(let item of res.data.records){
+							let element = {
+								label: item.name,
+								value: item.id
+							}
+							list.splice(list.length,0,element);
+							// list.push(obj);
+						}
+						this.searchList = list;
+						// this.mescroll.resetUpScroll()
+				})
+			},
+			/**
+			 * 物业确认
+			 */
+			estateComfirm(res){
+				console.log("物业确认:",res)
+				this.params.estatePid =res.value
+				this.data[2] = res.label
+				this.estateShow = false
+				console.log(res)
+				//获取小区
+				let params={
+					agencyId:this.params.agencyId,
+					estatePid:this.params.estatePid
+				}
+				this.$api.residential.pageBycondition(params).then(res=>{
+					console.log(333,res)
+					this.list =  res.data.records;
+				})
+				this.mescroll.resetUpScroll()
+			},
 			/**
 			 * 获取机构列表
 			 * @param {Object} params
 			 */
 			getAgencyList(params){
 				let list = [];
-				this.$api.permissions.orgList(params).then(res=>{
-					console.log(res)
+				let param = {
+					// flag:1,
+					// orgType:1,
+					// isSelect:true
+					current:1,
+					size:10
+				}
+				this.params.regionArea = params.regionArea
+				this.$api.permissions.orgList(param).then(res=>{
+					console.log("旧机构列表:",res)
 					let list = [];
 						for(let item of res.data.records){
 							let element = {
-								label: item.parentName,
+								label: item.name,
 								value: item.id
 							}
 							list.splice(list.length,0,element);
 							// list.push(obj);
 						}
 						this.searchList = list;
-						this.mescroll.resetUpScroll()
+						// this.mescroll.resetUpScroll()
 				})
 			},
 			/**
@@ -329,10 +384,11 @@
 				//筛选标题
 				this.params.agencyId =res.value
 				this.data[1] = res.label
-				this.popupShow = false
+				this.agencypopupShow = false
 				console.log(res)
 				//获取小区
 				let params={
+					regionArea:this.params.regionArea,
 					agencyId:this.params.agencyId
 				}
 				this.$api.residential.pageBycondition(params).then(res=>{

+ 2 - 2
pages/room/card.vue

@@ -45,9 +45,9 @@
 				<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 @click.stop="delItem(item)" class="cu-btn  sm round bg-red" style="margin: 0 10rpx;">
 					删除房间
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>

+ 2 - 2
pages/unit/card.vue

@@ -38,9 +38,9 @@
 				<view @click="edit(item)" class="cuIcon cu-btn round bg-blue light text-bold">
 					<text class="cuIcon-edit"></text>
 				</view>
-				<view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
+<!-- 				<view @click="delItem(item)" class="cuIcon cu-btn round bg-red light margin-left-20 text-bold">
 					<text class="cuIcon-delete"></text>
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>

+ 3 - 2
pages/user-auth/card.vue

@@ -4,8 +4,9 @@
 		<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="man-add-fill"  size="34" color="#50baca"></u-icon>
+					<view class="title flex align-center justify-center">
+						<image v-if="item.imageUri!=null" style="width: 60rpx;height: 60rpx; border-radius: calc(8rpx);" :src="'http://139.9.103.171:8888/'+item.imageUri"></image>
+						<u-icon v-else name="man-add-fill"  size="34" color="#50baca"></u-icon>
 						<text class="padding-left-10">姓名:{{item.name}}</text>
 					</view>
 				</view>

+ 6 - 5
pages/user/card.vue

@@ -4,12 +4,13 @@
 		<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="man-add-fill"  size="34" color="#50baca"></u-icon>
+					<view class="title flex justify-center align-center">
+						<image v-if="item.imageUri!=null" style="width: 60rpx;height: 60rpx;border-radius: calc(8rpx);" :src="item.fastDfsServer+item.imageUri"></image>
+						<u-icon v-else name="man-add-fill"  size="34" color="#50baca"></u-icon>
 						<text class="padding-left-10">姓名:{{item.name}}</text>
 					</view>
 				</view>
-				<view class="right flex">
+				<view class="right flex justify-center align-center">
 					<text>人脸审核状态:</text>
 					<text class="text-yellow" v-if="item.checkState==-1">待上传</text>
 					<text class="text-orange" v-else-if="item.checkState==0">待审核</text>
@@ -50,9 +51,9 @@
 				<view @click.stop="edit(item)" class="cu-btn  sm round line-blue" style="margin: 0 10rpx;">
 					修改信息
 				</view>
-				<view @click.stop="deleteItem(item)" class="cu-btn  sm round bg-red" style="margin: 0 10rpx;">
+<!-- 				<view @click.stop="deleteItem(item)" class="cu-btn  sm round bg-red" style="margin: 0 10rpx;">
 					删除记录
-				</view>
+				</view> -->
 			</view>
 		</view>
 	</view>

+ 0 - 1
static/iconfont.css

@@ -134,4 +134,3 @@
 .custom-icon-fangjian:before {
   content: "\e65f";
 }
-

BIN
static/tarbar/ditubiaoji.png