|
|
|
@ -5,7 +5,7 @@ |
|
|
|
|
<ul class="filter"> |
|
|
|
|
<li> |
|
|
|
|
<label>考核时间</label> |
|
|
|
|
<el-radio-group v-model="form.month" @change="initData"> |
|
|
|
|
<el-radio-group v-model="form.month"> |
|
|
|
|
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
<el-date-picker v-model="date" align="right" unlink-panels type="daterange" style="width: 300px;margin-left: 10px;" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable></el-date-picker> |
|
|
|
@ -50,7 +50,7 @@ |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
|
<el-table v-loading="listLoading" ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
|
<el-table-column type="selection" :selectable="row => row.status !== 1" width="50" align="center" :reserve-selection="true"></el-table-column> |
|
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -191,6 +191,7 @@ export default { |
|
|
|
|
total: 0, // 总数 |
|
|
|
|
listData: [], // 表格数据 |
|
|
|
|
multipleSelection: [], // 多选 |
|
|
|
|
listLoading:false,// 列表加载 |
|
|
|
|
ticker: null // 倒计时定时器 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -252,7 +253,6 @@ export default { |
|
|
|
|
if (item.status === 0 && item.type === 2) { // 待开始-定时发布 |
|
|
|
|
item.status = 1; |
|
|
|
|
item.countDown = (new Date(item.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
|
console.log(item.countDown); |
|
|
|
|
} else if (item.status === 1) { |
|
|
|
|
item.status = 2; |
|
|
|
|
} |
|
|
|
@ -263,6 +263,7 @@ export default { |
|
|
|
|
}, 1000); |
|
|
|
|
}, |
|
|
|
|
getData() { |
|
|
|
|
this.listLoading = true; |
|
|
|
|
this.listData.splice(0); |
|
|
|
|
if (this.ticker) { |
|
|
|
|
clearInterval(this.ticker); |
|
|
|
@ -302,8 +303,9 @@ export default { |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.beginTimer(); |
|
|
|
|
this.listLoading = false; |
|
|
|
|
}).catch(err => { |
|
|
|
|
console.log(err); |
|
|
|
|
this.listLoading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|