Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		@@ -39,7 +39,7 @@
 | 
				
			|||||||
        <AiEmpty v-if="!list.length" style="padding-bottom:80px;"/>
 | 
					        <AiEmpty v-if="!list.length" style="padding-bottom:80px;"/>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="id"
 | 
					    <u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="valueId"
 | 
				
			||||||
              @confirm="confirmSelect"></u-select>
 | 
					              @confirm="confirmSelect"></u-select>
 | 
				
			||||||
    <u-popup v-model="show" mode="bottom" border-radius="14" height="1000">
 | 
					    <u-popup v-model="show" mode="bottom" border-radius="14" height="1000">
 | 
				
			||||||
      <div class="popup">
 | 
					      <div class="popup">
 | 
				
			||||||
@@ -153,15 +153,13 @@ export default {
 | 
				
			|||||||
      selectList: [],
 | 
					      selectList: [],
 | 
				
			||||||
      selectCellIndex: 0,
 | 
					      selectCellIndex: 0,
 | 
				
			||||||
      houseId: '',
 | 
					      houseId: '',
 | 
				
			||||||
      detail: {}
 | 
					      detail: {},
 | 
				
			||||||
 | 
					      cellName: '',
 | 
				
			||||||
 | 
					      eachUnitNumber: ''
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    ...mapState(['user']),
 | 
					    ...mapState(['user']),
 | 
				
			||||||
    cellName() {
 | 
					 | 
				
			||||||
      let building = this.selectList.find(e => e.id == this.detail.id)
 | 
					 | 
				
			||||||
      return building?.cellName || ""
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
    this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
 | 
					    this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
 | 
				
			||||||
@@ -178,19 +176,22 @@ export default {
 | 
				
			|||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getSelectList(communityId) {
 | 
					    getSelectList(communityId) {
 | 
				
			||||||
      //通过小区ID获取楼栋列表,用来切换楼栋
 | 
					      //通过小区ID获取楼栋列表,用来切换楼栋
 | 
				
			||||||
      this.$http.post(`/app/appcommunitybuildinginfo/list`, null, {
 | 
					      this.$http.post(`/app/appcommunitybuildinginfo/listByUnitNumber`, null, {
 | 
				
			||||||
        params: {communityId, size: 999}
 | 
					        params: {communityId, size: 999}
 | 
				
			||||||
      }).then(res => {
 | 
					      }).then(res => {
 | 
				
			||||||
        if (res?.data) {
 | 
					        if (res?.data) {
 | 
				
			||||||
          this.selectList = []
 | 
					          this.selectList = []
 | 
				
			||||||
          res.data.records.forEach(e => {
 | 
					          res.data.records.forEach(e => {
 | 
				
			||||||
            for (let i = 0; i < e.unitNumber; i++) {
 | 
					 | 
				
			||||||
            this.selectList.push({
 | 
					            this.selectList.push({
 | 
				
			||||||
              ...e,
 | 
					              ...e,
 | 
				
			||||||
                cellName: `${e.communityName + e.buildingNumber}栋${i+1}单元`
 | 
					              cellName: `${e.communityName + e.buildingNumber}栋${e.eachUnitNumber}单元`,
 | 
				
			||||||
 | 
					              valueId: `${e.id}${e.eachUnitNumber}`
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
 | 
					          this.cellName = this.selectList[0].cellName
 | 
				
			||||||
 | 
					          this.eachUnitNumber = this.selectList[0].eachUnitNumber
 | 
				
			||||||
 | 
					          this.getStatistics()
 | 
				
			||||||
 | 
					          this.getList()
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -202,17 +203,15 @@ export default {
 | 
				
			|||||||
      }).then(res => {
 | 
					      }).then(res => {
 | 
				
			||||||
        if (res?.data) {
 | 
					        if (res?.data) {
 | 
				
			||||||
          this.detail = res.data
 | 
					          this.detail = res.data
 | 
				
			||||||
          this.getStatistics()
 | 
					 | 
				
			||||||
          this.getList()
 | 
					 | 
				
			||||||
          this.getSelectList(res.data.communityId)
 | 
					          this.getSelectList(res.data.communityId)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getStatistics() {
 | 
					    getStatistics() {
 | 
				
			||||||
      //获取楼栋统计信息
 | 
					      //获取楼栋统计信息
 | 
				
			||||||
      let {id, unitNumber: unitNum} = this.detail
 | 
					      let {id} = this.detail
 | 
				
			||||||
      this.$http.post(`app/appcommunitybuildinginfo/statistics`, null, {
 | 
					      this.$http.post(`app/appcommunitybuildinginfo/statistics`, null, {
 | 
				
			||||||
        params: {id, unitNum}
 | 
					        params: {id, unitNum: this.eachUnitNumber}
 | 
				
			||||||
      }).then(res => {
 | 
					      }).then(res => {
 | 
				
			||||||
        if (res?.data) {
 | 
					        if (res?.data) {
 | 
				
			||||||
          this.numInfo = res.data.unit
 | 
					          this.numInfo = res.data.unit
 | 
				
			||||||
@@ -221,9 +220,9 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    getList() {
 | 
					    getList() {
 | 
				
			||||||
      //获取房间列表
 | 
					      //获取房间列表
 | 
				
			||||||
      let {id: buildingId, unitNumber} = this.detail
 | 
					      let {id: buildingId} = this.detail
 | 
				
			||||||
      this.$http.post(`app/appcommunityhouseinfo/list`, null, {
 | 
					      this.$http.post(`app/appcommunityhouseinfo/list`, null, {
 | 
				
			||||||
        params: {size: 10000, buildingId, unitNumber}
 | 
					        params: {size: 10000, buildingId, unitNumber: this.eachUnitNumber}
 | 
				
			||||||
      }).then(res => {
 | 
					      }).then(res => {
 | 
				
			||||||
        if (res?.data) {
 | 
					        if (res?.data) {
 | 
				
			||||||
          this.list = res.data.records
 | 
					          this.list = res.data.records
 | 
				
			||||||
@@ -245,10 +244,12 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    confirmSelect(e) {
 | 
					    confirmSelect(e) {
 | 
				
			||||||
      this.selectList.map((item, index) => {
 | 
					      this.selectList.map((item, index) => {
 | 
				
			||||||
        if (item.id == e[0].value) {
 | 
					        if (item.valueId == e[0].value) {
 | 
				
			||||||
          this.selectCellIndex = index
 | 
					          this.selectCellIndex = index
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      })
 | 
					      })
 | 
				
			||||||
 | 
					      this.cellName = this.selectList[this.selectCellIndex].cellName
 | 
				
			||||||
 | 
					      this.eachUnitNumber = this.selectList[this.selectCellIndex].eachUnitNumber
 | 
				
			||||||
      this.getStatistics()
 | 
					      this.getStatistics()
 | 
				
			||||||
      this.getList()
 | 
					      this.getList()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -217,7 +217,7 @@ export default {
 | 
				
			|||||||
    font-size: 32px;
 | 
					    font-size: 32px;
 | 
				
			||||||
    font-weight: 500;
 | 
					    font-weight: 500;
 | 
				
			||||||
    color: #ffffff;
 | 
					    color: #ffffff;
 | 
				
			||||||
    z-index: 999;
 | 
					    z-index: 999999;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .right {
 | 
					  .right {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -105,7 +105,7 @@ export default {
 | 
				
			|||||||
    realityClick() {
 | 
					    realityClick() {
 | 
				
			||||||
      if(this.id) return 
 | 
					      if(this.id) return 
 | 
				
			||||||
      if (!this.forms.create_user_name) {
 | 
					      if (!this.forms.create_user_name) {
 | 
				
			||||||
        return this.$u.toast('请选择走访慰问对象')
 | 
					        return this.$u.toast('请选择走访对象')
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.showStstus = true
 | 
					      this.showStstus = true
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -131,7 +131,7 @@ export default {
 | 
				
			|||||||
      this.$refs.uForm.validate((valid) => {
 | 
					      this.$refs.uForm.validate((valid) => {
 | 
				
			||||||
        if (valid) {
 | 
					        if (valid) {
 | 
				
			||||||
          if (!this.forms.create_user_name) {
 | 
					          if (!this.forms.create_user_name) {
 | 
				
			||||||
            return this.$u.toast('请选择走访慰问对象')
 | 
					            return this.$u.toast('请选择走访对象')
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          if (!this.forms.title) {
 | 
					          if (!this.forms.title) {
 | 
				
			||||||
            return this.$u.toast('请输入入户走访事项')
 | 
					            return this.$u.toast('请输入入户走访事项')
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user