|
|
@ -5,7 +5,7 @@ |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>考核时间</label> |
|
|
|
<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 v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</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> |
|
|
|
<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> |
|
|
@ -44,13 +44,13 @@ |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button v-if="auth('创建考核')" type="primary" round @click="add" >创建考核</el-button> |
|
|
|
<el-button v-if="auth('创建考核')" type="info" round @click="add" >创建考核</el-button> |
|
|
|
<el-button v-if="auth('批量删除')" type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
<el-button v-if="auth('批量删除')" type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</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="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"> |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -90,12 +90,12 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="实验状态" align="center"> |
|
|
|
<el-table-column label="实验状态" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope" v-if="scope.row.show"> |
|
|
|
<span>{{ status[scope.row.status] }}</span> |
|
|
|
<span>{{ status[scope.row.status] }}</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" width="170"> |
|
|
|
<el-table-column label="操作" align="center" width="170"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope" v-if="scope.row.show"> |
|
|
|
<template v-if="scope.row.status == 0"> |
|
|
|
<template v-if="scope.row.status == 0"> |
|
|
|
<el-button v-if="auth('启动')" type="text" @click="start(scope.row)">启动</el-button> |
|
|
|
<el-button v-if="auth('启动')" type="text" @click="start(scope.row)">启动</el-button> |
|
|
|
<el-button v-if="auth('修改')" type="text" @click="edit(scope.row)">修改</el-button> |
|
|
|
<el-button v-if="auth('修改')" type="text" @click="edit(scope.row)">修改</el-button> |
|
|
@ -191,6 +191,7 @@ export default { |
|
|
|
total: 0, // 总数 |
|
|
|
total: 0, // 总数 |
|
|
|
listData: [], // 表格数据 |
|
|
|
listData: [], // 表格数据 |
|
|
|
multipleSelection: [], // 多选 |
|
|
|
multipleSelection: [], // 多选 |
|
|
|
|
|
|
|
listLoading:false,// 列表加载 |
|
|
|
ticker: null // 倒计时定时器 |
|
|
|
ticker: null // 倒计时定时器 |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
@ -256,11 +257,14 @@ export default { |
|
|
|
item.status = 2; |
|
|
|
item.status = 2; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
item.show = true; |
|
|
|
this.$set(this.listData, i, item); |
|
|
|
this.$set(this.listData, i, item); |
|
|
|
} |
|
|
|
} |
|
|
|
}, 1000); |
|
|
|
}, 1000); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
getData() { |
|
|
|
|
|
|
|
this.listLoading = true; |
|
|
|
|
|
|
|
this.listData.splice(0); |
|
|
|
if (this.ticker) { |
|
|
|
if (this.ticker) { |
|
|
|
clearInterval(this.ticker); |
|
|
|
clearInterval(this.ticker); |
|
|
|
} |
|
|
|
} |
|
|
@ -275,6 +279,7 @@ export default { |
|
|
|
this.listData = res.list; |
|
|
|
this.listData = res.list; |
|
|
|
this.total = res.total; |
|
|
|
this.total = res.total; |
|
|
|
this.listData.forEach(i => { |
|
|
|
this.listData.forEach(i => { |
|
|
|
|
|
|
|
i.show = false; |
|
|
|
if (i.status === 2) { // 已结束 |
|
|
|
if (i.status === 2) { // 已结束 |
|
|
|
i.countDown = 0; |
|
|
|
i.countDown = 0; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -298,8 +303,9 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.beginTimer(); |
|
|
|
this.beginTimer(); |
|
|
|
|
|
|
|
this.listLoading = false; |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
this.listLoading = false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData() { |
|
|
|