qingyiay
2023-08-08 40a7d8db73f81ad10de03684dc9f6720e18cc315
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<template>
    <view class="">
        <view class="customer-index">
            <view class="customer-index_body">
                <view class="wait-collection"
                    style="background: url('https://mx.jzeg.cn:9095/appimg/image/banner/customerbanner.png') no-repeat;background-size:contain">
                </view>
                <view style="position: relative;top: -120px;">
                    <u-empty mode="data"
                        icon="http://cdn.uviewui.com/uview/empty/data.png"
                        textSize="30"
                        iconSize="1000"
                        v-if="CoalNameList.length == 0"></u-empty>
                </view>
                <view class="collection-form">
                    <view class="collection-form-item"
                        v-for="(item, index) in CoalNameList"
                        :key="index">
                        <view class="first-line">
                            <view class="dispatch-receive">
                                <view class="dispatch">煤种名称:{{ item }}</view>
                            </view>
                            <view class="">
                                <u-button type="primary"
                                    plain
                                    text="选择"
                                    @click.stop="loadUnloadHandle(item)"></u-button>
                            </view>
                        </view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                CoalNameList: []
            };
        },
        onLoad() {
            this.init()
        },
        methods: {
            init() {
                this.getCoalNameAllHandle()
            },
            getCoalNameAllHandle() {
                uni.showLoading({
                    title: "加载中"
                })
                this.$reqGet('getCoalNameAll').then(res => {
                    uni.hideLoading()
                    if (res.code === 0) {
                        this.CoalNameList = res.data
                    } else {
                        this.$u.toast('加载失败')
                    }
                })
            },
            loadUnloadHandle(name) {
                uni.navigateTo({
                    url: `/pages/loadUnload-page/loadUnload-detail/loadUnload-detail?coalName=${name}`
                })
            }
        },
    }
</script>
 
<style lang="scss"
    scoped>
    @mixin flex {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
 
    .wait-collection {
        width: 100%;
        height: 600rpx;
        position: relative;
        top: vww(-10);
        z-index: 0;
    }
 
    .customer-index {
        width: 100%;
        margin: 0 auto;
 
        &_body {
            .collection-form {
                width: vww(345);
                margin: 0 vww(15);
                position: relative;
                top: vww(-144);
 
                .collection-form-item {
                    width: 690rpx;
                    height: 100rpx;
                    background: #ffffff;
                    box-shadow: 4rpx 6rpx 25rpx 0rpx rgba(73, 120, 240, 0.15);
                    border-radius: 20rpx;
                    overflow: hidden;
                    @include flex;
                    flex-direction: column;
                    position: relative;
                    align-items: center;
                    justify-content: center;
                    margin-top: vww(10);
 
                    .first-line {
                        width: 94%;
                        height: vww(30);
                        display: flex;
                        justify-content: space-between;
                        align-items: center;
                    }
                }
            }
        }
    }
</style>