123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 |
- <template>
- <view>
- <view class="search">
- <view class="box">
- <view class="icon">
- <uni-icons type="search" size="16" color="#BBBBBB"></uni-icons>
- </view>
- <view class="text">
- <input type="text" v-model="search_text" value="" placeholder="搜索" confirm-type="search"
- placeholder-style="font-size: 30rpx;color: #BBBBBB;" @input="get_list()"/>
- </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="list">
- <view class="item" v-for="(item,index) in list" :key="index" @click="go_user_info(item.staff_num)">
- <view class="left">
- <view class="icon">{{item.name.charAt(0)}}</view>
- <view class="text">{{item.name}} {{item.dept_name}} {{item.duty_num}}</view>
- </view>
- <view class="right" @click.stop="phone(item.mobile)">
- <uni-icons type="phone"></uni-icons>
- </view>
- </view>
- <view v-if="list.length == 0" style="font-size: 32rpx;text-align: center;line-height: 400rpx;">暂无搜索结果
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- search_text: "",
- // 人员列表
- list: [
- ],
- };
- },
- methods: {
- get_list() {
- this.$api.user_search({
- content: this.search_text
- }).then((res) => {
- console.log(res)
- this.list = res.data.data
- })
- },
- go_user_info(staff_num){
- uni.navigateTo({
- url:"../personal_information/personal_information?staff_num=" + staff_num
- })
- },
- phone(mobile){
- if(mobile != null){
- uni.makePhoneCall({
- phoneNumber: mobile
- });
- }
- },
- }
- }
- </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;
- }
- }
- .list {
- box-sizing: border-box;
- padding: 0 20rpx;
- .item {
- height: 110rpx;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-left: 58rpx;
- border-bottom: 1rpx solid #F3F8F7;
- .left{
- display: flex;
- .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;
-
- }
- }
- .right{
-
- }
- }
- }
- }
- </style>
|