wjt
2024-06-27 69a74309ed12cc13f0fa9fb90c5bffad17ade360
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<template>
    <u-popup mode="center" :show="show" @close="close" bgColor="white" round="10">
        <view style=" width: 80vw;padding:  32rpx;">
            <view class="title">选择登录企业</view>
            <u-radio-group  iconPlacement="right" v-model="value" placement="column">
                <u-radio v-for="(item,index) in list" :key="index" :label="item.companyName" :name="item.companyId"></u-radio>
            </u-radio-group>
            <view class="down-button">
                <view>
                    <u-button shape="circle" @click="close">取消</u-button>
                </view>
                <view>
                    <u-button shape="circle" color="#1171E0" @click="entery">确定</u-button>
                </view>
            </view>
        </view>
    </u-popup>
</template>
 
<script>
    export default {
        data() {
            return {
                value: "",
                show: false,
                list: [{},{}]
            }
        },
        methods: {
            open(list) {
                this.list = list
                this.show = true
            },
            close() {
                uni.removeStorageSync('sessionToken')
                this.show = false
            },
            entery() {
                if(!this.value) {
                    uni.showToast({
                        title: '请选择企业',
                        icon: 'none'
                    })
                    return
                }
                this.$emit('select', this.value)
            }
        }
    }
</script>
 
<style lang="scss" scoped>
    .title{
        font-size: 36rpx;
        font-weight: 700;
        text-align: center;
        margin-bottom: 20rpx;
    }
    .down-button{
        margin-top: 30rpx;
        display: flex;
        justify-content: space-between;
        align-items: center;
        &>view{
            width: 45%;
        }
    }
</style>