以房找人
| @@ -129,7 +129,6 @@ export default { | ||||
|     this.form.phone = this.user.phone | ||||
|     this.form.name = this.user.realName || '' | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     chooseAddress() { | ||||
|       uni.authorize({ | ||||
|   | ||||
| @@ -128,6 +128,7 @@ export default { | ||||
|       aiConfigName: '', | ||||
|       showType: false, | ||||
|       showPopup: true, | ||||
|       latLng: '' | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
| @@ -222,7 +223,13 @@ export default { | ||||
|         return this.$u.toast("请先进行登录") | ||||
|       } | ||||
|       this.$loading() | ||||
|       this.$instance.post("/app/appaicopilotinfo/add", {content: this.content, appType: 0, areaId: this.areaId, aiConfigId: this.aiConfigId}).then(res => { | ||||
|       this.$instance.post("/app/appaicopilotinfo/add", { | ||||
|         content: this.content,  | ||||
|         appType: 0,  | ||||
|         areaId: this.areaId,  | ||||
|         aiConfigId: this.aiConfigId, | ||||
|         supplementContent: this.latLng | ||||
|       }).then(res => { | ||||
|         if(res.code == 0) { | ||||
|           this.content = '' | ||||
|           this.messageList.push(res.data[0]) | ||||
| @@ -329,6 +336,15 @@ export default { | ||||
|       this.aiConfigId = val[0].value | ||||
|       this.aiConfigName = val[0].label | ||||
|       this.messageList = [] | ||||
|       this.typeList.map((item) => { | ||||
|         if(item.dictValue == this.aiConfigId) { | ||||
|           if(item.ability == 1) { | ||||
|             this.getLocation() | ||||
|           }else { | ||||
|             this.latLng = '' | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getAiTypeList() { | ||||
|       this.$instance.post(`/app/appaiconfiginfo/list?status=1`).then(res => { | ||||
| @@ -343,7 +359,42 @@ export default { | ||||
|           // this.getHistoryList() | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|     }, | ||||
|     getLocation() { | ||||
|       wx.authorize({ | ||||
|         scope: 'scope.userLocation', | ||||
|         success: () => { | ||||
|           uni.getLocation({ | ||||
|             type: 'gcj02', | ||||
|             success: res => { | ||||
|               this.latLng = `${res.latitude},${res.longitude}` | ||||
|             }, | ||||
|             fail: e => { | ||||
|               console.log(e) | ||||
|             } | ||||
|           }) | ||||
|         }, | ||||
|         fail: () => { | ||||
|           this.$dialog.confirm({ | ||||
|             content: '您未授权定位,功能将无法使用' | ||||
|           }).then(() => { | ||||
|             uni.openSetting({ | ||||
|               success: res => { | ||||
|                 if (!res.authSetting['scope.userLocation']) { | ||||
|                   this.$dialog.alert({ | ||||
|                     content: '您未授权定位,功能将无法使用' | ||||
|                   }).then(() => { | ||||
|                   }) | ||||
|                 } else { | ||||
|  | ||||
|                 } | ||||
|               } | ||||
|             }) | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|      | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|   | ||||
| @@ -1,48 +0,0 @@ | ||||
| <template> | ||||
|   <div class="AppPageInteraction"> | ||||
|     <AiListPage :label="label" :appList="appList" :headerBg="headerBg"/> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'AppPageInteraction', | ||||
|   appName: '工作台(居民管理)', | ||||
|   data() { | ||||
|     return { | ||||
|       label: '居民管理', | ||||
|       appList: [ | ||||
|         { | ||||
|           name: '居民信息管理', | ||||
|           icon: require('./img/jmhd.png'), | ||||
|           url: '../AppResidentFile/AppResidentFile' | ||||
|         }, | ||||
|         { | ||||
|           name: '居民档案', | ||||
|           icon: require('./img/jmda.png'), | ||||
|           url: '../AppPeopleList/AppPeopleList' | ||||
|         }, | ||||
|         // { | ||||
|         //   name: '小程序公告', | ||||
|         //   icon: require('./img/xcxgg.png'), | ||||
|         //   url: '../AppUniMsg/AppUniMsg' | ||||
|         // } | ||||
|       ], | ||||
|       headerBg: require('./img/header-bg.png'), | ||||
|     } | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = "居民管理" | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| uni-page-body { | ||||
|   height: 100%; | ||||
| } | ||||
|  | ||||
| .AppPageInteraction { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
| Before Width: | Height: | Size: 46 KiB | 
| Before Width: | Height: | Size: 28 KiB | 
| Before Width: | Height: | Size: 40 KiB | 
| Before Width: | Height: | Size: 684 KiB | 
| Before Width: | Height: | Size: 31 KiB | 
| @@ -1,379 +0,0 @@ | ||||
| <template> | ||||
|   <div class="add"> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">居民类型</span> | ||||
|         <span class="value" @click="clickSelect('residentType', 'residentType')"> | ||||
|           <span v-if="form.residentType === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('residentType', form.residentType)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">是否户主</span> | ||||
|         <span class="value" @click="clickSelect('yesOrNo', 'householdName')"> | ||||
|           <span v-if="form.householdName === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('yesOrNo', form.householdName)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item" v-if="form.householdName != 1"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">户主身份证</span> | ||||
|         <span class="value"> | ||||
|           <input type="idcard" placeholder="请输入" v-model="form.householdIdNumber" maxlength="18"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item" v-if="form.householdName != 1"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">与户主关系</span> | ||||
|         <span class="value" @click="clickSelect('householdRelation', 'householdRelation')"> | ||||
|           <span v-if="form.householdRelation === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('householdRelation', form.householdRelation)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">姓名</span> | ||||
|         <span class="value"> | ||||
|           <input type="text" placeholder="请输入" v-model="form.name" maxlength="10" :disabled="this.form.id ? true : false"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">身份证号</span> | ||||
|         <span class="value"> | ||||
|           <input type="idcard" placeholder="请输入" v-model="form.idNumber" maxlength="18" @input="changeIdNumber" :disabled="this.form.id ? true : false"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">性别</span> | ||||
|         <span class="value"> | ||||
|           <span v-if="form.sex === ''" class="color-999">请选择</span> | ||||
|           <span v-else>{{$dict.getLabel('sex', form.sex)}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">出生日期</span> | ||||
|         <span class="value"> | ||||
|           <span :class="form.birthDate == '' ? 'color-999' : ''">{{form.birthDate || '请选择'}}</span> | ||||
|           <img src="./components/img/right-icon.png" alt=""> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border"> | ||||
|         <span class="label">联系电话</span> | ||||
|         <span class="value"> | ||||
|           <input type="text" placeholder="请输入" @input="changePhone" v-model="form.phone" maxlength="11"> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips">*</span> | ||||
|       <div class="border"> | ||||
|         <span class="label">现住址</span> | ||||
|         <span class="value"> | ||||
|           <AiAreaPicker ref="address" class="aiArea" :areaId="user.areaId" :fullName.sync="form.currentAreaName" :value="form.currentAreaId" mode="custom" @select="onCurrentAreaChange"> | ||||
|             <div class="aiArea"> | ||||
|               <span class="label" v-if="form.currentAreaName">{{ form.currentAreaName }}</span> | ||||
|               <span v-else class="color-999">请选择</span> | ||||
|               <img src="./components/img/right-icon.png" alt=""> | ||||
|             </div> | ||||
|           </AiAreaPicker> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item mar-b0"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border not-border"> | ||||
|         <span class="label">详细地址</span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="text-area"> | ||||
|       <textarea placeholder="请输入" maxlength="30" v-model="form.currentAddress"></textarea> | ||||
|     </div> | ||||
|     <div class="item"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border"> | ||||
|         <span class="label">户籍地址</span> | ||||
|         <span class="value"> | ||||
|           <AiAreaPicker ref="address" class="aiArea" :areaId="user.areaId" :fullName.sync="form.householdAreaName" all :value="form.householdAreaId" mode="custom" @select="onHouseAreaChange"> | ||||
|             <div class="aiArea"> | ||||
|               <span class="label" v-if="form.householdAreaName">{{ form.householdAreaName }}</span> | ||||
|               <span v-else class="color-999">请选择</span> | ||||
|               <img src="./components/img/right-icon.png" alt=""> | ||||
|             </div> | ||||
|           </AiAreaPicker> | ||||
|         </span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="item mar-b0"> | ||||
|       <span class="tips"></span> | ||||
|       <div class="border not-border"> | ||||
|         <span class="label">详细地址</span> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="text-area"> | ||||
|       <textarea placeholder="请输入" maxlength="30" v-model="form.householdAddress"></textarea> | ||||
|     </div> | ||||
|     <div class="pad-b152"></div> | ||||
|     <div class="add-btn" @click="submit"> | ||||
|       <div>保存</div> | ||||
|     </div> | ||||
|     <u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue"  @confirm="confirmSelect"/> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapState } from 'vuex' | ||||
| export default { | ||||
|   name: 'add', | ||||
|   data() { | ||||
|     return { | ||||
|       form: { | ||||
|         id: '', | ||||
|         householdName: '', | ||||
|         householdIdNumber: '', | ||||
|         householdRelation: '', | ||||
|         name: '', | ||||
|         idNumber: '', | ||||
|         sex: '', | ||||
|         birthDate: '', | ||||
|         phone: '', | ||||
|         currentAreaId: '', | ||||
|         currentAreaName: '', | ||||
|         currentAddress: '', | ||||
|         householdAreaId: '', | ||||
|         householdAreaName: '', | ||||
|         householdAddress: '', | ||||
|         residentType: '', | ||||
|         age: '' | ||||
|       }, | ||||
|       showSelect: false, | ||||
|       formName: '', | ||||
|       selectList: [] | ||||
|     } | ||||
|   }, | ||||
|   onLoad(options) { | ||||
|     this.$dict.load('yesOrNo', 'sex', 'householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'residentType').then(() => { | ||||
|       if(options.id) { | ||||
|         document.title = '编辑居民' | ||||
|         this.form.id = options.id | ||||
|         this.getDetail() | ||||
|       }else { | ||||
|         document.title = '新增居民' | ||||
|         this.form.residentType = options.type || '' | ||||
|       } | ||||
|     }) | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|   }, | ||||
|   methods: { | ||||
|     submit() { | ||||
|       if(this.form.residentType === '') { | ||||
|         return this.$u.toast('请选择居民类型') | ||||
|       } | ||||
|       if(this.form.householdName === '') { | ||||
|         return this.$u.toast('请选择是否户主') | ||||
|       } | ||||
|       if(this.form.householdName != 1 && !this.form.householdIdNumber) { | ||||
|         return this.$u.toast('请输入户主身份证') | ||||
|       } | ||||
|       if(this.form.householdName != 1 && this.form.householdRelation === '') { | ||||
|         return this.$u.toast('请选择与户主关系') | ||||
|       } | ||||
|       if(!this.form.name) { | ||||
|         return this.$u.toast('请输入姓名') | ||||
|       } | ||||
|       if(!this.form.idNumber) { | ||||
|         return this.$u.toast('请输入身份证号') | ||||
|       } | ||||
|       if(!this.form.sex) { | ||||
|         return this.$u.toast('请选择性别') | ||||
|       } | ||||
|       if(!this.form.birthDate) { | ||||
|         return this.$u.toast('请选择出生日期') | ||||
|       } | ||||
|       if(!this.form.currentAreaId) { | ||||
|         return this.$u.toast('请选择现住址') | ||||
|       } | ||||
|       if(!/[^0]0{0,2}$/.test(this.form.currentAreaId)) { | ||||
|         return this.$u.toast('现住址必须选到村级') | ||||
|       } | ||||
|       if(this.form.householdAreaId && !/[^0]0{0,2}$/.test(this.form.householdAreaId)) { | ||||
|         return this.$u.toast('户籍地必须选到村级') | ||||
|       } | ||||
|       this.form.age =  this.$calcAge(this.form.idNumber) | ||||
|       this.$instance.post('/app/appresident/addOrUpdate', this.form).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.$u.toast('新增成功') | ||||
|           uni.$emit('reload') | ||||
|           uni.navigateBack({ | ||||
|             delta: 1 | ||||
|           }) | ||||
|         } | ||||
|       }).catch((err) => { | ||||
|         this.$u.toast(err) | ||||
|       }) | ||||
|  | ||||
|     }, | ||||
|     confirmSelect(e) { | ||||
|       this.form[this.formName] = e[0].value | ||||
|     }, | ||||
|     clickSelect(dictName, formName) { | ||||
|       this.selectList = this.$dict.getDict(dictName) | ||||
|       this.formName = formName | ||||
|       this.showSelect = true | ||||
|     }, | ||||
|     changeIdNumber() { | ||||
|       let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; | ||||
|       if (this.form.idNumber.length == 18 && !reg.test(this.form.idNumber)) { | ||||
|         return this.$u.toast('请输入正确的身份证号码') | ||||
|       } | ||||
|       var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) | ||||
|       this.form.birthDate = info.birthday | ||||
|       this.form.sex = info.gender | ||||
|       console.log(this.form) | ||||
|       this.$forceUpdate() | ||||
|     }, | ||||
|  | ||||
|     changePhone() { | ||||
|       let regTel = /^1(3\d|4[5-9]|5[0-35-9]|6[567]|7[0-8]|8\d|9[0-35-9])\d{8}$/ | ||||
|       if (this.form.phone.length == 11 && !regTel.test(this.form.phone)) { | ||||
|         return this.$u.toast('请输入正确的手机号') | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     onCurrentAreaChange(e) { | ||||
|       this.form.currentAreaId = e | ||||
|     }, | ||||
|  | ||||
|     onHouseAreaChange(e) { | ||||
|       this.form.householdAreaId = e | ||||
|     }, | ||||
|  | ||||
|     getDetail() { | ||||
|       this.$instance.post(`/app/appresident/detail?id=${this.form.id}`).then(res => { | ||||
|         if (res.code === 0) { | ||||
|           this.form = {...res.data.resident} | ||||
|           var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber) | ||||
|           this.form.birthDate = info.birthday | ||||
|           this.form.sex = info.gender | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .add { | ||||
|   .item{ | ||||
|     width: 100%; | ||||
|     padding-left: 14px; | ||||
|     background: #FFF; | ||||
|     box-sizing: border-box; | ||||
|     display: flex; | ||||
|     margin-bottom: 16px; | ||||
|     .tips{ | ||||
|       width: 18px; | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #FF4466; | ||||
|       line-height: 44px; | ||||
|       padding: 34px 0 34px 0; | ||||
|     } | ||||
|     .border{ | ||||
|       width: calc(100% - 18px); | ||||
|       padding: 34px 32px 34px 0; | ||||
|       line-height: 44px; | ||||
|       border-bottom: 1px solid #D8DDE6; | ||||
|       line-height: 44px; | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #333; | ||||
|       display: flex; | ||||
|       box-sizing: border-box; | ||||
|       .label{ | ||||
|         width: 170px; | ||||
|       } | ||||
|       .value{ | ||||
|         width: calc(100% - 170px); | ||||
|         text-align: right; | ||||
|         img{ | ||||
|           width: 32px; | ||||
|           height: 32px; | ||||
|           margin-left: 8px; | ||||
|           vertical-align: middle; | ||||
|         } | ||||
|       } | ||||
|       .color-999{ | ||||
|         color: #999; | ||||
|       } | ||||
|     } | ||||
|     .not-border{ | ||||
|       border-bottom: 0; | ||||
|     } | ||||
|   } | ||||
|   .mar-b0{ | ||||
|     margin-bottom: 0; | ||||
|   } | ||||
|   .text-area{ | ||||
|     width: 100%; | ||||
|     background-color: #fff; | ||||
|     padding: 0 32px; | ||||
|     margin-bottom: 16px; | ||||
|     box-sizing: border-box; | ||||
|     textarea{ | ||||
|       width: 100%; | ||||
|       height: 88px; | ||||
|       padding-bottom: 32px; | ||||
|     } | ||||
|   } | ||||
|   .pad-b152{ | ||||
|     width: 100%; | ||||
|     padding-bottom: 152px; | ||||
|     background-color: #f5f5f5; | ||||
|   } | ||||
|   .add-btn{ | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|     z-index: 999; | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     background: #3975C6; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|     div{ | ||||
|       text-align: center; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,64 +0,0 @@ | ||||
| <template> | ||||
|   <div class="AppPeopleList"> | ||||
|     <div class="banner" v-for="(item, index) in bannerList" :key="index" @click="linkTo(item.linkUrl)"> | ||||
|       <img :src="item.img" alt=""> | ||||
|       <p>{{item.title}}</p> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'AppPeopleList', | ||||
|   appName: '居民档案', | ||||
|   data() { | ||||
|     return { | ||||
|       bannerList: [ | ||||
|         { | ||||
|           img: require('./components/img/blue-bg.png'), | ||||
|           title: '查看居民档案', | ||||
|           linkUrl: './PeopleList' | ||||
|         }, | ||||
|         { | ||||
|           img: require('./components/img/green-bg.png'), | ||||
|           title: '居民档案审核', | ||||
|           linkUrl: './ExamineList' | ||||
|         } | ||||
|       ] | ||||
|     } | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '居民档案' | ||||
|   }, | ||||
|   methods: { | ||||
|     linkTo(url) { | ||||
|       uni.navigateTo({url}) | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppPeopleList{ | ||||
|   height: 100%; | ||||
|   padding-top: 16px; | ||||
|   .banner{ | ||||
|     padding: 32px 40px 0; | ||||
|     position: relative; | ||||
|     img{ | ||||
|       width: 100%; | ||||
|       height: 228px; | ||||
|     } | ||||
|     p{ | ||||
|       position: absolute; | ||||
|       top: 120px; | ||||
|       left: 88px; | ||||
|       font-size: 44px; | ||||
|       font-family: PingFang-SC-Heavy, PingFang-SC; | ||||
|       font-weight: 800; | ||||
|       color: #FFF; | ||||
|       line-height: 60px; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,99 +0,0 @@ | ||||
| <template> | ||||
|   <div class="Content"> | ||||
|     <div class="text-area"> | ||||
|       <div class="title"><span class="tips">*</span>不通过理由</div> | ||||
|       <textarea placeholder="请输入" maxlength="200" v-model="opinion"></textarea> | ||||
|       <div class="num">{{opinion.length}}/200</div> | ||||
|       <!-- <u-input v-model="opinion" type="textarea" placeholder="请输入"  maxlength="500" /> --> | ||||
|     </div> | ||||
|     <div class="footer" @click="examine(0)"> | ||||
|       <div class="btn">保存</div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: "Content", | ||||
|   data() { | ||||
|     return { | ||||
|       opinion: '', | ||||
|       id: '', | ||||
|     }; | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '居民档案审核' | ||||
|   }, | ||||
|   onLoad(option) { | ||||
|     this.id = option.id | ||||
|   }, | ||||
|   methods: { | ||||
|     examine(pass) { | ||||
|       if(!this.opinion) { | ||||
|         return this.$u.toast('请输入不通过理由') | ||||
|       } | ||||
|       this.$instance.post(`/app/appresident/examine?id=${this.id}&pass=${pass}&opinion=${this.opinion}`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.$u.toast('审核成功') | ||||
|           uni.$emit('updatePeople') | ||||
|           setTimeout(() => { | ||||
|             uni.navigateBack({delta: 2}) | ||||
|           }, 600) | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .Content { | ||||
|   .text-area{ | ||||
|     padding: 34px 32px; | ||||
|     background-color: #fff; | ||||
|     .title{ | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #333; | ||||
|       line-height: 44px; | ||||
|       margin-bottom: 32px; | ||||
|       .tips{ | ||||
|         font-size: 32px; | ||||
|         margin-right: 8px; | ||||
|         color: #f46; | ||||
|       } | ||||
|     } | ||||
|     textarea{ | ||||
|       width: 100%; | ||||
|       height: 500px; | ||||
|       word-break: break-all; | ||||
|     } | ||||
|   } | ||||
|   .num{ | ||||
|     text-align: right; | ||||
|     color: #999; | ||||
|   } | ||||
|   .footer { | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|   } | ||||
|   .btn { | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     background: #3975C6; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|   } | ||||
|   .line-bg { | ||||
|     width: 100%; | ||||
|     height: 16px; | ||||
|     background: #F5F5F5; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,222 +0,0 @@ | ||||
| <template> | ||||
|   <div class="DetailCard"> | ||||
|     <div class="top"></div> | ||||
|  | ||||
|     <div class="middle"> | ||||
|       <div class="hint">家庭地址</div> | ||||
|  | ||||
|       <div class="areaHint"> | ||||
|         <u-icon name="map-fill" color="#73ABFF"></u-icon> | ||||
|         <span>{{resident.currentAreaName}}{{resident.currentAddress || ''}}</span> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="bottom"> | ||||
|       <div class="hints">家庭成员 {{ data.family && data.family.length }}人</div> | ||||
|  | ||||
|       <div v-if="data.family && data.family.length > 0"> | ||||
|         <div class="card" v-for="(item, i) in data.family" :key="i" @click="toDetailPeople(item)"> | ||||
|           <div class="photos"> | ||||
|             <img :src="item.photo" alt="" v-if="item.photo" /> | ||||
|             <img src="./components/img/44.png" alt="" v-else /> | ||||
|           </div> | ||||
|  | ||||
|           <div class="right"> | ||||
|             <div class="rightTop"> | ||||
|               <div class="rightTop-lefts"> | ||||
|                 <span class="names">{{ item.name }}</span> | ||||
|                 <span class="fileStatuss" v-if="item.fileStatus == 1"> 已注销</span> | ||||
|                 <span class="householdNames" v-if="item.householdName == 1">户主</span> | ||||
|                 <span class="householdNames" v-else> | ||||
|                   {{ $dict.getLabel('householdRelation', item.householdRelation) }} | ||||
|                 </span> | ||||
|               </div> | ||||
|  | ||||
|               <div class="rightTop-rights"> | ||||
|                 <u-section :show-line="false" sub-title="详情"></u-section> | ||||
|               </div> | ||||
|             </div> | ||||
|  | ||||
|             <div class="rightBottom"> | ||||
|               <span>身份证号:</span> | ||||
|               <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|             </div> | ||||
|             <!-- <div class="spacial" v-if="item.idNumber == data.resident.idNumber"> | ||||
|               <span v-for="(e,index) in spacialList" :key="index">{{e.applicationName}}</span> | ||||
|             </div> --> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|  | ||||
|       <AiEmpty v-else></AiEmpty> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'DetailCard', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       id: '', | ||||
|       data: [], | ||||
|       resident: {}, | ||||
|       // spacialList: [], | ||||
|     } | ||||
|   }, | ||||
|   computed: {}, | ||||
|   watch: {}, | ||||
|   onLoad(o) { | ||||
|     this.id = o.id | ||||
|     this.$dict.load('householdRelation', 'fileStatus').then(() => { | ||||
|       this.getDetail() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '居民档案' | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       this.$instance.post(`/app/appresident/detail?id=${this.id}`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.data = res.data | ||||
|           this.$forceUpdate() | ||||
|           this.$nextTick(() => { | ||||
|             this.resident = res.data.resident | ||||
|             // this.spacialList = res.data.resident.tsrqInfos | ||||
|             this.$forceUpdate() | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     toDetailPeople(item) { | ||||
|       uni.navigateTo({ url: `./DetailPeople?id=${item.id}&type=0` }) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .DetailCard { | ||||
|   height: 100%; | ||||
|   .top { | ||||
|     height: 112px; | ||||
|     background: #3975c6; | ||||
|   } | ||||
|  | ||||
|   .middle { | ||||
|     margin: -80px 32px 0 32px; | ||||
|     padding: 38px 30px 78px 28px; | ||||
|     background: #ffffff; | ||||
|     box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02); | ||||
|     border-radius: 16px; | ||||
|     z-index: 999; | ||||
|     .hint { | ||||
|       font-size: 32px; | ||||
|       font-weight: 500; | ||||
|       color: #333333; | ||||
|     } | ||||
|     .areaHint { | ||||
|       margin-top: 38px; | ||||
|       span { | ||||
|         margin-left: 14px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .bottom { | ||||
|     margin: 32px 30px 48px 30px; | ||||
|     background: #fff; | ||||
|     padding: 38px 30px 30px 30px; | ||||
|     .hints { | ||||
|       margin-bottom: 38px; | ||||
|     } | ||||
|     .card { | ||||
|       display: flex; | ||||
|       box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.08); | ||||
|       border-radius: 16px; | ||||
|       padding: 48px 32px; | ||||
|       margin-bottom: 32px; | ||||
|       .photos { | ||||
|         img { | ||||
|           width: 96px; | ||||
|           height: 96px; | ||||
|           border-radius: 50%; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .right { | ||||
|         display: flex; | ||||
|         flex-direction: column; | ||||
|         margin-left: 40px; | ||||
|         width: 100%; | ||||
|         .rightTop { | ||||
|           display: flex; | ||||
|           justify-content: space-between; | ||||
|           .rightTop-lefts { | ||||
|             .names { | ||||
|               font-size: 32px; | ||||
|               font-weight: 600; | ||||
|             } | ||||
|             .householdNames { | ||||
|               margin-left: 30px; | ||||
|               font-size: 26px; | ||||
|               font-weight: 500; | ||||
|               color: #5aad6a; | ||||
|             } | ||||
|             .fileStatuss { | ||||
|               display: inline-block; | ||||
|               margin-left: 30px; | ||||
|               color: #ff4466; | ||||
|               background: #ffecef; | ||||
|               border-radius: 8px; | ||||
|               width: 88px; | ||||
|               height: 40px; | ||||
|               line-height: 40px; | ||||
|               text-align: center; | ||||
|             } | ||||
|           } | ||||
|           .rightTop-rights { | ||||
|             ::v-deep .u-section { | ||||
|               .u-section__right-info { | ||||
|                 color: #3975c6 !important; | ||||
|                 .u-section__right-info__icon-arrow { | ||||
|                   .u-icon { | ||||
|                     .u-icon__icon { | ||||
|                       color: #3975c6 !important; | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         .rightBottom { | ||||
|           margin-top: 20px; | ||||
|         } | ||||
|         // .spacial { | ||||
|         //   margin-top: 10px; | ||||
|         //   white-space: wrap; | ||||
|         //   span { | ||||
|         //     margin-right: 10px; | ||||
|         //     color: #ff4466; | ||||
|         //   } | ||||
|         // } | ||||
|       } | ||||
|     } | ||||
|     .card:nth-child(2n-1) { | ||||
|       // background: royalblue; | ||||
|       background: url(http://respub.sinoecare.net/20211222/装饰-20211222162743.png) no-repeat; | ||||
|       background-size: 100% 100%; | ||||
|     } | ||||
|     .card:nth-child(2n) { | ||||
|       // background: pink; | ||||
|       background: url(http://respub.sinoecare.net/20211222/装饰2-20211222162934.png) no-repeat; | ||||
|       background-size: 100% 100%; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,404 +0,0 @@ | ||||
| <template> | ||||
|   <div class="DetailPeople" v-if="data.resident"> | ||||
|  | ||||
|     <div class="top"> | ||||
|       <div class="photos"> | ||||
|         <img :src="data.resident.photo" alt="" v-if="data.resident && data.resident.photo" /> | ||||
|         <img src="./components/img/44.png" alt="" v-else /> | ||||
|       </div> | ||||
|  | ||||
|       <div class="right"> | ||||
|         <div class="rightTop"> | ||||
|           <span class="names">{{ data.resident && data.resident.name }}<span v-if="data.resident.fileStatus == 1" class="fileStatuss"> 已注销 </span></span> | ||||
|           <span class="householdNames" v-if="data.resident && data.resident.householdName == 1">户主</span> | ||||
|           <span class="householdNames" v-else> | ||||
|             {{ $dict.getLabel('householdRelation', data.resident && data.resident.householdRelation) }} | ||||
|           </span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="rightBottom" v-if="data.resident && data.resident.phone">{{ data.resident.phone }}</div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="line"></div> | ||||
|  | ||||
|     <div class="tab-list"> | ||||
|       <div v-for="(item, index) in tabList" :key="index" :class="tabIndex == index ? 'tab-item active' : 'tab-item' " @click="tabIndex=index"> | ||||
|         <div v-if="index == 0"> | ||||
|           <img :src="item.activeIcon" alt="" v-if="tabIndex==0"> | ||||
|           <img :src=" item.icon" alt="" v-if="tabIndex!=0"> | ||||
|         </div> | ||||
|         <div v-if="index != 0"> | ||||
|           <img src="./components/img/tsrq备份@2x.png" alt="" v-if="tabIndex==index && index != 0"> | ||||
|           <img src="./components/img/tsrq@2x.png" alt="" v-if="tabIndex!=index && index != 0"> | ||||
|         </div> | ||||
|          | ||||
|         <p v-if="index==0">{{item.name}}</p> | ||||
|         <p v-else class="type">{{item.applicationName}}</p> | ||||
|       </div> | ||||
|     </div> | ||||
|     <!-- 基本信息 --> | ||||
|     <div v-if="tabIndex == 0"> | ||||
|       <div class="middle"> | ||||
|       <div class="hint">个人基本信息</div> | ||||
|  | ||||
|       <div class="contents"> | ||||
|         <div class="item"> | ||||
|           <span>籍贯</span> | ||||
|           <span>{{ data.resident && data.resident.birthplaceAreaName }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>身份证号</span> | ||||
|           <span>{{ data.resident && data.resident.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>民族</span> | ||||
|           <span v-if="data.resident && data.resident.nation"> {{ $dict.getLabel('nation', data.resident.nation) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>文化程度</span> | ||||
|           <span v-if="data.resident && data.resident.education">{{ $dict.getLabel('education', data.resident.education) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>婚姻状况</span> | ||||
|           <span v-if="data.resident && data.resident.maritalStatus">{{ $dict.getLabel('maritalStatus', data.resident.maritalStatus) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>政治面貌</span> | ||||
|           <span v-if="data.resident && data.resident.politicsStatus">{{ $dict.getLabel('politicsStatus', data.resident.politicsStatus) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>兵役状况</span> | ||||
|           <span v-if="data.resident && data.resident.militaryStatus">{{ $dict.getLabel('militaryStatus', data.resident.militaryStatus) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>宗教信仰</span> | ||||
|           <span v-if="data.resident && data.resident.faithType">{{ $dict.getLabel('faithType', data.resident.faithType) }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span>职业</span> | ||||
|           <span v-if="data.resident && data.resident.job">{{ $dict.getLabel('job', data.resident.job) }}</span> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="lines"></div> | ||||
|  | ||||
|     <div class="bottom"> | ||||
|       <div class="hint">联络信息</div> | ||||
|  | ||||
|       <div class="contents"> | ||||
|         <div class="item"> | ||||
|           <span>联系方式</span> | ||||
|           <span class="phones" v-if="data.resident && data.resident.phone" @click="callPhone(data.resident.phone)">{{ data.resident.phone }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span class="label">现住址</span> | ||||
|           <span class="value" v-if="data.resident && data.resident.currentAreaName">{{ data.resident.currentAreaName }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span class="label">现住详细地址</span> | ||||
|           <span class="value" v-if="data.resident && data.resident.currentAddress">{{ data.resident.currentAddress }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span class="label">户籍地址</span> | ||||
|           <span class="value" v-if="data.resident && data.resident.householdAreaName">{{ data.resident.householdAreaName }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"> | ||||
|           <span class="label">户籍详细地址</span> | ||||
|           <span class="value" v-if="data.resident && data.resident.householdAddress">{{ data.resident.householdAddress }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item" v-if="type == 1 && data.resident.auditStatus != 0"> | ||||
|           <span class="label">处理结果</span> | ||||
|           <span class="value">{{ data.resident.auditStatus == 1 ? '通过' : '不通过' }}</span> | ||||
|         </div> | ||||
|  | ||||
|         <div class="item"  v-if="type == 1 && data.resident.auditStatus != 0"> | ||||
|           <span class="label">原因</span> | ||||
|         </div> | ||||
|         <div class="item">{{data.resident.auditOpinion || ''}}</div> | ||||
|       </div> | ||||
|     </div> | ||||
|     </div> | ||||
|     <!-- 特殊人群 --> | ||||
|     <div v-if="tabIndex != 0 &&  tabList &&  tabList.length"> | ||||
|       <div class="spacial" v-for="(item,index) in tabList" :key="index" v-if="tabIndex == index"> | ||||
|         <div class="specialList" v-for="(t,indexs) in item.tableInfos" :key="indexs" v-if="item.tableInfos && item.tableInfos.length"> | ||||
|           <div class="spacial-row"> | ||||
|             <div>{{ t.fieldName }}</div> | ||||
|             <div>{{ t.fieldValue }}</div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="pad-b112" v-if="data.resident.auditStatus == 0 && type == 1"></div> | ||||
|     <div class="footer" v-if="data.resident.auditStatus == 0 && type == 1"> | ||||
|       <div @click="toContent">不通过</div> | ||||
|       <div class="pass" @click="examine(1)">通过</div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'DetailPeople', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       id: '', | ||||
|       data: [], | ||||
|       type: 0, //0查看详情  1审核详情 | ||||
|       tabList:[], | ||||
|       tabIndex: 0, | ||||
|     } | ||||
|   }, | ||||
|   computed: {}, | ||||
|   watch: {}, | ||||
|   onLoad(o) { | ||||
|     this.id = o.id | ||||
|     this.type = o.type | ||||
|     this.$dict.load('householdRelation', 'nation', 'education', 'maritalStatus', 'politicsStatus', 'militaryStatus', 'faithType', 'job', 'fileStatus').then(() => { | ||||
|       this.getDetail() | ||||
|     }) | ||||
|     uni.$on('updatePeople', res => { | ||||
|       this.getDetail() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '家庭成员信息' | ||||
|   }, | ||||
|   methods: { | ||||
|     getDetail() { | ||||
|       this.$instance.post(`/app/appresident/detail?id=${this.id}`).then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.data = res.data | ||||
|           if (res.data.resident.tsrqInfos) { | ||||
|           this.tabList = res.data.resident.tsrqInfos | ||||
|           let info = { | ||||
|             icon: require('./components/img/icon1n@2x.png'), | ||||
|             activeIcon:  require('./components/img/icon1h@2x.png'), | ||||
|             name: '基本信息', | ||||
|           } | ||||
|           this.tabList.unshift(info) | ||||
|           } else { | ||||
|             this.tabList =[{ | ||||
|               icon: require('./components/img/icon1n@2x.png'), | ||||
|               activeIcon:  require('./components/img/icon1h@2x.png'), | ||||
|               name: '基本信息', | ||||
|             }] | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     callPhone(phone) { | ||||
|       uni.makePhoneCall({ phoneNumber: phone }) | ||||
|     }, | ||||
|     examine(pass) { | ||||
|       this.$confirm('确认通过该审核?').then(() => { | ||||
|         this.$instance.post(`/app/appresident/examine?id=${this.id}&pass=${pass}`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             uni.$emit('updatePeople') | ||||
|             this.$u.toast('审核成功') | ||||
|             setTimeout(() => { | ||||
|               uni.navigateBack() | ||||
|             }, 600) | ||||
|           } | ||||
|         }) | ||||
|       }) | ||||
|        | ||||
|     }, | ||||
|     toContent() { | ||||
|       uni.navigateTo({url: `./Content?id=${this.id}`}) | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .DetailPeople { | ||||
|   height: 100%; | ||||
|   background: #fff; | ||||
|   .top { | ||||
|     display: flex; | ||||
|     padding: 48px 32px 32px 32px; | ||||
|     .photos { | ||||
|       img { | ||||
|         width: 112px; | ||||
|         height: 112px; | ||||
|         border-radius: 50%; | ||||
|       } | ||||
|     } | ||||
|     .right { | ||||
|       display: flex; | ||||
|       flex-direction: column; | ||||
|       width: 100%; | ||||
|       margin-left: 24px; | ||||
|       .rightTop { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|         .fileStatuss { | ||||
|           display: inline-block; | ||||
|           margin-left: 30px; | ||||
|           color: #ff4466; | ||||
|           background: #ffecef; | ||||
|           border-radius: 8px; | ||||
|           width: 120px; | ||||
|           height: 40px; | ||||
|           line-height: 40px; | ||||
|           text-align: center; | ||||
|           font-weight: 400; | ||||
|           font-size: 28px; | ||||
|         } | ||||
|         .names { | ||||
|           font-size: 32px; | ||||
|           font-weight: 600; | ||||
|         } | ||||
|         .householdNames { | ||||
|           margin-left: 30px; | ||||
|           font-size: 26px; | ||||
|           font-weight: 500; | ||||
|           color: #5aad6a; | ||||
|         } | ||||
|       } | ||||
|       .rightBottom { | ||||
|         margin-top: 16px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .tab-list{ | ||||
|   padding-top: 32px; | ||||
|   display: flex; | ||||
|   word-wrap: nowrap; | ||||
|   overflow-x: scroll; | ||||
|   -webkit-overflow-scrolling: touch; | ||||
|   .tab-item{ | ||||
|     display: inline-block; | ||||
|     width: 148px; | ||||
|     height: 136px; | ||||
|     background-color: #F8F9FB; | ||||
|     border-radius: 8px; | ||||
|     text-align: center; | ||||
|     margin-left: 32px; | ||||
|     img{ | ||||
|       width: 40px; | ||||
|       height: 40px; | ||||
|       margin-top: 30px; | ||||
|     } | ||||
|     p{ | ||||
|       font-size: 22px; | ||||
|       font-family: PingFangSC-Medium, PingFang SC; | ||||
|       font-weight: 500; | ||||
|       color: #C5C9CD; | ||||
|       line-height: 32px; | ||||
|       margin-top: 8px; | ||||
|     } | ||||
|   } | ||||
|   .type { | ||||
|     padding: 0 10px; | ||||
|     overflow: hidden; | ||||
|     text-overflow: ellipsis; | ||||
|     white-space:nowrap; | ||||
|   } | ||||
|   .active{ | ||||
|     background-color: #357CE3; | ||||
|     p{ | ||||
|       color: #fff; | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
|   .line { | ||||
|     height: 8px; | ||||
|     background: #f5f5f5; | ||||
|   } | ||||
|  | ||||
|   .middle, | ||||
|   .bottom { | ||||
|     padding: 0 32px; | ||||
|  | ||||
|     .hint { | ||||
|       font-weight: 600; | ||||
|       padding: 32px 0; | ||||
|     } | ||||
|  | ||||
|     .contents { | ||||
|       .item { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|         padding: 14px 0; | ||||
|         .phones { | ||||
|           color: #3d94fb; | ||||
|         } | ||||
|         .label{ | ||||
|           width: 200px; | ||||
|         } | ||||
|         .value{ | ||||
|           width: calc(100% - 200px); | ||||
|           text-align: right; | ||||
|           word-break: break-all; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .lines { | ||||
|     height: 4px; | ||||
|     background: #f5f5f5; | ||||
|   } | ||||
|  | ||||
|   .spacial { | ||||
|     margin-top: 30px; | ||||
|     .specialList { | ||||
|       padding: 14px 32px; | ||||
|       .spacial-row { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .pad-b112{ | ||||
|     padding-bottom: 112px; | ||||
|     background-color: #f5f5f5; | ||||
|   } | ||||
|   .footer { | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|     z-index: 99999; | ||||
|     display: flex; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Regular, PingFang SC; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     div{ | ||||
|       flex: 1; | ||||
|       background: #fff; | ||||
|       color: #FF4466; | ||||
|     } | ||||
|  | ||||
|     .pass { | ||||
|       background: #1365DD; | ||||
|       color: #FFF; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,276 +0,0 @@ | ||||
| <template> | ||||
|   <div class="ExamineList"> | ||||
|     <AiTopFixed> | ||||
|       <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#CDDCF0" bar-width="48" active-color="#fff " @change="change"></u-tabs> | ||||
|       <div class="middle"> | ||||
|         <div class="left"> | ||||
|           <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #666"> | ||||
|             <u-icon name="map-fill" color="#3192F4" size="20px" style="vertical-align: text-bottom"></u-icon> | ||||
|             <span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span> | ||||
|             <span v-else>请选择</span> | ||||
|             <u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" /> | ||||
|           </AiAreaPicker> | ||||
|         </div> | ||||
|         <u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="handerSearch" @clear="handerClear"></u-search> | ||||
|       </div> | ||||
|     </AiTopFixed> | ||||
|     <div v-if="datas && datas.length > 0" class="list-content"> | ||||
|       <div class="card" v-for="(item, i) in datas" :key="i" @click="toDetailPeople(item)"> | ||||
|         <div class="photos"> | ||||
|           <img :src="item.photo" alt="" v-if="item.photo" /> | ||||
|           <img src="./components/img/44.png" alt="" v-else /> | ||||
|         </div> | ||||
|         <div class="right"> | ||||
|           <div class="rightTop"> | ||||
|             <div class="rightTop-lefts"> | ||||
|               <span class="names">{{ item.name }}</span> | ||||
|               <span class="fileStatuss" v-if="item.fileStatus == 1"> {{ $dict.getLabel('fileStatus', item.fileStatus) }}</span> | ||||
|               <span class="householdNames" v-if="item.householdName == 1">户主</span> | ||||
|               <span class="householdNames" v-else>非户主</span> | ||||
|               <span class="audit-status" :class="'status'+item.auditStatus">{{ $dict.getLabel('auditStatus', item.auditStatus) }}</span> | ||||
|             </div> | ||||
|  | ||||
|             <div class="rightTop-rights"> | ||||
|               <u-section :show-line="false" sub-title="详情"></u-section> | ||||
|             </div> | ||||
|           </div> | ||||
|  | ||||
|           <div class="rightBottom"> | ||||
|             <span>身份证号:</span> | ||||
|             <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <AiEmpty v-else></AiEmpty> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapState } from 'vuex' | ||||
| export default { | ||||
|   name: 'ExamineList', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       id: '', | ||||
|       datas: [], | ||||
|       resident: {}, | ||||
|       areaId: '', | ||||
|       areaName: '', | ||||
|       tabList: [ | ||||
|         { | ||||
|           name: '待处理', | ||||
|         }, | ||||
|         { | ||||
|           name: '已处理', | ||||
|         }, | ||||
|       ], | ||||
|       currentTabs: 0, | ||||
|       keyword: '' | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|   }, | ||||
|   onLoad() { | ||||
|     this.areaId = this.user.areaId | ||||
|     this.areaName = this.user.areaName | ||||
|     this.$dict.load('householdRelation', 'auditStatus').then(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|     uni.$on('updatePeople', () => { | ||||
|       this.getListInit() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '居民档案审核' | ||||
|   }, | ||||
|   methods: { | ||||
|     getListInit() { | ||||
|       this.current = 1 | ||||
|       this.datas = [] | ||||
|       this.getList() | ||||
|     }, | ||||
|     getList() { | ||||
|       var auditType = 0 // 0待处理; 2已处理 | ||||
|       if(this.currentTabs == 1) { | ||||
|         auditType = 2 | ||||
|       } | ||||
|       this.$instance.post('/app/appresident/list', null, { | ||||
|         params: { | ||||
|           size: 10, | ||||
|           current: this.current, | ||||
|           con: this.keyword, | ||||
|           areaId: this.areaId, | ||||
|           auditType, | ||||
|           source: 1 | ||||
|         }, | ||||
|       }) | ||||
|       .then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records | ||||
|  | ||||
|           this.pages = res.data.pages | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     change(index) { | ||||
|       this.currentTabs = index | ||||
|       this.getListInit() | ||||
|     }, | ||||
|  | ||||
|     toDetailPeople(item) { | ||||
|       uni.navigateTo({ url: `./DetailPeople?id=${item.id}&type=1` }) | ||||
|     }, | ||||
|  | ||||
|     areaSelect(e) { | ||||
|       this.areaId = e | ||||
|       this.getListInit() | ||||
|     }, | ||||
|  | ||||
|     handerSearch(e) { | ||||
|       this.keyword = e | ||||
|       this.getListInit() | ||||
|     }, | ||||
|  | ||||
|     handerClear() { | ||||
|       this.keyword = '' | ||||
|       this.getListInit() | ||||
|     }, | ||||
|   }, | ||||
|   onReachBottom() { | ||||
|     this.current = this.current + 1 | ||||
|     this.getList() | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .ExamineList { | ||||
|   height: 100%; | ||||
|   .list-content{ | ||||
|     padding: 0 60px; | ||||
|     background-color: #fff; | ||||
|   } | ||||
|   .card { | ||||
|     display: flex; | ||||
|     box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.08); | ||||
|     border-radius: 16px; | ||||
|     padding: 48px 32px; | ||||
|     margin-bottom: 32px; | ||||
|     background: url(http://respub.sinoecare.net/20211222/装饰2-20211222162934.png) no-repeat; | ||||
|     background-size: 100% 100%; | ||||
|     .photos { | ||||
|       img { | ||||
|         width: 96px; | ||||
|         height: 96px; | ||||
|         border-radius: 50%; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .right { | ||||
|       display: flex; | ||||
|       flex-direction: column; | ||||
|       margin-left: 40px; | ||||
|       width: 100%; | ||||
|       .rightTop { | ||||
|         display: flex; | ||||
|         justify-content: space-between; | ||||
|         .rightTop-lefts { | ||||
|           width: calc(100% - 100px); | ||||
|           .names { | ||||
|             font-size: 32px; | ||||
|             font-weight: 600; | ||||
|             word-break: break-all; | ||||
|           } | ||||
|           .householdNames { | ||||
|             margin-left: 30px; | ||||
|             font-size: 26px; | ||||
|             font-weight: 500; | ||||
|             color: #5aad6a; | ||||
|             display: inline-block; | ||||
|             width: 100px; | ||||
|           } | ||||
|           .fileStatuss { | ||||
|             display: inline-block; | ||||
|             margin-left: 30px; | ||||
|             color: #ff4466; | ||||
|             background: #ffecef; | ||||
|             border-radius: 8px; | ||||
|             width: 88px; | ||||
|             height: 40px; | ||||
|             line-height: 40px; | ||||
|             text-align: center; | ||||
|           } | ||||
|         } | ||||
|         .rightTop-rights { | ||||
|           width: 100px; | ||||
|           ::v-deep .u-section { | ||||
|             .u-section__right-info { | ||||
|               color: #3975c6 !important; | ||||
|               .u-section__right-info__icon-arrow { | ||||
|                 .u-icon { | ||||
|                   .u-icon__icon { | ||||
|                     color: #3975c6 !important; | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       .rightBottom { | ||||
|         margin-top: 20px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   .middle { | ||||
|     display: flex; | ||||
|     padding: 24px 32px; | ||||
|     .left { | ||||
|       width: 220px; | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|  | ||||
|       img { | ||||
|         width: 48px; | ||||
|         height: 48px; | ||||
|       } | ||||
|     } | ||||
|     .u-search { | ||||
|       margin-bottom: 0 !important; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .content{ | ||||
|     padding: 0; | ||||
|   } | ||||
|  | ||||
|   .audit-status{ | ||||
|     display: inline-block; | ||||
|     padding: 0 8px; | ||||
|     line-height: 40px; | ||||
|     background: #EAF0FE; | ||||
|     border-radius: 8px; | ||||
|     font-size: 24px; | ||||
|     font-family: PingFangSC-Regular, PingFang SC; | ||||
|   } | ||||
|   .status1{ | ||||
|     color: #3E95FF; | ||||
|     background-color: #EAF0FE; | ||||
|   } | ||||
|   .status0{ | ||||
|     color: #5AAD6A; | ||||
|     background-color: #E9FFED; | ||||
|   } | ||||
|   .status2{ | ||||
|     color: #f46; | ||||
|     background-color: #FFECEF; | ||||
|   } | ||||
|  | ||||
| } | ||||
| </style> | ||||
| @@ -1,320 +0,0 @@ | ||||
| <template> | ||||
|   <div class="PeopleList"> | ||||
|     <AiTopFixed> | ||||
|       <div class="areatop"> | ||||
|         <!-- <div>区域选择</div> | ||||
|         <AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="seachObj"></AiAreaPicker> | ||||
|         <u-icon name="photo"></u-icon> --> | ||||
|         <!-- @select="areaSelect" --> | ||||
|         <u-form label-width="auto"> | ||||
|           <u-form-item label="区域选择" right-icon="arrow-right" class="areaIds"> | ||||
|             <AiAreaPicker v-model="areaId" :areaId="user.areaId" @input="seachObj" :name.sync="areaName" selectRoot/> | ||||
|           </u-form-item> | ||||
|         </u-form> | ||||
|       </div> | ||||
|  | ||||
|       <div class="line"></div> | ||||
|  | ||||
|       <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change"></u-tabs> | ||||
|  | ||||
|       <div class="seachObjs"> | ||||
|         <u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false" | ||||
|                   bg-color="#F5F5F5" search-icon-color="#E2E8F1" color="#666" height="58" @search="handerSearch" | ||||
|                   @clear="handerClear"></u-search> | ||||
|       </div> | ||||
|     </AiTopFixed> | ||||
|     <div class="dataes" v-if="datas.length > 0"> | ||||
|       <div class="datass" v-for="(item, iindex) in datas" :key="iindex" @click="toDetailCard(item)"> | ||||
|         <div class="left"> | ||||
|           <img :src="item.photo" alt="" v-if="item.photo"/> | ||||
|           <img src="./components/img/4.png" alt="" v-else/> | ||||
|         </div> | ||||
|  | ||||
|         <div class="right"> | ||||
|           <div class="rightTop"> | ||||
|             <span class="name">{{ item.name }}</span> | ||||
|             <span class="btn" v-if="user.id == item.createUserId"> | ||||
|               <img src="./components/img/edit-icon.png" alt="" @click.stop="edit(item.id)"> | ||||
|               <img src="./components/img/del-icon.png" alt="" @click.stop="del(item.id)"> | ||||
|             </span> | ||||
|           </div> | ||||
|           <div class="rightBottom"> | ||||
|             <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span> | ||||
|  | ||||
|             <span>{{ item.phone }}</span> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="empty" v-else> | ||||
|       <img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt=""> | ||||
|       <p>暂无居民信息<br/>点击<span @click="edit('')">新增按钮</span>新增居民信息,也可在管理系统批量导入</p> | ||||
|     </div> | ||||
|     <!-- <AiEmpty class="emptyWrap" v-else></AiEmpty> --> | ||||
|     <div style="height: 60px"></div> | ||||
|     <div class="addBtn" @click="edit('')">新增居民</div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: 'PeopleList', | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       keyword: '', | ||||
|       datas: [], | ||||
|       current: 1, | ||||
|       size: 10, | ||||
|       tabList: [ | ||||
|         { | ||||
|           name: '全部居民', | ||||
|         }, | ||||
|         { | ||||
|           name: '本地居民', | ||||
|         }, | ||||
|         { | ||||
|           name: '流动人员', | ||||
|         }, | ||||
|       ], | ||||
|       currentTabs: 0, | ||||
|       areaId: '', | ||||
|       areaName: '', | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|   }, | ||||
|   watch: {}, | ||||
|   onLoad() { | ||||
|     this.areaId = this.user.areaId | ||||
|     this.areaName = this.user.areaName | ||||
|     uni.$on('reload', () => { | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }) | ||||
|     this.getList() | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '查看居民档案' | ||||
|   }, | ||||
|   methods: { | ||||
|     getList() { | ||||
|       var residentType = ['', 0, 1][this.currentTabs] | ||||
|       this.$instance | ||||
|       .post('/app/appresident/list', null, { | ||||
|         params: { | ||||
|           size: 20, | ||||
|           current: this.current, | ||||
|           con: this.keyword, | ||||
|           areaId: this.areaId, | ||||
|           residentType: residentType, | ||||
|           auditStatus: 1 | ||||
|         }, | ||||
|       }) | ||||
|       .then((res) => { | ||||
|         if (res.code == 0) { | ||||
|           this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records | ||||
|  | ||||
|           this.pages = res.data.pages | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     change(index) { | ||||
|       this.currentTabs = index | ||||
|       this.current = 1 | ||||
|       this.datas = [] | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     toDetailCard(item) { | ||||
|       uni.navigateTo({url: `./DetailCard?id=${item.id}`}) | ||||
|     }, | ||||
|  | ||||
|     seachObj(e) { | ||||
|       this.areaId = e | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     handerSearch(e) { | ||||
|       this.keyword = e | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|  | ||||
|     handerClear() { | ||||
|       this.keyword = '' | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }, | ||||
|     edit(id) { | ||||
|       var residentType = ['', 0, 1][this.currentTabs] | ||||
|       uni.navigateTo({url: `./Add?id=${id}&type=${residentType}`}) | ||||
|     }, | ||||
|     del(id) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         uni.showLoading() | ||||
|         this.$instance.post(`/app/appresident/delete?ids=${id}`).then((res) => { | ||||
|           if (res.code == 0) { | ||||
|             this.$u.toast('删除成功!') | ||||
|             this.current = 1 | ||||
|             this.getList() | ||||
|           } | ||||
|           uni.hideLoading() | ||||
|         }) | ||||
|       }).catch(() => { | ||||
|       }) | ||||
|     } | ||||
|   }, | ||||
|   onReachBottom() { | ||||
|     this.current = this.current + 1 | ||||
|     this.getList() | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .PeopleList { | ||||
|   height: 100%; | ||||
|  | ||||
|   .areatop { | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     align-items: center; | ||||
|   } | ||||
|  | ||||
|   .line { | ||||
|     height: 16px; | ||||
|     background: #f5f5f5; | ||||
|   } | ||||
|  | ||||
|   .seachObjs { | ||||
|     border-bottom: 2px solid #f5f5f5; | ||||
|     border-top: 2px solid #f5f5f5; | ||||
|     padding: 20px 32px; | ||||
|     background: #fff; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .u-form { | ||||
|     width: 100%; | ||||
|  | ||||
|     .areaIds { | ||||
|       .u-form-item__body { | ||||
|         .u-form-item--right { | ||||
|           .u-form-item--right__content { | ||||
|             display: flex; | ||||
|             align-items: center; | ||||
|  | ||||
|             .u-form-item--right__content__slot { | ||||
|               .AiAreaPicker { | ||||
|                 width: 100%; | ||||
|                 display: flex; | ||||
|                 justify-content: flex-end; | ||||
|  | ||||
|                 .areaSelector { | ||||
|                   .location { | ||||
|                     opacity: 0; | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|  | ||||
|             .u-form-item--right__content__icon { | ||||
|               margin-bottom: 8px; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .dataes { | ||||
|     background: #fff; | ||||
|  | ||||
|     .datass { | ||||
|       display: flex; | ||||
|       padding: 24px 32px; | ||||
|  | ||||
|       .left { | ||||
|         img { | ||||
|           width: 80px; | ||||
|           height: 80px; | ||||
|           border-radius: 50%; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .right { | ||||
|         display: flex; | ||||
|         flex-direction: column; | ||||
|         margin-left: 32px; | ||||
|         width: 100%; | ||||
|  | ||||
|         .rightTop { | ||||
|           font-size: 32px; | ||||
|           font-weight: 500; | ||||
|           color: #333333; | ||||
|           display: flex; | ||||
|           justify-content: space-between; | ||||
|  | ||||
|           .btn { | ||||
|             img { | ||||
|               width: 48px; | ||||
|               height: 48px; | ||||
|               margin-left: 40px; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         .rightBottom { | ||||
|           display: flex; | ||||
|           justify-content: space-between; | ||||
|           margin-top: 8px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .emptyWrap { | ||||
|     background: #f5f5f5; | ||||
|     margin: 0; | ||||
|   } | ||||
|  | ||||
|   .addBtn { | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     background: #1365DD; | ||||
|     text-align: center; | ||||
|     color: #FFF; | ||||
|     font-size: 32px; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|   } | ||||
|  | ||||
|   .empty { | ||||
|     height: 100%; | ||||
|  | ||||
|     img { | ||||
|       width: 282px; | ||||
|       height: 306px; | ||||
|       margin: 168px 0 0 234px; | ||||
|     } | ||||
|  | ||||
|     p { | ||||
|       text-align: center; | ||||
|       font-size: 28px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #999; | ||||
|       line-height: 44px; | ||||
|  | ||||
|       span { | ||||
|         color: #467DFE; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| Before Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 2.7 KiB | 
| Before Width: | Height: | Size: 50 KiB | 
| Before Width: | Height: | Size: 2.6 KiB | 
| Before Width: | Height: | Size: 2.6 KiB | 
| Before Width: | Height: | Size: 50 KiB | 
| Before Width: | Height: | Size: 491 B | 
| Before Width: | Height: | Size: 590 B | 
| Before Width: | Height: | Size: 258 B | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.0 KiB | 
| @@ -1,825 +0,0 @@ | ||||
| <template> | ||||
|   <div class="AppResidentFile"> | ||||
|     <div class="currentTabBar0" v-if="currentTabBar == 0"> | ||||
|       <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs> | ||||
|  | ||||
|       <div class="peopleGroup" v-if="currentTabs == 0"> | ||||
|         <div class="topcard"> | ||||
|           <div class="cards"> | ||||
|             <div class="items"> | ||||
|               <span class="items1">{{ groupSum }}</span> | ||||
|               <span>群聊总数</span> | ||||
|             </div> | ||||
|  | ||||
|             <div class="items"> | ||||
|               <span class="items2">{{ todayList1.total }}</span> | ||||
|               <span>群成员总数</span> | ||||
|             </div> | ||||
|  | ||||
|             <div class="items"> | ||||
|               <span class="items3">{{ todayList1.increase }}</span> | ||||
|               <span>今日入群</span> | ||||
|             </div> | ||||
|  | ||||
|             <div class="items"> | ||||
|               <span class="items4">{{ todayList1.decrease }}</span> | ||||
|               <span>今日退群</span> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|  | ||||
|         <div class="echartes" id="echarts1"> | ||||
|           <div class="echartss"></div> | ||||
|         </div> | ||||
|       </div> | ||||
|  | ||||
|       <div class="people" v-if="currentTabs == 1"> | ||||
|         <div class="topcard"> | ||||
|           <div class="cards"> | ||||
|             <div class="items"> | ||||
|               <span class="items1">{{ todayList2.total }}</span> | ||||
|               <span>居民总数</span> | ||||
|             </div> | ||||
|  | ||||
|             <div class="items"> | ||||
|               <span class="items3">{{ todayList2.increase }}</span> | ||||
|               <span>今日新增</span> | ||||
|             </div> | ||||
|  | ||||
|             <div class="items"> | ||||
|               <span class="items4">{{ todayList2.decrease }}</span> | ||||
|               <span>今日流失</span> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|  | ||||
|         <div class="echartes" id="echarts2"> | ||||
|           <div class="echartss"></div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="currentTabBar1" v-if="currentTabBar == 1"> | ||||
|       <AiTopFixed> | ||||
|         <u-search placeholder="请输入昵称、姓名" :show-action="false" search-icon-color="#ccc" v-model="search.name" @search=";(page1.current = 1), getList()" /> | ||||
|         <AiCell> | ||||
|           <b slot="label" class="title">共<i v-html="page1.total || 0" />个居民</b> | ||||
|         </AiCell> | ||||
|       </AiTopFixed> | ||||
|  | ||||
|       <div class="mainPane"> | ||||
|         <AiCell v-for="item in data" :key="item.id" @click.native="showResident(item)"> | ||||
|           <template #label> | ||||
|             <AiImage :src="item.avatar" preview /> | ||||
|           </template> | ||||
|           <div class="card wrap start" flex> | ||||
|             <b>{{ item.name }}</b> | ||||
|             <div flex class="tag" v-for="(tag, j) in item.tags" :key="j">{{ tag.tagName }}</div> | ||||
|             <div class="realName" shrink v-html="`真实姓名:${item.realName || '-'}`" /> | ||||
|           </div> | ||||
|         </AiCell> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
|     <div class="currentTabBar2" v-if="currentTabBar == 2"> | ||||
|       <AiTopFixed> | ||||
|         <u-search placeholder="请输入群名、群主名" :show-action="false" search-icon-color="#ccc" v-model="search.name" @search=";(page2.current = 1), getList()" /> | ||||
|         <AiCell> | ||||
|           <b slot="label" class="title">共<i v-html="page2.total || 0" />个居民群</b> | ||||
|         </AiCell> | ||||
|       </AiTopFixed> | ||||
|  | ||||
|       <div class="mainPane"> | ||||
|         <AiCell v-for="(item, i) in list" :key="i" @click.native="toGroupList(item)"> | ||||
|           <template #label> | ||||
|             <AiImage :src="item.avatar" preview /> | ||||
|           </template> | ||||
|           <div class="card column start" flex> | ||||
|             <div flex class="groupName"> | ||||
|               <b>{{ item.name || '群聊' }}</b> | ||||
|               <div class="personCount" v-if="item.personCount">({{ item.personCount }})</div> | ||||
|             </div> | ||||
|             <div class="owner" v-html="`群主:${item.ownerName}`" /> | ||||
|             <div flex class="trends"> | ||||
|               <div flex v-html="`今日入群:<em>${item.increase || 0}</em>`" /> | ||||
|               <div flex v-html="`今日退群:<p>${item.decrease || 0}</p>`" /> | ||||
|             </div> | ||||
|           </div> | ||||
|         </AiCell> | ||||
|       </div> | ||||
|     </div> | ||||
|     <!-- <u-tabbar v-model="currentTabBar" :list="lists" @change="changeTab" active-color="#3267F0" inactive-color="#C4CAD4" class="u-tabbar"></u-tabbar> --> | ||||
|     <div class="tabs"> | ||||
|       <div class="item" @click="changeTab(index)" v-for="(item, index) in lists" :key="index"> | ||||
|         <img :src="currentTabBar == index ? item.selectedIconPath : item.iconPath" alt="" /> | ||||
|         <p :class="currentTabBar == index ? 'color-3267F0' : ''">{{ item.text }}</p> | ||||
|       </div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| // import echarts from 'echarts' | ||||
| import { mapState } from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: 'AppResidentFile', | ||||
|   appName: '居民信息管理', | ||||
|   components: {}, | ||||
|   props: {}, | ||||
|   data() { | ||||
|     return { | ||||
|       lists: [ | ||||
|         { | ||||
|           iconPath: 'http://respub.sinoecare.net/20211227/1n-20211227162529.png', | ||||
|           selectedIconPath: 'http://respub.sinoecare.net/20211227/1h-20211227164832.png', | ||||
|           text: '统计分析', | ||||
|           customIcon: false, | ||||
|         }, | ||||
|         { | ||||
|           iconPath: 'http://respub.sinoecare.net/20211227/2n-20211227164853.png', | ||||
|           selectedIconPath: 'http://respub.sinoecare.net/20211227/2h-20211227164906.png', | ||||
|           text: '居民列表', | ||||
|           customIcon: false, | ||||
|         }, | ||||
|  | ||||
|         { | ||||
|           iconPath: 'http://respub.sinoecare.net/20211227/3n-20211227164927.png', | ||||
|           selectedIconPath: 'http://respub.sinoecare.net/20211227/3h-20211227165003.png', | ||||
|           text: '居民群列表', | ||||
|           customIcon: false, | ||||
|         }, | ||||
|       ], | ||||
|       currentTabBar: 0, | ||||
|       currentTabs: 0, | ||||
|       tabList: [ | ||||
|         { | ||||
|           name: '居民群统计', | ||||
|         }, | ||||
|         { | ||||
|           name: '居民统计', | ||||
|         }, | ||||
|       ], | ||||
|       Echarts1: null, | ||||
|       Echarts2: null, | ||||
|       areaId: '', | ||||
|       current: 1, | ||||
|       keyword: '', | ||||
|       data: [], | ||||
|       search: { name: '' }, | ||||
|       list: [], | ||||
|       weekList: [], | ||||
|       groupSum: '', | ||||
|       todayList1: [], | ||||
|       todayList2: [], | ||||
|       counts1: '', | ||||
|       counts2: '', | ||||
|       page2: { current: 1, size: 10, total: 0 }, | ||||
|       search2: { name: '' }, | ||||
|       page1: { current: 1, size: 10, total: 0 }, | ||||
|       search1: { name: '' }, | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user', 'global']), | ||||
|   }, | ||||
|   watch: {}, | ||||
|   onLoad() { | ||||
|     // document.title = '居民信息管理' | ||||
|     // this.getEchart1() | ||||
|     // this.areaId = this.user.areaId | ||||
|   }, | ||||
|   mounted() { | ||||
|     // this.Echarts1 = echarts.init(document.getElementById('echarts1')) | ||||
|   }, | ||||
|   methods: { | ||||
|     // 居民列表 | ||||
|     getList() { | ||||
|       this.$instance | ||||
|         .post('/app/wxcp/wxcustomer/list', null, { | ||||
|           params: { ...this.page1, ...this.search, type: 1 }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res?.data) { | ||||
|             if (this.page1.current > 1) { | ||||
|               this.data = [...this.data, ...res.data.records] | ||||
|             } else this.data = res.data.records | ||||
|             this.page1.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|  | ||||
|     // reachBottom() { | ||||
|     //   if (this.page1.total > this.list.length) { | ||||
|     //     this.page1.current++ | ||||
|     //     this.getList() | ||||
|     //   } | ||||
|     // }, | ||||
|  | ||||
|     showResident({ id }) { | ||||
|       id && | ||||
|         uni.navigateTo({ | ||||
|           url: './resident?id=' + id, | ||||
|         }) | ||||
|     }, | ||||
|  | ||||
|     // 居民群列表 | ||||
|     getList2() { | ||||
|       this.$instance | ||||
|         .post('/app/wxcp/wxgroup/list', null, { | ||||
|           params: { ...this.page2, ...this.search }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res?.data) { | ||||
|             let meta = res.data.records?.map((e) => ({ | ||||
|               ...e, | ||||
|               avatar: e?.avatar || this.$cdn + 'groupAvatar.png', | ||||
|             })) | ||||
|             if (this.page2.current > 1) { | ||||
|               this.list = [...this.list, ...meta] | ||||
|             } else this.list = meta | ||||
|             this.page2.total = res.data.total | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|  | ||||
|     // reachBottom() { | ||||
|     //   if (this.page2.total > this.list.length) { | ||||
|     //     this.page2.current = this.page2.current + 1 | ||||
|     //     this.getList2() | ||||
|     //   } | ||||
|     // }, | ||||
|  | ||||
|     toGroupList(item) { | ||||
|       uni.navigateTo({ | ||||
|         url: `./GroupList?id=${item.id}`, | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     // 居民群统计 | ||||
|     getEchart1() { | ||||
|       this.$instance.post(`/app/wxcp/wxgroup/groupStatistic`).then((res) => { | ||||
|         if (res.code === 0) { | ||||
|           this.weekList = res.data.list | ||||
|           this.initEcharts1(this.weekList) | ||||
|           this.groupSum = res.data.groupSum | ||||
|           this.todayList1 = res.data.today | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     // 居民统计 | ||||
|     getEchart2() { | ||||
|       this.$instance.post(`/app/wxcp/wxcustomerlog/customerStatistic?areaId=${this.user.areaId}`).then((res) => { | ||||
|         if (res.code === 0) { | ||||
|           this.initEcharts2(res.data.list) | ||||
|           this.todayList2 = res.data.today | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     initEcharts1(data) { | ||||
|       var option = { | ||||
|         legend: { | ||||
|           data: ['群成员总数', '入群人数', '退群人数'], | ||||
|           y: 'bottom', | ||||
|         }, | ||||
|         color: ['#4A86FD', '#32C5FF', '#FFAA44'], | ||||
|         tooltip: { | ||||
|           trigger: 'axis', | ||||
|         }, | ||||
|         grid: { | ||||
|           top: '9%', | ||||
|           left: '6%', | ||||
|           right: '8%', | ||||
|           bottom: '9%', | ||||
|           containLabel: true, | ||||
|         }, | ||||
|         xAxis: { | ||||
|           type: 'category', | ||||
|           data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)), | ||||
|           axisLine: { | ||||
|             show: true, | ||||
|             lineStyle: { color: '#666' }, | ||||
|           }, | ||||
|           axisLabel: { | ||||
|             show: true, | ||||
|             interval: 0, | ||||
|           }, | ||||
|           axisTick: { | ||||
|             show: false, | ||||
|           }, | ||||
|         }, | ||||
|         yAxis: { | ||||
|           type: 'value', | ||||
|           axisLine: { | ||||
|             show: false, | ||||
|           }, | ||||
|           splitLine: { | ||||
|             show: true, | ||||
|             lineStyle: { | ||||
|               color: '#D8DDE6', | ||||
|             }, | ||||
|           }, | ||||
|           axisLabel: { | ||||
|             show: true, | ||||
|             interval: 0, | ||||
|           }, | ||||
|           axisTick: { | ||||
|             show: false, | ||||
|           }, | ||||
|         }, | ||||
|         series: [ | ||||
|           { | ||||
|             lineStyle: { | ||||
|               normal: { | ||||
|                 lineStyle: { | ||||
|                   color: '#4A86FD', | ||||
|                 }, | ||||
|               }, | ||||
|             }, | ||||
|             color: '#4A86FD', | ||||
|             name: '群成员总数', | ||||
|             type: 'line', | ||||
|             stack: 'Total', | ||||
|             data: Object.values(data).map((e) => e.total), | ||||
|           }, | ||||
|           { | ||||
|             lineStyle: { | ||||
|               normal: { | ||||
|                 lineStyle: { | ||||
|                   color: '#32C5FF', | ||||
|                 }, | ||||
|               }, | ||||
|             }, | ||||
|             color: '#32C5FF', | ||||
|             name: '入群人数', | ||||
|             type: 'line', | ||||
|             stack: 'Total', | ||||
|             data: Object.values(data).map((e) => e.increase), | ||||
|           }, | ||||
|           { | ||||
|             lineStyle: { | ||||
|               normal: { | ||||
|                 lineStyle: { | ||||
|                   color: '#FFAA44', | ||||
|                 }, | ||||
|               }, | ||||
|             }, | ||||
|             color: '#FFAA44', | ||||
|             name: '退群人数', | ||||
|             type: 'line', | ||||
|             stack: 'Total', | ||||
|             data: Object.values(data).map((e) => e.decrease), | ||||
|           }, | ||||
|         ], | ||||
|       } | ||||
|  | ||||
|       option && this.Echarts1.setOption(option) | ||||
|     }, | ||||
|  | ||||
|     initEcharts2(data) { | ||||
|       var options = { | ||||
|         legend: { | ||||
|           data: ['居民总数', '新增居民数', '流失居民数'], | ||||
|           y: 'bottom', | ||||
|         }, | ||||
|         color: ['#4A86FD', '#32C5FF', '#FFAA44'], | ||||
|         tooltip: { | ||||
|           trigger: 'axis', | ||||
|         }, | ||||
|         grid: { | ||||
|           top: '9%', | ||||
|           left: '6%', | ||||
|           right: '8%', | ||||
|           bottom: '9%', | ||||
|           containLabel: true, | ||||
|         }, | ||||
|         xAxis: { | ||||
|           type: 'category', | ||||
|           data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)), | ||||
|           axisLine: { | ||||
|             show: true, | ||||
|             lineStyle: { color: '#666' }, | ||||
|           }, | ||||
|           axisLabel: { | ||||
|             show: true, | ||||
|             interval: 0, | ||||
|           }, | ||||
|           axisTick: { | ||||
|             show: false, | ||||
|           }, | ||||
|         }, | ||||
|         yAxis: { | ||||
|           type: 'value', | ||||
|           axisLine: { | ||||
|             show: false, | ||||
|           }, | ||||
|           splitLine: { | ||||
|             show: true, | ||||
|             lineStyle: { | ||||
|               color: '#D8DDE6', | ||||
|             }, | ||||
|           }, | ||||
|           axisLabel: { | ||||
|             show: true, | ||||
|             interval: 0, | ||||
|           }, | ||||
|           axisTick: { | ||||
|             show: false, | ||||
|           }, | ||||
|         }, | ||||
|         series: [ | ||||
|           { | ||||
|             lineStyle: { | ||||
|               normal: { | ||||
|                 lineStyle: { | ||||
|                   color: '#4A86FD', | ||||
|                 }, | ||||
|               }, | ||||
|             }, | ||||
|             color: '#4A86FD', | ||||
|             name: '居民总数', | ||||
|             type: 'line', | ||||
|             stack: 'Total', | ||||
|             data: Object.values(data).map((e) => e.total), | ||||
|           }, | ||||
|           { | ||||
|             lineStyle: { | ||||
|               normal: { | ||||
|                 lineStyle: { | ||||
|                   color: '#32C5FF', | ||||
|                 }, | ||||
|               }, | ||||
|             }, | ||||
|             color: '#32C5FF', | ||||
|             name: '新增居民数', | ||||
|             type: 'line', | ||||
|             stack: 'Total', | ||||
|             data: Object.values(data).map((e) => e.increase), | ||||
|           }, | ||||
|           { | ||||
|             lineStyle: { | ||||
|               normal: { | ||||
|                 lineStyle: { | ||||
|                   color: '#FFAA44', | ||||
|                 }, | ||||
|               }, | ||||
|             }, | ||||
|             color: '#FFAA44', | ||||
|             name: '流失居民数', | ||||
|             type: 'line', | ||||
|             stack: 'Total', | ||||
|             data: Object.values(data).map((e) => e.decrease), | ||||
|           }, | ||||
|         ], | ||||
|       } | ||||
|  | ||||
|       if (this.Echarts2) { | ||||
|         options && this.Echarts2.setOption(options) | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     changeTab(e) { | ||||
|       this.currentTabBar = e | ||||
|       if (this.currentTabBar == 0) { | ||||
|         this.getList() | ||||
|         this.$nextTick(() => { | ||||
|           if (this.currentTabs == 0) { | ||||
|             this.Echarts1 = echarts.init(document.getElementById('echarts1')) | ||||
|             this.getEchart1() | ||||
|           } | ||||
|           if (this.currentTabs == 1) { | ||||
|             this.Echarts2 = echarts.init(document.getElementById('echarts2')) | ||||
|             this.getEchart2() | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|       if (this.currentTabBar == 1) { | ||||
|         this.page1.current == 1 | ||||
|         this.getList() | ||||
|       } | ||||
|       if (this.currentTabBar == 2) { | ||||
|         this.page2.current == 1 | ||||
|         this.getList2() | ||||
|       } | ||||
|     }, | ||||
|  | ||||
|     change(index) { | ||||
|       this.currentTabs = index | ||||
|       this.$nextTick(() => { | ||||
|         if (index == 0) { | ||||
|           this.Echarts1 = echarts.init(document.getElementById('echarts1')) | ||||
|           this.getEchart1() | ||||
|         } else { | ||||
|           this.Echarts2 = echarts.init(document.getElementById('echarts2')) | ||||
|           this.getEchart2() | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|   }, | ||||
|   onReachBottom() { | ||||
|     if (this.currentTabBar == 1) { | ||||
|       this.page1.current++ | ||||
|       this.getList() | ||||
|     } | ||||
|     if (this.currentTabBar == 2) { | ||||
|       this.page2.current++ | ||||
|       this.getList2() | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| uni-page-body { | ||||
|   height: 100%; | ||||
| } | ||||
| .AppResidentFile { | ||||
|   height: 100%; | ||||
|  | ||||
|   .currentTabBar0 { | ||||
|     padding-bottom: 98px; | ||||
|     .peopleGroup, | ||||
|     .people { | ||||
|       .topcard { | ||||
|         position: relative; | ||||
|         background: url(http://respub.sinoecare.net/20211221/4-20211221095551.png) no-repeat; | ||||
|         background-size: 100% 100%; | ||||
|         height: 320px; | ||||
|         .cards { | ||||
|           box-sizing: border-box; | ||||
|           position: absolute; | ||||
|           bottom: -35px; | ||||
|           width: 92%; | ||||
|           box-sizing: border-box; | ||||
|           margin: 0 32px; | ||||
|           height: 232px; | ||||
|           background: #ffffff; | ||||
|           border-radius: 8px; | ||||
|           z-index: 999; | ||||
|           display: flex; | ||||
|           justify-content: space-around; | ||||
|           align-items: center; | ||||
|           .items { | ||||
|             display: flex; | ||||
|             flex-direction: column; | ||||
|             align-items: center; | ||||
|             span { | ||||
|               font-size: 30px; | ||||
|               font-weight: 500; | ||||
|               color: #999999; | ||||
|             } | ||||
|             .items1 { | ||||
|               font-size: 40px; | ||||
|               font-weight: bold; | ||||
|               color: #354fc7; | ||||
|             } | ||||
|             .items2 { | ||||
|               font-size: 40px; | ||||
|               font-weight: bold; | ||||
|               color: #868686; | ||||
|             } | ||||
|             .items3 { | ||||
|               font-size: 40px; | ||||
|               font-weight: bold; | ||||
|               color: #5fba95; | ||||
|             } | ||||
|             .items4 { | ||||
|               font-size: 40px; | ||||
|               font-weight: bold; | ||||
|               color: #f09535; | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .echartes { | ||||
|         margin-top: 64px; | ||||
|         padding-bottom: 20px; | ||||
|         height: 616px; | ||||
|         background: #fff; | ||||
|         box-sizing: border-box; | ||||
|  | ||||
|         .echartss { | ||||
|           margin: 0 32px; | ||||
|           height: 100%; | ||||
|           padding-top: 16px; | ||||
|           box-sizing: border-box; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .currentTabBar1 { | ||||
|     height: 100%; | ||||
|     padding-bottom: 98px; | ||||
|     background: #fff; | ||||
|     ::v-deep .AiTopFixed { | ||||
|       b.title { | ||||
|         color: #333; | ||||
|         font-size: 32px; | ||||
|  | ||||
|         & > i { | ||||
|           color: #267fce; | ||||
|           font-style: normal; | ||||
|           margin: 0 4px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .mainPane { | ||||
|       background: #fff; | ||||
|       padding: 0 32px 88px; | ||||
|  | ||||
|       .AiCell { | ||||
|         flex-shrink: 0; | ||||
|         justify-content: flex-start; | ||||
|  | ||||
|         .content { | ||||
|           flex: 1; | ||||
|           min-width: 0; | ||||
|           max-width: unset; | ||||
|           border-bottom: 1px solid rgba(221, 221, 221, 1); | ||||
|           min-height: 160px; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .card { | ||||
|         text-align: left; | ||||
|  | ||||
|         b { | ||||
|           max-width: 100%; | ||||
|           white-space: nowrap; | ||||
|           overflow: hidden; | ||||
|           text-overflow: ellipsis; | ||||
|           font-size: 36px; | ||||
|         } | ||||
|  | ||||
|         .tag { | ||||
|           justify-content: center; | ||||
|           background: #f3f4f7; | ||||
|           border-radius: 4px; | ||||
|           padding: 0 16px; | ||||
|           font-size: 28px; | ||||
|           font-weight: 400; | ||||
|           color: #333; | ||||
|           margin-left: 16px; | ||||
|           margin-bottom: 16px; | ||||
|           height: 56px; | ||||
|         } | ||||
|  | ||||
|         .realName { | ||||
|           width: 100%; | ||||
|           margin-top: 8px; | ||||
|           font-size: 28px; | ||||
|           font-weight: 400; | ||||
|           color: #999; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .AiImage { | ||||
|         margin-right: 24px; | ||||
|  | ||||
|         image { | ||||
|           width: 112px; | ||||
|           height: 112px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .currentTabBar2 { | ||||
|     padding-bottom: 98px; | ||||
|     ::v-deep .AiTopFixed { | ||||
|       b.title { | ||||
|         color: #333; | ||||
|         font-size: 32px; | ||||
|  | ||||
|         & > i { | ||||
|           color: #267fce; | ||||
|           font-style: normal; | ||||
|           margin: 0 4px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .mainPane { | ||||
|       background: #fff; | ||||
|       padding: 0 32px; | ||||
|  | ||||
|       .AiCell { | ||||
|         align-items: center; | ||||
|         height: 230px; | ||||
|         justify-content: flex-start; | ||||
|  | ||||
|         .content { | ||||
|           flex: 1; | ||||
|           min-width: 0; | ||||
|           height: 100%; | ||||
|           max-width: unset; | ||||
|           border-bottom: 1px solid rgba(221, 221, 221, 1); | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .card { | ||||
|         height: 100%; | ||||
|         justify-content: center; | ||||
|  | ||||
|         b { | ||||
|           font-size: 36px; | ||||
|           white-space: nowrap; | ||||
|           overflow: hidden; | ||||
|           text-overflow: ellipsis; | ||||
|         } | ||||
|  | ||||
|         .tag { | ||||
|           justify-content: center; | ||||
|           background: #f3f4f7; | ||||
|           border-radius: 4px; | ||||
|           padding: 0 16px; | ||||
|           font-size: 28px; | ||||
|           font-weight: 400; | ||||
|           color: #333; | ||||
|           margin-left: 16px; | ||||
|           height: 56px; | ||||
|         } | ||||
|  | ||||
|         .groupName { | ||||
|           width: 100%; | ||||
|           text-align: left; | ||||
|         } | ||||
|  | ||||
|         .owner, | ||||
|         .trends { | ||||
|           margin-top: 8px; | ||||
|           font-size: 28px; | ||||
|           font-weight: 400; | ||||
|           color: #999; | ||||
|         } | ||||
|  | ||||
|         .personCount { | ||||
|           flex-shrink: 0; | ||||
|           font-size: 30px; | ||||
|           font-weight: 400; | ||||
|           color: #666; | ||||
|         } | ||||
|  | ||||
|         .trends { | ||||
|           * + * { | ||||
|             margin-left: 24px; | ||||
|           } | ||||
|  | ||||
|           em { | ||||
|             font-style: normal; | ||||
|             color: #5fba95; | ||||
|           } | ||||
|  | ||||
|           p { | ||||
|             color: #f09535; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .AiImage { | ||||
|         margin-right: 24px; | ||||
|  | ||||
|         image { | ||||
|           width: 112px; | ||||
|           height: 112px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .tabs { | ||||
|     width: 100%; | ||||
|     height: 98px; | ||||
|     background: #fff; | ||||
|     border-top: 1px solid #ddd; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|     display: flex; | ||||
|     .item { | ||||
|       flex: 1; | ||||
|       text-align: center; | ||||
|       img { | ||||
|         width: 56px; | ||||
|         height: 56px; | ||||
|         margin-top: 8px; | ||||
|       } | ||||
|       p { | ||||
|         font-size: 22px; | ||||
|         font-family: PingFangSC-Medium, PingFang SC; | ||||
|         font-weight: 500; | ||||
|         color: #c4cad4; | ||||
|         line-height: 8px; | ||||
|       } | ||||
|       .color-3267F0 { | ||||
|         color: #3267f0; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,325 +0,0 @@ | ||||
| <template> | ||||
|   <div class="group-resident"> | ||||
|     <template v-if="!showTagManage"> | ||||
|       <AiTopFixed> | ||||
|         <div class="card"> | ||||
|           <header> | ||||
|             <u-avatar mode="square" :src="$cdn + 'groupAvatar.png'" :size="112"></u-avatar> | ||||
|             {{ detail.name }} | ||||
|           </header> | ||||
|           <u-grid :col="2" :border="false"> | ||||
|             <u-grid-item> | ||||
|               <label>建群日期</label> | ||||
|               <label v-if="detail.createTime">{{ detail.createTime.split(' ')[0] }}</label> | ||||
|             </u-grid-item> | ||||
|             <u-grid-item> | ||||
|               <label>成员总数</label> | ||||
|               <label v-if="isToday">{{ detail.statistic.today.total }}</label> | ||||
|             </u-grid-item> | ||||
|             <u-grid-item> | ||||
|               <label>今日入群</label> | ||||
|               <label v-if="isToday">{{ detail.statistic.today.increase }}</label> | ||||
|             </u-grid-item> | ||||
|             <u-grid-item> | ||||
|               <label>今日退群</label> | ||||
|               <label v-if="isToday">{{ detail.statistic.today.decrease }}</label> | ||||
|             </u-grid-item> | ||||
|             <!--          <u-grid-item>--> | ||||
|             <!--            <label>今日活跃人数</label>--> | ||||
|             <!--            <label>{{item.value}}</label>--> | ||||
|             <!--          </u-grid-item>--> | ||||
|           </u-grid> | ||||
|           <p class="statistics"> | ||||
|             <span>成员性别:</span> | ||||
|             <label>男性</label> | ||||
|             <b>{{ detail.man }}</b> | ||||
|             <label>女性</label> | ||||
|             <b>{{ detail.woman }}</b> | ||||
|             <label>未知</label> | ||||
|             <b>{{ detail.unknown }}</b> | ||||
|           </p> | ||||
|         </div> | ||||
|       </AiTopFixed> | ||||
|  | ||||
|       <div class="card"> | ||||
|         <AiCell title label="群标签"> | ||||
|           <u-icon label="添加" size="38" name="iconAdd" custom-prefix="iconfont" color="#1365DD" label-color="#1365DD" @tap="showTagManage = true" /> | ||||
|         </AiCell> | ||||
|         <AiCell top-label v-for="(op, name) in tagsList" :label="name" :key="name"> | ||||
|           <u-row> | ||||
|             <div class="tag" v-for="(tag, j) in op" :key="j">{{ tag }}</div> | ||||
|           </u-row> | ||||
|         </AiCell> | ||||
|       </div> | ||||
|  | ||||
|       <div class="card"> | ||||
|         <AiCell title label="群成员"></AiCell> | ||||
|         <div class="wrap"> | ||||
|           <div class="item" v-for="(item, index) in detail.groupUserList" :key="index" @click="handleWechat(item)"> | ||||
|             <u-avatar mode="square" :src="item.avatar"></u-avatar> | ||||
|             <div class="info"> | ||||
|               <div class="left"> | ||||
|                 <p> | ||||
|                   {{ item.memberName }} | ||||
|                   <b v-if="item.customerType == 2" style="color: #3c7fc8">@{{ item.corpName }}</b> | ||||
|                   <b v-if="item.customerType == 1" style="color: #2ea222">@微信</b> | ||||
|                 </p> | ||||
|                 <p>真实姓名:{{ item.realName }}</p> | ||||
|               </div> | ||||
|               <span v-if="item.userId == detail.owner">群主</span> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </template> | ||||
|  | ||||
|     <TagManage v-if="showTagManage" /> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapActions } from 'vuex' | ||||
| import TagManage from './tagManage' | ||||
|  | ||||
| export default { | ||||
|   name: 'GroupList', | ||||
|   components: { | ||||
|     TagManage, | ||||
|   }, | ||||
|   props: {}, | ||||
|   provide() { | ||||
|     return { | ||||
|       top: this, | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       id: '', | ||||
|       detail: {}, | ||||
|       groupId: null, | ||||
|       showTagManage: false, | ||||
|     } | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title =  '添加标签'  | ||||
|   }, | ||||
|   computed: { | ||||
|     tagsList() { | ||||
|       let obj = {} | ||||
|       this.detail?.tagList?.map((e) => { | ||||
|         if (e?.groupName) { | ||||
|           if (obj?.[e.groupName]) { | ||||
|             obj[e.groupName].push(e.tagName) | ||||
|           } else { | ||||
|             obj[e.groupName] = [e.tagName] | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|       return obj | ||||
|     }, | ||||
|     isToday() { | ||||
|       return !!this.detail?.statistic?.today | ||||
|     }, | ||||
|     isNormal() { | ||||
|       return !!this.id | ||||
|     }, | ||||
|   }, | ||||
|   watch: {}, | ||||
|   onLoad(o) { | ||||
|     this.id = o.id | ||||
|     this.getContact() | ||||
|   }, | ||||
|   onShow() {}, | ||||
|   methods: { | ||||
|     ...mapActions(['injectJWeixin', 'wxInvoke']), | ||||
|     getContact() { | ||||
|       if (this.isNormal) { | ||||
|         this.groupId = this.id | ||||
|         this.getGroup(this.id) | ||||
|       } else | ||||
|         this.injectJWeixin('getCurExternalChat').then(() => { | ||||
|           this.wxInvoke([ | ||||
|             'getCurExternalChat', | ||||
|             {}, | ||||
|             (res) => { | ||||
|               if (res?.err_msg == 'getCurExternalChat:ok') { | ||||
|                 this.groupId = res.chatId | ||||
|                 this.getGroup(res.chatId) | ||||
|               } | ||||
|             }, | ||||
|           ]) | ||||
|         }) | ||||
|     }, | ||||
|     getGroup(id) { | ||||
|       this.$instance | ||||
|         .post('/app/wxcp/wxgroup/getDetail', null, { | ||||
|           params: { id }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res?.data) { | ||||
|             this.detail = res.data | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|     handleWechat({ userId, type }) { | ||||
|       this.injectJWeixin('openUserProfile').then(() => { | ||||
|         this.wxInvoke([ | ||||
|           'openUserProfile', | ||||
|           { | ||||
|             type, | ||||
|             userid: userId, | ||||
|           }, | ||||
|           () => 0, | ||||
|         ]) | ||||
|       }) | ||||
|     }, | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style scoped lang="scss"> | ||||
| .group-resident { | ||||
|   width: 100%; | ||||
|   min-height: 100%; | ||||
|   background-color: #f5f5f5; | ||||
|   display: flex; | ||||
|   flex-direction: column; | ||||
|  | ||||
|   ::v-deep .AiTopFixed { | ||||
|     & > .card { | ||||
|       margin-top: 0; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .card { | ||||
|     background-color: #ffffff; | ||||
|     padding: 16px 32px; | ||||
|     box-sizing: border-box; | ||||
|     margin-top: 16px; | ||||
|  | ||||
|     header { | ||||
|       height: 192px; | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       font-size: 36px; | ||||
|       font-weight: 600; | ||||
|       color: #333333; | ||||
|  | ||||
|       .u-avatar { | ||||
|         margin-right: 24px; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     ::v-deep .u-grid-item-box { | ||||
|       box-sizing: border-box; | ||||
|       padding: 16px !important; | ||||
|  | ||||
|       .uni-label-pointer { | ||||
|         width: 100%; | ||||
|         line-height: 40px; | ||||
|         color: #999999; | ||||
|       } | ||||
|  | ||||
|       uni-label:last-child { | ||||
|         margin-top: 16px; | ||||
|         font-weight: 600; | ||||
|         color: #333333; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .statistics { | ||||
|       height: 96px; | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|       border-top: 1px solid #eee; | ||||
|       margin-top: 16px; | ||||
|  | ||||
|       span { | ||||
|         font-size: 28px; | ||||
|         color: #999999; | ||||
|       } | ||||
|  | ||||
|       label + b { | ||||
|         font-size: 28px; | ||||
|         color: #333333; | ||||
|       } | ||||
|  | ||||
|       b { | ||||
|         color: #1365dd !important; | ||||
|         margin: 0 32px 0 16px; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     & > section:first-child { | ||||
|       height: 90px !important; | ||||
|       display: flex; | ||||
|       align-items: center; | ||||
|     } | ||||
|  | ||||
|     .wrap { | ||||
|       margin-bottom: 20px; | ||||
|  | ||||
|       .item { | ||||
|         height: 176px; | ||||
|         display: flex; | ||||
|         align-items: center; | ||||
|  | ||||
|         .info { | ||||
|           width: 100%; | ||||
|           height: 100%; | ||||
|           display: flex; | ||||
|           align-items: center; | ||||
|           justify-content: space-between; | ||||
|           margin-left: 24px; | ||||
|           border-bottom: 1px solid #eee; | ||||
|  | ||||
|           .left { | ||||
|             font-size: 36px; | ||||
|             font-weight: 600; | ||||
|             color: #333333; | ||||
|  | ||||
|             b { | ||||
|               font-size: 28px; | ||||
|               font-weight: 400; | ||||
|               color: #3c7fc8; | ||||
|               margin-left: 16px; | ||||
|             } | ||||
|  | ||||
|             p:last-child { | ||||
|               font-size: 28px; | ||||
|               font-weight: 400; | ||||
|               color: #999999; | ||||
|               margin-top: 8px; | ||||
|             } | ||||
|           } | ||||
|  | ||||
|           span { | ||||
|             width: 88px; | ||||
|             height: 56px; | ||||
|             text-align: center; | ||||
|             background: rgba(19, 101, 221, 0.1); | ||||
|             box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02); | ||||
|             border-radius: 4px; | ||||
|             font-size: 28px; | ||||
|             font-weight: 400; | ||||
|             color: #1365dd; | ||||
|             line-height: 56px; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .tag { | ||||
|     height: 56px; | ||||
|     line-height: 56px; | ||||
|     background: #f3f4f7; | ||||
|     border-radius: 6px; | ||||
|     padding: 8px 16px; | ||||
|     margin-right: 16px; | ||||
|     margin-bottom: 16px; | ||||
|     overflow: hidden; | ||||
|     cursor: default; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,139 +0,0 @@ | ||||
| <template> | ||||
|   <div class="document" v-if="isShow"> | ||||
|     <div class="card"> | ||||
|       <div class="info"> | ||||
|         <u-image border-radius="4" :src="top.detail.avatar" width="118" height="118" /> | ||||
|         <div class="fill"> | ||||
|           <b>{{ top.detail.realName || top.detail.name }}</b> | ||||
|           <u-row> | ||||
|             <span class="idNumber" v-html="IDObj.id" /> | ||||
|             <a @tap="showID = !showID">{{ IDObj.btn }}</a> | ||||
|           </u-row> | ||||
|         </div> | ||||
|       </div> | ||||
|       <AiCell label="性别">{{ $dict.getLabel('sex', resident.sex) || '-' }}</AiCell> | ||||
|       <AiCell label="出生日期">{{ resident.birthDate }}</AiCell> | ||||
|       <AiCell label="年龄">{{ resident.age }}</AiCell> | ||||
|       <AiCell label="籍贯">{{ resident.birthplaceAreaName }}</AiCell> | ||||
|       <AiCell label="民族">{{ $dict.getLabel('nation', resident.nation) || '-' }}</AiCell> | ||||
|       <AiCell label="文化程度">{{ $dict.getLabel('education', resident.education) || '-' }}</AiCell> | ||||
|       <AiCell label="兵役状况">{{ $dict.getLabel('militaryStatus', resident.militaryStatus) || '-' }}</AiCell> | ||||
|       <AiCell label="政治面貌">{{ $dict.getLabel('politicsStatus', resident.politicsStatus) || '-' }}</AiCell> | ||||
|       <AiCell label="职业">{{ $dict.getLabel('job', resident.job) || '-' }}</AiCell> | ||||
|       <AiCell label="宗教信仰">{{ $dict.getLabel('faithType', resident.faithType) || '-' }}</AiCell> | ||||
|     </div> | ||||
|     <div class="card"> | ||||
|       <AiCell title label="联络信息" /> | ||||
|       <AiCell label="联系方式">{{ resident.phone }}</AiCell> | ||||
|       <AiCell label="现住址">{{ resident.currentAreaName + resident.currentAddress }}</AiCell> | ||||
|     </div> | ||||
|     <div class="card"> | ||||
|       <AiCell title label="家庭信息" /> | ||||
|       <AiCell label="是否户主">{{ $dict.getLabel('householdName', resident.householdName) || '-' }}</AiCell> | ||||
|       <AiCell label="与户主关系">{{ $dict.getLabel('householdRelation', resident.householdRelation) || '-' }}</AiCell> | ||||
|       <AiCell label="现住址">{{ resident.householdAreaName + resident.householdAddress }}</AiCell> | ||||
|     </div> | ||||
|     <div class="card"> | ||||
|       <AiCell title label="家庭成员" /> | ||||
|       <!-- <AiTable :data="family" :colConfigs="colConfigs" /> --> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   name: 'document', | ||||
|   // inject: ['top'], | ||||
|   computed: { | ||||
|     IDObj() { | ||||
|       return this.showID | ||||
|         ? { | ||||
|             id: this.resident?.idNumber, | ||||
|             btn: '隐藏', | ||||
|           } | ||||
|         : { | ||||
|             id: this.resident?.idNumber?.replace(/(\d{10}).+/g, '$1******'), | ||||
|             btn: '显示', | ||||
|           } | ||||
|     }, | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         { label: '与户主关系', prop: 'householdRelation', width: '160rpx', dict: 'householdRelation' }, | ||||
|         { label: '姓名', prop: 'name', width: '120rpx' }, | ||||
|         { label: '性别', prop: 'sex', dict: 'sex' }, | ||||
|         { label: '年龄', prop: 'age' }, | ||||
|         { label: '身份证号', prop: 'idNumber', width: '320rpx' }, | ||||
|       ] | ||||
|     }, | ||||
|     resident() { | ||||
|       let obj = {} | ||||
|       Object.keys(this.top.detail?.residentInfo?.resident || {}).map((e) => { | ||||
|         obj[e] = this.top.detail?.residentInfo?.resident[e] || '' | ||||
|       }) | ||||
|       return obj | ||||
|     }, | ||||
|     family() { | ||||
|       return this.top.detail?.residentInfo?.family?.map((e) => ({ ...e, householdRelation: e.householdRelation || '户主' })) | ||||
|     }, | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       showID: false, | ||||
|       isShow: false, | ||||
|       familyList: [], | ||||
|       top: {} | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load('sex', 'nation', 'education', 'job', 'faithType', 'politicsStatus', 'militaryStatus', 'householdRelation', 'householdName').then(() => { | ||||
|       this.isShow = true | ||||
|     }) | ||||
|     // console.log('居民档案性别(无字典)', this.resident.sex) | ||||
|     // console.log('居民档案性别(有字典)', this.$dict.getLabel('sex', this.resident.sex)) | ||||
|     // console.log('居民档案字典值', this.$dict.getDict('sex')) | ||||
|   }, | ||||
|   onShow() { | ||||
|     // this.$dict.load('sex', 'nation', 'education', 'job', 'faithType', 'politicsStatus', 'militaryStatus', 'householdRelation', 'householdName') | ||||
|     // document.title = '居民详情' | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .document { | ||||
|   overflow-y: auto; | ||||
|   background: #f5f5f5; | ||||
|  | ||||
|   .info { | ||||
|     height: 186px; | ||||
|     width: 100%; | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|  | ||||
|     .fill { | ||||
|       color: #3c7fc8; | ||||
|       margin-left: 24px; | ||||
|       font-size: 28px; | ||||
|       line-height: 40px; | ||||
|       display: flex; | ||||
|       flex-direction: column; | ||||
|  | ||||
|       b { | ||||
|         font-size: 36px; | ||||
|         color: #333; | ||||
|         margin-bottom: 8px; | ||||
|         line-height: 50px; | ||||
|       } | ||||
|  | ||||
|       a { | ||||
|         cursor: pointer; | ||||
|       } | ||||
|  | ||||
|       .idNumber { | ||||
|         margin-right: 16px; | ||||
|         color: #999; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,370 +0,0 @@ | ||||
| <template> | ||||
|   <div class="info"> | ||||
|     <div class="card"> | ||||
|       <div class="baseInfo"> | ||||
|         <u-image border-radius="4" :src="top.detail.avatar" width="118" height="118" /> | ||||
|         <div class="fill"> | ||||
|           <b>{{ top.detail.name }}</b> | ||||
|           <div v-if="top.detail.type == 1" class="wx">@微信</div> | ||||
|           <div v-if="top.detail.type == 2">@企业微信</div> | ||||
|         </div> | ||||
|         <div class="certBtn" @tap="handleCert">{{ !isCert ? '实名认证' : '解绑' }}</div> | ||||
|       </div> | ||||
|       <u-row> | ||||
|         <AiCell class="half" top-label label="来源">{{ $dict.getLabel('wxCustomerAddWay', top.detail.addWay) }}</AiCell> | ||||
|         <AiCell class="half" top-label label="添加时间">{{ top.detail.createTime }}</AiCell> | ||||
|         <AiCell class="half" top-label label="真实姓名">{{ top.detail.realName }}</AiCell> | ||||
|         <AiCell class="half" top-label label="手机号码">{{ resident.phone || '-' }}</AiCell> | ||||
|         <AiCell class="half" top-label label="家庭积分">{{ resident.familyIntegral }}</AiCell> | ||||
|         <AiCell class="half" top-label label="个人积分">{{ resident.personalIntegral }}</AiCell> | ||||
|       </u-row> | ||||
|     </div> | ||||
|     <div class="card"> | ||||
|       <AiCell title label="公共标签"> | ||||
|         <u-icon label="添加" size="38" name="iconAdd" custom-prefix="iconfont" color="#1365DD" label-color="#1365DD" @tap="top.showTagManage = true" /> | ||||
|       </AiCell> | ||||
|       <AiCell top-label v-for="(op, name) in tagsList" :label="name" :key="name"> | ||||
|         <u-row> | ||||
|           <div class="tag" v-for="(tag, j) in op" :key="j">{{ tag }}</div> | ||||
|         </u-row> | ||||
|       </AiCell> | ||||
|     </div> | ||||
|     <div class="card"> | ||||
|       <AiCell title label="动态" /> | ||||
|       <AiCell top-label> | ||||
|         <div class="logItem" v-for="item in customLogs" :key="item.id"> | ||||
|           <div flex class="column" shrink> | ||||
|             <div class="dot" /> | ||||
|             <div class="line fill" /> | ||||
|           </div> | ||||
|           <div flex class="start column"> | ||||
|             <b>{{ $dict.getLabel('wxCustomerLogType', item.type) }}</b> | ||||
|             <span>{{ item.createTime }}</span> | ||||
|             <div v-html="item.content" /> | ||||
|           </div> | ||||
|         </div> | ||||
|       </AiCell> | ||||
|     </div> | ||||
|     <u-mask :show="dialog" @tap="dialog = false"> | ||||
|       <div class="bindCert" @tap.stop> | ||||
|         <b class="title">实名认证</b> | ||||
|         <u-input class="searchInput" v-model="search" clearable placeholder="请输入姓名或身份证号" @input="handleSearch" /> | ||||
|         <div class="residents"> | ||||
|           <div flex class="spb" v-for="(op, i) in result" :key="i" @tap="bindCert(op.id)"> | ||||
|             <div v-html="op.name" /> | ||||
|             <div v-html="op.idNumber" /> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </u-mask> | ||||
|     <div bottom> | ||||
|       <u-button type="primary" @tap="handleWechat">微信联系</u-button> | ||||
|       <u-button v-if="isMobile" :disabled="!resident.phone" @tap="handleTel">电话联系</u-button> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapActions } from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   // name: 'info', | ||||
|   // inject: ['top'], | ||||
|   computed: { | ||||
|     resident() { | ||||
|       return this.top.detail?.residentInfo?.resident || {} | ||||
|     }, | ||||
|     tagsList() { | ||||
|       let obj = {} | ||||
|       this.top.detail?.tags?.map((e) => { | ||||
|         if (e.type == 1 && e?.groupName) { | ||||
|           if (obj?.[e.groupName]) { | ||||
|             obj[e.groupName].push(e.tagName) | ||||
|           } else { | ||||
|             obj[e.groupName] = [e.tagName] | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|       return obj | ||||
|     }, | ||||
|     isCert() { | ||||
|       return !!this.top?.detail?.residentInfo | ||||
|     }, | ||||
|     isMobile() { | ||||
|       return ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'].some((e) => navigator.userAgent.indexOf(e) > -1) | ||||
|     }, | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       dialog: false, | ||||
|       search: '', | ||||
|       result: [], | ||||
|       customLogs: [], | ||||
|       top: {} | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     // ...mapActions(['injectJWeixin', 'wxInvoke']), | ||||
|     searchResident() { | ||||
|       this.$http | ||||
|         .post('/app/appresident/check-name', null, { | ||||
|           params: { name: this.search }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res?.data) { | ||||
|             let reg = new RegExp(this.search, 'g') | ||||
|             this.result = res.data?.map((e) => ({ | ||||
|               ...e, | ||||
|               name: e.name.replace(reg, `<b>${this.search}</b>`), | ||||
|               idNumber: e.idNumber.replace(reg, `<b>${this.search}</b>`), | ||||
|             })) | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|     handleSearch() { | ||||
|       if (this.search?.length >= 2) { | ||||
|         this.searchResident() | ||||
|       } else { | ||||
|         this.result = [] | ||||
|       } | ||||
|     }, | ||||
|     handleCert() { | ||||
|       if (this.isCert) { | ||||
|         this.$confirm('是否要解绑当前实名认证?').then(() => { | ||||
|           this.$http | ||||
|             .post('/app/wxcp/wxcustomer/unBindCustomer2Resident', null, { | ||||
|               params: { residentId: this.resident.id, customerId: this.top.custom }, | ||||
|             }) | ||||
|             .then((res) => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.$u.toast('解除绑定成功!') | ||||
|                 this.top.getContact() | ||||
|               } | ||||
|             }) | ||||
|         }) | ||||
|       } else this.dialog = true | ||||
|     }, | ||||
|     bindCert(residentId) { | ||||
|       this.dialog = false | ||||
|       this.$confirm('是否要绑定该居民?') | ||||
|         .then(() => { | ||||
|           this.$http | ||||
|             .post('/app/wxcp/wxcustomer/bindCustomer2Resident', null, { | ||||
|               params: { residentId, customerId: this.top.custom }, | ||||
|             }) | ||||
|             .then((res) => { | ||||
|               if (res?.code == 0) { | ||||
|                 this.$u.toast('绑定成功!') | ||||
|                 this.top.getContact() | ||||
|               } | ||||
|             }) | ||||
|             .catch((err) => { | ||||
|               this.$u.toast(err) | ||||
|               setTimeout(() => (this.dialog = true), 1000) | ||||
|             }) | ||||
|         }) | ||||
|         .catch(() => (this.dialog = true)) | ||||
|     }, | ||||
|     getCustomLog(customerId) { | ||||
|       customerId && | ||||
|         this.$http | ||||
|           .post('/app/wxcp/wxcustomerlog/listAll', null, { | ||||
|             params: { customerId }, | ||||
|           }) | ||||
|           .then((res) => { | ||||
|             if (res?.data) { | ||||
|               this.customLogs = res.data | ||||
|             } | ||||
|           }) | ||||
|     }, | ||||
|     handleTel() { | ||||
|       location.href = 'tel:' + this.resident.phone | ||||
|     }, | ||||
|     handleWechat() { | ||||
|       this.wxInvoke([ | ||||
|         'openUserProfile', | ||||
|         { | ||||
|           type: 2, | ||||
|           userid: this.top.custom, | ||||
|         }, | ||||
|         () => 0, | ||||
|       ]) | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load('wxCustomerAddWay', 'wxCustomerLogType') | ||||
|     this.getCustomLog(this.top.custom) | ||||
|     // this.injectJWeixin('openUserProfile') | ||||
|   }, | ||||
|   onShow() { | ||||
|     // document.title =  '居民详情' | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .info { | ||||
|   padding-bottom: 130px; | ||||
|  | ||||
|   .certBtn { | ||||
|     cursor: pointer; | ||||
|     background: $uni-color-primary; | ||||
|     color: #fff; | ||||
|     padding: 8px 16px; | ||||
|     border-radius: 4px; | ||||
|   } | ||||
|  | ||||
|   .baseInfo { | ||||
|     height: 186px; | ||||
|     width: 100%; | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|  | ||||
|     .fill { | ||||
|       color: #3c7fc8; | ||||
|       margin-left: 24px; | ||||
|       font-size: 28px; | ||||
|       line-height: 40px; | ||||
|  | ||||
|       b { | ||||
|         font-size: 36px; | ||||
|         color: #333; | ||||
|         margin-bottom: 8px; | ||||
|         line-height: 50px; | ||||
|       } | ||||
|  | ||||
|       .wx { | ||||
|         color: #2ea222; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .AiCell { | ||||
|     &.half { | ||||
|       width: 50%; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .u-form-item { | ||||
|     width: 50%; | ||||
|     min-height: 124px; | ||||
|  | ||||
|     .u-form-item--left { | ||||
|       color: #999; | ||||
|       min-height: 40px; | ||||
|     } | ||||
|  | ||||
|     .u-form-item--right { | ||||
|       min-height: 0; | ||||
|       margin-top: 16px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .u-mask { | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     justify-content: center; | ||||
|  | ||||
|     .bindCert { | ||||
|       width: 600px; | ||||
|       padding: 32px; | ||||
|       min-height: 400px; | ||||
|       background-color: #fff; | ||||
|       display: flex; | ||||
|       flex-direction: column; | ||||
|       color: #333; | ||||
|     } | ||||
|  | ||||
|     .residents { | ||||
|       max-height: 780px; | ||||
|       overflow-y: auto; | ||||
|     } | ||||
|  | ||||
|     .title { | ||||
|       text-align: center; | ||||
|       font-size: 36px; | ||||
|     } | ||||
|  | ||||
|     .searchInput { | ||||
|       margin: 16px 0; | ||||
|       border: 1px solid #d0d4dc; | ||||
|       border-radius: 8px; | ||||
|       padding: 0 16px !important; | ||||
|       flex: 0; | ||||
|     } | ||||
|  | ||||
|     .spb { | ||||
|       height: 60px; | ||||
|       cursor: pointer; | ||||
|       padding: 0 16px; | ||||
|  | ||||
|       b { | ||||
|         font-size: 32px; | ||||
|       } | ||||
|  | ||||
|       &:nth-of-type(2n) { | ||||
|         background: #eee; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .logItem { | ||||
|     display: flex; | ||||
|     min-height: 220px; | ||||
|  | ||||
|     &:last-of-type { | ||||
|       .line { | ||||
|         display: none; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     & > .column + .column { | ||||
|       margin-left: 16px; | ||||
|     } | ||||
|  | ||||
|     .dot { | ||||
|       flex-shrink: 0; | ||||
|       width: 16px; | ||||
|       height: 16px; | ||||
|       background: $uni-color-primary; | ||||
|       border: 8px solid #ffffff; | ||||
|       border-radius: 50%; | ||||
|       margin: 8px 0; | ||||
|     } | ||||
|  | ||||
|     .line { | ||||
|       width: 4px; | ||||
|       background: #eee; | ||||
|     } | ||||
|  | ||||
|     .start { | ||||
|       font-size: 26px; | ||||
|       font-weight: 400; | ||||
|       color: #666; | ||||
|  | ||||
|       b { | ||||
|         color: #333; | ||||
|       } | ||||
|  | ||||
|       i { | ||||
|         color: $uni-color-primary; | ||||
|         font-style: normal; | ||||
|       } | ||||
|  | ||||
|       & > b { | ||||
|         font-size: 32px; | ||||
|         font-weight: bold; | ||||
|         margin-bottom: 8px; | ||||
|       } | ||||
|  | ||||
|       & > span { | ||||
|         color: #999; | ||||
|       } | ||||
|  | ||||
|       & > div { | ||||
|         margin-top: 16px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,153 +0,0 @@ | ||||
| <template> | ||||
|   <div class="resident"> | ||||
|     <AiLoading v-if="!custom && !error" tips="获取居民信息中..." /> | ||||
|     <!-- <template v-else> | ||||
|       <tag-manage v-if="showTagManage" /> | ||||
|       <template v-else> | ||||
|         <AiTopFixed> | ||||
|           <u-tabs :list="tabs" :is-scroll="false" :current="currentType" font-size="32" bar-width="192" height="96" @change="handleTabClick" /> | ||||
|         </AiTopFixed> | ||||
|         <component :is="currentTab.comp" /> | ||||
|       </template> | ||||
|     </template> --> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import { mapActions } from 'vuex' | ||||
| import Info from './components/info' | ||||
| import Document from './components/document' | ||||
| import TagManage from './tagManage' | ||||
|  | ||||
| export default { | ||||
|   components: { TagManage, Document, Info }, | ||||
|   // provide() { | ||||
|   //   return { | ||||
|   //     top: this, | ||||
|   //     id: '', | ||||
|   //   } | ||||
|   // }, | ||||
|   onShow() { | ||||
|     // document.title =  '居民详情'  | ||||
|   }, | ||||
|   computed: { | ||||
|     tabs() { | ||||
|       return [ | ||||
|         { name: '居民信息', value: 0, comp: Info }, | ||||
|         { name: '居民档案', value: 1, comp: Document, hide: !this.detail.residentInfo }, | ||||
|       ].filter((e) => !e.hide) | ||||
|     }, | ||||
|     currentTab() { | ||||
|       return this.tabs.find((e) => e.value == this.currentType) | ||||
|     }, | ||||
|     isNormal() { | ||||
|       return !!this.id | ||||
|     }, | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       currentType: 0, | ||||
|       detail: {}, | ||||
|       showTagManage: false, | ||||
|       custom: '', | ||||
|       error: '', | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     // ...mapActions(['injectJWeixin', 'wxInvoke']), | ||||
|     handleTabClick(i) { | ||||
|       this.currentType = i | ||||
|     }, | ||||
|     getContact() { | ||||
|       if (this.isNormal) { | ||||
|         this.getCustom(this.id) | ||||
|       } else { | ||||
|         // this.injectJWeixin('getCurExternalContact') | ||||
|         //   .then(() => { | ||||
|         //     this.wxInvoke([ | ||||
|         //       'getCurExternalContact', | ||||
|         //       {}, | ||||
|         //       (res) => { | ||||
|         //         if (res?.err_msg == 'getCurExternalContact:ok') { | ||||
|         //           this.getCustom(res.userId) | ||||
|         //         } | ||||
|         //       }, | ||||
|         //     ]) | ||||
|         //   }) | ||||
|         //   .catch(({ errMsg }) => { | ||||
|         //     this.error = errMsg | ||||
|         //   }) | ||||
|       } | ||||
|     }, | ||||
|     getCustom(id) { | ||||
|       this.$instance | ||||
|         .post('/app/wxcp/wxcustomer/queryCustomerById', null, { | ||||
|           params: { id }, | ||||
|         }) | ||||
|         .then((ret) => { | ||||
|           if (ret?.data) { | ||||
|             this.custom = id | ||||
|             this.detail = ret.data | ||||
|             if (this.detail.type == 2) { | ||||
|               this.error = '只能查看个人微信绑定的居民信息' | ||||
|             } | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|   }, | ||||
|   onLoad(o) { | ||||
|     this.id = o.id | ||||
|     this.getContact() | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .resident { | ||||
|   display: flex; | ||||
|   flex-direction: column; | ||||
|   height: 100%; | ||||
|   background: #f5f5f5; | ||||
|  | ||||
|   .error { | ||||
|     font-size: 32px; | ||||
|     color: #666; | ||||
|     text-align: center; | ||||
|     display: flex; | ||||
|     flex-direction: column; | ||||
|     align-items: center; | ||||
|     justify-content: center; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .u-scroll-box { | ||||
|     border-bottom: 1px solid #d4d4d4; | ||||
|  | ||||
|     .u-tab-bar { | ||||
|       position: absolute; | ||||
|       bottom: -6px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .card { | ||||
|     background: #fff; | ||||
|     margin-bottom: 16px; | ||||
|     padding: 16px 32px; | ||||
|   } | ||||
|  | ||||
|   .half { | ||||
|     width: 50%; | ||||
|   } | ||||
|  | ||||
|   ::v-deep .tag { | ||||
|     height: 56px; | ||||
|     line-height: 56px; | ||||
|     background: #f3f4f7; | ||||
|     border-radius: 6px; | ||||
|     padding: 8px 16px; | ||||
|     margin-right: 16px; | ||||
|     margin-bottom: 16px; | ||||
|     overflow: hidden; | ||||
|     cursor: default; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,93 +0,0 @@ | ||||
| <template> | ||||
|   <div class="tagManage"> | ||||
|     <!-- <div class="card" v-for="(group, i) in tags" :key="i"> | ||||
|       <AiCell title :label="group.name" /> | ||||
|       <u-row> | ||||
|         <div class="tag" v-for="(op, j) in group.tagList" :key="j" :class="{ selected: selected.includes(op.id) }" @tap="$u.debounce(handleToggle(op.id))"> | ||||
|           {{ op.name }} | ||||
|         </div> | ||||
|       </u-row> | ||||
|     </div> --> | ||||
|  | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   // name: 'tagManage', | ||||
|   // inject: ['top'], | ||||
|   data() { | ||||
|     return { | ||||
|       tags: [], | ||||
|       top: {} | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     selected() { | ||||
|       return this.top.groupId ? this.top.detail?.tagList.map((e) => e.tagId) : this.top.detail?.tags.map((e) => e.tagId) | ||||
|     }, | ||||
|   }, | ||||
|   methods: { | ||||
|     getTags() { | ||||
|       this.$instance | ||||
|         .post(this.top.groupId ? '/app/wxcp/wxgroupchattag/listAll' : '/app/wxcp/wxcorptag/listAll', null, { | ||||
|           params: { size: 9999 }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           if (res?.data) { | ||||
|             this.tags = res.data.records | ||||
|           } | ||||
|         }) | ||||
|     }, | ||||
|     handleToggle(tagId) { | ||||
|       uni.showLoading({ | ||||
|         title: '提交中', | ||||
|       }) | ||||
|  | ||||
|       this.$instance | ||||
|         .post(this.top.groupId ? '/app/wxcp/wxgroupchattag/markTagForCP' : '/app/wxcp/wxcorptag/markTagForCP', null, { | ||||
|           params: this.top.groupId ? { tagId, groupId: this.top.groupId } : { tagId, customerId: this.top.custom }, | ||||
|         }) | ||||
|         .then((res) => { | ||||
|           uni.hideLoading() | ||||
|           if (res?.code == 0) { | ||||
|             this.$u.toast('操作成功!') | ||||
|             this.getTags() | ||||
|             this.top.getContact() | ||||
|           } | ||||
|         }) | ||||
|         .catch((err) => { | ||||
|           uni.hideLoading() | ||||
|           this.$u.toast(err) | ||||
|         }) | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     this.getTags() | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .tagManage { | ||||
|   padding-top: 16px; | ||||
|  | ||||
|   .tag { | ||||
|     cursor: pointer !important; | ||||
|  | ||||
|     &.selected { | ||||
|       background-color: $uni-color-primary !important; | ||||
|       color: #fff; | ||||
|     } | ||||
|  | ||||
|     &.disabled { | ||||
|       color: #999; | ||||
|       cursor: not-allowed; | ||||
|     } | ||||
|  | ||||
|     & + .tag { | ||||
|       margin-left: 16px; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,483 +0,0 @@ | ||||
| <template> | ||||
|   <div class="AppSpecialPeople"> | ||||
|     <template v-if="hasGridPermit"> | ||||
|       <div class="tab-select"> | ||||
|         <div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" | ||||
|              @click="tabClick(index)">{{ item }}<span></span></div> | ||||
|       </div> | ||||
|       <div class="area-select"> | ||||
|         <div class="select-content"> | ||||
|           <div class="area-content fill"> | ||||
|             <AiPagePicker type="gird" @select="handleGridSelect"> | ||||
|               <AiMore v-model="gridName" placeholder="选择网格"/> | ||||
|             </AiPagePicker> | ||||
|           </div> | ||||
|           <div class="search-input" v-if="tabIndex"> | ||||
|             <img src="./img/search-icon.png" alt=""/> | ||||
|             <u-input type="text" placeholder="请输入姓名" placeholder-style="color:#999;font-size:13px;" height="18" | ||||
|                      v-model="search.name" @confirm="getUserList" :clearable="false" maxlength="6"/> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div v-if="!tabIndex"> | ||||
|         <div class="info-content"> | ||||
|           <div class="title">特殊人群</div> | ||||
|           <div class="num-content"> | ||||
|             <div class="num-item" v-for="(item, index) in statisticsList" :key="index"> | ||||
|               <h3 v-text="item.value"/> | ||||
|               <p v-text="item.label"/> | ||||
|             </div> | ||||
|             <AiEmpty v-if="!statisticsList.length"/> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="info-content"> | ||||
|           <div class="title">本月新增</div> | ||||
|           <div class="num-content color-org"> | ||||
|             <div class="num-item" v-for="(item, index) in statisticsListMon" :key="index"> | ||||
|               <h3>{{ item.value }}</h3> | ||||
|               <p>{{ item.label }}</p> | ||||
|             </div> | ||||
|             <AiEmpty v-if="!statisticsListMon.length"/> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div v-else> | ||||
|         <div class="item-content" v-for="(item, index) in userList" :key="index"> | ||||
|           <div class="title" @click="showUserType(index)"> | ||||
|             <h2>{{ item.label }}</h2> | ||||
|             <img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''"/> | ||||
|           </div> | ||||
|           <div class="user-list" v-if="item.check"> | ||||
|             <div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" @click="showDetail(e)"> | ||||
|               <div class="user-img"> | ||||
|                 <img src="./img/user-img.png" alt=""/> | ||||
|               </div> | ||||
|               <div class="user-info"> | ||||
|                 <p class="name">{{ e.name }} | ||||
|                   <span class="btn-icon" v-if="isAdmin || user.id == e.create_user_id"> | ||||
|                   <img src="./img/edit-icon.png" alt="" @click.stop="toEdit(e,item.dictValue)"> | ||||
|                   <img src="./img/del-icon.png" alt="" @click.stop="del(e,item.dictValue)"> | ||||
|                 </span> | ||||
|                 </p> | ||||
|                 <div class="phone"> | ||||
|                   <span>{{ idNumberInit(e.idNumber) }}</span> | ||||
|                   <span>{{ e.phone }}</span> | ||||
|                 </div> | ||||
|               </div> | ||||
|             </div> | ||||
|             <p class="text" v-if="!item.value.length">{{ '暂无' + item.label + '信息' }}</p> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="footer" @click="toAdd"> | ||||
|           <div class="btn">新增特殊人群信息</div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </template> | ||||
|     <AiEmpty description="没有网格员权限<br>无法查看特殊人员信息~" v-else style="text-align:center;"/> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from "vuex"; | ||||
|  | ||||
| export default { | ||||
|   name: 'AppSpecialPeople', | ||||
|   appName: '特殊人群', | ||||
|   data() { | ||||
|     return { | ||||
|       areaName: '', | ||||
|       tabs: ['统计信息', '人员信息'], | ||||
|       tabIndex: 0, | ||||
|       addressArea: '', | ||||
|       statisticsList: [], | ||||
|       statisticsListMon: [], | ||||
|       userList: [], | ||||
|       gridName: "", | ||||
|       search: {name: ''} | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     hasGridPermit() { | ||||
|       return this.user.girdCheckType != 0 | ||||
|     }, | ||||
|     isAdmin() { | ||||
|       return this.user.girdCheckType == 2 | ||||
|     }, | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load('appSpecialTypeFive') | ||||
|   }, | ||||
|   onShow() { | ||||
|     document.title = '特殊人群管理' | ||||
|     if (this.hasGridPermit) { | ||||
|       if (!this.search.girdId) { | ||||
|         this.search.girdId = this.user.girdId | ||||
|         this.gridName = this.user.girdName | ||||
|       } | ||||
|       this.getDatas() | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getDatas() { | ||||
|       this.getStatistic() | ||||
|       this.getStatisticMon() | ||||
|       this.getUserList() | ||||
|       this.$forceUpdate() | ||||
|     }, | ||||
|     handleGridSelect(e) { | ||||
|       this.gridName = e?.girdName | ||||
|       this.search.girdId = e?.id | ||||
|       this.getDatas() | ||||
|     }, | ||||
|     areaSelect(e) { | ||||
|       this.search.areaId = e | ||||
|       this.getDatas() | ||||
|     }, | ||||
|     tabClick(index) { | ||||
|       this.tabIndex = index | ||||
|     }, | ||||
|     getStatistic() { | ||||
|       this.statisticsList = [] | ||||
|       this.$instance.post(`/app/appapplicationinfo/specialStatistic`, null, { | ||||
|         params: {...this.search, type: 0, range: 0} | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.statisticsList = Object.keys(res.data).map((label, i, arr) => ({label, value: res.data[label]})) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getStatisticMon() { | ||||
|       this.statisticsListMon = [] | ||||
|       this.$instance.post(`/app/appapplicationinfo/specialStatistic`, null, { | ||||
|         params: {...this.search, type: 0, range: 1} | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.statisticsListMon = Object.keys(res.data).map((label, i, arr) => ({label, value: res.data[label]})) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getUserList() { | ||||
|       this.userList = [] | ||||
|       this.$instance.post(`/app/appapplicationinfo/queryPeople`, null, { | ||||
|         params: {...this.search, type: 0, status: 1} | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.userList = Object.keys(res.data).map(e => ({ | ||||
|             label: e, | ||||
|             value: res.data[e], | ||||
|             check: false, | ||||
|           })) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toAdd() { | ||||
|       uni.navigateTo({url: './add'}) | ||||
|     }, | ||||
|     idNumberInit(idNumber) { | ||||
|       if (!idNumber) { | ||||
|         idNumber = '' | ||||
|       } else { | ||||
|         idNumber = idNumber.substring(0, 5) + '******' + idNumber.substring(12, 15) | ||||
|       } | ||||
|       return idNumber | ||||
|     }, | ||||
|     showUserType(index) { | ||||
|       if (this.userList[index].check) { | ||||
|         this.userList[index].check = false | ||||
|       } else { | ||||
|         this.userList.map((item) => { | ||||
|           item.check = false | ||||
|         }) | ||||
|         this.userList[index].check = true | ||||
|       } | ||||
|     }, | ||||
|     toEdit(row) { | ||||
|       uni.navigateTo({ | ||||
|         url: `./add?id=${row.id}&appId=${row.appId}` | ||||
|       }) | ||||
|     }, | ||||
|     del(row) { | ||||
|       this.$confirm('确定删除该数据?').then(() => { | ||||
|         uni.showLoading({}) | ||||
|         let {id: ids, appId} = row | ||||
|         this.$instance.post("/app/appapplicationinfo/delete", null, { | ||||
|           params: {ids, appId} | ||||
|         }).then((res) => { | ||||
|           if (res?.code == 0) { | ||||
|             this.$u.toast('删除成功!') | ||||
|             this.getUserList() | ||||
|           } | ||||
|           uni.hideLoading() | ||||
|         }) | ||||
|       }).catch(() => { | ||||
|       }) | ||||
|     }, | ||||
|     showDetail(e) { | ||||
|       uni.navigateTo({url: `/apps/AppPeopleList/DetailCard?id=${e.resident_id}`}) | ||||
|     } | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .AppSpecialPeople { | ||||
|   min-height: 100%; | ||||
|  | ||||
|   .tab-select { | ||||
|     width: 100%; | ||||
|     height: 96px; | ||||
|     line-height: 96px; | ||||
|     background: #3975c6; | ||||
|     display: flex; | ||||
|  | ||||
|     .item { | ||||
|       flex: 1; | ||||
|       text-align: center; | ||||
|       font-size: 28px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #cddcf0; | ||||
|     } | ||||
|  | ||||
|     .active { | ||||
|       font-family: PingFangSC-Medium, PingFang SC; | ||||
|       font-weight: 500; | ||||
|       position: relative; | ||||
|       color: #fff; | ||||
|  | ||||
|       span { | ||||
|         width: 48px; | ||||
|         height: 4px; | ||||
|         background: #fff; | ||||
|         position: absolute; | ||||
|         bottom: 14px; | ||||
|         left: 50%; | ||||
|         margin-left: -24px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .area-select { | ||||
|     width: 100%; | ||||
|     background: #fff; | ||||
|     padding-left: 32px; | ||||
|     box-sizing: border-box; | ||||
|  | ||||
|     .select-content { | ||||
|       width: 100%; | ||||
|       padding: 24px 32px 24px 0; | ||||
|       border-bottom: 1px solid #d8dde6; | ||||
|       display: flex; | ||||
|       justify-content: space-between; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #333; | ||||
|       line-height: 44px; | ||||
|       box-sizing: border-box; | ||||
|  | ||||
|       .area-content { | ||||
|         line-height: 64px; | ||||
|  | ||||
|         img { | ||||
|           width: 42px; | ||||
|           vertical-align: middle; | ||||
|           margin-right: 16px; | ||||
|         } | ||||
|  | ||||
|         .u-icon { | ||||
|           margin-left: 6px; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .search-input { | ||||
|         width: 402px; | ||||
|         height: 64px; | ||||
|         background: #f5f5f5; | ||||
|         border-radius: 32px; | ||||
|         padding: 14px 32px 14px 64px; | ||||
|         box-sizing: border-box; | ||||
|         position: relative; | ||||
|  | ||||
|         img { | ||||
|           width: 32px; | ||||
|           height: 32px; | ||||
|           margin-right: 12px; | ||||
|           position: absolute; | ||||
|           top: 18px; | ||||
|           left: 24px; | ||||
|         } | ||||
|  | ||||
|         ::v-deep .u-input { | ||||
|           display: inline-block; | ||||
|           width: 240px; | ||||
|           font-size: 26px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .info-content { | ||||
|     width: calc(100% - 64px); | ||||
|     background: #fff; | ||||
|     border-radius: 8px; | ||||
|     margin: 24px 32px 0; | ||||
|  | ||||
|     .title { | ||||
|       padding-left: 32px; | ||||
|       line-height: 94px; | ||||
|       border-bottom: 1px solid #ddd; | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Medium, PingFang SC; | ||||
|       font-weight: 500; | ||||
|       color: #333; | ||||
|     } | ||||
|  | ||||
|     .num-content { | ||||
|       overflow: hidden; | ||||
|  | ||||
|       .num-item { | ||||
|         float: left; | ||||
|         width: 33%; | ||||
|         padding: 40px 0; | ||||
|         text-align: center; | ||||
|  | ||||
|         h3 { | ||||
|           font-size: 64px; | ||||
|           font-family: DINAlternate-Bold, DINAlternate; | ||||
|           font-weight: bold; | ||||
|           color: #3192f4; | ||||
|           line-height: 74px; | ||||
|           margin-bottom: 10px; | ||||
|         } | ||||
|  | ||||
|         p { | ||||
|           font-size: 28px; | ||||
|           font-family: PingFangSC-Medium, PingFang SC; | ||||
|           font-weight: 500; | ||||
|           color: #999; | ||||
|           line-height: 40px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .color-org { | ||||
|       .num-item { | ||||
|         h3 { | ||||
|           color: #ff8700; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .item-content { | ||||
|     margin-bottom: 4px; | ||||
|  | ||||
|     .title { | ||||
|       width: 100%; | ||||
|       height: 108px; | ||||
|       line-height: 108px; | ||||
|       background: #fff; | ||||
|       padding: 0 32px; | ||||
|       box-sizing: border-box; | ||||
|       display: flex; | ||||
|       justify-content: space-between; | ||||
|  | ||||
|       h2 { | ||||
|         font-size: 32px; | ||||
|         font-family: PingFangSC-Semibold, PingFang SC; | ||||
|         font-weight: 600; | ||||
|         color: #333; | ||||
|       } | ||||
|  | ||||
|       img { | ||||
|         width: 34px; | ||||
|         height: 34px; | ||||
|         margin-top: 38px; | ||||
|         transition: all 0.3s ease-in-out; | ||||
|       } | ||||
|  | ||||
|       .img-active { | ||||
|         transform: rotate(180deg); | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .user-list { | ||||
|       background-color: #fff; | ||||
|  | ||||
|       .user-item { | ||||
|         padding: 24px 32px; | ||||
|         display: flex; | ||||
|  | ||||
|         .user-img { | ||||
|           width: 112px; | ||||
|  | ||||
|           img { | ||||
|             width: 80px; | ||||
|             height: 80px; | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         .user-info { | ||||
|           width: 100%; | ||||
|  | ||||
|           .name { | ||||
|             font-size: 32px; | ||||
|             font-family: PingFangSC-Medium, PingFang SC; | ||||
|             font-weight: 500; | ||||
|             color: #333; | ||||
|             line-height: 44px; | ||||
|             margin-bottom: 8px; | ||||
|  | ||||
|             .btn-icon { | ||||
|               float: right; | ||||
|  | ||||
|               img { | ||||
|                 width: 48px; | ||||
|                 height: 48px; | ||||
|                 margin-left: 20px; | ||||
|                 vertical-align: baseline; | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|  | ||||
|           .phone { | ||||
|             width: 100%; | ||||
|             font-size: 26px; | ||||
|             font-family: PingFangSC-Regular, PingFang SC; | ||||
|             color: #999; | ||||
|             line-height: 36px; | ||||
|             display: flex; | ||||
|             justify-content: space-between; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .text { | ||||
|     height: 96px; | ||||
|     line-height: 96px; | ||||
|     color: #999; | ||||
|     font-size: 28px; | ||||
|     text-align: center; | ||||
|   } | ||||
|  | ||||
|   .footer { | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|   } | ||||
|  | ||||
|   .btn { | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     background: #1365dd; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #fff; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| @@ -1,620 +0,0 @@ | ||||
| <template> | ||||
|   <div class="add"> | ||||
|     <div class="pad-l32"> | ||||
|       <div class="item" v-if="!isEdit"> | ||||
|         <span class="label"><span class="tips">*</span>类型</span> | ||||
|         <div class="value" @click="showType=true"> | ||||
|           <AiMore v-model="appName"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="info-content" v-for="(items, indexs) in formDataList" :key="indexs"> | ||||
|         <div v-for="(item, index) in items" :key="index"> | ||||
|           <!-- 初始化字段锁定 --> | ||||
|           <div class="item" v-if="!!formData[item.isInit]&&item.isInit!=item.fieldDbName"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" v-if="item.dict" | ||||
|                  v-text="toString($dict.getLabel(item.dict, formData[item.fieldDbName]))"/> | ||||
|             <div class="value" v-if="item.type=='area'"> | ||||
|               <AiAreaPicker :value="formData[item.fieldDbName]" isForm disabled/> | ||||
|             </div> | ||||
|             <div class="value" v-if="item.type=='upload'"> | ||||
|               <template v-if="formData[item.fieldDbName]"> | ||||
|                 <ai-image v-for="(op,i) in [formData[item.fieldDbName]].flat()" :key="i" :src="op" preview/> | ||||
|               </template> | ||||
|               <span v-else>-</span> | ||||
|             </div> | ||||
|             <div class="value" v-else v-text="toString(formData[item.fieldDbName])"/> | ||||
|           </div> | ||||
|           <!-- input输入框 --> | ||||
|           <div class="item" v-if="item.type == 'input' || item.type == 'name' || item.type == 'phone'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" | ||||
|                        height="48" v-model="formData[item.fieldDbName]" :maxlength="item.maxLength"/> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- number 输入框 --> | ||||
|           <div class="item" v-if="item.type == 'number'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-input type="number" placeholder="请输入" input-align="right" | ||||
|                        placeholder-style="color:#999;font-size:16px;" height="48" v-model="formData[item.fieldDbName]" | ||||
|                        :maxlength="item.maxLength"/> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 身份证输入框 --> | ||||
|           <div class="item" v-if="item.type == 'idNumber'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-input type="idcard" placeholder="请输入" input-align="right" | ||||
|                        placeholder-style="color:#999;font-size:16px;" height="48" v-model="formData[item.fieldDbName]" | ||||
|                        :maxlength="item.maxLength"/> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- textarea输入框 富文本--> | ||||
|           <div class="textarea" v-if="item.type == 'textarea' || item.type == 'text' || item.type == 'rtf'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-input type="textarea" placeholder="请输入请输入" placeholder-style="color:#999;font-size:16px;" height="200" | ||||
|                        v-model="formData[item.fieldDbName]" :maxlength="item.maxLength"/> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 字典下拉选择 --> | ||||
|           <div class="item" v-if="item.type == 'dict'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" @click="selectClick(item.fieldDbName, item.dict)"> | ||||
|               <AiMore :value="$dict.getLabel(item.dict, formData[item.fieldDbName])"/> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 单选radio --> | ||||
|           <div class="item" v-if="item.type == 'radio'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-radio-group v-model="formData[item.fieldDbName]"> | ||||
|                 <!-- <u-radio :name="item.dictValue" v-for="(item, index) in $dict.getDict(item.dict)" :key="index"> | ||||
|                   {{ item.dictName }} | ||||
|                 </u-radio> --> | ||||
|               </u-radio-group> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 开关onOff --> | ||||
|           <div class="item" v-if="item.type == 'onOff'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-switch v-model="formData[item.fieldDbName]" :active-value="1" :inactive-value="0"></u-switch> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 多选checkbox --> | ||||
|           <div class="textarea" v-if="item.type == 'checkbox'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <u-checkbox-group> | ||||
|                 <u-checkbox | ||||
|                     v-model="e.checked" | ||||
|                     v-for="(e, i) in item.checkList" :key="i" | ||||
|                     :name="item.dictValue" | ||||
|                     @change="checkboxChange(indexs, index, i)" | ||||
|                 >{{ e.dictName }} | ||||
|                 </u-checkbox> | ||||
|               </u-checkbox-group> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 附件 --> | ||||
|           <div class="textarea" v-if="item.type == 'upload'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value"> | ||||
|               <!-- <AiUploader :multiple="true" type="image" :limit="9" placeholder="上传图片" | ||||
|                           :def.sync="formData[item.fieldDbName]" | ||||
|                           action="/admin/file/add2"/> --> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 地区选择 --> | ||||
|           <div class="item" v-if="item.type == 'area'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" flex> | ||||
|               <!-- <AiAreaPicker @select="v=>formData[item.fieldDbName]=v" :name.sync="formData[item.fieldDbName+'_name']" | ||||
|                             all :value="formData[item.fieldDbName]" :valueLevel="item.areaPattern" isForm/> --> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 人员选择 --> | ||||
|           <div class="item" v-if="item.type == 'user'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" @click="handleSelectUser(item.fieldDbName)"> | ||||
|               <template v-if="!formData[item.fieldDbName].length"> | ||||
|                 <span>请选择</span> | ||||
|               </template> | ||||
|               <template v-else> | ||||
|                 已选择<em>{{ formData[item.fieldDbName].map(e => e.name).slice(0, 2).join("、") }}</em>等<em>{{ | ||||
|                   formData[item.fieldDbName].length | ||||
|                 }}</em>人 | ||||
|               </template> | ||||
|               <u-icon name="arrow-right" color="#ddd"></u-icon> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 日期选择 / 日期带时分秒选择 / 时间-时分秒选择 --> | ||||
|           <div class="item" v-if="item.type == 'date' || item.type == 'datetime' || item.type == 'time'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" @click="dateClick(indexs, index)" flex> | ||||
|               <AiMore v-model="formData[item.fieldDbName]"/> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 居民档案选择 --> | ||||
|           <div class="item" v-if="item.type == 'resident'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" flex> | ||||
|               <AiPagePicker @select="v=>handleSelectResident(v,item)" single> | ||||
|                 <AiMore v-model="formData[item.fieldDbName + '_name']" :placeholder="item.fieldTips"/> | ||||
|               </AiPagePicker> | ||||
|             </div> | ||||
|           </div> | ||||
|           <!-- 网格选择 --> | ||||
|           <div class="item" v-if="item.type == 'gird'"> | ||||
|             <span class="label"><span class="tips">{{ item.mustFill == 1 ? '*' : '' }}</span>{{ item.fieldName }}</span> | ||||
|             <div class="value" flex> | ||||
|               <AiPagePicker type="gird" @select="v=>handleSelectGird(v,item)"> | ||||
|                 <AiMore v-model="formData[item.fieldDbName + '_name']" :placeholder="item.fieldTips"/> | ||||
|               </AiPagePicker> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <u-picker mode="time" v-model="dateShow" :params="deteParams" @confirm="dateConfirm">请选择</u-picker> | ||||
|     <u-select v-model="selectShow" mode="single-column" :list="selectList" label-name="dictName" value-name="dictValue" | ||||
|               @confirm="selectConfirm"></u-select> | ||||
|     <u-select v-model="showType" :list="typeList" label-name="applicationName" value-name="id" | ||||
|               @confirm="typeConfirm"></u-select> | ||||
|     <div class="footer" @click="submit" v-if="appId"> | ||||
|       <div class="btn">保存</div> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapActions, mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|       appId: '', | ||||
|       appName: '', | ||||
|       showType: false, | ||||
|       typeList: [], | ||||
|       formDataList: [], | ||||
|       formData: {}, | ||||
|       pageShow: false, | ||||
|       dateShow: false, | ||||
|       deteParams: {}, | ||||
|       datePropIndex: '', //时间选择 formDataList索引 | ||||
|       dateIndex: '', //时间选择 formDataList 数组里面的索引 | ||||
|       selectName: '', | ||||
|       selectList: [], | ||||
|       selectShow: false, | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     isEdit() { | ||||
|       return !!this.$route.query.id | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     // this.getType() | ||||
|   }, | ||||
|   onShow() { | ||||
|     // if (this.isEdit) { | ||||
|     //   document.title = "编辑人员" | ||||
|     //   if (!this.appId) { | ||||
|     //     let {appId: value} = this.$route.query | ||||
|     //     this.typeConfirm([{value}]).then(() => this.getDetail()) | ||||
|     //   } | ||||
|     // } else { | ||||
|     //   document.title = '新增人员' | ||||
|     //   if (this.$route.query.appId && !this.appId) { | ||||
|     //     let {appId: value, appName} = this.$route.query | ||||
|     //     this.typeConfirm([{value, label: decodeURIComponent(appName)}]) | ||||
|     //   } | ||||
|     // } | ||||
|   }, | ||||
|   methods: { | ||||
|     // ...mapActions(['selectEnterpriseContact']), | ||||
|     handleSelectUser(fieldDbName) { | ||||
|       // this.selectEnterpriseContact({ | ||||
|       //   fromDepartmentId: 0, | ||||
|       //   type: ["user"], | ||||
|       //   selectedUserIds: this.form[fieldDbName]?.map(e => e.id) | ||||
|       // }).then(res => { | ||||
|       //   this.form[fieldDbName] = res?.userList || [] | ||||
|       // }) | ||||
|     }, | ||||
|     getType() { | ||||
|       this.$instance.post(`/app/appapplicationinfo/queryApplicationListByType`, null, { | ||||
|         params: {type: 0, status: 1} | ||||
|       }).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.typeList = res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     typeConfirm(e) { | ||||
|       this.appId = e[0].value | ||||
|       this.appName = e[0].label | ||||
|       return this.$instance.post(`/app/appapplicationinfo/queryApplicationInfo?appId=${this.appId}`).then((res) => { | ||||
|         if (res?.data) { | ||||
|           this.formData = {} | ||||
|           let data = res.data | ||||
|           let dictList = [] | ||||
|           let formList = {} | ||||
|           data.tableInfos.map((item) => { | ||||
|             let colItem | ||||
|             if (item.dictionaryCode) { | ||||
|               dictList.push(item.dictionaryCode) | ||||
|             } | ||||
|             if (item.dictionaryCode && item.type != 'radio' && item.type != 'checkbox' && item.type != 'onOff') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 type: 'dict', | ||||
|                 dict: item.dictionaryCode, | ||||
|                 fieldValue: item.defaultValue || '' | ||||
|               } | ||||
|             } else if (item.type == 'radio') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 dict: item.dictionaryCode, | ||||
|                 fieldValue: item.defaultValue || '' | ||||
|               } | ||||
|             } else if (item.type == 'checkbox') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 dict: item.dictionaryCode, | ||||
|                 fieldValue: '' | ||||
|               } | ||||
|               if (item.defaultValue) { | ||||
|                 colItem.fieldValue = item.defaultValue?.split('`') | ||||
|               } | ||||
|  | ||||
|             } else if (item.type == 'onOff') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 fieldValue: 0 | ||||
|               } | ||||
|             } else if (item.type == 'number') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 type: item.type, | ||||
|                 min: item.minValue || '', | ||||
|                 max: item.maxValue || '', | ||||
|                 fieldValue: Number(item.defaultValue) || 0 | ||||
|               } | ||||
|             } else if (item.type == 'upload' || item.type == 'user') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 type: item.type, | ||||
|                 fieldValue: [] | ||||
|               } | ||||
|             } else if (item.type == 'area') { | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 type: item.type, | ||||
|                 fieldValue: "", | ||||
|               } | ||||
|             } else { | ||||
|               if (item.type == 'date') { | ||||
|                 item.params = {year: true, month: true, day: true, hour: false, minute: false, second: false} | ||||
|               } | ||||
|               if (item.type == 'datetime') { | ||||
|                 item.params = {year: true, month: true, day: true, hour: true, minute: true, second: true} | ||||
|               } | ||||
|               if (item.type == 'time') { | ||||
|                 item.params = {year: false, month: false, day: false, hour: true, minute: true, second: true} | ||||
|               } | ||||
|  | ||||
|               colItem = { | ||||
|                 ...item, | ||||
|                 type: item.type, | ||||
|               } | ||||
|               colItem.fieldValue = item.defaultValue || '' | ||||
|             } | ||||
|             formList[item.groupIndex]?.push(colItem) || (formList[item.groupIndex] = [colItem]) | ||||
|             this.$set(this.formData, colItem.fieldDbName, colItem.fieldValue || "") | ||||
|           }) | ||||
|           this.formDataList = Object.values(formList) | ||||
|  | ||||
|           if (dictList.length) { | ||||
|             this.getDictList(dictList) | ||||
|           } else { | ||||
|             this.formDataList.map((item) => { | ||||
|               item.map((e) => { | ||||
|                 if (e.type == 'onOff') { //开关 | ||||
|                   this.formData[e.fieldDbName] = 0 | ||||
|                 } | ||||
|                 if (e.type == 'area') { //地区 | ||||
|                   this.formData[e.fieldDbName + '_name'] = this.user.areaName | ||||
|                 } | ||||
|               }) | ||||
|             }) | ||||
|             this.$forceUpdate() | ||||
|             this.pageShow = true | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getDictList(listName) { | ||||
|       this.$dict.load(listName.join(',')).then(() => { | ||||
|         this.formDataList.map((item) => { | ||||
|           item.map((e) => { | ||||
|             if (e.type == 'checkbox') {  //多选 | ||||
|               var list = this.$dict.getDict(e.dict) | ||||
|               list.map((items) => { | ||||
|                 items.checked = false | ||||
|               }) | ||||
|               e.checkList = list | ||||
|             } | ||||
|             if (e.type == 'onOff') { //开关 | ||||
|               this.formData[e.fieldDbName] = 0 | ||||
|             } | ||||
|             if (e.type == 'area') { //地区 | ||||
|               this.formData[e.fieldDbName + '_name'] = this.user.areaName | ||||
|             } | ||||
|           }) | ||||
|         }) | ||||
|         this.$forceUpdate() | ||||
|         this.pageShow = true | ||||
|       }) | ||||
|     }, | ||||
|     selectClick(name, dictName) { | ||||
|       this.selectName = name | ||||
|       this.selectList = this.$dict.getDict(dictName) | ||||
|       this.selectShow = true | ||||
|     }, | ||||
|     selectConfirm(e) { | ||||
|       this.formData[this.selectName] = e[0].value | ||||
|     }, | ||||
|     checkboxChange(indexs, index, i) { | ||||
|       this.formDataList[indexs][index].checkList[i].checked = !this.formDataList[indexs][index].checkList[i].checked | ||||
|       this.$forceUpdate() | ||||
|     }, | ||||
|     dateClick(indexs, index) { | ||||
|       this.deteParams = this.formDataList[indexs][index].params | ||||
|       this.datePropIndex = indexs | ||||
|       this.dateIndex = index | ||||
|  | ||||
|       this.$nextTick(() => { | ||||
|         this.dateShow = true | ||||
|       }) | ||||
|     }, | ||||
|     dateConfirm(e) { | ||||
|       var fieldDbName = this.formDataList[this.datePropIndex][this.dateIndex].fieldDbName | ||||
|       if (this.formDataList[this.datePropIndex][this.dateIndex].type == 'date') {  //年月日 | ||||
|         this.formData[fieldDbName] = `${e.year}-${e.month}-${e.day}` | ||||
|       } | ||||
|       if (this.formDataList[this.datePropIndex][this.dateIndex].type == 'datetime') {  //年月日时分秒 | ||||
|         this.formData[fieldDbName] = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${e.second}` | ||||
|       } | ||||
|       if (this.formDataList[this.datePropIndex][this.dateIndex].type == 'time') {  //时分秒 | ||||
|         this.formData[fieldDbName] = `${e.hour}:${e.minute}:${e.second}` | ||||
|       } | ||||
|     }, | ||||
|     submit() { | ||||
|       let isValid = true, form = JSON.parse(JSON.stringify(this.formData)) | ||||
|       this.formDataList.map((item) => { | ||||
|         item?.map((items) => { | ||||
|           if (items.type == 'checkbox') { //多选 | ||||
|             form[items.fieldDbName] = '' | ||||
|             let list = [] | ||||
|             items.checkList.map((e) => { | ||||
|               if (e.checked) { | ||||
|                 list.push(e.dictValue) | ||||
|               } | ||||
|             }) | ||||
|             form[items.fieldDbName] = list?.toString() | ||||
|           } | ||||
|           if (items.type == 'upload') { //附件 只传id | ||||
|             let files = []; | ||||
|             [form[items.fieldDbName]]?.flat()?.map(item => item?.url && files.push(item.url)) | ||||
|             form[items.fieldDbName] = files?.toString() | ||||
|           } | ||||
|           // if (items.type == 'onOff') { //开关 | ||||
|           //   form[items.fieldDbName] = form[items.fieldDbName] ? '1' : '0' | ||||
|           // } | ||||
|           if (items.type == 'area' && form[items.fieldDbName]) { | ||||
|             let area = [] | ||||
|             area.push(form[items.fieldDbName]) | ||||
|             area.push(form[items.fieldDbName + '_name']) | ||||
|             form[items.fieldDbName] = area.join('_') | ||||
|           } | ||||
|         }) | ||||
|       }) | ||||
|       this.formDataList.some((item) => { | ||||
|         return item.some((items) => { | ||||
|           if (items.mustFill == 1 && !form[items.fieldDbName]) { | ||||
|             isValid = false | ||||
|             return this.$u.toast(`${items.fieldName}为必填项`) | ||||
|           } | ||||
|         }) | ||||
|       }) | ||||
|  | ||||
|       if (!isValid) return | ||||
|  | ||||
|       this.$instance.post(`/app/appapplicationinfo/addOrUpdate?appId=${this.appId}`, { | ||||
|         ...form | ||||
|       }).then(res => { | ||||
|         if (res?.code == 0) { | ||||
|           this.$u.toast('提交成功') | ||||
|           setTimeout(() => uni.navigateBack({ | ||||
|             success: () => { | ||||
|               uni.$emit("selectType") | ||||
|             } | ||||
|           }), 1500) | ||||
|         } else this.$u.toast(res?.msg || "提交失败,请联系管理员") | ||||
|       }).catch(err => { | ||||
|         this.$u.toast(err || "提交失败,请联系管理员") | ||||
|       }) | ||||
|     }, | ||||
|     handleSelectResident(resident, item) { | ||||
|       let info = resident?.[0] || {} | ||||
|       this.formData = {...this.formData, ...info} | ||||
|       this.formData[item.fieldDbName] = info.id | ||||
|       this.formData[item.fieldDbName + "_name"] = info.name | ||||
|       this.$forceUpdate() | ||||
|     }, | ||||
|     toString(obj) { | ||||
|       return obj?.toString() || "-" | ||||
|     }, | ||||
|     handleSelectGird(gird, item) { | ||||
|       let info = gird || {} | ||||
|       this.formData[item.fieldDbName] = [info.id, info.girdName].join("_") | ||||
|       this.formData[item.fieldDbName + "_name"] = info.girdName | ||||
|       this.$forceUpdate() | ||||
|     }, | ||||
|     getDetail() { | ||||
|       let {id, appId} = this.$route.query | ||||
|       return id ? this.$instance.post("/app/appapplicationinfo/queryDetailById", null, { | ||||
|         params: {id, appId} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.formData = res.data | ||||
|           this.$forceUpdate() | ||||
|         } | ||||
|       }) : Promise.resolve() | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .add { | ||||
|   padding-bottom: 112px; | ||||
|  | ||||
|   .title { | ||||
|     width: 100%; | ||||
|     height: 96px; | ||||
|     line-height: 96px; | ||||
|     background: #FFF; | ||||
|     font-size: 32px; | ||||
|     font-weight: 500; | ||||
|     color: #262B36; | ||||
|     padding-right: 32px; | ||||
|     box-sizing: border-box; | ||||
|     overflow: hidden; | ||||
|  | ||||
|     .tips { | ||||
|       display: inline-block; | ||||
|       width: 8px; | ||||
|       height: 32px; | ||||
|       background: #4E75FE; | ||||
|       box-shadow: 0 8px 24px 2px #C9D8FA; | ||||
|       border-radius: 4px; | ||||
|       vertical-align: middle; | ||||
|       margin-right: 22px; | ||||
|     } | ||||
|  | ||||
|     .select { | ||||
|       float: right; | ||||
|       font-size: 30px; | ||||
|       color: #1365DD; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .item { | ||||
|     width: 100%; | ||||
|     padding: 34px 32px 34px 0; | ||||
|     background: #FFFFFF; | ||||
|     border-bottom: 1px solid #D8DDE6; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Regular, PingFang SC; | ||||
|     color: #333; | ||||
|     line-height: 44px; | ||||
|     box-sizing: border-box; | ||||
|     position: relative; | ||||
|  | ||||
|     .value { | ||||
|       .u-icon { | ||||
|         margin-left: 16px; | ||||
|       } | ||||
|  | ||||
|       ::v-deep .u-input { | ||||
|         font-size: 32px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .color-999 { | ||||
|     color: #999; | ||||
|   } | ||||
|  | ||||
|   .tips { | ||||
|     display: inline-block; | ||||
|     width: 16px; | ||||
|     height: 44px; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Regular, PingFang SC; | ||||
|     color: #F46; | ||||
|     line-height: 44px; | ||||
|   } | ||||
|  | ||||
|   .textarea { | ||||
|     width: 100%; | ||||
|     padding: 34px 32px 34px 0; | ||||
|     background: #FFFFFF; | ||||
|     border-bottom: 1px solid #D8DDE6; | ||||
|  | ||||
|     .label { | ||||
|       display: inline-block; | ||||
|       font-size: 32px; | ||||
|       font-family: PingFangSC-Regular, PingFang SC; | ||||
|       color: #333; | ||||
|       line-height: 44px; | ||||
|       margin-bottom: 8px; | ||||
|     } | ||||
|  | ||||
|     .value { | ||||
|       padding: 0 16px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep .default { | ||||
|     width: 160px !important; | ||||
|     height: 160px !important; | ||||
|   } | ||||
|  | ||||
|   .area-icon { | ||||
|     vertical-align: super; | ||||
|     position: absolute; | ||||
|     top: 10px; | ||||
|     right: 0; | ||||
|   } | ||||
|  | ||||
|   .footer { | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|   } | ||||
|  | ||||
|   .btn { | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     background: #1365DD; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|   } | ||||
|  | ||||
|   .line-bg { | ||||
|     width: 100%; | ||||
|     height: 16px; | ||||
|     background: #F5F5F5; | ||||
|   } | ||||
|  | ||||
|   .pad-l32 { | ||||
|     padding-left: 32px; | ||||
|     background-color: #fff; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
| Before Width: | Height: | Size: 1.4 KiB | 
| Before Width: | Height: | Size: 282 B | 
| Before Width: | Height: | Size: 1.3 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 766 B | 
| Before Width: | Height: | Size: 2.7 KiB | 
							
								
								
									
										46
									
								
								src/project/weiyang/AppBuilding/AppBuilding.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,46 @@ | ||||
| <template> | ||||
|   <div class="AppBuilding"> | ||||
|     <u-navbar back-icon-color="#000" title="以房找人" title-color="#000" title-width="300" title-size="32"  | ||||
|       :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar> | ||||
|     <search-map v-if="show" :style="{'height': 'calc'+(100%-`${statusBarHeight+44}`+'px')}"/> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
|  | ||||
| import SearchMap from "./components/searchMap"; | ||||
|  | ||||
| export default { | ||||
|   name: 'AppBuilding', | ||||
|   components: {SearchMap}, | ||||
|   appName: '以房找人', | ||||
|   customNavigation: true, | ||||
|   data() { | ||||
|     return { | ||||
|       show: true, | ||||
|       backgroundNavbar: { | ||||
|         background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat', | ||||
|         backgroundSize: 'cover', | ||||
|       }, | ||||
|       statusBarHeight: uni.getSystemInfoSync().statusBarHeight, | ||||
|     } | ||||
|   }, | ||||
|   onShow() { | ||||
|     this.show = false | ||||
|     this.$nextTick(() => { | ||||
|       this.show = true | ||||
|     }) | ||||
|     // document.title = "以房找人" | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| uni-page-body { | ||||
|   height: 100%; | ||||
| } | ||||
|  | ||||
| .AppBuilding { | ||||
|   height: 100%; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										293
									
								
								src/project/weiyang/AppBuilding/add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,293 @@ | ||||
| <template> | ||||
|   <div class="add"> | ||||
|     <u-navbar back-icon-color="#000" title="房屋信息" title-color="#000" title-width="300" title-size="32"  | ||||
|       :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar> | ||||
|     <div class="title"> | ||||
|       <span class="tips"/>房屋信息 | ||||
|     </div> | ||||
|     <div class="pad-l32"> | ||||
|       <div class="item"> | ||||
|         <span class="label">房屋面积</span> | ||||
|         <div class="value"> | ||||
|           <u-input type="digit" placeholder="请输入" v-model="houseInfo.houseArea" input-align="right" | ||||
|                    placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="7"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item"> | ||||
|         <span class="label">居住现状</span> | ||||
|         <div class="value" @click="selectClick('houselivingStatus', 'livingStatus')"> | ||||
|           <span | ||||
|               :class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item"> | ||||
|         <span class="label">房屋用途</span> | ||||
|         <div class="value" @click="selectClick('houseUseStatus', 'houseUse')"> | ||||
|           <span | ||||
|               :class="houseInfo.houseUse === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('houseUseStatus', houseInfo.houseUse) || '请选择' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item" v-if="houseInfo.livingStatus == 1"> | ||||
|         <span class="label">承租情况</span> | ||||
|         <div class="value" @click="selectClick('houseLeaseSituation', 'leaseSituation')"> | ||||
|           <span | ||||
|               :class="houseInfo.leaseSituation === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || '请选择' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item" v-if="houseInfo.livingStatus == 1"> | ||||
|         <span class="label">起租日期</span> | ||||
|         <div class="value" @click="dateShow=true"> | ||||
|           <span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ $dateFormat(houseInfo.startDate,'YYYY-MM-DD') || '请选择' }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="item" v-if="houseInfo.livingStatus == 1"> | ||||
|         <span class="label">租房备案证明</span> | ||||
|         <div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')"> | ||||
|           <span | ||||
|               :class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="line-bg"/> | ||||
|     <div class="title"> | ||||
|       <span class="tips"/>房主信息 | ||||
|       <AiPagePicker class="select" :selected.sync="houseInfo.owner">选择人员</AiPagePicker> | ||||
|     </div> | ||||
|     <div class="pad-l32"> | ||||
|       <div class="item" v-for="(item, index) in houseInfo.owner" :key="index"> | ||||
|         <span class="label">{{ item.name }}</span> | ||||
|         <div class="value" @click="tableRelationSelect('owner', index)"> | ||||
|           <span | ||||
|               :class=" item.relation === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('householdRelation', item.relation) || '与户主关系' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="line-bg"/> | ||||
|     <div class="title"> | ||||
|       <span class="tips"/>承租人信息 | ||||
|       <AiPagePicker class="select" :selected.sync="houseInfo.renter">选择人员</AiPagePicker> | ||||
|     </div> | ||||
|     <div class="pad-l32"> | ||||
|       <div class="item" v-for="(item, index) in houseInfo.renter" :key="index"> | ||||
|         <span class="label">{{ item.name }}</span> | ||||
|         <div class="value" @click="tableRelationSelect('renter', index)"> | ||||
|           <span | ||||
|               :class=" item.relation === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('householdRelation', item.relation) || '与户主关系' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="line-bg"/> | ||||
|     <div class="title"> | ||||
|       <span class="tips"/>实际居住人员 | ||||
|       <AiPagePicker class="select" :selected.sync="houseInfo.live">选择人员</AiPagePicker> | ||||
|     </div> | ||||
|     <div class="pad-l32"> | ||||
|       <div class="item" v-for="(item, index) in houseInfo.live" :key="index"> | ||||
|         <span class="label">{{ item.name }}</span> | ||||
|         <div class="value" @click="tableRelationSelect('live', index)"> | ||||
|           <span | ||||
|               :class=" item.relation === '' ? 'color-999' : ''">{{ | ||||
|               $dict.getLabel('householdRelation', item.relation) || '与户主关系' | ||||
|             }}</span> | ||||
|           <u-icon name="arrow-right" color="#cccccc" size="14"/> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="footer" @click="submit"> | ||||
|       <div class="btn">保存</div> | ||||
|     </div> | ||||
|  | ||||
|     <u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择 | ||||
|     </u-picker> | ||||
|     <u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue" | ||||
|               @confirm="confirmSelect"/> | ||||
|     <u-select v-model="showRelation" :list="$dict.getDict('householdRelation')" label-name="dictName" | ||||
|               value-name="dictValue" @confirm="confirmRelation"/> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapActions, mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   appName: '以房找人', | ||||
|   customNavigation: true, | ||||
|   data() { | ||||
|     return { | ||||
|       houseInfo: {}, | ||||
|       showSelect: false, | ||||
|       selectList: [], | ||||
|       formName: '', | ||||
|       dateShow: false, | ||||
|       deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false}, | ||||
|       showRelation: false, | ||||
|       tableName: '', | ||||
|       tableIndex: '', | ||||
|       lockSelector: false, | ||||
|       backgroundNavbar: { | ||||
|         background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat', | ||||
|         backgroundSize: 'cover', | ||||
|       }, | ||||
|       id: '' | ||||
|     } | ||||
|   }, | ||||
|   computed: {...mapState(['user'])}, | ||||
|   onLoad(option) { | ||||
|     this.id = option.id | ||||
|     this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus', | ||||
|         'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => { | ||||
|       this.getDetail() | ||||
|     }) | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     ...mapActions(['selectEnterpriseContact']), | ||||
|     tableRelationSelect(name, index) { | ||||
|       this.tableName = name | ||||
|       this.tableIndex = index | ||||
|       this.showRelation = true | ||||
|     }, | ||||
|     confirmRelation(e) { | ||||
|       this.houseInfo[this.tableName][this.tableIndex].relation = e[0].value | ||||
|     }, | ||||
|     getDetail() { | ||||
|       // let {id} = this.$route.query | ||||
|       id && this.$instance.post(`/app/appcommunityhouseinfo/queryDetailById?id=${this.id}`).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.houseInfo = res.data | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     submit() { | ||||
|       this.$instance.post(`/app/appcommunityhouseinfo/update`, this.houseInfo).then(res => { | ||||
|         if (res?.code == 0) { | ||||
|           this.$u.toast('提交成功') | ||||
|           setTimeout(() => { | ||||
|             uni.navigateBack({}) | ||||
|           }, 600) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     selectClick(dictName, formName) { | ||||
|       this.selectList = this.$dict.getDict(dictName) | ||||
|       this.formName = formName | ||||
|       this.showSelect = true | ||||
|     }, | ||||
|     confirmSelect(e) { | ||||
|       this.houseInfo[this.formName] = e[0].value | ||||
|     }, | ||||
|     dateConfirm(e) { | ||||
|       this.houseInfo.startDate = `${e.year}-${e.month}-${e.day} 00:00:00` | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .add { | ||||
|   padding-bottom: 112px; | ||||
|  | ||||
|   .title { | ||||
|     width: 100%; | ||||
|     height: 96px; | ||||
|     line-height: 96px; | ||||
|     background: #FFF; | ||||
|     font-size: 32px; | ||||
|     font-weight: 500; | ||||
|     color: #262B36; | ||||
|     padding-right: 32px; | ||||
|     box-sizing: border-box; | ||||
|     overflow: hidden; | ||||
|  | ||||
|     .tips { | ||||
|       display: inline-block; | ||||
|       width: 8px; | ||||
|       height: 32px; | ||||
|       background: #4E75FE; | ||||
|       box-shadow: 0 8px 24px 2px #C9D8FA; | ||||
|       border-radius: 4px; | ||||
|       vertical-align: middle; | ||||
|       margin-right: 22px; | ||||
|     } | ||||
|  | ||||
|     .select { | ||||
|       float: right; | ||||
|       font-size: 30px; | ||||
|       color: #1365DD; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .item { | ||||
|     width: 100%; | ||||
|     padding: 34px 32px 34px 0; | ||||
|     background: #FFFFFF; | ||||
|     border-bottom: 1px solid #D8DDE6; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Regular, PingFang SC; | ||||
|     color: #333; | ||||
|     line-height: 44px; | ||||
|     box-sizing: border-box; | ||||
|  | ||||
|     .color-999 { | ||||
|       color: #999; | ||||
|     } | ||||
|  | ||||
|     .value { | ||||
|       .u-icon { | ||||
|         margin-left: 16px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .footer { | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|   } | ||||
|  | ||||
|   .btn { | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     background: #1365DD; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|   } | ||||
|  | ||||
|   .line-bg { | ||||
|     width: 100%; | ||||
|     height: 16px; | ||||
|     background: #F5F5F5; | ||||
|   } | ||||
|  | ||||
|   .pad-l32 { | ||||
|     padding-left: 32px; | ||||
|     background-color: #fff; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/back-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 545 B | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/build-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 866 B | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/check-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.7 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/cir-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/del-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 757 B | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/model-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.9 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/search-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/user-icon.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 892 B | 
							
								
								
									
										
											BIN
										
									
								
								src/project/weiyang/AppBuilding/components/img/user-img.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 1.4 KiB | 
							
								
								
									
										725
									
								
								src/project/weiyang/AppBuilding/components/searchMap.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,725 @@ | ||||
| <template> | ||||
|   <div class="searchMap"> | ||||
|     <div class="grid-input" :style="{'top': `${statusBarHeight+60}px`}"> | ||||
|       <img src="./img/back-icon.png" alt="" class="back-icon" v-if="name && show" @click="show=false"> | ||||
|       <img src="./img/search-icon.png" alt="" class="search-icon" v-else> | ||||
|       <input type="text" class="input" placeholder="请输入姓名、房屋信息" v-model="name" maxlength="10" confirm-type="search" | ||||
|              @confirm="search"/> | ||||
|       <div class="clear-btn"> | ||||
|         <img src="./img/del-icon.png" alt="" class="del-icon" v-if="name" @click="clear"> | ||||
|       </div> | ||||
|       <span class="search-btn" @click="search">搜索</span> | ||||
|     </div> | ||||
|     <div class="search-list" v-if="show" :style="{'top': `${statusBarHeight+116}px`}"> | ||||
|       <div class="title border"> | ||||
|         <img src="./img/search-icon.png" alt="" class="search-icon">{{ name }} | ||||
|       </div> | ||||
|       <div class="item border" v-for="(item, index) in buildList" :key="index" @click="getBuildingInfo(item)"> | ||||
|         <img src="./img/user-icon.png" alt="" class="search-icon user-icon"> | ||||
|         <div class="item-content"> | ||||
|           <h3>{{ item.residentName }}</h3> | ||||
|           <p>{{ item.areaName || '' }}{{ item.createAddress }}</p> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <div class="build-btn" @click="toList()"> | ||||
|       <img src="./img/build-icon.png" alt=""> 楼栋<br/>列表 | ||||
|     </div> | ||||
|     <div class="map-content"> | ||||
|       <!-- <AiMap :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"/> --> | ||||
|       <map style="width: 100%; height: 100%;" id="map" :show-location="true" :latitude="latitude" :longitude="longitude" @labeltap="markerTap"></map> | ||||
|     </div> | ||||
|     <u-popup v-model="showPop" mode="bottom" border-radius="14"> | ||||
|       <div class="popup"> | ||||
|         <div class="bg"></div> | ||||
|         <div class="title">{{ detailInfo.house.createAddress || '' }}</div> | ||||
|         <p class="address">{{ detailInfo.community.address || '' }}</p> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属社区</span> | ||||
|           <span class="value">{{ detailInfo.build.areaName }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属小区</span> | ||||
|           <span class="value">{{ detailInfo.build.communityName }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">房屋类型</span> | ||||
|           <span class="value">{{ $dict.getLabel('communityBuildingType', detailInfo.house.buildingType) }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属网格</span> | ||||
|           <span class="value" v-if="detailInfo.gird">{{ detailInfo.gird.girdName || '' }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">网格管理员</span> | ||||
|           <span class="value" v-if="detailInfo.gird">{{ detailInfo.gird.girdMemberNames || '' }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">楼栋长</span> | ||||
|           <span | ||||
|               class="value">{{ detailInfo.build.managerName || '' }}  {{ | ||||
|               detailInfo.build.managerPhone || '' | ||||
|             }} | ||||
|             <img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(detailInfo.build.managerPhone)" | ||||
|                  class="phone-icon" v-if="detailInfo.build.managerPhone"> | ||||
|           </span> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="popup-btn" @click="toDetail(detailInfo.build.id)">查看楼栋模型</div> | ||||
|     </u-popup> | ||||
|     <u-popup v-model="buildPopup" mode="bottom" border-radius="14"> | ||||
|       <div class="popup"> | ||||
|         <div class="bg"/> | ||||
|         <div class="title">{{ building.createAddress || '' }}</div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属社区</span> | ||||
|           <span class="value">{{ building.areaName }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属小区</span> | ||||
|           <span class="value">{{ building.communityName }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">房屋类型</span> | ||||
|           <span class="value">{{ $dict.getLabel('communityBuildingType', building.buildingType) }}</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属网格</span> | ||||
|           <span class="value" v-text="building.girdName||''"/> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">网格管理员</span> | ||||
|           <span class="value" v-text="building.girdMemberNames||''"/> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">楼栋长</span> | ||||
|           <span | ||||
|               class="value">{{ building.managerName || '' }}  {{ building.managerPhone || '' }} | ||||
|             <img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(detailInfo.build.managerPhone)" | ||||
|                  class="phone-icon" v-if="detailInfo.build.managerPhone"> | ||||
|           </span> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="popup-btn" @click="toDetail(building.id)">查看楼栋模型</div> | ||||
|     </u-popup> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: "searchMap", | ||||
|   data() { | ||||
|     return { | ||||
|       ops: {}, | ||||
|       lib: null, | ||||
|       map: null, | ||||
|       markerArr: [], | ||||
|       show: false, | ||||
|       value: '', | ||||
|       ClusterBubble: null, | ||||
|       name: '', | ||||
|       buildList: [], | ||||
|       detailInfo: { | ||||
|         house: {}, | ||||
|         build: {}, | ||||
|         community: {}, | ||||
|         gird: {} | ||||
|       }, | ||||
|       showPop: false, | ||||
|       retryMapCount: 0, | ||||
|       building: {}, | ||||
|       buildPopup: false, | ||||
|  | ||||
|       latitude: 30.606355, | ||||
|       longitude: 114.429633, | ||||
|       // latitude: 23.099994, | ||||
| 			// longitude: 113.324520, | ||||
|       _mapContext: null, | ||||
|       markList: [], | ||||
|       statusBarHeight: uni.getSystemInfoSync().statusBarHeight, | ||||
|     } | ||||
|   }, | ||||
|   computed: {...mapState(['user'])}, | ||||
|   mounted() { | ||||
|     // uni.getLocation({ | ||||
|     //   type: 'wgs84', | ||||
|     //   success: (res) => { | ||||
|     //     this.latitude = res.latitude | ||||
|     //     this.longitude = res.longitude | ||||
|     //   } | ||||
|     // }); | ||||
|     this._mapContext = uni.createMapContext("map", this); | ||||
|     // 仅调用初始化,才会触发 on.("markerClusterCreate", (e) => {}) | ||||
|     this._mapContext.initMarkerCluster({ | ||||
|       enableDefaultStyle: false, // 是否使用默认样式 | ||||
|       zoomOnClick: true, // 点击聚合的点,是否改变地图的缩放级别 | ||||
|       gridSize: 60, // 聚合计算时网格的像素大小,默认60 | ||||
|       complete(res) { | ||||
|  | ||||
|       } | ||||
|     }); | ||||
|     this.cluster(); | ||||
|  | ||||
|   }, | ||||
|   onShow() { | ||||
|     // document.title = "以房找人" | ||||
|   }, | ||||
|   created() { | ||||
|     this.$dict.load("communityBuildingType") | ||||
|   }, | ||||
|   methods: { | ||||
|     cluster() { | ||||
| 			// 仅调用初始化,才会触发 on.("markerClusterCreate", (e) => {}) | ||||
| 			this._mapContext.initMarkerCluster({ | ||||
| 				enableDefaultStyle: false, // 是否使用默认样式 | ||||
| 				zoomOnClick: true, // 点击聚合的点,是否改变地图的缩放级别 | ||||
| 				gridSize: 60, // 聚合计算时网格的像素大小,默认60 | ||||
| 				complete(res) { | ||||
| 				} | ||||
| 			}); | ||||
|  | ||||
| 			this._mapContext.on("markerClusterCreate", (res) => { | ||||
| 				const clusters = res.clusters | ||||
| 				const markers = clusters.map(cluster => { | ||||
| 					const { | ||||
| 						center, | ||||
| 						clusterId, | ||||
| 						markerIds | ||||
| 					} = cluster | ||||
| 					return { | ||||
| 						...center, | ||||
| 						width: 0, | ||||
| 						height: 0, | ||||
| 						clusterId, // 必须 | ||||
| 						label: { | ||||
| 							content: markerIds.length + '', | ||||
| 							fontSize: 16, | ||||
| 							width: 64, | ||||
| 							height: 64, | ||||
| 							bgColor: '#5088FF', | ||||
| 							borderRadius: 32, | ||||
| 							textAlign: 'center', | ||||
| 							anchorX: 0, | ||||
| 							anchorY: -20, | ||||
|               color: '#fff', | ||||
|               borderWidth: 3, | ||||
|               borderColor	: '#B0C8FC' | ||||
| 						} | ||||
| 					} | ||||
| 				}) | ||||
| 				this._mapContext.addMarkers({ | ||||
| 					markers, | ||||
| 					clear: false, | ||||
| 					complete(res) { | ||||
|  | ||||
| 					} | ||||
| 				}) | ||||
| 			}); | ||||
| 			this._mapContext.on('markerClusterClick', (res) => { | ||||
|         console.log(res) | ||||
| 			}) | ||||
| 			// this.addMarkers(); | ||||
|       this.getCommunityList().then(points => { | ||||
|         this.addMarkers(points) | ||||
|       }) | ||||
| 		}, | ||||
| 		// 添加标记点 | ||||
| 		addMarkers(positions) { | ||||
| 			const markers = [] | ||||
| 			positions.forEach((p, i) => { | ||||
| 				markers.push( | ||||
| 					Object.assign({}, { | ||||
| 						id: i, | ||||
| 						iconPath: "https://cdn.sinoecare.com/i/2024/07/18/6698c40bdc9e3.png", | ||||
| 						width: 10, | ||||
| 						height: 10, | ||||
| 						joinCluster: true, // 指定了该参数才会参与聚合 | ||||
| 						label:{ | ||||
| 							bgColor: "#5088FF", | ||||
| 							color: "#fff", | ||||
| 							content: `${this.buildList[i].createAddress} | ${this.buildList[i].houseNum}户`, | ||||
| 							display: "ALWAYS", | ||||
| 							fontSize: "12", | ||||
| 							padding: 6, | ||||
| 							textAlign: "center", | ||||
|               borderRadius: 15, | ||||
| 						} | ||||
| 					}, p) | ||||
| 				) | ||||
| 			}) | ||||
|       // this.markList = markers | ||||
| 			this._mapContext.addMarkers({ | ||||
| 				markers, | ||||
| 				clear: false, | ||||
| 				complete(res) { | ||||
| 					console.log('addMarkers', res) | ||||
| 				} | ||||
| 			}) | ||||
| 		}, | ||||
|     markerTap(e) { | ||||
|       var index = Number(e.markerId) | ||||
|       this.$instance.post(`/app/appcommunitybuildinginfo/queryBuildingInfo?buildingId=${this.buildList[index].id}`).then(res => { | ||||
|         this.building = res.data | ||||
|         this.buildPopup = true | ||||
|       }) | ||||
|     }, | ||||
|     getCommunityList() { | ||||
|       return this.$instance.post('/app/appcommunitybuildinginfo/listByBuilding', null, { | ||||
|         params: { | ||||
|           current: 1, | ||||
|           size: 1000000, | ||||
|           areaId: this.user.areaId | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           res.data.map(item => { | ||||
|             item.buildingNumber = item.name || item.buildingNumber | ||||
|             item.communityName = item.name || item.communityName | ||||
|             item.latitude = item.lat | ||||
|             item.longitude = item.lng | ||||
|           }) | ||||
|           this.buildList = res.data | ||||
|           return res.data.map(item => { | ||||
|             return { | ||||
|               // ...item, | ||||
|               // lnglat: [item.lng, item.lat], | ||||
|               latitude: item.lat, | ||||
|               longitude: item.lng, | ||||
|               // buildingNumber: item.name || item.buildingNumber, | ||||
|               // communityName: item.name || item.communityName, | ||||
|               // clusterId: item.id | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getMarkerCluster(points, count = 0) { | ||||
|       let {lib: TMap, map} = this | ||||
|       if (map) { | ||||
|         class ClusterBubble extends TMap.DOMOverlay { | ||||
|           constructor(options) { | ||||
|             super(options); | ||||
|           } | ||||
|  | ||||
|           onInit(options) { | ||||
|             this.content = options.content; | ||||
|             this.position = options.position; | ||||
|             this.customClass = options.customClass | ||||
|           }; | ||||
|  | ||||
|           onDestroy() { | ||||
|             this.dom.removeEventListener('click', this.onClick); | ||||
|             this.removeAllListeners(); | ||||
|           } | ||||
|  | ||||
|           createDOM() { | ||||
|             let dom = document.createElement('div'); | ||||
|             dom.classList.add(this.customClass || 'marker'); | ||||
|             dom.innerText = this.content; | ||||
|  | ||||
|             // 监听点击事件,实现zoomOnClick | ||||
|             this.onClick = this.onClick.bind(this); | ||||
|             // pc端注册click事件,移动端注册touchend事件 | ||||
|             dom.addEventListener('click', this.onClick); | ||||
|             dom.addEventListener('touchend', this.onClick); | ||||
|             return dom; | ||||
|           }; | ||||
|  | ||||
|           updateDOM() { | ||||
|             if (!this.map) { | ||||
|               return; | ||||
|             } | ||||
|             // 经纬度坐标转容器像素坐标 | ||||
|             let pixel = this.map.projectToContainer(this.position); | ||||
|  | ||||
|             // 使文本框中心点对齐经纬度坐标点 | ||||
|             let left = pixel.getX() - this.dom.clientWidth / 2 + 'px'; | ||||
|             let top = pixel.getY() - this.dom.clientHeight / 2 + 'px'; | ||||
|             this.dom.style.transform = `translate(${left}, ${top})`; | ||||
|             this.emit('dom_updated'); | ||||
|           }; | ||||
|  | ||||
|           onClick() { | ||||
|             this.emit('click'); | ||||
|           } | ||||
|         } | ||||
|  | ||||
|         this.wxwork.config.latlng && map.setCenter(this.wxwork.config.latlng) | ||||
|         let MarkerCluster = new TMap.MarkerCluster({ | ||||
|           map, gridSize: 60, | ||||
|           enableDefaultStyle: false, // 关闭默认样式 | ||||
|           geometries: points?.map(e => ({ | ||||
|             position: new TMap.LatLng(e.lat, e.lng), | ||||
|             content: `${e.createAddress} | ${e.houseNum}户`, | ||||
|             properties: {...e} | ||||
|           })) || [], | ||||
|           zoomOnClick: true | ||||
|         }) | ||||
|         let markers = [], cls = [] | ||||
|         MarkerCluster.on('cluster_changed', () => { | ||||
|           if (markers.length) { | ||||
|             markers.forEach(function (item) { | ||||
|               item.destroy(); | ||||
|             }) | ||||
|             markers = []; | ||||
|           } | ||||
|           cls.forEach(e => e.destroy()) | ||||
|           cls = [] | ||||
|           let clusters = MarkerCluster.getClusters() | ||||
|           clusters.forEach((item) => { | ||||
|             if (item.geometries?.length > 1) { | ||||
|               //聚合样式 | ||||
|               let clusterBubble = new ClusterBubble({ | ||||
|                 map, | ||||
|                 position: item.center, | ||||
|                 content: item.geometries.length, | ||||
|                 customClass: 'cluster' | ||||
|               }) | ||||
|               clusterBubble.on('click', () => { | ||||
|                 map.fitBounds(item.bounds); | ||||
|               }); | ||||
|               cls.push(clusterBubble) | ||||
|             } else { | ||||
|               //点标记样式 | ||||
|               let {content} = item.geometries?.[0] || {}, | ||||
|                   overlay = new ClusterBubble({map, position: item.center, content}) | ||||
|               overlay.on('click', () => { | ||||
|                 // this.building = item.geometries?.[0]?.properties || {} | ||||
|                 if(item.geometries[0].properties.id) { | ||||
|                   this.$instance.post(`/app/appcommunitybuildinginfo/queryBuildingInfo?buildingId=${item.geometries[0].properties.id}`).then(res => { | ||||
|                     this.building = res.data | ||||
|                     this.buildPopup = true | ||||
|                   }) | ||||
|                 } | ||||
|                  | ||||
|               }) | ||||
|               markers.push(overlay) | ||||
|             } | ||||
|           }); | ||||
|         }) | ||||
|         return Promise.resolve() | ||||
|       } else { | ||||
|         if (count < 5) { | ||||
|           setTimeout(() => { | ||||
|             return this.getMarkerCluster(points, ++count) | ||||
|           }, 1000) | ||||
|         } else Promise.reject("加载失败") | ||||
|       } | ||||
|     }, | ||||
|     clear() { | ||||
|       this.name = '' | ||||
|     }, | ||||
|     search() { | ||||
|       this.buildList = [] | ||||
|       this.$instance.post('/app/appcommunityhouseinfo/queryHouseByName', null, { | ||||
|         params: { | ||||
|           current: 1, | ||||
|           size: 20, | ||||
|           areaId: this.user.areaId, | ||||
|           name: this.name | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0 && res.data.length) { | ||||
|           this.show = true | ||||
|           this.buildList = res.data | ||||
|           // const points = res.data.map(item => { | ||||
|           //   return { | ||||
|           //     lnglat: [item.lng, item.lat], | ||||
|           //     id: item.id, | ||||
|           //     corpId: item.corpId, | ||||
|           //     areaName: item.areaName, | ||||
|           //     buildingNumber: item.residentName || item.buildingNumber, | ||||
|           //     communityName: item.residentName || item.communityName, | ||||
|           //   } | ||||
|           // }) | ||||
|           // this.getMarkerCluster(points) | ||||
|         } else { | ||||
|           this.show = false | ||||
|           this.$u.toast('未搜索到结果,请换个关键字重试!') | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getBuildingInfo(item) { | ||||
|       this.$instance.post(`/app/appcommunityhouseinfo/queryDetailByIdWithBuilding?buildId=${item.buildingId}&houseId=${item.id}`).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.show = false | ||||
|           this.detailInfo = res.data | ||||
|           this.showPop = true | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toList() { | ||||
|       uni.navigateTo({url: './list'}) | ||||
|     }, | ||||
|     callPhone(phone) { | ||||
|       uni.makePhoneCall({phoneNumber: phone}) | ||||
|     }, | ||||
|     toDetail(id) { | ||||
|       uni.navigateTo({url: `./detail?id=${id}`}) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .searchMap { | ||||
|   height: 100vh; | ||||
|  | ||||
|   .grid-input { | ||||
|     width: calc(100% - 64px); | ||||
|     height: 88px; | ||||
|     background: #FFF; | ||||
|     box-shadow: 0 4px 8px 0 rgba(192, 185, 185, 0.5); | ||||
|     border-radius: 16px; | ||||
|     position: fixed; | ||||
|     left: 50%; | ||||
|     transform: translateX(-50%); | ||||
|     z-index: 99999; | ||||
|     padding: 16px 20px; | ||||
|     box-sizing: border-box; | ||||
|  | ||||
|     .search-icon { | ||||
|       width: 48px; | ||||
|       height: 48px; | ||||
|       margin-right: 16px; | ||||
|     } | ||||
|  | ||||
|     .input { | ||||
|       display: inline-block; | ||||
|       padding: 8px 0; | ||||
|       height: 32px; | ||||
|       line-height: 32px; | ||||
|       width: calc(100% - 220px); | ||||
|       font-size: 28px; | ||||
|       font-family: MicrosoftYaHei; | ||||
|       color: #666; | ||||
|     } | ||||
|  | ||||
|     .back-icon { | ||||
|       width: 16px; | ||||
|       height: 32px; | ||||
|       margin-right: 24px; | ||||
|       vertical-align: super; | ||||
|     } | ||||
|  | ||||
|     .clear-btn { | ||||
|       display: inline-block; | ||||
|       width: 32px; | ||||
|       height: 32px; | ||||
|       margin-right: 30px; | ||||
|     } | ||||
|  | ||||
|     .del-icon { | ||||
|       width: 32px; | ||||
|       height: 32px; | ||||
|       vertical-align: super; | ||||
|     } | ||||
|  | ||||
|     .search-btn { | ||||
|       display: inline-block; | ||||
|       width: 80px; | ||||
|       height: 32px; | ||||
|       line-height: 32px; | ||||
|       text-align: right; | ||||
|       font-size: 28px; | ||||
|       font-family: MicrosoftYaHei; | ||||
|       color: #1365DD; | ||||
|       border-left: 1px solid #DEDFE0; | ||||
|       vertical-align: top; | ||||
|       margin-top: 12px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .search-list { | ||||
|     position: fixed; | ||||
|     width: 100%; | ||||
|     height: calc(100% - 130px); | ||||
|     overflow-y: scroll; | ||||
|     top: 128px; | ||||
|     left: 0; | ||||
|     box-sizing: border-box; | ||||
|     z-index: 99999; | ||||
|  | ||||
|     .search-icon { | ||||
|       width: 36px; | ||||
|       height: 36px; | ||||
|       margin-right: 16px; | ||||
|       vertical-align: sub; | ||||
|     } | ||||
|  | ||||
|     .title { | ||||
|       height: 82px; | ||||
|       line-height: 82px; | ||||
|       font-size: 26px; | ||||
|       font-family: MicrosoftYaHeiSemibold; | ||||
|       color: #1365DD; | ||||
|       padding-left: 44px; | ||||
|       background-color: #fff; | ||||
|     } | ||||
|  | ||||
|     .item { | ||||
|       padding: 22px 44px 24px 44px; | ||||
|       background-color: #fff; | ||||
|     } | ||||
|  | ||||
|     .item-content { | ||||
|       display: inline-block; | ||||
|       width: 610px; | ||||
|       color: #333; | ||||
|  | ||||
|       h3 { | ||||
|         font-size: 28px; | ||||
|         font-family: MicrosoftYaHeiSemibold; | ||||
|         line-height: 32px; | ||||
|         margin-bottom: 8px; | ||||
|       } | ||||
|  | ||||
|       p { | ||||
|         width: 100%; | ||||
|         font-size: 24px; | ||||
|         font-family: MicrosoftYaHei; | ||||
|         line-height: 32px; | ||||
|         overflow: hidden; | ||||
|         white-space: nowrap; | ||||
|         text-overflow: ellipsis; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .user-icon { | ||||
|       vertical-align: top; | ||||
|     } | ||||
|  | ||||
|     .border { | ||||
|       border-bottom: 1px solid #DEDFE1; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .build-btn { | ||||
|     width: 80px; | ||||
|     height: 160px; | ||||
|     background: #FFF; | ||||
|     box-shadow: 0 4px 8px 0 rgba(138, 138, 138, 0.5); | ||||
|     border-radius: 8px; | ||||
|     position: fixed; | ||||
|     bottom: 136px; | ||||
|     right: 24px; | ||||
|     z-index: 99999; | ||||
|     padding: 16px 16px 0; | ||||
|     box-sizing: border-box; | ||||
|     font-size: 24px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #666; | ||||
|     line-height: 30px; | ||||
|  | ||||
|     img { | ||||
|       width: 48px; | ||||
|       height: 48px; | ||||
|       margin-bottom: 8px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .map-content { | ||||
|     width: 100%; | ||||
|     height: 100%; | ||||
|   } | ||||
|  | ||||
|   .popup { | ||||
|     padding: 0 32px 16px; | ||||
|  | ||||
|     .bg { | ||||
|       width: 64px; | ||||
|       height: 10px; | ||||
|       background: #CCC; | ||||
|       border-radius: 6px; | ||||
|       margin: 32px 0 32px 344px; | ||||
|     } | ||||
|  | ||||
|     .title { | ||||
|       font-size: 36px; | ||||
|       font-family: PingFang-SC-Heavy, PingFang-SC; | ||||
|       font-weight: 800; | ||||
|       color: #333; | ||||
|       line-height: 50px; | ||||
|       margin-bottom: 24px; | ||||
|     } | ||||
|  | ||||
|     .info-flex { | ||||
|       padding: 26px 0 30px 0; | ||||
|       width: 100%; | ||||
|       border-bottom: 1px solid #D8DDE6; | ||||
|       line-height: 40px; | ||||
|       font-size: 28px; | ||||
|  | ||||
|       .label { | ||||
|         display: inline-block; | ||||
|         width: 160px; | ||||
|         font-weight: 800; | ||||
|         color: #333; | ||||
|       } | ||||
|  | ||||
|       .value { | ||||
|         color: #666; | ||||
|         font-size: 26px; | ||||
|  | ||||
|         .phone-icon { | ||||
|           width: 40px; | ||||
|           height: 40px; | ||||
|           vertical-align: sub; | ||||
|           margin-left: 16px; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .popup-btn { | ||||
|     width: 100%; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     background: #1365DD; | ||||
|     color: #FFF; | ||||
|   } | ||||
|  | ||||
|   ::v-deep.marker { | ||||
|     color: #fff; | ||||
|     background: #5088FF; | ||||
|     padding: 0 32px; | ||||
|     width: fit-content; | ||||
|     height: 56px; | ||||
|     border-radius: 52px; | ||||
|     transform: translate(-50%, -50%); | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|  | ||||
|     &:before { | ||||
|       content: " "; | ||||
|       display: block; | ||||
|       position: absolute; | ||||
|       bottom: 0; | ||||
|       left: 50%; | ||||
|       width: 0; | ||||
|       height: 0; | ||||
|       transform: translate(-50%, 100%); | ||||
|       border: 12px solid transparent; | ||||
|       border-top-color: #5088FF; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   ::v-deep.cluster { | ||||
|     color: #fff; | ||||
|     border-radius: 50%; | ||||
|     height: 120px; | ||||
|     width: 120px; | ||||
|     background: radial-gradient(circle, #5088ff 50%, rgba(#5088ff, .4) 100%); | ||||
|     display: flex; | ||||
|     align-items: center; | ||||
|     justify-content: center; | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										562
									
								
								src/project/weiyang/AppBuilding/detail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,562 @@ | ||||
| <template> | ||||
|   <div class="detail"> | ||||
|     <u-navbar back-icon-color="#000" title="以房找人" title-color="#000" title-width="300" title-size="32"  | ||||
|       :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar> | ||||
|     <div class="search-content"> | ||||
|       <div class="select-flex" @click="showSelect=true"> | ||||
|         <span class="name" v-text="cellName"/> | ||||
|         <span class="btn">单元切换</span> | ||||
|       </div> | ||||
|       <div class="line-bg"></div> | ||||
|       <div class="num-content"> | ||||
|         <div class="num-item"> | ||||
|           <div class="content"> | ||||
|             <h2>{{ numInfo['实有户数'] || 0 }}</h2> | ||||
|             <p>实有户数</p> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="num-item"> | ||||
|           <div class="content"> | ||||
|             <h2>{{ numInfo['实有人口'] || 0 }}</h2> | ||||
|             <p>实有人口</p> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="num-item"> | ||||
|           <div class="content"> | ||||
|             <h2>{{ numInfo['流动人口'] || 0 }}</h2> | ||||
|             <p>流动人口</p> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="line-bg"></div> | ||||
|     </div> | ||||
|     <div class="list-content"> | ||||
|       <div class="left"> | ||||
|         <div class="item-content" v-for="(item, index) in list" :key="index" @click="getHouseDetail(item.id)"> | ||||
|           <div class="item"> | ||||
|             <h2>{{ item.houseCode }}</h2> | ||||
|             <p v-text="`${item.livingNumber}人`.replace(/0人/,'无人')"/> | ||||
|           </div> | ||||
|         </div> | ||||
|         <AiEmpty v-if="!list.length" style="padding-bottom:80px;"/> | ||||
|       </div> | ||||
|     </div> | ||||
|     <u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="eachUnitNumber" | ||||
|               @confirm="confirmSelect"/> | ||||
|     <u-popup v-model="show" mode="bottom" border-radius="14" height="1000"> | ||||
|       <div class="popup"> | ||||
|         <div class="bg"></div> | ||||
|         <div class="title">{{ houseInfo.createAddress }}</div> | ||||
|         <div class="row-info"> | ||||
|           <div class="row-item left"> | ||||
|             <h3>{{ `${houseInfo.houseArea || 0}㎡`.replace(/0㎡/, "未统计") }} </h3> | ||||
|             <p>房屋面积</p> | ||||
|           </div> | ||||
|           <div class="row-item center"> | ||||
|             <span class="right-line"></span> | ||||
|             <span class="left-line"></span> | ||||
|             <h3>{{ $dict.getLabel('houseUseStatus', houseInfo.houseUse) || "无" }} </h3> | ||||
|             <p>房屋用途</p> | ||||
|           </div> | ||||
|           <div class="row-item right"> | ||||
|             <h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || "未使用" }}</h3> | ||||
|             <p>居住现状</p> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="row-info" v-if="!!houseInfo.leaseSituation"> | ||||
|           <div class="row-item left"> | ||||
|             <h3>{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || "无" }}</h3> | ||||
|             <p>承租情况</p> | ||||
|           </div> | ||||
|           <div class="row-item center"> | ||||
|             <span class="right-line"></span> | ||||
|             <span class="left-line"></span> | ||||
|             <h3>{{ $dateFormat(houseInfo.startDate, 'YYYY-MM-DD') }}</h3> | ||||
|             <p>起租日期</p> | ||||
|           </div> | ||||
|           <div class="row-item right"> | ||||
|             <h3>{{ houseInfo.isFilingCertificate == 1 ? '有' : '无' }}</h3> | ||||
|             <p>租房备案证明</p> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div v-if="houseInfo.owner.length || houseInfo.renter.length"> | ||||
|         <div class="line-bg"></div> | ||||
|         <div class="popup" v-if="houseInfo.owner.length"> | ||||
|           <div class="title pad-t32">房主信息</div> | ||||
|           <div class="info-flex" v-for="(item, index) in houseInfo.owner" :key="index"> | ||||
|             <div class="item"> | ||||
|               <span class="label">房主:</span> | ||||
|               <span class="value">{{ item.name }}</span> | ||||
|             </div> | ||||
|             <div class="item"> | ||||
|               <span class="label">联系方式:</span>{{ item.phone }} | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="popup" v-if="houseInfo.renter.length"> | ||||
|           <div class="title pad-t32">承租人信息</div> | ||||
|           <div class="info-flex" v-for="(item, index) in houseInfo.renter" :key="index"> | ||||
|             <div class="item"> | ||||
|               <span class="label">房主:</span> | ||||
|               <span class="value">{{ item.name }}</span> | ||||
|             </div> | ||||
|             <div class="item"> | ||||
|               <span class="label">联系方式:</span>{{ item.phone }} | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div v-if="houseInfo.live.length"> | ||||
|         <div class="line-bg"></div> | ||||
|         <div class="popup"> | ||||
|           <div class="title pad-t32">实际居住人员</div> | ||||
|           <div v-for="(item, index) in houseInfo.live" :key="index"> | ||||
|             <div class="info-flex"> | ||||
|               <div class="item"> | ||||
|                 <span class="label">居住人:</span> | ||||
|                 <span class="value">{{ item.name }}</span> | ||||
|               </div> | ||||
|               <div class="item"> | ||||
|                 <span class="label">联系方式:</span>{{ item.phone }} | ||||
|               </div> | ||||
|             </div> | ||||
|             <div class="info-flex mar-t48"> | ||||
|               <div class="item"> | ||||
|                 <span class="label">与户主关系:</span>{{ $dict.getLabel('householdRelation', item.relation) }} | ||||
|               </div> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="pad-b112"></div> | ||||
|       <div class="pop-btn" @click="toAdd(houseInfo.id)">编辑修改</div> | ||||
|     </u-popup> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   props: ['params'], | ||||
|   appName: '以房找人', | ||||
|   customNavigation: true, | ||||
|   data() { | ||||
|     return { | ||||
|       show: false, | ||||
|       communityId: '', | ||||
|       list: [], | ||||
|       houseInfo: { | ||||
|         owner: [], | ||||
|         renter: [], | ||||
|         live: [] | ||||
|       }, | ||||
|       numInfo: {}, | ||||
|       showSelect: false, | ||||
|       selectList: [], | ||||
|       selectCellIndex: 0, | ||||
|       houseId: '', | ||||
|       detail: {}, | ||||
|       eachUnitNumber: 1, | ||||
|       backgroundNavbar: { | ||||
|         background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat', | ||||
|         backgroundSize: 'cover', | ||||
|       }, | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     ...mapState(['user']), | ||||
|     cellName() { | ||||
|       return this.selectList.find(e => e.eachUnitNumber == this.eachUnitNumber)?.cellName || "" | ||||
|     } | ||||
|   }, | ||||
|   onLoad(options) { | ||||
|     this.id = options.id | ||||
|   }, | ||||
|   onShow() { | ||||
|     // document.title = "楼栋模型" | ||||
|     this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus', | ||||
|         'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType') | ||||
|     this.getBuilding() | ||||
|     if (this.show && !!this.houseId) { | ||||
|       this.getHouseDetail(this.houseId) | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     getSelectList(communityId) { | ||||
|       //通过小区ID获取楼栋列表,用来切换楼栋 | ||||
|       this.$instance.post(`/app/appcommunitybuildinginfo/listByUnitNumber`, null, { | ||||
|         params: {communityId, size: 999} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.selectList = [] | ||||
|           let {unitNumber, buildingNumber} = this.detail, | ||||
|               {communityName} = res.data.records?.[0] | ||||
|           for (let i = 1; i <= unitNumber; i++) { | ||||
|             this.selectList.push({ | ||||
|               eachUnitNumber: i, | ||||
|               cellName: `${communityName + buildingNumber}栋${i}单元` | ||||
|             }) | ||||
|           } | ||||
|           this.eachUnitNumber = this.selectList[0].eachUnitNumber | ||||
|           this.getStatistics() | ||||
|           this.getList() | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getBuilding() { | ||||
|       //获取楼栋信息 | ||||
|       // let {id} = this.$route.query | ||||
|       this.$instance.post(`/app/appcommunitybuildinginfo/queryDetailById`, null, { | ||||
|         params: {id: this.id} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.detail = res.data | ||||
|           this.getSelectList(res.data.communityId) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getStatistics() { | ||||
|       //获取楼栋统计信息 | ||||
|       let {id} = this.detail | ||||
|       this.$instance.post(`/app/appcommunitybuildinginfo/statistics`, null, { | ||||
|         params: {id, unitNum: this.eachUnitNumber} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.numInfo = res.data.unit | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getList() { | ||||
|       //获取房间列表 | ||||
|       let {id: buildingId} = this.detail | ||||
|       this.$instance.post(`/app/appcommunityhouseinfo/list`, null, { | ||||
|         params: {size: 10000, buildingId, unitNumber: this.eachUnitNumber} | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.list = res.data.records | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     getHouseDetail(id) { | ||||
|       this.houseId = id | ||||
|       this.$instance.post(`/app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => { | ||||
|         if (res?.data) { | ||||
|           this.houseInfo = res.data | ||||
|           this.show = true | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     confirmSelect(e) { | ||||
|       this.eachUnitNumber = e[0].value | ||||
|       this.getStatistics() | ||||
|       this.getList() | ||||
|     }, | ||||
|     toAdd(id) { | ||||
|       uni.navigateTo({url: `./add?id=${id}`}) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .detail { | ||||
|   .search-content { | ||||
|     // padding: 32px; | ||||
|     width: 100%; | ||||
|     // background: linear-gradient(to bottom, #D7EDFE, #EAF5FE); | ||||
|     // background-image: url("https://cdn.sinoecare.com/i/2024/07/15/6694f173557c9.png"); | ||||
|     background-size: 100vw; | ||||
|     background-repeat: no-repeat; | ||||
|     box-sizing: border-box; | ||||
|     position: fixed; | ||||
|     left: 0; | ||||
|     z-index: 99; | ||||
|   } | ||||
|   .select-flex { | ||||
|     padding: 20px 40px 40px; | ||||
|     box-sizing: border-box; | ||||
|     line-height: 50px; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     background-color: #fff; | ||||
|  | ||||
|     .name { | ||||
|       width: 560px; | ||||
|       word-break: break-all; | ||||
|       font-size: 36px; | ||||
|       font-weight: 800; | ||||
|       color: #333; | ||||
|     } | ||||
|  | ||||
|     .btn { | ||||
|       white-space: nowrap; | ||||
|       color: #1365DD; | ||||
|       font-size: 30px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .num-content { | ||||
|     width: 100%; | ||||
|     background-color: #fff; | ||||
|     box-sizing: border-box; | ||||
|     display: flex; | ||||
|  | ||||
|     .num-item { | ||||
|       flex: 1; | ||||
|       min-width: 0; | ||||
|       display: flex; | ||||
|       flex-direction: column; | ||||
|       align-items: center; | ||||
|       justify-content: center; | ||||
|       height: 142px; | ||||
|       padding-top: 20px; | ||||
|       box-sizing: border-box; | ||||
|  | ||||
|       .content { | ||||
|         width: 120px; | ||||
|         text-align: center; | ||||
|         background-color: #fff; | ||||
|       } | ||||
|  | ||||
|       h2 { | ||||
|         font-size: 36px; | ||||
|         font-weight: bold; | ||||
|         color: #333; | ||||
|         line-height: 42px; | ||||
|       } | ||||
|  | ||||
|       p { | ||||
|         font-size: 26px; | ||||
|         color: #666; | ||||
|         line-height: 36px; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .line-bg { | ||||
|     width: 100%; | ||||
|     height: 8px; | ||||
|     background: #F1F6F9; | ||||
|   } | ||||
|  | ||||
|   .list-content { | ||||
|     background-color: #fff; | ||||
|     display: flex; | ||||
|     justify-content: space-between; | ||||
|     width: 100%; | ||||
|     padding: 348px 2px 0 32px; | ||||
|     box-sizing: border-box; | ||||
|  | ||||
|     .left { | ||||
|       // width: calc(100% - 120px); | ||||
|       width: 100%; | ||||
|       overflow: hidden; | ||||
|  | ||||
|       .item-content { | ||||
|         width: 33%; | ||||
|         padding-right: 32px; | ||||
|         box-sizing: border-box; | ||||
|         float: left; | ||||
|       } | ||||
|  | ||||
|       .item { | ||||
|         width: 100%; | ||||
|         height: 158px; | ||||
|         background: #FAFBFF; | ||||
|         border-radius: 1px; | ||||
|         border: 1px solid #E7E7E7; | ||||
|         box-sizing: border-box; | ||||
|         text-align: center; | ||||
|         font-weight: bold; | ||||
|         margin: 0 32px 32px 0; | ||||
|  | ||||
|         h2 { | ||||
|           font-size: 38px; | ||||
|           color: #5088FF; | ||||
|           line-height: 44px; | ||||
|           margin: 14px 0 26px 0; | ||||
|         } | ||||
|  | ||||
|         p { | ||||
|           font-size: 32px; | ||||
|           color: #333; | ||||
|           line-height: 44px; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .item:nth-of-type(2n) { | ||||
|         margin-right: 0; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .right { | ||||
|       .item { | ||||
|         width: 120px; | ||||
|         height: 60px; | ||||
|         line-height: 60px; | ||||
|         padding: 0 8px; | ||||
|         background: #FAFBFF; | ||||
|         border-radius: 4px; | ||||
|         border: 1px solid #E7E7E7; | ||||
|         box-sizing: border-box; | ||||
|         font-size: 30px; | ||||
|         font-family: DINAlternate-Bold, DINAlternate; | ||||
|         color: #787878; | ||||
|         letter-spacing: -1px; | ||||
|         margin-bottom: 24px; | ||||
|       } | ||||
|  | ||||
|       .active { | ||||
|         background: #5088FF; | ||||
|         border-radius: 2px; | ||||
|         border: 1px solid #E7E7E7; | ||||
|         color: #fff; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .popup { | ||||
|     padding-left: 32px; | ||||
|  | ||||
|     .bg { | ||||
|       width: 64px; | ||||
|       height: 10px; | ||||
|       background: #CCC; | ||||
|       border-radius: 6px; | ||||
|       margin: 32px 0 32px 344px; | ||||
|     } | ||||
|  | ||||
|     .title { | ||||
|       font-size: 36px; | ||||
|       font-family: PingFang-SC-Heavy, PingFang-SC; | ||||
|       font-weight: 800; | ||||
|       color: #333; | ||||
|       line-height: 50px; | ||||
|       margin-bottom: 40px; | ||||
|     } | ||||
|  | ||||
|     .row-info { | ||||
|       padding-bottom: 48px; | ||||
|  | ||||
|       .row-item { | ||||
|         display: inline-block; | ||||
|         width: 33%; | ||||
|  | ||||
|         h3 { | ||||
|           font-size: 32px; | ||||
|           font-family: PingFangSC-Medium, PingFang SC; | ||||
|           font-weight: 500; | ||||
|           color: #4E75FE; | ||||
|           line-height: 64px; | ||||
|         } | ||||
|  | ||||
|         p { | ||||
|           font-size: 28px; | ||||
|           color: #666; | ||||
|           line-height: 42px; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .left { | ||||
|         width: calc(28% - 70px); | ||||
|         text-align: center; | ||||
|         margin-right: 70px; | ||||
|         box-sizing: border-box; | ||||
|       } | ||||
|  | ||||
|       .center { | ||||
|         width: 36%; | ||||
|         text-align: center; | ||||
|         box-sizing: border-box; | ||||
|         position: relative; | ||||
|  | ||||
|         .left-line { | ||||
|           position: absolute; | ||||
|           top: 20px; | ||||
|           left: 0; | ||||
|           height: 64px; | ||||
|           border-left: 1px solid #E5E5E5; | ||||
|         } | ||||
|  | ||||
|         .right-line { | ||||
|           position: absolute; | ||||
|           top: 20px; | ||||
|           right: 0; | ||||
|           height: 64px; | ||||
|           border-left: 1px solid #E5E5E5; | ||||
|         } | ||||
|       } | ||||
|  | ||||
|       .right { | ||||
|         width: calc(33% - 40px); | ||||
|         text-align: center; | ||||
|         margin-left: 40px; | ||||
|         box-sizing: border-box; | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .info-flex { | ||||
|       display: flex; | ||||
|       margin-bottom: 24px; | ||||
|       padding-right: 70px; | ||||
|       box-sizing: border-box; | ||||
|  | ||||
|       .item { | ||||
|         flex: 1; | ||||
|         font-size: 28px; | ||||
|         color: #333; | ||||
|         line-height: 30px; | ||||
|  | ||||
|         .label { | ||||
|           color: #999; | ||||
|           vertical-align: top; | ||||
|         } | ||||
|  | ||||
|         .value { | ||||
|           display: inline-block; | ||||
|           width: calc(100% - 120px); | ||||
|           word-break: break-all; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .line-bg { | ||||
|     width: 100%; | ||||
|     height: 30px; | ||||
|     background: #F5F6FA; | ||||
|   } | ||||
|  | ||||
|   .pad-t32 { | ||||
|     padding-top: 32px; | ||||
|   } | ||||
|  | ||||
|   .mar-t48 { | ||||
|     margin-top: 48px; | ||||
|   } | ||||
|  | ||||
|   .pop-btn { | ||||
|     width: 100%; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|     font-size: 32px; | ||||
|     font-weight: 500; | ||||
|     color: #FFF; | ||||
|     background: #1365DD; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|   } | ||||
|  | ||||
|   .pad-b112 { | ||||
|     padding-bottom: 112px; | ||||
|   } | ||||
| } | ||||
|  | ||||
| ::v-deep .content { | ||||
|   padding: 0 !important; | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										217
									
								
								src/project/weiyang/AppBuilding/list.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,217 @@ | ||||
| <template> | ||||
|   <div class="buildingList"> | ||||
|     <!-- <AiTopFixed> | ||||
|       <u-search placeholder="小区名称" :show-action="false" v-model="title" @search="current=1,getList()"/> | ||||
|     </AiTopFixed> --> | ||||
|     <u-navbar back-icon-color="#000" title="以房找人" title-color="#000" title-width="300" title-size="32"  | ||||
|       :title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar> | ||||
|     <div class="search-content"> | ||||
|       <u-search v-model="title" :clearabled="true" placeholder="请输入搜索关键词…" :show-action="false" | ||||
|         bg-color="#fff" search-icon-color="#E2E8F1" color="#666" height="72" @search="current=1,getList()" @clear="current=1,getList()"> | ||||
|       </u-search> | ||||
|     </div> | ||||
|     <div class="list-content"> | ||||
|       <div class="item" v-for="(item, index) in list" :key="index"> | ||||
|         <div class="item-content" @click="toDetail(item.id)"> | ||||
|           <p class="title line-two">{{ item.communityName }}</p> | ||||
|           <p class="address">{{ item.cellName }}</p> | ||||
|           <span class="status" :class="'color'+item.locationStatus" | ||||
|                 v-text="$dict.getLabel('BuildLocationStatus', item.locationStatus)"/> | ||||
|         </div> | ||||
|         <!-- <div class="item-btn" v-if="item.locationStatus != 1" @click="toMap(item.id, item.areaId)"> | ||||
|           <span>去定位</span> | ||||
|         </div> | ||||
|         <div class="item-btn" v-if="item.locationStatus == 1" @click="toMap(item.id, item.areaId)"> | ||||
|           <span>重新定位</span> | ||||
|         </div> --> | ||||
|       </div> | ||||
|       <AiEmpty v-if="!list.length"/> | ||||
|     </div> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   name: "buildingList", | ||||
|   appName: '以房找人', | ||||
|   customNavigation: true, | ||||
|   data() { | ||||
|     return { | ||||
|       title: '', | ||||
|       current: 1, | ||||
|       list: [], | ||||
|       isMore: false, | ||||
|       backgroundNavbar: { | ||||
|         background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat', | ||||
|         backgroundSize: 'cover', | ||||
|       }, | ||||
|     } | ||||
|   }, | ||||
|   computed: {...mapState(['user'])}, | ||||
|   mounted() { | ||||
|     this.$dict.load('BuildLocationStatus').then(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|     uni.$on('updateList', () => { | ||||
|       this.current = 1 | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
|   onShow() { | ||||
|     // document.title = "楼栋列表" | ||||
|   }, | ||||
|  | ||||
|   methods: { | ||||
|     getList() { | ||||
|       this.$instance.post(`/app/appcommunitybuildinginfo/list`, null, { | ||||
|         params: { | ||||
|           current: this.current, | ||||
|           size: 10, | ||||
|           areaId: this.user.areaId, | ||||
|           communityName: this.title | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res?.data) { | ||||
|           if (res.data.records.length < 10) { | ||||
|             this.isMore = true | ||||
|           } | ||||
|  | ||||
|           res.data.records.forEach(e => { | ||||
|             e.cellName = `${e.communityName + e.buildingNumber}栋` | ||||
|           }) | ||||
|           if (this.current > 1 && this.current > res.data.pages) { | ||||
|             return | ||||
|           } | ||||
|           this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records | ||||
|           this.pages = res.data.pages | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toDetail(id) { | ||||
|       uni.navigateTo({url: `./detail?id=${id}`}) | ||||
|     }, | ||||
|     toMap(id, areaId) { | ||||
|       uni.navigateTo({url: `./map?id=${id}&areaId=${areaId}`}) | ||||
|     } | ||||
|  | ||||
|   }, | ||||
|   onReachBottom() { | ||||
|     if (this.isMore) return | ||||
|  | ||||
|     this.current++ | ||||
|  | ||||
|     this.$nextTick(() => { | ||||
|       this.getList() | ||||
|     }) | ||||
|   }, | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .buildingList { | ||||
|   padding-bottom: 20px; | ||||
|   .search-content { | ||||
|     padding: 32px; | ||||
|     width: 100%; | ||||
|     // background: linear-gradient(to bottom, #D7EDFE, #EAF5FE); | ||||
|     background-image: url("https://cdn.sinoecare.com/i/2024/07/15/6694f173557c9.png"); | ||||
|     background-size: 100vw; | ||||
|     background-repeat: no-repeat; | ||||
|     box-sizing: border-box; | ||||
|     position: fixed; | ||||
|     left: 0; | ||||
|     z-index: 99; | ||||
|   } | ||||
|   .list-content { | ||||
|     padding: 156px 32px 0; | ||||
|     background-color: #F5F5F5; | ||||
|  | ||||
|     .item { | ||||
|       width: 100%; | ||||
|       background: #FFF; | ||||
|       box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02); | ||||
|       border-radius: 8px; | ||||
|       box-sizing: border-box; | ||||
|       position: relative; | ||||
|       overflow: hidden; | ||||
|       margin-bottom: 32px; | ||||
|  | ||||
|       .item-content { | ||||
|         padding: 32px 32px 42px 32px; | ||||
|       } | ||||
|  | ||||
|       .title { | ||||
|         width: calc(100% - 60px); | ||||
|         word-break: break-all; | ||||
|         font-size: 32px; | ||||
|         color: #333; | ||||
|         line-height: 44px; | ||||
|       } | ||||
|  | ||||
|       .address { | ||||
|         width: 100%; | ||||
|         word-break: break-all; | ||||
|         font-size: 28px; | ||||
|         color: #999; | ||||
|         line-height: 40px; | ||||
|       } | ||||
|  | ||||
|       .status { | ||||
|         width: 160px; | ||||
|         height: 40px; | ||||
|         line-height: 36px; | ||||
|         font-size: 26px; | ||||
|         font-weight: 500; | ||||
|         position: absolute; | ||||
|         right: -38px; | ||||
|         top: 24px; | ||||
|         -webkit-transform: rotate(90deg); | ||||
|         transform: rotate(45deg); | ||||
|         text-align: center; | ||||
|       } | ||||
|  | ||||
|       .color0 { | ||||
|         background: #FFECEF; | ||||
|         color: #f46; | ||||
|       } | ||||
|  | ||||
|       .color1 { | ||||
|         background: #EEF5FF; | ||||
|         color: #5A98F2; | ||||
|       } | ||||
|  | ||||
|       .item-btn { | ||||
|         width: 100%; | ||||
|         padding: 20px 32px 20px 0; | ||||
|         border-top: 1px solid #eee; | ||||
|         text-align: right; | ||||
|         box-sizing: border-box; | ||||
|  | ||||
|         span { | ||||
|           display: inline-block; | ||||
|           width: 160px; | ||||
|           height: 56px; | ||||
|           line-height: 56px; | ||||
|           text-align: center; | ||||
|           border-radius: 28px; | ||||
|           border: 1px solid #1365DD; | ||||
|           font-size: 28px; | ||||
|           color: #1365DD; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
|     .line-two { | ||||
|       text-overflow: -o-ellipsis-lastline; | ||||
|       overflow: hidden; | ||||
|       text-overflow: ellipsis; | ||||
|       display: -webkit-box; | ||||
|       -webkit-line-clamp: 2; | ||||
|       line-clamp: 2; | ||||
|       -webkit-box-orient: vertical; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||
							
								
								
									
										200
									
								
								src/project/weiyang/AppBuilding/map.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,200 @@ | ||||
| <template> | ||||
|   <div class="map"> | ||||
|     <div class="build-btn"> | ||||
|       <img src="./components/img/model-icon.png" alt="" @click="toDetail"> 楼栋<br/>模型 | ||||
|     </div> | ||||
|     <div class="map-content"> | ||||
|       <!-- <AiTMap v-if="user.areaId" :areaId="user.areaId" :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"></AiTMap> --> | ||||
|     </div> | ||||
|     <div class="footer"> | ||||
|       <div class="click" @click="isFlag=true">点击定位</div> | ||||
|       <div class="btn" @click="confirm">确认定位</div> | ||||
|     </div> | ||||
|     <!-- <u-popup v-model="show" mode="bottom" border-radius="14"> | ||||
|       <div class="popup"> | ||||
|         <div class="bg"></div> | ||||
|         <div class="title">恒大城西社区居委会</div> | ||||
|         <p class="address">山东省济南市历城区王舍人街道恒大商业广场蓝天新城</p> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属社区</span> | ||||
|           <span class="value">后西一街袁集村</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">所属小区</span> | ||||
|           <span class="value">蓝天新城世纪花园</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">房屋类型</span> | ||||
|           <span class="value">单元(公寓)楼</span> | ||||
|         </div> | ||||
|         <div class="info-flex">87 | ||||
|           <span class="label">所属网格</span> | ||||
|           <span class="value">蓝天新城基础网格一</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">网格管理员</span> | ||||
|           <span class="value">林珊珊</span> | ||||
|         </div> | ||||
|         <div class="info-flex"> | ||||
|           <span class="label">楼栋长</span> | ||||
|           <span class="value">林珊珊  13782951281 | ||||
|             <img :src="$cdn + 'common/phone.png'" alt="" @click="call(item)" class="phone-icon"> | ||||
|           </span> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="popup-btn">查看楼栋模型</div> | ||||
|     </u-popup> --> | ||||
|   </div> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| import {mapState} from 'vuex' | ||||
|  | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|       ops: {}, | ||||
|       lib: null, | ||||
|       map: null, | ||||
|       markerLayer: '', | ||||
|       isFlag: false, | ||||
|       latLng: {lat: '', lng: ''}, | ||||
|       retryTimes: 0 | ||||
|     } | ||||
|   }, | ||||
|   computed: {...mapState(['user', ])}, | ||||
|   mounted() { | ||||
|     this.initMap() | ||||
|   }, | ||||
|   onShow() { | ||||
|     // document.title = "以房找人" | ||||
|   }, | ||||
|   methods: { | ||||
|     initMap() {  //初始化地图 | ||||
|       this.$nextTick(() => { | ||||
|         let {lib: TMap, map, retryTimes} = this | ||||
|         if (map) { | ||||
|           map.setZoom(15) | ||||
|           map.on("click", (evt) => { | ||||
|             if (this.markerLayer) { | ||||
|               this.markerLayer.setMap(null); | ||||
|             } | ||||
|  | ||||
|             this.markerLayer = new TMap.MultiMarker({ | ||||
|               id: 'marker-layer', | ||||
|               map: map | ||||
|             }); | ||||
|             if (this.isFlag) { | ||||
|               this.markerLayer.add({ | ||||
|                 position: evt.latLng | ||||
|               }); | ||||
|               this.latLng = { | ||||
|                 lat: evt.latLng.lat, | ||||
|                 lng: evt.latLng.lng | ||||
|               } | ||||
|             } | ||||
|  | ||||
|           }); | ||||
|         } else { | ||||
|           if (retryTimes < 5) | ||||
|             setTimeout(() => { | ||||
|               this.retryTimes++ | ||||
|               this.initMap() | ||||
|             }, 1000) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     confirm() { | ||||
|       if (!this.latLng.lat) { | ||||
|         return this.$u.toast(`未获取到定位信息,无法定位`) | ||||
|       } | ||||
|       let {id} = this.$route.query | ||||
|       this.$instance.post(`/app/appcommunitybuildinginfo/updateLocation`, null, { | ||||
|         params: { | ||||
|           id, | ||||
|           lat: this.latLng.lat, | ||||
|           lng: this.latLng.lng, | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if (res.code == 0) { | ||||
|           this.$u.toast('提交成功') | ||||
|           uni.$emit('updateList') | ||||
|           setTimeout(() => { | ||||
|             uni.navigateBack() | ||||
|           }, 600) | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     toDetail() { | ||||
|       uni.navigateTo({url: `./detail?id=${this.$route.query.id}`}) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| uni-page-body { | ||||
|   height: 100%; | ||||
| } | ||||
|  | ||||
| .map { | ||||
|   height: 100vh; | ||||
|  | ||||
|   .build-btn { | ||||
|     width: 80px; | ||||
|     height: 160px; | ||||
|     background: #FFF; | ||||
|     box-shadow: 0 4px 8px 0 rgba(138, 138, 138, 0.5); | ||||
|     border-radius: 8px; | ||||
|     position: fixed; | ||||
|     bottom: 136px; | ||||
|     right: 24px; | ||||
|     z-index: 99999; | ||||
|     padding: 16px 16px 0; | ||||
|     box-sizing: border-box; | ||||
|     font-size: 24px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     color: #666; | ||||
|     line-height: 30px; | ||||
|  | ||||
|     img { | ||||
|       width: 48px; | ||||
|       height: 48px; | ||||
|       margin-bottom: 8px; | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   .map-content { | ||||
|     width: 100%; | ||||
|     height: 100%; | ||||
|   } | ||||
|  | ||||
|   .footer { | ||||
|     width: 100%; | ||||
|     position: fixed; | ||||
|     bottom: 0; | ||||
|     left: 0; | ||||
|     z-index: 99999; | ||||
|     display: flex; | ||||
|     font-size: 32px; | ||||
|     font-family: PingFangSC-Medium, PingFang SC; | ||||
|     font-weight: 500; | ||||
|     height: 112px; | ||||
|     line-height: 112px; | ||||
|     text-align: center; | ||||
|  | ||||
|     .click { | ||||
|       flex: 1; | ||||
|       color: #333; | ||||
|       background-color: #fff; | ||||
|     } | ||||
|  | ||||
|     .btn { | ||||
|       flex: 2; | ||||
|       background: #1365DD; | ||||
|       color: #FFF; | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </style> | ||||