BUG 29554
This commit is contained in:
@@ -2,15 +2,17 @@
|
||||
<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 == 4">
|
||||
<!-- <u-input v-model="forms.name" placeholder="请选择转交对象" @click="toSelectUser" disabled /> -->
|
||||
<div @click="toSelectUser" style="width: 100%; text-align: right;">
|
||||
<span v-if="!forms.name" style="color:#999;">请选择</span>
|
||||
<AiOpenData v-else-if="selectUser.name" type="userName" :openid="forms.name" style="display:inline-block;"/>
|
||||
<span v-else v-text="forms.name"/>
|
||||
<u-form-item label="转交给" prop="status" required :border-bottom="false" class="first-form" v-if="status == 4">
|
||||
<div flex class="flexEnd">
|
||||
<AiPagePicker type="custom" :id="selectObject.id" @select="handleSelectObject"
|
||||
:ops="{url:'../AppGridManagement/selectGridMember',label: 'name'}">
|
||||
<template v-if="isSelectGridMember">
|
||||
<AiOpenData type="userName" :openid="forms.name"/>
|
||||
<u-icon name="arrow-right" color="#ddd"/>
|
||||
</template>
|
||||
<AiMore v-else v-model="forms.name"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
|
||||
</u-form-item>
|
||||
<u-form-item label="事件分类" prop="groupName" required :border-bottom="false" right-icon="arrow-right"
|
||||
v-if="status== 2">
|
||||
@@ -51,7 +53,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import qs from 'query-string'
|
||||
|
||||
export default {
|
||||
name: 'Content',
|
||||
@@ -71,24 +72,21 @@ export default {
|
||||
status: '', //4转交 2我已办结
|
||||
myList: [],
|
||||
id: '',
|
||||
selectUser: {},
|
||||
selectObject: {},
|
||||
titleList: ['', '', '事件处理', '', '事件转交'],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isSelectGridMember() {
|
||||
return this.selectObject.kind == "user"
|
||||
}
|
||||
},
|
||||
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
|
||||
if (res.name) {
|
||||
this.forms.name = res.name
|
||||
} else {
|
||||
this.forms.name = res.girdName
|
||||
}
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
document.title = this.titleList[this.status]
|
||||
@@ -126,13 +124,13 @@ export default {
|
||||
successText = '转交成功'
|
||||
params = {
|
||||
...this.forms,
|
||||
girdId: this.selectUser.id,
|
||||
girdName: this.selectUser.girdName,
|
||||
girdId: this.selectObject.id,
|
||||
girdName: this.selectObject.girdName,
|
||||
}
|
||||
if (this.selectUser.name) { //选择的网格员
|
||||
params.girdId = this.selectUser.girdId
|
||||
params.girdMemberId = this.selectUser.wxUserId
|
||||
params.girdMemberName = this.selectUser.name
|
||||
if (this.isSelectGridMember) { //选择的网格员
|
||||
params.girdId = this.selectObject.girdId
|
||||
params.girdMemberId = this.selectObject.wxUserId
|
||||
params.girdMemberName = this.selectObject.name
|
||||
}
|
||||
}
|
||||
if (this.status == 2) {
|
||||
@@ -142,17 +140,11 @@ export default {
|
||||
}
|
||||
params.id = this.id
|
||||
this.$http.post(url, params).then((res) => {
|
||||
if (res.code == 0) {
|
||||
if (res?.code == 0) {
|
||||
this.$u.toast(successText)
|
||||
uni.$emit('update')
|
||||
// uni.$emit('getListInit')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({delta: 2})
|
||||
// if (this.status == 4) {
|
||||
// uni.navigateBack({delta: 2})
|
||||
// } else {
|
||||
// uni.navigateBack()
|
||||
// }
|
||||
}, 600)
|
||||
}
|
||||
})
|
||||
@@ -161,10 +153,10 @@ export default {
|
||||
this.forms.groupName = e[0].label
|
||||
this.forms.groupId = e[0].value
|
||||
},
|
||||
toSelectUser() {
|
||||
let {id} = this.selectUser
|
||||
uni.navigateTo({url: qs.stringifyUrl({url: './SelectUser', query: {id}})})
|
||||
},
|
||||
handleSelectObject(obj) {
|
||||
this.selectObject = obj
|
||||
this.forms.name = obj.name || obj.girdName
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
@@ -259,5 +251,10 @@ export default {
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.flexEnd {
|
||||
width: 100%;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user