居民档案

This commit is contained in:
liuye
2022-03-15 09:18:12 +08:00
parent 5f9fbfbff5
commit bd71788474
4 changed files with 56 additions and 7 deletions

View File

@@ -122,7 +122,7 @@
<div class="border">
<span class="label">户籍地址</span>
<span class="value">
<AiAreaPicker ref="address" class="aiArea" :areaId="user.areaId" :fullName.sync="form.householdAreaName" :value="form.householdAreaId" mode="custom" @select="onHouseAreaChange">
<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>

View File

@@ -28,7 +28,13 @@
</div>
<div class="right">
<div class="rightTop">{{ item.name }}</div>
<div class="rightTop">
<span class="name">{{ item.name }}</span>
<span class="btn" v-if="item.doRight == 1">
<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>
@@ -37,10 +43,13 @@
</div>
</div>
</div>
<AiEmpty class="emptyWrap" v-else></AiEmpty>
<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="toAdd">新增居民</div>
<div class="addBtn" @click="edit('')">新增居民</div>
</div>
</template>
@@ -139,9 +148,22 @@ export default {
this.current = 1
this.getList()
},
toAdd() {
edit(id) {
var residentType = ['', 0, 1][this.currentTabs]
uni.navigateTo({url:`./Add?type=${residentType}`})
uni.navigateTo({url: `./Add?id=${id}&type=${residentType}`})
},
del(id) {
this.$confirm('确定删除该数据?').then(() => {
uni.showLoading()
this.$http.post(`/app/appresident/delete?ids=${id}`).then((res) => {
if (res.code == 0) {
this.$u.toast('删除成功!')
this.current = 1
this.getList()
}
uni.hideLoading()
})
}).catch(() => {})
}
},
onReachBottom() {
@@ -225,6 +247,15 @@ uni-page-body {
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;
@@ -250,5 +281,23 @@ uni-page-body {
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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB