|
@@ -1,20 +1,30 @@
|
|
|
<template>
|
|
|
<view class="list-content-wrap">
|
|
|
<view class="top-box">
|
|
|
- <text style="margin-right:20rpx">4品种</text>
|
|
|
- <text>2023-2-06 13:30:30</text>
|
|
|
+ <text style="margin-right:20rpx">{{num}}品种</text>
|
|
|
+ <text>{{time}}</text>
|
|
|
</view>
|
|
|
<view class="list-wrap">
|
|
|
- <view class="flex item" v-for="item in 4" :key="item">
|
|
|
- <view class="label">动力煤</view>
|
|
|
+ <view class="flex item" v-for="item in list" :key="item.classify_name">
|
|
|
+ <view class="label">{{item.classify_name}}</view>
|
|
|
<view style="flex:1">
|
|
|
- <view class="opt">zc</view>
|
|
|
- <view class="opt">zcccccc</view>
|
|
|
- <view class="opt">zc</view>
|
|
|
- <view class="opt">zcccccc</view>
|
|
|
+ <view
|
|
|
+ class="opt"
|
|
|
+ v-for="_item in item.items"
|
|
|
+ :key="_item.classify_type"
|
|
|
+ @click="goDetail(_item,item)"
|
|
|
+ >{{_item.classify_type}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="empty-box" v-if="!list||list.length===0">
|
|
|
+ <image
|
|
|
+ :src="globalImgUrls.chartEmpty"
|
|
|
+ mode="widthFix"
|
|
|
+ />
|
|
|
+ <view>无数据~</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
@@ -23,6 +33,44 @@
|
|
|
const dayjs=require('@/utils/dayjs.min')
|
|
|
export default {
|
|
|
name:'IndexContent',
|
|
|
+ props:{
|
|
|
+ time:{
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ num:{
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ list:{
|
|
|
+ default:null
|
|
|
+ },
|
|
|
+ exchange:{
|
|
|
+ default:''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ goDetail(_item,item){
|
|
|
+ const queryObj={
|
|
|
+ classify_name:item.classify_name,
|
|
|
+ classify_type:_item.classify_type,
|
|
|
+ exchange:this.exchange
|
|
|
+ }
|
|
|
+ let queryObjStr=''
|
|
|
+ for (const key in queryObj) {
|
|
|
+ if(!queryObjStr){
|
|
|
+ queryObjStr=`${key}=${queryObj[key]}`
|
|
|
+ }else{
|
|
|
+ queryObjStr=`${queryObjStr}&${key}=${queryObj[key]}`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/positionAnalysis/detail?${queryObjStr}`,
|
|
|
+ success: (result) => {},
|
|
|
+ fail: () => {},
|
|
|
+ complete: () => {}
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
}
|
|
|
</script>
|
|
@@ -56,4 +104,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.empty-box{
|
|
|
+ text-align: center;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #999;
|
|
|
+ padding-top: 150rpx;
|
|
|
+ image{
|
|
|
+ width: 346rpx;
|
|
|
+ margin-bottom: 57rpx;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|