事件上报

This commit is contained in:
liuye
2023-05-08 17:56:39 +08:00
parent a25da8f889
commit 5b57142d7d
7 changed files with 359 additions and 38 deletions

View File

@@ -4,7 +4,7 @@
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="转交给" prop="status" required :border-bottom="false" class="first-form" v-if="status == 4">
<div flex class="flexEnd">
<AiPagePicker type="gridUser" :id="selectObject.id" @select="handleSelectObject">
<AiPagePicker type="gridMember" :id="selectObject.id" @select="handleSelectObject">
<AiMore v-model="forms.name"/>
</AiPagePicker>
</div>

View File

@@ -82,7 +82,7 @@ export default {
},
methods: {
typeList() {
this.$http.post(`/app/appclapeventgroup/list`, null, {
this.$http.post(`/app/appresidentreportgroup/list`, null, {
params: {
size: 9999,
},
@@ -126,7 +126,7 @@ export default {
return this.$u.toast('请输入手机号')
}
this.flag = true
this.$http.post(``).then((res) => {
this.$http.post(`/app/appresidentreportinfo/addByGirdMember`, {...this.forms, ...this.forms.mapInfo}).then((res) => {
if (res.code == 0) {
this.$u.toast('事件添加成功')
uni.$emit('getListInit')

View File

@@ -2,8 +2,10 @@
<div class="Transfer">
<div class="contents">
<u-form :model="forms" ref="uForm" label-width="auto" :border-bottom="false">
<u-form-item label="转交给" prop="status" required :border-bottom="false" right-icon="arrow-right" class="first-form" v-if="status == 1">
<u-input v-model="forms.name" placeholder="请选择转交对象" @click="toSelectUser" disabled/>
<u-form-item label="转交给" prop="status" required :border-bottom="false" class="first-form" v-if="status == 1">
<AiPagePicker type="gridUser" :id="forms.girdId" @select="handleSelectGrid" nodeKey="girdId">
<AiMore v-model="forms.name"/>
</AiPagePicker>
</u-form-item>
<u-form-item label="事件分类" prop="groupName" required :border-bottom="false" right-icon="arrow-right" v-if="status != 1">
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
@@ -69,20 +71,30 @@ export default {
this.forms.groupId = option.groupId
this.forms.groupName = option.groupName
this.typeList()
uni.$on('pagePicker:custom', (res) => {
this.selectUser = res
if (res.name) {
this.forms.name = res.name
} else {
this.forms.name = res.girdName
}
})
// uni.$on('pagePicker:custom', (res) => {
// this.selectUser = res
// if (res.name) {
// this.forms.name = res.name
// } else {
// this.forms.name = res.girdName
// }
// })
},
onShow() {
document.title = this.titleList[this.status]
},
methods: {
handleSelectGrid(v) {
// this.forms.name = v.girdName
// this.forms.girdId = v.girdId
// this.selectUser = v
this.forms.girdId = v.girdId
this.forms.girdName = v.girdName
this.forms.girdMemberId = v.id
this.forms.girdMemberName = v.name
this.forms.name = `${v.girdName}${v.name ? '-' + v.name : ''}`
this.selectUser = {...v}
},
typeList() {
this.$http.post(`/app/appclapeventgroup/list`, null, {
params: {
@@ -112,28 +124,28 @@ export default {
submit() { //status 1转交 2拒绝受理 3我已办结
var url = '', successText = '', params = ''
if (this.status == 1) {
url = `/app/appclapeventinfo/transfer`
url = `/app/appresidentreportinfo/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
// 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/appclapeventinfo/refuse`
url = `/app/appresidentreportinfo/finishByGirdMember`
successText = '拒绝成功'
params = {...this.forms}
params = {...this.forms, eventStatus: 0}
}
if (this.status == 3) {
url = `/app/appclapeventinfo/finishByGirdMember`
url = `/app/appresidentreportinfo/finishByGirdMember`
successText = '办结成功'
params = {...this.forms}
params = {...this.forms, eventStatus: 1}
}
params.id = this.id
this.$http.post(url, params).then((res) => {
@@ -155,9 +167,9 @@ export default {
this.forms.groupName = e[0].label
this.forms.groupId = e[0].value
},
toSelectUser() {
uni.navigateTo({url: '../AppGridManagement/selectGridMember'})
},
// toSelectUser() {
// uni.navigateTo({url: '../AppGridManagement/selectGridMember'})
// },
},
}
</script>
@@ -238,5 +250,9 @@ export default {
width: 100%;
text-align: right;
}
::v-deep .AiPagePicker {
width: 100%;
text-align: right;
}
}
</style>

View File

@@ -17,7 +17,7 @@
<div class="card">
<span class="card-left">事件来源</span>
<span class="card-right">{{ data.groupName }}</span>
<span class="card-right">{{ $dict.getLabel('residentEventSource', data.eventSource) }}</span>
</div>
<div class="card">
<span class="card-left">事件类型</span>
@@ -96,12 +96,12 @@
<div class="fixedBtn">
<div class="status00" v-if="data.eventStatus == 0">
<div class="columns border-r" @click="toContent(1)">
<!-- <img src="./components/img/zhuanjiao.png" alt="" /> -->
<img src="./components/img/zhuanjiao.png" alt="" />
<span class="hint">转交事件</span>
</div>
<div class="columns" @click="toContent(2)">
<!-- <img src="./components/img/jujue.png" alt="" /> -->
<img src="./components/img/jujue.png" alt="" />
<span class="hint">拒绝受理</span>
</div>
@@ -159,7 +159,7 @@ export default {
watch: {},
onLoad(o) {
this.id = o.id
this.$dict.load('realityStatus', 'clapDoStatus').then(() => {
this.$dict.load('realityStatus', 'clapDoStatus', 'residentEventSource').then(() => {
this.getDetail()
})
@@ -168,11 +168,11 @@ export default {
})
},
onShow() {
document.title = this.user.corpId == 'wpytYEDgAACQq2uZ5x54MvlJ9fgvSPXQ' ? '微心愿' : '随手拍'
document.title = '事件上报'
},
methods: {
getDetail() {
this.$http.post(`/app/appclapeventinfo/queryDetailById?id=${this.id}`).then((res) => {
this.$http.post(`/app/appresidentreportinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.data = res.data
}
@@ -184,7 +184,7 @@ export default {
},
doThings() {
this.$http.post(`/app/appclapeventinfo/acceptance?id=${this.id}`).then((res) => {
this.$http.post(`/app/appresidentreportinfo/finishByGirdMember?id=${this.id}&eventStatus=1`).then((res) => {
if (res.code == 0) {
this.getDetail()
}

View File

@@ -101,7 +101,7 @@ export default {
methods: {
getList() {
let {current, eventStatus, searchGrid: {id: girdId}} = this
this.$http.post(`/app/appclapeventinfo/listByGirdMember`, null, {
this.$http.post(`/app/appresidentreportinfo/list`, null, {
params: {
size: 10,
current, searchType: this.currentTabs == 1 ? '1' : '0',