编辑
This commit is contained in:
@@ -93,7 +93,12 @@ export default {
|
||||
this.forms.girdMemberId = this.user.girdMemberId
|
||||
this.forms.girdMemberName = this.user.name
|
||||
this.eventSource = option.eventSource
|
||||
this.id = option.id
|
||||
this.typeList()
|
||||
if(this.id) {
|
||||
this.forms.id = this.id
|
||||
this.getDetail()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
// document.title = '添加上报'
|
||||
@@ -143,6 +148,25 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getDetail() {
|
||||
this.$http.post(`/app/apppatrolreportinfov2/queryDetailById?id=${this.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.forms = res.data
|
||||
this.forms.mapInfo = {
|
||||
lat: res.data.lat,
|
||||
lng: res.data.lng,
|
||||
address: res.data.address,
|
||||
}
|
||||
// var list = this.$dict.getDict('xbotReportEventType')
|
||||
// this.typeList.map((item) => {
|
||||
// if(item.dictValue == res.data.type) {
|
||||
// this.forms.typeName = item.dictName
|
||||
// }
|
||||
// })
|
||||
// this.selectGird = { girdId: res.data.girdId|| '', girdName: res.data.girdName || ''}
|
||||
}
|
||||
})
|
||||
},
|
||||
selectStatus(e) {
|
||||
this.forms.groupName = e[0].label
|
||||
this.forms.groupId = e[0].value
|
||||
@@ -176,10 +200,14 @@ export default {
|
||||
return this.$u.toast('请输入手机号')
|
||||
}
|
||||
this.flag = true
|
||||
this.$instance.post(`/app/apppatrolreportinfov2/addByGirdMember`, {...this.forms}).then((res) => {
|
||||
var url = this.id ? '/app/apppatrolreportinfov2/update' : '/app/apppatrolreportinfov2/addByGirdMember'
|
||||
this.$instance.post(`${url}`, {...this.forms}).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('上报成功')
|
||||
this.$u.toast(this.id ? '编辑成功' : '上报成功')
|
||||
uni.$emit('getListInit')
|
||||
if(this.id) {
|
||||
uni.$emit('updateDeatil')
|
||||
}
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
|
||||
@@ -29,11 +29,16 @@
|
||||
<span class="card-right">{{ data.groupName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card" v-if="data.eventSource == 0 || data.eventSource == 1">
|
||||
<span class="card-left">所属网格</span>
|
||||
<span class="card-right">{{ data.girdName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card" v-else>
|
||||
<span class="card-left">所属群聊</span>
|
||||
<span class="card-right">{{ data.wxGroupName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<span class="card-left">联系方式</span>
|
||||
<span class="card-right">
|
||||
@@ -391,9 +396,9 @@ uni-page-body {
|
||||
}
|
||||
|
||||
img {
|
||||
width: 225px;
|
||||
height: 226px;
|
||||
margin-right: 8px;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
margin: 0 8px 8px 0;
|
||||
}
|
||||
|
||||
img:nth-of-type(3n) {
|
||||
|
||||
@@ -33,10 +33,14 @@
|
||||
<span class="types-right">{{ item.groupName }}</span>
|
||||
</div>
|
||||
|
||||
<div class="gards">
|
||||
<div class="gards" v-if="item.eventSource == 0 || item.eventSource == 1">
|
||||
<span>所属网格</span>
|
||||
<span class="gards-right">{{ item.girdName }}</span>
|
||||
</div>
|
||||
<div class="gards" v-else>
|
||||
<span>所属群聊</span>
|
||||
<span class="gards-right">{{ item.wxGroupName }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="status" :class="item.eventStatus == 0 ? 'status0' : item.eventStatus == 1 ? 'status1' : item.eventStatus == 2 ? 'status2' : 'status3'"
|
||||
|
||||
Reference in New Issue
Block a user