|
|
@ -4,11 +4,11 @@ |
|
|
|
<div class="tool mul"> |
|
|
|
<div class="tool mul"> |
|
|
|
<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" @change="initData"> |
|
|
|
<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="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> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>发布类型</label> |
|
|
|
<label>发布类型</label> |
|
|
@ -34,13 +34,19 @@ |
|
|
|
></el-option> |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
|
|
|
|
</ul> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="tool mul"> |
|
|
|
|
|
|
|
<ul class="filter"> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<el-input placeholder="请输入实验班级/项目名称" prefix-icon="el-icon-search" v-model.trim="keyWord" clearable></el-input> |
|
|
|
<el-input placeholder="请输入实验班级/项目名称" prefix-icon="el-icon-search" v-model.trim="keyWord" clearable style="width: 300px"></el-input> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
</ul> |
|
|
|
</ul> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button v-if="auth('创建实验')" type="primary" round @click="add">创建实验</el-button> |
|
|
|
<div> |
|
|
|
<el-button v-if="auth('批量删除')" type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
<el-button v-if="auth('创建实验')" type="primary" round @click="add" >创建考核</el-button> |
|
|
|
|
|
|
|
<el-button v-if="auth('批量删除')" type="primary" round @click="delAllData">批量删除</el-button> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -51,16 +57,11 @@ |
|
|
|
{{ scope.$index + (pageNum - 1) * pageSize + 1 }} |
|
|
|
{{ scope.$index + (pageNum - 1) * pageSize + 1 }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="className" label="实验班级" align="center"> |
|
|
|
<el-table-column prop="className" label="实验班级" align="center" min-width="120px" show-overflow-tooltip></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="experimentalName" label="考核名称" align="center" min-width="120px" show-overflow-tooltip></el-table-column> |
|
|
|
<el-table-column prop="experimentalName" label="考核名称" align="center"> |
|
|
|
<el-table-column prop="projectName" label="项目名称" min-width="200" show-overflow-tooltip align="center"></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="experimenterNum" label="实验人数" align="center"></el-table-column> |
|
|
|
<el-table-column prop="projectName" label="项目名称" width="250" show-overflow-tooltip align="center"> |
|
|
|
<el-table-column prop="experimentDuration" label="实验时长" align="center"></el-table-column> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="experimenterNum" label="实验人数" align="center"> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="experimentDuration" label="实验时长" align="center"> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
<el-table-column label="邀请码" align="center"> |
|
|
|
<el-table-column label="邀请码" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.isEnableCode == 0 ? scope.row.invitationCode : "" }}</span> |
|
|
|
<span>{{ scope.row.isEnableCode == 0 ? scope.row.invitationCode : "" }}</span> |
|
|
@ -142,15 +143,15 @@ export default { |
|
|
|
name: "不限" |
|
|
|
name: "不限" |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
value: 0, |
|
|
|
value: 1, |
|
|
|
name: "待开始" |
|
|
|
name: "待开始" |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
value: 1, |
|
|
|
value: 2, |
|
|
|
name: "进行中" |
|
|
|
name: "进行中" |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
value: 2, |
|
|
|
value: 3, |
|
|
|
name: "已结束" |
|
|
|
name: "已结束" |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
], |
|
|
@ -271,34 +272,32 @@ export default { |
|
|
|
curriculumId: this.curriculumId |
|
|
|
curriculumId: this.curriculumId |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(this.api.pageByCondition, data).then(res => { |
|
|
|
this.$post(this.api.pageByCondition, data).then(res => { |
|
|
|
if (res.status === 200 && res.list && res.list.length) { |
|
|
|
this.listData = res.list; |
|
|
|
this.listData = res.list; |
|
|
|
this.total = res.total; |
|
|
|
this.total = res.total; |
|
|
|
this.listData.forEach(i => { |
|
|
|
this.listData.forEach(i => { |
|
|
|
if (i.status === 2) { // 已结束 |
|
|
|
if (i.status === 2) { // 已结束 |
|
|
|
i.countDown = 0; |
|
|
|
i.countDown = 0; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if (i.type === 2) { // 定时发布 |
|
|
|
if (i.type === 2) { // 定时发布 |
|
|
|
if (i.status === 0) { |
|
|
|
if (i.status === 0) { |
|
|
|
// 待开始 |
|
|
|
// 待开始 |
|
|
|
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; // 获得两个日期时间的秒数差 |
|
|
|
i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; // 获得两个日期时间的秒数差 |
|
|
|
} else if (i.status === 1) { |
|
|
|
} else if (i.status === 1) { |
|
|
|
// 进行中 |
|
|
|
// 进行中 |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (i.type === 1) { // 手动发布 |
|
|
|
} else if (i.type === 1) { // 手动发布 |
|
|
|
if (i.status === 0) { |
|
|
|
if (i.status === 0) { |
|
|
|
// 待开始 |
|
|
|
// 待开始 |
|
|
|
i.countDown = 0; |
|
|
|
i.countDown = 0; |
|
|
|
} else if (i.status === 1) { |
|
|
|
} else if (i.status === 1) { |
|
|
|
// 进行中 |
|
|
|
// 进行中 |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
this.beginTimer(); |
|
|
|
}); |
|
|
|
} |
|
|
|
this.beginTimer(); |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
console.log(err); |
|
|
|
}); |
|
|
|
}); |
|
|
@ -417,4 +416,7 @@ export default { |
|
|
|
.el-radio-group { |
|
|
|
.el-radio-group { |
|
|
|
white-space: nowrap; |
|
|
|
white-space: nowrap; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.el-radio.is-bordered + .el-radio.is-bordered { |
|
|
|
|
|
|
|
margin-left: 0; |
|
|
|
|
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |