<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>
|