This commit is contained in:
liuye
2024-07-19 11:15:07 +08:00
parent feb0782b5c
commit b3d720e94f
5 changed files with 117 additions and 152 deletions

View File

@@ -146,6 +146,9 @@ export default {
if (!this.userPhone) { if (!this.userPhone) {
return this.$u.toast('请输入手机号') return this.$u.toast('请输入手机号')
} }
if (!this.vcode) {
return this.$u.toast('请输入验证码')
}
// if (!this.userRealName) { // if (!this.userRealName) {
// return this.$u.toast('请输入真实姓名') // return this.$u.toast('请输入真实姓名')
// } // }

View File

@@ -49,7 +49,7 @@
<span class="card-right">三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报</span> <span class="card-right">三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报</span>
</div> --> </div> -->
<div class="cards"> <div class="cards" v-if="data.files && data.files.length">
<span class="card-left">照片</span> <span class="card-left">照片</span>
</div> </div>
@@ -77,7 +77,7 @@
<div class="lines"/> <div class="lines"/>
</div> </div>
<div class="cardes-msg-top" v-if="item.doExplain">{{ item.doExplain }}</div> <div class="cardes-msg-top" v-if="item.doExplain">{{ item.doExplain }}</div>
<div class="imgs"> <div class="imgs" v-if="item.files && item.files.length">
<img :src="e.url" alt="" v-for="(e, index) in item.files" :key="index" @click="previewImage(item.files, e.url)"/> <img :src="e.url" alt="" v-for="(e, index) in item.files" :key="index" @click="previewImage(item.files, e.url)"/>
</div> </div>
</div> </div>
@@ -141,20 +141,23 @@ export default {
}, },
process() { process() {
const getAvatar = str => str?.substring(str?.length, str?.length - 2) const getAvatar = str => str?.substring(str?.length, str?.length - 2)
const list = this.data.processList.map(e => ({ var list = []
...e, if(this.data.processList && this.data.processList.length) {
avatar: getAvatar(e.girdMemberName), list = this.data.processList.map(e => ({
statusLabel: this.$dict.getLabel('residentReportDoStatus', e.doStatus) ...e,
})) avatar: getAvatar(e.girdMemberName),
if (this.evaluation.id) { statusLabel: this.$dict.getLabel('residentReportDoStatus', e.doStatus)
const {id, createUserName, score, files, createTime: doTime, content: doExplain} = this.evaluation }))
list.splice(0, 0, { if (this.evaluation.id) {
id, doTime, doExplain, const {id, createUserName, score, files, createTime: doTime, content: doExplain} = this.evaluation
statusLabel: `${score}星评价`, list.splice(0, 0, {
avatar: getAvatar(createUserName), id, doTime, doExplain,
systemExplain: `${createUserName}完成评价`, statusLabel: `${score}评价`,
files: files avatar: getAvatar(createUserName),
}) systemExplain: `${createUserName}完成评价`,
files: files
})
}
} }
return list return list
} }
@@ -385,6 +388,8 @@ uni-page-body {
font-size: 32px; font-size: 32px;
color: #333; color: #333;
margin-bottom: 8px; margin-bottom: 8px;
font-size: 32px;
word-break: break-all;
} }
.time { .time {
line-height: 40px; line-height: 40px;

View File

@@ -5,46 +5,18 @@
<div class="header-content-bg"> <div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt=""> <img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div> </div>
<!-- <AiTopFixed> <div class="top-tabs" :style="{'top': `${statusBarHeight+44}px`}">
<div class="areatop">
<u-form label-width="auto">
<u-form-item label="区域选择" right-icon="arrow-right" class="areaIds">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @input="seachObj" :name.sync="areaName" selectRoot/>
</u-form-item>
</u-form>
</div>
<div class="line"></div>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" @change="change"></u-tabs>
<div class="seachObjs">
<u-search v-model="keyword" :clearabled="true" placeholder="姓名/联系方式/身份证后6位" :show-action="false"
bg-color="#F5F5F5" search-icon-color="#E2E8F1" color="#666" height="58" @search="handerSearch"
@clear="handerClear"></u-search>
</div>
</AiTopFixed> -->
<div class="top-tabs" :style="{'top': `${statusBarHeight+50}px`}">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#222" <u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#222"
active-color="#1D2229" :bar-style="barStyle" font-size="34" @change="change"></u-tabs> active-color="#1D2229" :bar-style="barStyle" font-size="34" @change="change"></u-tabs>
<div class="select-content"> <div class="select-content">
<!-- <div class="search-input">
<img src="./img/search-icon.png" alt=""/>
<u-input type="text" placeholder="请输入姓名" placeholder-style="color:#999;font-size:13px;" height="18"
v-model="search.name" @confirm="getUserList" :clearable="false" maxlength="6"/>
</div> -->
<div class="search-input"> <div class="search-input">
<u-search placeholder="姓名/联系方式/身份证后6位" :clearabled="true" v-model="keyword" :show-action="false" bg-color="#F4F5FA" search-icon-color="#F4F5FA" <u-search placeholder="姓名/联系方式/身份证后6位" :clearabled="true" v-model="keyword" :show-action="false" bg-color="#F4F5FA" search-icon-color="#F4F5FA"
color="#666" height="72" @search="handerSearch" @clear="handerClear"></u-search> color="#666" height="72" @search="handerSearch" @clear="handerClear"></u-search>
</div> </div>
<div class="area-content fill"> <div class="area-content fill">
<AiPagePicker type="gird" @select="seachObj"> <AiAreaPicker class="ai-area" v-model="areaId" :areaId="$areaId" :fullName.sync="areaName" @input="areaSelect">
<AiMore v-model="gridName" placeholder="选择地区"/> <AiMore v-model="areaName" placeholder="选择地区"/>
</AiPagePicker> </AiAreaPicker>
<!-- <AiAreaPicker v-model="areaId" :areaId="user.areaId" @input="seachObj" :name.sync="areaName" selectRoot>
<AiMore v-model="areaName" placeholder="选择网格"/>
</AiAreaPicker> -->
</div> </div>
</div> </div>
</div> </div>
@@ -71,33 +43,22 @@
</div> </div>
</div> </div>
</div> </div>
<div class="empty" v-if="!datas.length"> <AiEmpty v-if="!datas.length" />
<img src="https://cdn.cunwuyun.cn/dvcp/h5/no-data.png" alt="">
<p>暂无居民信息<br/>点击<span @click="edit('')">新增按钮</span>新增居民信息,也可在管理系统批量导入</p>
</div>
</div> </div>
<!-- <AiEmpty class="emptyWrap" v-else></AiEmpty> -->
<div style="height: 60px"></div> <div style="height: 60px"></div>
<div class="footer" v-if="showBtn" @click="showTag=true"> <div class="footer" @click="showTagClick">
<div class="btn">打标签</div> <div class="btn" :class="showBtn ? '' : 'bg-gray'">打标签</div>
</div> </div>
<u-popup v-model="showTag" mode="bottom"> <u-popup v-model="showTag" mode="bottom">
<div class="popup-content"> <div class="popup-content">
<div class="title">111</div> <div class="title">选择标签</div>
<div class="tag-list"> <div class="tag-list">
<div class="item active">2222</div> <div class="item" :class="item.isCheck ? 'active' : ''" v-for="(item, index) in tagList" :key="index">{{ item.labelName }}</div>
<div class="item active">2222</div>
<div class="item">2222</div>
</div>
<div class="title">111</div>
<div class="tag-list">
<div class="item">333</div>
<div class="item">333</div>
</div> </div>
<div class="poup-btn"> <div class="poup-btn">
<div>取消</div> <div>取消</div>
<div class="confirm">确定</div> <div class="confirm" @click="confirmTag">确定</div>
</div> </div>
</div> </div>
</u-popup> </u-popup>
@@ -147,7 +108,8 @@ export default {
checkImg: 'https://cdn.sinoecare.com/i/2024/07/16/6695ddf91113c.png', checkImg: 'https://cdn.sinoecare.com/i/2024/07/16/6695ddf91113c.png',
circleImg: 'https://cdn.sinoecare.com/i/2024/07/16/6695ddf890b1e.png', circleImg: 'https://cdn.sinoecare.com/i/2024/07/16/6695ddf890b1e.png',
userImg: 'https://cdn.sinoecare.com/i/2024/07/16/6695e2a0d95c9.png', userImg: 'https://cdn.sinoecare.com/i/2024/07/16/6695e2a0d95c9.png',
showTag: false showTag: false,
tagList: []
} }
}, },
computed: { computed: {
@@ -202,30 +164,25 @@ export default {
} }
}) })
}, },
change(index) { change(index) {
this.currentTabs = index this.currentTabs = index
this.current = 1 this.current = 1
this.datas = [] this.datas = []
this.getList() this.getList()
}, },
toDetailCard(item) { toDetailCard(item) {
uni.navigateTo({url: `./DetailCard?id=${item.id}`}) uni.navigateTo({url: `./DetailCard?id=${item.id}`})
}, },
areaSelect(e) {
seachObj(e) {
this.areaId = e this.areaId = e
this.current = 1 this.current = 1
this.getList() this.getList()
}, },
handerSearch(e) { handerSearch(e) {
this.keyword = e this.keyword = e
this.current = 1 this.current = 1
this.getList() this.getList()
}, },
handerClear() { handerClear() {
this.keyword = '' this.keyword = ''
this.current = 1 this.current = 1
@@ -251,6 +208,41 @@ export default {
}, },
clickCheck(index) { clickCheck(index) {
this.datas[index].isCheck = !this.datas[index].isCheck this.datas[index].isCheck = !this.datas[index].isCheck
},
showTagClick() {
if(!this.showBtn) return
this.getTagList()
},
getTagList() {
this.$instance.post('app/appresidentlabelinfo/list?current=1&size=2000').then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
item.isCheck = false
})
this.tagList = res.data.records
this.showTag = true
}
})
},
confirmTag() {
var residentId = [], residentLabelList = []
this.datas.map((item) => {
if(item.isCheck) {
residentId.push(id)
}
})
this.tagList.map((item) => {
residentLabelList.push(item)
})
this.$instance.post('/app/appresidentlabel/update', {
residentId: residentId.join(','),
residentLabelList
}).then((res) => {
if (res.code == 0) {
this.$u.toast('操作成功')
this.getList()
}
})
} }
}, },
onReachBottom() { onReachBottom() {
@@ -412,8 +404,6 @@ export default {
.dataes { .dataes {
width: calc(100% - 64px); width: calc(100% - 64px);
margin: 320px 0 0 32px; margin: 320px 0 0 32px;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
.datass { .datass {
display: flex; display: flex;
padding: 24px 0; padding: 24px 0;
@@ -478,6 +468,13 @@ export default {
} }
} }
} }
.datass:nth-last-of-type(1) {
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
.right {
border-bottom: none;
}
}
} }
.footer { .footer {
@@ -499,6 +496,9 @@ export default {
color: #FFF; color: #FFF;
text-align: center; text-align: center;
} }
.bg-gray {
background-color: #ddd;
}
} }
.empty { .empty {
@@ -540,7 +540,7 @@ export default {
.tag-list { .tag-list {
.item { .item {
display: inline-block; display: inline-block;
padding: 0 8px; padding: 0 16px;
line-height: 44px; line-height: 44px;
border-radius: 8px; border-radius: 8px;
margin: 0 16px 16px 0; margin: 0 16px 16px 0;
@@ -581,5 +581,11 @@ export default {
} }
} }
} }
::v-deep .emptyWrap {
background-color: #fff;
padding-bottom: 32px;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
}
} }
</style> </style>

View File

@@ -13,11 +13,10 @@
<AiItem label="事件类型" :value="info.groupName"/> <AiItem label="事件类型" :value="info.groupName"/>
<AiItem label="所属网格" :value="info.girdName"/> <AiItem label="所属网格" :value="info.girdName"/>
<AiItem label="上报时间" :value="info.createTime"/> <AiItem label="上报时间" :value="info.createTime"/>
<AiItem label="照片" top-label> <AiItem label="照片" top-label v-if="info.files && info.files.length">
<div class="flex wrap"> <div class="flex wrap">
<image class="imageItem" v-for="(item, index) in info.files" @click="preview(item.url)" :key="index" :src="item.url"/> <image class="imageItem" v-for="(item, index) in info.files" @click="preview(item.url)" :key="index" :src="item.url"/>
</div> </div>
<span v-if="!info.files.length">暂无照片</span>
</AiItem> </AiItem>
</AiGroup> </AiGroup>
</div> </div>

View File

@@ -64,23 +64,8 @@
</div> </div>
</div> </div>
<div class="list-content" v-if="currentTabBar == 1"> <div class="list-content" v-if="currentTabBar == 1">
<!-- <AiTopFixed> <div class="search-top" :style="{'top': `${statusBarHeight+44}px`}">
<u-search <u-search placeholder="请输入姓名" v-model="search.name" :show-action="false" bg-color="#F4F5FA" search-icon-color="#F4F5FA"
placeholder="请输入昵称、姓名"
:show-action="false"
search-icon-color="#ccc"
v-model="search.name"
@search="(page1.current = 1), getList()"
/>
<AiCell>
<b slot="label" class="title"
><i v-html="page1.total || 0" />个居民</b
>
</AiCell>
</AiTopFixed> -->
<div class="search-top">
<u-search placeholder="姓名/联系方式/身份证后6位" v-model="search.name" :show-action="false" bg-color="#F4F5FA" search-icon-color="#F4F5FA"
color="#666" height="72" @search="(page1.current = 1), getList()" ></u-search> color="#666" height="72" @search="(page1.current = 1), getList()" ></u-search>
</div> </div>
<div class="user-list-content"> <div class="user-list-content">
@@ -104,7 +89,7 @@
/> />
</div> </div>
</AiCell> --> </AiCell> -->
<div class="item" v-for="item in data" :key="item.id" @click.native="showResident(item)"> <div class="item" v-for="item in data" :key="item.id">
<div class="left-img"> <div class="left-img">
<img :src="item.avatar" alt=""> <img :src="item.avatar" alt="">
</div> </div>
@@ -117,57 +102,18 @@
</span> </span>
</p> </p>
</div> </div>
<p class="item-idnumber">真实姓名{{ item.idNumber }} {{item.realName }}</p> <p class="item-idnumber">昵称{{ item.remark }}</p>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="list-content" v-if="currentTabBar == 2"> <div class="list-content" v-if="currentTabBar == 2">
<!-- <AiTopFixed> <div class="search-top" :style="{'top': `${statusBarHeight+44}px`}">
<u-search
placeholder="请输入群名、群主名"
:show-action="false"
search-icon-color="#ccc"
v-model="search.name"
@search="(page2.current = 1), getList()"
/>
<AiCell>
<b slot="label" class="title"
><i v-html="page2.total || 0" />个居民群</b
>
</AiCell>
</AiTopFixed> -->
<div class="search-top">
<u-search placeholder="请输入群名、群主名" v-model="search.name" :show-action="false" bg-color="#F4F5FA" search-icon-color="#F4F5FA" <u-search placeholder="请输入群名、群主名" v-model="search.name" :show-action="false" bg-color="#F4F5FA" search-icon-color="#F4F5FA"
color="#666" height="72" @search="(page2.current = 1), getList()" ></u-search> color="#666" height="72" @search="(page2.current = 1), getList()" ></u-search>
</div> </div>
<!-- <div class="mainPane">
<AiCell
v-for="(item, i) in list"
:key="i"
@click.native="toGroupList(item)"
>
<template #label>
<AiImage :src="item.avatar" preview />
</template>
<div class="card column start" flex>
<div flex class="groupName">
<b>{{ item.name || "群聊" }}</b>
<div class="personCount" v-if="item.personCount">
({{ item.personCount }})
</div>
</div>
<div class="owner" v-html="`群主:${item.ownerName}`" />
<div flex class="trends">
<div flex v-html="`今日入群:<em>${item.increase || 0}</em>`" />
<div flex v-html="`今日退群:<p>${item.decrease || 0}</p>`" />
</div>
</div>
</AiCell>
</div> -->
<div class="user-list-content"> <div class="user-list-content">
<div class="item group-item" v-for="item in list" :key="item.id" @click.native="toGroupList(item)"> <div class="item group-item" v-for="item in list" :key="item.id">
<div class="left-img"> <div class="left-img">
<img src="https://cdn.sinoecare.com/i/2024/07/12/66908ea79780f.png" alt=""> <img src="https://cdn.sinoecare.com/i/2024/07/12/66908ea79780f.png" alt="">
</div> </div>
@@ -259,12 +205,13 @@ export default {
todayList2: [], todayList2: [],
counts1: "", counts1: "",
counts2: "", counts2: "",
page2: { current: 1, size: 10, total: 0 }, page2: { current: 1, size: 10, total: 0, pages: 2},
search2: { name: "" }, search2: { name: "" },
page1: { current: 1, size: 10, total: 0 }, page1: { current: 1, size: 10, total: 0, pages: 2},
search1: { name: "" }, search1: { name: "" },
cWidth: 750, cWidth: 750,
cHeight: 500, cHeight: 500,
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
}; };
}, },
computed: { computed: {
@@ -325,12 +272,14 @@ export default {
}, },
// 居民列表 // 居民列表
getList() { getList() {
if(this.page1.current > this.page1.pages) return
this.$instance this.$instance
.post("/app/wxcp/wxcustomer/list", null, { .post("/app/wxcp/wxcustomer/list", null, {
params: { ...this.page1, ...this.search, type: 1 }, params: { ...this.page1, ...this.search, type: 1 },
}) })
.then((res) => { .then((res) => {
if (res?.data) { if (res?.data) {
this.page1.pages = res.data.pages
if (this.page1.current > 1) { if (this.page1.current > 1) {
this.data = [...this.data, ...res.data.records]; this.data = [...this.data, ...res.data.records];
} else this.data = res.data.records; } else this.data = res.data.records;
@@ -355,12 +304,14 @@ export default {
// 居民群列表 // 居民群列表
getList2() { getList2() {
if(this.page2.current > this.page2.pages) return
this.$instance this.$instance
.post("/app/wxcp/wxgroup/list", null, { .post("/app/wxcp/wxgroup/list", null, {
params: { ...this.page2, ...this.search }, params: { ...this.page2, ...this.search },
}) })
.then((res) => { .then((res) => {
if (res?.data) { if (res?.data) {
this.page2.pages = res.data.pages
let meta = res.data.records?.map((e) => ({ let meta = res.data.records?.map((e) => ({
...e, ...e,
avatar: e?.avatar || this.$cdn + "groupAvatar.png", avatar: e?.avatar || this.$cdn + "groupAvatar.png",
@@ -399,7 +350,7 @@ export default {
), ),
series: [ series: [
{ {
name: "居民总数", name: "群成员总数",
data: Object.values(this.weekList).map((e) => e.total), data: Object.values(this.weekList).map((e) => e.total),
}, },
{ {
@@ -581,25 +532,26 @@ uni-page-body {
} }
.list-content { .list-content {
width: 686px; width: calc(100% - 64px);
height: calc(100% - 216px); margin: 0 0 0 32px;
background: #FFF; padding-bottom: 200px;
border-radius: 16px;
margin: 32px 0 0 32px;
position: relative;
.search-top { .search-top {
position: absolute;
top: 0;
left: 0;
padding: 28px 32px; padding: 28px 32px;
width: 686px; width: calc(100% - 64px);
box-sizing: border-box; box-sizing: border-box;
position: fixed;
left: 0;
margin-left: 32px;
background-color: #fff; background-color: #fff;
z-index: 99; border-top-left-radius: 16px;
border-top-right-radius: 16px;
z-index: 9;
} }
.user-list-content { .user-list-content {
background-color: #fff; background-color: #fff;
padding-top: 128px; border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
margin-top: 128px;
.item { .item {
display: flex; display: flex;
padding: 24px 32px 0; padding: 24px 32px 0;