|
@@ -1,12 +1,12 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
- <uni-section :title="task !== null ? task.name : '当前无检测任务'" type="line">
|
|
|
+ <uni-section :title="task !== null ? task.name : '当前无关爱行动'" type="line">
|
|
|
<uni-list :border="true" v-if="list.length > 0">
|
|
|
<view :id="item && item.residentId" class="delBox" v-for="(item, index) in list" :key="index" >
|
|
|
<uni-list-chat :class="{ left: isId == item.residentId }" class="item" :avatar="item.avatar || '/static/user1.png'" :title="item.name" :note="item.phone" badge-positon="left">
|
|
|
<view class="chat-custom-right">
|
|
|
- <text class="chat-custom-text">{{ item && item.status == 0 ? '未检' : '已检' }}</text>
|
|
|
- <button type="primary" size="mini" :disabled="item && item.status == 1" @click="filing(item)">已检</button>
|
|
|
+ <text class="chat-custom-text">{{ item && item.status == 0 ? '未报平安' : '已报平安' }}</text>
|
|
|
+ <button type="primary" size="mini" :disabled="item && item.status == 1" @click="filing(item)">报平安</button>
|
|
|
</view>
|
|
|
</uni-list-chat>
|
|
|
</view>
|
|
@@ -48,6 +48,7 @@
|
|
|
async query() {
|
|
|
const residentIds = [];
|
|
|
const familyInfo = await requestFamily.getUserAll();
|
|
|
+ console.log(familyInfo)
|
|
|
familyInfo.data.forEach(e => residentIds.push(e.residentId))
|
|
|
if (familyInfo.code == 200) {
|
|
|
const membersStatus = await requestFamily.membersStatus({ residentIds, natTaskId: this.natTaskId });
|
|
@@ -55,6 +56,7 @@
|
|
|
const resident = membersStatus.data.find(j => j.residentId == e.residentId);
|
|
|
return { ...e, status: resident?.status || 0 };
|
|
|
})
|
|
|
+ console.log(familyInfo.data)
|
|
|
this.list = familyInfo.data;
|
|
|
}
|
|
|
},
|
|
@@ -64,7 +66,7 @@
|
|
|
if (res.code == 200) {
|
|
|
this.query();
|
|
|
uni.showToast({
|
|
|
- title: '报备成功',
|
|
|
+ title: '已报平安',
|
|
|
duration: 2000,
|
|
|
});
|
|
|
}
|