|
|
@@ -20,7 +20,7 @@
|
|
|
<span>操作</span>
|
|
|
</div>
|
|
|
<ul>
|
|
|
- <li v-for="(purchaseMan, index) in purchaseManList.content" :style="'top: -' + 32 * timerIndex + 'px'">
|
|
|
+ <li v-for="(purchaseMan, index) in purchaseManList.content" v-if="index < 5" :style="'top: -' + 32 * timerIndex + 'px'">
|
|
|
<div>{{purchaseMan.date | date}}</div>
|
|
|
<div>
|
|
|
<span :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null" v-if="purchaseMan.inquiry && purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</span>
|
|
|
@@ -60,6 +60,7 @@
|
|
|
import Floor from './Floor.vue'
|
|
|
import FloorBar from './FloorBar.vue'
|
|
|
import SayPrice from '~components/applyPurchase/SayPrice.vue'
|
|
|
+ import { formatDate } from '~utils/baseUtils'
|
|
|
export default {
|
|
|
name: 'floor-list',
|
|
|
components: {
|
|
|
@@ -117,8 +118,8 @@
|
|
|
// },
|
|
|
filters: {
|
|
|
date: function (date) {
|
|
|
- const now = new Date().getDate()
|
|
|
- const day = (new Date(date).getDate() - now)
|
|
|
+ const now = formatDate('yyyy-MM-dd', Date.now())
|
|
|
+ const day = Math.floor((now - date) / (1000 * 60 * 60 * 24))
|
|
|
return day <= 0 ? '今天' : day + '天前'
|
|
|
},
|
|
|
enterpriseFilter ([str, user]) {
|