|
@@ -1,12 +1,39 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
+ <div class="common-list">
|
|
|
+ <div class="fixed-num">共
|
|
|
+ <span>{{store.totalNum}}</span>
|
|
|
+ 条开庭公告</div>
|
|
|
<van-list v-model:loading="loading" :finished="finished" :immediate-check="false" finished-text="没有更多了" @load="onLoad">
|
|
|
- <div v-for="(item,index) in store.dataList" :key="index" class="card">
|
|
|
- <div v-for="obj in store.selectDemension.viewList" :key="obj.value" class="item">
|
|
|
- <p v-if="obj.name">{{obj.name}}:</p>
|
|
|
- <p v-if="obj.valueType === 'date'">{{dayjs(item[obj.value]).format('YYYY-MM-DD')}}</p>
|
|
|
- <p v-else :class="obj.valueType === 'title' ? 'title' : ''">{{item[obj.value]}}</p>
|
|
|
+ <div v-for="(item,index) in store.dataList" :key="index" class="card" @click="goDetail(item)">
|
|
|
+ <div class="list-container">
|
|
|
+ <div v-for="obj in store.selectDemension.viewList" :key="obj.value" class="item">
|
|
|
+
|
|
|
+ <!-- 标题 -->
|
|
|
+ <p v-if="obj.name" class="name">{{obj.name}}:</p>
|
|
|
+
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <!-- 时间数据-->
|
|
|
+ <p v-if="obj.valueType === 'date'">{{dayjs(item[obj.value]).format('YYYY-MM-DD')}}</p>
|
|
|
+
|
|
|
+ <!-- 多个数据 -->
|
|
|
+ <div v-else-if="obj.listVal">
|
|
|
+ <a v-for="(listItem,listIndex) in item[obj.listVal]"
|
|
|
+ :key="listIndex" href="javascript:"
|
|
|
+ class="block"
|
|
|
+ @click.stop="$goCompany(listItem[obj.companyName as string],listItem[obj.companyId as string])">
|
|
|
+ {{listItem[obj.value]}}
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <p v-else :class="obj.valueType === 'title' ? 'title' : ''">{{item[obj.value]}}</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <van-icon v-if="store.selectDemension.hasDetail" name="arrow" color="#969696" class="arrow" />
|
|
|
</div>
|
|
|
</van-list>
|
|
|
</div>
|
|
@@ -14,6 +41,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { useDemensionStore } from '@/store/demension'
|
|
|
+ import { $goCompany } from '@/utils/utils'
|
|
|
import dayjs from 'dayjs'
|
|
|
import { ref, watch } from 'vue'
|
|
|
const store = useDemensionStore()
|
|
@@ -35,10 +63,13 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ const goDetail = (item:{id:string}) => {
|
|
|
+ console.log(`跳转详情:${item.id}`)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
watch(() => store.dataList.length,(newVal) => {
|
|
|
if(!newVal) {
|
|
|
- console.log(877)
|
|
|
-
|
|
|
finished.value = false
|
|
|
}
|
|
|
})
|
|
@@ -50,14 +81,45 @@
|
|
|
width: 100%;
|
|
|
background: #fff;
|
|
|
padding: 15px;
|
|
|
- margin-bottom: 10px;
|
|
|
- font-size: 14px;
|
|
|
- .item{
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- .title{
|
|
|
- font-weight: bold;
|
|
|
- color: #000;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .list-container{
|
|
|
+ width: inherit;
|
|
|
+ .item{
|
|
|
+ display: flex;
|
|
|
+ // align-items: center;
|
|
|
+ .title{
|
|
|
+ font-weight: bold;
|
|
|
+ color: #000;
|
|
|
+ font-size: 15px;
|
|
|
+ padding: 4px 0;
|
|
|
+ }
|
|
|
+ .name{
|
|
|
+ line-height: 24px;
|
|
|
+ color: #969696;
|
|
|
+ font-size: 15px;
|
|
|
+ width: max-content;
|
|
|
+ flex-shrink: 0;
|
|
|
+ }
|
|
|
+ a{
|
|
|
+ color: #088BFE;
|
|
|
+ font-size: 15px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .arrow{
|
|
|
+ // align-items: center;
|
|
|
+ // display: flex;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+.common-list{
|
|
|
+ .fixed-num{
|
|
|
+ padding: 8px 15px;
|
|
|
+ line-height: 20px;
|
|
|
+ span{
|
|
|
+ color: #EB5953 ;
|
|
|
}
|
|
|
}
|
|
|
}
|