From ddac35d42e20c7a2ac3708f91dc71d391ececd9c Mon Sep 17 00:00:00 2001
From: wanggongfeng <1305282856@qq.com>
Date: Thu, 12 May 2022 15:34:00 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E5=88=97=E8=A1=A8=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=E5=BF=AB=E5=88=B0=E6=9C=9F=E9=A2=9C=E8=89=B2=E6=8F=90?=
=?UTF-8?q?=E9=86=92?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/plugins/rent/rentcontractinfo.vue | 42 +++++++++++++------
1 file changed, 30 insertions(+), 12 deletions(-)
diff --git a/src/views/modules/plugins/rent/rentcontractinfo.vue b/src/views/modules/plugins/rent/rentcontractinfo.vue
index 229785c2..aaa68df2 100644
--- a/src/views/modules/plugins/rent/rentcontractinfo.vue
+++ b/src/views/modules/plugins/rent/rentcontractinfo.vue
@@ -112,14 +112,13 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -155,7 +154,8 @@
-
+
{{scope.$index+1}}
@@ -167,9 +167,6 @@
{{scope.row.villageName}}{{scope.row.buildName}}{{scope.row.unitName}}{{scope.row.homeName}}
-
-
-
@@ -279,6 +276,21 @@ export default {
}
},
methods: {
+ tableRowClassName({row, rowIndex}) {
+ var endDate = row.endDate
+ var days = this.divTime(new Date(),endDate)
+ if (days <= 30) {
+ return 'warning-row';
+ }
+ return '';
+ },
+ // 计算两时间相差天数
+ divTime(startTime,endTime){
+ startTime = Date.parse(new Date(startTime))
+ endTime = Date.parse(new Date(endTime))
+ return Math.abs(parseInt((endTime - startTime) / 1000 / 3600 / 24));
+
+ },
// 新增 / 修改
addOrUpdateHandle (id,flag) {
this.addOrUpdateVisible = true
@@ -494,3 +506,9 @@ export default {
white-space: nowrap;
}
+
+