Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
aixianling
2022-03-15 09:31:18 +08:00
5 changed files with 59 additions and 12 deletions

View File

@@ -56,10 +56,7 @@
<div class="border">
<span class="label">身份证号</span>
<span class="value">
<u-input type="text" placeholder="请输入" v-model="form.idNumber" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="18" :clearable="false"
@input="changeIdNumber" :disabled="this.form.id ? true : false" />
<!-- <input type="idcard" placeholder="请输入" v-model="form.idNumber" maxlength="18" @input="changeIdNumber" :disabled="this.form.id ? true : false"> -->
<input type="idcard" placeholder="请输入" v-model="form.idNumber" maxlength="18" @input="changeIdNumber" :disabled="this.form.id ? true : false">
</span>
</div>
</div>
@@ -122,7 +119,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>
@@ -251,6 +248,7 @@ export default {
var info = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
this.form.birthDate = info.birthday
this.form.sex = info.gender
console.log(this.form)
this.$forceUpdate()
},

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

View File

@@ -17,7 +17,7 @@
</AiAreaPicker>
</div>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题" :show-action="false" bg-color="#1F5CAF" search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch" @clear="handerClear"></u-search>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题、对象或走访人" :show-action="false" bg-color="#1F5CAF" search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<template v-if="data.length > 0">