BUG 27433

This commit is contained in:
aixianling
2022-03-15 18:15:04 +08:00
parent a8d67211fc
commit a228eededc
2 changed files with 49 additions and 34 deletions

View File

@@ -51,6 +51,8 @@
</template> </template>
<script> <script>
import qs from 'query-string'
export default { export default {
name: 'Content', name: 'Content',
components: {}, components: {},
@@ -92,7 +94,6 @@ export default {
document.title = this.titleList[this.status] document.title = this.titleList[this.status]
}, },
methods: { methods: {
typeList() { typeList() {
this.$http.post(`/app/appclapeventgroup/list`, null, { this.$http.post(`/app/appclapeventgroup/list`, null, {
params: { params: {
@@ -106,7 +107,6 @@ export default {
} }
}) })
}, },
confirm() { confirm() {
if (this.status == 4 && !this.forms.name) { if (this.status == 4 && !this.forms.name) {
return this.$u.toast('请选择转交对象') return this.$u.toast('请选择转交对象')
@@ -161,7 +161,8 @@ export default {
this.forms.groupId = e[0].value this.forms.groupId = e[0].value
}, },
toSelectUser() { toSelectUser() {
uni.navigateTo({url: './SelectUser'}) let {id} = this.selectUser
uni.navigateTo({url: qs.stringifyUrl({url: './SelectUser', query: {id}})})
}, },
}, },
} }

View File

@@ -2,7 +2,8 @@
<div class="SelectUser"> <div class="SelectUser">
<div class="header-middle"> <div class="header-middle">
<div class="hint"> <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> <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>
<div class="showTypes" v-if="!userList.length"> <div class="showTypes" v-if="!userList.length">
@@ -11,14 +12,16 @@
<div class="imges"> <div class="imges">
<span v-if="item.girdLevel == 1" style="width: 24px;"></span> <span v-if="item.girdLevel == 1" style="width: 24px;"></span>
<span v-if="item.girdLevel == 2"> <span v-if="item.girdLevel == 2">
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked" @click.stop="girdClick(item, index)" /> <img src="./components/img/xzh.png" alt="" class="imgselect" v-if="item.isChecked"
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click.stop="girdClick(item, index)" /> @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" /> <img src="./components/img/gird--select-icon.png" alt="" class="avatras"/>
</div> </div>
<div class="rightes"> <div class="rightes">
<div class="applicationNames">{{ item.girdName }}</div> <div class="applicationNames">{{ item.girdName }}</div>
<img src="./components/img/right-icon.png" alt="" class="imgs" /> <img src="./components/img/right-icon.png" alt="" class="imgs"/>
</div> </div>
</div> </div>
</div> </div>
@@ -30,14 +33,17 @@
<div v-if="userList.length > 0"> <div v-if="userList.length > 0">
<div class="cards" v-for="(e, index) in userList" :key="index"> <div class="cards" v-for="(e, index) in userList" :key="index">
<div class="imges"> <div class="imges">
<img src="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked" @click="userClick(e, index)" /> <img src="./components/img/xzh.png" alt="" class="imgselect" v-if="e.isChecked"
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)" /> @click="userClick(e, index)"/>
<img src="./components/img/xz.png" alt="" class="imgselect" v-else @click="userClick(e, index)"/>
<img src="./components/img/tx@2x.png" alt="" class="avatras" /> <img src="./components/img/tx@2x.png" alt="" class="avatras"/>
</div> </div>
<div class="rights"> <div class="rights">
<div class="applicationNames"><AiOpenData v-if="e.name" type="userName" :openid="e.name" style="display: block;"/></div> <div class="applicationNames">
<AiOpenData v-if="e.name" type="userName" :openid="e.name" style="display: block;"/>
</div>
<div class="idNumbers">{{ e.phone }}</div> <div class="idNumbers">{{ e.phone }}</div>
</div> </div>
</div> </div>
@@ -67,6 +73,7 @@ export default {
} }
}, },
onLoad() { onLoad() {
this.selectUser.id = this.$route.query.id
this.getTree() this.getTree()
}, },
onShow() { onShow() {
@@ -84,14 +91,14 @@ export default {
}, },
treeInit() { treeInit() {
if(this.allData[0].girdLevel == 2) { if (this.allData[0].girdLevel == 2) {
if(this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) { if (this.allData[0].girdMemberList && this.allData[0].girdMemberList.length) {
this.userList = this.allData[0].girdMemberList this.userList = this.allData[0].girdMemberList
this.userList.map((item) => { this.userList.map((item) => {
item.isChecked = false item.isChecked = item.id == this.selectUser.id
}) })
} }
}else { } else {
this.treeList = this.allData[0].girdList this.treeList = this.allData[0].girdList
} }
var obj = { var obj = {
@@ -114,19 +121,19 @@ export default {
searckGird(row) { searckGird(row) {
this.treeList = [] this.treeList = []
if(row.girdLevel != 2) { //查网格 if (row.girdLevel != 2) { //查网格
this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => { this.$http.post(`/app/appgirdinfo/list?parentGirdId=${row.id}&size=999`).then((res) => {
if (res?.data) { if (res?.data) {
this.treeList = res.data.records this.treeList = res.data.records.map(e => ({...e, isChecked: e.id == this.selectUser.id}))
} }
}) })
}else { //查网格员 } else { //查网格员
this.userList = [] this.userList = []
this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => { this.$http.post(`/app/appgirdmemberinfo/listByGirdIdByThree?girdId=${row.id}`).then((res) => {
if (res?.data) { if (res?.data) {
this.userList = res.data this.userList = res.data
this.userList.map((item) => { this.userList.map((item) => {
item.isChecked = false item.isChecked = item.id == this.selectUser.id
}) })
} }
}) })
@@ -135,13 +142,13 @@ export default {
girdNameClick(row, index) { girdNameClick(row, index) {
this.userList = [] this.userList = []
if(!index) { //第一级别 if (!index) { //第一级别
this.slectList = [] this.slectList = []
this.treeInit() this.treeInit()
}else { } else {
var list = [] var list = []
this.slectList.map((item, i) => { this.slectList.map((item, i) => {
if(i <= index) { if (i <= index) {
list.push(item) list.push(item)
} }
}) })
@@ -156,10 +163,9 @@ export default {
this.treeList[index].isChecked = false this.treeList[index].isChecked = false
this.selectUser = {} this.selectUser = {}
} else { } else {
this.treeList.map((item) => { this.treeList.map((item, i) => {
item.isChecked = false item.isChecked = index == i
}) })
this.treeList[index].isChecked = true
this.selectUser = row this.selectUser = row
} }
this.$forceUpdate() this.$forceUpdate()
@@ -170,10 +176,9 @@ export default {
this.userList[index].isChecked = false this.userList[index].isChecked = false
this.selectUser = {} this.selectUser = {}
} else { } else {
this.userList.map((item) => { this.userList.map((item, i) => {
item.isChecked = false item.isChecked = index == i
}) })
this.userList[index].isChecked = true
this.selectUser = row this.selectUser = row
} }
this.$forceUpdate() this.$forceUpdate()
@@ -182,7 +187,7 @@ export default {
submit() { submit() {
if (this.selectUser.id != null) { if (this.selectUser.id != null) {
uni.$emit('goback', this.selectUser) uni.$emit('goback', this.selectUser)
uni.navigateBack() uni.navigateBack({})
} else { } else {
return this.$u.toast('请选择网格或网格员') return this.$u.toast('请选择网格或网格员')
} }
@@ -195,6 +200,7 @@ export default {
.SelectUser { .SelectUser {
height: 100%; height: 100%;
background: #fff; background: #fff;
.header-top { .header-top {
background: #fff; background: #fff;
padding: 20px 32px; padding: 20px 32px;
@@ -202,10 +208,11 @@ export default {
.header-middle { .header-middle {
padding-bottom: 140px; padding-bottom: 140px;
.hint { .hint {
padding: 28px 20px 28px 32px; padding: 28px 20px 28px 32px;
line-height: 56px; line-height: 56px;
box-shadow: 0px 1px 0px 0px #e4e5e6; box-shadow: 0 1px 0 0 #e4e5e6;
font-size: 30px; font-size: 30px;
font-weight: 500; font-weight: 500;
// word-break: break-all; // word-break: break-all;
@@ -244,11 +251,13 @@ export default {
margin-left: 36px; margin-left: 36px;
} }
} }
img { img {
width: 74px; width: 74px;
height: 74px; height: 74px;
border-radius: 8px; border-radius: 8px;
} }
.rightes { .rightes {
width: calc(100% - 160px); width: calc(100% - 160px);
display: flex; display: flex;
@@ -265,6 +274,7 @@ export default {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.imgs { .imgs {
width: 40px; width: 40px;
height: 40px; height: 40px;
@@ -286,6 +296,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
width: 200px; width: 200px;
.imgselect { .imgselect {
width: 48px; width: 48px;
height: 48px; height: 48px;
@@ -307,6 +318,7 @@ export default {
margin-left: 32px; margin-left: 32px;
border-bottom: 1px solid #e4e5e6; border-bottom: 1px solid #e4e5e6;
padding-right: 40px; padding-right: 40px;
.applicationNames { .applicationNames {
font-size: 36px; font-size: 36px;
font-weight: 500; font-weight: 500;
@@ -315,6 +327,7 @@ export default {
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.idNumbers { .idNumbers {
color: #666; color: #666;
} }
@@ -330,6 +343,7 @@ export default {
width: 100%; width: 100%;
height: 118px; height: 118px;
background: #f4f8fb; background: #f4f8fb;
div { div {
width: 192px; width: 192px;
height: 80px; height: 80px;