This commit is contained in:
liuye
2022-03-25 18:03:15 +08:00
2 changed files with 55 additions and 14 deletions

View File

@@ -130,13 +130,34 @@
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
type: 0,
id: '',
data: {},
}
},
computed: {
...mapState(['user'])
},
onLoad(o) {
this.id = o.id;
this.getDetail()
},
methods: {
getDetail() {
this.$http.post('/app/apppreventionreturntopovertyriskperson/queryDetailById',null,{
params:{
id: this.id
}
}).then(res => {
if(res.code == 0) {
this.data = res.data
}
})
},
toResult() {
uni.navigateTo({url: './result'})
},

View File

@@ -15,27 +15,27 @@
</div>
<div class="search">
<u-search placeholder="请输入姓名" v-model="name" bg-color="#1F5CAF" search-icon-color="#E2E8F1"
placeholder-style="color: #E2E8F1;" :show-action="false"></u-search>
placeholder-style="color: #E2E8F1;" :show-action="false" @search="searchHandler"></u-search>
</div>
</div>
</AiTopFixed>
<div class="card-list">
<div class="item" @click="toDetail">
<div class="card-list" v-if="list.length">
<div class="item" v-for="(item, index) in list" :key="index" @click="toDetail(item.id)">
<div class="top">
<div class="name-type">
<span class="name">李毅</span>
<span class="type">待走访</span>
<span class="name">{{ item.name }}</span>
<span class="type">{{ item.status }}</span>
</div>
<div class="address">武汉市武昌区紫金花医院皮肤科1201号</div>
<div class="address">{{ item.address }}</div>
</div>
<div class="bottom">大额医疗支出</div>
<div class="bottom">{{ item.riskType }}</div>
</div>
</div>
<AiEmpty v-else/>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
@@ -44,14 +44,15 @@ export default {
areaName: '',
areaId: '',
name: '',
current: 1,
list: [],
}
},
onLoad() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
},
computed: {
...mapState(['user'])
created() {
this.$dict.load('','')
this.getList()
},
methods: {
tabClick(index) {
@@ -61,10 +62,29 @@ export default {
this.areaId = v
this.current = 1
},
toDetail() {
uni.navigateTo({url:'./detail'})
searchHandler() {
this.list = []
this.current = 1
this.getList()
},
getList() {
this.$http.post('/app/apppreventionreturntopovertyriskperson/list',null,{params:{
current: this.current,
}}).then(res=>{
if(res?.data) {
this.list = this.current==1? res.data.records: [...this.list,...res.data.records]
}
})
},
toDetail(id) {
uni.navigateTo({url:`./detail?id=${id}`})
}
},
onReachBottom() {
this.current ++
this.getList()
},
onShow() {
document.title = "风险预警"
}