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

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

@ -64,7 +64,7 @@
<el-table-column prop="experimentDuration" label="实验时长" align="center"></el-table-column>
<el-table-column label="邀请码" align="center">
<template slot-scope="scope">
<span>{{ scope.row.isEnableCode == 0 ? scope.row.invitationCode : "" }}</span>
<span>{{ scope.row.isEnableCode == 1 ? scope.row.invitationCode : "" }}</span>
</template>
</el-table-column>
<el-table-column prop="type" label="发布类型" align="center">

@ -45,7 +45,7 @@
<el-dialog :title="isDetail ? '查看员工' : (isAdd ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible"
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-input v-model.trim="teacherForm.account" placeholder="请输入职工账号"></el-input>
</el-form-item>

Loading…
Cancel
Save