|
@@ -37,6 +37,11 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
+ <el-row class="colorMark">
|
|
|
|
|
+ <svg-icon icon-class="rectanglered" class="rectanglered"></svg-icon>1-15天内到期
|
|
|
|
|
+ <svg-icon icon-class="rectangleYellow" class="rectangleYellow"></svg-icon>16-30天内到期
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -51,7 +56,7 @@
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
- <el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange" :height="clientHeight" border :span-method="objectSpanMethod">
|
|
|
|
|
|
|
+ <el-table :cell-style="tableCellStyle" v-loading="loading" :data="planList" @selection-change="handleSelectionChange" :height="clientHeight" border :span-method="objectSpanMethod">
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
<el-table-column label="标题" align="center" prop="planTitle" width="200" />
|
|
<el-table-column label="标题" align="center" prop="planTitle" width="200" />
|
|
|
<el-table-column label="内容" align="center" prop="itemContent"/>
|
|
<el-table-column label="内容" align="center" prop="itemContent"/>
|
|
@@ -254,7 +259,7 @@ export default {
|
|
|
// 非多个禁用
|
|
// 非多个禁用
|
|
|
multiple: true,
|
|
multiple: true,
|
|
|
// 显示搜索条件
|
|
// 显示搜索条件
|
|
|
- showSearch: true,
|
|
|
|
|
|
|
+ showSearch: false,
|
|
|
// 总条数
|
|
// 总条数
|
|
|
total: 0,
|
|
total: 0,
|
|
|
planList: [],
|
|
planList: [],
|
|
@@ -349,6 +354,26 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 单元格样式
|
|
|
|
|
+ tableCellStyle( {row, column, rowIndex, columnIndex} ) {
|
|
|
|
|
+ console.log(row.planTime)
|
|
|
|
|
+ if (columnIndex === 0 ||columnIndex === 7) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ let today = new Date(); // 当前时间
|
|
|
|
|
+ let planTime = new Date(row.planTime);
|
|
|
|
|
+ if (today.getTime() < planTime.getTime()) {
|
|
|
|
|
+ let difference = planTime.getTime() - today.getTime(); // 时间差
|
|
|
|
|
+ if (row.planTime != null && row.planTime != '') {
|
|
|
|
|
+ if (difference < 16 * 24 * 60 * 60 * 1000) { // 到期时间 - 当前时间 < 16
|
|
|
|
|
+ return "background-color: rgba(203, 0, 0, 1); color: rgb(255, 255, 255);";
|
|
|
|
|
+ } else if (difference >= 16 * 24 * 60 * 60 * 1000
|
|
|
|
|
+ && difference <= 30 * 24 * 60 * 60 * 1000) { // 16 <= 到期时间 - 当前时间 <= 30
|
|
|
|
|
+ return "background-color: rgba(255, 255, 0, 1);";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
/** 设置搜索条件年份 */
|
|
/** 设置搜索条件年份 */
|
|
|
setYear() {
|
|
setYear() {
|
|
|
this.queryParams.planYear = new Date();
|
|
this.queryParams.planYear = new Date();
|
|
@@ -677,4 +702,19 @@ export default {
|
|
|
textarea {
|
|
textarea {
|
|
|
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
|
font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
|
|
|
}
|
|
}
|
|
|
|
|
+ .colorMark {
|
|
|
|
|
+ color: #6f6f6f;
|
|
|
|
|
+ text-align: right;
|
|
|
|
|
+ font-weight:bold;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ padding-bottom: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .rectanglered {
|
|
|
|
|
+ width: 40px !important;
|
|
|
|
|
+ height: 20px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+ .rectangleYellow {
|
|
|
|
|
+ width: 40px !important;
|
|
|
|
|
+ height: 20px !important;
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|