This commit is contained in:
liuye
2024-08-09 15:49:31 +08:00
parent 74be1fcd11
commit cc3c6b4de4
41 changed files with 2853 additions and 5 deletions

View File

@@ -45,9 +45,6 @@
</u-form>
</div>
<!-- <div class="btn" @click="confirm">
<span>提交</span>
</div> -->
<div class="footer" @click="confirm">
<div class="btn">保存</div>
</div>

View File

@@ -1,6 +1,6 @@
<template>
<div class="Transfer">
<u-navbar back-icon-color="#000" title="事件上报" title-color="#000" title-width="300" title-size="32"
<u-navbar back-icon-color="#000" :title="titleList[status]" 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="">

View File

@@ -42,7 +42,7 @@
</div>
<AiEmpty v-if="!datas.length" />
</div>
<div class="ai-add" v-if="isAdd" @click="toAdd"></div>
<div class="ai-add" v-if="isAdd" @click.stop="toAdd"></div>
<!-- <AiAdd @add="toAdd" /> -->
</div>

View File

@@ -0,0 +1,309 @@
<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" :border-bottom="false">
<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="dictValue" label-name="dictName" @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="address" required :border-bottom="false" right-icon="arrow-right" class="border">
<span @click="chooseAddress" class="right-span right-address" :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="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: '',
address: '',
lng: '',
lat: '',
girdId: '',
girdName: '',
files: [],
name: '',
phone: '',
girdMemberId: '',
girdMemberName: ''
},
flag: false,
show: false,
myList: [],
eventSource: '',
backgroundNavbar: {
background: 'url(https://cdn.sinoecare.com/i/2024/07/12/6690a1309c7d3.png) no-repeat',
backgroundSize: 'cover',
},
}
},
computed: {
...mapState(['user']),
},
onLoad(option) {
this.forms.girdId = this.user.girdId
this.forms.girdName = this.user.girdName
this.forms.girdMemberId = this.user.girdMemberId
this.forms.girdMemberName = this.user.name
this.eventSource = option.eventSource
this.typeList()
},
onShow() {
// document.title = '添加上报'
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.lat = res.latitude
this.forms.lng = res.longitude
this.forms.address = res.address
}
})
},
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/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}`).then(res => {
if (res.code == 0) {
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.myList.push(i)
})
}
})
},
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;
}
::v-deep .ai-uploader {
.item {
width: 26vw!important;
height: 26vw!important;
margin: 0 8px 8px 0;
.u-image__image {
width: 26vw!important;
height: 26vw!important;
}
}
.default {
width: 26vw!important;
height: 26vw!important;
}
}
}
</style>

View File

@@ -0,0 +1,212 @@
<template>
<div class="AppWorkOrder">
<!-- <component v-if="refresh && isGridMember" :is="component" @change="onChange" :params="params" :ref="component" :listIndex="tabIndex" /> -->
<u-navbar back-icon-color="#000" :background="backgroundNavbar" :is-fixed="true" height="44" z-index="999">
<div class="nav-title" slot="" @click="clickTitle">
{{eventSourceText == '全部' ? '工单管理' : eventSourceText}}
<u-icon name="arrow-down" color="##666" size="28" v-if="this.tabIndex != 1"></u-icon>
</div>
</u-navbar>
<div class="header-content-bg">
<img src="https://cdn.sinoecare.com/i/2024/07/12/6690a1303d423.png" alt="">
</div>
<List v-if="refresh && isGridMember && component == 'List' " @change="onChange" :params="params" :eventSource="eventSource" ref="List"></List>
<Statistics v-if="refresh && isGridMember && component == 'Statistics' " @change="onChange"></Statistics>
<div class="tabs-bottom" 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>
<u-select v-model="showType" :list="tabList" value-name="value" label-name="name" @confirm="confirm"></u-select>
</div>
</template>
<script>
import List from './List.vue'
import Statistics from './Statistics.vue'
import {mapState} from 'vuex'
export default {
name: 'AppWorkOrder',
appName: '工单管理',
customNavigation: true,
data() {
return {
component: 'List',
params: {},
refresh: true,
tabIndex: 0,
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/6690a1303d423.png) no-repeat',
backgroundSize: 'cover',
},
tabList: [
{name: '全部', value: ''},
{name: '巡查上报', value: '1'},
{name: '居民上报', value: '0'},
{name: '舆情上报', value: '2'},
{name: '敏感词上报', value: '3'},
],
eventSource: '',
eventSourceText: '工单管理',
showType: false
}
},
computed: {
...mapState(['user']),
isGridMember() {
return this.user.girdInfos2G && this.user.girdInfos2G.length
}
},
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.eventSource = ''
this.eventSourceText = '工单管理'
this.$nextTick(() => {
this.refresh = true
})
},
confirm(e) {
this.eventSource = e[0].value
this.eventSourceText = e[0].label
uni.$emit('changeEventSource', {eventSource: this.eventSource})
},
clickTitle() {
if(this.tabIndex == 1) return
this.showType = true
}
},
onShow() {
// document.title = '工单管理'
uni.$on('hideTab', () => {
this.isTab = false
})
uni.$on('showTab', () => {
this.isTab = true
})
if (!this.tabIndex) {
// this.$nextTick(() => this.$refs['List'].getListInit())
uni.$emit('workTaskGetListInit')
}
},
onReachBottom() {
if (!this.tabIndex) {
// this.$nextTick(() => this.$refs['List'].nextPage())
uni.$emit('workTaskGetNextPage')
}
},
}
</script>
<style lang="scss" scoped>
.AppWorkOrder {
height: 100%;
}
.header-content-bg {
width: 100%;
position: fixed;
// z-index: -1;
img {
width: 100%;
height: 592px;
}
}
.tabs-bottom {
width: 100%;
height: 98px;
background: #fff;
border-top: 1px solid #ddd;
position: fixed;
bottom: 0;
left: 0;
display: flex;
padding-bottom: 68px;
.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;
}
}
.nav-title {
width: 100%;
font-family: PingFangSC-SNaNpxibold;
font-weight: 600;
font-size: 34px;
color: #000;
text-align: center;
u-icon {
display: inline-block;
margin-left: 8px;
}
}
</style>

View File

@@ -0,0 +1,258 @@
<template>
<div class="Transfer">
<u-navbar back-icon-color="#000" :title="titleList[status]" 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="dictValue" label-name="dictName" @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="footer" @click="confirm">
<div class="btn">{{titleList[status]}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'Content',
customNavigation: true,
components: {},
props: {},
data() {
return {
forms: {
groupName: '',
groupId: '',
content: '',
files: [],
name: ''
},
flag: false,
show: false,
status: '', //1转交 2拒绝受理 3我已办结
myList: [],
id: '',
selectUser: {},
titleList: ['', '转交事件', '拒绝受理', '我已办结'],
eventSource: '',
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.eventSource = option.eventSource
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/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}&size=9999`).then((res) => {
if (res.code == 0) {
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.myList.push(i)
})
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: 0 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,566 @@
<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 top-z-index">
<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" style="color:#999">照片</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="plan">
<div class="nav">
<span>办理进度</span>
<span> ({{ detailStatus.label }})</span>
</div>
<div class="cards" v-for="(item, index) in process" :key="index">
<div class="cardss">
<div class="cardss-left">
<span v-text="formatName(item.systemExplain)"/>
</div>
<div class="cardss-right">
<div class="cardsss-right-left">
<div class="cardssss-right-left-top">
<span v-text="item.systemExplain"/>
<div style="color: #2ea222; font-size: 16px; margin-top: 5px" v-text="item.statusLabel"/>
</div>
</div>
<div class="cardees-right-right">{{ item.doTime }}</div>
</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="fixedBtn" v-if="isShowBtn">
<div class="status00" v-if="data.eventStatus == 0">
<div class="columns border-r" v-if="data.powerTransmit" @click="toContent(1)">
<img src="./components/img/zhuanjiao.png" alt="" />
<span class="hint">转交事件</span>
</div>
<div class="columns" v-if="data.powerHandle" @click="toContent(2)">
<img src="./components/img/jujue.png" alt="" />
<span class="hint">拒绝受理</span>
</div>
<div class="doIt" @click="toContent(3)">我来受理</div>
</div>
<div class="status00" v-if="data.eventStatus == 1">
<div class="columns border-r" v-if="data.powerTransmit" @click="toContent(1)">
<img src="./components/img/zhuanjiao.png" alt="" />
<span class="hint">转交事件</span>
</div>
<div class="columns" v-if="data.powerHandle" @click="toContent(2)">
<img src="./components/img/jujue.png" alt="" />
<span class="hint">拒绝受理</span>
</div>
<div class="doIt" v-if="data.powerHandle" @click="toContent(3)">前往办理</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()
})
},
onShow() {
// document.title = '工单管理'
},
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}&eventSource=${this.data.eventSource}`})
},
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;
img {
width: 100%;
height: 592px;
}
}
.top-z-index {
position: relative;
z-index: 2;
}
.border-r {
width: calc(100% - 64px);
margin: 0 0 32px 32px;
background-color: #fff;
border-radius: 16px;
}
.header-top {
display: flex;
margin-bottom: 14px;
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 {
font-size: 32px;
font-weight: 500;
}
.times {
margin-top: 10px;
font-size: 28px;
color: #999999;
}
}
}
.header-middle {
padding: 0 32px 10px 32px;
.titles {
margin: 32px 0;
line-height: 1.4;
word-break: break-all;
font-size: 40px;
font-weight: 600;
}
.status {
display: inline-block;
margin-bottom: 14px;
padding: 4px 8px;
font-size: 26px;
color: #ffffff;
border-radius: 8px;
}
.status0 {
background: #ff883c;
}
.status1, .statusevaluation {
background: #1aaaff;
}
.status2 {
background: #42d784;
}
.status3 {
background: #ff4466;
}
.card {
display: flex;
justify-content: space-between;
padding: 34px 0;
border-bottom: 1px solid #ddd;
.card-left {
width: 46%;
font-size: 32px;
color: #999999;
}
.card-right {
font-size: 32px;
.u-icon {
margin-left: 8px;
}
}
}
// .card:last-child {
// border-bottom: none;
// }
.cards {
padding: 34px 0;
}
img {
width: 225px;
height: 226px;
margin-right: 8px;
}
img:nth-of-type(3n) {
margin-right: 0;
}
}
.header-bottom {
padding-bottom: 32px;
.plan {
padding: 0 32px;
.nav {
padding: 26px 0;
}
.cards {
position: relative;
padding-bottom: 80px;
background-color: #fff;
.cardss {
display: flex;
justify-content: space-between;
.cardss-left {
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;
// img {
// width: 100%;
// height: 100%;
// border-radius: 50%;
// }
.avatarIcon {
position: absolute;
bottom: 0;
right: 0;
width: 38px;
height: 38px;
}
}
.cardss-right {
width: calc(100% - 110px);
display: flex;
justify-content: space-between;
.cardsss-right-left {
.cardssss-right-left-top {
width: 300px;
overflow: hidden;
text-overflow: ellipsis;
font-size: 32px;
}
.cardssss-right-left-bottom {
margin-top: 10px;
font-size: 28px;
color: #666666;
}
}
.cardees-right-right {
font-size: 28px;
color: #999999;
}
}
.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;
}
}
}
.cards: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,454 @@
<template>
<div class="list-content">
<div class="top-tabs" :style="{'top': `${statusBarHeight+44}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">
<AiMore v-model="searchGrid.girdName" icon="arrow-down" placeholder="所属网格"/>
<!-- <span :class="searchGrid.girdName ? 'grid-name' : 'grid-name color-999'">{{searchGrid.girdName || '所属网格'}}</span>
<u-icon name="close-circle" color="#999" size="34" style="margin-left: 4px" v-if="searchGrid.girdName" @click.stop="clearGrid" />
<u-icon name="arrow-down" color="#999" size="24" style="margin-left: 4px" v-else /> -->
</AiPagePicker>
</div>
<div class="tab-item" @click="showType = true">
<AiMore v-model="eventStatusText" icon="arrow-down" placeholder="办件状态"/>
</div>
<u-select v-model="showType" :list="listType" value-name="dictValue" label-name="dictName" @confirm="confirm"></u-select>
</div>
</div>
<div class="card-content">
<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="right-type">{{ $dict.getLabel('residentEventSource', item.eventSource) }}</div>
<!-- <div class="types">
<span>事件来源</span>
<span class="types-right">{{ $dict.getLabel('residentEventSource', item.eventSource) }}</span>
</div> -->
<div class="types">
<span>事件类型</span>
<span class="types-right">{{ item.groupName }}</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">
<div class="left">
<span class="icon"></span>
<span>
{{ $dict.getLabel('clapEventStatus', item.eventStatus) }}
</span>
</div>
<span class="time">{{ item.createTime }}</span>
</div>
</template>
</AiCard>
<AiEmpty v-if="!datas.length"></AiEmpty>
</div>
<div class="pad-b120" v-if="datas.length"></div>
<div class="ai-add" v-if="isAdd && ['0', '1'].includes(eventSource)" @click.stop="toAdd"></div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data() {
return {
datas: [],
tabList: [
{name: '全部待办', value: ''},
{name: '办件历史', value: '1'},
// {name: '居民上报', value: '0'},
// {name: '舆情上报', value: '2'},
// {name: '敏感词上报', value: '3'},
],
currentTabs: 0,
current: 1,
pages: 0,
searchGrid: {girdName: ''},
showType: false,
eventStatus: '',
eventStatusText: '',
isAdd: true,
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
eventSource: ''
}
},
computed: {
...mapState(['user']),
listType() {
return this.$dict.getDict(this.currentTabs == 0 ? 'clapEventStatusAll' : 'clapEventStatusHistory')
}
},
mounted() {
uni.$on('workTaskGetListInit', () => {
this.getListInit()
})
uni.$on('workTaskGetNextPage', () => {
this.nextPage()
})
uni.$on('changeEventSource', (res) => {
this.eventSource = res.eventSource
this.getListInit()
})
},
onShow() {
this.searchGrid.girdId = this.user.girdId
this.searchGrid.girdName = this.user.girdName
this.current = 1
this.getList()
},
created() {
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.tabList[this.currentTabs].value,
eventSource: this.eventSource
},
}).then((res) => {
if (res.code == 0 && res.data?.records.length) {
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() {
uni.navigateTo({url: `./Add?eventSource=${this.eventSource}`})
},
getIsAdd() {
this.$instance.post(`/app/apppatrolreportinfov2/checkGirdMemberUser`).then((res) => {
if (res.code == 0) {
this.isAdd = res.data
}
})
},
getTypeList() {
this.typeList = []
this.$instance.post(`/app/apppatrolreportinfov2/eventTypeList?eventSource=${this.eventSource}`).then(res => {
if (res.code == 0) {
res.data.map((item) => {
var i = {dictName: item, dictValue: item}
this.typeList.push(i)
})
}
})
},
},
}
</script>
<style scoped lang="scss">
.list-content {
height: 100%;
padding: 0;
width: 100vw;
.top-tabs {
width: calc(100% - 64px);
box-sizing: border-box;
position: fixed;
left: 32px;
z-index: 9;
.select-content {
width: 100%;
padding: 0 32px;
box-sizing: border-box;
background-color: #fff;
.search-input {
width: 100%;
padding: 28px 0;
}
.area-content {
width: 100%;
padding: 26px 0;
box-sizing: border-box;
font-family: PingFangSC-Regular;
font-size: 32px;
color: #222;
::v-deep u-icon,
::v-deep .u-icon {
width: 100%;
}
::v-deep .u-icon__label {
display: inline-block;
width: calc(100% - 32px);
}
}
}
}
::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;
}
}
.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;
position: relative;
.titles {
width: 440px;
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;
}
.right-type {
position: absolute;
top: 32px;
right: 32px;
padding: 4px 10px;
background: #EBF3FD;
line-height: 34px;
font-family: PingFangSC-Regular;
font-size: 24px;
color: #3D88F5;
border-radius: 6px;
}
.types,
.gards {
margin-top: 8px;
font-size: 26px;
.types-right,
.gards-right {
margin-left: 32px;
color: #333333;
}
}
}
.status {
padding: 32px;
border-top: 1px solid #ddd;
display: flex;
justify-content: space-between;
.icon {
display: inline-block;
width: 16px;
height: 16px;
border-radius: 50%;
vertical-align: middle;
margin-right: 16px;
}
.time {
line-height: 40px;
font-family: PingFangSC-Regular;
font-size: 28px;
color: #999;
}
}
.status0 {
.left {
color: #ff883c;
.icon {
background: #ff883c;
}
}
}
.status1 {
.left {
color: #1aaaff;
.icon {
background: #1aaaff;
}
}
}
.status2 {
.left {
color: #42d784;
.icon {
background: #42d784;
}
}
}
.status3 {
.left {
color: #ff4466;
.icon {
background: #ff4466;
}
}
}
}
}
.card-content {
margin: 212px 0 100px 0;
}
// ::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;
}
.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,345 @@
<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="https://cdn.sinoecare.com/i/2024/07/18/66987f1968182.png" alt="" class="avatras" />
</div>
<div class="rightes">
<div class="applicationNames">{{ item.girdName }}</div>
<img src="https://cdn.sinoecare.com/i/2024/07/18/66987f19bf532.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="https://cdn.sinoecare.com/i/2024/07/16/6695ddf91113c.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" />
<img src="https://cdn.sinoecare.com/i/2024/07/16/6695ddf890b1e.png" alt="" class="imgselect" v-else @click="userClick(e, index)" />
<img src="https://cdn.sinoecare.com/i/2024/07/16/6695df9713aee.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%;
.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;
width: calc(100% - 64px);
margin: 16px 0 0 32px;
background-color: #fff;
border-radius: 16px;
.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,448 @@
<template>
<div class="statistics">
<!-- <div class="top-tabs" :style="{'top': `${statusBarHeight+44}px`}">
<div class="select-gird">
<AiPagePicker type="gird" valueObj nodeKey="id" formType="2" @select="handleSelectGird" class="right-span"
action="/app/apppatrolreportinfo/listByInfo">
<AiMore v-model="selectGird.girdName" icon="arrow-right" placeholder="选择网格"/>
</AiPagePicker>
</div>
</div> -->
<div class="select-gird" :style="{'top': `${statusBarHeight+44}px`}">
<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>
<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>
</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>
</div>
<div class="pad-b120"></div>
</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
// import echarts from 'echarts'
export default {
props: {},
data() {
return {
todayList: [],
selectGird: {id: '', girdName: ''},
finishChart: null,
trendChart: null,
typeChart: null,
show: false,
finishData: [],
showFinish: false,
finshNum: '',
trendData: [],
trendDataX: [],
typeData: [],
statusInfo: {name: '', eventStatus: ''},
statusBarHeight: uni.getSystemInfoSync().statusBarHeight,
}
},
computed: {
...mapState(['user']),
},
created() {
// 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()
}
if (this.trendData.length) {
this.trendChartInit()
}
if (this.typeData.length) {
this.typeChartInit()
}
})
}
})
},
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() {
this.finishChart = echarts.init(document.getElementById('finish'))
var option = {
tooltip: {
trigger: 'item'
},
series: [
{
name: '事件办结率',
type: 'pie',
radius: ['30%', '60%'],
itemStyle: {
normal: {
color: function (colors) {
var colorList = ['#7E94F6', '#85E3D5', '#2891FF'];
return colorList[colors.dataIndex];
}
},
},
data: this.finishData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)',
}
}
}
]
};
this.finishChart.setOption(option)
},
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 {
background-color: #F3F7F8;
.statstics-content {
padding: 128px 30px 200px;
}
.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;
}
}
}
}
.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,259 @@
<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 {
props: {},
customNavigation: true,
data() {
return {
datas: [],
current: 1,
pages: 0,
searchType: '',
title: '',
girdId: ''
}
},
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;
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

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