190 lines
3.8 KiB
Vue
190 lines
3.8 KiB
Vue
<template>
|
|
<page-meta :page-font-size="$store.state.vuex_fontsize+'px'" :root-font-size="$store.state.vuex_fontsize+'px'"></page-meta>
|
|
<view style="padding-bottom: 1px;">
|
|
<view>
|
|
<uni-search-bar @confirm="search" v-model="nickName" cancelButton="none" @clear="clear" bgColor="#ffffff">
|
|
</uni-search-bar>
|
|
</view>
|
|
<view class="section-box">
|
|
<uni-section title="选择同行人" type="line">
|
|
<uni-indexed-list :options="list" :show-select="true" @click="bindClick" />
|
|
</uni-section>
|
|
</view>
|
|
<view class="select-box">
|
|
<view class="yxz-box">已选择:</view>
|
|
<view class="yxz-content">{{ selectValue }}</view>
|
|
<view class="u-button">
|
|
<u-button type="primary" text="确定" @click="gotoBack()"
|
|
style="width: 60px;background-color:#00b27b;border-color:#00b27b;"></u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
userLeaderList
|
|
} from '@/api/handbook.js'
|
|
export default {
|
|
components: {},
|
|
data() {
|
|
return {
|
|
id: "", // 页面id
|
|
address: "", // 地图页面的地址
|
|
otherUser: "", // 同行人
|
|
projectName: "", // 工程名称
|
|
nickName: '',
|
|
list: [{
|
|
'data': [
|
|
|
|
]
|
|
}],
|
|
selectValue: '',
|
|
ids: [],
|
|
userSelect: {
|
|
name: [],
|
|
ids: []
|
|
}
|
|
}
|
|
},
|
|
onLoad(option) {
|
|
this.userLeaderList();
|
|
},
|
|
methods: {
|
|
userLeaderList() {
|
|
userLeaderList({
|
|
pageSize: 999999,
|
|
pageNum: 1,
|
|
nickName: this.nickName
|
|
}).then(res => {
|
|
this.list[0].data = [];
|
|
res.rows.forEach(item => {
|
|
this.list[0].data.push(item.nickName);
|
|
this.ids.push(item.userId);
|
|
})
|
|
|
|
|
|
|
|
})
|
|
},
|
|
search(res) {
|
|
this.userLeaderList()
|
|
},
|
|
clear(res) {
|
|
this.userLeaderList()
|
|
},
|
|
bindClick(e) {
|
|
console.log(e);
|
|
var selectArr = [];
|
|
this.userSelect = {
|
|
name: [],
|
|
ids: []
|
|
};
|
|
e.select.forEach(i => {
|
|
selectArr.push(i.name)
|
|
this.userSelect.name.push(i.name);
|
|
this.userSelect.ids.push(this.ids[i.itemIndex]);
|
|
})
|
|
|
|
|
|
|
|
|
|
this.selectValue = selectArr.join(',');
|
|
},
|
|
gotoBack() {
|
|
this.$store.commit('SET_TXUSER', this.userSelect)
|
|
uni.navigateBack({
|
|
delta: 1
|
|
})
|
|
|
|
|
|
// uni.navigateTo({
|
|
// url: '/pages/aqlz/detail?id=' + this.id + "&address=" + this.address + "&otherUser=" + this
|
|
// .selectValue +
|
|
// "&projectName=" + this.projectName
|
|
// })
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.section-box {
|
|
width: 353px;
|
|
height: 514px;
|
|
overflow-y: auto;
|
|
box-sizing: border-box;
|
|
box-shadow: rgba(102, 102, 102, 0.35) 0px 0px 3px;
|
|
font-style: normal;
|
|
font-size: 11px;
|
|
text-align: left;
|
|
background: inherit inherit inherit inherit inherit inherit inherit inherit;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
border-color: rgb(242, 242, 242);
|
|
border-radius: 1px;
|
|
margin: 0 auto;
|
|
}
|
|
|
|
.select-box {
|
|
position: fixed;
|
|
bottom: 0;
|
|
width: 100%;
|
|
height: 40px;
|
|
border-color: rgb(242, 242, 242);
|
|
background-color: #FFFFFF;
|
|
margin: 0 auto;
|
|
border-radius: 1px;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-top: 12px;
|
|
justify-content: space-between;
|
|
|
|
|
|
.yxz-box {
|
|
color: #333333;
|
|
font-size: 13px;
|
|
margin-left:5px;
|
|
width: 22%;
|
|
}
|
|
|
|
.yxz-content {
|
|
width: 55%;
|
|
color: #00b37d;
|
|
font-size: 13px;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.u-button {
|
|
height: 25px;
|
|
width: 23%;
|
|
}
|
|
}
|
|
|
|
.uni-indexed-list__menu {
|
|
width: 0px;
|
|
}
|
|
|
|
.uni-indexed-list {
|
|
position: relative;
|
|
}
|
|
|
|
::v-deep .uni-searchbar__box {
|
|
border: 1px solid #ededed;
|
|
}
|
|
|
|
::v-deep .uni-section .uni-section-header__content {
|
|
font-weight: bold;
|
|
}
|
|
|
|
::v-deep .uni-section .uni-section-header__decoration {
|
|
background-color: #00b37d;
|
|
}
|
|
|
|
::v-deep .uniui-checkbox-filled {
|
|
color: #00b37d !important;
|
|
}
|
|
::v-deep .uni-section__content-title{
|
|
font-size: 14px !important;
|
|
}
|
|
</style> |