特殊人群

This commit is contained in:
liuye
2022-08-08 14:37:30 +08:00
parent 3de32a3db6
commit 653cdee447
11 changed files with 478 additions and 0 deletions

View File

@@ -87,6 +87,7 @@ export default {
img {
width: 96px;
height: 96px;
border-radius: 50%;
border: 1px solid #DDD;
}
}

View File

@@ -0,0 +1,99 @@
<template>
<div class="AppSpecialGroups">
<div class="title">特殊人群总计 : 60</div>
<div class="item" @click="toList">
<div class="left">
<img src="./img/user-icon-mini.png" alt="">
<span>残疾人残疾人残疾人残疾人残疾人残疾人残疾人残疾人残疾人残疾人</span>
</div>
<div class="right">
12<img src="./img/down-icon-666.png" alt="">
</div>
</div>
<div class="item">
<div class="left">
<img src="./img/user-icon-mini.png" alt="">
<span>残疾人</span>
</div>
<div class="right">
12<img src="./img/down-icon-666.png" alt="">
</div>
</div>
</div>
</template>
<script>
export default {
name: "AppSpecialGroups",
appName: "特殊人群",
data() {
return {
}
},
methods: {
toList() {
uni.navigateTo({ url: './List'})
}
},
onShow() {
document.title = "特殊人群"
},
}
</script>
<style lang="scss" scoped>
.AppSpecialGroups {
.title {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666666;
line-height: 28px;
padding: 40px 0 20px 30px;
}
.item {
display: flex;
padding: 30px;
background-color: #fff;
border-radius: 8px;
margin: 0 0 30px 30px;
width: 690px;
box-sizing: border-box;
.left {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 48px;
width: calc(100% - 200px);
img {
width: 44px;
height: 44px;
margin-right: 16px;
vertical-align: middle;
}
span {
display: inline-block;
width: calc(100% - 60px);
word-break: break-all;
vertical-align: text-top;
}
}
.right {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #000;
line-height: 48px;
width: 200px;
text-align: right;
img {
width: 32px;
height: 32px;
margin: -4px 0 0 16px;
vertical-align: middle;
transform: rotate(270deg);
}
}
}
}
</style>

View File

@@ -0,0 +1,132 @@
<template>
<div class="List">
<AiTopFixed>
<div class="select-gird" flex>
<AiPagePicker type="gird" v-model="handleSelectGird" valueObj nodeKey="id" formType="2">
<img src="./img/gird-icon.png" alt="" class="grid-icon">
<AiMore v-model="girdInfo.girdName" icon="arrow-down"/>
</AiPagePicker>
<u-search placeholder="姓名/联系方式/身份证号后6位" :show-action="false" search-icon-color="#ccc" v-model="search.title"
@search="search.current = 1, getList()"/>
</div>
</AiTopFixed>
<div class="item">
<div class="user-img">
<img src="./img/user-icon.png" alt="">
</div>
<div class="user-content">
<div class="user-info">
<h3>金宝彩</h3>
<p>428008******8765</p>
</div>
<div class="btn">
<div>
<img src="./img/edit-icon.png" alt="">
<img src="./img/del-icon.png" alt="">
</div>
<p>13890767891</p>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
search: {
current: 1,
title: ''
},
girdInfo: {}
}
},
methods: {
handleSelectGird(v) {
this.girdInfo = v || {}
// this.getGirdUserList()
},
getGirdUserList() {
// this.$http.post(`/app/appgirdmemberinfo/listGirdMemberByGirdId?girdId=${this.userGird.id}`).then((res) => {
// if (res.code == 0) {
// this.dataInfo = res.data
// }
// })
},
},
onShow() {
// document.title = "残疾人列表"
},
}
</script>
<style lang="scss" scoped>
.List {
.select-gird {
.grid-icon {
width: 32px;
height: 32px;
margin-right: 16px;
vertical-align: middle;
}
.AiPagePicker {
width: 220px;
}
.AiMore {
display: inline-block;
}
}
.item {
display: flex;
padding: 24px 0 0 32px;
background-color: #fff;
.user-img {
width: 112px;
img {
width: 80px;
height: 80px;
border-radius: 50%;
}
}
.user-content {
width: calc(100% - 112px);
padding: 0 32px 20px 0;
border-bottom: 1px solid #E4E5E6;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.user-info {
h3 {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
margin-bottom: 8px;
}
}
.btn {
div {
margin-bottom: 8px;
text-align: right;
img {
width: 48px;
height: 48px;
vertical-align: middle;
}
img:nth-of-type(2) {
margin-left: 40px;
}
}
}
p {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 36px;
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,246 @@
<template>
<div class="pickGrid">
<div class="header-middle">
<div class="hint">
<span v-for="(item, index) in selectList" :key="index">
<span v-if="index" style="margin:0 4px;" v-text="`/`"/>
<span style="color:#3F8DF5" @click="girdNameClick(item, index)" v-text="item.girdName"/>
</span>
</div>
<div class="showTypes">
<div v-if="options.length > 0">
<div class="cards" v-for="(item, index) in options" :key="index">
<div class="imges">
<img src="./components/img/gird--select-icon.png" alt="" class="avatras"/>
</div>
<div class="rightes fill">
<div class="applicationNames fill" @click="itemClick(item)">{{ item.girdName }}</div>
<u-icon class="more" name="arrow-right" @click="girdClick(item, index)"/>
</div>
</div>
</div>
<AiEmpty :description="isGridMember?`暂无数据`:`当前人员不是网格员或网格长`" class="emptyWrap" v-else/>
</div>
</div>
</div>
</template>
<script>
import {mapState} from "vuex";
export default {
name: 'pickGrid',
appName: "网格选择",
data() {
return {
SelectGird: {},
allData: null,
options: [],
selectList: [],
parentGirdId: '',
isFormMap: 0, //1为网格地图 一级不允许选中
}
},
computed: {
...mapState(['user']),
isMyGirds() {
return this.$route?.query.self == true
},
isGridMember() {
return this.user.girdCheckType > 0
},
//是否是网格员申报
isApply: v => v.$route?.query.formType == 2,
clearable: v => v.$route?.query.clearable,
selected: v => [v.$route?.query.selected].flat()
},
onLoad(option) {
if (option.isFormMap) {
this.isFormMap = option.isFormMap
}
this.isGridMember || this.isApply ? this.getAllGrids() : this.$u.toast('当前人员不是网格员或网格长')
},
methods: {
getAllGrids() {
this.selectList = []
let {girdMemberId} = this.user,
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2AndUser`,
params = {girdMemberId}
if (this.isApply) {
url = `/app/appgirdinfo/listByInfo`
params = {}
}
if (this.isMyGirds) {
url = `/app/appgirdmemberinfo/queryMyGirdListByLevel2`
}
this.$http.post(url, null, {params}).then((res) => {
if (res?.data) {
let parents = res.data.map(e => e.parentGirdId)
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id)}))
this.treeInit()
}
})
},
treeInit(isClick) {
let last = uni.getStorageSync("lastSelectedGrid")
if (!isClick && last && !this.isApply) {
this.$http.post("/app/appgirdinfo/listFatherGirdInfo", null, {
params: {girdId: last}
}).then(res => {
if (res?.data) {
this.selectList = [{girdName: '可选范围', id: ''}, res.data.filter(e => !!this.allData.find(a => a.id == e.id))].flat()
this.getGridsByGridMemberAndParent({id: last})
}
})
} else {
this.options = this.allData.filter((e, i, arr) => !arr.map(e => e.id).includes(e.parentGirdId) || this.isMyGirds)
this.options.map((item) => item.isChecked = this.selected.includes(item.id))
let obj = {girdName: '可选范围', id: ''}
this.selectList.push(obj)
}
},
itemClick(row) {
if (row.hasChildren) {
let obj = {
girdName: row.girdName,
id: row.id,
}
this.selectList.push(obj)
this.getGridsByGridMemberAndParent(row)
}
},
getGridsByGridMemberAndParent(row) {
let {id: parentGirdId} = row
this.options = this.allData.filter(e => e.parentGirdId == parentGirdId)
this.options.map((item) => item.isChecked = this.selected.includes(item.id))
},
girdNameClick(row, index) {
if (!index) { //第一级别
this.selectList = []
this.treeInit(true)
} else {
this.selectList.splice(index, 8)
this.getGridsByGridMemberAndParent(row)
}
},
girdClick(row) {
this.SelectGird = row
this.$forceUpdate()
this.submit()
},
submit() {
if (this.SelectGird.id != null) {
if (!this.isApply && !this.isMyGirds) {
uni.setStorageSync("lastSelectedGrid", this.SelectGird.parentGirdId)
}
uni.navigateBack({
success: () => {
uni.$emit("pagePicker:custom", this.SelectGird)
}
})
} else {
return this.$u.toast('请选择网格')
}
},
}
}
</script>
<style scoped lang="scss">
.pickGrid {
min-height: 100vh;
background: #fff;
padding-bottom: 140px;
box-sizing: border-box;
.more {
width: 80px;
justify-content: center;
}
.header-middle {
.hint {
padding: 28px 20px 28px 32px;
line-height: 56px;
box-shadow: 0px 1px 0px 0px #e4e5e6;
font-size: 30px;
font-weight: 500;
word-break: break-all;
}
.showTypes {
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
// width: 200px;
.imgselect {
width: 48px;
height: 48px;
vertical-align: middle;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
}
}
img {
width: 74px;
height: 74px;
border-radius: 8px;
}
.rightes {
display: flex;
border-bottom: 1px solid #e4e5e6;
padding: 0 16px;
.applicationNames {
display: inline-block;
font-size: 36px;
font-weight: 500;
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
vertical-align: bottom;
}
}
}
}
}
.subBtn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 118px;
background: #f4f8fb;
justify-content: flex-end;
div {
width: 192px;
height: 80px;
line-height: 80px;
text-align: center;
border: 2px solid #1365dd;
background: #1365dd;
border-radius: 4px;
font-size: 32px;
color: #fff;
margin-right: 32px;
}
}
}
</style>