dev_2022-05-11
e 3 years ago
parent 5ae4356cab
commit 7cca89d676
  1. 30
      src/pages/achievement/list/index.vue
  2. 61
      src/pages/assessment/add/index.vue
  3. 2
      src/pages/assessment/list/index.vue
  4. 2
      src/pages/system/list/staff.vue

@ -18,8 +18,8 @@
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable clearable
style="width: 300px" style="width: 300px">
></el-date-picker> </el-date-picker>
</li> </li>
<li> <li>
<label>实验项目分类</label> <label>实验项目分类</label>
@ -34,8 +34,8 @@
v-for="item in classList" v-for="item in classList"
:key="item.id" :key="item.id"
:label="item.className" :label="item.className"
:value="item.id" :value="item.id">
></el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
@ -46,8 +46,8 @@
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>
</li> </li>
<li> <li>
@ -56,14 +56,11 @@
</ul> </ul>
</div> </div>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter"></ul>
</ul>
<div style="margin-bottom: 24px"> <div style="margin-bottom: 24px">
<el-button v-if="auth('批量删除')" type="primary" @click="delAllData">批量删除</el-button> <el-button v-if="auth('批量删除')" type="primary" @click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
@ -101,7 +98,6 @@
<script> <script>
import { Loading } from "element-ui"; import { Loading } from "element-ui";
import util from "@/libs/util"; import util from "@/libs/util";
export default { export default {
name: "achievement", name: "achievement",
data() { data() {
@ -122,12 +118,10 @@ export default {
{ {
id: "", id: "",
name: "不限" name: "不限"
}, }, {
{
id: 1, id: 1,
name: "近一个月" name: "近一个月"
}, }, {
{
id: 6, id: 6,
name: "近六个月" name: "近六个月"
} }
@ -136,8 +130,7 @@ export default {
{ {
id: 0, id: 0,
name: "练习" name: "练习"
}, }, {
{
id: 1, id: 1,
name: "考核" name: "考核"
} }
@ -187,7 +180,6 @@ export default {
this.getData(); this.getData();
} }
}).catch(err => { }).catch(err => {
console.log(err);
}); });
}, },
getClassData() { // getClassData() { //
@ -212,7 +204,6 @@ export default {
pageSize: this.pageSize pageSize: this.pageSize
}; };
this.$post(this.api.getAchievementInfo, data).then(res => { this.$post(this.api.getAchievementInfo, data).then(res => {
console.log(res)
if(this.projectPermissions == 0){ if(this.projectPermissions == 0){
this.listData = res.page; this.listData = res.page;
this.total = res.total; this.total = res.total;
@ -237,7 +228,6 @@ export default {
return true; return true;
}, },
entry(row) { // entry(row) { //
console.log(row)
if (this.projectPermissions === 1) { if (this.projectPermissions === 1) {
let list = row.classList.map(i => { let list = row.classList.map(i => {
return { id: i.id.toString(), name: i.className }; return { id: i.id.toString(), name: i.className };

@ -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>

@ -64,7 +64,7 @@
<el-table-column prop="experimentDuration" 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 == 1 ? scope.row.invitationCode : "" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="发布类型" align="center"> <el-table-column prop="type" label="发布类型" align="center">

@ -45,7 +45,7 @@
<el-dialog :title="isDetail ? '查看员工' : (isAdd ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible" <el-dialog :title="isDetail ? '查看员工' : (isAdd ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible"
width="30%" @close="closeTeacher" class="dialog" :close-on-click-modal="false"> width="30%" @close="closeTeacher" class="dialog" :close-on-click-modal="false">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="150px" :disabled="isDetail"> <el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="150px" :disabled="isDetail" style='margin-right: 80px;'>
<el-form-item prop="account" label="账号"> <el-form-item prop="account" label="账号">
<el-input v-model.trim="teacherForm.account" placeholder="请输入职工账号"></el-input> <el-input v-model.trim="teacherForm.account" placeholder="请输入职工账号"></el-input>
</el-form-item> </el-form-item>

Loading…
Cancel
Save