|
@@ -0,0 +1,249 @@
|
|
|
|
+<template>
|
|
|
|
+ <view>
|
|
|
|
+ <view class="search">
|
|
|
|
+ <view class="box" @click="go_search()">
|
|
|
|
+ <view class="icon">
|
|
|
|
+ <uni-icons type="search" size="16" color="#BBBBBB"></uni-icons>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="text">搜索</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="content">
|
|
|
|
+ <view class="title">
|
|
|
|
+ <view class="icon">
|
|
|
|
+ <image src="./icon/title_icon.png" mode=""></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="text">国家能源集团枣泉煤矿</view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ <view class="section" v-for="(item,index) in list" :key="index">
|
|
|
|
+ <view class="box">
|
|
|
|
+ <view class="item">
|
|
|
|
+ <view class="left">
|
|
|
|
+ <view class="icon" v-if="active == index" @click.stop="change_active(index,item.id)">
|
|
|
|
+ <image src="./icon/close.png" mode=""></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="icon" v-if="active != index" @click.stop="change_active(index,item.id)">
|
|
|
|
+ <image src="./icon/open.png" mode=""></image>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="text">{{item.title}} ({{item.user_num}})</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="right">
|
|
|
|
+ <uni-icons type="eye"></uni-icons>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="list" v-if="active == index">
|
|
|
|
+ <view class="item" v-for="(item_2,index_2) in user_list" :key="index_2">
|
|
|
|
+ <view class="icon">{{item_2.name.charAt(0)}}</view>
|
|
|
|
+ <view class="text">{{item_2.name}} {{item_2.position_name}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ // 部门列表
|
|
|
|
+ list: [
|
|
|
|
+
|
|
|
|
+ ],
|
|
|
|
+ // 当前展开部门
|
|
|
|
+ active: 99999999,
|
|
|
|
+
|
|
|
|
+ // 人员列表
|
|
|
|
+ user_list:[]
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // 搜索
|
|
|
|
+ go_search(){
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url:"./search/search",
|
|
|
|
+ animationType:"fade-in",
|
|
|
|
+ animationDuration:200
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 获取部门列表
|
|
|
|
+ get_section_getGroupList() {
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ mask:true
|
|
|
|
+ })
|
|
|
|
+ this.$api.section_getGroupList({
|
|
|
|
+
|
|
|
|
+ }).then((res) => {
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ console.log(res)
|
|
|
|
+
|
|
|
|
+ this.list = res.data.data.group.leader.data.concat(res.data.data.group.office.data.concat(res
|
|
|
|
+ .data.data.group.basic.data.concat()))
|
|
|
|
+ // console.log(this.list)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ change_active(index,id) {
|
|
|
|
+ this.user_list = []
|
|
|
|
+ if (this.active == index) {
|
|
|
|
+ this.active = 99999999
|
|
|
|
+ } else {
|
|
|
|
+ this.active = index
|
|
|
|
+ this.get_user_list(id)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 获取当前部门人员
|
|
|
|
+ get_user_list(id){
|
|
|
|
+ uni.showLoading({
|
|
|
|
+ mask:true
|
|
|
|
+ })
|
|
|
|
+ this.$api.user_list({
|
|
|
|
+ id:id
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ uni.hideLoading()
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.user_list = res.data.data
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onLoad() {
|
|
|
|
+ this.get_section_getGroupList()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss">
|
|
|
|
+ page {
|
|
|
|
+ background-color: #F3F8F7;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .search {
|
|
|
|
+ margin-bottom: 20rpx;
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 25rpx 30rpx;
|
|
|
|
+
|
|
|
|
+ .box {
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ background-color: #F4F4F4;
|
|
|
|
+ border-radius: 50rpx;
|
|
|
|
+
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 0 25rpx;
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ margin-right: 10rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .text {
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ color: #BBBBBB;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .content {
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ height: 110rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 0 36rpx;
|
|
|
|
+ border-bottom: 1rpx solid #F3F8F7;
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ image {
|
|
|
|
+ width: 48rpx;
|
|
|
|
+ height: 36rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .text {
|
|
|
|
+ margin-left: 20rpx;
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .section{
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 0 20rpx;
|
|
|
|
+
|
|
|
|
+ .box{
|
|
|
|
+
|
|
|
|
+ .item{
|
|
|
|
+ height: 110rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+
|
|
|
|
+ margin-left: 20rpx;
|
|
|
|
+ border-bottom: 1rpx solid #F3F8F7;
|
|
|
|
+
|
|
|
|
+ .left{
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ .icon{
|
|
|
|
+ line-height: 110rpx;
|
|
|
|
+ width: 90rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ image{
|
|
|
|
+ width: 24rpx;
|
|
|
|
+ height: 24rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .text{
|
|
|
|
+ font-size: 32rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .right{
|
|
|
|
+ line-height: 110rpx;
|
|
|
|
+ width: 90rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .list{
|
|
|
|
+ .item{
|
|
|
|
+ height: 110rpx;
|
|
|
|
+
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: left;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ margin-left: 108rpx;
|
|
|
|
+ border-bottom: 1rpx solid #F3F8F7;
|
|
|
|
+ .icon{
|
|
|
|
+ width: 35rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 35rpx;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ border: 1rpx solid #00A1E9;
|
|
|
|
+
|
|
|
|
+ font-size: 24rpx;
|
|
|
|
+ color: #00A1E9;
|
|
|
|
+ }
|
|
|
|
+ .text{
|
|
|
|
+ margin-left: 18rpx;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+</style>
|