Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -16,26 +16,34 @@
|
|||||||
</u-search>
|
</u-search>
|
||||||
</div>
|
</div>
|
||||||
<div class="dataes" v-if="datas.length">
|
<div class="dataes" v-if="datas.length">
|
||||||
<div class="datass" v-for="(item, index) in datas" :key="index" @click="toDetailCard(item)">
|
<u-swipe-action
|
||||||
<div class="left">
|
:show="item.show"
|
||||||
<img :src="item.photo" alt="" v-if="item.photo"/>
|
:index="index"
|
||||||
<img src="./components/img/4.png" alt="" v-else/>
|
v-for="(item, index) in datas"
|
||||||
</div>
|
:key="item.id"
|
||||||
<div class="right">
|
@click="onClick"
|
||||||
<div class="rightTop">
|
@open="onOpen"
|
||||||
<span class="name">{{ item.name }}</span>
|
disabled="item.doRight !== '1'"
|
||||||
<span class="btn" v-if="item.doRight == 1">
|
@content-click="toDetailCard(item)"
|
||||||
<!-- <span class="btn"> -->
|
:options="options">
|
||||||
<img src="./components/img/edit-icon.png" alt="" @click.stop="edit(item.id)">
|
<div class="datass">
|
||||||
<img src="./components/img/del-icon.png" alt="" @click.stop="del(item.id)">
|
<div class="left">
|
||||||
</span>
|
<img :src="item.photo" alt="" v-if="item.photo"/>
|
||||||
|
<img src="./components/img/4.png" alt="" v-else/>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightBottom">
|
<div class="right">
|
||||||
<span>{{ item.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</span>
|
<div class="rightTop">
|
||||||
<span>{{ item.phone }}</span>
|
<span class="name">{{ item.name }}</span>
|
||||||
|
<span class="btn" v-if="item.doRight == 1">
|
||||||
|
</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>
|
||||||
</div>
|
</u-swipe-action>
|
||||||
</div>
|
</div>
|
||||||
<div class="empty" v-if="!datas.length && isMore">
|
<div class="empty" v-if="!datas.length && isMore">
|
||||||
<img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt="">
|
<img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt="">
|
||||||
@@ -72,7 +80,21 @@
|
|||||||
currentTabs: 0,
|
currentTabs: 0,
|
||||||
areaId: '',
|
areaId: '',
|
||||||
isMore: false,
|
isMore: false,
|
||||||
areaName: ''
|
areaName: '',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
text: '编辑',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#007aff'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: '删除',
|
||||||
|
style: {
|
||||||
|
backgroundColor: '#dd524d'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -84,13 +106,31 @@
|
|||||||
this.areaId = this.user.areaId
|
this.areaId = this.user.areaId
|
||||||
this.areaName = this.user.areaName
|
this.areaName = this.user.areaName
|
||||||
this.getList()
|
this.getList()
|
||||||
uni.$on('reload', res => {
|
uni.$on('reload', () => {
|
||||||
this.current = 1
|
this.current = 1
|
||||||
this.getList()
|
this.getList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
onClick (index, i) {
|
||||||
|
if (i == 1) {
|
||||||
|
this.del(this.datas[index].id)
|
||||||
|
} else {
|
||||||
|
this.datas[index].show = false
|
||||||
|
this.edit(this.datas[index].id)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
onOpen (index) {
|
||||||
|
this.datas[index].show = true
|
||||||
|
this.datas.map((val, i) => {
|
||||||
|
if(index != i) {
|
||||||
|
this.datas[i].show = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getList() {
|
getList() {
|
||||||
this.$loading()
|
this.$loading()
|
||||||
this.$http.post('/app/appresident/list', null, {
|
this.$http.post('/app/appresident/list', null, {
|
||||||
@@ -102,7 +142,17 @@
|
|||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
|
this.datas = this.current > 1 ? [...this.datas, ...res.data.records.map(v => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
})] : res.data.records.map(v => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
this.pages = res.data.pages
|
this.pages = res.data.pages
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user