This commit is contained in:
liuye
2022-01-25 16:31:39 +08:00
parent 1c26780400
commit a4a8ce3e31
67 changed files with 9080 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
<template>
<div class="AppBuilding">
<search-map v-if="show"/>
</div>
</template>
<script>
import Detail from './detail'
import Add from './add'
import List from './list'
import SearchMap from './components/searchMap'
import Map from './map'
export default {
name: 'AppBuilding',
appName: '以房找人',
data() {
return {
show: true
}
},
components: {Detail, Add, List, SearchMap, Map},
onShow() {
this.show = false
this.$nextTick(() => {
this.show = true
})
document.title = "以房找人"
},
}
</script>
<style lang="scss" scoped>
uni-page-body {
height: 100%;
}
.AppBuilding {
height: 100%;
}
</style>

View File

@@ -0,0 +1,287 @@
<template>
<div class="add">
<div class="title">
<span class="tips"/>房屋信息
</div>
<div class="pad-l32">
<div class="item">
<span class="label">房屋面积</span>
<div class="value">
<u-input type="digit" placeholder="请输入" v-model="houseInfo.houseArea" input-align="right"
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="7"/>
</div>
</div>
<div class="item">
<span class="label">居住现状</span>
<div class="value" @click="selectClick('houselivingStatus', 'livingStatus')">
<span
:class="houseInfo.livingStatus === '' ? 'color-999' : ''">{{
$dict.getLabel('houselivingStatus', houseInfo.livingStatus) || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
<div class="item">
<span class="label">房屋用途</span>
<div class="value" @click="selectClick('houseUseStatus', 'houseUse')">
<span
:class="houseInfo.houseUse === '' ? 'color-999' : ''">{{
$dict.getLabel('houseUseStatus', houseInfo.houseUse) || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
<div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">承租情况</span>
<div class="value" @click="selectClick('houseLeaseSituation', 'leaseSituation')">
<span
:class="houseInfo.leaseSituation === '' ? 'color-999' : ''">{{
$dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
<div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">起租日期</span>
<div class="value" @click="dateShow=true">
<span :class="houseInfo.startDate === '' ? 'color-999' : ''">{{ $dateFormat(houseInfo.startDate,'YYYY-MM-DD') || '请选择' }}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
<div class="item" v-if="houseInfo.livingStatus == 1">
<span class="label">租房备案证明</span>
<div class="value" @click="selectClick('isFilingCertificateStatus', 'isFilingCertificate')">
<span
:class="houseInfo.isFilingCertificate === '' ? 'color-999' : ''">{{
$dict.getLabel('isFilingCertificateStatus', houseInfo.isFilingCertificate) || '请选择'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
</div>
<div class="line-bg"/>
<div class="title">
<span class="tips"/>房主信息
<AiPagePicker class="select" :selected.sync="houseInfo.owner">选择人员</AiPagePicker>
</div>
<div class="pad-l32">
<div class="item" v-for="(item, index) in houseInfo.owner" :key="index">
<span class="label">{{ item.name }}</span>
<div class="value" @click="tableRelationSelect('owner', index)">
<span
:class=" item.relation === '' ? 'color-999' : ''">{{
$dict.getLabel('householdRelation', item.relation) || '与户主关系'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
</div>
<div class="line-bg"/>
<div class="title">
<span class="tips"/>承租人信息
<AiPagePicker class="select" :selected.sync="houseInfo.renter">选择人员</AiPagePicker>
</div>
<div class="pad-l32">
<div class="item" v-for="(item, index) in houseInfo.renter" :key="index">
<span class="label">{{ item.name }}</span>
<div class="value" @click="tableRelationSelect('renter', index)">
<span
:class=" item.relation === '' ? 'color-999' : ''">{{
$dict.getLabel('householdRelation', item.relation) || '与户主关系'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
</div>
<div class="line-bg"/>
<div class="title">
<span class="tips"/>实际居住人员
<AiPagePicker class="select" :selected.sync="houseInfo.live">选择人员</AiPagePicker>
</div>
<div class="pad-l32">
<div class="item" v-for="(item, index) in houseInfo.live" :key="index">
<span class="label">{{ item.name }}</span>
<div class="value" @click="tableRelationSelect('live', index)">
<span
:class=" item.relation === '' ? 'color-999' : ''">{{
$dict.getLabel('householdRelation', item.relation) || '与户主关系'
}}</span>
<u-icon name="arrow-right" color="#cccccc" size="14"/>
</div>
</div>
</div>
<div class="footer" @click="submit">
<div class="btn">保存</div>
</div>
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="2010" @confirm="dateConfirm">请选择
</u-picker>
<u-select v-model="showSelect" :list="selectList" label-name="dictName" value-name="dictValue"
@confirm="confirmSelect"/>
<u-select v-model="showRelation" :list="$dict.getDict('householdRelation')" label-name="dictName"
value-name="dictValue" @confirm="confirmRelation"/>
</div>
</template>
<script>
import {mapActions, mapState} from 'vuex'
export default {
data() {
return {
houseInfo: {},
showSelect: false,
selectList: [],
formName: '',
dateShow: false,
deteParams: {year: true, month: true, day: true, hour: false, minute: false, second: false},
showRelation: false,
tableName: '',
tableIndex: '',
lockSelector: false
}
},
computed: {...mapState(['user'])},
created() {
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType').then(() => {
this.getDetail()
})
},
onShow() {
document.title = '房屋信息'
},
methods: {
...mapActions(['selectEnterpriseContact']),
tableRelationSelect(name, index) {
this.tableName = name
this.tableIndex = index
this.showRelation = true
},
confirmRelation(e) {
this.houseInfo[this.tableName][this.tableIndex].relation = e[0].value
},
getDetail() {
let {id} = this.$route.query
id && this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if (res?.data) {
this.houseInfo = res.data
}
})
},
submit() {
this.$http.post(`app/appcommunityhouseinfo/update`, this.houseInfo).then(res => {
if (res?.code == 0) {
this.$u.toast('提交成功')
setTimeout(() => {
uni.navigateBack({})
}, 600)
}
})
},
selectClick(dictName, formName) {
this.selectList = this.$dict.getDict(dictName)
this.formName = formName
this.showSelect = true
},
confirmSelect(e) {
this.houseInfo[this.formName] = e[0].value
},
dateConfirm(e) {
this.houseInfo.startDate = `${e.year}-${e.month}-${e.day} 00:00:00`
}
}
}
</script>
<style lang="scss" scoped>
.add {
padding-bottom: 112px;
.title {
width: 100%;
height: 96px;
line-height: 96px;
background: #FFF;
font-size: 32px;
font-weight: 500;
color: #262B36;
padding-right: 32px;
box-sizing: border-box;
overflow: hidden;
.tips {
display: inline-block;
width: 8px;
height: 32px;
background: #4E75FE;
box-shadow: 0 8px 24px 2px #C9D8FA;
border-radius: 4px;
vertical-align: middle;
margin-right: 22px;
}
.select {
float: right;
font-size: 30px;
color: #1365DD;
}
}
.item {
width: 100%;
padding: 34px 32px 34px 0;
background: #FFFFFF;
border-bottom: 1px solid #D8DDE6;
display: flex;
justify-content: space-between;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
box-sizing: border-box;
.color-999 {
color: #999;
}
.value {
.u-icon {
margin-left: 16px;
}
}
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.btn {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #1365DD;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
}
.line-bg {
width: 100%;
height: 16px;
background: #F5F5F5;
}
.pad-l32 {
padding-left: 32px;
background-color: #fff;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 866 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,596 @@
<template>
<div class="searchMap">
<div class="grid-input">
<img src="./img/back-icon.png" alt="" class="back-icon" v-if="name && show" @click="show=false">
<img src="./img/search-icon.png" alt="" class="search-icon" v-else>
<input type="text" class="input" placeholder="请输入姓名、房屋信息" v-model="name" maxlength="10" confirm-type="search"
@confirm="search"/>
<div class="clear-btn">
<img src="./img/del-icon.png" alt="" class="del-icon" v-if="name" @click="clear">
</div>
<span class="search-btn" @click="search">搜索</span>
</div>
<div class="search-list" v-if="show">
<div class="title border">
<img src="./img/search-icon.png" alt="" class="search-icon">{{ name }}
</div>
<div class="item border" v-for="(item, index) in buildList" :key="index" @click="getBuildingInfo(item)">
<img src="./img/user-icon.png" alt="" class="search-icon user-icon">
<div class="item-content">
<h3>{{ item.residentName }}</h3>
<p>{{ item.areaName || '' }}{{ item.createAddress }}</p>
</div>
</div>
</div>
<div class="build-btn" @click="toList()">
<img src="./img/build-icon.png" alt=""> 楼栋<br/>列表
</div>
<div class="map-content">
<AiTMap :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"/>
</div>
<u-popup v-model="showPop" mode="bottom" border-radius="14">
<div class="popup">
<div class="bg"></div>
<div class="title">{{ detailInfo.house.createAddress || '' }}</div>
<p class="address">{{ detailInfo.community.address || '' }}</p>
<div class="info-flex">
<span class="label">所属社区</span>
<span class="value">{{ detailInfo.build.areaName }}</span>
</div>
<div class="info-flex">
<span class="label">所属小区</span>
<span class="value">{{ detailInfo.build.communityName }}</span>
</div>
<div class="info-flex">
<span class="label">房屋类型</span>
<span class="value">{{ $dict.getLabel('communityBuildingType', detailInfo.house.buildingType) }}</span>
</div>
<div class="info-flex">
<span class="label">所属网格</span>
<span class="value">{{ detailInfo.gird.girdName || '' }}</span>
</div>
<div class="info-flex">
<span class="label">网格管理员</span>
<span class="value">{{ detailInfo.gird.girdMemberNames || '' }}</span>
</div>
<div class="info-flex">
<span class="label">楼栋长</span>
<span
class="value">{{ detailInfo.build.managerName || '' }}&nbsp;&nbsp;{{
detailInfo.build.managerPhone || ''
}}
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(detailInfo.build.managerPhone)"
class="phone-icon" v-if="detailInfo.build.managerPhone">
</span>
</div>
</div>
<div class="popup-btn" @click="toDetail(detailInfo.build.id)">查看楼栋模型</div>
</u-popup>
<u-popup v-model="buildPopup" mode="bottom" border-radius="14">
<div class="popup">
<div class="bg"/>
<div class="title">{{ building.createAddress || '' }}</div>
<div class="info-flex">
<span class="label">所属社区</span>
<span class="value">{{ building.areaName }}</span>
</div>
<div class="info-flex">
<span class="label">所属小区</span>
<span class="value">{{ building.communityName }}</span>
</div>
<div class="info-flex">
<span class="label">房屋类型</span>
<span class="value">{{ $dict.getLabel('communityBuildingType', building.buildingType) }}</span>
</div>
<div class="info-flex">
<span class="label">所属网格</span>
<span class="value" v-text="building.girdName||''"/>
</div>
<div class="info-flex">
<span class="label">网格管理员</span>
<span class="value" v-text="building.girdMemberNames||''"/>
</div>
<div class="info-flex">
<span class="label">楼栋长</span>
<span
class="value">{{ building.managerName || '' }}&nbsp;&nbsp;{{ building.managerPhone || '' }}
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(detailInfo.build.managerPhone)"
class="phone-icon" v-if="detailInfo.build.managerPhone">
</span>
</div>
</div>
<div class="popup-btn" @click="toDetail(building.id)">查看楼栋模型</div>
</u-popup>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data() {
return {
ops: {},
lib: null,
map: null,
markerArr: [],
show: false,
value: '',
ClusterBubble: null,
name: '',
buildList: [],
detailInfo: {
house: {},
build: {},
community: {},
gird: {}
},
showPop: false,
retryMapCount: 0,
building: {},
buildPopup: false
}
},
computed: {...mapState(['user', 'config'])},
mounted() {
this.getCommunityList().then(points => {
this.getMarkerCluster(points)
})
},
onShow() {
document.title = "以房找人"
},
created() {
this.$dict.load("communityBuildingType")
},
methods: {
getCommunityList() {
return this.$http.post('/app/appcommunitybuildinginfo/listByBuilding', null, {
params: {
current: 1,
size: 1000000,
areaId: this.user.areaId
}
}).then(res => {
if (res?.data) {
this.buildList = res.data
return res.data.map(item => {
return {
...item,
lnglat: [item.lng, item.lat],
buildingNumber: item.name || item.buildingNumber,
communityName: item.name || item.communityName,
}
})
}
})
},
getMarkerCluster(points, count = 0) {
let {lib: TMap, map} = this
if (map) {
map.setCenter(this.config.latlng)
let MarkerCluster = new TMap.MarkerCluster({
map, gridSize: 60,
enableDefaultStyle: false, // 关闭默认样式
geometries: points?.map(e => ({
position: new TMap.LatLng(e.lat, e.lng),
content: `${e.createAddress} | ${e.houseNum}`,
properties: {...e}
})) || [],
zoomOnClick: true
})
let geometries = [], marker, markers = []
MarkerCluster.on('cluster_changed', () => {
if (markers.length) {
markers.forEach(function (item) {
item.destroy();
})
markers = [];
}
geometries = []
let clusters = MarkerCluster.getClusters()
clusters.forEach((item) => {
if (item.geometries?.length > 1) {
//聚合样式
geometries.push({
styleId: 'cluster',
position: item.center,
properties: {...item},
content: item.geometries.length?.toString() || "0"
})
} else {
//点标记样式
// 创建气泡DOM元素
class ClusterBubble extends TMap.DOMOverlay {
constructor(options) {
super(options);
}
onInit(options) {
this.content = options.content;
this.position = options.position;
};
onDestroy() {
this.dom.removeEventListener('click', this.onClick);
this.removeAllListeners();
}
createDOM() {
let dom = document.createElement('div');
dom.classList.add('marker');
dom.innerText = this.content;
// 监听点击事件实现zoomOnClick
this.onClick = this.onClick.bind(this);
// pc端注册click事件移动端注册touchend事件
dom.addEventListener('click', this.onClick);
dom.addEventListener('touchend', this.onClick);
return dom;
};
updateDOM() {
if (!this.map) {
return;
}
// 经纬度坐标转容器像素坐标
let pixel = this.map.projectToContainer(this.position);
// 使文本框中心点对齐经纬度坐标点
let left = pixel.getX() - this.dom.clientWidth / 2 + 'px';
let top = pixel.getY() - this.dom.clientHeight / 2 + 'px';
this.dom.style.transform = `translate(${left}, ${top})`;
this.emit('dom_updated');
};
onClick() {
this.emit('click');
}
}
let {content} = item.geometries?.[0] || {},
overlay = new ClusterBubble({map, position: item.center, content})
overlay.on('click', () => {
this.buildPopup = true
this.building = item.geometries?.[0]?.properties || {}
})
markers.push(overlay)
}
});
if (marker) {
marker.setGeometries(geometries)
} else {
marker = new TMap.MultiMarker({
map, enableCollision: true, geometries,
styles: {
cluster: new TMap.MarkerStyle({
width: 48,
height: 48,
anchor: {x: 24, y: 24},
src: this.$cdn + "/map/cluster.png",
color: '#fff',
// direction: 'center',
size: 18
})
},
})
marker.on('click', (e) => {
let {bounds} = e.geometry.properties
map.fitBounds(bounds)
})
}
})
return Promise.resolve()
} else {
if (count < 5) {
setTimeout(() => {
return this.getMarkerCluster(points, ++count)
}, 1000)
} else Promise.reject("加载失败")
}
},
clear() {
this.name = ''
},
search() {
this.buildList = []
this.$http.post('/app/appcommunityhouseinfo/queryHouseByName', null, {
params: {
current: 1,
size: 20,
areaId: this.user.areaId,
name: this.name
}
}).then(res => {
if (res.code == 0 && res.data.length) {
this.show = true
this.buildList = res.data
const points = res.data.map(item => {
return {
lnglat: [item.lng, item.lat],
id: item.id,
corpId: item.corpId,
areaName: item.areaName,
buildingNumber: item.name || item.buildingNumber,
communityName: item.name || item.communityName,
}
})
this.getMarkerCluster(points)
} else {
this.show = false
this.$u.toast('未搜索到结果,请换个关键字重试!')
}
})
},
getBuildingInfo(item) {
this.$http.post(`/app/appcommunityhouseinfo/queryDetailByIdWithBuilding?buildId=${item.buildingId}&houseId=${item.id}`).then(res => {
if (res?.data) {
this.show = false
this.showPop = true
this.detailInfo = res.data
}
})
},
toList() {
uni.navigateTo({url: './list'})
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
toDetail(id) {
uni.navigateTo({url: `./detail?id=${id}`})
}
}
}
</script>
<style lang="scss" scoped>
.searchMap {
height: 100vh;
.grid-input {
width: calc(100% - 64px);
height: 88px;
background: #FFF;
box-shadow: 0 4px 8px 0 rgba(192, 185, 185, 0.5);
border-radius: 16px;
position: fixed;
top: 24px;
left: 50%;
transform: translateX(-50%);
z-index: 99999;
padding: 16px 20px;
box-sizing: border-box;
.search-icon {
width: 48px;
height: 48px;
margin-right: 16px;
}
.input {
display: inline-block;
padding: 8px 0;
height: 32px;
line-height: 32px;
width: calc(100% - 220px);
font-size: 28px;
font-family: MicrosoftYaHei;
color: #666;
}
.back-icon {
width: 16px;
height: 32px;
margin-right: 24px;
vertical-align: super;
}
.clear-btn {
display: inline-block;
width: 32px;
height: 32px;
margin-right: 30px;
}
.del-icon {
width: 32px;
height: 32px;
vertical-align: super;
}
.search-btn {
display: inline-block;
width: 80px;
height: 32px;
line-height: 32px;
text-align: right;
font-size: 28px;
font-family: MicrosoftYaHei;
color: #1365DD;
border-left: 1px solid #DEDFE0;
vertical-align: top;
margin-top: 12px;
}
}
.search-list {
position: fixed;
width: 100%;
height: calc(100% - 130px);
overflow-y: scroll;
top: 128px;
left: 0;
box-sizing: border-box;
z-index: 99999;
.search-icon {
width: 36px;
height: 36px;
margin-right: 16px;
vertical-align: sub;
}
.title {
height: 82px;
line-height: 82px;
font-size: 26px;
font-family: MicrosoftYaHeiSemibold;
color: #1365DD;
padding-left: 44px;
background-color: #fff;
}
.item {
padding: 22px 44px 24px 44px;
background-color: #fff;
}
.item-content {
display: inline-block;
width: 610px;
color: #333;
h3 {
font-size: 28px;
font-family: MicrosoftYaHeiSemibold;
line-height: 32px;
margin-bottom: 8px;
}
p {
width: 100%;
font-size: 24px;
font-family: MicrosoftYaHei;
line-height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.user-icon {
vertical-align: top;
}
.border {
border-bottom: 1px solid #DEDFE1;
}
}
.build-btn {
width: 80px;
height: 160px;
background: #FFF;
box-shadow: 0 4px 8px 0 rgba(138, 138, 138, 0.5);
border-radius: 8px;
position: fixed;
bottom: 136px;
right: 24px;
z-index: 99999;
padding: 16px 16px 0;
box-sizing: border-box;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666;
line-height: 30px;
img {
width: 48px;
height: 48px;
margin-bottom: 8px;
}
}
.map-content {
width: 100%;
height: 100%;
}
.popup {
padding: 0 32px 16px;
.bg {
width: 64px;
height: 10px;
background: #CCC;
border-radius: 6px;
margin: 32px 0 32px 344px;
}
.title {
font-size: 36px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 50px;
margin-bottom: 24px;
}
.info-flex {
padding: 26px 0 30px 0;
width: 100%;
border-bottom: 1px solid #D8DDE6;
line-height: 40px;
font-size: 28px;
.label {
display: inline-block;
width: 160px;
font-weight: 800;
color: #333;
}
.value {
color: #666;
font-size: 26px;
.phone-icon {
width: 40px;
height: 40px;
vertical-align: sub;
margin-left: 16px;
}
}
}
}
.popup-btn {
width: 100%;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
height: 112px;
line-height: 112px;
text-align: center;
background: #1365DD;
color: #FFF;
}
::v-deep.marker {
color: #fff;
background: #5088FF;
padding: 0 32px;
width: fit-content;
height: 56px;
border-radius: 52px;
transform: translate(-50%, -50%);
display: flex;
align-items: center;
&:before {
content: " ";
display: block;
position: absolute;
bottom: 0;
left: 50%;
width: 0;
height: 0;
transform: translate(-50%, 100%);
border: 12px solid transparent;
border-top-color: #5088FF;
}
}
}
</style>

View File

@@ -0,0 +1,535 @@
<template>
<div class="detail">
<AiTopFixed>
<div class="select-flex" @click="showSelect=true">
<span class="name" v-text="cellName"/>
<span class="btn">单元切换</span>
</div>
<div class="line-bg"></div>
<div class="num-content">
<div class="num-item">
<div class="content">
<h2>{{ numInfo['实有户数'] || 0 }}</h2>
<p>实有户数</p>
</div>
</div>
<div class="num-item">
<div class="content">
<h2>{{ numInfo['实有人口'] || 0 }}</h2>
<p>实有人口</p>
</div>
</div>
<div class="num-item">
<div class="content">
<h2>{{ numInfo['流动人口'] || 0 }}</h2>
<p>流动人口</p>
</div>
</div>
</div>
<div class="line-bg"></div>
</AiTopFixed>
<div class="list-content">
<div class="left">
<div class="item-content" v-for="(item, index) in list" :key="index" @click="getHouseDetail(item.id)">
<div class="item">
<h2>{{ item.houseCode }}</h2>
<p v-text="`${item.livingNumber}人`.replace(/0人/,'无人')"/>
</div>
</div>
<AiEmpty v-if="!list.length" style="padding-bottom:80px;"/>
</div>
</div>
<u-select v-model="showSelect" :list="selectList" label-name="cellName" value-name="eachUnitNumber"
@confirm="confirmSelect"/>
<u-popup v-model="show" mode="bottom" border-radius="14" height="1000">
<div class="popup">
<div class="bg"></div>
<div class="title">{{ houseInfo.createAddress }}</div>
<div class="row-info">
<div class="row-item left">
<h3>{{ `${houseInfo.houseArea || 0}`.replace(/0㎡/, "未统计") }} </h3>
<p>房屋面积</p>
</div>
<div class="row-item center">
<span class="right-line"></span>
<span class="left-line"></span>
<h3>{{ $dict.getLabel('houseUseStatus', houseInfo.houseUse) || "无" }} </h3>
<p>房屋用途</p>
</div>
<div class="row-item right">
<h3>{{ $dict.getLabel('houselivingStatus', houseInfo.livingStatus) || "未使用" }}</h3>
<p>居住现状</p>
</div>
</div>
<div class="row-info" v-if="!!houseInfo.leaseSituation">
<div class="row-item left">
<h3>{{ $dict.getLabel('houseLeaseSituation', houseInfo.leaseSituation) || "无" }}</h3>
<p>承租情况</p>
</div>
<div class="row-item center">
<span class="right-line"></span>
<span class="left-line"></span>
<h3>{{ $dateFormat(houseInfo.startDate,'YYYY-MM-DD') }}</h3>
<p>起租日期</p>
</div>
<div class="row-item right">
<h3>{{ houseInfo.isFilingCertificate == 1 ? '有' : '无' }}</h3>
<p>租房备案证明</p>
</div>
</div>
</div>
<div v-if="houseInfo.owner.length || houseInfo.renter.length">
<div class="line-bg"></div>
<div class="popup" v-if="houseInfo.owner.length">
<div class="title pad-t32">房主信息</div>
<div class="info-flex" v-for="(item, index) in houseInfo.owner" :key="index">
<div class="item">
<span class="label">房主</span>
<span class="value">{{ item.name }}</span>
</div>
<div class="item">
<span class="label">联系方式</span>{{ item.phone }}
</div>
</div>
</div>
<div class="popup" v-if="houseInfo.renter.length">
<div class="title pad-t32">承租人信息</div>
<div class="info-flex" v-for="(item, index) in houseInfo.renter" :key="index">
<div class="item">
<span class="label">房主</span>
<span class="value">{{ item.name }}</span>
</div>
<div class="item">
<span class="label">联系方式</span>{{ item.phone }}
</div>
</div>
</div>
</div>
<div v-if="houseInfo.live.length">
<div class="line-bg"></div>
<div class="popup">
<div class="title pad-t32">实际居住人员</div>
<div v-for="(item, index) in houseInfo.live" :key="index">
<div class="info-flex">
<div class="item">
<span class="label">居住人</span>
<span class="value">{{ item.name }}</span>
</div>
<div class="item">
<span class="label">联系方式</span>{{ item.phone }}
</div>
</div>
<div class="info-flex mar-t48">
<div class="item">
<span class="label">与户主关系</span>{{ $dict.getLabel('householdRelation', item.relation) }}
</div>
</div>
</div>
</div>
</div>
<div class="pad-b112"></div>
<div class="pop-btn" @click="toAdd(houseInfo.id)">编辑修改</div>
</u-popup>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
props: ['params'],
data() {
return {
show: false,
communityId: '',
list: [],
houseInfo: {
owner: [],
renter: [],
live: []
},
numInfo: {},
showSelect: false,
selectList: [],
selectCellIndex: 0,
houseId: '',
detail: {},
eachUnitNumber: 1
}
},
computed: {
...mapState(['user']),
cellName() {
return this.selectList.find(e => e.eachUnitNumber == this.eachUnitNumber)?.cellName || ""
}
},
onShow() {
document.title = "以房找人"
this.$dict.load('householdRelation', 'houselivingStatus', 'houseLeaseSituation', 'houseUseStatus',
'isFilingCertificateStatus', 'communityBuildingType', 'yesOrNo', 'BulidResidentType')
this.getBuilding()
},
methods: {
getSelectList(communityId) {
//通过小区ID获取楼栋列表,用来切换楼栋
this.$http.post(`/app/appcommunitybuildinginfo/listByUnitNumber`, null, {
params: {communityId, size: 999}
}).then(res => {
if (res?.data) {
this.selectList = []
let {unitNumber, buildingNumber} = this.detail,
{communityName} = res.data.records?.[0]
for (let i = 1; i <= unitNumber; i++) {
this.selectList.push({
eachUnitNumber: i,
cellName: `${communityName + buildingNumber}${i}单元`
})
}
this.eachUnitNumber = this.selectList[0].eachUnitNumber
this.getStatistics()
this.getList()
}
})
},
getBuilding() {
//获取楼栋信息
let {id} = this.$route.query
this.$http.post(`/app/appcommunitybuildinginfo/queryDetailById`, null, {
params: {id}
}).then(res => {
if (res?.data) {
this.detail = res.data
this.getSelectList(res.data.communityId)
}
})
},
getStatistics() {
//获取楼栋统计信息
let {id} = this.detail
this.$http.post(`app/appcommunitybuildinginfo/statistics`, null, {
params: {id, unitNum: this.eachUnitNumber}
}).then(res => {
if (res?.data) {
this.numInfo = res.data.unit
}
})
},
getList() {
//获取房间列表
let {id: buildingId} = this.detail
this.$http.post(`app/appcommunityhouseinfo/list`, null, {
params: {size: 10000, buildingId, unitNumber: this.eachUnitNumber}
}).then(res => {
if (res?.data) {
this.list = res.data.records
}
})
},
getHouseDetail(id) {
this.houseId = id
this.$http.post(`app/appcommunityhouseinfo/queryDetailById?id=${id}`).then(res => {
if (res?.data) {
this.houseInfo = res.data
this.show = true
}
})
},
confirmSelect(e) {
this.eachUnitNumber = e[0].value
this.getStatistics()
this.getList()
},
toAdd(id) {
uni.navigateTo({url: `./add?id=${id}`})
}
}
}
</script>
<style lang="scss" scoped>
.detail {
.select-flex {
padding: 20px 40px 40px;
box-sizing: border-box;
line-height: 50px;
display: flex;
justify-content: space-between;
background-color: #fff;
.name {
width: 560px;
word-break: break-all;
font-size: 36px;
font-weight: 800;
color: #333;
}
.btn {
white-space: nowrap;
color: #1365DD;
font-size: 30px;
}
}
.num-content {
width: 100%;
background-color: #fff;
box-sizing: border-box;
display: flex;
.num-item {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 142px;
padding-top: 20px;
box-sizing: border-box;
.content {
width: 120px;
text-align: center;
}
h2 {
font-size: 36px;
font-weight: bold;
color: #333;
line-height: 42px;
}
p {
font-size: 26px;
color: #666;
line-height: 36px;
}
}
}
.line-bg {
width: 100%;
height: 8px;
background: #F1F6F9;
}
.list-content {
background-color: #fff;
display: flex;
justify-content: space-between;
width: 100%;
padding: 48px 2px 0 32px;
box-sizing: border-box;
.left {
// width: calc(100% - 120px);
width: 100%;
overflow: hidden;
.item-content {
width: 33%;
padding-right: 32px;
box-sizing: border-box;
float: left;
}
.item {
width: 100%;
height: 158px;
background: #FAFBFF;
border-radius: 1px;
border: 1px solid #E7E7E7;
box-sizing: border-box;
text-align: center;
font-weight: bold;
margin: 0 32px 32px 0;
h2 {
font-size: 38px;
color: #5088FF;
line-height: 44px;
margin: 14px 0 26px 0;
}
p {
font-size: 32px;
color: #333;
line-height: 44px;
}
}
.item:nth-of-type(2n) {
margin-right: 0;
}
}
.right {
.item {
width: 120px;
height: 60px;
line-height: 60px;
padding: 0 8px;
background: #FAFBFF;
border-radius: 4px;
border: 1px solid #E7E7E7;
box-sizing: border-box;
font-size: 30px;
font-family: DINAlternate-Bold, DINAlternate;
color: #787878;
letter-spacing: -1px;
margin-bottom: 24px;
}
.active {
background: #5088FF;
border-radius: 2px;
border: 1px solid #E7E7E7;
color: #fff;
}
}
}
.popup {
padding-left: 32px;
.bg {
width: 64px;
height: 10px;
background: #CCC;
border-radius: 6px;
margin: 32px 0 32px 344px;
}
.title {
font-size: 36px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 50px;
margin-bottom: 40px;
}
.row-info {
padding-bottom: 48px;
.row-item {
display: inline-block;
width: 33%;
h3 {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #4E75FE;
line-height: 64px;
}
p {
font-size: 28px;
color: #666;
line-height: 42px;
}
}
.left {
width: calc(28% - 70px);
text-align: center;
margin-right: 70px;
box-sizing: border-box;
}
.center {
width: 36%;
text-align: center;
box-sizing: border-box;
position: relative;
.left-line {
position: absolute;
top: 20px;
left: 0;
height: 64px;
border-left: 1px solid #E5E5E5;
}
.right-line {
position: absolute;
top: 20px;
right: 0;
height: 64px;
border-left: 1px solid #E5E5E5;
}
}
.right {
width: calc(33% - 40px);
text-align: center;
margin-left: 40px;
box-sizing: border-box;
}
}
.info-flex {
display: flex;
margin-bottom: 24px;
padding-right: 70px;
box-sizing: border-box;
.item {
flex: 1;
font-size: 28px;
color: #333;
line-height: 30px;
.label {
color: #999;
vertical-align: top;
}
.value {
display: inline-block;
width: calc(100% - 120px);
word-break: break-all;
}
}
}
}
.line-bg {
width: 100%;
height: 30px;
background: #F5F6FA;
}
.pad-t32 {
padding-top: 32px;
}
.mar-t48 {
margin-top: 48px;
}
.pop-btn {
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
font-size: 32px;
font-weight: 500;
color: #FFF;
background: #1365DD;
position: fixed;
bottom: 0;
left: 0;
}
.pad-b112 {
padding-bottom: 112px;
}
}
::v-deep .content {
padding: 0 !important;
}
</style>

View File

@@ -0,0 +1,192 @@
<template>
<div class="list">
<AiTopFixed>
<u-search placeholder="小区名称" :show-action="false" v-model="title" @search="current=1,getList()"/>
</AiTopFixed>
<div class="list-content">
<div class="item" v-for="(item, index) in list" :key="index">
<div class="item-content" @click="toDetail(item.id)">
<p class="title line-two">{{ item.communityName }}</p>
<p class="address">{{ item.cellName }}</p>
<span class="status" :class="'color'+item.locationStatus"
v-text="$dict.getLabel('BuildLocationStatus', item.locationStatus)"/>
</div>
<div class="item-btn" v-if="item.locationStatus != 1" @click="toMap(item.id, item.areaId)">
<span>去定位</span>
</div>
<div class="item-btn" v-if="item.locationStatus == 1" @click="toMap(item.id, item.areaId)">
<span>重新定位</span>
</div>
</div>
<AiEmpty v-if="!list.length"/>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data() {
return {
title: '',
current: 1,
list: [],
isMore: false
}
},
computed: {...mapState(['user'])},
mounted() {
this.$dict.load('BuildLocationStatus').then(() => {
this.getList()
})
uni.$on('updateList', () => {
this.current = 1
this.getList()
})
},
onShow() {
document.title = "楼栋列表"
},
methods: {
getList() {
this.$http.post(`/app/appcommunitybuildinginfo/list`, null, {
params: {
current: this.current,
size: 10,
areaId: this.user.areaId,
communityName: this.title
}
}).then(res => {
if (res?.data) {
if (res.data.records.length < 10) {
this.isMore = true
}
res.data.records.forEach(e => {
e.cellName = `${e.communityName + e.buildingNumber}`
})
if (this.current > 1 && this.current > res.data.pages) {
return
}
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
this.pages = res.data.pages
}
})
},
toDetail(id) {
uni.navigateTo({url: `./detail?id=${id}`})
},
toMap(id, areaId) {
uni.navigateTo({url: `./map?id=${id}&areaId=${areaId}`})
}
},
onReachBottom() {
if (this.isMore) return
this.current++
this.$nextTick(() => {
this.getList()
})
},
}
</script>
<style lang="scss" scoped>
.list {
padding-bottom: 20px;
.list-content {
padding: 32px 32px 0;
background-color: #F5F5F5;
.item {
width: 100%;
background: #FFF;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
border-radius: 8px;
box-sizing: border-box;
position: relative;
overflow: hidden;
margin-bottom: 32px;
.item-content {
padding: 32px 32px 42px 32px;
}
.title {
width: calc(100% - 60px);
word-break: break-all;
font-size: 32px;
color: #333;
line-height: 44px;
}
.address {
width: 100%;
word-break: break-all;
font-size: 28px;
color: #999;
line-height: 40px;
}
.status {
width: 160px;
height: 40px;
line-height: 36px;
font-size: 26px;
font-weight: 500;
position: absolute;
right: -38px;
top: 24px;
-webkit-transform: rotate(90deg);
transform: rotate(45deg);
text-align: center;
}
.color0 {
background: #FFECEF;
color: #f46;
}
.color1 {
background: #EEF5FF;
color: #5A98F2;
}
.item-btn {
width: 100%;
padding: 20px 32px 20px 0;
border-top: 1px solid #eee;
text-align: right;
box-sizing: border-box;
span {
display: inline-block;
width: 160px;
height: 56px;
line-height: 56px;
text-align: center;
border-radius: 28px;
border: 1px solid #1365DD;
font-size: 28px;
color: #1365DD;
}
}
}
.line-two {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
}
}
</style>

View File

@@ -0,0 +1,200 @@
<template>
<div class="map">
<div class="build-btn">
<img src="./components/img/model-icon.png" alt="" @click="toDetail"> 楼栋<br/>模型
</div>
<div class="map-content">
<AiTMap v-if="user.areaId" :areaId="user.areaId" :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"></AiTMap>
</div>
<div class="footer">
<div class="click" @click="isFlag=true">点击定位</div>
<div class="btn" @click="confirm">确认定位</div>
</div>
<!-- <u-popup v-model="show" mode="bottom" border-radius="14">
<div class="popup">
<div class="bg"></div>
<div class="title">恒大城西社区居委会</div>
<p class="address">山东省济南市历城区王舍人街道恒大商业广场蓝天新城</p>
<div class="info-flex">
<span class="label">所属社区</span>
<span class="value">后西一街袁集村</span>
</div>
<div class="info-flex">
<span class="label">所属小区</span>
<span class="value">蓝天新城世纪花园</span>
</div>
<div class="info-flex">
<span class="label">房屋类型</span>
<span class="value">单元(公寓)</span>
</div>
<div class="info-flex">
<span class="label">所属网格</span>
<span class="value">蓝天新城基础网格一</span>
</div>
<div class="info-flex">
<span class="label">网格管理员</span>
<span class="value">林珊珊</span>
</div>
<div class="info-flex">
<span class="label">楼栋长</span>
<span class="value">林珊珊&nbsp;&nbsp;13782951281
<img :src="$cdn + 'common/phone.png'" alt="" @click="call(item)" class="phone-icon">
</span>
</div>
</div>
<div class="popup-btn">查看楼栋模型</div>
</u-popup> -->
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data() {
return {
ops: {},
lib: null,
map: null,
markerLayer: '',
isFlag: false,
latLng: {lat: '', lng: ''},
retryTimes: 0
}
},
computed: {...mapState(['user', ])},
mounted() {
this.initMap()
},
onShow() {
document.title = "以房找人"
},
methods: {
initMap() { //初始化地图
this.$nextTick(() => {
let {lib: TMap, map, retryTimes} = this
if (map) {
map.setZoom(15)
map.on("click", (evt) => {
if (this.markerLayer) {
this.markerLayer.setMap(null);
}
this.markerLayer = new TMap.MultiMarker({
id: 'marker-layer',
map: map
});
if (this.isFlag) {
this.markerLayer.add({
position: evt.latLng
});
this.latLng = {
lat: evt.latLng.lat,
lng: evt.latLng.lng
}
}
});
} else {
if (retryTimes < 5)
setTimeout(() => {
this.retryTimes++
this.initMap()
}, 1000)
}
})
},
confirm() {
if (!this.latLng.lat) {
return this.$u.toast(`未获取到定位信息,无法定位`)
}
let {id} = this.$route.query
this.$http.post(`/app/appcommunitybuildinginfo/updateLocation`, null, {
params: {
id,
lat: this.latLng.lat,
lng: this.latLng.lng,
}
}).then(res => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
},
toDetail() {
uni.navigateTo({url: `./detail?id=${this.$route.query.id}`})
}
}
}
</script>
<style lang="scss" scoped>
uni-page-body {
height: 100%;
}
.map {
height: 100vh;
.build-btn {
width: 80px;
height: 160px;
background: #FFF;
box-shadow: 0 4px 8px 0 rgba(138, 138, 138, 0.5);
border-radius: 8px;
position: fixed;
bottom: 136px;
right: 24px;
z-index: 99999;
padding: 16px 16px 0;
box-sizing: border-box;
font-size: 24px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666;
line-height: 30px;
img {
width: 48px;
height: 48px;
margin-bottom: 8px;
}
}
.map-content {
width: 100%;
height: 100%;
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
z-index: 99999;
display: flex;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
height: 112px;
line-height: 112px;
text-align: center;
.click {
flex: 1;
color: #333;
background-color: #fff;
}
.btn {
flex: 2;
background: #1365DD;
color: #FFF;
}
}
}
</style>

View File

@@ -0,0 +1,281 @@
<template>
<div class="AppEpidemicSituation">
<div class="header">
<img src="./components/img/header.png" alt="" />
<div class="content-info">
<div class="title">
<h2>实时数据统计</h2>
<div>截止{{toadyText}}</div>
</div>
<div class="tab-content">
<div class="tab-item">
<h2 class="color-5AAD6A">{{totalInfo.back1}}</h2>
<p>返乡人数</p>
</div>
<div class="tab-item">
<h2 class="color-4185F5">{{totalInfo.back2}}</h2>
<p>今日新增返乡</p>
</div>
<div class="tab-item">
<h2 class="color-CD413A">{{totalInfo.back3}}</h2>
<p>今日返乡异常</p>
</div>
<div class="tab-item">
<h2 class="color-5AAD6A">{{totalInfo.report1}}</h2>
<p>健康上报人数</p>
</div>
<div class="tab-item">
<h2 class="color-4185F5">{{totalInfo.report2}}</h2>
<p>今日上报人数</p>
</div>
<div class="tab-item">
<h2 class="color-CD413A">{{totalInfo.report3}}</h2>
<p>今日上报异常</p>
</div>
</div>
</div>
</div>
<div class="banner">
<img src="./components/img/fxry.png" alt="" class="mar-r18" @click="toBack"/>
<img src="./components/img/jkjc.png" alt="" @click="toHealth" />
</div>
<div class="echart-content">
<div class="title">返乡数据统计</div>
<div class="echart" id="statistic"></div>
<div class="type-text"><span class="tips bg-32C5FF"></span>新增返乡人数 <span class="tips bg-FFAA44"></span>新增异常人数</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
import echarts from 'echarts'
export default {
name: 'AppEpidemicSituation',
appName: '疫情防控',
data() {
return {
toadyText: '',
totalInfo: {},
echartData: null
}
},
computed: { ...mapState(['user']) },
onShow() {
document.title = '疫情防控'
},
onLoad() {
var date = new Date();
this.toadyText = date.getFullYear() + '-' + date.getMonth()+1 + '-' + date.getDate()
this.getTotal()
},
methods: {
getTotal() {
this.$http.post(`/app/appepidemicbackhomerecord/statisticForQW`).then((res) => {
if (res.code == 0) {
this.totalInfo = res.data.map
var xData = [], yDataBack = [], yDataError = []
for(let key in res.data.fiveTotal){
xData.push(key)
yDataBack.push(res.data.fiveTotal[key])
}
for(let key in res.data.fiveUnusual){
yDataError.push(res.data.fiveUnusual[key])
}
this.chartInit(xData, yDataBack, yDataError)
}
})
},
chartInit(xData, yDataBack, yDataError) {
console.log(xData)
this.echartData = echarts.init(document.getElementById('statistic'))
var option = {
grid: {
left: '6%',
right: '8%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: xData
},
yAxis: {
type: 'value'
},
series: [
{
type: 'line',
data: yDataBack,
lineStyle: {
normal: {
color: '#32c5ff'
}
},
itemStyle : {
normal : {
color:'#32c5ff',
}
}
},
{
type: 'line',
data: yDataError,
lineStyle: {
normal: {
color: '#ffaa44'
}
},
itemStyle : {
normal : {
color:'#ffaa44',
}
}
},
]
};
this.echartData.setOption(option)
},
toHealth(){
uni.navigateTo({
url:`./Health`
})
},
toBack(){
uni.navigateTo({
url:`./BackUserList`
})
},
},
}
</script>
<style lang="scss" scoped>
.AppEpidemicSituation {
.header {
position: relative;
img {
width: 100%;
height: 504px;
}
.content-info {
width: calc(100% - 60px);
background: #fff;
box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.12);
border-radius: 8px;
position: absolute;
top: 368px;
left: 30px;
z-index: 99;
margin-bottom: 32px;
.title {
display: flex;
justify-content: space-between;
padding: 32px 32px 32px 48px;
h2 {
font-size: 36px;
font-family: PingFang-SC-Heavy, PingFang-SC;
font-weight: 800;
color: #333;
line-height: 50px;
}
div {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 36px;
}
}
.tab-content {
padding-bottom: 20px;
.tab-item {
display: inline-block;
width: 33%;
text-align: center;
margin-bottom: 32px;
h2 {
font-size: 52px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
line-height: 60px;
margin-bottom: 10px;
letter-spacing: -4px;
}
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
}
.color-5AAD6A {
color: #5aad6a;
}
.color-4185F5 {
color: #4185f5;
}
.color-CD413A {
color: #cd413a;
}
}
}
}
}
.banner {
width: 100%;
padding: 0 26px;
box-sizing: border-box;
margin: 306px 0 32px 0;
img {
width: calc(50% - 18px);
height: 136px;
}
.mar-r18 {
margin-right: 18px;
}
}
.echart-content {
width: 100%;
background-color: #fff;
padding: 0 32px 38px;
box-sizing: border-box;
.title {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 96px;
margin-bottom: 16px;
}
.echart {
width: 100%;
height: 464px;
background: #f9f9f9;
border-radius: 8px;
margin-bottom: 32px;
}
.type-text {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 40px;
text-align: center;
.tips {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 2px;
margin-right: 20px;
}
.bg-32C5FF {
background: #32c5ff;
}
.bg-FFAA44 {
background: #ffaa44;
margin-left: 80px;
}
}
}
}
</style>

View File

@@ -0,0 +1,258 @@
<template>
<div class="BackUserList">
<AiTopFixed>
<div class="header">
<div class="tab-item">
<h2 style="color:#2C51CE;">{{totalInfo.total}}</h2>
<p>返乡人员</p>
</div>
<div class="tab-item">
<h2 style="color:#5AAD6A;">{{totalInfo.today}}</h2>
<p>今日返乡</p>
</div>
<div class="tab-item">
<h2 style="color:#F5A319;">{{totalInfo.todayUnusual}}</h2>
<p>今日异常</p>
</div>
<div class="tab-item">
<h2 style="color:#CD413A;border-right:0;">{{totalInfo.release}}</h2>
<p>异常处理</p>
</div>
</div>
<div class="search">
<div class="left">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #666">
<u-icon name="map-fill" color="#3192F4" size="20px" style="vertical-align: text-bottom"></u-icon>
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</AiAreaPicker>
</div>
<u-search v-model="name" :clearabled="true" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="getListInit" @clear="name='',getListInit"></u-search>
</div>
<div class="tab-select">
<div class="item" :class="!tabIndex ? 'active' : ''" @click="tabClick(0)">返乡人员<span></span></div>
<div class="item" :class="tabIndex ? 'active' : ''" @click="tabClick(1)">异常人员<span></span></div>
</div>
</AiTopFixed>
<div class="user-list">
<div class="item" @click="toUser(item)" v-for="(item,index) in list" :key="index">
<h2 class="name">{{item.name}}<span class="status" v-if="item.status == 0">有异常</span></h2>
<p class="color-999">{{item.idNumber}}</p>
<p><img src="./components/img/org-icon.png" alt=""><span class="start-name">{{item.startAreaName}}</span></p>
<p><img src="./components/img/blue-icon.png" alt=""><span class="start-name">{{item.arriveAreaName}}</span></p>
<p><img src="./components/img/time-icon.png" alt="">{{item.createTime}}</p>
</div>
</div>
<AiEmpty v-if="!list.length"></AiEmpty>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
areaId: '',
areaName: '',
tabIndex: 0,
current: 1,
list: [],
name: '',
totalInfo: {}
}
},
computed: { ...mapState(['user']) },
onShow() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
document.title = '返乡登记'
this.getList()
this.getTotal()
uni.$on('updateList', () => {
this.getListInit()
})
},
methods: {
areaSelect(e) {
this.areaId =e
this.$nextTick(() => {
this.getListInit()
})
this.getTotal()
},
tabClick(index) {
this.tabIndex = index
this.getListInit()
},
getListInit() {
this.current = 1
this.list = []
this.getList()
},
getList() {
var status = ''
if(this.tabIndex == 1) {
status = 0
}
this.$http.post(`/app/appepidemicbackhomerecord/list?current=${this.current}&size=10&status=${status}&name=${this.name}&arriveAreaId=${this.areaId}`)
.then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
item.idNumber = item.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
})
this.list = this.current > 1 ? [...this.list, ...res.data.records] : res.data.records
}
})
},
getTotal() {
this.$http.post(`/app/appepidemicbackhomerecord/statistic?areaId=${this.areaId}`).then((res) => {
if (res.code == 0) {
this.totalInfo = res.data
}
})
},
toUser(row) {
uni.navigateTo({url: `./UserInfo?id=${row.id}`})
}
},
onReachBottom() {
this.current ++
this.getList()
}
}
</script>
<style lang="scss" scoped>
.BackUserList {
.header{
padding: 54px 32px 48px 32px;
display: flex;
background-color: #fff;
margin-bottom: 4px;
.tab-item{
flex: 1;
text-align: center;
h2{
font-size: 52px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
height: 80px;
margin-bottom: 8px;
letter-spacing: -4px;
border-right: 1px solid #ddd;
line-height: 44px;
}
p{
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
margin-top: -22px;
}
}
.tab-item:nth-last-of-type(1) {
border-right: 0;
}
}
.search{
width: 100%;
height: 112px;
padding: 32px;
box-sizing: border-box;
background: #FFF;
display: flex;
margin-bottom: 8px;
.left{
width: calc(100% - 402px);
}
}
.tab-select{
width: 100%;
height: 96px;
background: #FFF;
display: flex;
margin-bottom: 4px;
.item{
flex: 1;
font-size: 32px;
line-height: 96px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
text-align: center;
}
.active{
color: #135AB8;
position: relative;
span{
position: absolute;
bottom: 0;
left: 50%;
width: 192px;
margin-left: -96px;
border-bottom: 4px solid #135AB8;
}
}
}
.user-list{
.item{
padding: 32px 64px 24px;
background-color: #fff;
margin-bottom: 8px;
.name{
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 8px;
.status{
float: right;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #FF4466;
line-height: 40px;
}
}
p{
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 40px;
margin-bottom: 8px;
img{
width: 32px;
height: 32px;
margin-right: 18px;
vertical-align: top;
}
}
.start-name{
display: inline-block;
width: calc(100% - 50px);
}
.color-999{
margin-bottom: 24px;
color: #999;
}
}
}
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
background-color: #f5f5f5!important;
.content {
padding: 0 !important;
}
}
}
}
</style>

View File

@@ -0,0 +1,365 @@
<template>
<div class="ErrorDetail">
<div class="header">
<div class="name">
{{ userList.name }}<span>{{ userList.phone }}</span
><img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(userList.phone)" class="phone-icon" />
</div>
<p>身份证号</p>
<p class="mar-b8" style="color: #333">{{ userList.idNumber && userList.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1********$2') }}</p>
<p>异常情况</p>
<div v-if="datas.length">
<div v-for="(item, index) in datas" :key="index" style="color: #ff4466">
<span style="color: #666" v-if="item.status == 0">{{ item.checkTime && item.checkTime.substring(0, 10) }}:</span>
<div v-if="item.temperature * 1 >= 37.3">
<span>当前体温</span>
<span style="margin-left: 10px">{{ item.temperature }}</span>
</div>
<div v-if="item.touchInFourteen * 1 !== 0">
<span>14天内是否接触新冠确诊或疑似患者</span>
<span style="margin-left: 10px">
{{ $dict.getLabel('epidemicTouchInFourteen', item.touchInFourteen) }}
</span>
</div>
<div v-if="item.health !== '0'">
<span>当前健康状况</span>
<div class="healths">
<span v-for="(items, index) in item.health && item.health.split(',')" :key="index">
<span v-if="index > 0"> ; </span>
<span>
{{ $dict.getLabel('epidemicRecentHealth', items) }}
</span>
</span>
</div>
</div>
<div v-if="item.checkResult != 0">
<span>核酸检测结果</span>
<span style="margin-left: 10px">
{{ $dict.getLabel('epidemicRecentTestResult', item.checkResult) }}
</span>
</div>
<div v-if="item.healthCode == 2 || item.healthCode == 3 || item.healthCode == 4">
<span>健康码</span>
<span style="margin-left: 10px">
{{ $dict.getLabel('epidemicHealthCode', item.healthCode) }}
</span>
</div>
</div>
</div>
<p style="color: #333" v-else>暂无异常情况</p>
</div>
<div class="info" v-if="data.length">
<div class="title">异常情况记录</div>
<div class="error-list" v-if="data.length">
<div class="itemes" v-for="(item, i) in data" :key="i">
<p>{{ item.content }}</p>
<div>
<span>{{ item.createTime }}</span>
<span class="names">{{ item.createUserName }}</span>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<!-- <div class="bg-line"></div> -->
<div class="footer">
<div class="add" @click="show = true">新增记录</div>
<div class="confirm" @click="cancel">解除异常</div>
</div>
<u-popup v-model="show" mode="bottom">
<div class="textarea">
<u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="异常情况记录" :clearable="false" maxlength="1000" />
<p>字数{{ value.length }}/1000</p>
</div>
<div class="btn">
<span @click="value = ''">清空内容</span>
<span class="confirm" @click="confirm">保存</span>
</div>
</u-popup>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
components: {},
props: {},
data() {
return {
show: false,
value: '',
userList: [],
data: [],
datas: [],
size: 10,
current: 1,
}
},
computed: {
...mapState(['user']),
},
onLoad(o) {
console.log(o)
this.$dict.load('epidemicMemberType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth', 'epidemicHealthCode').then(() => {
if (o) {
this.id = o.id
this.getUser()
this.getRecord()
this.getErrThing()
}
})
},
onShow() {
document.title = '异常情况处理'
},
methods: {
getUser() {
this.$http.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.userList = res.data
}
})
},
// 异常情况
getErrThing() {
this.$http.post(`/app/appepidemichealthreport/list?memberId=${this.id}`).then((res) => {
if (res.code == 0) {
this.datas = res.data.records
}
})
},
// 异常情况记录
getRecord() {
this.$http
.post(`/app/appepidemicunusuallog/list`, null, {
params: {
recordId: this.id,
size: this.size,
current: this.current,
},
})
.then((res) => {
if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
}
})
},
// 新增记录
confirm() {
if (!this.value) {
return this.$u.toast('请输入异常情况')
}
var params = {
content: this.value,
createUserId: this.user.id,
createUserName: this.user.name,
recordId: this.id,
}
this.$http.post('/app/appepidemicunusuallog/addOrUpdate', params).then((res) => {
if (res.code == 0) {
this.$u.toast('新增成功!')
this.show = false
this.value = ''
this.getUser()
this.getRecord()
}
})
},
cancel() {
this.$confirm(`是否解除该条异常信息?`).then(() => {
this.$http.post('/app/appepidemicreportmember/release', { id: this.id }).then((res) => {
if (res.code == 0) {
this.$u.toast('解除成功!')
uni.$emit('updateDetails')
uni.$emit('updateLists')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
})
},
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
},
onReachBottom() {
this.current++
this.getRecord()
},
}
</script>
<style scoped lang="scss">
.ErrorDetail {
height: 100%;
.header {
padding: 32px 48px;
box-sizing: border-box;
background-color: #fff;
margin-bottom: 24px;
.name {
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 16px;
span {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #4181ff;
line-height: 44px;
margin: 0 20px 0 32px;
}
img {
width: 32px;
height: 32px;
vertical-align: middle;
}
}
p {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 42px;
color: #999;
}
.mar-b8 {
margin-bottom: 8px;
}
}
.info {
padding-bottom: 112px;
.title {
padding: 0 32px;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 116px;
background-color: #fff;
}
.error-list {
background-color: #fff !important;
padding-bottom: 24px;
.itemes {
margin: 0 32px;
background: #f4f7fe;
border-radius: 8px;
padding: 24px 24px 18px 24px;
box-sizing: border-box;
margin-bottom: 16px;
span {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #343d65;
line-height: 40px;
word-break: break-all;
margin-bottom: 12px;
}
div {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 34px;
span:last-child {
display: inline-block;
margin-left: 32px;
}
}
}
}
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
background: #fff;
display: flex;
font-size: 36px;
font-family: PingFangSC-Regular, PingFang SC;
.add {
flex: 1;
color: #333;
}
.confirm {
flex: 2;
color: #fff;
background: #1365dd;
}
div {
text-align: center;
}
}
.bg-line {
width: 100%;
height: 130px;
}
.textarea {
margin: 32px 32px 24px;
width: calc(100% - 64px);
padding: 16px;
box-sizing: border-box;
background: #f7f7f7;
border-radius: 8px;
p {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 36px;
text-align: right;
}
}
.btn {
padding: 0 32px 24px;
height: 64px;
display: flex;
justify-content: space-between;
span {
display: inline-block;
line-height: 64px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
}
.confirm {
width: 144px;
text-align: center;
background: #1365dd;
border-radius: 32px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #fff;
}
}
}
</style>

View File

@@ -0,0 +1,272 @@
<template>
<div class="ErrorInfo">
<div class="header">
<div class="name">{{info.name}}<span @click="callPhone(info.phone)">{{info.phone}}</span><img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(info.phone)" class="phone-icon" /></div>
<p>身份证号</p>
<p class="mar-b8" style="color: #333">{{info.idNumber}}</p>
<p>异常情况</p>
<p style="color: #ff4466">
<span>{{info.unusual}}</span>
</p>
</div>
<div class="info" v-if="list.length">
<div class="title">异常情况记录</div>
<div class="error-list">
<div class="item" v-for="(item, index) in list" :key="index">
<p>{{item.content}}</p>
<div>{{item.createTime}}
<span>{{item.createUserName}}</span>
</div>
</div>
</div>
</div>
<div class="bg-line"></div>
<div class="footer">
<div class="add" @click="show = true">新增记录</div>
<div class="confirm" @click="cancel()">解除异常</div>
</div>
<u-popup v-model="show" mode="bottom">
<div class="textarea">
<u-input v-model="value" type="textarea" :height="120" :auto-height="true" placeholder="异常情况记录" :clearable="false" maxlength="1000" />
<p>字数{{value.length}}/1000</p>
</div>
<div class="btn">
<span @click="value=''">清空内容</span>
<span class="confirm" @click="confirm">保存</span>
</div>
</u-popup>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
components: {},
props: {},
data() {
return {
show: false,
value: '',
id: '',
list: [],
info: {}
}
},
computed: {
...mapState(['user']),
},
onShow() {
document.title = '异常情况处理'
},
onLoad(option) {
this.id = option.id
this.$dict.load('epidemicRecentHealth').then(() => {
this.getDetail()
})
this.getList()
},
methods: {
getList() {
this.$http.post(`/app/appepidemicunusuallog/list?recordId=${this.id}`).then((res) => {
if (res.code == 0) {
this.list = res.data.records
}
})
},
getDetail() {
this.$http.post(`/app/appepidemicbackhomerecord/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
res.data.idNumber = res.data.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
this.info = res.data
this.info.health = this.info.health.split(',')
}
})
},
cancel() {
this.$confirm(`是否解除该条异常信息?`).then(() => {
this.$http.post("/app/appepidemicbackhomerecord/release", {id: this.id}).then(res => {
if (res.code == 0) {
this.$u.toast("解除成功!")
uni.$emit('updateDetail')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600);
}
})
})
},
confirm() {
if(!this.value) {
return this.$u.toast('请输入异常情况')
}
var params = {
"content": this.value,
"createUserId": this.user.id,
"createUserName": this.user.name,
"recordId": this.id
}
this.$http.post("/app/appepidemicunusuallog/addOrUpdate", params).then(res => {
if (res.code == 0) {
this.$u.toast("新增成功!")
this.show = false
this.value = ''
this.getList()
}
})
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
},
}
</script>
<style scoped lang="scss">
.ErrorInfo {
height: 100%;
.header {
padding: 32px 48px;
box-sizing: border-box;
background-color: #fff;
margin-bottom: 24px;
.name {
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 16px;
span {
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #4181ff;
line-height: 44px;
margin: 0 20px 0 32px;
}
img {
width: 32px;
height: 32px;
vertical-align: middle;
}
}
p {
font-size: 30px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 42px;
color: #999;
}
.mar-b8 {
margin-bottom: 8px;
}
}
.info {
padding: 0 32px 32px;
background-color: #fff;
.title {
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
line-height: 116px;
}
.error-list {
.item {
width: 100%;
background: #f4f7fe;
border-radius: 8px;
padding: 24px 24px 18px 24px;
box-sizing: border-box;
margin-bottom: 16px;
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #343d65;
line-height: 40px;
word-break: break-all;
margin-bottom: 12px;
}
div {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 34px;
span {
display: inline-block;
margin-left: 32px;
}
}
}
}
}
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 112px;
line-height: 112px;
background: #fff;
display: flex;
font-size: 36px;
font-family: PingFangSC-Regular, PingFang SC;
.add {
flex: 1;
color: #333;
}
.confirm {
flex: 2;
color: #fff;
background: #1365dd;
}
div {
text-align: center;
}
}
.bg-line {
width: 100%;
height: 130px;
}
.textarea {
margin: 32px 32px 24px;
width: calc(100% - 64px);
padding: 16px;
box-sizing: border-box;
background: #f7f7f7;
border-radius: 8px;
p {
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 36px;
text-align: right;
}
}
.btn {
padding: 0 32px 24px;
height: 64px;
display: flex;
justify-content: space-between;
span {
display: inline-block;
line-height: 64px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
}
.confirm {
width: 144px;
text-align: center;
background: #1365dd;
border-radius: 32px;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #fff;
}
}
}
</style>

View File

@@ -0,0 +1,346 @@
<template>
<div class="Health">
<AiTopFixed>
<div class="header">
<div class="tab-item">
<h2 style="color: #2c51ce">{{ userList.total }}</h2>
<p>上报人员</p>
</div>
<div class="tab-item">
<h2 style="color: #5aad6a">{{ userList.today }}</h2>
<p>今日上报</p>
</div>
<div class="tab-item">
<h2 style="color: #f5a319">{{ userList.unReport }}</h2>
<p>今日未报</p>
</div>
<div class="tab-item">
<h2 style="color: #cd413a; border-right: 0">{{ userList.unusual }}</h2>
<p>今日异常</p>
</div>
</div>
<div class="line1"></div>
<div class="middle">
<div class="left">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #666">
<u-icon name="map-fill" color="#3192F4" size="20px" style="vertical-align: text-bottom"></u-icon>
<span style="margin-left: 4px" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="28" style="margin-left: 4px" />
</AiAreaPicker>
</div>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#999" color="#999" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<div class="line2"></div>
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#333" bar-width="192" active-color="#135AB8 " @change="change"></u-tabs>
<div class="line3"></div>
</AiTopFixed>
<div class="bottoms">
<template v-if="data.length">
<div class="templates" v-for="(item, i) in data" :key="i" @click="goDetail(item)">
<img :src="item.avatar" alt="" v-if="item.avatar" />
<img src="./components/img/user-img.png" alt="" v-else />
<div class="rightCont">
<div class="rightContLeft">
<div class="nameLeft">
<div class="nameTop">
<div class="names">{{ item.name }}</div>
<div class="types" v-if="item.status == '0'">异常</div>
</div>
<div class="nameBottom">
<span>上报第</span>
<span class="num">{{ item.diffNum }}</span>
<span></span>
</div>
</div>
<div class="typeRight2" v-if="item.today == '0'">今日未上报</div>
<div class="typeRight1" v-else>今日已上报</div>
</div>
<u-icon name="arrow-right" color="#ccc"></u-icon>
</div>
</div>
</template>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'Health',
components: {},
props: {},
data() {
return {
keyword: '',
areaId: '',
areaName: '',
current: 1,
size: 10,
tabList: [
{
name: '上报人员',
},
{
name: '异常人员',
},
],
currentTabs: 0,
userList: [],
data: [],
}
},
computed: {
...mapState(['user']),
},
watch: {},
onLoad() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
this.getUserList()
uni.$on('updateLists', () => {
this.current = 1
this.getList()
this.getUserList()
})
},
onShow() {
this.areaId = this.user.areaId
document.title = '健康上报'
},
methods: {
getList() {
this.$http
.post('/app/appepidemicreportmember/list', null, {
params: { size: this.size, current: this.current, status: this.currentTabs == 1 ? '0' : '', areaId: this.areaId, name: this.keyword },
})
.then((res) => {
if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.$forceUpdate()
}
})
.catch(() => {
this.$forceUpdate()
})
.finally(() => {
this.$forceUpdate()
})
},
getUserList() {
this.$http.post(`/app/appepidemicreportmember/statistic?areaId=${this.areaId}`).then((res) => {
if (res.code == 0) {
this.userList = res.data
}
})
},
goDetail(item) {
uni.navigateTo({
url: `./HealthDetail?id=${item.id}&diffNum=${item.diffNum}&today=${item.today}`,
})
},
areaSelect(e) {
this.areaId = e
this.getList()
this.getUserList()
},
change(index) {
this.data = []
// this.areaId = this.user.areaId
this.keyword = ''
this.currentTabs = index
this.current = 1
this.getList()
},
handerSearch(e) {
this.keyword = e
this.current = 1
this.getList()
},
handerClear() {
this.keyword = ''
this.current = 1
this.getList()
},
},
onReachBottom() {
this.current++
this.getList()
},
}
</script>
<style scoped lang="scss">
.Health {
height: 100%;
::v-deep .AiTopFixed {
.placeholder {
.content {
padding: 0 !important;
}
}
.fixed {
margin: 0 !important;
.content {
padding: 0 !important;
}
}
}
.header {
padding: 54px 32px 48px 32px;
display: flex;
background-color: #fff;
margin-bottom: 4px;
.tab-item {
flex: 1;
text-align: center;
h2 {
font-size: 52px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
height: 80px;
margin-bottom: 8px;
letter-spacing: -4px;
border-right: 1px solid #ddd;
line-height: 44px;
}
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
margin-top: -22px;
}
}
.tab-item:nth-last-of-type(1) {
border-right: 0;
}
}
.line1 {
height: 4px;
background: #f5f5f5;
}
.middle {
display: flex;
padding: 24px 32px;
.left {
width: 40%;
display: flex;
align-items: center;
img {
width: 48px;
height: 48px;
}
}
.u-search {
margin-bottom: 0 !important;
}
}
.line2 {
height: 8px;
background: #f5f5f5;
}
.line3 {
height: 6px;
background: #f5f5f5;
}
.bottoms {
.templates {
display: flex;
align-items: center;
padding: 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
background: #fff;
img {
width: 128px;
height: 128px;
// border-radius: 50%;
// border: 1px solid #cccccc;
}
.rightCont {
display: flex;
justify-content: space-between;
margin-left: 32px;
width: 100%;
.rightContLeft {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
.nameLeft {
.nameTop {
display: flex;
.names {
font-size: 32px;
font-weight: 500;
color: #333333;
}
.types {
margin-left: 16px;
padding: 4px 16px 8px 16px;
background: #faeceb;
border-radius: 20px;
font-size: 24px;
color: #cd413a;
}
}
.nameBottom {
margin-top: 12px;
font-size: 28px;
color: #999999;
.num {
color: #135ab8;
}
}
}
.typeRight1 {
font-size: 28px;
color: #999999;
}
.typeRight2 {
font-size: 28px;
color: #f5a319;
}
}
}
}
.emptyWrap {
margin-top: 0;
background: #f5f5f5;
}
}
}
</style>

View File

@@ -0,0 +1,269 @@
<template>
<div class="HealthDetail">
<div class="top">
<div class="templates">
<img :src="userList.avatar" alt="" v-if="userList.avatar" />
<img src="./components/img/user-img.png" alt="" v-else />
<div class="rightCont">
<div class="rightContLeft">
<div class="nameLeft">
<div class="nameTop">
<div class="names">{{ userList.name }}</div>
<div class="types" v-if="userList.status == '0'">异常</div>
</div>
<div class="nameBottom">
<span>上报第</span>
<span class="num">{{ diffNum }}</span>
<span></span>
</div>
</div>
</div>
<div class="rightContRight" @click.stop="callPhone(userList.phone)">
<img src="./components/img/phone2@.png" alt="" />
<span class="call">拨打电话</span>
</div>
</div>
</div>
</div>
<div class="middle">
<div class="record">异常情况记录</div>
<template v-if="data.length">
<div class="templatess" v-for="(item, i) in data" :key="i" @click="toUserDetail(item)">
<div class="left">
<div class="recordType recordType1" v-if="item.status == 1">正常</div>
<div class="recordType recordType2" v-if="item.status == 0">异常</div>
</div>
<div class="right">
<div class="times">{{ item.createTime }}</div>
<u-icon name="arrow-right" color="#CCCCCC"></u-icon>
</div>
</div>
</template>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<div class="fixedBtn" @click="toErr" v-if="userList.status == '0' && today == '1'">异常情况处理</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'HealthDetail',
components: {},
props: {},
data() {
return {
data: [],
id: '',
name: '',
userList: [],
diffNum: '',
today: '',
size: 10,
current: 1,
}
},
computed: {
...mapState(['user']),
},
watch: {},
onLoad(o) {
console.log(o)
if (o.id) {
this.name = o.name
this.id = o.id
this.phone = o.phone
this.diffNum = o.diffNum
this.today = o.today
this.getUser()
}
this.getRecord()
uni.$on('updateDetails', () => {
this.getUser()
this.getRecord()
})
},
onShow() {
document.title = '健康上报'
},
methods: {
getUser() {
this.$http.post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
this.userList = res.data
}
})
},
getRecord() {
this.$http
.post(`/app/appepidemichealthreport/list`, null, {
params: {
memberId: this.id,
size: this.size,
current: this.current,
},
})
.then((res) => {
if (res.code == 0) {
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
}
})
},
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
toUserDetail(item) {
uni.navigateTo({
url: `./UserDetail?id=${item.id}&temperature=${item.temperature}&touchInFourteen=${item.touchInFourteen}&health=${item.health}&checkTime=${item.checkTime}&checkResult=${item.checkResult}&checkPhoto=${item.checkPhoto}&status=${item.status}&memberId=${this.id}&vaccine=${item.vaccine}&healthCode=${item.healthCode}&releaseName=${this.userList.releaseName ? this.userList.releaseName : ''}&releaseTime=${this.userList.releaseTime ? this.userList.releaseTime : ''}&statuses=${this.userList.status}`,
})
},
toErr() {
uni.navigateTo({
url: `./ErrorDetail?id=${this.id}`,
})
},
},
onReachBottom() {
this.current++
this.getRecord()
},
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
}
.HealthDetail {
height: 100%;
background: #f5f5f5 !important;
.top {
.templates {
display: flex;
align-items: center;
padding: 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
background: #fff;
img {
width: 128px;
height: 128px;
// border-radius: 50%;
// border: 1px solid #cccccc;
}
.rightCont {
display: flex;
justify-content: space-between;
margin-left: 32px;
width: 100%;
.rightContLeft {
// display: flex;
// justify-content: space-between;
// align-items: center;
// width: 100%;
.nameLeft {
.nameTop {
display: flex;
.names {
font-size: 32px;
font-weight: 500;
color: #333333;
}
.types {
margin-left: 16px;
padding: 4px 16px 8px 16px;
background: #faeceb;
border-radius: 20px;
font-size: 24px;
color: #cd413a;
}
}
.nameBottom {
margin-top: 12px;
font-size: 28px;
color: #999999;
.num {
color: #135ab8;
}
}
}
}
.rightContRight {
display: flex;
flex-direction: column;
align-items: center;
width: 25%;
img {
width: 64px;
height: 64px;
}
.call {
font-size: 24px;
color: #3d94fb;
}
}
}
}
}
.middle {
margin-top: 16px;
background: #fff;
.record {
padding: 26px 0 26px 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
}
.templatess {
display: flex;
justify-content: space-between;
padding: 28px 32px;
box-shadow: inset 0px -1px 0px 0px #dddddd;
.left,
.right {
display: flex;
.recordType {
font-size: 28px;
font-weight: 500;
}
.recordType1 {
color: #5aad6a;
}
.recordType2 {
color: #cd413a;
}
}
}
.emptyWrap {
background: #f5f5f5;
margin-top: 0 !important;
}
}
.fixedBtn {
position: fixed;
bottom: 0;
width: 100%;
padding: 34px 0;
text-align: center;
background: #1365dd;
box-sizing: border-box;
font-size: 32px;
font-weight: 500;
color: #ffffff;
}
}
</style>

View File

@@ -0,0 +1,310 @@
<template>
<div class="UserDetail">
<div class="info">
<div class="title">基本信息</div>
<div class="item-flex">
<div class="label">姓名</div>
<div class="value">{{ data.name }}</div>
</div>
<div class="item-flex">
<div class="label">身份证号</div>
<div class="value">{{ data.idNumber }}</div>
</div>
<div class="item-flex">
<div class="label">联系方式</div>
<div class="value" style="color: #4181ff">
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(data.phone)" class="phone-icon" />
{{ data.phone }}
</div>
</div>
<div class="item-flex">
<div class="label">本地地区</div>
<div class="value">{{ data.areaName }}</div>
</div>
<div class="item-flex">
<div class="label">本地地址</div>
<div class="value">{{ data.address }}</div>
</div>
</div>
<div class="line-bg"></div>
<div class="info">
<div class="title">健康状况</div>
<div class="item-flex">
<div class="label">当前体温</div>
<div class="value temperature" :style="{ color: userList.temperature * 1 >= 37.3 ? '#FF4466' : '#42D784' }">{{ userList.temperature }}</div>
</div>
<div class="item-flex">
<div class="label" style="width: 360px">14天内是否接触新冠确诊或疑似患者</div>
<div class="value" :style="userList.touchInFourteen == 0 ? 'color:#42D784;' : userList.touchInFourteen == 1 ? 'color:#FF4466' : 'color:#4181FF'">{{ $dict.getLabel('epidemicTouchInFourteen', userList.touchInFourteen) }}</div>
</div>
<div class="item-flexs">
<div class="label">当前健康状况</div>
<div class="healths">
<span v-for="(item, index) in userList.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''">
<span v-if="index > 0"> ; </span>
<span>
{{ $dict.getLabel('epidemicRecentHealth', item) }}
</span>
</span>
</div>
</div>
</div>
<div class="line-bg"></div>
<div class="info">
<div class="title">核酸检测信息</div>
<div class="item-flex">
<div class="label">核酸检测日期</div>
<div class="value">{{ userList.checkTime && userList.checkTime.substring(0, 10) }}</div>
</div>
<div class="item-flex">
<div class="label">核酸检测结果</div>
<div class="value" :style="userList.checkResult == 1 ? 'color:#f46;' : 'color:#42D784;'">{{ $dict.getLabel('epidemicRecentTestResult', userList.checkResult) }}</div>
</div>
<div class="item-flex">
<div class="label">健康码</div>
<div class="value" :style="{ color: userList.healthCode == '0' || userList.healthCode == '1' ? '#42D784' : '#FF4466' }">{{ $dict.getLabel('epidemicHealthCode', userList.healthCode) }}</div>
</div>
<div class="item-flex">
<div class="label">已接种试剂</div>
<div class="value">{{ userList.vaccine }}</div>
</div>
<div class="item-flex checkPhotos">
<div style="color: #999">本人健康码截图或核酸检测报告</div>
</div>
<div class="img-list">
<img :src="item.url" alt="" v-for="(item, index) in userList.checkPhoto" :key="index" @click="previewImage(userList.checkPhoto, item.url)" />
</div>
</div>
<div class="line-bg" v-if="userList.status == 0 && userList.statuses == 1"></div>
<div class="info" v-if="userList.status == 0 && userList.statuses == 1">
<div class="title">异常处理情况</div>
<div class="item-record">
<div class="label">异常情况记录</div>
<div class="error-list" v-if="datas.length">
<div class="records" v-for="(item, index) in datas" :key="index">
<p>{{ item.content }}</p>
<div>
<span>{{ item.createTime }}</span>
<span class="names">{{ item.createUserName }}</span>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<div class="item-flex">
<div class="label">异常解除人</div>
<div class="value">{{ userList.releaseName }}</div>
</div>
<div class="item-flex">
<div class="label">异常解除时间</div>
<div class="value">{{ userList.releaseTime && userList.releaseTime.substring(0, 10) }}</div>
</div>
</div>
<div class="line-bg"></div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'UserDetail',
components: {},
props: {},
data() {
return {
id: '',
userList: {},
data: [],
datas: [],
}
},
computed: {
...mapState(['user']),
},
onLoad(o) {
console.log(o)
this.$dict.load('epidemicMemberType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth', 'epidemicHealthCode').then(() => {
this.id = o.id
this.userList = o
this.userList.checkPhoto = JSON.parse(o.checkPhoto)
this.userList.health = o.health.split(',')
this.userList.releaseName = o.releaseName
this.getUser()
if (this.userList.releaseName) {
this.getRecord()
}
})
},
onShow() {
document.title = '健康上报'
},
methods: {
getUser() {
this.$http.post(`/app/appepidemicreportmember/queryDetailById?id=${this.userList.memberId}`).then((res) => {
if (res.code == 0) {
this.data = res.data
this.data.idNumber = res.data.idNumber.replace(/(.{6}).*(.{4})/, '$1********$2')
}
})
},
// 异常情况记录
getRecord() {
this.$http.post(`/app/appepidemicunusuallog/list?recordId=${this.userList.memberId}`).then((res) => {
if (res.code == 0) {
this.datas = res.data.records
}
})
},
callPhone(phone) {
uni.makePhoneCall({ phoneNumber: phone })
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
},
}
</script>
<style scoped lang="scss">
.UserDetail {
background: #f3f6f9;
.info {
background-color: #fff;
padding: 0 32px;
.title {
line-height: 116px;
background: #fff;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
}
.item-flex {
padding: 34px 0;
border-bottom: 1px solid #ddd;
display: flex;
justify-content: space-between;
line-height: 44px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
.label {
width: 206px;
color: #999;
}
.value {
width: calc(100% - 206px);
word-break: break-all;
color: #333;
text-align: right;
.phone-icon {
width: 40px;
height: 40px;
vertical-align: middle;
margin-right: 8px;
}
}
}
.checkPhotos {
border-bottom: none !important;
}
.error-list {
background-color: #fff !important;
padding-bottom: 24px;
margin-top: 10px;
border-bottom: 1px solid #ddd;
.records {
background: #f4f7fe;
border-radius: 8px;
padding: 24px 24px 18px 24px;
box-sizing: border-box;
margin-bottom: 16px;
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #343d65;
line-height: 40px;
word-break: break-all;
margin-bottom: 12px;
}
div {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 34px;
span:last-child {
display: inline-block;
margin-left: 32px;
}
}
}
}
.item-flexs {
display: flex;
justify-content: space-between;
padding: 34px 0;
border-bottom: 1px solid #ddd;
font-size: 32px;
.label {
width: 32%;
color: #999;
}
.healths {
width: 68%;
word-break: break-all;
text-align: right;
}
}
.img-list {
padding-bottom: 48px;
img {
width: 320px;
height: 320px;
}
}
.item-flex:nth-last-of-type(1) {
border-bottom: 0;
}
}
.line-bg {
width: 100%;
height: 24px;
background-color: #f3f6f9;
}
.footer {
width: 100%;
height: 112px;
line-height: 112px;
background: #1365dd;
box-shadow: inset 0px 1px 0px 0px #eeeeee;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #fff;
text-align: center;
}
}
</style>

View File

@@ -0,0 +1,351 @@
<template>
<div class="BackUserList">
<div class="user-list">
<div class="item">
<h2 class="name">{{info.name}}的返乡登记信息</h2>
<p><img src="./components/img/org-icon.png" alt=""><span class="start-name">{{info.startAreaName}}</span></p>
<p><img src="./components/img/blue-icon.png" alt=""><span class="start-name">{{info.arriveAreaName}}</span></p>
<p><img src="./components/img/time-icon.png" alt="">{{info.createTime}}</p>
</div>
</div>
<div class="info">
<div class="title">基本信息</div>
<div class="item-flex">
<div class="label">姓名</div>
<div class="value">{{info.name}}</div>
</div>
<div class="item-flex">
<div class="label">身份证号</div>
<div class="value">{{info.idNumber}}</div>
</div>
<div class="item-flex">
<div class="label">联系方式</div>
<div class="value" style="color:#4181FF;" @click="callPhone(info.phone)">
<img :src="$cdn + 'common/phone.png'" alt="" class="phone-icon" >
{{info.phone}}</div>
</div>
<div class="item-flex">
<div class="label">人员类别</div>
<div class="value" :style="info.type == 0 ? 'color:#42D784;' : 'color:#f46;'">{{$dict.getLabel('epidemicMemberType', info.type)}}</div>
</div>
</div>
<div class="line-bg"></div>
<div class="info">
<div class="title">行程信息</div>
<div class="item-flex">
<div class="label">出行方式</div>
<div class="value">{{$dict.getLabel('epidemicRecentTravel', info.travelType)}}</div>
</div>
<div class="item-flex">
<div class="label">出发时间</div>
<div class="value">{{info.startTime.substring(0, 16)}}</div>
</div>
<div class="item-flex">
<div class="label">出发地区</div>
<div class="value" :style="{color: info.denger == 1 ? '#FF4466' : '#333'}">{{info.startAreaName}}</div>
</div>
<div class="item-flex">
<div class="label">出发地址</div>
<div class="value">{{info.startAddress}}</div>
</div>
<div class="item-flex">
<div class="label">到达时间</div>
<div class="value">{{info.arriveTime.substring(0, 16)}}</div>
</div>
<div class="item-flex">
<div class="label">返乡地区</div>
<div class="value">{{info.arriveAreaName}}</div>
</div>
<div class="item-flex">
<div class="label">返乡地址</div>
<div class="value">{{info.arriveAddress}}</div>
</div>
<div class="item-flex">
<div class="label">行程描述</div>
<div class="value">{{info.description}}</div>
</div>
</div>
<div class="line-bg"></div>
<div class="info">
<div class="title">核酸检测信息</div>
<div class="item-flex">
<div class="label">核酸检测日期</div>
<div class="value">{{info.checkTime}}</div>
</div>
<div class="item-flex">
<div class="label">核酸检测结果</div>
<div class="value" :style="info.checkResult == 1 ? 'color:#f46;' : 'color:#42D784;'">{{$dict.getLabel('epidemicRecentTestResult', info.checkResult)}}</div>
</div>
<div class="item-flex border-none">
<div style="color:#999;">本人健康码截图或核酸检测报告</div>
</div>
<div class="img-list">
<img :src="item.url" alt="" v-for="(item, index) in info.checkPhoto" :key="index" @click="previewImage(info.checkPhoto, item.url)">
</div>
</div>
<div class="line-bg"></div>
<div class="info">
<div class="title">健康状况</div>
<div class="item-flex">
<div class="label">当前体温</div>
<div class="value" :style="info.temperature >= 37.3 ? 'color:#f46;' : ''">{{info.temperature}}</div>
</div>
<div class="item-flex">
<div class="label" style="width:360px;">14天内是否接触新冠确诊或疑似患者</div>
<div class="value" :class="'color-'+info.touchInFourteen">{{$dict.getLabel('epidemicTouchInFourteen', info.touchInFourteen)}}</div>
</div>
<div class="item-flex">
<div class="label">当前健康状况</div>
<div class="value" >
<span v-for="(item, index) in info.health" :key="index" :style="item != 0 ? 'color:#FF4466;' : ''"><span v-if="index>0">;</span>{{$dict.getLabel('epidemicRecentHealth', item)}}</span>
</div>
</div>
</div>
<div class="line-bg"></div>
<div class="info" v-if="list.length">
<div class="title">异常处理情况</div>
<div class="error-list">
<div class="item" v-for="(item, index) in list" :key="index">
<p>{{item.content}}</p>
<div>{{item.createTime}}
<span>{{item.createUserName}}</span>
</div>
</div>
</div>
<div class="item-flex" v-if="info.releaseName">
<div class="label">异常解除人</div>
<div class="value">{{info.releaseName}}</div>
</div>
<div class="item-flex" v-if="info.releaseName">
<div class="label">异常解除时间</div>
<div class="value">{{info.releaseTime}}</div>
</div>
</div>
<div class="line-bg" style="padding-bottom: 56px;"></div>
<div class="footer" @click="toError" v-if="info.status != 1">异常情况处理</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
id: '',
info: {},
list: []
}
},
computed: { ...mapState(['user']) },
onShow() {
document.title = '返乡人员信息'
},
onLoad(option) {
this.$dict.load('epidemicMemberType', 'epidemicRecentTravel', 'epidemicTouchInFourteen', 'epidemicRecentTestResult', 'epidemicRecentHealth').then(() => {
this.id = option.id
this.getDetail()
this.getList()
})
uni.$on('updateDetail', () => {
this.getList()
this.getDetail()
})
},
methods: {
getList() {
this.$http.post(`/app/appepidemicunusuallog/list?recordId=${this.id}`).then((res) => {
if (res.code == 0) {
this.list = res.data.records
}
})
},
getDetail() {
this.$http.post(`/app/appepidemicbackhomerecord/queryDetailById?id=${this.id}`).then((res) => {
if (res.code == 0) {
if(res.data.checkTime) {
res.data.checkTime = res.data.checkTime.substring(0, 10)
}
this.info = res.data
this.info.checkPhoto = JSON.parse(this.info.checkPhoto)
this.info.health = this.info.health.split(',')
this.info.idNumber = res.data.idNumber.replace(/(.{6}).*(.{4})/,"$1********$2")
}
})
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
previewImage(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
toError() {
uni.navigateTo({url: `./ErrorInfo?id=${this.id}`})
}
},
}
</script>
<style lang="scss" scoped>
.BackUserList {
.user-list{
margin-bottom: 24px;
.item{
padding: 32px 64px 24px;
background-color: #fff;
.name{
font-size: 36px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 50px;
margin-bottom: 8px;
.status{
float: right;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #FF4466;
line-height: 40px;
}
}
p{
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 40px;
margin-bottom: 8px;
img{
width: 32px;
height: 32px;
margin-right: 18px;
vertical-align: top;
}
}
.color-999{
margin-bottom: 24px;
color: #999;
}
.start-name{
display: inline-block;
width: calc(100% - 50px);
}
}
}
.info{
background-color: #fff;
padding: 0 32px;
.title{
line-height: 116px;
background: #FFF;
font-size: 38px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
}
.item-flex{
padding: 34px 0;
border-bottom: 1px solid #ddd;
display: flex;
justify-content: space-between;
line-height: 44px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
.label{
width: 206px;
color: #999;
}
.value{
width: calc(100% - 206px);
word-break: break-all;
color: #333;
text-align: right;
.phone-icon{
width: 40px;
height: 40px;
vertical-align: middle;
margin-right: 8px;
}
}
.color-0{
color: #42D784;
}
.color-1{
color: #f46;
}
.color-2{
color: #1365DD;
}
}
.img-list{
padding-bottom: 32px;
img{
width: 320px;
height: 320px;
}
}
.item-flex:nth-last-of-type(1){
border-bottom: 0;
}
.error-list {
.item {
width: 100%;
background: #f4f7fe;
border-radius: 8px;
padding: 24px 24px 18px 24px;
box-sizing: border-box;
margin-bottom: 16px;
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #343d65;
line-height: 40px;
word-break: break-all;
margin-bottom: 12px;
}
div {
font-size: 24px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
line-height: 34px;
span {
display: inline-block;
margin-left: 32px;
}
}
}
}
.text-p{
line-height: 44px;
color: #333;
padding-bottom: 16px;
}
}
.line-bg{
width: 100%;
height: 24px;
background-color: #F3F6F9;
}
.footer{
width: 100%;
height: 112px;
line-height: 112px;
background: #1365DD;
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
text-align: center;
position: fixed;
bottom: 0;
left: 0;
}
.border-none{
border-bottom: 0!important;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,52 @@
<template>
<section class="mainEntry">
<component ref="CurrentEntry" v-if="app" :is="app"/>
<div v-else>
<AiResult tips="读取数据中..." status="loading" btn="返回主页" :btn-tap="back"/>
</div>
</section>
</template>
<script>
import {mapActions} from "vuex";
export default {
name: "mainEntry",
inject: {root: {}},
data() {
return {
app: ""
}
},
methods: {
...mapActions(['agentSign']),
back() {
// uni.reLaunch({url:""})
this.root.goto({path: "/pages/loading"})
},
init(params) {
this.agentSign(params).then(() => {
this.app = params.app || ""
this.$nextTick(() => {
this.$refs.CurrentEntry?.emitShow?.()
})
})
}
},
onLoad(params) {
this.init(params)
},
onShow() {
this.init(this.$route.query)
},
onReachBottom() {
this.$refs.CurrentEntry?.emitReachBottom?.()
}
}
</script>
<style lang="scss" scoped>
.mainEntry {
min-height: 100%;
}
</style>

View File

@@ -0,0 +1,197 @@
<template>
<div class="AppMailList">
<AiTopFixed>
<div class="header-top">
<div>区域选择</div>
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-right" color="#666" size="24" style="margin-left:4px;" />
</AiAreaPicker>
</div>
</AiTopFixed>
<div class="list-content">
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
<div v-for="(letter, index) in indexList" :key="index">
<u-index-anchor :index="letter"/>
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)">
<div class="title">{{item.label}}</div>
<div class="phone-list">
<div class="item-info">
<p>{{item.name}}</p>
<div class="phone">
<span>{{item.type}}</span>{{item.phone}}
</div>
</div>
</div>
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon" >
</div>
</div>
</u-index-list>
</div>
<AiEmpty v-if="!list.length"/>
<!-- <div class="id-list">
<div class="item" v-for="(item, index) in list" :key="index">
<u-index-anchor :index="item.label" />
</div>
</div> -->
<div class="footer-btn" @click="toAddList">我添加的</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: "AppMailList",
appName: "便民通讯录",
inject: {
root: {}
},
data() {
return {
scrollTop: 0,
list: [],
indexList: [],
areaId: '',
areaName: ''
}
},
computed: { ...mapState(['user']) },
mounted() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getList()
uni.$on('updateList', () => {
this.getList()
})
},
onShow() {
document.title = "便民通讯录"
},
methods: {
areaSelect(e) {
this.areaId = e
this.getList()
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
params: {
areaId: this.areaId,
isPublic: 1,
resource: "portal",
size: 999
}
}).then(res => {
if (res.code == 0) {
this.indexList = [...new Set(res.data.records.map(e=>e.nameInitials))];
this.list = res.data.records;
}
})
},
toAddList() {
// this.$emit('change', {
// type: 'MyAddList',
// })
uni.navigateTo({url: `./myAddList`})
},
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
}
}
</script>
<style lang="scss" scoped>
.AppMailList {
::v-deep .fixed{
z-index: 9999;
}
.header-top {
display: flex;
background: #fff;
justify-content: space-between;
align-items: center;
padding-top: 16px;
}
// background-color: #F3F6F9;
.list-content{
padding-bottom: 112px;
// .title{
// padding-left: 48px;
// line-height: 64px;
// font-size: 26px;
// font-family: PingFangSC-Semibold, PingFang SC;
// font-weight: 600;
// color: #999;
// }
.item{
position: relative;
}
.phone-list{
background-color: #fff;
width: 100%;
.item-info{
width: 680px;
padding: 32px 48px;
box-sizing: border-box;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
p{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
word-break: break-all;
margin-bottom: 8px;
width: 100%;
word-break: break-all;
}
.phone{
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 36px;
width: 100%;
word-break: break-all;
span{
display: inline-block;
margin-right: 16px;
color: #999;
}
}
}
}
}
.footer-btn{
width: 100%;
text-align: center;
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0px 1px 0px 0px #EEEEEE;
position: fixed;
bottom: 0;
left: 0;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
z-index: 999;
}
::v-deep .u-index-anchor {
top: 0!important;
}
.phone-icon{
width: 40px;
height: 40px;
vertical-align: sub;
position: absolute;
top: 60px;
right: 64px;
}
}
</style>

View File

@@ -0,0 +1,191 @@
<template>
<div class="add">
<div class="pad-l32">
<div class="item border">
<span class="label"><span class="tips">*</span>名称</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="userInfo.name" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="30" :clearable="false" />
</div>
</div>
<div class="item border">
<span class="label"><span class="tips">*</span>类型</span>
<div class="value">
<u-input type="text" placeholder="请输入" v-model="userInfo.type" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="30" :clearable="false" />
</div>
</div>
<div class="item border">
<span class="label"><span class="tips">*</span>电话</span>
<div class="value">
<u-input type="number" placeholder="请输入" v-model="userInfo.phone" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false" />
</div>
</div>
<div class="item border">
<span class="label"><span class="tips">*</span>是否公开</span>
<div class="value" @click="showSelect=true">
<span v-if="userInfo.isPublic !== ''">{{$dict.getLabel('yesOrNo', userInfo.isPublic)}}</span>
<span v-else class="color-999">请选择</span>
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
</div>
</div>
<div class="item">
<span class="label"><span class="tips">*</span>地区</span>
<div class="value">
<AiAreaPicker :areaId="user.areaId" v-model="userInfo.areaId" :name.sync="userInfo.areaName" @select="areaSelect">
<span class="label" v-if="userInfo.areaName">{{ userInfo.areaName }}</span>
<span v-else class="color-999">请选择</span>
<u-icon name="arrow-right" color="#cccccc" size="14"></u-icon>
</AiAreaPicker>
</div>
</div>
</div>
<div class="footer" @click="submit">
<div class="btn">保存</div>
</div>
<u-select v-model="showSelect" :list="$dict.getDict('yesOrNo')" label-name="dictName" value-name="dictValue" @confirm="confirmSelect"></u-select>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
props: ['params'],
data() {
return {
id: '',
userInfo: {
id: '',
name: '',
phone: '',
type: '',
isPublic: '',
areaId: '',
areaName: ''
},
showSelect: false,
flag: true
}
},
computed: { ...mapState(['user']) },
onLoad(option) {
this.userInfo.areaId = this.user.areaId
this.userInfo.areaName = this.user.areaName
this.$dict.load('yesOrNo').then(() => {
if(option.id) {
this.userInfo.id = option.id
this.getDetail()
}
})
},
onShow() {
document.title = "新增"
},
methods: {
areaSelect(e) {
this.userInfo.areaId = e
},
confirmSelect(e) {
this.userInfo.isPublic = e[0].value
},
getDetail() {
this.$http.post(`/app/appconvenientaddressbook/queryDetailById?id=${this.userInfo.id}`).then(res => {
if (res.code == 0) {
this.userInfo = res.data
}
})
},
submit() {
if(!this.userInfo.name) {
return this.$u.toast('请输入名称')
}
if(!this.userInfo.type) {
return this.$u.toast('请输入类型')
}
if(!this.userInfo.phone) {
return this.$u.toast('请输入电话')
}
if(this.userInfo.isPublic === '') {
return this.$u.toast('请选择是否公开')
}
if(!this.userInfo.areaId) {
return this.$u.toast('请选择地区')
}
if(!this.flag) return
this.$http.post(`/app/appconvenientaddressbook/addOrUpdate`, this.userInfo).then(res => {
if (res.code == 0) {
this.flag = false
this.$u.toast('提交成功')
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
},
}
}
</script>
<style lang="scss" scoped>
.add {
padding-bottom: 112px;
.border{
border-bottom: 1px solid #ddd;
}
.item{
width: 100%;
padding: 40px 32px 40px 0;
background: #FFFFFF;
display: flex;
justify-content: space-between;
font-size: 34px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #666;
line-height: 48px;
box-sizing: border-box;
.color-999{
color: #999;
}
.value{
color: #333;
.u-icon{
margin-left: 16px;
}
}
.tips{
display: inline-block;
width: 16px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #FF4466;
line-height: 44px;
margin-right: 4px;
}
}
.footer{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.btn{
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #3975C6;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
}
.pad-l32{
padding-left: 32px;
background-color: #fff;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@@ -0,0 +1,162 @@
<template>
<div class="list">
<div class="list-content">
<u-index-list :scrollTop="scrollTop" :index-list="indexList">
<div v-for="(letter, index) in indexList" :key="index">
<u-index-anchor :index="letter"/>
<div class="item" v-for="(item, index) in list.filter(e=>e.nameInitials==letter)">
<div class="title">{{item.label}}</div>
<div class="phone-list">
<div class="item-info">
<p>{{item.name}}</p>
<div class="phone">
<span>{{item.type}}</span>{{item.phone}}
</div>
</div>
</div>
<img :src="$cdn + 'common/phone.png'" alt="" @click="callPhone(item.phone)" class="phone-icon" >
</div>
</div>
</u-index-list>
</div>
<AiEmpty v-if="!list.length"/>
<!-- <div class="id-list">
<div class="item" v-for="(item, index) in list" :key="index">
<u-index-anchor :index="item.label" />
</div>
</div> -->
<div class="footer-btn" @click="toAddList">我添加的</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
scrollTop: 0,
list: [],
indexList: []
}
},
computed: { ...mapState(['user']) },
mounted() {
this.getList()
},
onShow() {
document.title = "便民通讯录"
},
methods: {
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
params: {
areaId: this.user.areaId,
isPublic: 1,
resource: "portal",
size: 999
}
}).then(res => {
if (res.code == 0) {
this.indexList = [...new Set(res.data.records.map(e=>e.nameInitials))];
this.list = res.data.records;
}
})
},
toAddList() {
// this.$emit('change', {
// type: 'MyAddList',
// })
uni.navigateTo({url: `./myAddList`})
},
},
onPageScroll(e) {
this.scrollTop = e.scrollTop;
}
}
</script>
<style lang="scss" scoped>
.list {
background-color: #F3F6F9;
.list-content{
padding-bottom: 112px;
// .title{
// padding-left: 48px;
// line-height: 64px;
// font-size: 26px;
// font-family: PingFangSC-Semibold, PingFang SC;
// font-weight: 600;
// color: #999;
// }
.item{
position: relative;
}
.phone-list{
background-color: #fff;
width: 100%;
.item-info{
width: 680px;
padding: 32px 48px;
box-sizing: border-box;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.02);
p{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
word-break: break-all;
margin-bottom: 8px;
width: 100%;
word-break: break-all;
}
.phone{
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 36px;
width: 100%;
word-break: break-all;
span{
display: inline-block;
margin-right: 16px;
color: #999;
}
}
}
}
}
.footer-btn{
width: 100%;
text-align: center;
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0px 1px 0px 0px #EEEEEE;
position: fixed;
bottom: 0;
left: 0;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
z-index: 999;
}
::v-deep .u-index-anchor {
top: 0!important;
}
.phone-icon{
width: 40px;
height: 40px;
vertical-align: sub;
position: absolute;
top: 60px;
right: 64px;
}
}
</style>

View File

@@ -0,0 +1,167 @@
<template>
<div class="myAddList">
<div class="list-content" v-if="list.length">
<div class="item-info" v-for="(item, index) in list" :key="index">
<div class="left">
<p>{{item.name}}</p>
<div class="phone">
<span>{{item.type}}</span>{{item.phone}}
</div>
</div>
<div class="right">
<img src="./img/edit-icon.png" alt="" @click="edit(item.id)">
<img src="./img/del-icon.png" alt="" @click="del(item)">
</div>
</div>
</div>
<div class="empty" v-else>
<img src="./img/empty.png" alt="">
<p>您还未添加便民通讯录<br/>点击<span>新增按钮</span>试试吧</p>
</div>
<div class="footer-btn" @click="edit('')">新增</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
list: [],
}
},
computed: { ...mapState(['user']) },
mounted() {
this.getList()
uni.$on('updateList', () => {
this.getList()
})
},
onShow() {
document.title = "便民通讯录"
},
methods: {
getList() {
this.$http.post(`/app/appconvenientaddressbook/list`, null, {
params: {
areaId: this.user.areaId,
createUserId: this.user.id
}
}).then(res => {
if (res.code == 0) {
this.list = res.data.records
}
})
},
edit(id) {
// this.$emit('change', {
// type: 'Add',
// params: {
// id: id,
// }
// })
uni.navigateTo({url: `./add?id=${id}`})
},
del(item) {
this.$confirm("是否确认删除该发布信息?").then(() => {
this.$http.post("/app/appconvenientaddressbook/delete", null, {
params: {ids: item.id}
}).then(res => {
if (res?.code == 0) {
this.$u.toast("删除成功!")
this.getList()
}
})
})
},
},
}
</script>
<style lang="scss" scoped>
.myAddList {
height: 100%;
background-color: #F3F6F9;
.list-content{
padding-bottom: 112px;
.item-info{
width: 100%;
padding: 32px 48px;
box-sizing: border-box;
background-color: #fff;
margin-bottom: 4px;
p{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
word-break: break-all;
margin-bottom: 8px;
}
.phone{
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 36px;
span{
display: inline-block;
margin-right: 16px;
color: #999;
}
}
.left{
display: inline-block;
width: calc(100% - 176px);
}
.right{
display: inline-block;
width: 176px;
img{
width: 56px;
height: 56px;
margin-left: 32px;
vertical-align: super;
}
}
}
}
.empty{
height: 100%;
background-color: #fff;
img{
width: 282px;
height: 306px;
margin: 168px 0 0 234px;
}
p{
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 44px;
span{
color: #467DFE;
}
}
}
.footer-btn{
width: 100%;
text-align: center;
height: 112px;
line-height: 112px;
background: #3975C6;
box-shadow: 0px 1px 0px 0px #EEEEEE;
position: fixed;
bottom: 0;
left: 0;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
z-index: 999;
}
}
</style>

View File

@@ -0,0 +1,825 @@
<template>
<div class="AppResidentFile">
<div class="currentTabBar0" v-if="currentTabBar == 0">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
<div class="peopleGroup" v-if="currentTabs == 0">
<div class="topcard">
<div class="cards">
<div class="items">
<span class="items1">{{ groupSum }}</span>
<span>群聊总数</span>
</div>
<div class="items">
<span class="items2">{{ todayList1.total }}</span>
<span>群成员总数</span>
</div>
<div class="items">
<span class="items3">{{ todayList1.increase }}</span>
<span>今日入群</span>
</div>
<div class="items">
<span class="items4">{{ todayList1.decrease }}</span>
<span>今日退群</span>
</div>
</div>
</div>
<div class="echartes" id="echarts1">
<div class="echartss"></div>
</div>
</div>
<div class="people" v-if="currentTabs == 1">
<div class="topcard">
<div class="cards">
<div class="items">
<span class="items1">{{ todayList2.total }}</span>
<span>居民总数</span>
</div>
<div class="items">
<span class="items3">{{ todayList2.increase }}</span>
<span>今日新增</span>
</div>
<div class="items">
<span class="items4">{{ todayList2.decrease }}</span>
<span>今日流失</span>
</div>
</div>
</div>
<div class="echartes" id="echarts2">
<div class="echartss"></div>
</div>
</div>
</div>
<div class="currentTabBar1" v-if="currentTabBar == 1">
<AiTopFixed>
<u-search 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="mainPane">
<AiCell v-for="item in data" :key="item.id" @click.native="showResident(item)">
<template #label>
<AiImage :src="item.avatar" preview />
</template>
<div class="card wrap start" flex>
<b>{{ item.name }}</b>
<div flex class="tag" v-for="(tag, j) in item.tags" :key="j">{{ tag.tagName }}</div>
<div class="realName" shrink v-html="`真实姓名:${item.realName || '-'}`" />
</div>
</AiCell>
</div>
</div>
<div class="currentTabBar2" v-if="currentTabBar == 2">
<AiTopFixed>
<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="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>
<!-- <u-tabbar v-model="currentTabBar" :list="lists" @change="changeTab" active-color="#3267F0" inactive-color="#C4CAD4" class="u-tabbar"></u-tabbar> -->
<div class="tabs">
<div class="item" @click="changeTab(index)" v-for="(item, index) in lists" :key="index">
<img :src="currentTabBar == index ? item.selectedIconPath : item.iconPath" alt="" />
<p :class="currentTabBar == index ? 'color-3267F0' : ''">{{ item.text }}</p>
</div>
</div>
</div>
</template>
<script>
import echarts from 'echarts'
import { mapState } from 'vuex'
export default {
name: 'AppResidentFile',
appName: '居民信息管理',
components: {},
props: {},
data() {
return {
lists: [
{
iconPath: 'http://respub.sinoecare.net/20211227/1n-20211227162529.png',
selectedIconPath: 'http://respub.sinoecare.net/20211227/1h-20211227164832.png',
text: '统计分析',
customIcon: false,
},
{
iconPath: 'http://respub.sinoecare.net/20211227/2n-20211227164853.png',
selectedIconPath: 'http://respub.sinoecare.net/20211227/2h-20211227164906.png',
text: '居民列表',
customIcon: false,
},
{
iconPath: 'http://respub.sinoecare.net/20211227/3n-20211227164927.png',
selectedIconPath: 'http://respub.sinoecare.net/20211227/3h-20211227165003.png',
text: '居民群列表',
customIcon: false,
},
],
currentTabBar: 0,
currentTabs: 0,
tabList: [
{
name: '居民群统计',
},
{
name: '居民统计',
},
],
Echarts1: null,
Echarts2: null,
areaId: '',
current: 1,
keyword: '',
data: [],
search: { name: '' },
list: [],
weekList: [],
groupSum: '',
todayList1: [],
todayList2: [],
counts1: '',
counts2: '',
page2: { current: 1, size: 10, total: 0 },
search2: { name: '' },
page1: { current: 1, size: 10, total: 0 },
search1: { name: '' },
}
},
computed: {
...mapState(['user', 'global']),
},
watch: {},
onLoad() {
document.title = '居民信息管理'
this.getEchart1()
this.areaId = this.user.areaId
},
mounted() {
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
},
methods: {
// 居民列表
getList() {
this.$http
.post('/app/wxcp/wxcustomer/list', null, {
params: { ...this.page1, ...this.search, type: 1 },
})
.then((res) => {
if (res?.data) {
if (this.page1.current > 1) {
this.data = [...this.data, ...res.data.records]
} else this.data = res.data.records
this.page1.total = res.data.total
}
})
},
// reachBottom() {
// if (this.page1.total > this.list.length) {
// this.page1.current++
// this.getList()
// }
// },
showResident({ id }) {
id &&
uni.navigateTo({
url: './resident?id=' + id,
})
},
// 居民群列表
getList2() {
this.$http
.post('/app/wxcp/wxgroup/list', null, {
params: { ...this.page2, ...this.search },
})
.then((res) => {
if (res?.data) {
let meta = res.data.records?.map((e) => ({
...e,
avatar: e?.avatar || this.$cdn + 'groupAvatar.png',
}))
if (this.page2.current > 1) {
this.list = [...this.list, ...meta]
} else this.list = meta
this.page2.total = res.data.total
}
})
},
// reachBottom() {
// if (this.page2.total > this.list.length) {
// this.page2.current = this.page2.current + 1
// this.getList2()
// }
// },
toGroupList(item) {
uni.navigateTo({
url: `./GroupList?id=${item.id}`,
})
},
// 居民群统计
getEchart1() {
this.$http.post(`/app/wxcp/wxgroup/groupStatistic`).then((res) => {
if (res.code === 0) {
this.weekList = res.data.list
this.initEcharts1(this.weekList)
this.groupSum = res.data.groupSum
this.todayList1 = res.data.today
}
})
},
// 居民统计
getEchart2() {
this.$http.post(`/app/wxcp/wxcustomerlog/customerStatistic?areaId=${this.user.areaId}`).then((res) => {
if (res.code === 0) {
this.initEcharts2(res.data.list)
this.todayList2 = res.data.today
}
})
},
initEcharts1(data) {
var option = {
legend: {
data: ['群成员总数', '入群人数', '退群人数'],
y: 'bottom',
},
color: ['#4A86FD', '#32C5FF', '#FFAA44'],
tooltip: {
trigger: 'axis',
},
grid: {
top: '9%',
left: '6%',
right: '8%',
bottom: '9%',
containLabel: true,
},
xAxis: {
type: 'category',
data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)),
axisLine: {
show: true,
lineStyle: { color: '#666' },
},
axisLabel: {
show: true,
interval: 0,
},
axisTick: {
show: false,
},
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#D8DDE6',
},
},
axisLabel: {
show: true,
interval: 0,
},
axisTick: {
show: false,
},
},
series: [
{
lineStyle: {
normal: {
lineStyle: {
color: '#4A86FD',
},
},
},
color: '#4A86FD',
name: '群成员总数',
type: 'line',
stack: 'Total',
data: Object.values(data).map((e) => e.total),
},
{
lineStyle: {
normal: {
lineStyle: {
color: '#32C5FF',
},
},
},
color: '#32C5FF',
name: '入群人数',
type: 'line',
stack: 'Total',
data: Object.values(data).map((e) => e.increase),
},
{
lineStyle: {
normal: {
lineStyle: {
color: '#FFAA44',
},
},
},
color: '#FFAA44',
name: '退群人数',
type: 'line',
stack: 'Total',
data: Object.values(data).map((e) => e.decrease),
},
],
}
option && this.Echarts1.setOption(option)
},
initEcharts2(data) {
var options = {
legend: {
data: ['居民总数', '新增居民数', '流失居民数'],
y: 'bottom',
},
color: ['#4A86FD', '#32C5FF', '#FFAA44'],
tooltip: {
trigger: 'axis',
},
grid: {
top: '9%',
left: '6%',
right: '8%',
bottom: '9%',
containLabel: true,
},
xAxis: {
type: 'category',
data: Object.keys(data).map((e) => e.substring(e.length - 5, e.length)),
axisLine: {
show: true,
lineStyle: { color: '#666' },
},
axisLabel: {
show: true,
interval: 0,
},
axisTick: {
show: false,
},
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#D8DDE6',
},
},
axisLabel: {
show: true,
interval: 0,
},
axisTick: {
show: false,
},
},
series: [
{
lineStyle: {
normal: {
lineStyle: {
color: '#4A86FD',
},
},
},
color: '#4A86FD',
name: '居民总数',
type: 'line',
stack: 'Total',
data: Object.values(data).map((e) => e.total),
},
{
lineStyle: {
normal: {
lineStyle: {
color: '#32C5FF',
},
},
},
color: '#32C5FF',
name: '新增居民数',
type: 'line',
stack: 'Total',
data: Object.values(data).map((e) => e.increase),
},
{
lineStyle: {
normal: {
lineStyle: {
color: '#FFAA44',
},
},
},
color: '#FFAA44',
name: '流失居民数',
type: 'line',
stack: 'Total',
data: Object.values(data).map((e) => e.decrease),
},
],
}
if (this.Echarts2) {
options && this.Echarts2.setOption(options)
}
},
changeTab(e) {
this.currentTabBar = e
if (this.currentTabBar == 0) {
this.getList()
this.$nextTick(() => {
if (this.currentTabs == 0) {
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
this.getEchart1()
}
if (this.currentTabs == 1) {
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
this.getEchart2()
}
})
}
if (this.currentTabBar == 1) {
this.page1.current == 1
this.getList()
}
if (this.currentTabBar == 2) {
this.page2.current == 1
this.getList2()
}
},
change(index) {
this.currentTabs = index
this.$nextTick(() => {
if (index == 0) {
this.Echarts1 = echarts.init(document.getElementById('echarts1'))
this.getEchart1()
} else {
this.Echarts2 = echarts.init(document.getElementById('echarts2'))
this.getEchart2()
}
})
},
},
onReachBottom() {
if (this.currentTabBar == 1) {
this.page1.current++
this.getList()
}
if (this.currentTabBar == 2) {
this.page2.current++
this.getList2()
}
},
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
}
.AppResidentFile {
height: 100%;
.currentTabBar0 {
padding-bottom: 98px;
.peopleGroup,
.people {
.topcard {
position: relative;
background: url(http://respub.sinoecare.net/20211221/4-20211221095551.png) no-repeat;
background-size: 100% 100%;
height: 320px;
.cards {
box-sizing: border-box;
position: absolute;
bottom: -35px;
width: 92%;
box-sizing: border-box;
margin: 0 32px;
height: 232px;
background: #ffffff;
border-radius: 8px;
z-index: 999;
display: flex;
justify-content: space-around;
align-items: center;
.items {
display: flex;
flex-direction: column;
align-items: center;
span {
font-size: 30px;
font-weight: 500;
color: #999999;
}
.items1 {
font-size: 40px;
font-weight: bold;
color: #354fc7;
}
.items2 {
font-size: 40px;
font-weight: bold;
color: #868686;
}
.items3 {
font-size: 40px;
font-weight: bold;
color: #5fba95;
}
.items4 {
font-size: 40px;
font-weight: bold;
color: #f09535;
}
}
}
}
.echartes {
margin-top: 64px;
padding-bottom: 20px;
height: 616px;
background: #fff;
box-sizing: border-box;
.echartss {
margin: 0 32px;
height: 100%;
padding-top: 16px;
box-sizing: border-box;
}
}
}
}
.currentTabBar1 {
height: 100%;
padding-bottom: 98px;
background: #fff;
::v-deep .AiTopFixed {
b.title {
color: #333;
font-size: 32px;
& > i {
color: #267fce;
font-style: normal;
margin: 0 4px;
}
}
}
::v-deep .mainPane {
background: #fff;
padding: 0 32px 88px;
.AiCell {
flex-shrink: 0;
justify-content: flex-start;
.content {
flex: 1;
min-width: 0;
max-width: unset;
border-bottom: 1px solid rgba(221, 221, 221, 1);
min-height: 160px;
}
}
.card {
text-align: left;
b {
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 36px;
}
.tag {
justify-content: center;
background: #f3f4f7;
border-radius: 4px;
padding: 0 16px;
font-size: 28px;
font-weight: 400;
color: #333;
margin-left: 16px;
margin-bottom: 16px;
height: 56px;
}
.realName {
width: 100%;
margin-top: 8px;
font-size: 28px;
font-weight: 400;
color: #999;
}
}
.AiImage {
margin-right: 24px;
image {
width: 112px;
height: 112px;
}
}
}
}
.currentTabBar2 {
padding-bottom: 98px;
::v-deep .AiTopFixed {
b.title {
color: #333;
font-size: 32px;
& > i {
color: #267fce;
font-style: normal;
margin: 0 4px;
}
}
}
::v-deep .mainPane {
background: #fff;
padding: 0 32px;
.AiCell {
align-items: center;
height: 230px;
justify-content: flex-start;
.content {
flex: 1;
min-width: 0;
height: 100%;
max-width: unset;
border-bottom: 1px solid rgba(221, 221, 221, 1);
}
}
.card {
height: 100%;
justify-content: center;
b {
font-size: 36px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.tag {
justify-content: center;
background: #f3f4f7;
border-radius: 4px;
padding: 0 16px;
font-size: 28px;
font-weight: 400;
color: #333;
margin-left: 16px;
height: 56px;
}
.groupName {
width: 100%;
text-align: left;
}
.owner,
.trends {
margin-top: 8px;
font-size: 28px;
font-weight: 400;
color: #999;
}
.personCount {
flex-shrink: 0;
font-size: 30px;
font-weight: 400;
color: #666;
}
.trends {
* + * {
margin-left: 24px;
}
em {
font-style: normal;
color: #5fba95;
}
p {
color: #f09535;
}
}
}
.AiImage {
margin-right: 24px;
image {
width: 112px;
height: 112px;
}
}
}
}
.tabs {
width: 100%;
height: 98px;
background: #fff;
border-top: 1px solid #ddd;
position: fixed;
bottom: 0;
left: 0;
display: flex;
.item {
flex: 1;
text-align: center;
img {
width: 56px;
height: 56px;
margin-top: 8px;
}
p {
font-size: 22px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #c4cad4;
line-height: 8px;
}
.color-3267F0 {
color: #3267f0;
}
}
}
}
</style>

View File

@@ -0,0 +1,325 @@
<template>
<div class="group-resident">
<template v-if="!showTagManage">
<AiTopFixed>
<div class="card">
<header>
<u-avatar mode="square" :src="$cdn + 'groupAvatar.png'" :size="112"></u-avatar>
{{ detail.name }}
</header>
<u-grid :col="2" :border="false">
<u-grid-item>
<label>建群日期</label>
<label v-if="detail.createTime">{{ detail.createTime.split(' ')[0] }}</label>
</u-grid-item>
<u-grid-item>
<label>成员总数</label>
<label v-if="isToday">{{ detail.statistic.today.total }}</label>
</u-grid-item>
<u-grid-item>
<label>今日入群</label>
<label v-if="isToday">{{ detail.statistic.today.increase }}</label>
</u-grid-item>
<u-grid-item>
<label>今日退群</label>
<label v-if="isToday">{{ detail.statistic.today.decrease }}</label>
</u-grid-item>
<!-- <u-grid-item>-->
<!-- <label>今日活跃人数</label>-->
<!-- <label>{{item.value}}</label>-->
<!-- </u-grid-item>-->
</u-grid>
<p class="statistics">
<span>成员性别</span>
<label>男性</label>
<b>{{ detail.man }}</b>
<label>女性</label>
<b>{{ detail.woman }}</b>
<label>未知</label>
<b>{{ detail.unknown }}</b>
</p>
</div>
</AiTopFixed>
<div class="card">
<AiCell title label="群标签">
<u-icon label="添加" size="38" name="iconAdd" custom-prefix="iconfont" color="#1365DD" label-color="#1365DD" @tap="showTagManage = true" />
</AiCell>
<AiCell top-label v-for="(op, name) in tagsList" :label="name" :key="name">
<u-row>
<div class="tag" v-for="(tag, j) in op" :key="j">{{ tag }}</div>
</u-row>
</AiCell>
</div>
<div class="card">
<AiCell title label="群成员"></AiCell>
<div class="wrap">
<div class="item" v-for="(item, index) in detail.groupUserList" :key="index" @click="handleWechat(item)">
<u-avatar mode="square" :src="item.avatar"></u-avatar>
<div class="info">
<div class="left">
<p>
{{ item.memberName }}
<b v-if="item.customerType == 2" style="color: #3c7fc8">@{{ item.corpName }}</b>
<b v-if="item.customerType == 1" style="color: #2ea222">@微信</b>
</p>
<p>真实姓名{{ item.realName }}</p>
</div>
<span v-if="item.userId == detail.owner">群主</span>
</div>
</div>
</div>
</div>
</template>
<TagManage v-if="showTagManage" />
</div>
</template>
<script>
import { mapActions } from 'vuex'
import TagManage from './tagManage'
export default {
name: 'GroupList',
components: {
TagManage,
},
props: {},
provide() {
return {
top: this,
}
},
data() {
return {
id: '',
detail: {},
groupId: null,
showTagManage: false,
}
},
onShow() {
document.title = '添加标签'
},
computed: {
tagsList() {
let obj = {}
this.detail?.tagList?.map((e) => {
if (e?.groupName) {
if (obj?.[e.groupName]) {
obj[e.groupName].push(e.tagName)
} else {
obj[e.groupName] = [e.tagName]
}
}
})
return obj
},
isToday() {
return !!this.detail?.statistic?.today
},
isNormal() {
return !!this.id
},
},
watch: {},
onLoad(o) {
this.id = o.id
this.getContact()
},
onShow() {},
methods: {
...mapActions(['injectJWeixin', 'wxInvoke']),
getContact() {
if (this.isNormal) {
this.groupId = this.id
this.getGroup(this.id)
} else
this.injectJWeixin('getCurExternalChat').then(() => {
this.wxInvoke([
'getCurExternalChat',
{},
(res) => {
if (res?.err_msg == 'getCurExternalChat:ok') {
this.groupId = res.chatId
this.getGroup(res.chatId)
}
},
])
})
},
getGroup(id) {
this.$http
.post('/app/wxcp/wxgroup/getDetail', null, {
params: { id },
})
.then((res) => {
if (res?.data) {
this.detail = res.data
}
})
},
handleWechat({ userId, type }) {
this.injectJWeixin('openUserProfile').then(() => {
this.wxInvoke([
'openUserProfile',
{
type,
userid: userId,
},
() => 0,
])
})
},
},
}
</script>
<style scoped lang="scss">
.group-resident {
width: 100%;
min-height: 100%;
background-color: #f5f5f5;
display: flex;
flex-direction: column;
::v-deep .AiTopFixed {
& > .card {
margin-top: 0;
}
}
::v-deep .card {
background-color: #ffffff;
padding: 16px 32px;
box-sizing: border-box;
margin-top: 16px;
header {
height: 192px;
display: flex;
align-items: center;
font-size: 36px;
font-weight: 600;
color: #333333;
.u-avatar {
margin-right: 24px;
}
}
::v-deep .u-grid-item-box {
box-sizing: border-box;
padding: 16px !important;
.uni-label-pointer {
width: 100%;
line-height: 40px;
color: #999999;
}
uni-label:last-child {
margin-top: 16px;
font-weight: 600;
color: #333333;
}
}
.statistics {
height: 96px;
display: flex;
align-items: center;
border-top: 1px solid #eee;
margin-top: 16px;
span {
font-size: 28px;
color: #999999;
}
label + b {
font-size: 28px;
color: #333333;
}
b {
color: #1365dd !important;
margin: 0 32px 0 16px;
}
}
& > section:first-child {
height: 90px !important;
display: flex;
align-items: center;
}
.wrap {
margin-bottom: 20px;
.item {
height: 176px;
display: flex;
align-items: center;
.info {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: space-between;
margin-left: 24px;
border-bottom: 1px solid #eee;
.left {
font-size: 36px;
font-weight: 600;
color: #333333;
b {
font-size: 28px;
font-weight: 400;
color: #3c7fc8;
margin-left: 16px;
}
p:last-child {
font-size: 28px;
font-weight: 400;
color: #999999;
margin-top: 8px;
}
}
span {
width: 88px;
height: 56px;
text-align: center;
background: rgba(19, 101, 221, 0.1);
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
border-radius: 4px;
font-size: 28px;
font-weight: 400;
color: #1365dd;
line-height: 56px;
}
}
}
}
}
::v-deep .tag {
height: 56px;
line-height: 56px;
background: #f3f4f7;
border-radius: 6px;
padding: 8px 16px;
margin-right: 16px;
margin-bottom: 16px;
overflow: hidden;
cursor: default;
}
}
</style>

View File

@@ -0,0 +1,138 @@
<template>
<section class="document" v-if="isShow">
<div class="card">
<div class="info">
<u-image border-radius="4" :src="top.detail.avatar" width="118" height="118" />
<div class="fill">
<b>{{ top.detail.realName || top.detail.name }}</b>
<u-row>
<span class="idNumber" v-html="IDObj.id" />
<a @tap="showID = !showID">{{ IDObj.btn }}</a>
</u-row>
</div>
</div>
<AiCell label="性别">{{ $dict.getLabel('sex', resident.sex) || '-' }}</AiCell>
<AiCell label="出生日期">{{ resident.birthDate }}</AiCell>
<AiCell label="年龄">{{ resident.age }}</AiCell>
<AiCell label="籍贯">{{ resident.birthplaceAreaName }}</AiCell>
<AiCell label="民族">{{ $dict.getLabel('nation', resident.nation) || '-' }}</AiCell>
<AiCell label="文化程度">{{ $dict.getLabel('education', resident.education) || '-' }}</AiCell>
<AiCell label="兵役状况">{{ $dict.getLabel('militaryStatus', resident.militaryStatus) || '-' }}</AiCell>
<AiCell label="政治面貌">{{ $dict.getLabel('politicsStatus', resident.politicsStatus) || '-' }}</AiCell>
<AiCell label="职业">{{ $dict.getLabel('job', resident.job) || '-' }}</AiCell>
<AiCell label="宗教信仰">{{ $dict.getLabel('faithType', resident.faithType) || '-' }}</AiCell>
</div>
<div class="card">
<AiCell title label="联络信息" />
<AiCell label="联系方式">{{ resident.phone }}</AiCell>
<AiCell label="现住址">{{ resident.currentAreaName + resident.currentAddress }}</AiCell>
</div>
<div class="card">
<AiCell title label="家庭信息" />
<AiCell label="是否户主">{{ $dict.getLabel('householdName', resident.householdName) || '-' }}</AiCell>
<AiCell label="与户主关系">{{ $dict.getLabel('householdRelation', resident.householdRelation) || '-' }}</AiCell>
<AiCell label="现住址">{{ resident.householdAreaName + resident.householdAddress }}</AiCell>
</div>
<div class="card">
<AiCell title label="家庭成员" />
<AiTable :data="family" :colConfigs="colConfigs" />
</div>
</section>
</template>
<script>
export default {
name: 'document',
inject: ['top'],
computed: {
IDObj() {
return this.showID
? {
id: this.resident?.idNumber,
btn: '隐藏',
}
: {
id: this.resident?.idNumber?.replace(/(\d{10}).+/g, '$1******'),
btn: '显示',
}
},
colConfigs() {
return [
{ label: '与户主关系', prop: 'householdRelation', width: '160rpx', dict: 'householdRelation' },
{ label: '姓名', prop: 'name', width: '120rpx' },
{ label: '性别', prop: 'sex', dict: 'sex' },
{ label: '年龄', prop: 'age' },
{ label: '身份证号', prop: 'idNumber', width: '320rpx' },
]
},
resident() {
let obj = {}
Object.keys(this.top.detail?.residentInfo?.resident || {}).map((e) => {
obj[e] = this.top.detail?.residentInfo?.resident[e] || ''
})
return obj
},
family() {
return this.top.detail?.residentInfo?.family?.map((e) => ({ ...e, householdRelation: e.householdRelation || '户主' }))
},
},
data() {
return {
showID: false,
isShow: false,
familyList: [],
}
},
created() {
this.$dict.load('sex', 'nation', 'education', 'job', 'faithType', 'politicsStatus', 'militaryStatus', 'householdRelation', 'householdName').then(() => {
this.isShow = true
})
// console.log('居民档案性别(无字典)', this.resident.sex)
// console.log('居民档案性别(有字典)', this.$dict.getLabel('sex', this.resident.sex))
// console.log('居民档案字典值', this.$dict.getDict('sex'))
},
onShow() {
// this.$dict.load('sex', 'nation', 'education', 'job', 'faithType', 'politicsStatus', 'militaryStatus', 'householdRelation', 'householdName')
document.title = '居民详情'
},
}
</script>
<style lang="scss" scoped>
.document {
overflow-y: auto;
background: #f5f5f5;
.info {
height: 186px;
width: 100%;
display: flex;
align-items: center;
.fill {
color: #3c7fc8;
margin-left: 24px;
font-size: 28px;
line-height: 40px;
display: flex;
flex-direction: column;
b {
font-size: 36px;
color: #333;
margin-bottom: 8px;
line-height: 50px;
}
a {
cursor: pointer;
}
.idNumber {
margin-right: 16px;
color: #999;
}
}
}
}
</style>

View File

@@ -0,0 +1,369 @@
<template>
<section class="info">
<div class="card">
<div class="baseInfo">
<u-image border-radius="4" :src="top.detail.avatar" width="118" height="118" />
<div class="fill">
<b>{{ top.detail.name }}</b>
<div v-if="top.detail.type == 1" class="wx">@微信</div>
<div v-if="top.detail.type == 2">@企业微信</div>
</div>
<div class="certBtn" @tap="handleCert">{{ !isCert ? '实名认证' : '解绑' }}</div>
</div>
<u-row>
<AiCell class="half" top-label label="来源">{{ $dict.getLabel('wxCustomerAddWay', top.detail.addWay) }}</AiCell>
<AiCell class="half" top-label label="添加时间">{{ top.detail.createTime }}</AiCell>
<AiCell class="half" top-label label="真实姓名">{{ top.detail.realName }}</AiCell>
<AiCell class="half" top-label label="手机号码">{{ resident.phone || '-' }}</AiCell>
<AiCell class="half" top-label label="家庭积分">{{ resident.familyIntegral }}</AiCell>
<AiCell class="half" top-label label="个人积分">{{ resident.personalIntegral }}</AiCell>
</u-row>
</div>
<div class="card">
<AiCell title label="公共标签">
<u-icon label="添加" size="38" name="iconAdd" custom-prefix="iconfont" color="#1365DD" label-color="#1365DD" @tap="top.showTagManage = true" />
</AiCell>
<AiCell top-label v-for="(op, name) in tagsList" :label="name" :key="name">
<u-row>
<div class="tag" v-for="(tag, j) in op" :key="j">{{ tag }}</div>
</u-row>
</AiCell>
</div>
<div class="card">
<AiCell title label="动态" />
<AiCell top-label>
<div class="logItem" v-for="item in customLogs" :key="item.id">
<div flex class="column" shrink>
<div class="dot" />
<div class="line fill" />
</div>
<div flex class="start column">
<b>{{ $dict.getLabel('wxCustomerLogType', item.type) }}</b>
<span>{{ item.createTime }}</span>
<div v-html="item.content" />
</div>
</div>
</AiCell>
</div>
<u-mask :show="dialog" @tap="dialog = false">
<div class="bindCert" @tap.stop>
<b class="title">实名认证</b>
<u-input class="searchInput" v-model="search" clearable placeholder="请输入姓名或身份证号" @input="handleSearch" />
<div class="residents">
<div flex class="spb" v-for="(op, i) in result" :key="i" @tap="bindCert(op.id)">
<div v-html="op.name" />
<div v-html="op.idNumber" />
</div>
</div>
</div>
</u-mask>
<div bottom>
<u-button type="primary" @tap="handleWechat">微信联系</u-button>
<u-button v-if="isMobile" :disabled="!resident.phone" @tap="handleTel">电话联系</u-button>
</div>
</section>
</template>
<script>
import { mapActions } from 'vuex'
export default {
name: 'info',
inject: ['top'],
computed: {
resident() {
return this.top.detail?.residentInfo?.resident || {}
},
tagsList() {
let obj = {}
this.top.detail?.tags?.map((e) => {
if (e.type == 1 && e?.groupName) {
if (obj?.[e.groupName]) {
obj[e.groupName].push(e.tagName)
} else {
obj[e.groupName] = [e.tagName]
}
}
})
return obj
},
isCert() {
return !!this.top?.detail?.residentInfo
},
isMobile() {
return ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod'].some((e) => navigator.userAgent.indexOf(e) > -1)
},
},
data() {
return {
dialog: false,
search: '',
result: [],
customLogs: [],
}
},
methods: {
...mapActions(['injectJWeixin', 'wxInvoke']),
searchResident() {
this.$http
.post('/app/appresident/check-name', null, {
params: { name: this.search },
})
.then((res) => {
if (res?.data) {
let reg = new RegExp(this.search, 'g')
this.result = res.data?.map((e) => ({
...e,
name: e.name.replace(reg, `<b>${this.search}</b>`),
idNumber: e.idNumber.replace(reg, `<b>${this.search}</b>`),
}))
}
})
},
handleSearch() {
if (this.search?.length >= 2) {
this.searchResident()
} else {
this.result = []
}
},
handleCert() {
if (this.isCert) {
this.$confirm('是否要解绑当前实名认证?').then(() => {
this.$http
.post('/app/wxcp/wxcustomer/unBindCustomer2Resident', null, {
params: { residentId: this.resident.id, customerId: this.top.custom },
})
.then((res) => {
if (res?.code == 0) {
this.$u.toast('解除绑定成功!')
this.top.getContact()
}
})
})
} else this.dialog = true
},
bindCert(residentId) {
this.dialog = false
this.$confirm('是否要绑定该居民?')
.then(() => {
this.$http
.post('/app/wxcp/wxcustomer/bindCustomer2Resident', null, {
params: { residentId, customerId: this.top.custom },
})
.then((res) => {
if (res?.code == 0) {
this.$u.toast('绑定成功!')
this.top.getContact()
}
})
.catch((err) => {
this.$u.toast(err)
setTimeout(() => (this.dialog = true), 1000)
})
})
.catch(() => (this.dialog = true))
},
getCustomLog(customerId) {
customerId &&
this.$http
.post('/app/wxcp/wxcustomerlog/listAll', null, {
params: { customerId },
})
.then((res) => {
if (res?.data) {
this.customLogs = res.data
}
})
},
handleTel() {
location.href = 'tel:' + this.resident.phone
},
handleWechat() {
this.wxInvoke([
'openUserProfile',
{
type: 2,
userid: this.top.custom,
},
() => 0,
])
},
},
created() {
this.$dict.load('wxCustomerAddWay', 'wxCustomerLogType')
this.getCustomLog(this.top.custom)
this.injectJWeixin('openUserProfile')
},
onShow() {
document.title = '居民详情'
}
}
</script>
<style lang="scss" scoped>
.info {
padding-bottom: 130px;
.certBtn {
cursor: pointer;
background: $uni-color-primary;
color: #fff;
padding: 8px 16px;
border-radius: 4px;
}
.baseInfo {
height: 186px;
width: 100%;
display: flex;
align-items: center;
.fill {
color: #3c7fc8;
margin-left: 24px;
font-size: 28px;
line-height: 40px;
b {
font-size: 36px;
color: #333;
margin-bottom: 8px;
line-height: 50px;
}
.wx {
color: #2ea222;
}
}
}
::v-deep .AiCell {
&.half {
width: 50%;
}
}
::v-deep .u-form-item {
width: 50%;
min-height: 124px;
.u-form-item--left {
color: #999;
min-height: 40px;
}
.u-form-item--right {
min-height: 0;
margin-top: 16px;
}
}
::v-deep .u-mask {
display: flex;
align-items: center;
justify-content: center;
.bindCert {
width: 600px;
padding: 32px;
min-height: 400px;
background-color: #fff;
display: flex;
flex-direction: column;
color: #333;
}
.residents {
max-height: 780px;
overflow-y: auto;
}
.title {
text-align: center;
font-size: 36px;
}
.searchInput {
margin: 16px 0;
border: 1px solid #d0d4dc;
border-radius: 8px;
padding: 0 16px !important;
flex: 0;
}
.spb {
height: 60px;
cursor: pointer;
padding: 0 16px;
b {
font-size: 32px;
}
&:nth-of-type(2n) {
background: #eee;
}
}
}
::v-deep .logItem {
display: flex;
min-height: 220px;
&:last-of-type {
.line {
display: none;
}
}
& > .column + .column {
margin-left: 16px;
}
.dot {
flex-shrink: 0;
width: 16px;
height: 16px;
background: $uni-color-primary;
border: 8px solid #ffffff;
border-radius: 50%;
margin: 8px 0;
}
.line {
width: 4px;
background: #eee;
}
.start {
font-size: 26px;
font-weight: 400;
color: #666;
b {
color: #333;
}
i {
color: $uni-color-primary;
font-style: normal;
}
& > b {
font-size: 32px;
font-weight: bold;
margin-bottom: 8px;
}
& > span {
color: #999;
}
& > div {
margin-top: 16px;
}
}
}
}
</style>

View File

@@ -0,0 +1,155 @@
<template>
<section class="resident">
<AiLoading v-if="!custom && !error" tips="获取居民信息中..." />
<AiResult v-else-if="error" status="error" :tips="error" />
<template v-else>
<tag-manage v-if="showTagManage" />
<template v-else>
<AiTopFixed>
<u-tabs :list="tabs" :is-scroll="false" :current="currentType" font-size="32" bar-width="192" height="96" @change="handleTabClick" />
</AiTopFixed>
<component :is="currentTab.comp" />
</template>
</template>
</section>
</template>
<script>
import { mapActions } from 'vuex'
import Info from './components/info'
import Document from './components/document'
import TagManage from './tagManage.vue'
export default {
name: 'resident',
components: { TagManage, Document, Info },
provide() {
return {
top: this,
id: '',
}
},
onShow() {
document.title = '居民详情'
},
computed: {
tabs() {
return [
{ name: '居民信息', value: 0, comp: Info },
{ name: '居民档案', value: 1, comp: Document, hide: !this.detail.residentInfo },
].filter((e) => !e.hide)
},
currentTab() {
return this.tabs.find((e) => e.value == this.currentType)
},
isNormal() {
return !!this.id
},
},
data() {
return {
currentType: 0,
detail: {},
showTagManage: false,
custom: '',
error: '',
}
},
methods: {
...mapActions(['injectJWeixin', 'wxInvoke']),
handleTabClick(i) {
this.currentType = i
},
getContact() {
if (this.isNormal) {
this.getCustom(this.id)
} else {
this.injectJWeixin('getCurExternalContact')
.then(() => {
this.wxInvoke([
'getCurExternalContact',
{},
(res) => {
if (res?.err_msg == 'getCurExternalContact:ok') {
this.getCustom(res.userId)
}
},
])
})
.catch(({ errMsg }) => {
this.error = errMsg
})
}
},
getCustom(id) {
this.$http
.post('/app/wxcp/wxcustomer/queryCustomerById', null, {
params: { id },
})
.then((ret) => {
if (ret?.data) {
this.custom = id
this.detail = ret.data
if (this.detail.type == 2) {
this.error = '只能查看个人微信绑定的居民信息'
}
}
})
},
},
onLoad(o) {
this.id = o.id
this.getContact()
},
}
</script>
<style lang="scss" scoped>
.resident {
display: flex;
flex-direction: column;
height: 100%;
background: #f5f5f5;
.error {
font-size: 32px;
color: #666;
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
::v-deep .u-scroll-box {
border-bottom: 1px solid #d4d4d4;
.u-tab-bar {
position: absolute;
bottom: -6px;
}
}
::v-deep .card {
background: #fff;
margin-bottom: 16px;
padding: 16px 32px;
}
.half {
width: 50%;
}
::v-deep .tag {
height: 56px;
line-height: 56px;
background: #f3f4f7;
border-radius: 6px;
padding: 8px 16px;
margin-right: 16px;
margin-bottom: 16px;
overflow: hidden;
cursor: default;
}
}
</style>

View File

@@ -0,0 +1,92 @@
<template>
<section class="tagManage">
<div class="card" v-for="(group, i) in tags" :key="i">
<AiCell title :label="group.name" />
<u-row>
<div class="tag" v-for="(op, j) in group.tagList" :key="j" :class="{ selected: selected.includes(op.id) }" @tap="$u.debounce(handleToggle(op.id))">
{{ op.name }}
</div>
</u-row>
</div>
</section>
</template>
<script>
export default {
name: 'tagManage',
inject: ['top'],
data() {
return {
tags: [],
}
},
computed: {
selected() {
return this.top.groupId ? this.top.detail?.tagList.map((e) => e.tagId) : this.top.detail?.tags.map((e) => e.tagId)
},
},
methods: {
getTags() {
this.$http
.post(this.top.groupId ? '/app/wxcp/wxgroupchattag/listAll' : '/app/wxcp/wxcorptag/listAll', null, {
params: { size: 9999 },
})
.then((res) => {
if (res?.data) {
this.tags = res.data.records
}
})
},
handleToggle(tagId) {
uni.showLoading({
title: '提交中',
})
this.$http
.post(this.top.groupId ? '/app/wxcp/wxgroupchattag/markTagForCP' : '/app/wxcp/wxcorptag/markTagForCP', null, {
params: this.top.groupId ? { tagId, groupId: this.top.groupId } : { tagId, customerId: this.top.custom },
})
.then((res) => {
uni.hideLoading()
if (res?.code == 0) {
this.$u.toast('操作成功!')
this.getTags()
this.top.getContact()
}
})
.catch((err) => {
uni.hideLoading()
this.$u.toast(err)
})
},
},
created() {
this.getTags()
},
}
</script>
<style lang="scss" scoped>
.tagManage {
padding-top: 16px;
.tag {
cursor: pointer !important;
&.selected {
background-color: $uni-color-primary !important;
color: #fff;
}
&.disabled {
color: #999;
cursor: not-allowed;
}
& + .tag {
margin-left: 16px;
}
}
}
</style>

View File

@@ -0,0 +1,54 @@
<template>
<div class="AppSpecialPeople">
<component
v-if="refresh"
:is="component"
@change="onChange"
:params="params">
</component>
</div>
</template>
<script>
import Detail from './detail'
import Add from './add'
export default {
name: 'AppSpecialPeople',
appName: '特殊人群',
data() {
return {
component: 'Detail',
params: {},
refresh: true
}
},
components: {Detail, Add},
methods: {
onChange(e) {
this.params = e.params
this.component = e.type
},
onShow() {
document.title = "特殊人群"
this.refresh = false
this.$nextTick(() => {
this.refresh = true
})
}
},
}
</script>
<style lang="scss" scoped>
uni-page-body {
height: 100%;
}
.AppSpecialPeople {
height: 100%;
}
</style>

View File

@@ -0,0 +1,541 @@
<template>
<div class="add">
<div class="pad-l32">
<div class="item">
<span class="label"><span class="tips">*</span>类型</span>
<div class="value" @click="showType=true">
<span :class="appId ? '' : 'color-999'">{{appName}}</span>
<u-icon name="arrow-right" color="#cccccc" ></u-icon>
</div>
</div>
<div class="info-content" v-for="(items, indexs) in formDataList" :key="indexs">
<div v-for="(item, index) in items" :key="index">
<!-- input输入框 -->
<div class="item" v-if="item.type == 'input' || item.type == 'name' || item.type == 'phone'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="formData[item.fieldDbName]" :maxlength="item.maxLength" />
</div>
</div>
<!-- number 输入框 -->
<div class="item" v-if="item.type == 'number'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-input type="number" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="formData[item.fieldDbName]" :maxlength="item.maxLength" />
</div>
</div>
<!-- 身份证输入框 -->
<div class="item" v-if="item.type == 'idNumber'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-input type="idcard" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="formData[item.fieldDbName]" :maxlength="item.maxLength" />
</div>
</div>
<!-- textarea输入框 富文本-->
<div class="textarea" v-if="item.type == 'textarea' || item.type == 'text' || item.type == 'rtf'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-input type="textarea" placeholder="请输入请输入" placeholder-style="color:#999;font-size:16px;" height="200" v-model="formData[item.fieldDbName]" :maxlength="item.maxLength" />
</div>
</div>
<!-- 字典下拉选择 -->
<div class="item" v-if="item.type == 'dict'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value" @click="selectClick(item.fieldDbName, item.dict)">
<span :class="formData[item.fieldDbName] ? '' : 'color-999'">{{$dict.getLabel(item.dict, formData[item.fieldDbName]) || '请选择'}}</span>
<u-icon name="arrow-right area-icon" color="#cccccc" ></u-icon>
</div>
</div>
<!-- 单选radio -->
<div class="item" v-if="item.type == 'radio'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-radio-group v-model="formData[item.fieldDbName]">
<u-radio :name="item.dictValue" v-for="(item, index) in $dict.getDict(item.dict)" :key="index">
{{ item.dictName }}
</u-radio>
</u-radio-group>
</div>
</div>
<!-- 开关onOff -->
<div class="item" v-if="item.type == 'onOff'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-switch v-model="formData[item.fieldDbName]" :active-value="1" :inactive-value="0"></u-switch>
</div>
</div>
<!-- 多选checkbox -->
<div class="textarea" v-if="item.type == 'checkbox'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<u-checkbox-group>
<u-checkbox
v-model="e.checked"
v-for="(e, i) in item.checkList" :key="i"
:name="item.dictValue"
@change="checkboxChange(indexs, index, i)"
>{{e.dictName}}</u-checkbox>
</u-checkbox-group>
</div>
</div>
<!-- 附件 -->
<div class="textarea" v-if="item.type == 'upload'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<AiUploader :multiple="true" type="image" :limit="9" placeholder="上传图片" :def.sync="formData[item.fieldDbName]"
action="/admin/file/add2"></AiUploader>
</div>
</div>
<!-- 地区选择 -->
<div class="item area" v-if="item.type == 'area'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value">
<AiAreaPicker :value="formData[item.fieldDbName]" @select="v => formData[item.fieldDbName] = v" :areaId="user.areaId" all :name.sync="formData[item.fieldDbName+'_name']"></AiAreaPicker>
<u-icon name="arrow-right area-icon" color="#cccccc" ></u-icon>
</div>
</div>
<!-- 人员选择 -->
<div class="item" v-if="item.type == 'user'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value" @click="handleSelectUser(item.fieldDbName)">
<template v-if="!formData[item.fieldDbName].length">
<span>请选择</span>
</template>
<template v-else>
已选择<em>{{ formData[item.fieldDbName].map(e => e.name).slice(0, 2).join("、") }}</em><em>{{
formData[item.fieldDbName].length
}}</em>
</template>
<u-icon name="arrow-right" color="#cccccc" ></u-icon>
</div>
</div>
<!-- 日期选择 / 日期带时分秒选择 / 时间-时分秒选择 -->
<div class="item" v-if="item.type == 'date' || item.type == 'datetime' || item.type == 'time'">
<span class="label"><span class="tips">{{item.mustFill == 1 ? '*' : ''}}</span>{{item.fieldName}}</span>
<div class="value" @click="dateClick(indexs, index)">
<span :class="formData[item.fieldDbName] ? '' : 'color-999'">{{formData[item.fieldDbName] || '请选择'}}</span>
<u-icon name="arrow-right area-icon" color="#cccccc" ></u-icon>
</div>
</div>
</div>
</div>
</div>
<u-picker mode="time" v-model="dateShow" :params="deteParams" @confirm="dateConfirm" >请选择</u-picker>
<u-select v-model="selectShow" mode="single-column" :list="selectList" label-name="dictName" value-name="dictValue" @confirm="selectConfirm"></u-select>
<u-select v-model="showType" :list="typeList" label-name="applicationName" value-name="id" @confirm="typeConfirm"></u-select>
<div class="footer" @click="submit" v-if="appId">
<div class="btn">保存</div>
</div>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex'
export default {
data() {
return {
appId: '',
appName: '请选择',
showType: false,
typeList: [],
formDataList: [],
formData: {},
pageShow: false,
dateShow: false,
deteParams: {},
datePropIndex: '', //时间选择 formDataList索引
dateIndex: '', //时间选择 formDataList 数组里面的索引
selectName: '',
selectList: [],
selectShow: false,
id: ''
}
},
computed: { ...mapState(['user']) },
created() {
this.getType()
},
onShow() {
document.title = '新增人员'
},
methods: {
...mapActions(['selectEnterpriseContact']),
handleSelectUser(fieldDbName) {
this.selectEnterpriseContact({
fromDepartmentId: 0,
type: ["user"],
selectedUserIds: this.form[fieldDbName]?.map(e => e.id)
}).then(res => {
this.form[fieldDbName] = res?.userList || []
})
},
getType() {
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0`).then((res) => {
if (res?.data) {
this.typeList = res.data
}
})
},
typeConfirm(e) {
this.appId = e[0].value
this.appName = e[0].label
this.$http.post(`/app/appapplicationinfo/queryApplicationInfo?appId=${this.appId}`).then((res) => {
if (res?.data) {
var data = res.data
let dictList = []
let formList = {}
data.tableInfos.map((item) => {
let colItem
if (item.dictionaryCode) {
dictList.push(item.dictionaryCode)
}
if (item.dictionaryCode && item.type != 'radio' && item.type != 'checkbox' && item.type != 'onOff') {
colItem = {
...item,
type: 'dict',
dict: item.dictionaryCode,
fieldValue: item.defaultValue || ''
}
} else if (item.type == 'radio') {
colItem = {
...item,
dict: item.dictionaryCode,
fieldValue: item.defaultValue || ''
}
} else if (item.type == 'checkbox') {
colItem = {
...item,
dict: item.dictionaryCode,
fieldValue: ''
}
if (item.defaultValue) {
var val = item.defaultValue?.split('`')
colItem.fieldValue = val
}
} else if (item.type == 'onOff') {
colItem = {
...item,
fieldValue: 0
}
} else if (item.type == 'number') {
colItem = {
...item,
type: item.type,
min: item.minValue || '',
max: item.maxValue || '',
fieldValue: Number(item.defaultValue) || 0
}
}else if(item.type == 'upload' || item.type == 'user') {
colItem = {
...item,
type: item.type,
fieldValue: []
}
}else if(item.type == 'area') {
colItem = {
...item,
type: item.type,
fieldValue: this.user.areaId,
}
}else {
if (item.type == 'date') {
item.params = { year: true, month: true, day: true, hour: false, minute: false, second: false}
}
if (item.type == 'datetime') {
item.params = { year: true, month: true, day: true, hour: true, minute: true, second: true}
}
if (item.type == 'time') {
item.params = { year: false, month: false, day: false, hour: true, minute: true, second: true}
}
colItem = {
...item,
type: item.type,
}
colItem.fieldValue = item.defaultValue || ''
}
formList[item.groupIndex]?.push(colItem) || (formList[item.groupIndex] = [colItem])
this.$set(this.formData, colItem.fieldDbName, colItem.fieldValue || "")
})
this.formDataList = Object.values(formList)
if (dictList.length) {
this.getDictList(dictList)
} else {
this.formDataList.map((item)=> {
item.map((e) => {
if (e.type == 'onOff') { //开关
this.formData[e.fieldDbName] = 0
}
if (e.type == 'area') { //地区
this.formData[e.fieldDbName+'_name'] = this.user.areaName
}
})
})
this.$forceUpdate()
console.log(this.formData)
this.pageShow = true
}
}
})
},
getDictList(listName) {
this.$dict.load(listName.join(',')).then(() => {
this.formDataList.map((item)=> {
item.map((e) => {
if(e.type == 'checkbox') { //多选
var list = this.$dict.getDict(e.dict)
list.map((items) => {
items.checked = false
})
e.checkList = list
}
if (e.type == 'onOff') { //开关
this.formData[e.fieldDbName] = 0
}
if (e.type == 'area') { //地区
this.formData[e.fieldDbName+'_name'] = this.user.areaName
}
})
})
this.$forceUpdate()
console.log(this.formData)
this.pageShow = true
})
},
selectClick(name, dictName) {
this.selectName = name
this.selectList = this.$dict.getDict(dictName)
this.selectShow = true
},
selectConfirm(e) {
this.formData[this.selectName] = e[0].value
},
checkboxChange(indexs, index, i) {
this.formDataList[indexs][index].checkList[i].checked = !this.formDataList[indexs][index].checkList[i].checked
this.$forceUpdate()
},
dateClick(indexs, index) {
this.deteParams = this.formDataList[indexs][index].params
this.datePropIndex = indexs
this.dateIndex = index
this.$nextTick(() => {
this.dateShow = true
})
},
dateConfirm(e) {
var fieldDbName = this.formDataList[this.datePropIndex][this.dateIndex].fieldDbName
if(this.formDataList[this.datePropIndex][this.dateIndex].type == 'date') { //年月日
this.formData[fieldDbName] = `${e.year}-${e.month}-${e.day}`
}
if(this.formDataList[this.datePropIndex][this.dateIndex].type == 'datetime') { //年月日时分秒
this.formData[fieldDbName] = `${e.year}-${e.month}-${e.day} ${e.hour}-${e.minute}-${e.second}`
}
if(this.formDataList[this.datePropIndex][this.dateIndex].type == 'time') { //时分秒
this.formData[fieldDbName] = `${e.hour}-${e.minute}-${e.second}`
}
console.log(e)
},
submit() {
var isValid = true
this.formDataList.map((item) => {
if (item.length) {
item.map((items) => {
if (items.type == 'checkbox') { //多选
this.formData[items.fieldDbName] = ''
var list = []
items.checkList.map((e) => {
if(e.checked) {
list.push(e.dictValue)
}
})
this.formData[items.fieldDbName] = list?.toString()
}
if (items.type == 'upload' && this.formData[items.fieldDbName].length) { //附件 只传id
var files = []
this.formData[items.fieldDbName].map((item) => {
files.push(item.id)
})
this.formData[items.fieldDbName] = files.join(',')
}
// if (items.type == 'onOff') { //开关
// this.formData[items.fieldDbName] = this.formData[items.fieldDbName] ? '1' : '0'
// }
if(items.type == 'area' && this.formData[items.fieldDbName]) {
console.log(this.formData)
var area = []
area.push(this.formData[items.fieldDbName])
area.push(this.formData[items.fieldDbName+'_name'])
this.formData[items.fieldDbName] = area.join('_')
}
})
}
})
this.formDataList.map((item) => {
item.map((items) => {
if(items.mustFill == 1 && this.formData[items.fieldDbName] === '') {
isValid = false
return this.$u.toast(`${items.fieldName}为必填项`)
}
})
})
if (!isValid) return
this.$http.post(`/app/appapplicationinfo/addOrUpdate?appId=${this.appId}`, {
...this.formData,
id: this.id || ''
}).then((res) => {
if (res.code == 0) {
this.$u.toast('提交成功')
uni.$emit('specialPeopleList')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
},
}
}
</script>
<style lang="scss" scoped>
.add {
padding-bottom: 112px;
.title{
width: 100%;
height: 96px;
line-height: 96px;
background: #FFF;
font-size: 32px;
font-weight: 500;
color: #262B36;
padding-right: 32px;
box-sizing: border-box;
overflow: hidden;
.tips{
display: inline-block;
width: 8px;
height: 32px;
background: #4E75FE;
box-shadow: 0px 8px 24px 2px #C9D8FA;
border-radius: 4px;
vertical-align: middle;
margin-right: 22px;
}
.select{
float: right;
font-size: 30px;
color: #1365DD;
}
}
.item{
width: 100%;
padding: 34px 32px 34px 0;
background: #FFFFFF;
border-bottom: 1px solid #D8DDE6;
display: flex;
justify-content: space-between;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
box-sizing: border-box;
position: relative;
.value{
.u-icon{
margin-left: 16px;
}
::v-deep .u-input{
font-size: 32px;
}
}
}
.color-999{
color: #999;
}
.tips{
display: inline-block;
width: 16px;
height: 44px;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #F46;
line-height: 44px;
}
.textarea{
width: 100%;
padding: 34px 32px 34px 0;
background: #FFFFFF;
border-bottom: 1px solid #D8DDE6;
.label{
display: inline-block;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
margin-bottom: 8px;
}
.value{
padding: 0 16px;
}
}
::v-deep .default{
width: 160px!important;
height: 160px!important;
}
.area{
padding: 16px 54px 16px 0;
.label{
display: inline-block;
line-height: 78px!important;
}
.u-icon{
vertical-align: super;
position: absolute;
top: 42px;
right: 16px;
}
}
.area-icon{
vertical-align: super;
position: absolute;
top: 10px;
right: 0;
}
.footer{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.btn{
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #1365DD;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
}
.line-bg{
width: 100%;
height: 16px;
background: #F5F5F5;
}
.pad-l32{
padding-left: 32px;
background-color: #fff;
}
}
</style>

View File

@@ -0,0 +1,407 @@
<template>
<div class="detail">
<div class="tab-select">
<div class="item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabs" :key="index" @click="tabClick(index)">{{item}}<span></span></div>
</div>
<div class="area-select">
<div class="select-content">
<div class="area-content">
<AiAreaPicker :areaId="user.areaId" v-model="areaId" @select="areaSelect" :name.sync="areaName">
<img src="./img/local-icon.png" alt="">
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#666" size="24" />
</AiAreaPicker>
</div>
<div class="search-input" v-if="tabIndex">
<img src="./img/search-icon.png" alt="">
<u-input type="text" placeholder="请输入姓名" placeholder-style="color:#999;font-size:13px;" height="18" v-model="name" @confirm="getUserList" :clearable="false" maxlength="6" />
</div>
</div>
</div>
<div v-if="!tabIndex">
<div class="info-content">
<div class="title">特殊人群</div>
<div class="num-content">
<div class="num-item" v-for="(item, index) in statisticsList" :key="index">
<h3>{{item.value}}</h3>
<p>{{item.label}}</p>
</div>
<AiEmpty v-if="!statisticsList.length"/>
</div>
</div>
<div class="info-content">
<div class="title">本月新增</div>
<div class="num-content color-org">
<div class="num-item" v-for="(item, index) in statisticsListMon" :key="index">
<h3>{{item.value}}</h3>
<p>{{item.label}}</p>
</div>
<AiEmpty v-if="!statisticsListMon.length"/>
</div>
</div>
</div>
<div v-else>
<div class="item-content" v-for="(item, index) in userList" :key="index">
<div class="title" @click="showUserType(index)">
<h2>{{item.label}}</h2>
<img src="./img/down-icon.png" alt="" :class="item.check ? 'img-active' : ''">
</div>
<div class="user-list" v-if="item.check">
<div class="user-item" v-for="(e, indexs) in item.value" :key="indexs" v-if="item.value && item.value.length">
<div class="user-img">
<img src="./img/user-img.png" alt="">
</div>
<div class="user-info">
<p class="name">{{e.name}}</p>
<div class="phone">
<span>{{idNumberInit(e.idNumber)}}</span>
<span>{{e.phone}}</span>
</div>
</div>
</div>
<p class="text" v-if="!item.value.length">{{'暂无' + item.label + '信息'}}</p>
</div>
</div>
<div class="footer" @click="toAdd">
<div class="btn">新增特殊人群信息</div>
</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
data() {
return {
areaId: '',
areaName: '',
tabs: ['统计信息', '人员信息'],
tabIndex: 0,
addressArea: '',
statisticsList: [],
statisticsListMon: [],
userList: [],
name: ''
}
},
computed: { ...mapState(['user']) },
created() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.getStatistic()
this.getStatisticMon()
this.getUserList()
uni.$on('specialPeopleList', () => {
this.getStatistic()
this.getStatisticMon()
this.getUserList()
})
},
onShow() {
document.title = '特殊人群管理'
},
methods: {
areaSelect(e) {
this.areaId = e
this.getStatistic()
this.getStatisticMon()
this.getUserList()
},
tabClick(index) {
this.tabIndex = index
},
getStatistic() {
this.statisticsList = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=0`).then((res) => {
if (res.code == 0) {
for(let i in res.data){
var obj = {
label: i,
value: res.data[i]
}
this.statisticsList.push(obj)
}
}
})
},
getStatisticMon() {
this.statisticsListMon = []
this.$http.post(`/app/appapplicationinfo/specialStatistic?areaId=${this.areaId}&type=0&range=1`).then((res) => {
if (res.code == 0) {
for(let i in res.data){
var obj = {
label: i,
value: res.data[i]
}
this.statisticsListMon.push(obj)
}
}
})
},
getUserList() {
this.userList = []
this.$http.post(`/app/appapplicationinfo/queryPeople?areaId=${this.areaId}&type=0&name=${this.name}`).then((res) => {
if (res.code == 0) {
for(let i in res.data){
var obj = {
label: i,
value: res.data[i],
check: false
}
this.userList.push(obj)
}
}
})
},
toAdd() {
// this.$emit('change', {
// type: 'Add',
// })
uni.navigateTo({url: './add'})
},
idNumberInit(idNumber) {
if(!idNumber) {
idNumber = ''
}else {
idNumber = idNumber.substring(0, 5) + '******' + idNumber.substring(12, 15)
}
return idNumber
},
showUserType(index) {
if(this.userList[index].check) {
this.userList[index].check = false
}else {
this.userList.map((item) => {
item.check = false
})
this.userList[index].check = true
}
}
}
}
</script>
<style lang="scss" scoped>
.detail {
.tab-select{
width: 100%;
height: 96px;
line-height: 96px;
background: #3975C6;
display: flex;
.item{
flex: 1;
text-align: center;
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #CDDCF0;
}
.active{
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
position: relative;
color: #fff;
span{
width: 48px;
height: 4px;
background: #FFF;
position: absolute;
bottom: 14px;
left: 50%;
margin-left: -24px;
}
}
}
.area-select{
width: 100%;
background: #FFF;
padding-left: 32px;
box-sizing: border-box;
.select-content{
width: 100%;
padding: 24px 32px 24px 0;
border-bottom: 1px solid #D8DDE6;
display: flex;
justify-content: space-between;
font-family: PingFangSC-Regular, PingFang SC;
color: #333;
line-height: 44px;
box-sizing: border-box;
display: flex;
.area-content{
width: calc(100% - 402px);
line-height: 64px;
img{
width: 42px;
vertical-align: middle;
margin-right: 16px;
}
.u-icon{
margin-left: 6px;
}
}
.search-input{
width: 402px;
height: 64px;
background: #F5F5F5;
border-radius: 32px;
padding: 14px 32px 14px 64px;
box-sizing: border-box;
position: relative;
img{
width: 32px;
height: 32px;
margin-right: 12px;
position: absolute;
top: 18px;
left: 24px;
}
::v-deep .u-input{
display: inline-block;
width: 240px;
font-size: 26px;
}
}
}
}
.info-content{
width: calc(100% - 64px);
background: #FFF;
border-radius: 8px;
margin: 24px 32px 0;
.title{
padding-left: 32px;
line-height: 94px;
border-bottom: 1px solid #ddd;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
}
.num-content{
overflow: hidden;
.num-item{
float: left;
width: 33%;
padding: 40px 0;
text-align: center;
h3{
font-size: 64px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #3192F4;
line-height: 74px;
margin-bottom: 10px;
}
p{
font-size: 28px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #999;
line-height: 40px;
}
}
}
.color-org{
.num-item{
h3{
color: #FF8700;
}
}
}
}
.item-content{
margin-bottom: 4px;
.title{
width: 100%;
height: 108px;
line-height: 108px;
background: #FFF;
padding: 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
h2{
font-size: 32px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #333;
}
img{
width: 34px;
height: 34px;
margin-top: 38px;
transition: all .3s ease-in-out;
}
.img-active {
transform: rotate(180deg);
}
}
.user-list{
background-color: #fff;
.user-item{
padding: 24px 32px;
display: flex;
.user-img{
width: 112px;
img{
width: 80px;
height: 80px;
}
}
.user-info{
width: 100%;
.name{
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #333;
line-height: 44px;
margin-bottom: 8px;
}
.phone{
width: 100%;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 36px;
display: flex;
justify-content: space-between;
}
}
}
}
}
.text{
height: 96px;
line-height: 96px;
color: #999;
font-size: 28px;
text-align: center;
}
.footer{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.btn{
width: 100%;
height: 112px;
line-height: 112px;
text-align: center;
background: #1365DD;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -0,0 +1,359 @@
<template>
<div class="AppWalkask">
<template v-if="isList">
<div class="header-top">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#3975C6" inactive-color="#fff" active-color="#fff" @change="change"></u-tabs>
</div>
<div class="header-middle">
<div class="currentLeft">
<div class="currentLeft-top">
<div class="left">
<AiAreaPicker v-model="areaId" :areaId="user.areaId" @select="areaSelect" :name.sync="areaName" style="color: #fff">
<img :src="$cdn + 'location.svg'" alt="" style="width: 18px; height: 18px; margin-right: 4px; vertical-align: middle" />
<span class="label" v-if="areaName">{{ areaName }}</span>
<span v-else>请选择</span>
<u-icon name="arrow-down" color="#fff" size="28" style="margin-left: 4px" />
</AiAreaPicker>
</div>
<u-search v-model="keyword" :clearabled="true" placeholder="请输入标题" :show-action="false" bg-color="#1F5CAF" search-icon-color="#E2E8F1" color="#E2E8F1" height="58" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<template v-if="data.length > 0">
<AiCard v-for="(item, i) in data" :key="i" @click.native="goDetail(item, 1)" :ref="item.id">
<template #custom>
<div class="cards-left">
<span class="walkName">走访对象{{ item.name }}</span>
<span class="tags" v-if="item.menuLevel3Name">{{ item.menuLevel3Name }}</span>
<span class="tags" v-if="item.reality">{{ $dict.getLabel('realityStatus', item.reality) }}</span>
</div>
<div class="cards-hint">{{ item.title }}</div>
<div class="imgs">
<img :src="items.url" alt="" v-for="(items, i) in JSON.parse(item.images || '[]')" :key="i" @click.stop="previewImage(JSON.parse(item.images || '[]'), items.url)" v-if="i < 3" />
</div>
<div class="cards-bottom">
<span>走访人{{ item.createUserName }}</span>
<span style="margin-left: 8px">{{ item.createTime }}</span>
</div>
</template>
<template #menu v-if="item.createUserId == user.id">
<div class="menu" @tap.stop="toAdd(item, 2)">编辑</div>
<div class="menu" @tap.stop="toDetele(item)">删除</div>
</template>
</AiCard>
</template>
<div v-else>
<AiEmpty description="您还未添加过入户走访慰问" class="emptyWrap"></AiEmpty>
<div class="addBtns">
<span> 点击</span>
<span class="toAdds" @click="toAdd()">新增按钮</span>
<span> 试试试吧~</span>
</div>
</div>
</div>
</div>
<u-modal v-model="deletShow" content="您确认要删除该条信息吗?" :show-cancel-button="true" :mask-close-able="true" :show-title="false" @confirm="delet"></u-modal>
<div class="addBtn iconfont iconfont-iconfangda" @tap.stop="toAdd()" />
</template>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'AppWalkask',
appName: '走访慰问',
components: {},
props: {},
data() {
return {
data: [],
tabList: [
{
name: '全部',
},
{
name: '我的走访',
},
],
currentTabs: 0,
show: false,
keyword: '',
deletShow: false,
isList: true,
comp: '',
params: null,
current: 1,
areaId: '',
areaName: '',
size: 10,
deletId: '',
pages: 0,
}
},
computed: {
...mapState(['user']),
},
onLoad() {
this.areaId = this.user.areaId
this.areaName = this.user.areaName
this.$dict.load('realityStatus').then(() => {
this.getList()
})
uni.$on('updateList', () => {
this.current = 1
this.getList()
})
},
onShow() {
document.title = '走访慰问'
},
mounted() {},
methods: {
getList() {
this.$http
.post('/app/appvisitvondolence/list', null, {
params: {
size: this.size,
current: this.current,
areaId: this.areaId,
createUserId: this.currentTabs == 1 ? this.user.id : '',
title: this.keyword,
},
})
.then((res) => {
if (res.code == 0) {
if (this.current > res.data.pages) {
return
}
this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
this.pages = res.data.pages
}
})
},
areaSelect(e) {
this.data = []
this.areaId = e
this.current = 1
this.getList()
},
change(index) {
this.data = []
this.areaId = this.user.areaId
this.keyword = ''
this.currentTabs = index
this.current = 1
this.getList()
},
goDetail(item, hint) {
if (item?.id) {
this.$refs?.[item.id]?.[0]?.handleClose()
}
if (hint == 1) {
uni.navigateTo({ url: `./detail?id=${item.id}` })
}
},
toAdd(item, hint) {
if (item?.id) {
this.$refs?.[item.id]?.[0]?.handleClose()
}
if (hint == 2) {
uni.navigateTo({ url: `./add?id=${item.id}` })
} else {
uni.navigateTo({ url: `./add` })
}
},
toDetele(item) {
this.deletShow = true
this.deletId = item.id
this.$refs?.[item.id]?.[0]?.handleClose()
},
delet() {
this.$http.post(`/app/appvisitvondolence/delete?ids=${this.deletId}`).then((res) => {
if (res.code == 0) {
this.$u.toast('删除成功!')
this.getList()
}
})
},
handerSearch(e) {
this.keyword = e
this.current = 1
this.getList()
},
handerClear() {
this.keyword = ''
this.current = 1
this.getList()
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
},
onReachBottom() {
this.current = this.current + 1
this.getList()
},
}
</script>
<style lang="scss" scoped>
uni-page-body {
height: 100%;
background: #fff;
}
.AppWalkask {
height: 100%;
.header-middle {
.currentLeft,
.currentRight {
padding-bottom: 56px;
.currentLeft-top {
display: flex;
align-items: center;
background: #3975c6;
padding: 24px 30px;
.left {
width: 40%;
display: flex;
align-items: center;
img {
width: 48px;
height: 48px;
}
}
}
.AiCard {
::v-deep .start {
border-bottom: 1px solid #dddddd;
.fill {
.cards-left {
.walkName {
font-size: 32px;
font-weight: 500;
margin-right: 16px;
color: #333;
}
.tags {
display: inline-block;
padding: 6px 16px;
background: #f3f4f7;
border-radius: 4px;
font-size: 28px;
color: #999999;
margin-left: 16px;
}
}
.cards-hint {
margin-top: 16px;
font-size: 30px;
color: #666666;
line-height: 1.4;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.imgs {
margin-top: 20px;
img {
width: 221px;
height: 221px;
margin-right: 8px;
}
img:nth-child(3n + 0) {
margin-right: 0;
}
}
.cards-bottom {
margin: 24px 0 16px 0;
font-size: 24px;
color: #999999;
}
}
}
::v-deep .mask {
.moreMenu {
.menu {
text-align: center;
line-height: 80px;
width: 192px;
height: 80px;
font-size: 28px;
font-weight: 400;
color: #333333;
}
}
}
}
.addBtns {
text-align: center;
color: #b7b7b7;
margin-top: 10px;
font-weight: 800;
.toAdds {
color: #467dfe;
}
}
}
}
.addBtn {
width: 96px;
height: 96px;
flex-shrink: 0;
background: $uni-color-primary;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
font-size: 48px;
color: #fff;
border-radius: 50%;
justify-content: center;
align-items: center;
display: flex;
position: fixed;
right: 6px;
bottom: 106px;
z-index: 9;
}
}
</style>

302
src/sass/AppWalkask/add.vue Normal file
View File

@@ -0,0 +1,302 @@
<template>
<div class="add">
<div v-if="addList">
<div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto">
<u-form-item label="区域选择" prop="areaId" class="areaIds" style="position: relative">
<AiAreaPicker :value="forms.areaId" :areaId="areaIdProps" @select="areaSelect" style="color: #333"></AiAreaPicker>
<u-icon name="arrow-right" color="rgb(192, 196, 204)" size="30" style="margin-left: 4px" />
</u-form-item>
<div class="line"></div>
<u-form-item label="走访对象" prop="name" required :right-icon="id ? '' : 'arrow-right'" class="create_user_names">
<u-input v-model="forms.name" disabled placeholder="请选择走访对象" @click="toWalkObject" />
</u-form-item>
<div class="line"></div>
<u-form-item label="现实状态" prop="reality" :right-icon="id ? '' : 'arrow-right'" class="realitys">
<u-input v-model="forms.reality" disabled placeholder="请选择现实状态" @click="realityClick" />
<u-select v-model="showStstus" :list="$dict.getDict('realityStatus')" value-name="dictValue" label-name="dictName" @confirm="realityStstus"></u-select>
</u-form-item>
<div class="line"></div>
<u-form-item label="入户走访事项" prop="title" required label-position="top" :border-bottom="false">
<u-input v-model="forms.title" placeholder="请输入入户走访事项(30字以内)" type="textarea" auto-height height="60" :maxlength="30" />
</u-form-item>
<div class="hint">{{ forms.title.length }}/30</div>
<div class="line"></div>
<u-form-item label="入户走访内容" prop="description" label-position="top" :border-bottom="false">
<u-input v-model="forms.description" placeholder="请输入入户走访事项(500字以内)" type="textarea" auto-height height="60" :maxlength="500" />
<!-- <div>{{ forms.description.length }}/500</div> -->
</u-form-item>
<div class="hint">{{ forms.description.length }}/500</div>
<div class="line"></div>
<u-form-item label="图片(最多9张)" prop="images" class="avatars" label-position="top" :border-bottom="false">
<AiUploader :def.sync="forms.images" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item>
</u-form>
</div>
<div class="btn" @click="submit">保存</div>
</div>
</div>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'add',
components: {},
props: {},
data() {
return {
show: false,
forms: {
areaId: '',
areaName: '',
optionId: '',
name: '',
reality: '',
realityValue: '',
menuLevel3Name: '',
applicationId: '',
title: '',
description: '',
images: [],
},
showAreaId: false,
showStstus: false,
flag: false,
addList: true,
areaIdProps: '',
clickedUserSelect: false,
id: '',
name: '',
optionId: '',
}
},
computed: { ...mapState(['user']) },
onLoad(o) {
this.id = o.id ? o.id : ''
this.areaIdProps = this.user.areaId
if (!this.id) {
this.forms.areaId = this.user.areaId
}
this.$dict.load('realityStatus').then(() => {
this.getDetail()
})
uni.$on('goBack', (data) => {
this.forms.menuLevel3Name = data.applicationName
this.forms.applicationId = data.applicationId
this.forms.name = data.selectUser.name
this.forms.optionId = data.selectUser.id
})
},
onShow() {
document.title = '新建走访'
},
mounted() {},
methods: {
realityClick() {
if (this.id) return
if (!this.forms.name) {
return this.$u.toast('请选择走访对象')
}
this.showStstus = true
},
getDetail() {
if (this.id) {
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.forms = res.data
this.forms.create_user_name = res.data.name
this.forms.realityValue = res.data.reality
this.forms.areaId = res.data.areaId
this.forms.areaName = res.data.areaName
this.forms.reality = this.$dict.getLabel('realityStatus', res.data.reality)
if (res.data.images) {
this.forms.images = JSON.parse(res.data.images || '[]')
}
}
})
}
},
submit() {
if (this.flag) return
this.$refs.uForm.validate((valid) => {
if (valid) {
if (!this.forms.name) {
return this.$u.toast('请选择走访对象')
}
if (!this.forms.title) {
return this.$u.toast('请输入入户走访事项')
}
const imgs = []
if (this.forms.images) {
this.forms.images.map((e) => {
imgs.push({ url: e.url, id: e.id })
})
}
this.flag = true
this.$http
.post(`/app/appvisitvondolence/addOrUpdate`, {
areaId: this.forms.areaId,
applicationId: this.forms.applicationId,
name: this.forms.name,
optionId: this.forms.optionId,
// menuLevel3Name: this.forms.menuLevel3Name,
applicationId: this.forms.applicationId,
reality: this.forms.realityValue ? this.forms.realityValue : this.forms.reality,
title: this.forms.title,
description: this.forms.description,
createUserId: this.user.id,
createUserName: this.user.name,
images: JSON.stringify(imgs) || [],
id: this.id,
})
.then((res) => {
if (res.code == 0) {
this.$u.toast('保存成功')
this.flag = false
uni.$emit('updateList')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
} else {
this.$u.toast('保存失败')
}
})
},
areaSelect(e) {
this.forms.areaId = e
},
realityStstus(e) {
this.forms.reality = e[0].label
this.forms.realityValue = e[0].value
},
toWalkObject() {
uni.navigateTo({ url: `./selectType` })
},
},
}
</script>
<style lang="scss" scoped>
.add {
height: 100%;
background: #f3f6f9;
.header-description {
padding-bottom: 162px;
background: #f3f6f9;
::v-deep .u-form {
background: #fff;
.u-form-item {
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
}
}
}
.u-form-item:last-child {
margin-bottom: 0;
padding-bottom: 20px !important;
}
.areaIds {
.u-form-item__body {
.u-form-item--right {
.u-form-item--right__content {
.u-form-item--right__content__slot {
.AiAreaPicker {
width: 100%;
display: flex;
justify-content: flex-end;
.AiSearchPopup {
.areaSelector {
.location {
opacity: 0;
}
}
}
}
}
}
}
}
}
.create_user_names,
.realitys {
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: right !important;
}
}
}
}
.line {
height: 16px;
background: #f3f6f9;
}
.hint {
padding: 4px 32px 8px 0;
text-align: right;
color: #999;
}
.avatars {
.u-form-item__body {
.default {
width: 160px;
height: 160px;
}
}
}
}
}
.btn {
position: fixed;
bottom: 0;
width: 100%;
height: 112px;
line-height: 112px;
background: #1365dd;
text-align: center;
font-size: 32px;
font-weight: 500;
color: #ffffff;
z-index: 999;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,141 @@
<template>
<div class="detail">
<div class="header-top">
<div class="hint">{{ data.title }}</div>
<div class="walk-item">
<span>走访对象</span>
<span>
{{ data.name }}
<span class="tags" v-if="data.menuLevel3Name">{{ data.menuLevel3Name }}</span>
</span>
</div>
<div class="walk-item" v-if="data.reality">
<span>现实状态</span>
<span>{{ $dict.getLabel('realityStatus', data.reality) }} </span>
</div>
<div class="walk-item">
<span>走访人员</span>
<span>{{ data.createUserName }}</span>
</div>
<div class="walk-item">
<span>走访时间</span>
<span>{{ data.createTime }}</span>
</div>
</div>
<div class="header-middle">
<div class="hint-con" v-if="data.description">{{ data.description }}</div>
<div class="imgs">
<img :src="item.url" alt="" v-for="(item, index) in data.images" :key="index" @click.stop="previewImage(data.images, item.url)" />
</div>
</div>
</div>
</template>
<script>
export default {
name: 'detail',
components: {},
props: {
params: {},
},
data() {
return {
data: {},
id: '',
}
},
computed: {},
onLoad(o) {
this.id = o.id
this.$dict.load('realityStatus').then(() => {
this.getDetail()
})
},
onShow() {
document.title = '走访详情'
},
mounted() {},
methods: {
getDetail() {
this.$http.post(`/app/appvisitvondolence/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = res.data
if (this.data.images) {
this.data.images = JSON.parse(this.data.images || '[]')
}
}
})
},
previewImage(images, img) {
uni.previewImage({
urls: images.map((v) => v.url),
current: img,
})
},
},
}
</script>
<style lang="scss" scoped>
.detail {
height: 100%;
background: #fff;
.header-top {
background: #3975c6;
padding: 24px 32px 32px;
.hint {
font-size: 40px;
font-weight: 500;
color: #ffffff;
}
.walk-item {
font-size: 28px;
color: #d7e3f3;
margin-top: 16px;
.tags {
display: inline-block;
padding: 0 12px;
height: 40px;
border-radius: 4px;
border: 1px solid #FFFFFF;
margin-left: 16px;
}
}
}
.header-middle {
background: #fff;
padding: 32px 32px 32px 32px;
.hint-con {
font-size: 32px;
color: #666666;
}
.imgs {
margin: 32px 0 48px 0;
img {
width: 218px;
height: 218px;
margin-right: 16px;
}
img:nth-child(3n + 0) {
margin-right: 0;
}
}
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,300 @@
<template>
<div class="selectType">
<div class="header-top" v-if="!showType">
<u-search v-model="keyword" placeholder="请输入姓名" :show-action="false" bg-color="#F5F5F5" search-icon-color="#CCCCCC" placeholder-color="#999999" @search="handerSearch" @clear="handerClear"></u-search>
</div>
<div class="header-middle">
<div class="hint">
<span :style="{ color: applicationName ? '#3F8DF5' : '' }" @click="back">可选范围</span>
<span> {{ applicationName ? ' / ' + applicationName : '' }}</span>
</div>
<div class="showTypes" v-if="showType">
<div class="empty-div"></div>
<div v-if="typeList.length > 0">
<div class="cards" v-for="(item, i) in typeList" :key="i" @click="toUserSelect(item)">
<img src="./img/tx@2x.png" alt="" />
<div class="rightes">
<div class="applicationNames">{{ item.applicationName }}</div>
<img src="./img/2.png" alt="" class="imgs" />
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
<div class="showUsers" v-else>
<div v-if="userList.length > 0">
<div class="cards" v-for="(e, index) in userList" :key="index">
<div class="imges">
<img src="./img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
<img src="./img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
<img src="./img/tx@2x.png" alt="" class="avatras" />
</div>
<div class="rights">
<div class="applicationNames">{{ e.name }}</div>
<div class="idNumbers">{{ e.idNumber && e.idNumber.replace(/^(\w{6})\w{8}(.*)$/, '$1******$2') }}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
<!-- <AiBck /> -->
</div>
</template>
<script>
export default {
name: 'selectType',
components: {},
props: {},
data() {
return {
typeList: [],
userList: [],
keyword: '',
current: 1,
showType: true,
applicationName: '',
applicationId: '',
selectUser: {},
}
},
computed: {},
watch: {},
onLoad() {
this.getTypeList()
},
onShow() {},
methods: {
userClick(row, index) {
if (this.userList[index].isChecked) {
this.userList[index].isChecked = false //取消
this.selectUser = {}
} else {
this.userList.map((item) => {
item.isChecked = false
})
this.userList[index].isChecked = true
this.selectUser = row
}
},
getTypeList() {
this.userList = []
this.$http.post(`/app/appapplicationinfo/queryApplicationListByType?type=0&status=1`).then((res) => {
if (res.code == 0) {
this.typeList = res.data
}
})
},
// getUser(data) {
// this.applicationId = data.id
// this.appId = data.id
// this.getUsers()
// },
getUsers() {
uni.showLoading({
title: '加载中',
})
this.$http.post(`/app/appapplicationinfo/list?appId=${this.appId}&current=${this.current}&size=${999}`, { searchParam: this.keyword }).then((res) => {
if (res.code == 0) {
res.data.records.map((item) => {
item.isChecked = false
})
uni.hideLoading()
this.userList = res.data.records
}
})
},
submit() {
if (this.selectUser.id != null) {
uni.$emit('goBack', { selectUser: this.selectUser, applicationName: this.applicationName, applicationId: this.applicationId })
uni.navigateBack()
} else {
return this.$u.toast('请选择人员')
}
},
toUserSelect(item) {
this.applicationName = item.applicationName
this.applicationId = item.id
this.appId = item.id
this.getUsers()
this.showType = false
},
back() {
this.keyword = ''
this.typeList = []
this.userList = []
this.applicationName = ''
this.showType = true
this.getTypeList()
},
handerSearch(e) {
if (!this.showType) {
this.keyword = e
this.current = 1
// this.getUser()
this.getUsers()
}
},
handerClear() {
this.keyword = ''
this.current = 1
this.getUsers()
},
},
}
</script>
<style scoped lang="scss">
.selectType {
height: 100%;
background: #fff;
.header-top {
background: #fff;
padding: 20px 32px;
}
.header-middle {
padding-bottom: 140px;
.hint {
padding: 0 20px 0 32px;
height: 112px;
line-height: 112px;
box-shadow: 0px 1px 0px 0px #e4e5e6;
font-size: 30px;
font-weight: 500;
}
.showTypes {
.empty-div {
height: 16px;
background: #f5f5f5;
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
img {
width: 74px;
height: 74px;
border-radius: 8px;
}
.rightes {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
}
.imgs {
width: 40px;
height: 40px;
margin-right: 20px;
}
}
}
}
.showUsers {
.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;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
.rights {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin-left: 32px;
border-bottom: 1px solid #e4e5e6;
padding-right: 40px;
.applicationNames {
font-size: 36px;
font-weight: 500;
color: #333333;
}
.idNumbers {
color: #666;
}
}
}
}
}
.subBtn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 118px;
background: #f4f8fb;
div {
width: 192px;
height: 80px;
line-height: 80px;
text-align: center;
background: #1365dd;
border-radius: 4px;
font-size: 32px;
color: #fff;
margin: 20px 34px 0 0;
float: right;
}
}
}
</style>