Commit de9ab9a7 authored by 王晓倩's avatar 王晓倩

特种设备记录日期的逾期显示

parent c672295f
...@@ -44,12 +44,15 @@ ...@@ -44,12 +44,15 @@
<el-table-column label="设备编号" align="center" prop="deviceCode" /> <el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="登记有效日期" align="center" prop="effectiveDate" width="180"> <el-table-column label="登记有效日期" align="center" prop="effectiveDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())<30" style="color: red;"> <span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())<30 && getDays(scope.row.effectiveDate, new Date())>0" style="color: red;">
{{ scope.row.effectiveDate }}(即将到期) {{ scope.row.effectiveDate }}(即将到期)
</span> </span>
<span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())<0" style="color: red;">
{{ scope.row.effectiveDate }}(已逾期)
</span>
<span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())>30"> <span v-if="scope.row.effectiveDate != null && scope.row.effectiveDate != '' && getDays(scope.row.effectiveDate, new Date())>30">
{{ scope.row.effectiveDate }} {{ scope.row.effectiveDate }}
</span> </span>
<span v-if="scope.row.effectiveDate == null || scope.row.effectiveDate == ''">-</span> <span v-if="scope.row.effectiveDate == null || scope.row.effectiveDate == ''">-</span>
</template> </template>
</el-table-column> </el-table-column>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment