|
|
@ -9,7 +9,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgr20 m-b-20"> |
|
|
|
<el-card shadow="hover" class="mgr20 m-b-20"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<p class="m-b-20">考核名称</p> |
|
|
|
<p class="m-b-20">考核名称</p> |
|
|
@ -22,8 +21,6 @@ |
|
|
|
></el-input> |
|
|
|
></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<p class="m-b-20">发布方式</p> |
|
|
|
<p class="m-b-20">发布方式</p> |
|
|
@ -47,7 +44,6 @@ |
|
|
|
<el-input v-model.trim="duration.minute" placeholder></el-input> |
|
|
|
<el-input v-model.trim="duration.minute" placeholder></el-input> |
|
|
|
分 |
|
|
|
分 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 定时发布显示 --> |
|
|
|
<!-- 定时发布显示 --> |
|
|
|
<div v-if="form.type==2" class="addAssess"> |
|
|
|
<div v-if="form.type==2" class="addAssess"> |
|
|
|
<span class="mgr10">开始时间:</span> |
|
|
|
<span class="mgr10">开始时间:</span> |
|
|
@ -63,7 +59,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgr20 m-b-20"> |
|
|
|
<el-card shadow="hover" class="mgr20 m-b-20"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<p class="m-b-20">课程</p> |
|
|
|
<p class="m-b-20">课程</p> |
|
|
@ -73,13 +68,12 @@ |
|
|
|
v-for="item in curriculumList" |
|
|
|
v-for="item in curriculumList" |
|
|
|
:key="item.cid" |
|
|
|
:key="item.cid" |
|
|
|
:label="item.curriculumName" |
|
|
|
:label="item.curriculumName" |
|
|
|
:value="item.cid" |
|
|
|
:value="item.cid"> |
|
|
|
></el-option> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 实训项目模块 --> |
|
|
|
<!-- 实训项目模块 --> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<el-card shadow="hover" class="m-b-20"> |
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
<div class="flex-between m-b-20"> |
|
|
@ -123,7 +117,6 @@ |
|
|
|
></el-pagination> |
|
|
|
></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<el-card shadow="hover" class="mgr20 m-b-20"> |
|
|
|
<el-card shadow="hover" class="mgr20 m-b-20"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<p class="m-b-20">考核发布</p> |
|
|
|
<p class="m-b-20">考核发布</p> |
|
|
@ -131,31 +124,26 @@ |
|
|
|
<el-radio :label="1">指定范围</el-radio> |
|
|
|
<el-radio :label="1">指定范围</el-radio> |
|
|
|
<el-radio :label="0">无指定范围</el-radio> |
|
|
|
<el-radio :label="0">无指定范围</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="form.isSpecify === 1" style="padding-top: 24px;"> |
|
|
|
<div v-show="form.isSpecify == 1" style="padding-top: 24px;"> |
|
|
|
<p class="m-b-20">班级名称</p> |
|
|
|
<p class="m-b-20">班级名称</p> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
placeholder="请输入班级名称" |
|
|
|
placeholder="请输入班级名称" |
|
|
|
v-model.trim="filterClassName" |
|
|
|
v-model.trim="filterClassName" |
|
|
|
class="inline-input m-b-20" |
|
|
|
class="inline-input m-b-20" |
|
|
|
clearable |
|
|
|
clearable> |
|
|
|
> |
|
|
|
|
|
|
|
<el-button slot="append" icon="el-icon-search"></el-button> |
|
|
|
<el-button slot="append" icon="el-icon-search"></el-button> |
|
|
|
</el-input> |
|
|
|
</el-input> |
|
|
|
|
|
|
|
|
|
|
|
<div v-show="tagList.length" class="m-b-20"> |
|
|
|
<div v-show="tagList.length" class="m-b-20"> |
|
|
|
<el-tag |
|
|
|
<el-tag |
|
|
|
v-for="(tag, index) in tagList" |
|
|
|
v-for="(tag, index) in tagList" |
|
|
|
:key="index" |
|
|
|
:key="index" |
|
|
|
closable |
|
|
|
closable |
|
|
|
@close="handleCloseTag(tag)" |
|
|
|
@close="handleCloseTag(tag)" |
|
|
|
style="margin-right: 10px" |
|
|
|
style="margin-right: 10px"> |
|
|
|
> |
|
|
|
|
|
|
|
{{ tag.organizationName }} |
|
|
|
{{ tag.organizationName }} |
|
|
|
</el-tag> |
|
|
|
</el-tag> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="tree-con"> |
|
|
|
<div class="tree-con"> |
|
|
|
<student-tree |
|
|
|
<student-tree |
|
|
|
ref="tree" |
|
|
|
ref="tree" |
|
|
@ -168,23 +156,21 @@ |
|
|
|
:default-checked-keys="defaultCheckedKeys" |
|
|
|
:default-checked-keys="defaultCheckedKeys" |
|
|
|
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}" |
|
|
|
:props="{children: 'children', label: 'organizationName', isLeaf: 'leaf'}" |
|
|
|
:filter-node-method="filterNode" |
|
|
|
:filter-node-method="filterNode" |
|
|
|
@check="handleCheck" |
|
|
|
@check="handleCheck"> |
|
|
|
> |
|
|
|
|
|
|
|
</student-tree> |
|
|
|
</student-tree> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 邀请码 --> |
|
|
|
<!-- 邀请码 --> |
|
|
|
<el-card v-if="form.isSpecify === 0" shadow="hover" class="m-b-20"> |
|
|
|
<el-card v-if="form.isSpecify == 0" shadow="hover" class="m-b-20"> |
|
|
|
<div style="margin-bottom: 10px"> |
|
|
|
<div style="margin-bottom: 10px"> |
|
|
|
<p class="m-b-20">设置邀请码</p> |
|
|
|
<p class="m-b-20">设置邀请码</p> |
|
|
|
<el-radio-group v-model="form.isEnableCode"> |
|
|
|
<el-radio-group v-model="form.isEnableCode"> |
|
|
|
<el-radio :label="0">是</el-radio> |
|
|
|
<el-radio :label="1">是</el-radio> |
|
|
|
<el-radio :label="1">否</el-radio> |
|
|
|
<el-radio :label="0">否</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-if="form.isEnableCode === 0"> |
|
|
|
<div v-if="form.isEnableCode == 1"> |
|
|
|
<el-input style="display: inline-block;width: auto;margin-right: 10px" type="number" v-model.trim="form.invitationCode" maxlength="6" placeholder="请设置6个数字"></el-input> |
|
|
|
<el-input style="display: inline-block;width: auto;margin-right: 10px" type="number" v-model.trim="form.invitationCode" maxlength="6" placeholder="请设置6个数字"></el-input> |
|
|
|
<el-button type="text" @click="createInv">随机</el-button> |
|
|
|
<el-button type="text" @click="createInv">随机</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -213,7 +199,7 @@ export default { |
|
|
|
experimentDuration: "0d0h0m", |
|
|
|
experimentDuration: "0d0h0m", |
|
|
|
curriculumId: "", |
|
|
|
curriculumId: "", |
|
|
|
projectId: "", |
|
|
|
projectId: "", |
|
|
|
isSpecify: 1, // 考核发布(1、指定范围 2、无指定范围) |
|
|
|
isSpecify: 1, // 考核发布(1、指定范围 0、无指定范围) |
|
|
|
isEnableCode: 0, //是否设置邀请码 |
|
|
|
isEnableCode: 0, //是否设置邀请码 |
|
|
|
invitationCode: "", |
|
|
|
invitationCode: "", |
|
|
|
status: 0, // 状态(0、待开始 1、进行中 2、已结束) |
|
|
|
status: 0, // 状态(0、待开始 1、进行中 2、已结束) |
|
|
@ -229,19 +215,14 @@ export default { |
|
|
|
startTime: "0000-00-00 00:00:00", //开始时间 |
|
|
|
startTime: "0000-00-00 00:00:00", //开始时间 |
|
|
|
stopTime: "0000-00-00 00:00:00", //结束时间 |
|
|
|
stopTime: "0000-00-00 00:00:00", //结束时间 |
|
|
|
expNameRepeat: false, // 考核名称是否重复 |
|
|
|
expNameRepeat: false, // 考核名称是否重复 |
|
|
|
|
|
|
|
|
|
|
|
curriculumList: [], // 课程列表 |
|
|
|
curriculumList: [], // 课程列表 |
|
|
|
|
|
|
|
|
|
|
|
filterClassName: "", // 班级名称搜索 |
|
|
|
filterClassName: "", // 班级名称搜索 |
|
|
|
tagList: [], // 班级名称标签 |
|
|
|
tagList: [], // 班级名称标签 |
|
|
|
defaultCheckedKeys: [], // 默认选中 |
|
|
|
defaultCheckedKeys: [], // 默认选中 |
|
|
|
allCheckedNodes: [], // 当前选中和半选节点 |
|
|
|
allCheckedNodes: [], // 当前选中和半选节点 |
|
|
|
|
|
|
|
|
|
|
|
keyword: "", // 项目名称搜索 |
|
|
|
keyword: "", // 项目名称搜索 |
|
|
|
searchTimer: null, |
|
|
|
searchTimer: null, |
|
|
|
|
|
|
|
|
|
|
|
surplusTime: "", |
|
|
|
surplusTime: "", |
|
|
|
|
|
|
|
|
|
|
|
projectDataAll: [], |
|
|
|
projectDataAll: [], |
|
|
|
projectData: [], |
|
|
|
projectData: [], |
|
|
|
pickerOptions: { |
|
|
|
pickerOptions: { |
|
|
@ -299,7 +280,6 @@ export default { |
|
|
|
]), |
|
|
|
]), |
|
|
|
handleCloseTag(tag) { // 关闭班级标签 |
|
|
|
handleCloseTag(tag) { // 关闭班级标签 |
|
|
|
this.allCheckedNodes = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()); |
|
|
|
this.allCheckedNodes = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes()); |
|
|
|
|
|
|
|
|
|
|
|
let tagIndex = this.tagList.findIndex(i => i.id === tag.id); |
|
|
|
let tagIndex = this.tagList.findIndex(i => i.id === tag.id); |
|
|
|
this.tagList.splice(tagIndex, 1); |
|
|
|
this.tagList.splice(tagIndex, 1); |
|
|
|
// 设置选中 |
|
|
|
// 设置选中 |
|
|
@ -311,18 +291,14 @@ export default { |
|
|
|
this.allCheckedNodes = this.allCheckedNodes.filter(i => (i.level === 3 && i.id !== tag.id) || (i.level === 4 && i.parentId !== tag.id)); |
|
|
|
this.allCheckedNodes = this.allCheckedNodes.filter(i => (i.level === 3 && i.id !== tag.id) || (i.level === 4 && i.parentId !== tag.id)); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCheck(data, checked) { // 当复选框被点击的时候触发 |
|
|
|
handleCheck(data, checked) { // 当复选框被点击的时候触发 |
|
|
|
// console.log(checked); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 全选和半选状态下的班级都显示在标签 |
|
|
|
// 全选和半选状态下的班级都显示在标签 |
|
|
|
let checkedClass = checked.checkedNodes.filter(i => i.level === 3); |
|
|
|
let checkedClass = checked.checkedNodes.filter(i => i.level === 3); |
|
|
|
let halfCheckedClass = checked.halfCheckedNodes.filter(i => i.level === 3); |
|
|
|
let halfCheckedClass = checked.halfCheckedNodes.filter(i => i.level === 3); |
|
|
|
this.tagList = [...checkedClass, ...halfCheckedClass].map(i => { |
|
|
|
this.tagList = [...checkedClass, ...halfCheckedClass].map(i => { |
|
|
|
return { id: i.id, organizationName: i.organizationName }; |
|
|
|
return { id: i.id, organizationName: i.organizationName }; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 缓存全选和半选状态下的所有节点 |
|
|
|
// 缓存全选和半选状态下的所有节点 |
|
|
|
this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes]; |
|
|
|
this.allCheckedNodes = [...checked.checkedNodes, ...checked.halfCheckedNodes]; |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
filterNode(value, data) { // 对树节点进行过滤 |
|
|
|
filterNode(value, data) { // 对树节点进行过滤 |
|
|
|
if (!value) return true; |
|
|
|
if (!value) return true; |
|
|
@ -355,7 +331,6 @@ export default { |
|
|
|
i.nodeKey = `${i.id}-${new Date().getTime()}`; |
|
|
|
i.nodeKey = `${i.id}-${new Date().getTime()}`; |
|
|
|
i.leaf = false; |
|
|
|
i.leaf = false; |
|
|
|
} |
|
|
|
} |
|
|
|
// console.log(JSON.stringify(i)); |
|
|
|
|
|
|
|
result.push(i); |
|
|
|
result.push(i); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$nextTick(() => { |
|
|
@ -371,7 +346,6 @@ export default { |
|
|
|
this.allCheckedNodes = nodes; |
|
|
|
this.allCheckedNodes = nodes; |
|
|
|
this.tagList = nodes.filter(i => i.level === 3); |
|
|
|
this.tagList = nodes.filter(i => i.level === 3); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return resolve(result); |
|
|
|
return resolve(result); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
return resolve([]); |
|
|
|
return resolve([]); |
|
|
@ -402,7 +376,6 @@ export default { |
|
|
|
this.handlePage(); |
|
|
|
this.handlePage(); |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
handlePage() { |
|
|
|
handlePage() { |
|
|
@ -428,16 +401,14 @@ export default { |
|
|
|
if (this.form.type == 1 && this.form.experimentDuration == "0d0h0m") return util.warningMsg("请填写实验时长"); |
|
|
|
if (this.form.type == 1 && this.form.experimentDuration == "0d0h0m") return util.warningMsg("请填写实验时长"); |
|
|
|
if (this.form.type == 2 && this.startTime == "0000-00-00 00:00:00") return util.warningMsg("请填写实验时间"); |
|
|
|
if (this.form.type == 2 && this.startTime == "0000-00-00 00:00:00") return util.warningMsg("请填写实验时间"); |
|
|
|
if (!this.form.projectId) return util.warningMsg("请选择实训项目"); |
|
|
|
if (!this.form.projectId) return util.warningMsg("请选择实训项目"); |
|
|
|
if (this.form.isSpecify === 0 && this.form.isEnableCode == 0) { |
|
|
|
if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) { |
|
|
|
if (!this.form.invitationCode) return util.warningMsg("请设置邀请码"); |
|
|
|
if (!this.form.invitationCode) return util.warningMsg("请设置邀请码"); |
|
|
|
if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码"); |
|
|
|
if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this.form.type == 2) { |
|
|
|
if (this.form.type == 2) { |
|
|
|
this.form.startTime = this.startTime; |
|
|
|
this.form.startTime = this.startTime; |
|
|
|
this.form.stopTime = this.stopTime; |
|
|
|
this.form.stopTime = this.stopTime; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
let classId = []; |
|
|
|
let classId = []; |
|
|
|
let stuInfo = []; |
|
|
|
let stuInfo = []; |
|
|
|
this.allCheckedNodes.forEach(i => { |
|
|
|
this.allCheckedNodes.forEach(i => { |
|
|
@ -447,7 +418,7 @@ export default { |
|
|
|
stuInfo.push({ classId: i.parentId, stuAccountId: i.id }); |
|
|
|
stuInfo.push({ classId: i.parentId, stuAccountId: i.id }); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
if (this.isSpecify === 1 && !stuInfo.length) { |
|
|
|
if (this.isSpecify == 1 && !stuInfo.length) { |
|
|
|
util.warningMsg("请选择学生"); |
|
|
|
util.warningMsg("请选择学生"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -475,7 +446,6 @@ export default { |
|
|
|
this.form = res.data; |
|
|
|
this.form = res.data; |
|
|
|
this.formatDuration(); |
|
|
|
this.formatDuration(); |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
console.log(err); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
formatDuration() { // 格式化实验时长 |
|
|
|
formatDuration() { // 格式化实验时长 |
|
|
@ -505,7 +475,6 @@ export default { |
|
|
|
this.form.stuInfo.push({ classId: i.parentId, stuAccountId: i.id }); |
|
|
|
this.form.stuInfo.push({ classId: i.parentId, stuAccountId: i.id }); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let data = { |
|
|
|
let data = { |
|
|
|
form: this.form, |
|
|
|
form: this.form, |
|
|
|
date: this.date, // 实验时间 |
|
|
|
date: this.date, // 实验时间 |
|
|
@ -554,13 +523,11 @@ export default { |
|
|
|
.inline-input { |
|
|
|
.inline-input { |
|
|
|
width: 500px; |
|
|
|
width: 500px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.date-inputs { |
|
|
|
.date-inputs { |
|
|
|
.el-input { |
|
|
|
.el-input { |
|
|
|
width: 100px; |
|
|
|
width: 100px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tree-con { |
|
|
|
.tree-con { |
|
|
|
height: 400px; |
|
|
|
height: 400px; |
|
|
|
max-height: 400px; |
|
|
|
max-height: 400px; |
|
|
@ -569,7 +536,6 @@ export default { |
|
|
|
border-radius: 4px; |
|
|
|
border-radius: 4px; |
|
|
|
padding: 10px 10px 10px 40px; |
|
|
|
padding: 10px 10px 10px 40px; |
|
|
|
overflow: auto; |
|
|
|
overflow: auto; |
|
|
|
|
|
|
|
|
|
|
|
/deep/ .el-tree-node__content{ |
|
|
|
/deep/ .el-tree-node__content{ |
|
|
|
height: 30px; |
|
|
|
height: 30px; |
|
|
|
.el-tree-node__expand-icon{ |
|
|
|
.el-tree-node__expand-icon{ |
|
|
@ -602,5 +568,4 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
|
</style> |