事件上报

This commit is contained in:
liuye
2024-07-17 17:55:50 +08:00
parent 172e375cc8
commit 379c4d59a9
45 changed files with 3533 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
<template>
<movable-area class="movableArea">
<movable-view direction="all" x="300" y="500">
<div class="AiAdd" @click.stop="add"></div>
</movable-view>
</movable-area>
</template>
<script>
export default {
name: "AiAdd",
props: {},
data() {
return {}
},
methods: {
add() {
console.log(789)
this.$emit("add")
}
}
}
</script>
<style lang="scss" scoped>
.movableArea {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 999;
uni-movable-view {
pointer-events: auto;
}
}
.AiAdd {
width: 96px;
height: 96px;
background: #1365DD;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
border-radius: 50%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
&:before, &:after {
content: "";
background: #FFFFFF;
display: block;
position: absolute;
border-radius: 4px;
}
&:before {
height: 48px;
width: 4px;
}
&:after {
height: 4px;
width: 48px;
}
}
</style>

View File

@@ -0,0 +1,118 @@
<template>
<section class="AiCard">
<div flex v-if="$slots.custom" class="start">
<div class="fill">
<slot name="custom"/>
</div>
<div v-if="$slots.menu" class="iconfont iconfont-iconMore" @tap.stop="handleMore"/>
</div>
<template v-else>
<u-row>
<div class="content">
<slot/>
</div>
<div btn @tap="$emit('send')">发送</div>
</u-row>
<u-row justify="space-between">
<slot v-if="$slots.title" name="title"/>
<div v-else>{{ cardTitle }}</div>
<div v-if="$slots.menu" class="iconfont iconfont-iconMore" @tap.stop="handleMore"/>
</u-row>
</template>
<div v-if="menu" class="mask" @click.stop="handleClose">
<div class="moreMenu" :style="menuPos">
<slot name="menu"/>
</div>
</div>
</section>
</template>
<script>
export default {
name: "AiCard",
props: {
cardTitle: String
},
data() {
return {
menuPos: {},
menu: false
}
},
methods: {
handleMore({detail}) {
this.menuPos = {
left: detail.x - 10 + 'px',
top: detail.y + 'px'
}
this.menu = !this.menu
},
handleClose() {
this.menu = false
}
}
}
</script>
<style lang="scss" scoped>
.AiCard {
width: 100%;
background: #FFFFFF;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.02);
border-radius: 8px;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
color: #999;
font-size: 26px;
flex-shrink: 0;
.content {
background: #F9F9F9;
border-radius: 4px;
min-height: 120px;
flex: 1;
min-width: 0;
margin-bottom: 26px;
padding: 20px;
box-sizing: border-box;
color: #333;
}
.u-row {
flex-wrap: nowrap;
}
div[btn] {
color: #1365DD;
padding: 0 0 0 18px;
cursor: pointer;
}
.iconfont-iconMore {
font-size: 38px;
transform: rotate(90deg);
}
.moreMenu {
position: fixed;
background: #FFFFFF;
box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
border-radius: 4px;
transform: translate(-100%, -100%);
min-width: 100px;
min-height: 100px;
z-index: 9;
}
.mask {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 11;
}
}
</style>

View File

@@ -0,0 +1,68 @@
<template>
<section class="AiMap">
<div ref="amap" class="map"/>
</section>
</template>
<script>
import AMapLoader from "@amap/amap-jsapi-loader";
export default {
name: "AiMap",
props: {
plugins: {default: () => ['AMap.DistrictSearch']},
map: Object,
lib: Object
},
data() {
return {
amap: null
}
},
methods: {
initMap() {
let {plugins} = this
AMapLoader.load({
key: '54a02a43d9828a8f9cd4f26fe281e74e',
version: '2.0',
plugins
}).then(AMap => {
this.amap = new AMap.Map(this.$refs.amap, {
resizeEnable: true,
zoom: 14,
})
this.$emit('update:lib', AMap)
this.$emit('update:map', this.amap)
})
},
},
mounted() {
this.initMap()
},
destroyed() {
this.amap?.destroy()
}
}
</script>
<style lang="scss" scoped>
.AiMap {
.map {
height: 100%;
}
::v-deep .amap-logo, ::v-deep .amap-copyright {
display: none !important;
}
::v-deep .amap-icon {
width: 40px !important;
height: 40px !important;
img {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@@ -0,0 +1,203 @@
<template>
<section class="AiTMap">
<div ref="tmap" class="map"/>
</section>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: "AiTMap",
props: {
/**
* 地区id
*/
areaId: String,
/**
* 地图参数,详情见https://lbs.qq.com/webApi/javascriptGL/glDoc/docIndexMap
*/
ops: {default: () => ({})},
/**
* 加载三方库,以腾讯地图文档要求进行添加
*/
libraries: {default: () => ["service"]},
/**
* 地图实例,支持用.sync绑定获取
*/
map: Object,
/**
* 地图库,支持用.sync绑定获取
*/
lib: Object,
},
computed: {
...mapState(['wxwork']),
key() {
return process.env.NODE_ENV == "production" ?
"RWWBZ-64BEJ-MVLFJ-FTHLQ-JTR6J-SAB2S" :
"3RZBZ-LZUCF-CT6J5-NWKZH-FCWOQ-UUFKY"
}
},
data() {
return {
tmap: null,
mapLib: null
}
},
methods: {
injectLib(url, cb) {
const script = document.createElement('script')
script.type = 'text/javascript';
script.id = "aitmap";
script.src = url;
script.addEventListener('load', () => {
cb && cb()
})
document.body.appendChild(script);
},
initTMap() {
let latLng = {}
if (this.wxwork.config.lat) { //通用版
latLng = this.wxwork.config
this.mapLib = TMap
this.tmap = new TMap.Map(this.$refs.tmap, {
zoom: 11,
center: new TMap.LatLng(latLng.lat, latLng.lng),
...this.ops
})
this.$emit('update:lib', TMap)
this.$emit('update:map', this.tmap)
this.$emit('loaded')
this.areaId && this.getMapArea()
} else { //上架版
uni.getLocation({
type: "gcj02",
success: res => {
latLng = {
lat: res.latitude,
lng: res.longitude
}
if (latLng.lat) {
// this.mapLib = TMap
// this.tmap = new TMap.Map(this.$refs.tmap, {
// zoom: 11,
// center: new TMap.LatLng(latLng.lat, latLng.lng),
// ...this.ops
// })
// this.$emit('update:lib', TMap)
// this.$emit('update:map', this.tmap)
// this.$emit('loaded')
// this.areaId && this.getMapArea()
}
}
})
this.mapLib = TMap
this.tmap = new TMap.Map(this.$refs.tmap, {
zoom: 11,
// center: new TMap.LatLng(latLng.lat, latLng.lng),
...this.ops
})
this.$emit('update:lib', TMap)
this.$emit('update:map', this.tmap)
this.$emit('loaded')
this.areaId && this.getMapArea()
}
},
fitBounds(latLngList, count = 0) {
// 由多边形顶点坐标数组计算能完整呈现该多边形的最小矩形范围
let {mapLib: TMap} = this
if (TMap) {
if (latLngList.length === 0) {
return null;
}
let boundsN = latLngList[0].getLat();
let boundsS = boundsN;
let boundsW = latLngList[0].getLng();
let boundsE = boundsW;
latLngList.forEach((point) => {
point.getLat() > boundsN && (boundsN = point.getLat());
point.getLat() < boundsS && (boundsS = point.getLat());
point.getLng() > boundsE && (boundsE = point.getLng());
point.getLng() < boundsW && (boundsW = point.getLng());
});
return new TMap.LatLngBounds(
new TMap.LatLng(boundsS, boundsW),
new TMap.LatLng(boundsN, boundsE)
);
} else {
if (count < 5) {
this.fitBounds(latLngList, ++count)
}
}
},
getMapArea() {
let {mapLib, areaId, tmap: map} = this, keyword = areaId.substring(0, 6)
let polygons = new TMap.MultiPolygon({map, geometries: []});
new mapLib.service.District({
polygon: 2,
maxOffset: 100
}).search({keyword}).then(res => {
if (res?.result) {
let center = res.result?.[0]?.[0]?.location
this.tmap.setCenter(center)
res.result.forEach((level) => {
level.forEach((place) => {
let bounds = [];
let newGeometries = place.polygon.map((polygon, index) => {
bounds.push(this.fitBounds(polygon)); // 计算能完整呈现行政区边界的最小矩形范围
return {
id: `${place.id}_${index}`,
paths: polygon, // 将得到的行政区划边界用多边形标注在地图上
};
});
bounds = bounds.reduce((a, b) => {
return this.fitBounds([
a.getNorthEast(),
a.getSouthWest(),
b.getNorthEast(),
b.getSouthWest(),
]);
}); // 若一行政区有多个多边形边界,应计算能包含所有多边形边界的范围。
polygons.updateGeometries(newGeometries);
this.tmap.fitBounds(bounds);
});
});
}
})
}
},
mounted() {
if (!window?.TMap) {
window.initTMap = this.initTMap
this.injectLib(`https://map.qq.com/api/gljs?v=1.exp&key=${this.key}&libraries=${this.libraries.toString()}&callback=initTMap`)
} else {
this.initTMap()
}
},
destroyed() {
this.map.destroy()
}
}
</script>
<style lang="scss" scoped>
.AiTMap {
width: 100%;
height: 100%;
flex: 1;
min-width: 0;
min-height: 0;
::v-deep.map {
height: 100%;
& > div > div {
&:nth-of-type(2), &:nth-of-type(3) {
display: none;
}
}
}
}
</style>

View File

@@ -0,0 +1,296 @@
<template>
<div class="Add">
<u-navbar back-icon-color="#000" title="事件添加" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto">
<div class="border-r">
<u-form-item label="事件类型" prop="groupName" required :border-bottom="false" right-icon="arrow-right" class="border">
<span @click="show = true" class="right-span" :style="forms.groupName ? '' : 'color:#999;'">{{ forms.groupName || '请选择事件类型' }}</span>
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item label="事件描述" prop="content" required :border-bottom="false" label-position="top" class="form-contents">
<u-input v-model="forms.content" placeholder="请输入事件描述..." type="textarea" auto-height height="100" maxlength="500"/>
</u-form-item>
</div>
<div class="border-r">
<u-form-item label="上报位置" prop="mapInfo" required :border-bottom="false" right-icon="arrow-right" class="border">
<span @click="chooseAddress" class="right-span" :style="forms.address ? '' : 'color:#999;'">{{ forms.address || '请选择上报位置' }}</span>
</u-form-item>
<u-form-item label="所属网格" prop="girdName" required :border-bottom="false">
<AiPagePicker type="gird" @select="confirmGird" valueObj nodeKey="id" :params="{formType:2, axiosUrl:'/app/appgirdmemberinfo/queryMyGirdList'}" class="right-span">
<AiMore v-model="forms.girdName" placeholder="请选择所属网格"/>
</AiPagePicker>
</u-form-item>
</div>
<div class="border-r">
<u-form-item label="图片上传(最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item>
</div>
<div class="border-r">
<u-form-item label="姓名" prop="name" required :border-bottom="false" class="border">
<u-input v-model="forms.name" placeholder="请输入姓名" />
</u-form-item>
<u-form-item label="联系方式" prop="phone" required :border-bottom="false" >
<u-input v-model="forms.phone" placeholder="请输入联系方式" />
</u-form-item>
</div>
</u-form>
</div>
<!-- <div class="btn" @click="confirm">
<span>提交</span>
</div> -->
<div class="footer" @click="confirm">
<div class="btn">保存</div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'Add',
customNavigation: true,
data() {
return {
forms: {
groupName: '',
groupId: '',
content: '',
mapInfo: {address: ''},
girdId: '',
girdName: '',
files: [],
name: '',
phone: '',
girdMemberId: '',
girdMemberName: '',
address: '',
lat: '',
lng: ''
},
flag: false,
show: false,
myList: [],
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
computed: {
...mapState(['user']),
},
onLoad() {
this.typeList()
this.forms.girdId = this.user.girdInfos2G[0].girdId
this.forms.girdName = this.user.girdInfos2G[0].girdName
// this.forms.girdMemberId = this.user.girdMemberId
// this.forms.girdMemberName = this.user.name
},
onShow() {
this.forms.name = this.user.name
this.forms.phone = this.user.phone
},
methods: {
chooseAddress() {
uni.authorize({
scope: 'scope.userLocation',
success: () => {
uni.chooseLocation({
success: res => {
this.forms.address = res.address
this.forms.lat = res.latitude
this.forms.lng = res.longitude
}
})
},
fail: () => {
this.$dialog.confirm({
content: '您未授权定位权限,无法选择位置'
}).then(() => {
wx.openSetting({
success: res => {
if (!res.authSetting['scope.userLocation']) {
this.$dialog.alert({
content: '您未授权定位权限,无法选择位置'
}).then(() => {
})
} else {
console.log('设置定位权限')
}
}
})
})
}
})
},
typeList() {
this.$instance.post(`/app/apppatrolreportgroupv2/list`, null, {
params: {
size: 9999,
},
}).then((res) => {
if (res.code == 0) {
this.myList = res.data.records
this.$forceUpdate()
}
})
},
selectStatus(e) {
this.forms.groupName = e[0].label
this.forms.groupId = e[0].value
},
confirmGird(v) {
this.forms.girdId = v.id
this.forms.girdName = v.girdName
},
toMap() {
uni.navigateTo({url: `./Map`})
},
confirm() {
if(this.flag) return
if (!this.forms.groupName) {
return this.$u.toast('请选择事件类型')
}
if (!this.forms.content) {
return this.$u.toast('请输入事件描述')
}
if (!this.forms.address) {
return this.$u.toast('请选择上报位置')
}
if (!this.forms.girdName) {
return this.$u.toast('请选择所属网格')
}
if (!this.forms.name) {
return this.$u.toast('请输入姓名')
}
if (!this.forms.phone) {
return this.$u.toast('请输入手机号')
}
this.flag = true
this.$instance.post(`/app/apppatrolreportinfov2/addByGirdMember`, {...this.forms}).then((res) => {
if (res.code == 0) {
this.$u.toast('事件添加成功')
uni.$emit('getListInit')
setTimeout(() => {
uni.navigateBack()
}, 600)
}
})
},
},
}
</script>
<style scoped lang="scss">
.Add {
height: 100%;
.header-content-bg {
width: 100%;
position: fixed;
z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.contents {
width: calc(100% - 64px);
margin: 16px 0 0 32px;
padding-bottom: 252px;
.border-r {
border-radius: 16px;
margin-bottom: 32px;
background-color: #fff;
}
::v-deep .u-form {
.u-form-item {
padding-left: 32px;
padding-right: 32px;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
text-align: right !important;
}
}
}
}
.form-contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
}
}
}
}
.avatars {
padding-bottom: 20px !important;
}
}
::v-deep .u-form-left__content--required {
font-size: 32px!important;
}
}
.border {
::v-deep .u-form-item {
border-bottom: 1px solid #ddd;
}
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
background-color: #F4F5FA;
padding: 64px 64px 68px 64px;
z-index: 9;
.btn {
width: calc(100% - 128px);
line-height: 88px;
background: #026AF2;
border-radius: 44px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 34px;
color: #FFF;
text-align: center;
}
}
.right-span {
display: inline-block;
width: 100%;
text-align: right;
::v-deep .u-icon__label {
font-size: 28px!important;
}
::v-deep .uicon-arrow-right{
color: #c0c4cc!important;
}
}
::v-deep .uni-input-placeholder {
color: #999!important;
font-size: 28px!important;
}
}
</style>

View File

@@ -0,0 +1,175 @@
<template>
<div class="AppPatrolReport">
<u-navbar back-icon-color="#000" title="事件上报" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<!-- <component v-if="refresh && isGridMember" :is="component" @change="onChange" :params="params" :ref="component"/> -->
<div class="footer-tabs" v-if="isTab && isGridMember">
<div class="item" @click="tabClick(index, item.component)" v-for="(item, index) in tabs" :key="index">
<img :src="tabIndex == index ? item.activeImg : item.img" alt=""/>
<p :class="tabIndex == index ? 'color-3267F0' : ''">{{ item.text }}</p>
</div>
</div>
<div v-if="!isGridMember" class="empty">
<img src="./components/img/no-admin.png" alt="">
<p>没有网格员权限<br/>无法查看事件上报信息哦~</p>
</div>
<List v-if="refresh && isGridMember && component == 'List' " @change="onChange" :params="params" ref="List" />
<Statistics v-if="refresh && isGridMember && component == 'Statistics' " @change="onChange" :params="params" ref="Statistics" />
</div>
</template>
<script>
import List from './List.vue'
import Statistics from './Statistics.vue'
import {mapState} from 'vuex'
export default {
name: 'AppPatrolReport',
appName: '事件上报',
customNavigation: true,
data() {
return {
component: 'Statistics',
params: {},
refresh: true,
tabIndex: 1,
tabs: [
{
img: 'https://cdn.sinoecare.com/i/2024/07/17/6697387277fa3.png',
activeImg: 'https://cdn.sinoecare.com/i/2024/07/17/66973872e46ed.png',
text: '办理',
component: 'List',
},
{
img: 'https://cdn.sinoecare.com/i/2024/07/17/669738737266b.png',
activeImg: 'https://cdn.sinoecare.com/i/2024/07/17/66973873df9b6.png',
text: '统计',
component: 'Statistics',
},
],
isTab: true,
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
computed: {
...mapState(['user']),
isGridMember() {
return this.user.girdInfos2G != null
}
},
components: {
List,
Statistics,
},
methods: {
onChange(e) {
this.params = e.params
this.component = e.type
},
tabClick(index, component) {
this.tabIndex = index
this.component = component
this.refresh = false
this.$nextTick(() => {
this.refresh = true
})
}
},
onLoad() {
uni.$on('hideTab', () => {
this.isTab = false
})
uni.$on('showTab', () => {
this.isTab = true
})
// if (!this.tabIndex) {
// this.$nextTick(() => this.$refs['List'].getListInit())
// }
},
onReachBottom() {
// if (!this.tabIndex) {
// this.$nextTick(() => this.$refs['List'].nextPage())
// }
},
}
</script>
<style lang="scss" scoped>
uni-page-body {
height: 100%;
background: #F4F5FA;
}
.AppPatrolReport {
height: 100%;
}
.header-content-bg {
width: 100%;
position: fixed;
z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.footer-tabs {
width: 100%;
height: 100px;
padding-bottom: 68px;
background: #fff;
border-top: 1px solid #ddd;
position: fixed;
bottom: 0;
left: 0;
z-index: 9;
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;
}
}
}
.empty {
text-align: center;
img {
width: 282px;
height: 306px;
margin: 136px auto 0;
}
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
}
}
</style>

View File

@@ -0,0 +1,265 @@
<template>
<div class="Transfer">
<u-navbar back-icon-color="#000" title="事件上报" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<div class="border-r">
<u-form-item label="转交给" prop="status" required :border-bottom="false" class="border" right-icon="arrow-right" v-if="status == 1">
<u-input v-model="forms.name" placeholder="请选择转交人员" disabled @click="toSelectUser" />
</u-form-item>
<u-form-item label="事件分类" prop="groupName" required :border-bottom="false" class="border" right-icon="arrow-right" v-if="status != 1">
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
<span @click="show = true" class="right-span" :style="forms.groupName ? '' : 'color:#999;'">{{ forms.groupName || '请选择事件分类' }}</span>
<u-select v-model="show" :list="myList" value-name="id" label-name="groupName" @confirm="selectStatus"></u-select>
</u-form-item>
<u-form-item :label="status == 3 ? '办结意见' : status == 2 ? '拒绝受理意见' : '办理意见'" prop="content" required :border-bottom="false" label-position="top"
class="form-contents">
<u-input v-model="forms.content" :placeholder="status == 2 ? '请写下拒绝受理意见…' : '请写下你的办结意见...'" type="textarea" auto-height height="100" maxlength="500"/>
</u-form-item>
</div>
<div class="border-r">
<u-form-item label="图片上传(最多9张)" prop="files" :border-bottom="false" class="avatars" label-position="top">
<AiUploader :def.sync="forms.files" multiple placeholder="上传图片" :limit="9" action="/admin/file/add2"></AiUploader>
</u-form-item>
</div>
</u-form>
</div>
<!-- <div class="btn" v-if="this.status == 1" @click="confirm">
<span>转交事件</span>
</div>
<div class="btn" v-if="this.status == 2" @click="confirm">
<span>拒绝受理</span>
</div>
<div class="btn" v-if="this.status == 3" @click="confirm">
<span>我已办结</span>
</div> -->
<div class="footer" @click="confirm">
<div class="btn">{{titleList[status]}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'Content',
customNavigation: true,
data() {
return {
forms: {
groupName: '',
groupId: '',
content: '',
files: [],
name: ''
},
flag: false,
show: false,
status: '', //1转交 2拒绝受理 3我已办结
myList: [],
id: '',
selectUser: {},
titleList: ['', '转交事件', '拒绝受理', '我已办结'],
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
onLoad(option) {
this.status = option.status
this.id = option.id
this.forms.groupId = option.groupId
this.forms.groupName = option.groupName
this.typeList()
uni.$on('goback', (res) => {
this.selectUser = res
this.forms.girdId = res.girdId
this.forms.girdName = res.girdName
this.forms.girdMemberId = res.id
this.forms.girdMemberName = res.name
this.forms.name = `${res.girdName}${res.name ? '-' + res.name : ''}`
})
},
onShow() {
// document.title = this.titleList[this.status]
},
methods: {
typeList() {
this.$instance.post(`/app/apppatrolreportgroupv2/list`, null, {
params: {
size: 9999,
},
})
.then((res) => {
if (res.code == 0) {
this.myList = res.data.records
this.$forceUpdate()
}
})
},
confirm() {
if(this.flag) return
if (this.status == 1 && !this.forms.name) {
return this.$u.toast('请选择转交对象')
}
if (this.status != 1 && !this.forms.groupName) {
return this.$u.toast('请选择分类')
}
if (this.status != 1 && !this.forms.content) {
return this.$u.toast('请输入意见')
}
this.flag = true
this.submit()
},
submit() { //status 1转交 2拒绝受理 3我已办结
var url = '', successText = '', params = ''
if (this.status == 1) {
url = `/app/apppatrolreportinfov2/transfer`
successText = '转交成功'
params = {
...this.forms,
// girdId: this.selectUser.id,
// girdName: this.selectUser.girdName,
}
// if (this.selectUser.name) { //选择的网格员
// params.girdId = this.selectUser.girdId
// params.girdMemberId = this.selectUser.id
// params.girdMemberName = this.selectUser.name
// }
}
if (this.status == 2) {
url = `/app/apppatrolreportinfov2/finish`
successText = '拒绝成功'
params = {...this.forms, eventStatus: 0}
}
if (this.status == 3) {
url = `/app/apppatrolreportinfov2/finish`
successText = '办结成功'
params = {...this.forms, eventStatus: 1}
}
params.id = this.id
this.$instance.post(url, params).then((res) => {
if (res.code == 0) {
this.$u.toast(successText)
uni.$emit('updateDeatil')
uni.$emit('getListInit')
setTimeout(() => {
if (this.status == 1) {
uni.navigateBack({delta: 2})
} else {
uni.navigateBack()
}
}, 600)
}
})
},
selectStatus(e) {
this.forms.groupName = e[0].label
this.forms.groupId = e[0].value
},
toSelectUser() {
uni.navigateTo({url: `./SelectUser?detailId=${this.id}`})
},
},
}
</script>
<style scoped lang="scss">
.Transfer {
height: 100%;
.header-content-bg {
width: 100%;
position: fixed;
z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.border-r {
border-radius: 16px;
margin-bottom: 32px;
background-color: #fff;
}
.contents {
width: calc(100% - 64px);
margin: 16px 0 0 32px;
padding-bottom: 252px;
}
::v-deep .u-form {
.u-form-item {
padding-left: 32px;
padding-right: 32px;
.u-form-item__body {
.u-form-item--right__content__slot {
padding-bottom: 0;
.u-input {
text-align: right !important;
}
}
}
}
.form-contents {
padding-bottom: 20px !important;
.u-form-item__body {
.u-form-item--right__content__slot {
.u-input {
text-align: left !important;
}
}
}
}
}
.border {
::v-deep .u-form-item {
border-bottom: 1px solid #ddd;
}
}
.avatars {
padding-bottom: 20px !important;
}
::v-deep .u-form-left__content--required {
font-size: 32px!important;
}
.footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
background-color: #F4F5FA;
padding: 64px 64px 68px 64px;
z-index: 9;
.btn {
width: calc(100% - 128px);
line-height: 88px;
background: #026AF2;
border-radius: 44px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 34px;
color: #FFF;
text-align: center;
}
}
.right-span {
display: inline-block;
width: 100%;
text-align: right;
}
::v-deep .AiPagePicker {
width: 100%;
text-align: right;
}
}
</style>

View File

@@ -0,0 +1,491 @@
<template>
<div class="Detail">
<u-navbar back-icon-color="#000" title="事件上报" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<div class="border-r">
<div class="header-top">
<div class="avatars" v-if="data.name">{{ data.name.substring(data.name.length, data.name.length - 2) }}</div>
<div class="right">
<div class="names">{{ data.name }}的上报</div>
<div class="times">{{ data.createTime }}</div>
</div>
</div>
<div class="header-middle">
<div class="titles">{{ data.content }}</div>
<span class="status status0" :class="detailStatus.cls" v-if="data.eventStatus"> {{ detailStatus.label }}</span>
<div class="card">
<span class="card-left">事件来源</span>
<span class="card-right">{{ $dict.getLabel('residentEventSource', data.eventSource) }}</span>
</div>
<div class="card">
<span class="card-left">事件类型</span>
<span class="card-right">{{ data.groupName }}</span>
</div>
<div class="card">
<span class="card-left">所属网格</span>
<span class="card-right">{{ data.girdName }}</span>
</div>
<div class="card">
<span class="card-left">联系方式</span>
<span class="card-right">
<span> {{ data.phone }}</span>
<u-icon name="phone-fill" color="#3D94FB" @click="callPhone(data.phone)"></u-icon>
</span>
</div>
<div class="card">
<span class="card-left">上报地址</span>
<span class="card-right">
<span>{{ data.address }}</span>
</span>
</div>
<!-- 暂时先去掉 -->
<!-- <div class="card">
<span class="card-left">上报来源</span>
<span class="card-right">三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报三角湖居民社群 李毅 小程序填报</span>
</div> -->
<div class="cards">
<span class="card-left">照片</span>
</div>
<img :src="item.url" alt="" v-for="(item, i) in data.files" :key="i" @click="previewImage(data.files, item.url)"/>
</div>
</div>
<div class="border-r">
<div class="header-bottom">
<div class="plain">
<div class="nav">
<span>办理进度</span>
<span> ({{ detailStatus.label }})</span>
</div>
<div class="plain-item" v-for="(item, index) in process" :key="index">
<div class="item-content">
<div class="user-name-bg">
<span v-text="formatName(item.systemExplain)"/>
</div>
<div class="content-right">
<p class="explain">{{item.systemExplain}}</p>
<p class="time">{{ item.doTime }}</p>
<p class="status">{{item.statusLabel}}</p>
</div>
<div class="lines"/>
</div>
<div class="cardes-msg-top" v-if="item.doExplain">{{ item.doExplain }}</div>
<div class="imgs">
<img :src="e.url" alt="" v-for="(e, index) in item.files" :key="index" @click="previewImage(item.files, e.url)"/>
</div>
</div>
</div>
</div>
</div>
<div class="footer" v-if="data.eventStatus == 0">
<div class="btn">
<div class="flex trans" v-if="data.powerTransmit" @click="toContent(1)">转交事件</div>
<div class="flex cancel" v-if="data.powerHandle" @click="toContent(2)">
<div>拒绝受理</div>
</div>
<div class="flex confirm" @click="toContent(3)">
<div>我来受理</div>
</div>
</div>
</div>
<div class="footer" v-if="data.eventStatus == 1">
<div class="btn">
<div class="flex trans" v-if="data.powerTransmit" @click="toContent(1)">转交事件</div>
<div class="flex cancel" v-if="data.powerHandle" @click="toContent(2)">
<div>拒绝受理</div>
</div>
<div class="flex confirm" v-if="data.powerHandle" @click="toContent(3)">
<div>我来受理</div>
</div>
</div>
</div>
<AiEvaluation v-show="false" v-model="evaluation" :bid="data.id"/>
<u-modal v-model="doItShow" :mask-close-able="true" z-index="99" content="确定受理该事件?" :show-cancel-button="true" @confirm="doThings"></u-modal>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
name: 'Detail',
customNavigation: true,
props: {},
data() {
return {
data: {},
id: '',
doItShow: false,
evaluation: {},
isShowBtn: false,
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
computed: {
...mapState(['user']),
detailStatus: v => {
const status = !v.evaluation.id ? v.data.eventStatus : 'evaluation'
return {
cls: 'status' + status,
label: !v.evaluation.id ? v.$dict.getLabel('clapEventStatus', v.data.eventStatus) : "已评价"
}
},
process() {
const getAvatar = str => str?.substring(str?.length, str?.length - 2)
const list = this.data.processList.map(e => ({
...e,
avatar: getAvatar(e.girdMemberName),
statusLabel: this.$dict.getLabel('residentReportDoStatus', e.doStatus)
}))
if (this.evaluation.id) {
const {id, createUserName, score, files, createTime: doTime, content: doExplain} = this.evaluation
list.splice(0, 0, {
id, doTime, doExplain,
statusLabel: `${score}星评价`,
avatar: getAvatar(createUserName),
systemExplain: `${createUserName}完成评价`,
files: files
})
}
return list
}
},
watch: {},
onLoad(o) {
this.isShowBtn = o.isShowBtn == 1 ? true : false
this.id = o.id
this.$dict.load('clapEventStatus','residentEventSource', 'residentReportDoStatus').then(() => {
this.getDetail()
})
uni.$on('updateDeatil', () => {
this.getDetail()
})
},
methods: {
getDetail() {
this.$instance.post(`/app/apppatrolreportinfov2/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = res.data
}
})
},
callPhone(phone) {
uni.makePhoneCall({phoneNumber: phone})
},
doThings() {
this.$instance.post(`/app/appresidentreportinfov2/finivsh`, {
id: this.id,
eventStatus: 1
}).then((res) => {
if (res.code == 0) {
this.$u.toast('受理成功')
this.getDetail()
}
})
},
toContent(status) {
// if(status == 3 && !this.data.doRight) {
// return this.$u.toast('没有办理权限')
// }
uni.navigateTo({url: `./Content?status=${status}&groupId=${this.data.groupId}&groupName=${this.data.groupName}&id=${this.id}`})
},
previewImage(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
formatName(name) {
if (name == undefined) {
return
}
return name.substr(0, 2)
},
},
}
</script>
<style scoped lang="scss">
uni-page-body {
height: 100%;
background: #F4F5FA;
}
.Detail {
height: 100%;
padding-bottom: 220px;
.header-content-bg {
width: 100%;
position: fixed;
z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.border-r {
width: calc(100% - 64px);
margin: 0 0 32px 32px;
background-color: #fff;
border-radius: 16px;
}
.header-top {
display: flex;
margin: 16px 0 30px 0;
padding: 32px 32px 0;
.avatars {
width: 80px;
height: 80px;
line-height: 80px;
background: #3975c6;
border-radius: 50%;
color: #fff;
text-align: center;
font-size: 28px;
font-weight: 500;
margin-right: 16px;
}
.right {
.names {
line-height: 24px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #333;
margin-bottom: 16px;
}
.times {
font-family: PingFangSC-Regular;
font-size: 28px;
color: #999;
line-height: 22px;
}
}
}
.header-middle {
padding: 0 0 32px 32px;
.titles {
width: calc(100% - 32px);
word-break: break-all;
font-family: PingFangSC-SNaNpxibold;
font-weight: 600;
font-size: 36px;
color: #333;
line-height: 56px;
margin-bottom: 20px;
}
.status {
display: inline-block;
margin-bottom: 14px;
padding: 4px 8px;
font-size: 26px;
color: #fff;
border-radius: 8px;
}
.status0 {
background: #ff883c;
}
.status1, .statusevaluation {
background: #1aaaff;
}
.status2 {
background: #42d784;
}
.status3 {
background: #ff4466;
}
.card {
display: flex;
padding: 34px 32px 34px 0;
border-bottom: 1px solid #ddd;
box-sizing: border-box;
line-height: 44px;
font-family: PingFangSC-Regular;
font-size: 32px;
.card-left {
width: 136px;
color: #999;
}
.card-right {
width: calc(100% - 136px);
text-align: right;
::v-deep u-icon {
margin-left: 8px;
}
}
}
// .card:last-child {
// border-bottom: none;
// }
.cards {
padding: 34px 0;
}
img {
width: 225px;
height: 226px;
margin: 0 8px 8px 0;
}
img:nth-of-type(3n) {
margin-right: 0;
}
}
.header-bottom {
padding-bottom: 32px;
.nav {
padding: 26px 0;
}
.plain {
padding: 0 32px;
.plain-item {
position: relative;
padding-bottom: 80px;
.item-content {
display: flex;
justify-content: space-between;
.user-name-bg {
position: relative;
width: 80px;
height: 80px;
text-align: center;
line-height: 80px;
color: #fff;
background: #197df0;
border: 1px solid #dddddd;
border-radius: 50%;
font-size: 28px;
z-index: 9;
}
.content-right {
width: calc(100% - 110px);
font-family: PingFangSC-Regular;
.explain {
line-height: 44px;
font-size: 32px;
color: #333;
margin-bottom: 8px;
}
.time {
line-height: 40px;
font-size: 28px;
color: #999;
margin-bottom: 16px;
}
.status {
line-height: 40px;
font-size: 28px;
color: #4CB364;
}
}
.lines {
position: absolute;
top: 0;
left: 40px;
width: 4px;
height: 100%;
background: #eeeeee;
}
}
.cardes-msg-top {
font-size: 28px;
color: #343d65;
margin-top: 10px;
margin-left: 110px;
}
.imgs {
margin-top: 10px;
margin-left: 110px;
img {
width: 136px;
height: 136px;
border-radius: 4px;
margin-right: 12px;
}
img:nth-of-type(3n) {
margin-right: 0;
}
}
}
.plain-item:last-child {
.lines {
width: 0;
height: 0;
}
}
}
}
.footer {
padding: 32px 32px 68px;
width: 100%;
box-sizing: border-box;
background-color: #F4F5FA;
position: fixed;
bottom: 0;
left: 0;
z-index: 99;
.btn {
width: 100%;
display: flex;
padding: 30px 28px;
box-sizing: border-box;
background-color: #fff;
border-radius: 16px;
.flex {
flex: 1;
line-height: 88px;
font-family: PingFangSC-Regular;
font-size: 34px;
box-sizing: border-box;
}
.trans {
color: #222;
border-right: 1px solid #ddd;
}
.cancel {
color: #FF3C3C;
div {
width: 100%;
padding-left: 28px;
}
}
.confirm {
flex: 1.2;
div {
width: 100%;
background-color: #026AF2;
color: #fff;
border-radius: 44px;
text-align: center;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,397 @@
<template>
<div class="list">
<div class="top-tab" :style="{'top': `${statusBarHeight+50}px`}">
<u-tabs :list="tabList" :is-scroll="false" :current="currentTabs" height="96" bg-color="#fff" inactive-color="#222"
active-color="#1D2229" :bar-style="barStyle" font-size="34" @change="change"></u-tabs>
<div class="select-top">
<div class="tab-item">
<AiPagePicker type="gird" valueObj nodeKey="id" formType="2" @select="handleSelectGird" action="/app/appgirdmemberinfo/queryMyGirdList">
<span :class="searchGrid.girdName ? 'grid-name' : 'grid-name color-666'">{{searchGrid.girdName || '所属网格'}}</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px" />
</AiPagePicker>
</div>
<div class="tab-item" @click="showType = true">
<span :class="eventStatusText ? 'grid-name' : 'grid-name color-666'">{{eventStatusText || '办件状态'}}</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px" />
</div>
<u-select v-model="showType" :list="listType" value-name="dictValue" label-name="dictName" @confirm="confirm"></u-select>
</div>
</div>
<div class="list-content">
<div class="item" v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<div class="card-top">
<div class="titles">{{ item.content }}</div>
<div class="source-type">{{ $dict.getLabel('residentEventSource', item.eventSource) }}</div>
<div class="info">
<span>事件类型</span>
<span class="value">{{ item.groupName }}</span>
</div>
<div class="info">
<span>所属网格</span>
<span class="value">{{ item.girdName }}</span>
</div>
</div>
<div class="card-bottom">
<div class="status" v-if="item.eventStatus"
:class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'">
<span class="icon"></span>
<span>{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}</span>
</div>
<div class="level-type">中风险纠纷</div>
</div>
</div>
<ai-empty v-if="!datas.length" />
</div>
<div class="ai-add" @click="toAdd"></div>
<!-- <AiAdd @add="toAdd" /> -->
</div>
</template>
<script>
import {mapState} from 'vuex'
import AiEmpty from '../../../components/AiEmpty/AiEmpty.vue'
export default {
components: { AiEmpty },
customNavigation: true,
props: {},
data() {
return {
datas: [],
tabList: [
{
name: '全部待办',
},
{
name: '办件历史',
},
],
currentTabs: 0,
current: 1,
pages: 0,
searchGrid: {girdName: ''},
showType: false,
eventStatus: '',
eventStatusText: '',
isAdd: true,
barStyle: {
'width': '20px',
'height': '4px',
'border-radius': '3px',
'bottom': '-4px',
'background': '#026AF2'
},
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
}
},
computed: {
...mapState(['user']),
listType() {
return this.$dict.getDict(this.currentTabs == 0 ? 'clapEventStatusAll' : 'clapEventStatusHistory')
}
},
mounted() {
console.log(1)
this.searchGrid.girdId = this.user.girdId
this.searchGrid.girdName = this.user.girdName
this.current = 1
this.$dict.load('clapEventStatus', 'clapEventStatusAll', 'clapEventStatusHistory', 'residentEventSource').then(() => {
this.getList()
this.getIsAdd()
})
},
methods: {
getListInit() {
this.current = 1
this.getList()
},
nextPage() {
this.current++
this.getList()
},
getList() {
let {current, eventStatus, searchGrid: {id: girdId}} = this
this.$instance.post(`/app/apppatrolreportinfov2/listByGirdMember`, null, {
params: {
size: 10,
current,
eventStatus,
girdId,
searchType: this.currentTabs,
},
}).then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
this.$forceUpdate()
}
})
},
confirm(e) {
if (this.showType) {
this.eventStatus = e[0].value
this.eventStatusText = e[0].label
}
this.current = 1
this.getList()
},
handleSelectGird(v) {
this.searchGrid = v
this.current = 1
this.getList()
},
clearGrid() {
this.searchGrid = {girdName: ''}
this.current = 1
this.getList()
},
goDetail(item) {
uni.navigateTo({url: `./Detail?id=${item.id}&isShowBtn=1`})
},
change(index) {
this.current = 1
this.datas = []
this.eventStatus = ''
this.currentTabs = index
this.getList()
},
linkTo(url) {
uni.navigateTo({url})
},
toAdd() {
console.log(123)
uni.navigateTo({url: './Add'})
},
getIsAdd() {
this.$instance.post(`/app/apppatrolreportinfov2/checkGirdMemberUser`).then((res) => {
if (res.code == 0) {
this.isAdd = res.data
}
})
},
},
}
</script>
<style scoped lang="scss">
.list {
height: 100%;
padding: 0;
width: 100vw;
background-color: #F4F5FA;
.top-tab {
width: calc(100% - 64px);
box-sizing: border-box;
position: fixed;
left: 32px;
z-index: 9;
}
::v-deep .u-tabs {
border-bottom: 1px solid #eee;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
}
.select-top {
background: #fff;
display: flex;
padding: 24px 0;
border-bottom-left-radius: 16px;
border-bottom-right-radius: 16px;
.tab-item {
flex: 1;
text-align: center;
line-height: 48px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
img {
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
.grid-name {
display: inline-block;
line-height: 40px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28px;
color: #333;
}
.color-666 {
color: #666;
}
}
.list-content {
margin: 244px 0 200px 32px;
}
.item {
width: calc(100% - 32px);
background: #FFF;
box-shadow: 0 0 4px 0 #00000005;
border-radius: 16px;
margin-bottom: 32px;
.card-top {
width: 100%;
padding: 32px 32px 24px 32px;
box-sizing: border-box;
position: relative;
.titles {
width: calc(100% - 132px);
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 44px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #333;
margin-bottom: 24px;
}
.source-type {
padding: 0 10px;
line-height: 44px;
background-color: #EBF3FE;
border-radius: 6px;
font-family: PingFangSC-Regular;
font-size: 24px;
color: #3D88F5;
position: absolute;
top: 32px;
right: 32px;
}
.info {
line-height: 40px;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28px;
color: #999;
margin-bottom: 8px;
.value {
display: inline-block;
margin-left: 24px;
color: #333;
}
}
}
.card-bottom {
display: flex;
justify-content: space-between;
padding: 32px;
border-top: 1px solid #ddd;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28px;
}
.status {
.icon {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
margin-right: 16px;
border-radius: 50%;
}
}
.status0 {
color: #ff883c;
.icon {
background: #ff883c;
}
}
.status1 {
color: #1aaaff;
.icon {
background: #1aaaff;
}
}
.status2 {
color: #42d784;
.icon {
background: #42d784;
}
}
.status3 {
color: #ff4466;
.icon {
background: #ff4466;
}
}
.level-type0 {
color: #52C75B;
}
.level-type1 {
color: #FF883C;
}
.level-type2 {
color: #FF3C3C;
}
}
.ai-add {
width: 96px;
height: 96px;
background: #1365DD;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
border-radius: 50%;
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
position: fixed;
bottom: 240px;
right: 32px;
&:before, &:after {
content: "";
background: #FFFFFF;
display: block;
position: absolute;
border-radius: 4px;
}
&:before {
height: 48px;
width: 4px;
}
&:after {
height: 4px;
width: 48px;
}
}
}
</style>

View File

@@ -0,0 +1,321 @@
<template>
<div class="map">
<!-- <div class="build-btn locate" @click="getLocale">
<img src="https://cdn.cunwuyun.cn/dvcp/h5/Location2.png" alt=""/>
当前<br>位置
</div> -->
<div class="address-search">
<div class="address-search__wrapper">
<image src="./components/img/search.png" />
<input placeholder-style="color: #98A6B6" placeholder="搜索地点" v-model="address" @input="onChange">
</div>
</div>
<scroll-view scroll-y scroll-into-view="address-item1" v-if="addressList.length">
<div class="address-item" :id="'address-item' + index" v-for="(item, index) in addressList" :key="index" @click="chooseAddress(index)">
<div class="left">
<h2>{{ item.title }}</h2>
<p>{{ item.address }}</p>
</div>
<!-- <div class="right" :class="[currIndex === index ? 'active' : '']"></div> -->
</div>
</scroll-view>
<div class="map-content">
<AiTMap :map.sync="map" :lib.sync="lib" :ops="ops" :libraries="['service', 'tools']"/>
</div>
<div class="footer">
<div class="btn" @click="confirm">确认定位</div>
</div>
</div>
</template>
<script>
import {mapState, mapActions} from 'vuex'
export default {
data() {
return {
ops: {},
lib: null,
map: null,
markerLayer: '',
isFlag: false,
latLng: {lat: '', lng: ''},
address: '',
addressList: []
}
},
computed: {...mapState(['user'])},
mounted() {
this.initMap()
},
onShow() {
// document.title = "选择上报位置"
},
methods: {
...mapActions(['injectJWeixin']),
initMap(retryTimes = 0) { //初始化地图
this.$nextTick(() => {
let {map} = this
if (map) {
map.setZoom(15)
map.on("click", (evt) => {
this.handleMapClick(evt)
});
} else {
if (retryTimes < 10)
setTimeout(() => {
this.initMap(++retryTimes)
}, 500)
else console.error("地图渲染失败")
}
})
},
onChange () {
if (this.timeout) {
clearTimeout(this.timeout)
}
this.timeout = setTimeout(() => {
this.currIndex = -1
new this.lib.service.Suggestion({
pageSize: 20
}).getSuggestions({
keyword: this.address
}).then(res => {
this.addressList = []
if (res.data.length) {
this.addressList = res.data
}
})
}, 500)
},
getAddress () {
new this.lib.service.Search({
pageSize: 20
}).explore({
center: this.latLng,
radius: 2000,
orderBy: '_distance'
}).then(res => {
this.addressList = []
if (res.data.length) {
this.addressList = res.data
}
})
},
chooseAddress (index) {
this.address = this.addressList[index].address
this.latLng = {lat: this.addressList[index].location.lat, lng: this.addressList[index].location.lng}
this.addMarker(this.addressList[index].location)
},
addMarker (position) {
if (this.marker) {
this.marker.setMap(null)
this.marker = null
}
this.marker = new this.lib.MultiMarker({
id: 'marker-layer',
map: this.map,
styles: {
marker: new this.lib.MarkerStyle({
width: 30,
height: 45,
anchor: { x: 10, y: 30 }
}),
},
geometries: [{
id: 'marker',
styleId: 'marker',
position: position,
properties: {
title: 'marker'
}
}]
})
this.easeTo(position)
},
easeTo (position) {
this.map.easeTo({
center: position,
zoom: 17
},
{ duration: 500 })
},
handleMapClick(evt) {
console.log(evt)
let {lib: TMap, map} = this
if (this.markerLayer) {
this.markerLayer.setMap(null);
}
this.markerLayer = new TMap.MultiMarker({id: 'marker-layer', map});
this.markerLayer.add({
position: evt.latLng
});
this.latLng = evt.latLng
var geocoder = new TMap.service.Geocoder();
geocoder.getAddress({ location: this.latLng }).then((result) => {
this.address = result.result.address;
});
},
confirm() {
if (!this.latLng.lat) {
return this.$u.toast(`未获取到定位信息,无法定位`)
}
uni.$emit('chooseLat', {
lat: this.latLng.lat,
lng: this.latLng.lng,
address: this.address
})
uni.navigateBack({
delta: 1
})
},
}
}
</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;
&.locate {
transform: translateY(calc(-100% - 20px));
}
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;
}
}
.address-search {
display: flex;
align-items: center;
height: 100px;
padding: 0 32px;
.address-search__wrapper {
display: flex;
align-items: center;
width: 100%;
height: 72px;
padding: 0 32px;
background: #F6F7F9;
border-radius: 36px;
image {
width: 48px;
height: 48px;
}
input {
flex: 1;
font-size: 26px;
color: #333;
}
}
}
scroll-view {
height: 400px;
padding: 0 32px;
.address-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32px 0;
border-bottom: 1px solid #EEEEEE;
&:last-child {
border: none;
}
.left {
flex: 1;
margin-right: 20px;
}
.right {
flex-shrink: 1;
width: 32px;
height: 32px;
border-radius: 50%;
border: 4px solid #CCCCCC;
transition: all ease 0.3s;
&.active {
border: 10px solid #1365DD;
}
}
h2 {
margin-bottom: 20px;
color: #222222;
font-weight: 600;
font-size: 34px;
}
p {
line-height: 1.2;
color: #999999;
font-size: 28px;
}
}
}
}
</style>

View File

@@ -0,0 +1,342 @@
<template>
<div class="SelectUser">
<u-navbar back-icon-color="#000" title="选择人员" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<div class="header-middle">
<div class="hint">
<span v-for="(item, index) in slectList" :key="index"><span v-if="index" style="margin:0 4px;">/</span><span style="color:#3F8DF5" @click="girdNameClick(item, index)">{{item.girdName}}</span></span>
</div>
<div class="showTypes" v-if="!userList.length">
<div v-if="treeList.length > 0">
<div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item, index)">
<div class="imges">
<!-- <span>
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked" @click.stop="girdClick(item, index)" />
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click.stop="girdClick(item, index)" />
</span> -->
<img src="./components/img/gird--select-icon.png" alt="" class="avatras" />
</div>
<div class="rightes">
<div class="applicationNames">{{ item.girdName }}</div>
<img src="./components/img/right-icon.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="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
<img src="./components/img/tx@2x.png" alt="" class="avatras" />
</div>
<div class="rights">
<div class="applicationNames">{{ e.name }}</div>
<div class="idNumbers">{{ e.phone }}</div>
</div>
</div>
</div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div>
</div>
<div class="subBtn" @click="submit">
<div>确定选择</div>
</div>
</div>
</template>
<script>
export default {
name: 'SelectUser',
customNavigation: true,
data() {
return {
selectUser: {},
allData: null,
treeList: [],
slectList: [],
userList: [],
detailId: '',
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
onLoad(option) {
this.detailId = option.detailId
this.getTree()
},
onShow() {
// document.title = '选择人员'
},
methods: {
getTree() {
this.slectList = []
this.$instance.post(`/app/apppatrolreportinfov2/listGirdInfoByTransfer?id=${this.detailId}`).then((res) => {
if (res?.data) {
this.allData = res.data
this.treeInit()
}
})
},
treeInit() {
// if(this.allData[0].girdLevel == 2) {
// if(this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) {
// this.userList = this.allData[0].girdMemberList
// this.userList.map((item) => {
// item.isChecked = false
// })
// }
// }else {
// this.treeList = this.allData[0].girdList
// }
var obj = {
girdName: '可选范围',
id: '',
}
this.slectList.push(obj)
this.treeList = this.allData
},
itemClick(row, index) {
if(!this.treeList[index].girdMemberList.length) {
return this.$u.toast('该网格下暂无网格员')
}
var obj = {
girdName: row.girdName,
id: row.id,
}
this.slectList.push(obj)
this.searckGird(index)
},
searckGird(index) {
this.userList = this.treeList[index].girdMemberList
},
girdNameClick(row, index) {
this.userList = []
if(!index) { //第一级别
this.slectList = []
this.treeInit()
}else {
var list = []
this.slectList.map((item, i) => {
if(i <= index) {
list.push(item)
}
})
this.slectList = list
this.searckGird(row)
}
},
girdClick(row, index) {
if (this.treeList[index].isChecked) {//取消
this.treeList[index].isChecked = false
this.selectUser = {}
} else {
this.treeList.map((item) => {
item.isChecked = false
})
this.treeList[index].isChecked = true
this.selectUser = row
}
this.$forceUpdate()
},
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
}
this.$forceUpdate()
},
submit() {
if (this.selectUser.id != null) {
uni.$emit('goback', this.selectUser)
uni.navigateBack()
} else {
return this.$u.toast('请选择网格员')
}
},
}
}
</script>
<style scoped lang="scss">
.SelectUser {
height: 100%;
background: #fff;
.header-content-bg {
width: 100%;
position: fixed;
z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.header-top {
background: #fff;
padding: 20px 32px;
}
.header-middle {
padding-bottom: 140px;
.hint {
padding: 28px 20px 28px 32px;
line-height: 56px;
box-shadow: 0px 1px 0px 0px #e4e5e6;
font-size: 30px;
font-weight: 500;
word-break: break-all;
}
.showTypes {
.empty-div {
height: 16px;
background: #f5f5f5;
}
.cards {
display: flex;
align-items: center;
height: 120px;
line-height: 120px;
// background: pink;
padding: 0 0 0 32px;
.imges {
display: flex;
align-items: center;
// width: 200px;
.imgselect {
width: 48px;
height: 48px;
vertical-align: middle;
}
.avatras {
width: 74px;
height: 74px;
border-radius: 8px;
margin-left: 36px;
}
}
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>

View File

@@ -0,0 +1,503 @@
<template>
<div class="statistics">
<div class="select-gird">
<AiPagePicker type="gird" valueObj nodeKey="id" @select="handleSelectGird" class="right-span"
:params="{formType:2, axiosUrl:'/app/apppatrolreportinfo/listByInfo'}">
<!-- <AiMore v-model="selectGird.girdName" icon="arrow-right" placeholder="选择网格"/> -->
<div class="gird-content">
<div class="gird-name">
<img src="https://cdn.sinoecare.com/i/2024/07/17/6697868b9170c.png" alt="">
<span>{{selectGird.girdName || '所属网格'}}</span>
</div>
<u-icon name="arrow-down" color="#666" size="24" style="margin-left: 4px" />
</div>
</AiPagePicker>
</div>
<div class="statstics-content">
<div class="info-content">
<div class="title">概况总览</div>
<div class="el-row">
<div class="item" v-for="(item, index) in todayList" :key="index" @click="toList(item)">
<h2>{{ item.value }}</h2>
<p>{{ item.label }}</p>
</div>
</div>
</div>
<div class="info-content">
<div class="title">事件办结率</div>
<!-- <div class="echart-content" id="finish" v-if="showFinish"></div> -->
<canvas canvas-id="finish" id="finish" class="echart-content" v-if="showFinish"/>
<div class="num" v-if="showFinish">{{ finshNum || 0 }}%</div>
<AiEmpty v-else></AiEmpty>
</div>
<div class="info-content">
<div class="title">巡查上报趋势图</div>
<AiEmpty v-if="!trendData.length"></AiEmpty>
<!-- <div class="echart-content" id="trend" v-else></div> -->
<canvas canvas-id="trend" id="trend" class="echart-content" v-else/>
</div>
<div class="info-content">
<div class="title">巡查事件分类
<!-- <div class="type-select" :style="statusInfo.name ? '' : 'color:#999;'" @click="show=true">{{statusInfo.name || '请选择'}}<u-icon name="arrow-right"></u-icon></div> -->
<u-select v-model="show" :list="$dict.getDict('clapEventStatusHistory')" value-name="dictValue"
label-name="dictName" @confirm="selectStatus"></u-select>
</div>
<AiEmpty v-if="!typeData.length"></AiEmpty>
<!-- <div class="echart-content" id="type" v-else></div> -->
<canvas canvas-id="type" id="type" class="echart-content" v-else/>
</div>
<div class="pad-b120"></div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
// import echarts from 'echarts'
import uCharts from "./components/echarts/u-charts.min.js";
var uChartsInstance = {};
export default {
data() {
return {
todayList: [],
selectGird: {id: '', girdName: ''},
finishChart: null,
trendChart: null,
typeChart: null,
show: false,
finishData: [],
showFinish: false,
finshNum: '',
trendData: [],
trendDataX: [],
typeData: [],
statusInfo: {name: '', eventStatus: ''},
}
},
computed: {
...mapState(['user']),
},
mounted() {
this.getGirdInfo()
},
methods: {
getStatistics() {
this.todayList = [], this.finishData = [], this.trendDataX = [], this.trendData = [], this.typeData = [], this.showFinish = false
this.$instance.post(`/app/apppatrolreportinfov2/countByGirdId?girdId=${this.selectGird.id}&eventStatus=${this.statusInfo.eventStatus}`).then((res) => {
if (res.code == 0) {
Object.keys(res.data.allCountMap).forEach((key) => {
var info = {
label: key,
value: res.data.allCountMap[key]
}
this.todayList.push(info)
})
Object.keys(res.data.finishCountMap).forEach((key) => {
var info = {
name: key,
value: res.data.finishCountMap[key]
}
if (res.data.finishCountMap[key] > 0) {
this.showFinish = true
}
this.finishData.push(info)
})
if (this.showFinish) {
var num = res.data.finishCountMap['累计事件办结'] / res.data.finishCountMap['累计事件上报']
this.finshNum = Number(num * 100).toFixed(2)
}
res.data.dateCountList.map((item) => {
this.trendData.push(item.ecount)
this.trendDataX.push(item.ymd)
})
res.data.groupList.map((item) => {
var info = {
name: item.groupName,
value: item.totalNum
}
this.typeData.push(info)
})
this.$nextTick(() => {
if (this.showFinish) {
this.finishChartInit('finish')
var finish = {
categories: ["2018","2019","2020","2021","2022","2023"],
series: [
{
name: "目标值",
data: [35,36,31,33,13,34]
},
{
name: "完成量",
data: [18,27,21,24,6,28]
}
]
};
this.drawCharts('finish', this.finishData)
}
// if (this.trendData.length) {
// this.trendChartInit()
// }
// if (this.typeData.length) {
// this.typeChartInit()
// }
})
}
})
},
drawCharts(id, data) {
const ctx = uni.createCanvasContext(id, this);
uChartsInstance[id] = new uCharts({
type: "ring",
context: ctx,
width: 346,
height: 232,
series: {series: data},
animation: true,
background: "#FFFFFF",
color: ["#4B87FE", "#4AC98E", "#FF8002"],
padding: [15, 10, 0, 15],
enableScroll: false,
legend: {},
xAxis: {
disableGrid: true,
},
yAxis: {
gridType: "dash",
dashLength: 2,
},
extra: {
line: {
type: "straight",
width: 2,
activeType: "hollow",
},
},
});
},
getGirdInfo() {
this.$instance.post(`/app/apppatrolreportinfo/getRootByGirdMember`).then((res) => {
if (res.code == 0) {
this.selectGird.girdName = res.data.girdName
this.selectGird.id = res.data.id
this.$dict.load('clapEventStatusHistory').then(() => {
this.getStatistics()
})
}
})
},
finishChartInit(id) {
console.log(this.finishData)
console.log(new uCharts())
const ctx = uni.createCanvasContext(id, this);
uChartsInstance[id] = new uCharts({
type: "ring",
context: ctx,
width: 346,
height: 232,
series: {
data: [{"name":"一班","value":50},{"name":"二班","value":30},{"name":"三班","value":20},{"name":"四班","value":18},{"name":"五班","value":8}]
},
animation: true,
rotate: false,
rotateLock: false,
background: "#FFFFFF",
color: ['#7E94F6', '#85E3D5', '#2891FF'],
padding: [5,5,5,5],
dataLabel: true,
enableScroll: false,
legend: {
show: true,
position: "right",
lineHeight: 25
},
subtitle: {
name: "70%",
fontSize: 25,
color: "#7cb5ec"
},
extra: {
ring: {
ringWidth: 60,
activeOpacity: 0.5,
activeRadius: 10,
offsetAngle: 0,
labelWidth: 15,
border: false,
borderWidth: 3,
borderColor: "#FFFFFF"
}
}
});
},
trendChartInit() {
this.trendChart = echarts.init(document.getElementById('trend'))
var option2 = {
grid: {
left: '5%',
right: '5%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
axisLine: {
lineStyle: {
color: '#E1E5EF', //x轴的颜色
width: 1, //轴线的宽度
},
},
axisLabel: {
show: true,
textStyle: {
color: '#666',
},
},
data: this.trendDataX
},
yAxis: {
axisLine: { //y轴
show: false
},
axisTick: {
show: false
},
axisLabel: {
show: true,
textStyle: {
color: '#666',
},
},
type: 'value',
},
tooltip: {
trigger: 'axis'
},
series: [
{
data: this.trendData,
type: 'line',
areaStyle: {//覆盖区域的渐变色
normal: {
color: {
type: 'linear', x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{
offset: 0, color: 'rgba(58,132,255, 0.8)' // 0% 处的颜色
},
{
offset: 1, color: 'rgba(58,132,255, 0)' // 100% 处的颜色
}
],
global: false // 缺省为 false
},
}
},
lineStyle: {
normal: {
color: '#2891FF'
}
},
itemStyle: {
normal: {
color: '#2891FF',
}
}
}
]
};
this.trendChart.setOption(option2)
},
typeChartInit() {
this.typeChart = echarts.init(document.getElementById('type'))
var option3 = {
tooltip: {
trigger: 'item'
},
series: [
{
name: '巡查事件分类',
type: 'pie',
radius: ['0%', '70%'],
itemStyle: {
normal: {
color: function (colors) {
var colorList = ['#2891FF', '#FF8700', '#83B5F7', '#7E94F6', '#85E3D5', '#2891FF'];
return colorList[colors.dataIndex];
}
},
},
data: this.typeData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
}
}
}
]
};
this.typeChart.setOption(option3)
},
selectStatus(e) {
this.statusInfo.name = e[0].label
this.statusInfo.eventStatus = e[0].value
this.getStatistics()
},
handleSelectGird(v) {
this.selectGird = v || {}
this.getStatistics()
},
toList(row) {
var searchType = '', typeList = ['', '', '累计上报', '今日上报', '今日办结', '办理中']
typeList.map((item, index) => {
if (item == row.label) {
return searchType = index
}
})
uni.navigateTo({url: `./StatisticsList?title=${row.label}&searchType=${searchType}&girdId=${this.selectGird.id}`})
}
},
}
</script>
<style scoped lang="scss">
.statistics {
.select-gird {
width: calc(100% - 64px);
box-sizing: border-box;
position: fixed;
left: 32px;
z-index: 9;
padding: 24px;
background-color: #fff;
border-radius: 16px;
.gird-content {
display: flex;
justify-content: space-between;
.gird-name {
width: calc(100% - 60px);
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32px;
color: #333;
line-height: 48px;
img {
width: 28px;
height: 28px;
margin-right: 20px;
}
}
}
}
.statstics-content {
padding: 128px 30px 200px;
}
.info-content {
width: 100%;
background: #FFF;
border-radius: 16px;
margin-bottom: 24px;
position: relative;
padding-bottom: 32px;
.title {
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333;
line-height: 48px;
padding: 24px 16px 24px 24px;
img {
float: right;
width: 40px;
height: 40px;
}
.type-select {
font-size: 26px;
position: absolute;
top: 20px;
right: 32px;
width: calc(100% - 250px);
text-align: right;
line-height: 48px;
}
}
.el-row {
display: flex;
padding: 32px 0 60px 0;
.item {
flex: 1;
text-align: center;
h2 {
font-size: 64px;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #3B424A;
line-height: 64px;
margin-bottom: 8px;
}
p {
font-size: 28px;
font-family: PingFangSC-Regular, PingFang SC;
color: #999;
line-height: 40px;
}
}
}
.echart-content {
width: 100%;
height: 500px;
}
.num {
position: absolute;
left: 50%;
top: 320px;
margin-left: -100px;
font-size: 40px;
font-weight: 600;
width: 200px;
text-align: center;
}
}
.pad-b120 {
background-color: #F3F7F8;
padding-bottom: 120px;
}
}
</style>

View File

@@ -0,0 +1,266 @@
<template>
<div class="list-content">
<u-navbar back-icon-color="#000" title="事件上报" title-color="#000" title-width="300" title-size="32"
:title-bold="true" :background="backgroundNavbar" :is-fixed="true" height="44"></u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<template>
<AiCard v-for="(item, i) in datas" :key="i" @click.native="goDetail(item, 1)">
<template #custom>
<div class="card-top">
<div class="titles">{{ item.content }}</div>
<div class="types">
<span>事件类型</span>
<span class="types-right">{{ item.groupName }}</span>
</div>
<div class="types">
<span>事件来源</span>
<span class="types-right">{{ $dict.getLabel('residentEventSource', item.eventSource) }}</span>
</div>
<div class="gards">
<span>所属网格</span>
<span class="gards-right">{{ item.girdName }}</span>
</div>
</div>
<div class="status" :class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'"
v-if="item.eventStatus">
<span class="icon"></span>
<span>
{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}
</span>
</div>
</template>
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</template>
<div class="pad-b120" v-if="datas.length"></div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
customNavigation: true,
props: {},
data() {
return {
datas: [],
current: 1,
pages: 0,
searchType: '',
title: '',
girdId: '',
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
computed: {
...mapState(['user']),
listType() {
return this.$dict.getDict('clapEventStatusAll')
}
},
onLoad(options) {
console.log(options)
this.searchType = options.searchType
this.title = options.title
this.girdId = options.girdId
},
onShow() {
// document.title = this.title
this.current = 1
this.getList()
},
created() {
this.$dict.load('clapEventStatus', 'clapEventStatusAll', 'clapEventStatusHistory', 'residentEventSource').then(() => {
this.getList()
})
},
methods: {
getListInit() {
this.current = 1
this.getList()
},
nextPage() {
this.current++
this.getList()
},
getList() {
let {current, girdId, searchType} = this
this.$instance.post(`/app/apppatrolreportinfov2/listByStatus`, null, {
params: {
size: 10,
current,
girdId,
searchType
},
}).then((res) => {
if (res.code == 0) {
this.datas = this.current > 1 ? [...this.datas, ...res.data.records] : res.data.records
this.pages = res.data.pages
this.$forceUpdate()
}
})
},
goDetail(item) {
uni.navigateTo({url: `./Detail?id=${item.id}&isShowBtn=0`})
},
},
onReachBottom() {
this.nextPage()
}
}
</script>
<style scoped lang="scss">
.list-content {
height: 100%;
padding: 0;
width: 100vw;
.header-content-bg {
width: 100%;
position: fixed;
z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.select-top {
background: #fff;
display: flex;
padding: 24px 0;
.tab-item {
flex: 1;
text-align: center;
line-height: 48px;
font-size: 26px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666;
img {
width: 32px;
height: 32px;
margin-left: 8px;
vertical-align: middle;
}
}
.tab-item:nth-of-type(1) {
border-right: 1px solid #eee;
}
}
::v-deep .AiTopFixed .content {
padding: 0;
}
::v-deep .AiCard {
background: #f3f6f9;
padding: 24px 40px 0 32px;
.start {
background: #fff;
border-radius: 16px;
.card-top {
padding: 32px;
.titles {
margin-bottom: 34px;
font-size: 32px;
font-weight: 500;
color: #333333;
line-height: 1.4;
word-break: break-all;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.types,
.gards {
margin-top: 8px;
font-size: 26px;
.types-right,
.gards-right {
margin-left: 32px;
color: #333333;
}
}
}
.status {
padding: 32px;
border-top: 1px solid #dddddd;
.icon {
display: inline-block;
width: 8px;
height: 8px;
vertical-align: middle;
margin-right: 8px;
}
}
.status0 {
color: #ff883c;
.icon {
background: #ff883c;
}
}
.status1 {
color: #1aaaff;
.icon {
background: #1aaaff;
}
}
.status2 {
color: #42d784;
.icon {
background: #42d784;
}
}
.status3 {
color: #ff4466;
.icon {
background: #ff4466;
}
}
}
}
// ::v-deep .AiCard:last-child {
// padding-bottom: 24px;
// }
.pad-b120 {
background-color: #f3f6f9;
padding-bottom: 120px;
}
.grid-name {
display: inline-block;
font-size: 32px;
color: #333;
}
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 854 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -138,6 +138,7 @@ export default {
methods: {
...mapActions(['autoLogin', 'getUserInfo']),
chooseAddress() {
uni.authorize({
scope: 'scope.userLocation',