事件上报
This commit is contained in:
@@ -2,10 +2,8 @@
|
||||
<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" 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 label="转交给" prop="status" required :border-bottom="false" class="first-form" 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" right-icon="arrow-right" v-if="status != 1">
|
||||
<!-- <u-input v-model="forms.groupName" placeholder="请选择事件分类" /> -->
|
||||
@@ -71,30 +69,19 @@ 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('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: {
|
||||
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: {
|
||||
@@ -167,9 +154,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: `./SelectUser?detailId=${this.id}`})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -207,6 +207,7 @@ export default {
|
||||
<style scoped lang="scss">
|
||||
uni-page-body {
|
||||
height: 100%;
|
||||
padding-top: 26px;
|
||||
}
|
||||
|
||||
.Detail {
|
||||
@@ -215,8 +216,8 @@ uni-page-body {
|
||||
|
||||
.header-top {
|
||||
display: flex;
|
||||
margin: 26px 0 14px 0;
|
||||
padding: 0 32px;
|
||||
margin-bottom: 14px;
|
||||
padding: 32px 32px 0;
|
||||
|
||||
.avatars {
|
||||
width: 80px;
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
<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)">
|
||||
<div class="cards" v-for="(item, index) in treeList" :key="index" @click="itemClick(item, index)">
|
||||
<div class="imges">
|
||||
<span v-if="item.girdLevel == 2">
|
||||
<!-- <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>
|
||||
</span> -->
|
||||
<img src="./components/img/gird--select-icon.png" alt="" class="avatras" />
|
||||
</div>
|
||||
<div class="rightes">
|
||||
@@ -63,9 +62,11 @@ export default {
|
||||
treeList: [],
|
||||
slectList: [],
|
||||
userList: [],
|
||||
detailId: ''
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(option) {
|
||||
this.detailId = option.detailId
|
||||
this.getTree()
|
||||
},
|
||||
onShow() {
|
||||
@@ -74,7 +75,7 @@ export default {
|
||||
methods: {
|
||||
getTree() {
|
||||
this.slectList = []
|
||||
this.$http.post('/app/appgirdinfo/listAllByTop').then((res) => {
|
||||
this.$http.post(`/app/appresidentreportinfo/listGirdInfoByTransfer?id=${this.detailId}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.allData = res.data
|
||||
this.treeInit()
|
||||
@@ -83,54 +84,38 @@ export default {
|
||||
},
|
||||
|
||||
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
|
||||
}
|
||||
// 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: this.allData[0].girdName,
|
||||
id: this.allData[0].id,
|
||||
girdLevel: this.allData[0].girdLevel
|
||||
girdName: '可选范围',
|
||||
id: '',
|
||||
}
|
||||
this.slectList.push(obj)
|
||||
this.treeList = this.allData
|
||||
},
|
||||
|
||||
itemClick(row) {
|
||||
console.log(row)
|
||||
itemClick(row, index) {
|
||||
if(!this.treeList[index].girdMemberList.length) {
|
||||
return this.$u.toast('该网格下暂无网格员')
|
||||
}
|
||||
var obj = {
|
||||
girdName: row.girdName,
|
||||
id: row.id,
|
||||
girdLevel: row.girdLevel
|
||||
}
|
||||
this.slectList.push(obj)
|
||||
this.searckGird(row)
|
||||
this.searckGird(index)
|
||||
},
|
||||
|
||||
searckGird(row) {
|
||||
this.treeList = []
|
||||
if(row.girdLevel != 2) { //查网格
|
||||
this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.treeList = res.data.records
|
||||
}
|
||||
})
|
||||
}else { //查网格员
|
||||
this.userList = []
|
||||
this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
|
||||
if (res?.data) {
|
||||
this.userList = res.data
|
||||
this.userList.map((item) => {
|
||||
item.isChecked = false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
searckGird(index) {
|
||||
this.userList = this.treeList[index].girdMemberList
|
||||
},
|
||||
|
||||
girdNameClick(row, index) {
|
||||
|
||||
Reference in New Issue
Block a user