居民档案
This commit is contained in:
		
							
								
								
									
										139
									
								
								src/apps/AppResidentDocument/AppResidentDocument.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										139
									
								
								src/apps/AppResidentDocument/AppResidentDocument.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,139 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="AppResidentDocument">
 | 
			
		||||
    <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
 | 
			
		||||
 | 
			
		||||
    <AiAreaPicker v-model="areaId" all :areaId="areaId" @select="areaSelect"></AiAreaPicker>
 | 
			
		||||
 | 
			
		||||
    <div class="line"></div>
 | 
			
		||||
 | 
			
		||||
    <div class="seachObj">
 | 
			
		||||
      <u-search v-model="keyword" :clearabled="true" placeholder="搜索" :show-action="false" bg-color="#F5F5F5" search-icon-color="#E2E8F1" color="#666" height="58" @search="handerSearch" @clear="handerClear"></u-search>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div class="datas" 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">{{ item.name }}</div>
 | 
			
		||||
          <div class="rightBottom">
 | 
			
		||||
            <span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1****$2') }}</span>
 | 
			
		||||
 | 
			
		||||
            <span>{{ item.phone }}</span>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div> -->
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <AiEmpty v-else></AiEmpty>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'AppResidentDocument',
 | 
			
		||||
  appName: '居民档案',
 | 
			
		||||
  components: {},
 | 
			
		||||
  props: {},
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      datas: [],
 | 
			
		||||
      current: 1,
 | 
			
		||||
      size: 10,
 | 
			
		||||
      tabList: [
 | 
			
		||||
        {
 | 
			
		||||
          name: '本地居民',
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          name: '流动人员',
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      currentTabs: 0,
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {},
 | 
			
		||||
  watch: {},
 | 
			
		||||
  onLoad() {},
 | 
			
		||||
  onShow() {},
 | 
			
		||||
  methods: {
 | 
			
		||||
    getList() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post('/app/wxcp/wxcustomer/list', null, {
 | 
			
		||||
          params: {
 | 
			
		||||
            size: this.size,
 | 
			
		||||
            current: this.current,
 | 
			
		||||
            // createUserId: this.currentTabs == 1 ? this.user.id : '',
 | 
			
		||||
          },
 | 
			
		||||
        })
 | 
			
		||||
        .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.getList()
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toDetailCard(item) {
 | 
			
		||||
      uni.navigateTo({ url: `./DetailCard?id=${item.id}` })
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  onReachBottom() {
 | 
			
		||||
    this.current = this.current + 1
 | 
			
		||||
    this.getList()
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.AppResidentDocument {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  background: #fff;
 | 
			
		||||
  .line {
 | 
			
		||||
    height: 16px;
 | 
			
		||||
    background: #f5f5f5;
 | 
			
		||||
  }
 | 
			
		||||
  .seachObj {
 | 
			
		||||
    border-bottom: 2px solid #f5f5f5;
 | 
			
		||||
    border-top: 2px solid #f5f5f5;
 | 
			
		||||
    padding: 20px 32px;
 | 
			
		||||
  }
 | 
			
		||||
  .datas {
 | 
			
		||||
    .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;
 | 
			
		||||
        }
 | 
			
		||||
        .rightBottom {
 | 
			
		||||
          display: flex;
 | 
			
		||||
          justify-content: space-between;
 | 
			
		||||
          margin-top: 8px;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
		Reference in New Issue
	
	Block a user