页面整理以及考核接口

chengdu
yujialong 4 years ago
parent 5ee7400f91
commit cfb36245dc
  1. 195
      src/components/common/EXtree.vue
  2. 238
      src/components/common/Statistics.vue
  3. 705
      src/components/common/Studentmanagement/Student.vue
  4. 526
      src/components/common/Studentmanagement/StudentSide.vue
  5. 287
      src/components/common/Stutree.vue
  6. 749
      src/components/common/Teacher.vue
  7. 357
      src/components/common/TeacherSide.vue
  8. 395
      src/components/common/Teachercommon/Assessment.vue
  9. 296
      src/components/common/Teachercommon/TeacherManage.vue
  10. 238
      src/components/common/Teachertree.vue
  11. 15
      src/components/common/accordion.vue
  12. 13
      src/components/common/select.vue
  13. 212
      src/components/common/tree.vue
  14. 826
      src/components/page/AddAssessment.vue
  15. 311
      src/components/page/Assessment.vue
  16. 537
      src/components/page/CheckResult.vue
  17. 0
      src/components/page/CheckWorkAttendance.vue
  18. 426
      src/components/page/ClassDetail.vue
  19. 30
      src/components/page/Dashboard.vue
  20. 298
      src/components/page/ExaminationRecord.vue
  21. 268
      src/components/page/Practice.vue
  22. 10
      src/components/page/Project.vue
  23. 558
      src/components/page/ShowExperiment1.vue
  24. 174
      src/components/page/Student.vue
  25. 129
      src/components/page/Tabs.vue
  26. 173
      src/components/page/TeacherHome.vue
  27. 370
      src/components/page/TeacherIndex.vue
  28. 59
      src/components/page/examinationResults.vue
  29. 59
      src/components/page/practiceResults.vue
  30. 200
      src/components/page/teacherCheckWorkAttendance.vue
  31. 52
      src/router/index.js
  32. 119
      src/utils/api.js

@ -1,195 +0,0 @@
<template>
<div>
<div class="main" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)">
<div>
<img
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
src="../../assets/img/3.png"
alt
/>
</div>
{{item.label}}
</div>
<div v-show="item.ifVisible" v-if="item.children&&item.children.length!=0">
<div v-for="(item1,index1) in item.children" :key="index1">
<div class="item1" @click.stop="open(item1)">
<div style="margin-left:40px">
<img
:class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}"
src="../../assets/img/3.png"
alt
/>
</div>
{{item1.label}}
</div>
<div v-show="item1.ifVisible" v-if="item1.children&&item1.children.length!=0">
<div
class="item4"
@click.stop="choose(item2)"
v-for="(item2,index2) in item1.children"
:key="index2"
>
<span :class="{checkBox:true,isActive:item2.ifVisible}"></span>
{{item2.label}}
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
Array.prototype.removeByValue = function (val) {
for (var i = 0; i < this.length; i++) {
if (JSON.stringify(this[i]).indexOf(JSON.stringify(val)) != -1) {
this.splice(i, 1);
break;
}
}
};
export default {
data() {
return {
chooseList: []
};
},
watch: {
chooseList(n, o) {
this.$emit('chooseNode', n);
}
},
props: {
data: {
type: Array
}
},
methods: {
//
open(item) {
item.ifVisible = !item.ifVisible;
},
//removeByvaluemain.js
choose(item) {
item.ifVisible = !item.ifVisible;
if (item.ifVisible) {
this.chooseList.push(item);
} else {
this.chooseList.removeByValue(item);
}
},
//
isHasObj(arr, val) {
var flag = 0; //1 0
for (var i = 0; i < arr.length; i++) {
if (JSON.stringify(arr[i]).indexOf(JSON.stringify(val)) != -1) {
flag = 1;
}
}
if (flag == 1) {
return true;
} else {
return false;
}
}
}
};
</script>
<style lang="scss" scoped>
$insideColor: rgba(245, 242, 255, 0.8); //
$outColor: rgba(255, 255, 255, 0.8); //
//,item
@mixin public {
height: 50px;
line-height: 50px;
cursor: pointer;
font-size: 18px;
color: #333333;
display: flex;
div {
margin: 0 10px;
position: relative;
top: 50%;
transform: translateY(-50%);
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
width: 30px;
height: 30px;
background: rgba(146, 120, 255, 1);
img {
height: 12px;
width: 8px;
}
}
}
.main {
width: 100%;
}
.item {
@include public;
border-bottom: 1px solid $outColor;
background: rgba(245, 242, 255, 1);
}
.item1 {
@include public;
border-bottom: 1px solid $insideColor;
background: rgba(255, 255, 255, 1);
}
.item2 {
@include public;
border-bottom: 1px solid $insideColor;
background: rgba(255, 255, 255, 1);
}
.item4 {
@include public;
align-items: center;
border-bottom: 1px solid $insideColor;
padding-left: 80px;
background: rgba(255, 255, 255, 1);
}
//ul,li
ul,
li {
padding: 0;
margin: 0;
list-style: none;
}
// 使
.arrowTransform {
transition: 0.2s;
transform-origin: center;
transform: rotateZ(0deg);
}
.arrowTransformReturn {
transition: 0.2s;
transform-origin: center;
transform: rotateZ(90deg);
}
//
.checkBox {
width: 14px;
height: 14px;
border-radius: 7px;
margin-left: 10px;
margin-right: 10px;
border: 2px solid rgba(146, 120, 255, 1);
}
//
.isActive {
background: url('../../assets/img/get.png');
background-size: 14px 14px; /*按比例缩放*/
}
</style>

@ -1,238 +0,0 @@
<template>
<div class="Statistics">
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<p class="header_title">关键指标</p>
<el-col :span="6">
<el-card shadow="hover" class="mgb20">
<div class="browse">
<p class="mgb20">浏览量PV</p>
<p>
<span class="browse_volume">253</span>
<span>/</span>
<span class="mgl10">12%
<i class="icon-up up_color"></i>
</span>
</p>
</div>
<div>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" class="mgb20">
<div class="browse">
<p class="mgb20">独立用户UV</p>
<p>
<span class="browse_volume">70</span>
<span>/</span>
<span class="mgl10">12%
<i class="icon-up up_color"></i>
</span>
</p>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" class="mgb20">
<div class="browse">
<p class="mgb20">访问次数VV</p>
<p>
<span class="browse_volume">152</span>
<span>/</span>
<span class="mgl10">105.41%
<i class="icon-up up_color"></i>
</span>
</p>
</div>
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="hover" class="mgb20">
<div class="browse">
<p class="mgb20">独立IP</p>
<p>
<span class="browse_volume">67</span>
<span>/</span>
<span class="mgl10">82.27%
<i class="icon-up up_color"></i>
</span>
</p>
</div>
</el-card>
</el-col>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="schart-box">
<el-radio-group v-model="radio2" size="medium">
<el-radio-button v-for="(item,index) in dateList" :key="index" label="item.id" >{{item.name}}</el-radio-button>
</el-radio-group>
<schart class="schart" canvasId="line" :options="options2"></schart>
</div>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover">
<p class="mgb20">
<span class="header_title">客户列表</span>
</p>
<el-table :data="customerData" class="table" stripe header-align="center">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column prop="id" label="ID" width="55" align="center"></el-table-column>
<el-table-column prop="id" label="时间" align="center">
</el-table-column>
<el-table-column prop="age" label="浏览量(PV)" align="center">
</el-table-column>
<el-table-column prop="storeName" label="独立用户(UV)" align="center">
</el-table-column>
<el-table-column prop="total" label="访问次数(VV)" align="center">
</el-table-column>
<el-table-column prop="payamount" label="独立IP" align="center">
</el-table-column>
<el-table-column prop="payamount" label="跳出率" align="center">
</el-table-column>
<el-table-column prop="payamount" label="平均在线时长" align="center">
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="handleCurrentChange" layout="prev, pager, next" :total="pages">
</el-pagination>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import bus from '../common/bus';
import Schart from 'vue-schart';
export default {
data() {
return {
CountryName: '中国',
countryList: [{
name:'中国'
},
{
name:'美国'
},
{
name:'日本'
}],
CustomerSearch: '',
customerData:[{
id: 1,
age: '10',
storeName:'中国',
total: '金融',
payamount: '广东'
}],
options2: {
type: 'line',
title: {
text: '最近几个月各品类销售趋势图'
},
bgColor: '#fbfbfb',
labels: ['6月', '7月', '8月', '9月', '10月'],
datasets: [
{
label: '家电',
data: [234, 278, 270, 190, 230]
},
{
label: '百货',
data: [164, 178, 150, 135, 160]
},
{
label: '食品',
data: [114, 138, 200, 235, 190]
}
]
},
radio2: 1,
dateList: [{
id: 0,
name: '小时指标'
},
{
id: 1,
name: '浏览量(PV)'
},
{
id: 2,
name: '独立用户(UV)'
},
{
id: 3,
name: '访问次数(VV)'
},
{
id: 4,
name: '独立IP'
},
{
id: 5,
name: '跳出率'
},
{
id: 6,
name: '平均在线时长'
}],
pages: 10
};
},
components: {
Schart
},
methods: {
permission(){
this.$router.push('/permission')
},
handleCurrentChange(){}
}
};
</script>
<style scoped>
.el-row {
margin-bottom: 20px;
padding: 20px 16px;
}
.Statistics{
background-color: #f0f0f0;
}
.browse{
font-size: 20px;
color: #333;
}
.browse_volume{
font-size: 36px;
}
.mgl10{
margin-left: 10px;
}
.header_title{
margin-left: 10px;
margin-bottom: 30px;
}
.up_color{
color: #FF3232;
}
.schart-box {
margin-top: 20px;
margin-left: 10px;
}
.schart {
width: 100%;
height: 400px;
}
</style>

@ -1,705 +0,0 @@
<template>
<div>
<el-container>
<el-aside width="350px">
<StudentSide ref="getSelectData" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck"></StudentSide>
</el-aside>
<el-main>
<el-col :span="24">
<el-card shadow="hover" class="mgb20 student_tab">
<div class="flex-between mgb20">
<div>
<el-input placeholder="输入学生名称" v-model="keyword" @keyup.enter.native="searchstudent">
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
</div>
<div>
<el-button type="primary" size="small" round @click="addstudent">新增学生</el-button>
<el-button type="primary" size="small" round class="mag" @click="batchImport">批量导入</el-button>
<el-button type="primary" size="small" round @click="delAllSelection">批量删除</el-button>
</div>
</div>
<el-table :data="studentData" class="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center">
</el-table-column>
<el-table-column prop="userName" label="学生姓名" align="center">
</el-table-column>
<el-table-column prop="workNumber" label="学生工号" align="center">
</el-table-column>
<el-table-column prop="professionalName" label="专业" align="center">
</el-table-column>
<el-table-column prop="gradeName" label="年级" align="center">
</el-table-column>
<el-table-column prop="className" label="班级" align="center">
</el-table-column>
<el-table-column prop="roleId" label="账号角色" align="center">
</el-table-column>
<el-table-column prop="logInNumber" label="登录次数" align="center">
</el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<!-- <el-button type="text">查看</el-button> -->
<el-button type="text" @click="editstudent(scope.row)">编辑</el-button>
<el-button type="text" @click="delstudent(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="prev, pager, next" :current-page="pageNo" @current-change="handleCurrentChange" :total="pages">
</el-pagination>
</div>
</el-card>
</el-col>
</el-main>
</el-container>
<!-- 新增用户 -->
<el-dialog :title="isAddstudent ? '新增学生' : '编辑学生'" :visible.sync="studentVisible"
width="30%" center @close="closestudent" class="dialog" :close-on-click-modal="false">
<el-form ref="studentForm" :model="studentForm" :rules="rules" label-width="80px">
<el-form-item prop="userAccount" label="账号">
<el-input v-model="studentForm.userAccount" placeholder="请输入学生账号" @change="accountChange"></el-input>
</el-form-item>
<el-form-item prop="userName" label="学生姓名">
<el-input v-model="studentForm.userName" placeholder="请输入学生姓名"></el-input>
</el-form-item>
<el-form-item prop="roleValue" label="账号角色">
<el-checkbox-group v-model="studentForm.roleValue" :disabled="true">
<el-checkbox label="老师"></el-checkbox>
<el-checkbox label="管理员"></el-checkbox>
<el-checkbox label="学生"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item prop="uniqueIdentificationAccount" label="唯一标识">
<el-input disabled v-model="studentForm.uniqueIdentificationAccount" placeholder="请输入学生学号获取唯一标识"></el-input>
</el-form-item>
<el-form-item prop="studentAccount" label="学生学号">
<el-input v-model="studentForm.studentAccount" placeholder="请输入学生学号" @change="OnlyId()"></el-input>
</el-form-item>
<el-form-item prop="professionalId" label="专业">
<el-select v-model="studentForm.professionalId" placeholder="请选择专业" @change="getGrade">
<el-option v-for="(item,index) in majorList" :key="index"
:label="item.stuProfessionalArchitectureName" :value="item.stuProfessionalArchitectureId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="gradeId" label="年级">
<el-select v-model="studentForm.gradeId" placeholder="请选择年级" :disabled="studentForm.professionalId ? false : true" @change="getClass">
<el-option v-for="(item,index) in gradeList" :key="index"
:label="item.gradeName" :value="item.gradeId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="classId" label="班级">
<el-select v-model="studentForm.classId" placeholder="请选择班级" :disabled="studentForm.gradeId ? false : true">
<el-option v-for="(item,index) in classList" :key="index"
:label="item.className" :value="item.classId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="mobile" label="手机号">
<el-input v-model="studentForm.mobile" placeholder="可以用于登录平台,以及找回密码" maxlength="11" @change="phoneChange"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input v-model="studentForm.email" placeholder="可以用于登录平台,以及找回密码"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="studentVisible = false"> </el-button>
<el-button type="primary" @click="saveSure('studentForm')"> </el-button>
</span>
</el-dialog>
<!-- 批量导入 -->
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" center :close-on-click-modal="false">
<!-- <el-input placeholder="请上传文件"></el-input> -->
<div class="flex-start-around">
<!-- <el-button type="text" class="ml20" @click="loginout">浏览电脑</el-button> -->
<el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
<el-upload
accept=".xls,.xlsx"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.readStaff"
:file-list="uploadList"
:data="form"
name="file"
>
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false"> </el-button>
<el-button type="primary" @click="uploadSure"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import StudentSide from './StudentSide.vue';
export default {
data() {
return {
pages: 10,
studentVisible: false,
studentForm: {
studentId: '',
userName: '',
roleValue: ['学生'],
studentAccount: '',
mobile: '',
email: '',
professionalId: '',
gradeId: '',
classId: '' ,
uniqueIdentificationAccount: '',
userAccount: ''
},
rules: {
userName: [
{ required: true, message: '请输入学生姓名', trigger: 'blur' }
],
roleValue: [
{ required: true, message: '请选择账号角色', trigger: 'change' }
],
studentAccount: [
{ required: true, message: '请输入学生学号', trigger: 'blur' },
{
pattern: /^[0-9]*$/,
message: '学生学号必须为数字',
trigger: 'blur'
}
],
userAccount: [
{ required: true, message: '请输入账号', trigger: 'blur' },
{
pattern: /^[A-Za-z0-9]*$/,
message: '账号必须为数字',
trigger: 'blur'
}
],
professionalId: [
{ required: true, message: '请选择专业', trigger: 'change' }
],
gradeId: [
{ required: true, message: '请选择年级', trigger: 'change' }
],
classId: [
{ required: true, message: '请选择班级', trigger: 'change' }
],
mobile: [
// { required: true, message: '', trigger: 'blur' },
{
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号',
trigger: 'blur'
}
],
email: [
// { required: true, message: '', trigger: 'blur' },
{
pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/,
message: '请输入正确的邮箱',
trigger: 'blur'
}
]
},
studentData: [],
updata: {
schoolId: this.$store.state.schoolId,
schoolName: this.$store.state.schoolName
},
importVisible: false,
keyword: '',
pageNo: 1,
pageSize: 10,
majorList: [],
gradeList: [],
classList: [],
professionalIds: '',
professionalStudentIds: '',
gradeIds: '',
classIds: '',
multipleSelection: [],
form: {
schoolId: this.$store.state.schoolId
},
provinceId: this.$store.state.provinceId,
cityId: this.$store.state.cityId,
userId: this.$store.state.userId,
uploadList: [],
parmData: [],
isAddstudent: false,
NoAdd: true,
AccountNoAdd: true,
NumberNoAdd: true,
isNewUser: 1,
isTeacher: 0
};
},
components: {
StudentSide
},
mounted(){
this.getStudent()
// this.test()
},
methods: {
test() {
let data = {
"message":{
"Staff":[
{
"account":"4",
"email":"4",
"logNumber":0,
"phone":"4",
"roleId":2,
"schoolId":4,
"staffGradeId":4,
"staffGradeName":"4",
"staffId":134,
"staffName":"4",
"staffProfessionalArchitectureId":4,
"staffProfessionalArchitectureName":"4",
"staffWorkNumber":"4",
"uniqueIdentificationAccount":"4"
},
{
"account":"1",
"email":"1",
"logNumber":0,
"phone":"1",
"roleId":3,
"schoolId":1,
"staffGradeId":1,
"staffGradeName":"1",
"staffId":135,
"staffName":"1",
"staffProfessionalArchitectureId":1,
"staffProfessionalArchitectureName":"1",
"staffWorkNumber":"1",
"uniqueIdentificationAccount":"1"
}
],
"Student":[
{
"account":"2",
"classId":1,
"className":"1",
"email":"1",
"gradeId":1,
"gradeName":"1",
"isAssess":0,
"loginNumber":0,
"phone":"2",
"professionalId":1,
"professionalName":"1",
"roleId":4,
"schoolId":1,
"studentId":75,
"studentName":"2",
"studentNumber":"2",
"uniqueIdentificationAccount":"1"
},
{
"account":"3",
"classId":3,
"className":"3",
"email":"3",
"gradeId":3,
"gradeName":"3",
"isAssess":0,
"loginNumber":0,
"phone":"3",
"professionalId":3,
"professionalName":"3",
"roleId":4,
"schoolId":3,
"studentId":76,
"studentName":"3",
"studentNumber":"3",
"uniqueIdentificationAccount":"3"
}
]
},
"status":200
};
let result = {};
let staff = data.message.Staff;
let student = data.message.Student;
for(let j in staff) {
// console.log(j != 'removeByValue')
// if(`s${staff[n].schoolId}` == )
if(j != 'removeByValue'){
// console.log(j)
if(result[`s${staff[j].schoolId}`]){
result[`s${staff[j].schoolId}`].push(staff[j])
}else{
result[`s${staff[j].schoolId}`] = [staff[j]]
}
}
}
console.log(3334,student)
for(let n in student) {
if(n != 'removeByValue'){
console.log(n)
console.log(student[n])
if(result[`s${student[n].schoolId}`]){
result[`s${student[n].schoolId}`].push(student[n])
}else{
result[`s${student[n].schoolId}`] = [student[n]]
}
}
}
console.log(3333,result)
},
getStudent(){
let data = {
pageNo: this.pageNo,
pageSize: this.pageSize,
searchContent: this.keyword,
professionalId: this.professionalStudentIds,
gradeIds: this.gradeIds,
classIds: this.classIds,
schoolId: this.form.schoolId
}
this.$get(this.api.queryStudentData,data).then(res => {
let Length = res.message.rows.length
for (let i = 0; i < Length; i++) {
res.message.rows[i].roleId = this.core.roleType(res.message.rows[i].roleId)
}
this.studentData = res.message.rows
this.pages = res.message.totalPages*10
}).catch(res => {});
},
fircheck(val){
val.ischeck = !val.ischeck
val.children.map(e => {
e.children.map(r => {
if(val.ischeck){
e.ischeck = true
r.ischeck = true
this.parmData.push(r.classId)
}else{
e.ischeck = false
r.ischeck = false
this.core.removeByValue(this.parmData, r.classId);
}
})
})
this.classIds = this.parmData.toString()
this.getStudent()
},
twocheck(val,val2){
const twoStatus = val.ischeck
val.ischeck = !twoStatus
val2.map(e => {
e.children.map(r => {
r.children.map(k =>{
if(r.gradeId == val.gradeId){
if(r.ischeck){
e.ischeck = true
k.ischeck = true
this.parmData.push(k.classId)
} else {
e.ischeck = false
k.ischeck = false
this.core.removeByValue(this.parmData, k.classId);
}
}
})
})
})
this.classIds = this.parmData.toString()
this.getStudent()
},
threecheck(val,val2){
const threeStatus = val.ischeck
val.ischeck = !threeStatus
val2.map(e => {
e.children.map(r => {
r.children.map(k =>{
if(k.classId == val.classId){
if(k.ischeck){
e.ischeck = true
r.ischeck = true
this.parmData.push(val.classId)
} else {
e.ischeck = false
r.ischeck = false
this.core.removeByValue(this.parmData,val.classId);
}
}
})
})
})
this.classIds = this.parmData.toString()
this.getStudent()
},
closestudent(){
this.$refs.studentForm.resetFields()
},
addstudent(){
this.studentForm.studentId = ''
this.studentVisible = true
this.isAddstudent = true
this.majorList = this.$refs.getSelectData.majorList
},
editstudent(row){
this.studentVisible = true
this.isAddstudent = false
this.studentForm.studentId = row.studentId
this.majorList = this.$refs.getSelectData.majorList
this.isNewUser = 0
console.log(12,row)
let data = {
studentId: row.userId,
roleId: row.roleId
}
this.$get(this.api.queryStudentDetails,data).then(res => {
this.studentForm.userName = res.message[0].student.studentName,
this.studentForm.roleValue = res.message[0].student.roleId,
this.studentForm.studentAccount = res.message[0].student.studentNumber,
this.studentForm.uniqueIdentificationAccount = res.message[0].student.uniqueIdentificationAccount,
this.studentForm.professionalId = res.message[0].student.professionalId,
this.studentForm.gradeId = res.message[0].student.gradeId,
this.studentForm.classId = res.message[0].student.classId,
this.studentForm.mobile = res.message[0].student.phone,
this.studentForm.email = res.message[0].student.email,
this.studentForm.uniqueIdentificationAccount = res.message[0].student.uniqueIdentificationAccount,
this.studentForm.userAccount = res.message[0].user.userAccount
this.getGradeData()
this.getClassData()
}).catch(res => {});
},
//
getGrade(){
this.studentForm.gradeId = ''
this.studentForm.classId = ''
this.getGradeData()
},
getGradeData(){
let data = {
stuProfessionalArchitectureId: this.studentForm.professionalId
}
this.$get(this.api.queryStuGrade,data).then(res => {
this.gradeList = res.message
}).catch(res => {});
},
//
getClass(){
this.studentForm.classId = ''
this.getClassData()
},
getClassData(){
let data = {
gradeId: this.studentForm.gradeId
}
this.$get(this.api.queryStuClass,data).then(res => {
this.classList = res.message
}).catch(res => {});
},
async phoneChange(){
let res = await this.$get(this.api.queryPhone, { phone: this.studentForm.mobile });
if(res.message.length != 0){
this.$message.warning('该手机号已存在');
this.NoAdd = false
}else{
this.NoAdd = true
}
},
async accountChange(){
let res = await this.$get(this.api.queryAccountIsExist, {
account: this.studentForm.userAccount,
schoolId: this.updata.schoolId
});
this.isTeacher = 0
if(res.message.user.length != 0){
let user = res.message.user[0];
let or = res.message.OR;
this.$message.warning('该账号已存在');
this.studentForm.email = user.email
this.studentForm.phone = user.phone
this.studentForm.userName = user.userName
this.studentForm.schoolId = user.schoolId
this.studentForm.userId = user.userId
this.isNewUser = 0
or.forEach((n,i) => {
if(n.roleId == 4) {
this.isTeacher = 1
this.studentForm.studentAccount = n.workNumber
this.studentForm.schoolId = n.schoolId
}
})
this.AccountNoAdd = false
}else{
this.isNewUser = 1
this.AccountNoAdd = true
}
},
async OnlyId(){
if(this.studentForm.studentAccount){
let res = await this.$get(this.api.queryWorkNumberIsExist, {
workNumber: this.studentForm.studentAccount,
roleId: 4,
schoolId: this.studentForm.schoolId
});
if(res.message.length != 0){
this.$message.warning('该学号已存在');
this.NumberNoAdd = false
}else{
let timestamp = Date.parse(new Date());
this.studentForm.uniqueIdentificationAccount = `${this.form.schoolId}${this.studentForm.studentAccount}${timestamp}`
this.NumberNoAdd = true
}
}else{
this.studentForm.uniqueIdentificationAccount = ''
}
},
saveSure(studentForm){
this.$refs[studentForm].validate((valid) => {
if (valid) {
if(this.isTeacher) return this.$message.warning('该用户已经是学生,请重新添加');
if(!this.NoAdd) return this.$message.warning('该手机号已存在');
if(!this.AccountNoAdd) return this.$message.warning('该账号已存在');
if(!this.NumberNoAdd) return this.$message.warning('该学号已存在');
let data = {
userInfo: {
isNewUser: this.isNewUser,
userName: this.studentForm.userName,
account: this.studentForm.userAccount,
phone: this.studentForm.mobile,
email: this.studentForm.email,
uniqueIdentificationAccount: this.studentForm.uniqueIdentificationAccount,
schoolId: this.updata.schoolId,
roleId: 4,
userId: this.studentForm.userId ? this.studentForm.userId : ''
},
organizationRelationship: {
professionalId: this.studentForm.professionalId,
gradeId: this.studentForm.gradeId,
classId: this.studentForm.classId,
workNumber: this.studentForm.studentAccount,
schoolId: this.updata.schoolId
}
}
if(this.studentForm.studentId){
this.$post(this.api.updateStudent,data).then(res => {
this.studentVisible = false
this.$message.success('编辑成功');
this.getStudent()
}).catch(res => {});
}else{
this.$post(this.api.addStudent,data).then(res => {
this.studentVisible = false
this.$message.success('添加成功');
this.getStudent()
}).catch(res => {});
}
}else{
return false;
}
})
},
delstudent(row){
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = [row.userId]
this.$post(this.api.deleteStudent,data).then(res => {
this.$message.success('删除成功');
this.getStudent()
}).catch(res => {});
})
.catch(() => {});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
delAllSelection() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let delList = newArr.map(item => {
return item.userId
})
//
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = delList
this.$post(this.api.deleteStudent,data).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功');
this.getStudent()
}).catch(res => {});
}).catch(() => {});
}else{
this.$message.error('请先选择学生 !');
}
},
batchImport(){
this.importVisible = true
},
searchstudent(){
this.pageNo = 1
this.getStudent()
},
handleCurrentChange(val) {
this.pageNo = val;
this.getStudent();
},
downLoad(){
window.open('http://www.liuwanr.cn:8080/makeuplist/excelExport?fileName=模板下载&titles=学生姓名,账号角色,学生学号,专业,年级,班级,手机号码,邮箱')
},
//
handleExceed(files, fileList) {
// console.log(files, fileList)
this.$message.warning(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
},
uploadSuccess(response, file, fileList) {
// this.uploadList.push({ name: file.name, url: response.message.fileUrl });
},
uploadError(err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
});
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList) {
this.uploadList = fileList
},
uploadSure(){
this.importVisible = false
this.pageNo = 1
this.classIds = ''
this.keyword = ''
this.getStudent()
}
}
};
</script>
<style scoped>
.el-container{
background-color: #f0f0f0;
}
.mag{
margin-right: 20px;
margin-left: 20px;
}
</style>

@ -1,526 +0,0 @@
<template>
<div>
<div>
<!-- <p class="side_icon mab20">
<i class="icon-jiahao mar20" @click="addMajor()"></i> -->
<!-- <i class="icon-delete"></i> -->
<!-- </p> -->
<lctree :data="majorList"
@addMajor="addMajor" @editmajorClass="editmajorClass" @delClassDepartment="delClassDepartment"
@addClassDepartment="addClassDepartment" @editDepartment="editDepartment" @delDepart="delDepart"
@addClass="addClass" @editClass="editClass" @delClass="delClass"
@fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem"
></lctree>
</div>
<!-- 添加专业 -->
<el-dialog :title="Form.classmajorId ? '编辑专业' : '新增专业'" :visible.sync="isaddClassMajor" width="24%" center @close="closeAddClass" :close-on-click-modal="false">
<el-form ref="Form" :model="Form" :rules="rules">
<el-form-item prop="classmajorName">
<el-input placeholder="请输入专业名称" v-model="Form.classmajorName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isaddClassMajor = false"> </el-button>
<el-button type="primary" @click="sure('Form')"> </el-button>
</span>
</el-dialog>
<!-- 添加年级 -->
<el-dialog :title="Form2.departmentId ? '编辑年级' : '新增年级'" :visible.sync="isAddDepartment" width="24%" center @close="closeAddClass2" :close-on-click-modal="false">
<el-form ref="Form2" :model="Form2" :rules="rules">
<el-form-item prop="departmentName">
<el-input placeholder="请输入年级名称" v-model="Form2.departmentName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isAddDepartment = false"> </el-button>
<el-button type="primary" @click="sureDepartment('Form2')"> </el-button>
</span>
</el-dialog>
<!-- 添加班级 -->
<el-dialog :title="Form3.classId ? '编辑班级' : '新增班级'" :visible.sync="isAddClass" width="24%" center @close="closeAddClass3" :close-on-click-modal="false">
<el-form ref="Form3" :model="Form3" :rules="rules">
<el-form-item prop="className">
<el-input placeholder="请输入班级名称" v-model="Form3.className"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isAddClass = false"> </el-button>
<el-button type="primary" @click="sureClass('Form3')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import lctree from '../../common/Stutree';
export default {
props:["Data"],
data() {
return {
majorList: [],
firactive: 0,
twoactive: 0,
threeactive: 0,
isaddClassMajor: false,
isAddDepartment: false,
isAddClass: false,
schoolId: this.$store.state.schoolId,
Form: {
classmajorId: '',
classmajorName: '',
},
Form2: {
departmentId: '',
departmentName: '',
},
Form3: {
classId: '',
className: ''
},
rules: {
classmajorName: [
{ required: true, message: '请输入专业名称', trigger: 'blur' }
],
departmentName: [
{ required: true, message: '请输入年级名称', trigger: 'blur' },
{
pattern: /^[0-9]*$/,
message: '年级名称必须为数字',
trigger: 'blur'
}
],
className: [
{ required: true, message: '请输入班级名称', trigger: 'blur' },
{
pattern: /^[0-9]*$/,
message: '班级名称必须为数字',
trigger: 'blur'
}
]
}
};
},
components: {
lctree
},
mounted(){
this.getStaff()
},
methods: {
getStaff(){
let data = {
schoolId: this.schoolId
}
this.$get(this.api.queryStuPro,data).then(res => {
if(res.message){
res.message.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.stuProfessionalArchitectureName);
let data = {
stuProfessionalArchitectureId: e.stuProfessionalArchitectureId
}
this.$get(this.api.queryStuGrade,data).then(res => {
if(res.message){
e.children = res.message
res.message.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.gradeName);
let data = {
gradeId: e.gradeId
}
this.$get(this.api.queryStuClass,data).then(res => {
if(res.message){
res.message.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.className);
})
e.children = res.message
}
}).catch(res => {});
})
}
}).catch(res => {});
})
}
setTimeout(() => {
this.majorList = res.message
}, 500);
}).catch(res => {});
},
//
fircheckitem(item){
this.$emit("fircheck",item)
},
//
twocheckitem(item){
this.$emit("twocheck",item,this.majorList)
},
threeClick(index){
this.threeactive = index
},
//
threecheckitem(three){
this.$emit("threecheck",three,this.majorList)
},
closeAddClass(){
this.$refs.Form.resetFields()
},
closeAddClass2(){
this.$refs.Form2.resetFields()
},
closeAddClass3(){
this.$refs.Form3.resetFields()
},
//
addMajor(){
this.Form.classmajorId = ''
this.Form.classmajorName = ''
this.isaddClassMajor = true
},
editmajorClass(item){
this.Form.classmajorId = item.stuProfessionalArchitectureId,
this.Form.classmajorName = item.stuProfessionalArchitectureName
this.isaddClassMajor = true
},
delClassDepartment(item,index){
this.$confirm('确定要删除该专业吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = {
stuProfessionalArchitectureId: item.stuProfessionalArchitectureId
}
this.$post(this.api.deleteStuPro,data).then(res => {
this.$message.success('删除成功');
this.majorList.splice(index, 1)
}).catch(res => {});
})
.catch(() => {});
},
sure(Form){
this.$refs[Form].validate((valid) => {
if (valid) {
let data = {
stuProfessionalArchitectureName: this.Form.classmajorName,
stuProfessionalArchitectureId: this.Form.classmajorId,
schoolId: this.$store.state.schoolId,
}
if(this.Form.classmajorId){
this.$post(this.api.updateStuPro,data).then(res => {
this.$message.success('编辑成功');
this.isaddClassMajor = false
this.majorList.map(e =>{
if(e.stuProfessionalArchitectureId == this.Form.classmajorId){
e.stuProfessionalArchitectureName = this.Form.classmajorName
e.label = this.Form.classmajorName
}
})
}).catch(res => {});
}else{
this.$post(this.api.addStuPro,data).then(res => {
this.$message.success('添加成功');
this.isaddClassMajor = false
let newData = {
stuProfessionalArchitectureId: res.message,
stuProfessionalArchitectureName : this.Form.classmajorName,
label: this.Form.classmajorName,
ifVisible: false,
ischeck: false,
children: []
}
this.majorList.push(newData)
}).catch(res => {});
}
}else{
return false;
}
})
},
//
addClassDepartment(item){
this.Form2.departmentId = ''
this.Form2.departmentName = ''
this.isAddDepartment = true
this.Form.classmajorId = item.stuProfessionalArchitectureId
},
editDepartment(item){
this.Form2.departmentId = item.gradeId,
this.Form2.departmentName = item.gradeName
this.isAddDepartment = true
for (let j = 0; j < this.majorList.length; j++) {
for (let k = 0; k < this.majorList[j].children.length; k++) {
if(this.majorList[j].children[k].gradeName == item.gradeName){
this.Form.classmajorId = this.majorList[j].stuProfessionalArchitectureId
}
}
}
},
delDepart(item,index){
this.$confirm('确定要删除该年级吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = {
gradeId: item.gradeId
}
this.$post(this.api.deleteStuGrade,data).then(res => {
this.$message.success('删除成功');
this.majorList.map(e =>{
e.children.map(r =>{
if(r.gradeId == item.gradeId){
e.children.splice(index,1)
if(e.children.length == 0){
e.ifVisible = false
}
}
})
})
}).catch(res => {});
})
.catch(() => {});
},
sureDepartment(Form2){
this.$refs[Form2].validate((valid) => {
if (valid) {
let data = {
gradeName: this.Form2.departmentName,
gradeId: this.Form2.departmentId,
stuProfessionalArchitectureId: this.Form.classmajorId,
}
if(this.Form2.departmentId){
this.$post(this.api.updateStuGrade,data).then(res => {
this.$message.success('编辑成功');
this.isAddDepartment = false
this.majorList.map(e =>{
e.children.map(r =>{
if(r.gradeId == this.Form2.departmentId){
r.gradeName = this.Form2.departmentName
r.label = this.Form2.departmentName
}
})
})
}).catch(res => {});
}else{
this.$post(this.api.addStuGrade,data).then(res => {
this.$message.success('添加成功');
this.isAddDepartment = false
let newData = {
gradeId: res.message,
gradeName: this.Form2.departmentName,
label: this.Form2.departmentName,
ifVisible: false,
ischeck: false,
children: []
}
this.majorList.map(e =>{
if(e.stuProfessionalArchitectureId == this.Form.classmajorId){
e.ifVisible = true
e.children.push(newData)
}
})
}).catch(res => {});
}
}else{
return false;
}
})
},
//
addClass(two){
this.Form3.classId = ''
this.Form3.className = ''
this.isAddClass = true
this.Form2.departmentId = two.gradeId
},
editClass(three){
this.Form3.classId = three.classId,
this.Form3.className = three.className
this.isAddClass = true
for (let j = 0; j < this.majorList.length; j++) {
for (let k = 0; k < this.majorList[j].children.length; k++) {
for(let l = 0; l < this.majorList[j].children[k].children.length; l++){
if(this.majorList[j].children[k].children[l].className == three.className){
this.Form2.departmentId = this.majorList[j].gradeId
}
}
}
}
},
delClass(item,index){
this.$confirm('确定要删除该班级吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = {
classId: item.classId
}
this.$post(this.api.deleteStuClass,data).then(res => {
this.$message.success('删除成功');
this.majorList.map(e =>{
e.children.map(r =>{
r.children.map(c =>{
if(c.classId == item.classId){
r.children.splice(index,1)
if(r.children.length == 0){
r.ifVisible = false
}
}
})
})
})
}).catch(res => {});
})
.catch(() => {});
},
sureClass(Form3){
this.$refs[Form3].validate((valid) => {
if (valid) {
let data = {
className: this.Form3.className,
classId: this.Form3.classId,
gradeId: this.Form2.departmentId
}
if(this.Form3.classId){
this.$post(this.api.updateStuClass,data).then(res => {
this.$message.success('编辑成功');
this.isAddClass = false
this.majorList.map(e =>{
e.children.map(r =>{
r.children.map(c =>{
if(c.classId == this.Form3.classId){
c.className = this.Form3.className
c.label = this.Form3.className
}
})
})
})
}).catch(res => {});
}else{
this.$post(this.api.addStuClass,data).then(res => {
this.$message.success('添加成功');
this.isAddClass = false
let newData = {
classId: res.message,
className: this.Form3.className,
label: this.Form3.className,
ifVisible: false,
ischeck: false
}
this.majorList.map(e =>{
e.children.map(r =>{
if(r.gradeId == this.Form2.departmentId){
r.ifVisible = true
if(r.children.length == 0){
let arr = []
arr.push(newData)
r.children = arr
}else{
r.children.push(newData)
}
}
})
})
}).catch(res => {});
}
}else{
return false;
}
})
}
}
};
</script>
<style scoped>
.side_view{
height: 800px;
padding: 40px 20px;
background-color: #fff;
box-shadow:-2px 0px 57px 0px rgba(192,189,216,0.39);
}
.side_icon{
text-align: right;
}
.side_icon i{
cursor:pointer;
font-size: 30px;
color: #328aff;
}
.side_tree{
width: 100%;
font-size: 18px;
color: #333;
}
.side_tree i{
color: #328aff;
margin-left: 10px;
}
.fir_back{
width: 100%;
padding: 15px 0;
background:rgba(255,255,255,1);
/* box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19); */
border-radius:10px;
text-align: left;
}
.fir_back:first-child{
margin-top: 20px;
}
.fir_back:hover{
box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19);
cursor:pointer;
}
.fir_back span{
margin-left: 10px;
}
.two_active{
color: #328aff;
}
/* .two_active:hover{
color: #328aff;
cursor:pointer;
} */
.two_back{
width: 100%;
margin-top: 20px;
text-align: left;
}
.two_back:hover{
cursor:pointer;
color: #328aff;
}
.three_back{
width: 100%;
margin-top: 20px;
text-align: left;
}
.three_back:hover{
cursor:pointer;
color: #328aff;
}
.mar_top{
margin-top: 20px;
}
.back_active{
box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19);
}
.bor_lef{
padding: 10px 0;
margin-left: 40px;
}
.three_lef{
margin-left: 60px;
padding: 20px 0;
}
.three_text{
font-size: 18px;
margin-top: 10px;
}
.teacher_tab{
margin-left: 20px;
}
.icon_select:before{
transform: rotate(180deg);
}
.list-enter-active, .list-leave-active { transition: all 1s; }
.list-enter, .list-leave-to { opacity: 0; transform: translateY(-30px); }
</style>

@ -1,287 +0,0 @@
<template>
<div class="side_view">
<p class="side_icon mab20">
<i class="icon-jiahao mar20" @click="addMajor()"></i>
<!-- <i class="icon-delete"></i> -->
</p>
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)">
<!-- <i :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" class="icon-shixiangyoujiantou-"></i> -->
<img
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
src="../../assets/img/icon-xiangyou.png"
alt
/>
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
<i class="el-icon-info ft" @click.stop="editmajorClass(item)"></i>
<i class="el-icon-circle-plus ft" @click.stop="addClassDepartment(item)"></i>
<i class="icon-delete ft" @click.stop="delClassDepartment(item,index)"></i>
</div>
<div v-show="item.ifVisible" v-if="item.children&&item.children.length!=0">
<div v-for="(item1,index1) in item.children" :key="index1">
<div class="item1" @click.stop="open(item1)">
<img
:class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}"
src="../../assets/img/icon-xiangyou.png"
alt
style="margin-left:30px"
/>
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i>
<span>{{item1.label}}年级</span>
<i class="el-icon-info ft" @click.stop="editDepartment(item1)"></i>
<i class="el-icon-circle-plus ft" @click.stop="addClass(item1)"></i>
<i class="icon-delete ft" @click.stop="delDepart(item1,index1)"></i>
</div>
<div v-show="item1.ifVisible" v-if="item1.children&&item1.children.length!=0">
<div v-for="(item2,index2) in item1.children" :key="index2">
<div class="item2" @click.stop="open(item2)">
<i :class="item2.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="threecheckitem(item2)"></i>
<span>{{item2.label}}</span>
<i class="el-icon-info ft" @click.stop="editClass(item2)"></i>
<i class="icon-delete ft" @click.stop="delClass(item2,index2)"></i>
</div>
<!-- <div
v-show="item2.ifVisible"
v-if="item2.children&&item2.children.length!=0"
>
<div
class="item4"
@click.stop="choose(item3)"
v-for="(item3,index3) in item2.children"
:key="index3"
>
<span :class="{checkBox:true,isActive:item3.ifVisible}"></span>
{{item3.label}}
</div>
</div> -->
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
Array.prototype.removeByValue = function (val) {
for (var i = 0; i < this.length; i++) {
if (JSON.stringify(this[i]).indexOf(JSON.stringify(val)) != -1) {
this.splice(i, 1);
break;
}
}
};
export default {
data() {
return {
chooseList: []
};
},
watch: {
chooseList(n, o) {
this.$emit('chooseNode', n);
}
},
props: {
data: {
type: Array
}
},
methods: {
//
open(item) {
item.ifVisible = !item.ifVisible;
},
//removeByvaluemain.js
choose(item) {
item.ifVisible = !item.ifVisible;
if (item.ifVisible) {
this.chooseList.push(item);
} else {
this.chooseList.removeByValue(item);
}
},
fircheckitem(item){
this.$emit('fircheckitem',item);
},
twocheckitem(item){
this.$emit('twocheckitem',item);
},
threecheckitem(item){
this.$emit('threecheckitem',item);
},
//
addMajor(){
this.$emit('addMajor');
},
editmajorClass(item){
this.$emit('editmajorClass',item);
},
delClassDepartment(item,index){
this.$emit('delClassDepartment',item,index);
},
//
addClassDepartment(item){
this.$emit('addClassDepartment',item);
},
editDepartment(item){
this.$emit('editDepartment',item);
},
delDepart(item,index){
this.$emit('delDepart',item,index);
},
//
addClass(item){
this.$emit('addClass',item);
},
editClass(item){
this.$emit('editClass',item);
},
delClass(item,index){
this.$emit('delClass',item,index);
},
//
isHasObj(arr, val) {
var flag = 0; //1 0
for (var i = 0; i < arr.length; i++) {
if (JSON.stringify(arr[i]).indexOf(JSON.stringify(val)) != -1) {
flag = 1;
}
}
if (flag == 1) {
return true;
} else {
return false;
}
}
}
};
</script>
<style lang="scss" scoped>
$insideColor: rgba(245, 242, 255, 0.8); //
$outColor: rgba(255, 255, 255, 0.8); //
//,item
@mixin public {
cursor: pointer;
font-size: 18px;
color: #333333;
display: flex;
align-items: center;
img {
height: 30px;
width: 30px;
margin-left: 10px;
}
}
.main {
width: 100%;
}
.item {
@include public;
width: 100%;
padding: 15px 0;
background:rgba(255,255,255,1);
box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19);
border-radius:10px;
text-align: left;
margin-top: 20px;
}
.item:first{
margin-top: 0;
}
.item1 {
@include public;
margin-top: 20px;
}
.item1:hover{
color: #328aff;
}
.item2 {
@include public;
margin-top: 20px;
margin-left:90px
}
.item2:hover{
color: #328aff;
}
.item4 {
@include public;
align-items: center;
border-bottom: 1px solid $insideColor;
padding-left: 80px;
background: rgba(255, 255, 255, 1);
}
//ul,li
ul,
li {
padding: 0;
margin: 0;
list-style: none;
}
// 使
.arrowTransform {
transition: 0.4s;
transform-origin: center;
transform: rotateZ(0deg);
}
.arrowTransformReturn {
transition: 0.4s;
transform-origin: center;
transform: rotateZ(90deg);
}
//
.checkBox {
width: 14px;
height: 14px;
border-radius: 7px;
margin-left: 10px;
margin-right: 10px;
border: 2px solid rgba(146, 120, 255, 1);
}
//
.isActive {
background: url('../../assets/img/icon-yigouxuan.png');
background-size: 14px 14px; /*按比例缩放*/
}
.side_view{
// height: 800px;
padding: 40px 20px;
background-color: #fff;
box-shadow:-2px 0px 57px 0px rgba(192,189,216,0.39);
i {
color: #328aff;
}
}
.side_icon{
text-align: right;
}
.side_icon i{
cursor:pointer;
font-size: 30px;
}
.side_tree{
width: 100%;
font-size: 18px;
color: #333;
i{
margin-left: 10px;
}
span{
margin-left: 5px;
}
}
</style>

@ -1,749 +0,0 @@
<template>
<div>
<el-container>
<el-aside width="350px">
<TeacherSide ref="getSelectData" @fircheck="fircheck" @twocheck="twocheck"></TeacherSide>
</el-aside>
<el-main>
<el-col :span="24">
<el-card shadow="hover" class="mgb20 teacher_tab">
<div class="flex-between mgb20">
<div>
<el-input placeholder="输入员工姓名" v-model="keyword" @keyup.enter.native="searchTeacher">
<i slot="suffix" class="el-input__icon el-icon-search"></i>
</el-input>
</div>
<div>
<el-button type="primary" size="small" round @click="addTeacher">新增教师</el-button>
<el-button type="primary" size="small" round class="mag" @click="batchImport">批量导入</el-button>
<el-button type="primary" size="small" round @click="delAllSelection">批量删除</el-button>
</div>
</div>
<el-table :data="teacherData" class="table" stripe header-align="center" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" label="序号" width="55" align="center">
</el-table-column>
<el-table-column prop="userName" label="职工姓名" align="center">
</el-table-column>
<el-table-column prop="workNumber" label="职工工号" align="center">
</el-table-column>
<el-table-column prop="oneDepartmentName" label="一级部门" align="center">
</el-table-column>
<el-table-column prop="twoDepartmentName" label="二级部门" align="center">
</el-table-column>
<el-table-column prop="roleName" label="账号角色" align="center">
</el-table-column>
<el-table-column prop="logInNumber" label="登录次数" align="center">
</el-table-column>
<el-table-column prop="lastTimeOfLanding" label="上次登录时间" align="center">
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<!-- <el-button type="text">查看</el-button> -->
<el-button type="text" @click="editTeacher(scope.row)">编辑</el-button>
<el-button type="text" @click="delTeacher(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="prev, pager, next" :current-page="pageNo" @current-change="handleCurrentChange" :total="pages">
</el-pagination>
</div>
</el-card>
</el-col>
</el-main>
</el-container>
<!-- 新增用户 -->
<el-dialog :title="isAddteacher ? '新增员工' : '编辑员工'" :visible.sync="teacherVisible"
width="30%" center @close="closeTeacher" class="dialog" :close-on-click-modal="false">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="100px">
<el-form-item prop="userAccount" label="账号">
<el-input v-model.number="teacherForm.userAccount" ref="account" placeholder="请输入职工账号" @change="accountChange"></el-input>
</el-form-item>
<el-form-item prop="userName" label="用户姓名">
<el-input v-model="teacherForm.userName" placeholder="请输入员工姓名"></el-input>
</el-form-item>
<el-form-item prop="roleValue" label="账号角色">
<el-checkbox-group v-model="teacherForm.roleValue" :disabled="!isAddteacher">
<el-checkbox label="老师"></el-checkbox>
<el-checkbox label="管理员"></el-checkbox>
<el-checkbox label="学生" disabled></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item prop="uniqueIdentificationAccount" label="唯一标识">
<el-input disabled v-model="teacherForm.uniqueIdentificationAccount" placeholder="请输入职工工号获取唯一标识"></el-input>
</el-form-item>
<template v-if="teacherForm.roleValue.some((n) => n == '老师')">
<el-form-item prop="teacherWorkNumber" label="老师职工工号">
<el-input v-model.number="teacherForm.teacherWorkNumber" placeholder="请输入老师职工工号" @change="OnlyId(3)"></el-input>
</el-form-item>
<el-form-item prop="teacherMajor" label="老师一级部门">
<el-select v-model="teacherForm.teacherMajor" placeholder="请选择一级部门" @change="getDepartment(3)">
<el-option v-for="(item,index) in majorList" :key="index"
:label="item.staffProfessionalArchitectureName" :value="item.staffProfessionalArchitectureId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="teacherDepartment" label="老师二级部门">
<el-select v-model="teacherForm.teacherDepartment" placeholder="请选择二级部门" :disabled="teacherForm.teacherMajor ? false : true">
<el-option v-for="(item,index) in teacherDepartmentList" :key="index"
:label="item.staffGradeName" :value="item.staffGradeId"></el-option>
</el-select>
</el-form-item>
</template>
<template v-if="teacherForm.roleValue.some((n) => n == '管理员')">
<el-form-item prop="managerWorkNumber" label="管理员职工工号">
<el-input v-model.number="teacherForm.managerWorkNumber" placeholder="请输入管理员职工工号" @change="OnlyId(2)"></el-input>
</el-form-item>
<el-form-item prop="managerMajor" label="管理员一级部门">
<el-select v-model="teacherForm.managerMajor" placeholder="请选择一级部门" @change="getDepartment(2)">
<el-option v-for="(item,index) in majorList" :key="index"
:label="item.staffProfessionalArchitectureName" :value="item.staffProfessionalArchitectureId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="managerDepartment" label="管理员二级部门">
<el-select v-model="teacherForm.managerDepartment" placeholder="请选择二级部门" :disabled="teacherForm.managerMajor ? false : true">
<el-option v-for="(item,index) in managerDepartmentList" :key="index"
:label="item.staffGradeName" :value="item.staffGradeId"></el-option>
</el-select>
</el-form-item>
</template>
<el-form-item prop="phone" label="手机号">
<el-input v-model="teacherForm.phone" placeholder="请输入手机号" maxlength="11" @change="phoneChange"></el-input>
</el-form-item>
<el-form-item prop="email" label="邮箱">
<el-input v-model="teacherForm.email" placeholder="请输入邮箱"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="teacherVisible = false"> </el-button>
<el-button type="primary" @click="saveSure('teacherForm')"> </el-button>
</span>
</el-dialog>
<!-- 批量导入 -->
<el-dialog title="批量导入" :visible.sync="importVisible" width="24%" center :close-on-click-modal="false">
<!-- <el-input placeholder="请上传文件"></el-input> -->
<div class="flex-start-around">
<!-- <el-button type="text" class="ml20" @click="loginout">浏览电脑</el-button> -->
<el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button>
<el-upload
accept=".xls,.xlsx"
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.readStaff"
:file-list="uploadList"
:data="updata"
name="file"
>
<el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
</el-upload>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false"> </el-button>
<el-button type="primary" @click="uploadSure"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import TeacherSide from './TeacherSide.vue';
import bus from './bus';
export default {
data() {
return {
pages: 10,
isAddteacher: false,
teacherVisible: false,
teacherForm: {
teacherId: '',
userName: '',
roleValue: [],
tearcherAccount: '',
phone: '',
uniqueIdentificationAccount: '',
teacherWorkNumber: '',
managerWorkNumber: '',
email: '',
teacherMajor: '',
teacherDepartment: '',
managerMajor: '',
managerDepartment: '',
userAccount: ''
},
rules: {
userAccount: [
{ required: true, message: '请输入职工账号', trigger: 'blur' },
{
pattern: /^[A-Za-z0-9]*$/,
message: '职工账号必须为数字',
trigger: 'blur'
}
],
userName: [
{ required: true, message: '请输入用户姓名', trigger: 'blur' }
],
roleValue: [
{ required: true, message: '请选择账号角色', trigger: 'change' }
],
tearcherAccount: [
{ required: true, message: '请输入老师职工工号', trigger: 'blur' },
{
pattern: /^[0-9]*$/,
message: '职工工号必须为数字',
trigger: 'blur'
}
],
uniqueIdentificationAccount: [
// { required: true, message: '', trigger: 'blur' },
],
teacherWorkNumber: [
{ required: true, message: '请输入老师职工工号', trigger: 'blur' }
],
teacherDepartment: [
{ required: true, message: '请选择老师二级部门', trigger: 'change' }
],
managerMajor: [
{ required: true, message: '请选择管理员一级部门', trigger: 'change' }
],
managerWorkNumber: [
{ required: true, message: '请输入管理员职工工号', trigger: 'blur' }
],
managerDepartment: [
{ required: true, message: '请选择管理员二级部门', trigger: 'change' }
],
teacherMajor: [
{ required: true, message: '请选择老师一级部门', trigger: 'change' }
],
phone: [
// { required: true, message: '', trigger: 'blur' },
{
pattern: /^1[3456789]\d{9}$/,
message: '请输入正确的手机号',
trigger: 'blur'
}
],
email: [
// { required: true, message: '', trigger: 'blur' },
{
pattern: /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/,
message: '请输入正确的邮箱',
trigger: 'blur'
}
]
},
teacherData: [],
importVisible: false,
keyword: '',
pageNo: 1,
pageSize: 10,
total: 0,
majorList: [],
managerDepartmentList: [],
teacherDepartmentList: [],
staffstateProfessId: '',
staffGradeId: '',
multipleSelection: [],
uploadList: [],
updata: {
schoolId: this.$store.state.schoolId,
schoolName: this.$store.state.schoolName
},
provinceId: this.$store.state.provinceId,
cityId: this.$store.state.cityId,
userId: this.$store.state.userId,
oneDepartmentIds: '',
twoDepartmentIds: '',
ProfessionalClassList: [],
subjectList: [],
ProfessionalList: [],
NoAdd: '',
AccountNoAdd: '',
NumberNoAdd: '',
platformId: this.$store.state.platformId,
isManager: false,
isTeacher: false,
isNewUser: 1
};
},
components: {
TeacherSide
},
mounted(){
this.getTeacher()
this.getSubject()
},
methods: {
fircheck(val){
let oneDepartmentIds = this.oneDepartmentIds ? this.oneDepartmentIds.split(',') : []
val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = true)
if(val.ischeck){
oneDepartmentIds.push(val.staffProfessionalArchitectureId)
}else{
this.core.removeByValue(oneDepartmentIds, val.staffProfessionalArchitectureId);
}
this.oneDepartmentIds = oneDepartmentIds.toString()
this.getTeacher()
},
twocheck(val,val2){
let twoDepartmentIds = this.twoDepartmentIds ? this.twoDepartmentIds.split(',') : []
const twoStatus = val.ischeck
val.ischeck = !twoStatus
if(val.ischeck){
twoDepartmentIds.push(val.staffGradeId)
}else{
this.core.removeByValue(twoDepartmentIds, val.staffGradeId);
}
val2.map( e => {
e.children.map( r => {
if(r.staffGradeId == val.staffGradeId){
if(r.ischeck){
e.ischeck = true
} else {
e.ischeck = false
}
}
})
})
this.twoDepartmentIds = twoDepartmentIds.toString()
this.getTeacher()
},
getTeacher(){
let data = {
oneDepartmentIds: this.oneDepartmentIds,
twoDepartmentIds: this.twoDepartmentIds,
pageNo: this.pageNo,
pageSize: this.pageSize,
searchContent: this.keyword,
schoolId: this.updata.schoolId
}
this.$get(this.api.queryStaff,data).then(res => {
let Length = res.message.rows.length
for (let i = 0; i < Length; i++) {
res.message.rows[i].roleName = this.core.roleType(res.message.rows[i].roleId)
res.message.rows[i].logInNumber = res.message.rows[i].logInNumber ? res.message.rows[i].logInNumber : 0
}
this.teacherData = res.message.rows
this.pages = res.message.totalPages*10
this.total = res.message.total
}).catch(res => {});
},
closeTeacher(){
this.$refs.teacherForm.resetFields()
this.teacherForm.managerDepartment = ''
this.teacherForm.managerMajor = ''
this.teacherForm.managerWorkNumber = ''
this.teacherForm.teacherDepartment = ''
this.teacherForm.teacherMajor = ''
this.teacherForm.teacherWorkNumber = ''
this.teacherForm.userId = ''
},
addTeacher(){
this.teacherVisible = true
this.isAddteacher = true
this.teacherForm.teacherId = ''
this.majorList = this.$refs.getSelectData.majorList
console.log(123,this.teacherForm)
},
editTeacher(row){
this.teacherVisible = true
this.isAddteacher = false
this.AccountNoAdd = false
this.teacherForm.teacherId = row.organizationRelationshipId
this.majorList = this.$refs.getSelectData.majorList
this.isNewUser = 0
let data = {
userId: row.userId,
roleId: row.roleId
}
this.$get(this.api.queryStaffDetails,data).then(res => {
let user = res.message.user[0];
let or = res.message.staff;
this.teacherForm.userName = user.userName
this.teacherForm.phone = user.phone
this.teacherForm.email = user.email
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount
this.teacherForm.userAccount = user.account
this.teacherForm.userId = user.userId
or.forEach((n,i) => {
this.teacherForm.roleValue.push(this.core.roleType(n.roleId))
if(n.roleId == 2) {
this.teacherForm.managerMajor = n.oneDepartmentId
this.teacherForm.managerDepartment = n.twoDepartmentId
this.teacherForm.managerWorkNumber = n.workNumber
this.isManager = true
this.getDepartment(2)
}else if(n.roleId == 3){
this.teacherForm.teacherMajor = n.oneDepartmentId
this.teacherForm.teacherDepartment = n.twoDepartmentId
this.teacherForm.teacherWorkNumber = n.workNumber
this.isTeacher = true
this.getDepartment(3)
}
})
}).catch(res => {});
},
getDepartment(type){
let data = {
staffProfessionalArchitectureId: type == 2 ? this.teacherForm.managerMajor : this.teacherForm.teacherMajor
}
this.$get(this.api.queryStaffGrade,data).then(res => {
if(type == 2){
this.managerDepartmentList = res.message
}else{
this.teacherDepartmentList = res.message
}
}).catch(res => {});
},
async phoneChange(){
let res = await this.$get(this.api.queryPhone, { phone: this.teacherForm.phone });
if(res.message.length != 0){
this.$message.warning('该手机号已存在');
this.NoAdd = false
}else{
this.NoAdd = true
}
},
resetFields() {
// this.teacherForm
},
async accountChange(){
let res = await this.$get(this.api.queryAccountIsExist, {
account: this.teacherForm.userAccount,
schoolId: this.updata.schoolId
});
this.isManager = false
this.isTeacher = false
if(res.message.user.length != 0){
let user = res.message.user[0];
let or = res.message.OR;
this.$message.warning('该账号已存在');
this.teacherForm.email = user.email
this.teacherForm.phone = user.phone
this.teacherForm.uniqueIdentificationAccount = user.uniqueIdentificationAccount
this.teacherForm.userName = user.userName
this.teacherForm.schoolId = user.schoolId
this.teacherForm.userId = user.userId
this.isNewUser = 0
or.forEach((n,i) => {
this.teacherForm.roleValue.push(this.core.roleType(n.roleId))
if(n.roleId == 2) {
this.teacherForm.managerMajor = n.oneDepartmentId
this.teacherForm.managerDepartment = n.twoDepartmentId
this.teacherForm.managerWorkNumber = n.workNumber
this.teacherForm.managerSchoolId = n.schoolId
this.teacherForm.managerSchoolName = n.schoolName
this.isManager = true
this.getDepartment(2)
}else if(n.roleId == 3){
this.teacherForm.teacherMajor = n.oneDepartmentId
this.teacherForm.teacherDepartment = n.twoDepartmentId
this.teacherForm.teacherWorkNumber = n.workNumber
this.teacherForm.teacherSchoolId = n.schoolId
this.teacherForm.tacherSchoolName = n.schoolName
this.isTeacher = true
this.getDepartment(3)
}
})
this.AccountNoAdd = false
}else{
this.isNewUser = 1
this.AccountNoAdd = true
}
},
async submitOnlyId(){
if(this.teacherForm.managerWorkNumber != ''){
this.OnlyId(2)
}else if(this.teacherForm.teacherWorkNumber != ''){
this.OnlyId(3)
}
},
async OnlyId(type){
let data = {};
let msg = '';
if(type == 2){
data = {
workNumber: this.teacherForm.managerWorkNumber,
roleId: 2,
schoolId: this.teacherForm.managerSchoolId
}
msg = '该管理员工号已存在'
}else if(type == 3){
data = {
workNumber: this.teacherForm.teacherWorkNumber,
roleId: 3,
schoolId: this.teacherForm.teacherSchoolId
}
msg = '该老师工号已存在'
}
let res = await this.$get(this.api.queryWorkNumberIsExist, data);
if(res.message.length != 0){
this.$message.warning(msg);
this.NumberNoAdd = false
}else{
let timestamp = Date.parse(new Date());
this.teacherForm.uniqueIdentificationAccount = `${this.updata.schoolId}${this.teacherForm.uniqueIdentificationAccount}${timestamp}`
this.NumberNoAdd = true
}
},
async saveSure(teacherForm){
this.$refs[teacherForm].validate((valid) => {
if (valid) {
if(this.isAddteacher) {
if(this.isManager && this.isTeacher) return this.$message.warning('该用户已经是老师和管理员,请重新添加');
if(this.isManager && !this.teacherForm.roleValue.some((n) => n == '老师')) return this.$message.warning('该用户已经是管理员');
if(this.isTeacher && !this.teacherForm.roleValue.some((n) => n == '管理员')) return this.$message.warning('该用户已经是老师');
if(!this.AccountNoAdd) return this.$message.warning('该账号已存在');
if(this.NumberNoAdd === ''){
this.submitOnlyId()
if(!this.NumberNoAdd) return false
}else if(this.NumberNoAdd === false){
if(this.teacherForm.managerWorkNumber != '') return this.$message.warning('该管理员工号已存在');
if(this.teacherForm.teacherWorkNumber != '') return this.$message.warning('该老师工号已存在');
}
if(this.NoAdd == '' && this.teacherForm.phone){
this.phoneChange()
if(!this.NoAdd) return false
}else if(this.NoAdd === false) return this.$message.warning('该手机号已存在');
}
let data = {
UserInfo: {
isNewUser: this.isNewUser,
userName: this.teacherForm.userName,
account: this.teacherForm.userAccount,
schoolId: this.updata.schoolId,
phone: this.teacherForm.phone,
email: this.teacherForm.email,
uniqueIdentificationAccount: this.teacherForm.uniqueIdentificationAccount ? this.teacherForm.uniqueIdentificationAccount : Date.parse(new Date()),
userId: this.teacherForm.userId ? this.teacherForm.userId : ''
}
}
if(this.isAddteacher) data.organizationRelationshipList = [];
// if(!this.isManager && this.teacherForm.managerWorkNumber){
if((!this.isAddteacher && this.isManager) || (this.isAddteacher && !this.isManager && this.teacherForm.managerWorkNumber)){
let oneDepartmentName = '';
for(let i in this.majorList){
if(this.majorList[i].staffProfessionalArchitectureId == this.teacherForm.managerMajor) {
oneDepartmentName = this.majorList[i].staffProfessionalArchitectureName
break;
}
}
let twoDepartmentName = this.managerDepartmentList.find((n) => {
return n.staffGradeId == this.teacherForm.managerDepartment
}).staffGradeName;
let orList = {
roleId: 2,
workNumber: this.teacherForm.managerWorkNumber,
oneDepartmentId: this.teacherForm.managerMajor,
twoDepartmentId: this.teacherForm.managerDepartment,
oneDepartmentName,
twoDepartmentName,
schoolId: this.updata.schoolId,
schoolName: this.updata.schoolName,
organizationRelationshipId: this.teacherForm.teacherId ? this.teacherForm.teacherId : '',
platformId: this.platformId
};
if(this.isAddteacher){
data.organizationRelationshipList.push(orList)
}else{
data.OrganizationRelationship = orList
}
}
// if(!this.isTeacher && this.teacherForm.teacherWorkNumber){
if((!this.isAddteacher && this.isTeacher) || (this.isAddteacher && !this.isTeacher && this.teacherForm.teacherWorkNumber)){
let oneDepartmentName = '';
for(let i in this.majorList){
if(this.majorList[i].staffProfessionalArchitectureId == this.teacherForm.teacherMajor) {
oneDepartmentName = this.majorList[i].staffProfessionalArchitectureName
break;
}
}
let twoDepartmentName = this.teacherDepartmentList.find((n) => {
return n.staffGradeId == this.teacherForm.teacherDepartment
}).staffGradeName;
let orList = {
roleId: 3,
workNumber: this.teacherForm.teacherWorkNumber,
oneDepartmentId: this.teacherForm.teacherMajor,
twoDepartmentId: this.teacherForm.teacherDepartment,
oneDepartmentName,
twoDepartmentName,
schoolId: this.updata.schoolId,
schoolName: this.updata.schoolName,
organizationRelationshipId: this.teacherForm.teacherId ? this.teacherForm.teacherId : '',
platformId: this.platformId
};
if(this.isAddteacher){
data.organizationRelationshipList.push(orList)
}else{
data.OrganizationRelationship = orList
}
}
if(this.teacherForm.teacherId){
this.$post(this.api.updateStaff,data).then(res => {
this.teacherVisible = false
this.$message.success('编辑成功');
this.getTeacher()
}).catch(res => {});
}else{
this.$post(this.api.addStaff,data).then(res => {
this.teacherVisible = false
this.$message.success('添加成功');
this.getTeacher()
}).catch(res => {});
}
}else{
return false;
}
})
},
delTeacher(row){
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = [{organizationRelationshipId: row.organizationRelationshipId}]
this.$post(this.api.deleteStaff,data).then(res => {
let totalPage = Math.ceil((this.total - 1) / this.pageSize)
let currentPage = this.pageNo > totalPage ? totalPage : this.pageNo
this.pageNo = currentPage < 1 ? 1 : currentPage
this.$message.success('删除成功');
this.getTeacher()
}).catch(res => {});
})
.catch(() => {});
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
delAllSelection() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let delList = newArr.map(item => {
return {organizationRelationshipId: item.organizationRelationshipId}
})
//
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = delList
this.$post(this.api.deleteStaff,data).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功');
this.getTeacher()
}).catch(res => {});
}).catch(() => {});
}else{
this.$message.error('请先选择员工 !');
}
},
batchImport(){
this.importVisible = true
},
searchTeacher(){
this.pageNo = 1;
this.getTeacher()
},
handleCurrentChange(val) {
this.pageNo = val;
this.getTeacher();
},
downLoad(){
window.open('http://www.liuwanr.cn:8080/makeuplist/excelExport?fileName=模板下载&titles=职工姓名,账号角色,职工账号,专业方向,部门,手机号,邮箱')
},
//
handleExceed(files, fileList) {
// console.log(files, fileList)
this.$message.warning(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
},
uploadSuccess(response, file, fileList) {
// this.uploadList.push({ name: file.name, url: response.message.fileUrl });
},
uploadError(err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
});
},
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleRemove(file, fileList) {
this.uploadList = fileList
},
uploadSure(){
this.importVisible = false
this.pageNo = 1
this.staffGradeId = ''
this.keyword = ''
this.getTeacher()
},
//
getSubject(){
this.$get(this.api.queryCourseDiscipline).then(res => {
this.subjectList = res.message
}).catch(res => {});
},
//
clearClass(){
this.teacherForm.professionalClassId = '',
this.teacherForm.professionalId = ''
},
//
getProfessionalClass(){
this.clearClass()
if(this.teacherForm.disciplineId){
this.getProfessionalClassData()
}
},
getProfessionalClassData(){
let data = {
disciplineId: this.teacherForm.disciplineId
}
this.$get(this.api.queryCourseProfessionalClass,data).then(res => {
this.ProfessionalClassList = res.message
}).catch(res => {});
},
//
clearProfess(){
this.teacherForm.professionalId = ''
},
//
getProfessional(){
this.clearProfess()
if(this.teacherForm.professionalClassId){
this.getProfessionalData()
}
},
getProfessionalData(){
let data = {
professionalClassId: this.teacherForm.professionalClassId
}
this.$get(this.api.queryCourseProfessional,data).then(res => {
this.ProfessionalList = res.message
}).catch(res => {});
}
}
};
</script>
<style scoped>
.el-container{
background-color: #f0f0f0;
}
.mag{
margin-right: 20px;
margin-left: 20px;
}
</style>

@ -1,357 +0,0 @@
<template>
<div>
<div>
<lctree :data="majorList"
@addMajor="addMajor" @editMajor="editMajor" @delMajor="delMajor"
@addDepartment="addDepartment" @editDepartment="editDepartment" @delDepartment="delDepartment"
@fircheckitem="fircheckitem" @twocheckitem="twocheckitem"
></lctree>
</div>
<!-- 添加专业 -->
<el-dialog :title="Form.MajorId ? '编辑专业' : '新增专业'" :visible.sync="isaddMajor" width="24%" center @close="closeAdd" :close-on-click-modal="false">
<el-form ref="Form" :model="Form" :rules="rules">
<el-form-item prop="majorName">
<el-input placeholder="请输入专业名称" v-model="Form.majorName" @change="majorChange"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isaddMajor = false"> </el-button>
<el-button type="primary" @click="sure('Form')"> </el-button>
</span>
</el-dialog>
<!-- 添加部门 -->
<el-dialog :title="Form.departmentId ? '编辑部门' : '新增部门'" :visible.sync="isAddDepartment" width="24%" center @close="closeAdd" :close-on-click-modal="false">
<el-form ref="Form" :model="Form" :rules="rules">
<el-form-item prop="departmentName">
<el-input placeholder="请输入部门名称" v-model="Form.departmentName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="isAddDepartment = false"> </el-button>
<el-button type="primary" @click="sureDepartment('Form')"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import lctree from './Teachertree';
import bus from './bus';
export default {
props:["Data"],
data() {
return {
majorList: [],
firactive: 0,
twoactive: 0,
isaddMajor: false,
isAddDepartment: false,
schoolId: this.$store.state.schoolId,
Form: {
MajorId: '',
majorName: '',
departmentId: '',
departmentName: ''
},
rules: {
majorName: [
{ required: true, message: '请输入专业名称', trigger: 'blur' }
],
departmentName: [
{ required: true, message: '请输入部门名称', trigger: 'blur' }
]
},
staffstateProfessId: '',
staffstateId: '',
majorNoAdd: true
};
},
components: {
lctree
},
mounted(){
this.getStaff()
},
methods: {
getStaff(){
let data = {
schoolId: this.schoolId
}
this.$get(this.api.queryStaffPro,data).then(res => {
if(res.message){
res.message.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.staffProfessionalArchitectureName);
let data = {
staffProfessionalArchitectureId: e.staffProfessionalArchitectureId
}
this.$get(this.api.queryStaffGrade,data).then(res => {
res.message.map(e => {
(e.ischeck = false), (e.label = e.staffGradeName);
})
e.children = res.message
}).catch(res => {});
})
}
setTimeout(() => {
this.majorList = res.message
}, 500);
}).catch(res => {});
},
//
fircheckitem(item){
this.$emit("fircheck",item)
},
//
twocheckitem(item){
this.$emit("twocheck",item,this.majorList)
},
closeAdd(){
this.$refs.Form.resetFields()
},
//
addMajor(){
this.Form.MajorId = ''
this.Form.majorName = ''
this.isaddMajor = true
},
editMajor(item){
this.Form.MajorId = item.staffProfessionalArchitectureId,
this.Form.majorName = item.staffProfessionalArchitectureName
this.isaddMajor = true
},
async majorChange(){
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.majorName });
if(res.message.length != 0){
this.$message.warning('该一级部门已存在');
this.majorNoAdd = false
}else{
this.majorNoAdd = true
}
},
sure(Form){
this.$refs[Form].validate((valid) => {
if (valid) {
if(!this.majorNoAdd) return this.$message.warning('该一级部门已存在');
let data = {
staffProfessionalArchitectureName: this.Form.majorName,
staffProfessionalArchitectureId: this.Form.MajorId,
schoolId: this.schoolId,
}
if(this.Form.MajorId){
this.$post(this.api.updateStaffPro,data).then(res => {
this.$message.success('编辑成功');
this.isaddMajor = false
this.majorList.map(e =>{
if(e.staffProfessionalArchitectureId == this.Form.MajorId){
e.staffProfessionalArchitectureName = this.Form.majorName
e.label = this.Form.majorName
}
})
}).catch(res => {});
}else{
this.$post(this.api.addStaffPro,data).then(res => {
this.$message.success('添加成功');
this.isaddMajor = false
let newData = {
staffProfessionalArchitectureId: res.message,
staffProfessionalArchitectureName: this.Form.majorName,
label: this.Form.majorName,
ifVisible: false,
ischeck: false,
children: []
}
this.majorList.push(newData)
}).catch(res => {});
}
}else{
return false;
}
})
},
//
addDepartment(item){
this.Form.departmentId = ''
this.Form.departmentName = ''
this.isAddDepartment = true
this.Form.MajorId = item.staffProfessionalArchitectureId
},
editDepartment(item){
this.Form.departmentId = item.staffGradeId,
this.Form.departmentName = item.staffGradeName
this.isAddDepartment = true
for (let j = 0; j < this.majorList.length; j++) {
for (let k = 0; k < this.majorList[j].children.length; k++) {
if(this.majorList[j].children[k].staffGradeName == item.staffGradeName){
this.Form.MajorId = this.majorList[j].staffProfessionalArchitectureId
}
}
}
},
sureDepartment(Form){
this.$refs[Form].validate((valid) => {
if (valid) {
let data = {
staffGradeName: this.Form.departmentName,
staffProfessionalArchitectureId: this.Form.MajorId,
staffGradeId: this.Form.departmentId
}
if(this.Form.departmentId){
this.$post(this.api.updateStaffGrade,data).then(res => {
this.$message.success('编辑成功');
this.isAddDepartment = false
this.majorList.map(e =>{
e.children.map(r =>{
if(r.staffGradeId == this.Form.departmentId){
r.staffGradeName = this.Form.departmentName
r.label = this.Form.departmentName
}
})
})
}).catch(res => {});
}else{
this.$post(this.api.addStaffGrade,data).then(res => {
this.$message.success('添加成功');
this.isAddDepartment = false
let newData = {
staffGradeId: res.message,
staffGradeName: this.Form.departmentName,
label: this.Form.departmentName,
ifVisible: false,
ischeck: false
}
this.majorList.map(e =>{
if(e.staffProfessionalArchitectureId == this.Form.MajorId){
e.ifVisible = true
e.children.push(newData)
}
})
}).catch(res => {});
}
}else{
return false;
}
})
},
delMajor(item,index){
this.$confirm('确定要删除该专业吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = {
staffProfessionalArchitectureId: item.staffProfessionalArchitectureId
}
this.$post(this.api.deleteStaffPro,data).then(res => {
this.$message.success('删除成功');
this.majorList.splice(index, 1)
}).catch(res => {});
})
.catch(() => {});
},
delDepartment(item,indx){
this.$confirm('确定要删除该部门吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = {
staffGradeId: item.staffGradeId
}
this.$post(this.api.deleteStaffGrade,data).then(res => {
this.$message.success('删除成功');
this.majorList.map(e =>{
e.children.map(r =>{
if(r.staffGradeId == item.staffGradeId){
e.children.splice(indx,1)
if(e.children.length == 0){
e.ifVisible = false
}
}
})
})
}).catch(res => {});
})
.catch(() => {});
}
}
};
</script>
<style scoped>
.side_view{
height: 800px;
padding: 40px 20px;
background-color: #fff;
box-shadow:-2px 0px 57px 0px rgba(192,189,216,0.39);
}
.side_icon{
text-align: right;
}
.side_icon i{
cursor:pointer;
font-size: 30px;
color: #328aff;
}
.side_tree{
width: 100%;
font-size: 18px;
color: #333;
}
.side_tree i{
color: #328aff;
margin-left: 10px;
}
.fir_back{
width: 100%;
padding: 15px 0;
background:rgba(255,255,255,1);
/* box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19); */
border-radius:10px;
text-align: left;
}
.fir_back:first-child{
margin-top: 20px;
}
.fir_back:hover{
box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19);
cursor:pointer;
}
.fir_back span{
margin-left: 10px;
}
.two_active{
color: #328aff;
}
/* .two_active:hover{
color: #328aff;
cursor:pointer;
} */
.two_back:hover{
cursor:pointer;
color: #328aff;
}
.mar_top{
margin-top: 20px;
}
.back_active{
box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19);
}
.bor_lef{
padding: 20px 0 0 0;
margin-left: 40px;
}
.three_lef{
margin-left: 60px;
padding: 20px 0;
}
.three_text{
font-size: 18px;
margin-top: 10px;
}
.teacher_tab{
margin-left: 20px;
}
.icon_select:before{
transform: rotate(180deg);
}
.list-enter-active, .list-leave-active { transition: all 1s; }
.list-enter, .list-leave-to { opacity: 0; transform: translateY(-30px); }
</style>

@ -1,395 +0,0 @@
<template>
<div>
<div class="Assessment-condition">
<div class="Assessment-condition-page">
<p style="margin-bottom:5px;font-weight:bold">筛选:</p>
<div class="Assessment-condition-page-contanin">
<div>
考核时间:
<span @click="getmonthdata(1)" :class="{active:this.month == 1}">近一个月</span>
<span @click="getmonthdata(3)" :class="{active:this.month == 3}">近三个月</span>
<span @click="getmonthdata(6)" :class="{active:this.month == 6}">近六个月</span>
<el-date-picker
value-format="yyyy-MM-dd"
size="small"
v-model="timeInterval"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="selectTime"
clearable
></el-date-picker>
</div>
<div style="display:flex;margin-top:20px">
<p>发布类型:</p>
<div class="condition-page-div">
<el-select
v-model="releaseType"
placeholder="请选择"
popper-class="select-option"
size="small"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
<p>考核状态:</p>
<div class="condition-page-div">
<el-select v-model="assesmentState" placeholder="请选择" size="small">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</div>
</div>
<div class="condition-page-input">
<el-input
size="small"
placeholder="请输入要查找的考核名"
prefix-icon="el-icon-search"
v-model="assesmentName"
clearable
></el-input>
</div>
</div>
</div>
</div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgr20">
<div class="flex-between mgb20">
<span>考核成绩</span>
<el-button
type="primary"
size="small"
round
@click="release"
>新建考核</el-button>
</div>
<el-table :data="AssessmentData" class="table" stripe header-align="center">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="assesmentName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="assessmentSize" label="考核人数" align="center"></el-table-column>
<el-table-column prop="timesum" label="考核时长" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="releaseType" label="发布类型" align="center"></el-table-column>
<el-table-column prop="creationTime" label="起始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
<el-table-column prop="countDo" label="倒计时" align="center"></el-table-column>
<el-table-column prop="assesmentState" label="考核状态" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<div v-show="scope.row.assesmentState == '待开始'">
<el-button type="text" @click="start(scope.row)">启动</el-button>
<el-button type="text" @click="edit(scope.row)">修改</el-button>
<el-button type="text" @click="permission(scope.row)">取消</el-button>
</div>
<div v-show="scope.row.assesmentState == '已结束'">
<el-button type="text" @click="check(scope.row.id)">查看成绩</el-button>
</div>
<div v-show="scope.row.assesmentState == '进行中'">
<el-button type="text" @click="end(scope.row)">提前结束</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="currentChange"
:page-size="pageSize"
layout="prev, pager, next"
:total="pageTotal"
></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
staffId: this.$store.state.staffId, //id
courseId: this.$store.state.courseId, //id
pageNo: 1, //
pageSize: 10, //
timeInterval: '', // getData
month: '', //
releaseType: '', //
assesmentState: '', //
className:'',//
ticker: '',
pageTotal: 10,
assesmentName: '',
input2: '',
pages: 13,
AssessmentData: [],
options: [
{
value: '',
label: '不限'
},
{
value: 0,
label: '手动发布'
},
{
value: 1,
label: '定时发布'
}
],
options1: [
{
value: '',
label: '不限'
},
{
value: '0',
label: '待开始'
},
{
value: '1',
label: '进行中'
},
{
value: '2',
label: '已结束'
}
],
creationTime: '',
endTime: ''
};
},
mounted() {
this.getData();
},
methods: {
permission(row){
this.$confirm('确定要删除该考核吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(this.api.deleteAssesment,{ id: row.id }).then(res => {
this.$message.success('删除成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
edit(row) {
this.$store.commit("assesmentData", { assesmentId : row.id});
this.$router.push('/addassessment');
},
async end(row) {
let timestamp = Date.parse(new Date());
let startTime = new Date(row.creationTime).getTime();
let newTimesum = timestamp - startTime
await this.$post(this.api.updateState, {
id: row.id,
assesmentState:2,
releaseType: row.releaseType == '手动发布' ? 0 : 1,
creationTime: '',
endTime: timestamp,
timesum: newTimesum
})
await this.getData()
},
async start(row) {
let timestamp = Date.parse(new Date());
await this.$post(this.api.updateState, {
id: row.id,
assesmentState: 1,
releaseType: row.releaseType == '手动发布' ? 0 : 1,
creationTime: row.releaseType == '手动发布' ? timestamp: '',
endTime: '',
timesum: row.timesum
})
await this.getData()
},
//
selectTime(val){
if(val){
this.creationTime = val[0]
this.endTime = val[1]
}else{
this.creationTime = ''
this.endTime = ''
}
this.getData()
},
getData(val) {
//
this.$get(this.api.queryAssesmentcondition, {
staffId: this.staffId,
courseId: this.courseId,
className: this.assesmentName,
pageSize: this.pageSize,
month: this.month,
pageNo: this.pageNo,
releaseType: this.releaseType,
assesmentState: this.assesmentState,
creationTime: this.creationTime,
endTime: this.endTime
}).then(res => {
res.message.rows.forEach(e => {
this.$set(e, 'countDo', '');
e.releaseType = this.core.orderreleaseType(e.releaseType);
e.assesmentState = this.core.orderassesmentState(e.assesmentState);
let timestamp = Date.parse(new Date());
// let timestamp1 = new Date(e.creationTime).getTime();
let timestamp2 = new Date(e.endTime).getTime();
this.$set(e, 'countDown', timestamp2 - timestamp);
});
this.AssessmentData = res.message.rows; //
this.pageTotal = res.message.total; //
var _this = this;
if (this.ticker) {
clearInterval(this.ticker);
}
this.ticker = setInterval(() => {
_this.AssessmentData.forEach(e => {
if (e.countDown > 0) {
e.countDown = e.countDown - 1000;
} else {
return;
}
e.countDo = this.formatDuring(e.countDown);
});
}, 1000);
})
.catch(err => {
console.log(err);
});
},
threeMonths() {},
getmonthdata(m) {
this.month = m
this.getData();
},
release() {
this.$emit('release');
},
check(id) {
this.$router.push({
path: '/checkresult',
query: {
id
}
});
},
formatDuring(mss) {
//
var days = parseInt(mss / (1000 * 60 * 60 * 24));
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
var seconds = ((mss % (1000 * 60)) / 1000).toFixed(0);
return days + ' 天 ' + hours + ' : ' + minutes + ' : ' + seconds;
},
currentChange(val) {
this.pageNo = val;
this.getData();
}
},
watch: {
releaseType() {
this.getData();
},
assesmentState() {
this.getData();
},
assesmentName() {
this.getData();
}
}
};
</script>
<style scoped >
.active{
background: #328aff;
border-radius: 3px;
color: cornsilk;
height: 50px;
}
.condition-page-input {
width: 200px;
margin-bottom: 20px;
}
.Assessment-condition-page-contanin div span {
margin-left: 40px;
cursor: pointer;
}
.Assessment-condition-page-contanin div span:nth-child(3) {
margin-right: 40px;
}
.mag {
margin-right: 20px;
}
.mgr20 {
margin-top: 10px;
}
.Assessment-condition {
width: 100%;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
border-radius: 10px;
height: 200px;
margin-top: 20px;
position: relative;
}
.Assessment-condition-page {
left: 0;
right: 0;
margin: 0 auto;
width: 98%;
position: absolute;
bottom: 0px;
}
.condition-page-div {
width: 120px;
margin-left: 30px;
margin-right: 20px;
}
.Assessment-condition-page-contanin p {
margin-top: 10px;
}
.condition-page-input {
margin-left: 1550px;
}
.Assessment-condition-page-contanin {
margin-left: 30px;
}
.Assessment-condition-page-contanin /deep/ .el-input--suffix .el-input__inner {
border-radius: 5px !important;
}
</style>

@ -1,296 +0,0 @@
<template>
<div>
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgr20">
<div class="flex-between mgb20">
<span>实验班信息</span>
<el-button
type="primary"
size="small"
round
@click="getTreeData"
>创建实验班级</el-button>
<el-dialog
title
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<div class="hvCenter">
<span>请选择要开实验班的学生</span>
<input
v-model="experimentalClassName"
placeholder="请创建实验班名称"
class="dialoginput"
type="text"
/>
<div class="dialogTree">
<lctree :data="list" @chooseNode="getnode"></lctree>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="establish()">创建</el-button>
</span>
</el-dialog>
</div>
<el-table :data="classData" class="table" stripe header-align="center">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="实验班" align="center"></el-table-column>
<el-table-column prop="classSize" label="班级人数" align="center"></el-table-column>
<el-table-column prop="practiceNumber" label="练习次数" align="center"></el-table-column>
<el-table-column prop="inspectionNumber" label="考核次数" align="center"></el-table-column>
<el-table-column prop="courseSchedule" label="课程进度" align="center"></el-table-column>
<el-table-column prop="creationTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="founder" label="创建人" align="center"></el-table-column>
<el-table-column label="实验教学" align="center">
<template slot-scope="scope">
<el-button
type="primary"
size="small"
round
@click="startCurriculum(scope.row.experimentalClassId)"
>开始课程</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
type="text"
@click="into(scope.row.experimentalClassId)"
>进入</el-button>
<el-button
type="text"
@click="del(scope.row.experimentalClassId)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- <div class="pagination">
<el-pagination background @current-change="currentChange" layout="prev, pager, next" :total="pages">
</el-pagination>
</div>-->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import lctree from '../../common/tree';
export default {
data() {
return {
// pages: 10,
experimentalClassName: '',
list: [],
dialogVisible: false, //
classData: [],
chooseList: [],
userId: this.$store.state.userId,
schoolId: this.$store.state.schoolId,
courseId: this.$store.state.courseId
};
},
mounted() {
// this.getTreeData(); //
this.getData();
},
components: {
lctree
},
methods: {
//
async establish() {
if (this.experimentalClassName == '' || this.chooseList.length == 0) {
this.$message.warning('请输入实验班级名称或选择学生');
return;
}
await this.$post(this.api.addExperimentalClass, {
experimentalClass: {
experimentalClassName: this.experimentalClassName,
classSize: this.chooseList.length,
founder: this.$store.state.name,
courseId: this.courseId,
userId: this.userId,
schoolId: this.schoolId
},
studentList: this.chooseList
});
this.dialogVisible = false;
await this.getData();
},
getnode(item) {
this.chooseList = item;
},
del(id) {
this.$confirm('确定要移除班级吗?', '提示', {
type: 'warning'
}).then(res => {
this.$post(this.api.deleteExperimentalClass, {
experimentalClassId: id
}).then(res => {
this.getData()
})
.catch(res => {});
});
},
getData() {
let data = {
schoolId: this.schoolId,
courseId: this.courseId
};
this.$get(this.api.queryExperimentClass, data)
.then(res => {
this.classData = res.message;
})
.catch(res => {});
},
startCurriculum(val) {
this.$emit('startCurriculum',val);
},
into(experimentalClassId) {
this.$router.push({
path: '/classdetail',
query: {
experimentalClassId: experimentalClassId
}
});
},
currentChange() {
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
getTreeData() {
this.dialogVisible = true
this.$get(this.api.queryStuProfessionalArchitecture, {
schoolId: this.schoolId,
courseId: this.courseId,
userId: this.userId
})
.then(res => {
res.message.forEach(e => {
this.$get(this.api.queryStuGrade, {
stuProfessionalArchitectureId: e.stuProfessionalArchitectureId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.gradeName);
this.$get(this.api.queryStuClass, {
gradeId: e.gradeId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.className);
this.$get(this.api.queryStudent, {
classId: e.classId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.studentName);
});
});
});
});
});
});
(e.ifVisible = false), (e.label = e.stuProfessionalArchitectureName);
});
setTimeout(() => {
this.list = res.message;
}, 500);
})
.catch(err => {
console.log(err);
});
}
}
};
</script>
<style lang="scss" scoped>
.dialogTree {
margin-top: 20px;
width: 90%;
height: 500px;
overflow-y: scroll;
}
.mag {
margin-right: 20px;
}
.mgr20 {
margin-top: 10px;
}
.dialoginput {
margin-top: 30px;
outline: none;
color: #333333;
border-radius: 10px;
font-size: 16px;
width: 280px;
border: none;
background: rgba(245, 242, 255, 1);
border-radius: 18px;
text-indent: 20px;
height: 36px;
}
.flex-between /deep/ .el-icon-close:before {
display: none;
}
.flex-between /deep/ .el-dialog__body {
text-align: center;
span {
font-size: 28px;
color: #333333;
}
}
.message {
width: 100%;
text-align: center;
}
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
width: 44%;
font-size: 20px;
}
.el-button:first-child {
color: #328aff;
border: 1px solid #328aff;
}
}
     .dialogTree::-webkit-scrollbar {
width: 2px;
}
        .dialogTree::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #328aff;
}
        .dialogTree::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 0;
background: rgba(0, 0, 0, 0.1);
}
</style>

@ -1,238 +0,0 @@
<template>
<div class="side_view">
<p class="side_icon mab20">
<i class="icon-jiahao mar20" @click="addMajor"></i>
<!-- <i class="icon-delete"></i> -->
</p>
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)">
<!-- <i :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" class="icon-shixiangyoujiantou-"></i> -->
<img
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
src="../../assets/img/icon-xiangyou.png"
alt
/>
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
<i class="el-icon-info ft" @click.stop="editMajor(item)"></i>
<i class="el-icon-circle-plus ft" @click.stop="addDepartment(item)"></i>
<i class="icon-delete ft" @click.stop="delMajor(item,index)"></i>
</div>
<div v-show="item.ifVisible" v-if="item.children&&item.children.length!=0">
<div v-for="(item1,index1) in item.children" :key="index1">
<div class="item2" @click.stop="open(item1)">
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i>
<span>{{item1.label}}</span>
<i class="el-icon-info ft" @click.stop="editDepartment(item1)"></i>
<i class="icon-delete ft" @click.stop="delDepartment(item1,index1)"></i>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
Array.prototype.removeByValue = function (val) {
for (var i = 0; i < this.length; i++) {
if (JSON.stringify(this[i]).indexOf(JSON.stringify(val)) != -1) {
this.splice(i, 1);
break;
}
}
};
export default {
data() {
return {
chooseList: []
};
},
watch: {
chooseList(n, o) {
this.$emit('chooseNode', n);
}
},
props: {
data: {
type: Array
}
},
methods: {
//
open(item) {
item.ifVisible = !item.ifVisible;
},
//removeByvaluemain.js
choose(item) {
item.ifVisible = !item.ifVisible;
if (item.ifVisible) {
this.chooseList.push(item);
} else {
this.chooseList.removeByValue(item);
}
},
fircheckitem(item){
this.$emit('fircheckitem',item);
},
twocheckitem(item){
this.$emit('twocheckitem',item);
},
//
addMajor(){
this.$emit('addMajor');
},
editMajor(item){
this.$emit('editMajor',item);
},
delMajor(item,index){
this.$emit('delMajor',item,index);
},
//
addDepartment(item){
this.$emit('addDepartment',item);
},
editDepartment(item){
this.$emit('editDepartment',item);
},
delDepart(item,index){
this.$emit('delDepart',item,index);
},
//
addClass(item){
this.$emit('addClass',item);
},
editDepartment(item){
this.$emit('editDepartment',item);
},
delDepartment(item,index){
this.$emit('delDepartment',item,index);
},
//
isHasObj(arr, val) {
var flag = 0; //1 0
for (var i = 0; i < arr.length; i++) {
if (JSON.stringify(arr[i]).indexOf(JSON.stringify(val)) != -1) {
flag = 1;
}
}
if (flag == 1) {
return true;
} else {
return false;
}
}
}
};
</script>
<style lang="scss" scoped>
$insideColor: rgba(245, 242, 255, 0.8); //
$outColor: rgba(255, 255, 255, 0.8); //
//,item
@mixin public {
cursor: pointer;
font-size: 18px;
color: #333333;
display: flex;
align-items: center;
img {
height: 30px;
width: 30px;
margin-left: 10px;
}
}
.main {
width: 100%;
}
.item {
@include public;
width: 100%;
padding: 15px 0;
background:rgba(255,255,255,1);
box-shadow:1px 14px 29px 0px rgba(138,97,250,0.19);
border-radius:10px;
text-align: left;
margin-top: 20px;
}
.item:first{
margin-top: 0;
}
.item2 {
@include public;
margin-top: 20px;
margin-left:60px
}
.item2:hover{
color: #328aff;
}
//ul,li
ul,
li {
padding: 0;
margin: 0;
list-style: none;
}
// 使
.arrowTransform {
transition: 0.4s;
transform-origin: center;
transform: rotateZ(0deg);
}
.arrowTransformReturn {
transition: 0.4s;
transform-origin: center;
transform: rotateZ(90deg);
}
//
.checkBox {
width: 14px;
height: 14px;
border-radius: 7px;
margin-left: 10px;
margin-right: 10px;
border: 2px solid rgba(146, 120, 255, 1);
}
//
.isActive {
background: url('../../assets/img/icon-yigouxuan.png');
background-size: 14px 14px; /*按比例缩放*/
}
.side_view{
// height: 800px;
padding: 40px 20px;
background-color: #fff;
box-shadow:-2px 0px 57px 0px rgba(192,189,216,0.39);
i {
color: #328aff;
}
}
.side_icon{
text-align: right;
}
.side_icon i{
cursor:pointer;
font-size: 30px;
}
.side_tree{
width: 100%;
font-size: 18px;
color: #333;
i{
margin-left: 10px;
}
span{
margin-left: 5px;
}
}
</style>

@ -1,15 +0,0 @@
<template>
<div>
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -1,13 +0,0 @@
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>

@ -1,212 +0,0 @@
<template>
<div>
<div class="main" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)">
<div>
<img
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
src="../../assets/img/3.png"
alt
/>
</div>
{{item.label}}
</div>
<div v-show="item.ifVisible" v-if="item.children&&item.children.length!=0">
<div v-for="(item1,index1) in item.children" :key="index1">
<div class="item1" @click.stop="open(item1)">
<div style="margin-left:40px">
<img
:class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}"
src="../../assets/img/3.png"
alt
/>
</div>
{{item1.label}}
</div>
<div v-show="item1.ifVisible" v-if="item1.children&&item1.children.length!=0">
<div v-for="(item2,index2) in item1.children" :key="index2">
<div class="item2" @click.stop="open(item2)">
<div style="margin-left:60px">
<img
:class="{ 'arrowTransform': !item2.ifVisible, 'arrowTransformReturn': item2.ifVisible}"
src="../../assets/img/3.png"
alt
/>
</div>
{{item2.label}}
</div>
<div
v-show="item2.ifVisible"
v-if="item2.children&&item2.children.length!=0"
>
<div
class="item4"
@click.stop="choose(item3)"
v-for="(item3,index3) in item2.children"
:key="index3"
>
<span :class="{checkBox:true,isActive:item3.ifVisible}"></span>
{{item3.label}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
Array.prototype.removeByValue = function (val) {
for (var i = 0; i < this.length; i++) {
if (JSON.stringify(this[i]).indexOf(JSON.stringify(val)) != -1) {
this.splice(i, 1);
break;
}
}
};
export default {
data() {
return {
chooseList: []
};
},
watch: {
chooseList(n, o) {
this.$emit('chooseNode', n);
}
},
props: {
data: {
type: Array
}
},
methods: {
//
open(item) {
item.ifVisible = !item.ifVisible;
},
//removeByvaluemain.js
choose(item) {
item.ifVisible = !item.ifVisible;
if (item.ifVisible) {
this.chooseList.push(item);
} else {
this.chooseList.removeByValue(item);
}
},
//
isHasObj(arr, val) {
var flag = 0; //1 0
for (var i = 0; i < arr.length; i++) {
if (JSON.stringify(arr[i]).indexOf(JSON.stringify(val)) != -1) {
flag = 1;
}
}
if (flag == 1) {
return true;
} else {
return false;
}
}
}
};
</script>
<style lang="scss" scoped>
$insideColor: rgba(245, 242, 255, 0.8); //
$outColor: rgba(255, 255, 255, 0.8); //
//,item
@mixin public {
height: 50px;
line-height: 50px;
cursor: pointer;
font-size: 18px;
color: #333333;
display: flex;
div {
margin: 0 10px;
position: relative;
top: 50%;
transform: translateY(-50%);
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
width: 30px;
height: 30px;
background: rgba(146, 120, 255, 1);
img {
height: 12px;
width: 8px;
}
}
}
.main {
width: 100%;
}
.item {
@include public;
border-bottom: 1px solid $outColor;
background: rgba(245, 242, 255, 1);
}
.item1 {
@include public;
border-bottom: 1px solid $insideColor;
background: rgba(255, 255, 255, 1);
}
.item2 {
@include public;
border-bottom: 1px solid $insideColor;
background: rgba(255, 255, 255, 1);
}
.item4 {
@include public;
align-items: center;
border-bottom: 1px solid $insideColor;
padding-left: 80px;
background: rgba(255, 255, 255, 1);
}
//ul,li
ul,
li {
padding: 0;
margin: 0;
list-style: none;
}
// 使
.arrowTransform {
transition: 0.2s;
transform-origin: center;
transform: rotateZ(0deg);
}
.arrowTransformReturn {
transition: 0.2s;
transform-origin: center;
transform: rotateZ(90deg);
}
//
.checkBox {
width: 14px;
height: 14px;
border-radius: 7px;
margin-left: 10px;
margin-right: 10px;
border: 2px solid rgba(146, 120, 255, 1);
}
//
.isActive {
background: url('../../assets/img/get.png');
background-size: 14px 14px; /*按比例缩放*/
}
</style>

@ -1,826 +0,0 @@
<template>
<div>
<el-row :gutter="20" style="margin:0px">
<el-col :span="24" style="margin:0px">
<span class="mg20">创建考核</span>
<el-card shadow="hover" class="mgr20 mgb20">
<!-- 创建考核的名称 -->
<div>
<p class="mgb20">考核名称</p>
<el-input
placeholder="请输入考核名称"
v-model="assesmentName"
clearable
class="assName_input"
></el-input>
</div>
</el-card>
<!-- 选择考核发布方式 -->
<el-card shadow="hover" class="mgb20">
<div>
<p class="mgb20">发布方式</p>
<el-radio v-model="releaseType" label="0" class="fons">手动发布</el-radio>
<el-radio v-model="releaseType" label="1" class="fons">定时发布</el-radio>
</div>
</el-card>
<!-- 根据考核发布方式判断考核时间的显示 -->
<el-card shadow="hover" class="mgb20">
<div>
<p class="mgb20">考核时间</p>
<!-- 定时发布显示 -->
<div v-if="releaseType==1" class="addAssess">
<!-- <span class="mgr10">开始时间:</span> -->
<!-- <el-date-picker
value-format="timestamp"
v-model="date"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker> -->
<el-row :gutter="20">
<el-form label-width="80px">
<el-form-item label="开始时间:">
<el-col :span="4">
<el-date-picker type="date" placeholder="开始日期" v-model="creationTime1" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker>
</el-col>
<el-col class="line" :span="0.1"></el-col>
<el-col :span="4">
<el-date-picker type="date" placeholder="结束日期" v-model="endTime1" style="width: 100%;" value-format="yyyy-MM-dd"></el-date-picker>
</el-col>
</el-form-item>
</el-form>
</el-row>
</div>
<!-- 手动发布显示 -->
<div v-if="releaseType==0">
考核时长
<el-input size="small" v-model="input1" placeholder class="dateinput"></el-input>
<el-input size="small" v-model="input2" placeholder class="dateinput"></el-input> 小时
<el-input size="small" v-model="input3" placeholder class="dateinput"></el-input>
</div>
</div>
</el-card>
<!-- 实训项目模块 -->
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<span>实训项目</span>
<el-button type="primary" size="small" round @click="Tocustom">自定义实验项目</el-button>
</div>
<!-- 实训项目表格 -->
<el-table :data="customerData" class="table" stripe header-align="center">
<!-- 单选实训项目ID -->
<el-table-column prop="experimentName" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="experimentId" :label="scope.row.projectId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="projectPermissions" label="项目权限" align="center"></el-table-column>
<el-table-column prop="founder" label="创建人" align="center"></el-table-column>
<el-table-column prop="creationTime" label="创建时间" align="center"></el-table-column>
<!-- <el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="getIntoProject(scope.row)">查看</el-button>
</template>
</el-table-column> -->
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="pages"
></el-pagination>
</div>
</el-card>
<!-- 选择学生 -->
<el-card shadow="hover" class="mgb20 classcard">
<div>
<p class="mgb20">班级名称</p>
<div class="btninput">
<el-radio-group v-model="radio" style="margin-top:20px;" @change="titleRadio">
<el-radio :label="3">实验班级</el-radio>
<el-radio :label="6">行政班级</el-radio>
<!-- <el-radio :label="9">导入补考名单</el-radio> -->
</el-radio-group>
<!-- <div style="display:inline-block;margin-left:20px;" v-if="radio==9">
<el-button
type="primary"
size="medium"
style="height:40px;margin-right:10px;"
@click="downLoadEx"
>实验班级模板下载</el-button>
<el-button
type="primary"
size="medium"
style="height:40px;margin-right:10px;"
@click="downLoad"
>行政班级模板下载</el-button>
<div class="makeupList">
<el-upload
class="upload-demo"
:action="this.api.importMakeuplist"
accept=".xls, .xlsx"
multiple
:data="{staffId:this.staffId}"
:limit="1"
:file-list="fileList"
show-file-list="false"
name="file"
:on-success="uploadsuccess"
>
<el-button size="medium" type="primary" style="height:40px;margin-left:10px;">点击上传</el-button>
</el-upload>
</div>
</div> -->
<div class="mgb20-input1" style="display:inline-block">
<el-input
placeholder="请输入班级名称"
v-model="assName"
prefix-icon="el-icon-search"
clearable
class="assName_input"
></el-input>
</div>
</div>
</div>
<div class="mgb20-container">
<div v-if="radio==3" class="mgb20-container1">
<!-- <div style="height:25px;margin-top:-20px">
<transition-group name="fade">
<div
class="classspan"
v-for="(item,i) in classdata"
:key="item.classId"
>
{{item.className}}
<span
style="float:right;margin-right:5px;margin-top:2px;cursor:pointer"
@click="delcheck(i)"
>X</span>
</div>
</transition-group>
</div> -->
<extree :data="experimentList" @chooseNode="getExnode"></extree>
</div>
<div v-if="radio==6">
<lctree :data="administrationList" @chooseNode="getnode"></lctree>
</div>
<!-- <div v-if="radio==9">
<el-table
:data="makeupstudentsdata.slice((currPage-1)*pageSize,currPage*pageSize)"
show-header="true"
>
<el-table-column prop="className" label="专业"></el-table-column>
<el-table-column prop="gradeName" label="年级"></el-table-column>
<el-table-column prop="professionalName" label="班级"></el-table-column>
<el-table-column prop="studentName" label="学号"></el-table-column>
<el-table-column prop="studentNumber" label="姓名"></el-table-column>
</el-table>
<el-pagination
style="margin-left:1100px;"
layout="prev, pager, next"
:total="makeupstudentsdata.length"
@current-change="handleCurrentChange"
:page-size="pageSize"
></el-pagination>
</div> -->
</div>
</el-card>
<!-- 创建取消按钮 -->
<div class="foot_btn">
<el-button type="primary" size="small" round class="mag" @click="upload">创建</el-button>
<el-button type="primary" size="small" round @click="cancel">取消</el-button>
</div>
</el-col>
<!-- 系统列表 -->
<el-dialog :visible.sync="curVisible" width="20%" center :close-on-click-modal="false">
<el-select v-model="systemId" clearable placeholder="请选择系统名称" @change="chooseSystem">
<el-option v-for="(item,index) in permissionData" :key="index" :label="item.systemName" :value="item.systemId"></el-option>
</el-select>
<span slot="footer">
<el-button @click="curVisible = false"> </el-button>
<el-button type="primary" @click="toSystem()"> </el-button>
</span>
</el-dialog>
</el-row>
</div>
</template>
<script>
import lctree from '../common/tree';
import extree from '../common/EXtree';
export default {
data() {
return {
input1: '', //w
input2: '', //
input3: '', //
date: '', //
experimentId: 1, //id
assesmentName: '', //
releaseType: '0', //
creationTime: '', //
endTime: '', //
pageSize: 5,
currPage: 1,
radiopt: '',
value1: '',
customerData: [],
makeupstudentsdata: '',
pages: 10,
assName: '',
radio: 3,
experimentList: [],
administrationList: [],
defaultProps: {
children: 'children',
label: 'label'
},
classdata: [],
studentdata: [],
chooseList: [],
chooseExList: [],
fileList: [],
experimentalClassId: '',
classId: '',
courseId: this.$store.state.courseId,
assesmentId: this.$store.state.assesmentId,
endTime1: '',
creationTime1: '',
schoolId: this.$store.state.schoolId,
staffId: this.$store.state.staffId,
start: '',
end: '',
curVisible: false,
permissionData: [],
systemId: '',
systemName: ''
};
},
components: {
lctree,
extree
},
mounted() {
this.getData();
if(this.assesmentId){
this.getDetail()
}else{
this.getExTreeData();
}
},
methods: {
async getDetail(){
let res = await this.$get(this.api.queryGetById, { id: this.assesmentId })
this.assesmentName = res.message.assesment.assesmentName,
this.releaseType = res.message.assesment.releaseType.toString(),
this.experimentId = res.message.assesment.experimentId,
this.classId = res.message.assesment.classId
this.creationTime1 = res.message.assesment.creationTime
this.endTime1 = res.message.assesment.endTime
// let arr = []
// arr.push(res.message.assesment.creationTime,res.message.assesment.endTime)
// this.date = arr
let tr = res.message.assesment.timesum.match(/(\S*)h/)[1];
let str = res.message.assesment.timesum.match(/h(\S*)m/)[1];
let timesum1 = tr * 60 * 60 * 1000 + str * 60 * 1000;
                let time = (timesum1) / 1000; // 
                let day = parseInt(time / (60 * 60 * 24));
                let hou = parseInt((time % (60 * 60 * 24)) / 3600);
                let min = parseInt(((time % (60 * 60 * 24)) % 3600) / 60);
                let sec = parseInt(((time % (60 * 60 * 24)) % 3600) % 60);
this.input1 = day
this.input2 = hou
this.input3 = min
//
if(res.message.assesment.experimentalClassId){
this.radio = 3
this.chooseExList = res.message.students
this.$get(this.api.getExperimentalClass, { schoolId: this.schoolId, staffId: this.staffId })
.then(res => {
res.message.map(e => {
this.$get(this.api.getCreationTime, {
creationTime: e.creationTime,
staffId: this.staffId,
schoolId: this.schoolId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.experimentalClassName), (e.children = e.students);
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.studentName);
});
});
});
(e.ifVisible = false), (e.label = e.creationTime);
});
setTimeout(() => {
this.experimentList = res.message;
this.experimentList.map(e =>{
e.children.map(s =>{
s.children.map(c =>{
this.chooseExList.map(i =>{
if(c.studentId == i.studentId){
c.ifVisible = true
}
})
})
})
})
}, 500);
})
.catch(err => {
});
}else{
//
this.radio = 6
this.chooseList = res.message.students
// this.getTreeData()
this.$get(this.api.queryStuProfessionalArchitecture, { schoolId: this.schoolId })
.then(res => {
res.message.forEach(e => {
this.$get(this.api.queryStuGrade, {
stuProfessionalArchitectureId: e.stuProfessionalArchitectureId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.gradeName);
this.$get(this.api.queryStuClass, {
gradeId: e.gradeId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.className);
this.$get(this.api.queryStudent, {
classId: e.classId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.studentName);
});
});
});
});
});
});
(e.ifVisible = false), (e.label = e.stuProfessionalArchitectureName);
});
setTimeout(() => {
this.administrationList = res.message;
this.administrationList.map(e =>{
e.children.map(r =>{
r.children.map(c =>{
c.children.map(s =>{
this.chooseList.map(i =>{
if(s.studentId == i.studentId){
s.ifVisible = true
}
})
})
})
})
})
}, 500);
})
.catch(err => {
});
}
},
titleRadio(val){
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
switch (val) {
case 3:
setTimeout(() => {
loading.close();
this.getExTreeData()
}, 500);
break;
case 6:
setTimeout(() => {
loading.close();
this.getTreeData()
}, 500);
break;
case 9:
setTimeout(() => {
loading.close();
}, 500);
break;
}
},
cancel() {
this.$router.push({ path: '/teacherhome', query: { active: true }})
},
upload() {
let result = this.chooseExList.map(e => e.studentId)
let result1 = this.chooseList.map(e => e.studentId)
let resultStr = result.join()
let resultStr1 = result1.join()
this.$get(this.api.queryStudentisAssess, {
studentIds: this.radio == 3 ? resultStr : resultStr1
}).then(res => {
if(res.message.length != 0){
let studentStr = res.message.map(e => e.studentName)
this.$message.warning(`${studentStr}正在进行其他考核,无法进行再次添加!`)
}else{
let timesum1 = '';
if (this.releaseType == 0) {
this.creationTime1 = '';
this.endTime1 = '';
timesum1 = this.input1 * 24 * 60 * 60 * 1000 + this.input2 * 60 * 60 * 1000 + this.input3 * 60 * 1000;
} else {
this.start = new Date(this.creationTime1).getTime();
this.end = new Date(this.endTime1).getTime();
timesum1 = '';
}
if(this.radio == 3){
this.classId = '',
this.chooseList = []
if(this.chooseExList.length == 0){
this.$message.error('请选择实验班级学生');
}
}
if(this.radio == 6){
this.experimentalClassId = '',
this.chooseExList = []
if(this.chooseList.length == 0){
this.$message.error('请选择行政班级学生');
}
}
let data = {
assesment:{
id: this.assesmentId,
assesmentName: this.assesmentName,
releaseType: this.releaseType,
creationTime: this.start,
endTime: this.end,
timesum: timesum1,
experimentId: this.experimentId,
experimentalClassId: this.experimentalClassId,
classId: this.classId,
staffId: this.staffId,
courseId: this.courseId,
},
studentIds: this.radio == 3 ? result : result1
}
if(this.assesmentId){
this.$post(this.api.updateAssesment, data).then(res => {
this.$message.success('修改成功');
this.$router.push({ path: '/teacherhome', query: { active: true }})
})
.catch(err => {
});
}else{
this.$post(this.api.addAssesment, data).then(res => {
this.$message.success('创建成功');
this.$router.push({ path: '/teacherhome', query: { active: true }})
})
.catch(err => {
});
}
}
})
.catch(err => {
});
},
// delcheck(i) {
// this.$refs.tree_right.setChecked(this.classdata[i].label, false, true);
// },
// getClassData() {
// let x = this.$refs.tree_right.getCheckedNodes(false, true);
// let y = x.filter(e => {
// return e.classId;
// });
// let studentdata = x.filter(e => {
// return e.studentId;
// });
// let classData = x.filter(e => {
// return e.classId;
// });
// this.studentdata = studentdata;
// this.classdata = y;
// },
getData() {
this.$get(this.api.queryAllExperiment, { courseId: this.courseId })
.then(res => {
res.message.forEach(e => {
e.founder = this.core.orderfounder(e.founder);
e.projectPermissions = this.core.projectPermissions(e.projectPermissions);
});
this.customerData = res.message;
})
.catch(err => {
});
},
uploadsuccess(response, file) {
this.getClassName()
this.$message.success('上传成功');
},
getClassName(){
this.$get(this.api.queryGetByClassName, {
staffId: this.staffId,
className: ''
}).then(res => {
this.makeupstudentsdata = res.message;
});
},
handleCurrentChange(val) {
this.currPage = val;
},
async getTreeData() {
let res = await this.$get(this.api.queryStuProfessionalArchitecture, { schoolId: this.schoolId })
res.message.forEach(e => {
this.$get(this.api.queryStuGrade, {
stuProfessionalArchitectureId: e.stuProfessionalArchitectureId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.gradeName);
this.$get(this.api.queryStuClass, {
gradeId: e.gradeId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.className);
this.$get(this.api.queryStudent, {
classId: e.classId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.studentName);
});
});
});
});
});
});
(e.ifVisible = false), (e.label = e.stuProfessionalArchitectureName);
});
setTimeout(() => {
this.administrationList = res.message;
}, 500);
},
getnode(item) {
this.chooseList = item;
let arr = []
this.administrationList.map(e =>{
e.children.map(r =>{
r.children.map(c =>{
c.children.map(s =>{
item.map(i =>{
if(s.studentId == i.studentId){
arr = arr.concat(c.classId)
const set = new Set(arr);
let set1 = [...set].join()
this.classId = set1
}
})
})
})
})
})
},
getExTreeData() {
this.$get(this.api.getExperimentalClass, { schoolId: this.schoolId, staffId: this.staffId })
.then(res => {
res.message.map(e => {
this.$get(this.api.getCreationTime, {
creationTime: e.creationTime,
staffId: this.staffId,
schoolId: this.schoolId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.experimentalClassName), (e.children = e.students);
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.studentName);
});
});
});
(e.ifVisible = false), (e.label = e.creationTime);
});
setTimeout(() => {
this.experimentList = res.message;
}, 500);
})
.catch(err => {
});
},
getExnode(item) {
this.chooseExList = item;
let arr = []
this.experimentList.map(e =>{
e.children.map(s =>{
s.children.map(c =>{
item.map(i =>{
if(c.studentId == i.studentId){
arr = arr.concat(s.experimentalClassId)
const set = new Set(arr);
let set1 = [...set].join()
this.experimentalClassId = set1
}
})
})
})
})
},
downLoad(){
window.open(`${this.api.excelExport}?fileName=行政班级模板下载&titles=行政班级名称、学生学号、学生姓名`)
},
downLoadEx(){
window.open(`${this.api.excelExport}?fileName=实验班级模板下载&titles=实验班级名称、学生学号、学生姓名`)
},
async Tocustom(){
this.curVisible = true
let res = await this.$get(this.api.getByCourseId, { courseId: this.courseId })
this.permissionData = res.message
},
chooseSystem(val){
let obj = {};
obj = this.permissionData.find((item)=>{
return item.systemId === val;
});
this.systemName = obj.systemName;
},
toSystem(){
if(this.systemId){
this.setCookie("userId",this.$store.state.userId)
this.setCookie("systemId",this.systemId)
this.setCookie("systemName",this.systemName)
window.location.href = "http://www.liuwanr.cn:8080/Projectmanagement/";
}else{
this.$message.warning('请先选择系统');
}
},
setCookie(name, value) {
      if (value) {
        var days = 1; //
        var exp = new Date();
        exp.setTime(exp.getTime() + days * 24 * 60 * 60 * 1000);
        // Cookie, toGMTString
        document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString+";path=/;";
      }
    }
},
};
</script>
<style scope>
.makeupList /deep/.el-upload-list__item {
display: none;
}
.dateinput {
width: 100px;
display: inline-block;
}
.mgb20-container {
width: 98%;
}
.makeupList {
display: flex;
}
.makeupList /deep/.el-upload--text {
width: 100px;
display: inline-block;
height: 38px;
display: flex;
border: none;
}
.makeupList /deep/.el-upload-list {
}
.makeupList /deep/.el-icon-upload-success {
}
.mgb20-container1 /deep/ .el-checkbox__inner {
border-radius: 50%;
}
.mgb20-container1 /deep/ .el-tree .el-icon-caret-right {
background: #328aff;
border-radius: 50%;
color: #fff;
margin-right: 5px;
}
.mgb20-container1 /deep/.el-tree-node .is-leaf + .el-checkbox .el-checkbox__inner {
display: inline-block;
}
.mgb20-container1 /deep/.el-tree-node .el-checkbox__input > .el-checkbox__inner {
display: none;
}
.mgb20-container1 /deep/ .el-tree-node__label {
color: #333333;
font-size: 18px;
}
.mgb20-container1 /deep/.el-tree-node__content {
height: 30px;
}
.mgb20-container1 /deep/.is-leaf {
display: none;
}
.el-row {
margin-bottom: 20px;
padding: 20px 16px;
}
.mg20 {
margin-left: 20px;
margin-top: 20px;
}
/* .mgb20 {
position: relative;
} */
.mag {
margin-right: 20px;
}
.mgr10 {
margin-right: 10px;
}
.mgr20 {
margin-top: 10px;
}
.assName_input {
width: 300px;
}
.foot_btn {
text-align: right;
margin-top: 20px;
}
.mgb20-input1 {
margin-left: 800px;
display: inline-block;
position: absolute;
right: 0px;
}
/* .mgb200 {
background-color: #9076ff;
color: #fff;
} */
.makeupList {
display: inline-block;
}
.btninput {
position: relative;
margin-bottom: 30px;
}
.classcard {
overflow: hidden;
}
.classspan {
display: inline-block;
height: 25px;
width: 80px;
background-color: #9076ff;
border-radius: 10px;
text-align: center;
line-height: 25px;
color: #fff;
margin-right: 10px;
float: left;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
.addAssess /deep/ .row{
padding: 0;
margin-bottom: 0;
}
.addAssess .row /deep/ .el-form-item{
margin-bottom: 0;
}
</style>

@ -0,0 +1,311 @@
<template>
<div class="pd20">
<el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>筛选</span>
</div>
<div>
<el-form label-width="80px">
<el-form-item label="实验班级" class="userRadio">
<el-radio-group v-model="form.classId" @change="getData">
<el-radio label="" border>不限</el-radio>
<el-radio v-for="(item,index) in classList" :key="index" :label="item.classId" border>{{item.className}}</el-radio>
</el-radio-group>
</el-form-item>
<div class="flex-between no-mb">
<el-form-item label="考核状态">
<el-select v-model="form.status" clearable placeholder="请选择实验状态" @change="getData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入考核名称" prefix-icon="el-icon-search" v-model="keyword" clearable @keyup.enter.native="onSearch"></el-input>
</el-form-item>
</div>
</el-form>
</div>
</div>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>考核管理</span>
</div>
</div>
<el-table :data="customerData" class="table" stripe header-align="center" :row-key="getRowKeys">
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
{{scope.$index + (pageNo - 1) * pageSize + 1}}
</template>
</el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="className" label="考核班级" align="center">
</el-table-column>
<el-table-column prop="experimentalNumber" label="考核人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" label="考核时长" align="center">
</el-table-column>
<el-table-column prop="creationTime" label="创建时间" align="center">
</el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center">
</el-table-column>
<el-table-column prop="stopTime" label="结束时间" align="center">
</el-table-column>
<el-table-column label="倒计时" align="center">
<template slot-scope="scope">
<span v-if="scope.row.surplusTime == '838:00:00'">>30</span>
<span v-else-if="scope.row.status == 2" v-countdown="scope.row.surplusTime">{{scope.row.surplusTime}}</span>
<span v-else>00:00:00</span>
</template>
</el-table-column>
<el-table-column label="实验状态" align="center">
<template slot-scope="scope">
<span class="ellipsis">{{status[scope.row.status]}}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<!-- <el-button v-if="scope.row.status != 3" type="text" @click="entry(scope.row)" :disabled="scope.row.status != 2">进入</el-button>
<el-button v-else type="text" @click="show(scope.row)">查看成绩</el-button> -->
<el-button v-if="scope.row.status == 3 && !scope.row.reportId" type="text" disabled>未参加</el-button>
<el-button v-if="scope.row.status != 3 && !scope.row.reportId" type="text" @click="entry(scope.row)" :disabled="scope.row.status != 2">进入</el-button>
<el-button v-if="scope.row.status == 2 && scope.row.reportId" type="text" disabled>已提交</el-button>
<el-button v-if="scope.row.status == 3 && scope.row.reportId" type="text" @click="show(scope.row)">查看成绩</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo">
</el-pagination>
</div>
</el-card>
</el-col>
</el-row>
<el-dialog title="请输入邀请码" :visible.sync="icVisible" width="30%" @close="closeIc" center :close-on-click-modal="false">
<el-input v-model="invitationCode" placeholder="邀请码" maxlength="6"></el-input>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveIc"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'project',
data() {
return {
userId: this.$store.state.userId,
roleId: this.$store.state.accountRole,
name: sessionStorage.getItem('ms_username'),
status: ['','待开始','进行中','已完成'],
statusList: [{
name:'不限',
value: 0
},{
name:'待开始',
value: 1
},{
name:'进行中',
value: 2
},{
name:'已完成',
value: 3
}],
customerData: [],
date: [],
form: {
classId: '',
startTime: '',
endTime: '',
status: 0,
},
keyword: '',
classList: [],
pageNo: 1,
pageSize: 10,
totals: 0,
icVisible: false,
invitationCode: '',
searchTimer: null,
timerList: [],
curClassName: '',
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
},500)
}
},
mounted() {
this.getClass()
this.getData()
this.$once('hook:beforeDestroy', function () {
this.timerList.forEach((n,k) => {
clearInterval(n)
})
this.timerList = []
})
},
directives: {
countdown: {
bind: function(el,binding,vnode) {
let that = vnode.context
let time = binding.value
let timer = setInterval(() => {
let timeList = time.split(':')
let total = Number.parseInt(timeList[0] * 60 * 60) + Number.parseInt(timeList[1] * 60) + Number.parseInt(timeList[2])
if(total > 0){
--total
let hours = Math.floor(total / (60 * 60))
let minutes = Math.floor(total % (60 * 60) / 60)
let seconds = Math.floor(total % (60 * 60) % 60)
time = `${that.core.formateTime(hours)}:${that.core.formateTime(minutes)}:${that.core.formateTime(seconds)}`
}else{
clearInterval(timer)
}
el.innerHTML = time
},1000)
that.timerList.push(timer)
}
}
},
methods: {
getData() {
let data = {
classId: this.form.classId,
role: this.roleId,
type: '',
userId: this.userId,
startTime: this.form.startTime,
stopTime: this.form.endTime,
searchContent: this.core.encodeString(this.keyword),
status: this.form.status,
pageNum: this.pageNo,
pageSize: this.pageSize,
}
this.$post(this.api.stuAssessmentByScreen,data).then(res => {
this.customerData = res.list.list
this.totals = res.list.totalCount
// this.$get(this.api.fictitiousRecord, {
// userId: this.userId,
// page: 1,
// size: 1000,
// projectPermissions: 1,
// systemId: 3
// }).then(res => {
// let recordList = res.data.list
// list.map(n => {
// let same = recordList.find(e => e.experimentalName == n.experimentalName)
// if(same){
// n.reportId = same.reportId
// }
// })
// this.customerData = list
// }).catch(err => {})
}).catch(res => {});
},
getClass(){
this.$get(`${this.api.mineClass}?userId=${this.userId}`).then(res => {
this.classList = res.list
}).catch(res => {});
},
add(){
this.$store.commit("customerData", { customer_id : ''});
this.$router.push('/addclass');
},
edit(row){
this.$store.commit("customerData", { customer_id : row.customerId });
this.$router.push('/addcustomer');
},
getRowKeys(row) {
return row.customerId;
},
onSearch(){
this.pageNo = 1
this.getData()
},
handleCurrentChange(val) {
this.pageNo = val;
this.getData();
},
entry(row) {
if(row.status == 1){
return this.$message.warning('该实验尚未开始')
}else if(row.status == 3){
return this.$message.warning('该实验已经结束')
}else{
this.curClassName = row.experimentalClassName
this.rowId = row.id
this.projectId = row.projectId
if(row.isCode == 1){
this.core.toSubSystem(this.curClassName,this.rowId)
}else{
this.$get(this.api.checkInvitationCode,{
userId: this.userId,
id: row.id
}).then(res => {
if(res.errmessage == 'false'){
this.icVisible = true
}else{
this.core.toSubSystem(this.curClassName,this.rowId)
}
}).catch(res => {});
}
}
},
show(row) {
this.$router.push(`/showExperiment?id=${row.reportId}`)
},
saveIc() {
if(!this.invitationCode) return this.$message.warning('请输入邀请码')
if(!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return this.$message.warning('请输入6位纯数字邀请码')
let data = {
id: this.rowId,
userId: this.userId,
invitationCode: Number(this.invitationCode)
}
this.$post(this.api.joinPractice,data).then(res => {
if(res.errmessage == 'success') {
this.$message.success('验证成功!');
this.icVisible = false
setTimeout(() => {
this.core.toSubSystem(this.curClassName,this.rowId)
},1000)
}
}).catch(res => {});
},
closeIc() {
this.invitationCode = ''
},
goback() {
this.$router.back()
},
}
};
</script>
<style scoped>
.mag{
margin-right: 20px;
}
/deep/.el-tabs__nav-wrap::after{
display: none;
}
.no-mb /deep/.el-form-item{
margin-bottom: 0;
}
</style>

@ -1,537 +0,0 @@
<template>
<div>
<el-row :gutter="20" style="margin:0px">
<el-col :span="24">
<div class="flex-end check_title">
<div>
<p>考核成绩统计报告 - 量化投资实验班期末考试</p>
<p>
<span>任课老师远方</span>
<span class="assessment_date">考核时间2019-01-06 09:30:00至13:00:00</span>
</p>
</div>
<a
:href="`http://www.liuwanr.cn:8080/assesmentRecord/exportPractice?studentId=${studentId}`"
>
<el-button type="primary" size="small" round>下载报告</el-button>
</a>
</div>
<el-card shadow="hover" class="mgb20">
<div class="screen">
<p class="mgb20">班级筛选</p>
<div
@click="() => {this.ifscreen = 0}"
:class="{action:ifscreen == 0?true:false}"
>按实验班级</div>
<div
@click="() => {this.ifscreen = 1}"
:class="{action:ifscreen == 1?true:false}"
>按行政班级</div>
</div>
<div>
<div v-show="this.ifscreen == 0">
<!-- <el-button
@click="performanceOverview(experimentalClass.experimentalClassId,'')"
plain
>{{experimentalClass.experimentalClassName}}</el-button> -->
<el-button
@click="performanceOverview(item.experimentalClassId,'')"
plain
v-for="item in experimentalClass"
:key="item.classId"
>{{item.experimentalClassName}}</el-button>
</div>
<div v-show="this.ifscreen == 1">
<!-- <el-button @click="performanceOverview('',classList)" plain>全部</el-button> -->
<el-button
@click="performanceOverview('',item.classId)"
plain
v-for="item in className"
:key="item.classId"
>{{item.className}}</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgb20">
<p class="mgb20">成绩概览</p>
<div class="flexContent">
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>平均分</p>
<p class="Average">{{resultData.avg}}</p>
</div>
<img src="../../assets/img/17查看成绩1.png" alt />
</div>
</el-card>
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>中位数</p>
<p class="Average">{{resultData.median}}</p>
</div>
<img src="../../assets/img/17查看成绩2.png" alt />
</div>
</el-card>
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>最低分</p>
<p class="Average">{{resultData.min}}</p>
</div>
<img src="../../assets/img/17查看成绩3.png" alt />
</div>
</el-card>
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>最高分</p>
<p class="Average">{{resultData.max}}</p>
</div>
<img src="../../assets/img/17查看成绩4.png" alt />
</div>
</el-card>
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>考核人数</p>
<p class="Average">{{resultData.peopleSize}}</p>
</div>
<img src="../../assets/img/17查看成绩5.png" alt />
</div>
</el-card>
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>考核点数量</p>
<p class="Average">{{resultData.pointNumber}}</p>
</div>
<img src="../../assets/img/17查看成绩6.png" alt />
</div>
</el-card>
<el-card shadow="hover" class="mgb20 flexContentCard">
<div class="flex-end">
<div>
<p>错误率</p>
<p class="Average">{{resultData.error}}</p>
</div>
<img src="../../assets/img/17查看成绩7.png" alt />
</div>
</el-card>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" style="margin:0px">
<el-col :span="12">
<el-card shadow="hover" class="mgb20">
<div id="myChart" :style="{width: '100%', height: '370px'}"></div>
</el-card>
</el-col>
<el-col :span="12">
<el-card shadow="hover" class="mgb20">
<div id="myChart1" :style="{width: '100%', height: '370px'}"></div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" style="margin:0px">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<p class="mgb20">成绩明细</p>
<el-col
:span="4"
class="mgb20"
v-for="item in studentlist" :key="item.studen"
>
<el-card shadow="hover" class="mgb20" >
<div class="flex-between" >
<div class="student_icon">
<!-- <i class="el-icon-s-custom"></i> -->
<img src="../../assets/img/back.png" alt />
</div>
<div>
<p>{{item.studentName}}</p>
<p class="Average">{{item.score}}</p>
</div>
</div>
</el-card>
</el-col>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
studentId: this.$store.state.studentId,
ifscreen: 0,
median: '',
resultId: this.$store.state.resultId,
resultData: [],
detailedData: [
{
name: '平均分',
val: '92'
}
],
experimentalClass: '', //
className: [], //
classList: [], //id
studentlist:[]//
};
},
async mounted() {
//
await this.classInformation();
await this.performanceOverview(this.experimentalClass[0].experimentalClassId,'')
},
methods: {
//mounted
async classInformation() {
let classInformationawait = await this.$get('http://www.liuwanr.cn:8080/assesment/getByclass', {
assesmentId: this.$route.query.id
});
this.experimentalClass = classInformationawait.message.experimentalClass; //
this.className = classInformationawait.message.class; //
this.classList = classInformationawait.message.class
.map(ele => {
return ele.classId;
})
.join(); //id
},
async performanceOverview(exp,cla){
let performanceOverview = await this.$get('http://www.liuwanr.cn:8080/assesment/queryClassScore', {
assesmentId: this.$route.query.id,
experimentalClassId: exp,
classId: cla
}); //
performanceOverview.message.error += '%'; //
this.resultData = performanceOverview.message; //
let barChart = await this.$get('http://www.liuwanr.cn:8080/assesment/queryHistogram',{
assesmentId: this.$route.query.id,
experimentalClassId: exp,
classId: cla
}) //
barChart.message.reverse()
this.initBarEcharts(barChart.message)//
let LineEchart = await this.$get('http://www.liuwanr.cn:8080/assesment/getLinechart',{
assesmentId: this.$route.query.id,
experimentalClassId: exp,
classId: cla
}) //线
this.initLineEcharts(LineEchart.message)//线
let studentlist = await this.$get('http://www.liuwanr.cn:8080/assesment/queryAssesmentScore',{ //
assesmentId: this.$route.query.id,
experimentalClassId: exp,
classId: cla
})
this.studentlist = studentlist.message
},
initLineEcharts(val) {
//Echarts
let echarts = this.$echarts.init(document.getElementById('myChart1'));
let option = {
title: {
text: '错误分布',
left: '', //
textStyle: {
fontWeight: 'normal'
}
},
grid: {
left: '6%',
right: 25,
height: 250
},
xAxis: {
nameLocation:'end',//
axisLabel : {//
interval:0,
},
type: 'category',
data: val[0],
axisLine: {
show: false
},
axisTick: {
show: false
}
},
yAxis: {
axisLabel: {
fontSize: 16,
color: '#999999'
},
type: 'value',
splitLine: {
//线
lineStyle: {
type: 'solid', //线 dotted线 solid:线
color: 'rgba(220, 220, 220, 0.3)'
},
show: true //
},
axisLine: {
show: false
},
axisTick: {
show: false
}
},
series: [
{
data: val[1],
type: 'line',
symbol: 'circle', //
symbolSize: 8, //
showBackground: true,
backgroundStyle: {
color: 'rgba(220, 220, 220, 0)'
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#FFF6E8' // 0%
},
{
offset: 1,
color: '#FFFEFC' // 100%
}
],
global: false // false
}
},
color: 'rgba(255,206,55,1)',
barWidth: 20,
itemStyle: {
//
emphasis: {
barBorderRadius: 30
},
normal: {
//
barBorderRadius: [30, 30, 30, 30],
label: {
show: false, //
textStyle: {
fontWeight: 'bolder',
fontSize: '12',
fontFamily: '微软雅黑'
}
}
}
}
}
]
};
echarts.setOption(option);
},
initBarEcharts(val) {
//Echarts
let echarts = this.$echarts.init(document.getElementById('myChart'));
let option = {
title: {
text: '成绩分布',
left: '', //
textStyle: {
fontWeight: 'normal'
}
},
grid: {
left: '6%',
right: 25,
height: 250
},
xAxis: {
axisLabel: {
fontSize: 16,
color: '#999999',
margin: 15
},
type: 'category',
data: ['10', '20', '30', '40', '50', '60', '70', '80', '90', '100'],
axisLine: {
show: false
},
axisTick: {
show: false
}
},
yAxis: {
axisLabel: {
fontSize: 16,
color: '#999999'
},
type: 'value',
splitLine: {
//线
lineStyle: {
type: 'solid', //线 dotted线 solid:线
color: 'rgba(220, 220, 220, 0.3)'
},
show: true //
},
axisLine: {
show: false
},
axisTick: {
show: false
}
},
series: [
{
data: val,
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(220, 220, 220, 0)'
},
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 1,
color: 'rgba(146,120,255,1)' // 0%
},
{
offset: 0,
color: 'rgba(190,175,251,1)' // 100%
}
],
globalCoord: false // false
},
barWidth: 20,
itemStyle: {
//
emphasis: {
barBorderRadius: 30
},
normal: {
//
barBorderRadius: [30, 30, 30, 30],
label: {
show: false, //
textStyle: {
fontWeight: 'bolder',
fontSize: '12',
fontFamily: '微软雅黑'
}
}
}
}
}
]
};
echarts.setOption(option);
},
getdata() {
//
this.$get(this.api.queryAssesmentScore, {
id: this.$store.state.resultId,
experimentalClassId: 2
});
}
}
};
</script>
<style scoped lang="scss">
.screen {
display: flex;
div {
margin-left: 20px;
cursor: pointer;
height: 25px;
}
.action {
border-bottom: 4px solid #bbbbbb;
}
}
.flexContent {
display: flex;
justify-content: space-around;
}
.flexContentCard {
width: 13%;
img {
width: 52px;
height: 52px;
}
.Average {
font-size: 26px;
}
}
.el-row {
margin-bottom: 20px;
padding: 0 16px;
font-size: 18px;
color: #333;
}
.assessment_date {
margin-left: 100px;
}
.check_title {
padding: 20px 20px;
}
.Average {
margin-top: 40px;
font-size: 20px;
color: #328aff;
font-weight: bold;
}
.student_icon img {
width: 90px;
height: 90px;
border-radius: 50%;
}
</style>

@ -1,426 +0,0 @@
<template>
<div class="class_detail">
<el-row :gutter="10">
<el-col :span="24">
<el-card shadow="hover" class="editor-btn">
<div>
<div class="flex-center mgb20">
<p class="hr_tag"></p>
<span>班级详情</span>
</div>
<div>
<el-form label-width="80px">
<el-col :span="4" class="class_name">
<el-form-item>
<el-input
placeholder="请输入班级名称"
suffix-icon="el-icon-edit"
v-model="className"
@change="upClassName"
></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="专业">
<el-select
v-model="ClassSPId"
clearable
placeholder="请选择专业"
>
<el-option
v-for="(item,index) in classSPList"
:key="index"
:label="item.professionalName"
:value="item.professionalId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="行政班级">
<el-select
v-model="studentClassId"
clearable
placeholder="请选择行政班级"
>
<el-option
v-for="(item,index) in studentClassList"
:key="index"
:label="item.className"
:value="item.classId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-input
placeholder="请输入学生名称/学号"
prefix-icon="el-icon-search"
v-model="studentSearch"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="8" class="flex-end-content">
<el-button
@click="dialogVisible = true"
type="primary"
size="small"
round
class="mag"
>新增学生</el-button>
<el-dialog
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
>
<div class="hvCenter">
<span>请选择实验班的学生</span>
<div class="dialogTree">
<lctree :data="list" @chooseNode="getnode"></lctree>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="establish()">创建</el-button>
</span>
</el-dialog>
<el-button
type="primary"
size="small"
round
@click="batchDeletion"
>批量删除</el-button>
</el-col>
</el-form>
</div>
</div>
<el-table
:data="studentData"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="studentName" label="学生姓名" align="center"></el-table-column>
<el-table-column prop="studentNumber" label="学生学号" align="center"></el-table-column>
<el-table-column prop="professionalName" label="专业" align="center"></el-table-column>
<el-table-column prop="gradeName" label="年级" align="center"></el-table-column>
<el-table-column prop="className" label="行政班级" align="center"></el-table-column>
<el-table-column prop="attendance" label="考勤统计" align="center"></el-table-column>
<el-table-column label="查看" align="center" width="300">
<template slot-scope="scope">
<el-button
type="text"
@click="toAttendanceRecord(scope.row.studentId)"
>考勤记录</el-button>
<el-button type="text" @click="toPractice(scope.row.studentId)">练习成绩</el-button>
<el-button
type="text"
@click="toExamination(scope.row.studentId)"
>考核成绩</el-button>
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="delStudent(scope.row.studentId)">移除学生</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background layout="prev, pager, next" :total="pages"></el-pagination>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import lctree from '../common/tree';
export default {
data() {
return {
classSPList: [],
ClassSPId: '', //
studentClassList: [],
studentClassId: '', //
studentSearch: '',
studentData: [],
pages: 10,
multipleSelection: [],
classId: this.$store.state.classId,
className: this.$store.state.className,
selectionList: [],
dialogVisible: false,
list: [],
chooseList: [],
schoolId: this.$store.state.schoolId
};
},
components: {
lctree
},
mounted() {
this.getStudent();
// this.getClassSP();
// this.getStudentClass();
this.getProfessionals()//
this.getstudentClassList()//
this.getTreeData() //
},
methods: {
//
async getProfessionals() {
let professionalsData = await this.$get(this.api.getProfessionals, {
experimentalClassId: this.$route.query.experimentalClassId
});
this.classSPList = professionalsData.message
},
//
async getstudentClassList(){
let getStudentClassData = await this.$get(this.api.getStudentClass,{
experimentalClassId: this.$route.query.experimentalClassId
})
this.studentClassList = getStudentClassData.message
},
//
toPractice(id) {
//
this.$store.commit('userLoginData', { studentId: id });
this.$router.push('/practiceResults');
// this.$router.push({
// path: '/practiceResults',
// query: {
// studentId: id
// }
// });
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
},
toExamination(id) {
//
this.$store.commit('userLoginData', { studentId: id });
this.$router.push('/examinationResults');
// this.$router.push({
// path: '/examinationResults',
// query: {
// studentId: id
// }
// });
},
batchDeletion() {
// experimentalClassId
this.selectionList.forEach(ele => {
ele.experimentalClassId = this.$route.query.experimentalClassId;
});
this.$confirm('确定要移除该学生吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(this.api.experimentClassDeleteStudent, this.selectionList);
})
.then(res => {
this.$message.success('移除成功');
this.getStudent();
})
.catch(res => {});
},
//
// getClassSP() {
// let data = {
// experimentalClassId: this.classId
// };
// this.$get(this.api.queryExperimentalClassSP, data)
// .then(res => {
// this.classSPList = res.message;
// })
// .catch(res => {});
// },
//
// getStudentClass() {
// let data = {
// experimentalClassId: this.classId
// };
// this.$get(this.api.queryStudentClass, data)
// .then(res => {
// this.studentClassList = res.message;
// })
// .catch(res => {});
// },
//
getStudent() {
let data = {
experimentalClassId: this.$route.query.experimentalClassId,
professionalId: this.ClassSPId,
classId: this.studentClassId,
studentNameNumber: this.studentSearch,
courseId: this.$store.state.courseId
};
this.$get(this.api.queryClassDetails, data)
.then(res => {
this.studentData = res.message;
})
.catch(res => {});
},
upClassName() {
this.$confirm('确定要修改班级名称吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = {
experimentalClassId: this.classId,
experimentalClassName: this.className
};
this.$post(this.api.updateClassName, data)
.then(res => {
this.$message.success('修改成功');
})
.catch(res => {});
})
.catch(() => {});
},
handleSelectionChange(val) {
this.selectionList = []; //
val.forEach(element => {
this.selectionList.push({ studentId: element.studentId });
}); //
},
//
delStudent(id) {
this.$confirm('确定要移除该学生吗?', '提示', {
type: 'warning'
})
.then(() => {
let arr = [{ studentId: id, experimentalClassId: parseInt(this.$route.query.experimentalClassId) }];
this.$post(this.api.experimentClassDeleteStudent, arr)
.then(res => {
this.$message.success('移除成功');
this.getStudent(); //
})
.catch(res => {});
})
.catch(() => {});
},
toAttendanceRecord(id) {
this.$router.push({
path: '/CheckWorkAttendance',
query: {
studentId: id
}
});
},
getTreeData() {
this.$get(this.api.queryStuProfessionalArchitecture, { schoolId: this.schoolId })
.then(res => {
res.message.forEach(e => {
this.$get(this.api.queryStuGrade, {
stuProfessionalArchitectureId: e.stuProfessionalArchitectureId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.gradeName);
this.$get(this.api.queryStuClass, {
gradeId: e.gradeId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.label = e.className);
this.$get(this.api.queryStudent, {
classId: e.classId
}).then(res => {
e.children = res.message;
e.children.forEach(e => {
(e.ifVisible = false), (e.experimentalClassId = this.$route.query.experimentalClassId), (e.label = e.studentName);
});
});
});
});
});
});
(e.ifVisible = false), (e.label = e.stuProfessionalArchitectureName);
});
setTimeout(() => {
this.list = res.message;
}, 1000);
})
.catch(err => {
console.log(err);
});
},
getnode(item) {
this.chooseList = item;
},
//
async establish() {
if (this.chooseList.length == 0) {
this.$message('请选择学生');
return;
}
// let arr = this.chooseList
// let result = arr.map(e => e.studentId).join()
// console.log(result)
let data = this.chooseList
await this.$post(this.api.experimentClassAddStudent, data);
this.dialogVisible = false;
await this.getStudent();
},
}
};
</script>
<style lang="scss" scoped>
.mag {
margin-right: 20px;
}
.dialogTree {
margin-top: 20px;
width: 90%;
height: 500px;
overflow-y: scroll;
}
.dialog-footer {
display: flex;
justify-content: center;
.el-button {
width: 44%;
font-size: 20px;
}
.el-button:first-child {
color: #328aff;
border: 1px solid #328aff;
}
}
     .dialogTree::-webkit-scrollbar {
width: 2px;
}
        .dialogTree::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #328aff;
}
        .dialogTree::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 0;
background: rgba(0, 0, 0, 0.1);
}
</style>

@ -11,17 +11,21 @@
<el-tab-pane label="练习模式" name="second">
</el-tab-pane>
<el-tab-pane label="考核模式" name="third">
<el-tab-pane label="竞赛列表" name="third">
</el-tab-pane>
<el-tab-pane label="实验记录" name="fourth">
<el-tab-pane label="考核列表" name="fourth" v-if="shwoAss">
</el-tab-pane>
<el-tab-pane label="实验记录" name="fifth">
</el-tab-pane>
</el-tabs>
<Index v-if="activeName=='index'"></Index>
<TeachingVideo v-if="!showProject && activeName!='fourth' && activeName!='index'"></TeachingVideo>
<TeachingVideo v-if="!showProject && activeName!='fourth' && activeName!='fifth' && activeName!='index'"></TeachingVideo>
<Project v-if="showProject"></Project>
<Record v-if="activeName=='fourth'"></Record>
<Assessment v-if="activeName=='fourth'"></Assessment>
<Record v-if="activeName=='fifth'"></Record>
</div>
<!-- 答题弹框 -->
@ -103,6 +107,7 @@ import Index from './Index';
import TeachingVideo from './TeachingVideo';
import Project from './Project';
import Record from './Record';
import Assessment from './Assessment';
import bus from '../common/bus';
export default {
name: 'dashboard',
@ -111,7 +116,7 @@ export default {
name: sessionStorage.getItem('ms_username'),
activeName: 'index',
routeName: '#/dashboard',
tabNameList: ['index','first','second','third','fourth'],
tabNameList: ['index','first','second','third','fourth','fifth'],
userId: this.$store.state.userId,
evaluationVisible: false,
resultVisible: false,
@ -131,7 +136,8 @@ export default {
history: [],
btnType: 1,
showProject: false,
lastClick: ''
lastClick: '',
shwoAss: true
};
},
watch: {
@ -145,6 +151,7 @@ export default {
}
},
mounted() {
this.getClass()
this.addDefault()
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
@ -158,9 +165,18 @@ export default {
Index,
TeachingVideo,
Project,
Record
Record,
Assessment
},
methods: {
getClass(){
this.$get(`${this.api.mineClass}?userId=${this.userId}`).then(res => {
if(!res.list.length){
this.shwoAss = false
this.tabNameList.splice(4,1)
}
}).catch(res => {});
},
tabChange(tab,isIndex){
let index = tab.index
if(index == 2){

@ -1,298 +0,0 @@
<template>
<div class="horizontalVerticalCenter">
<div class="headerContent">
<Headportrait></Headportrait>
<p class="p">{{personalScore.studentName}}</p>
</div>
<!-- 练习概览 -->
<div class="practice">
<p style="padding:28px 0;margin-left:28px">考核概览</p>
<div class="practiceRecord">
<div
:class="{practiceRecordCon:true,active:this.active==1}"
@click="changeActive(1)"
>
<i class="iconfont">&#xe663;</i>
<p class="big-p">个人</p>
<div class="practiceRecord-p">
<div class="div">
<div>
<p style="font-size:20px">考核最高得分</p>
<p class="fontcolor">{{personalScore.heightscore}}</p>
</div>
<div>
<p style="font-size:20px;color:#333333">考核平均得分</p>
<p class="fontcolor">{{personalScore.avgscore}}</p>
</div>
</div>
</div>
</div>
<div
:class="{practiceRecordCon:true,active:this.active==2}"
@click="changeActive(2)"
>
<i class="iconfont">&#xe65f;</i>
<p class="big-p">全校</p>
<div class="practiceRecord-center">
<div>
<p style="font-size:20px;color:#333333">全校最高平均考核得分</p>
<p class="fontcolor">{{personalScore.schoolheightscore}}</p>
</div>
</div>
</div>
<div
:class="{practiceRecordCon:true,active:this.active==3}"
@click="changeActive(3)"
>
<i class="iconfont">&#xe798;</i>
<p class="big-p">全国</p>
<div class="practiceRecord-p">
<div class="div">
<div>
<p style="font-size:20px;color:#333333">平均考核得分</p>
<p class="fontcolor">{{personalScore.countryavgscore}}</p>
</div>
<div>
<p style="font-size:20px;color:#333333">最高平均考核得分</p>
<p class="fontcolor">{{personalScore.countryheightscore}}</p>
</div>
</div>
</div>
</div>
<!-- <div class="AssesmentRecord" style="background:#CDDCF1;">
<p style="color:#FF6161;font-size:30px">{{personalScore.studentName}}</p>
<p>姓名</p>
</div>
<div class="AssesmentRecord" style="background:#F7EFEF;">
<p style="color:#FF6161;font-size:30px">{{personalScore.heightscore}}</p>
<p>个人考核最高得分</p>
</div>
<div class="AssesmentRecord" style="background:#F7EFEF;">
<p style="color:#FF6161;font-size:30px">{{personalScore.avgscore}}</p>
<p>个人考核平均得分</p>
</div>
<div class="AssesmentRecord" style="background:#FF8061;">
<p style="color:#FFF;font-size:30px">{{personalScore.schoolheightscore}}</p>
<p>全校最高平均考核得分</p>
</div>
<div class="AssesmentRecord" style="background:#FF6161;">
<p style="color:#FFF;font-size:30px">{{personalScore.countryavgscore}}</p>
<p>全国平均考核得分</p>
</div>
<div class="AssesmentRecord" style="background:#FF6161;">
<p style="color:#FFF;font-size:30px">{{personalScore.countryheightscore}}</p>
<p>全国最高平均考核得分</p>
</div>-->
</div>
</div>
<!-- 成绩明细组件 -->
<Achievement
:student="studentId"
projectPermissions="1"
:AssesmentRecord="this.api.queryAssesmentRecord"
style="margin-top:20px;margin-bottom:50px"
></Achievement>
</div>
</template>
<script>
import Headportrait from '../common/Studentcommon/Headportrait';
import Achievement from '../common/Studentcommon/Achievement';
import axios from 'axios';
export default {
data() {
return {
personalScore: {},
schoolScore: {},
nationalScore: '',
nationalMaxScore: '',
active: 1,
studentId: this.$store.state.studentId
};
},
components: {
Achievement,
Headportrait
},
computed: {
changeCourseId() {
return this.$store.state.courseId;
}
},
watch: {
changeCourseId() {
this.getData()
}
},
created() {
this.getData()
},
methods: {
changeActive(val) {
this.active = val;
},
getData() {
//
this.$get(this.api.queryStudentAssessment, { studentId: this.$store.state.studentId, courseId: this.$store.state.courseId })
.then(res => {
this.personalScore = res.message;
})
.catch(err => {
console.log(err);
});
}
}
};
</script>
<style lang="scss" scoped>
.horizontalVerticalCenter {
display: flex;
align-items: center;
flex-direction: column;
background: #f5f5f5;
}
.headerContent {
display: flex;
align-self: flex-start;
margin-left: 20px;
margin-top: 20px;
.p {
height: 60px;
line-height: 60px;
font-size: 25px;
margin-left: 10px;
color: #328aff;
}
}
.active {
background: linear-gradient(41deg, rgba(253, 201, 22, 1) 0%, rgba(255, 213, 70, 1) 100%) !important;
i {
color: #fff !important;
}
.fontcolor {
color: #fff !important;
}
}
p {
margin: 0px;
}
.about-head {
width: 95%;
display: flex;
margin-bottom: 20px;
p {
margin-left: 20px;
color: #328aff;
font-size: 20px;
}
}
.practice {
margin-top: 20px;
width: 98%;
height: 299px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
border-radius: 10px;
margin-bottom: 20px;
p {
font-size: 20px;
color: #333333;
margin-left: 40px;
}
.practiceRecord {
display: flex;
justify-content: space-around;
.practiceRecord-head {
display: flex;
}
.AssesmentRecord {
width: 16%;
height: 150px;
background-color: red;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
p {
margin-left: 0px;
}
}
.practiceRecordCon {
cursor: pointer;
position: relative;
width: 570px !important;
height: 190px;
background: #fff;
box-shadow: 1px 5px 18px 0px rgba(84, 84, 84, 0.28);
border-radius: 10px;
width: 400px;
height: 190px;
transition: all 1s ease;
i {
position: absolute;
left: 24px;
top: 20px;
font-size: 30px;
font-weight: 500px;
color: #f8c30c;
}
.big-p {
font-size: 16px;
position: absolute;
left: 50px;
top: 24px;
margin-left: 10px;
}
.practiceRecord-p {
width: 90%;
height: 130px;
position: absolute;
bottom: 0px;
border-top: 1px solid #e8e8e8;
left: 25px;
display: flex;
justify-content: center;
.div {
width: 86%;
display: flex;
justify-content: space-between;
}
p {
margin-top: 25px;
margin-left: 0px;
}
.fontcolor {
font-size: 26px;
color: #f8c30c;
}
}
.practiceRecord-center {
width: 90%;
height: 130px;
display: flex;
position: absolute;
bottom: 0px;
border-top: 1px solid #e8e8e8;
left: 25px;
justify-content: space-around;
p {
margin-top: 25px;
margin-left: 0px;
}
div {
.fontcolor {
font-size: 26px;
color: #f8c30c;
}
}
}
}
}
}
</style>

@ -1,268 +0,0 @@
<template>
<div class="horizontalVerticalCenter">
<!-- 头像部分 -->
<div class="headerContent">
<Headportrait></Headportrait>
<p class="p">{{PracticeData.studentName}}</p>
</div>
<!-- 练习概览 -->
<div class="newPractice">
<p class="exerciseOverview" style="margin-left:28px;">练习概览</p>
<div class="newPractice-card">
<div class="newPractice-card-first">
<div class="card-first-up">
<P style="margin-left:10px">练习项目数量</P>
<P>完成练习项目数量</P>
<P>实训练习次数</P>
<P>练习总时长</P>
<p>当前实训积分</p>
<p>全国平均实训积分</p>
</div>
<div class="card-first-down">
<P style="margin-left:10px">{{PracticeData.practiceNumber}}</P>
<P>{{PracticeData.accomplishNumber}}</P>
<P>{{PracticeData.sumNumber}}</P>
<P>{{PracticeData.totalTime}}</P>
<P>{{PracticeData.integral}}</P>
<P>{{PracticeData.avgintegral}}</P>
</div>
</div>
<div class="newPractice-card-other">
<div class="card-other-score">
<p style="font-size:18px;">练习平均分(个人)</p>
<p>{{PracticeData.avg}}</p>
</div>
<div style="margin-top:40px;margin-left:35px">
<img src="../../assets/img/05学生-练习记录_03.png" alt />
</div>
</div>
<div class="newPractice-card-other">
<div class="card-other-score">
<p style="font-size:18px;">平均分最高(全国)</p>
<p>{{PracticeData.heightintegral}}</p>
</div>
<div style="margin-top:40px;margin-left:35px">
<img src="../../assets/img/05学生-练习记录_05.png" alt />
</div>
</div>
</div>
<!-- <div class="newPractice-card">
<div class="AssesmentRecord" style="background:#CDDCF1;">
<p style="color:#FF6161;font-size:30px">{{PracticeData.studentName}}</p>
<p>姓名</p>
</div>
<div class="AssesmentRecord" style="background:#CDDCF1;">
<p style="color:#FF6161;font-size:30px">{{PracticeData.practiceNumber}}</p>
<p>练习项目数量</p>
</div>
<div class="AssesmentRecord" style="background:#F7EFEF;">
<p style="color:#FF6161;font-size:30px">{{PracticeData.accomplishNumber}}</p>
<p>完成练习项目数量</p>
</div>
<div class="AssesmentRecord" style="background:#F7EFEF;">
<p style="color:#FF6161;font-size:30px">{{PracticeData.sumNumber}}</p>
<p>实训练习次数</p>
</div>
<div class="AssesmentRecord" style="background:#F7EFEF;">
<p style="color:#FF6161;font-size:30px">{{PracticeData.totalTime}}</p>
<p>练习总时长</p>
</div>
<div class="AssesmentRecord" style="background:#F7EFEF;">
<p style="color:#FF6161;font-size:30px">{{PracticeData.avg}}</p>
<p>练习平均分</p>
</div>
<div class="AssesmentRecord" style="background:#FF6161;">
<p style="color:#FFF;font-size:30px">{{PracticeData.integral}}</p>
<p style="color:#FFF">当前实训积分</p>
</div>
<div class="AssesmentRecord" style="background:#FF8061;">
<p style="color:#FFF;font-size:30px">{{PracticeData.avgintegral}}</p>
<p style="color:#FFF">全国平均实训积分</p>
</div>
<div class="AssesmentRecord" style="background:#FF6161;">
<p style="color:#FFF;font-size:30px">{{PracticeData.heightintegral}}</p>
<p style="color:#FFF">全国最高实训积分</p>
</div>
</div>-->
</div>
<!-- 成绩明细 -->
<Achievement
:student="studentId"
projectPermissions="0"
:AssesmentRecord="this.api.queryAssesmentRecord"
style="margin-top:20px;margin-bottom:50px"
></Achievement>
</div>
</template>
<script>
import Achievement from '../common/Studentcommon/Achievement';
import Headportrait from '../common/Studentcommon/Headportrait';
export default {
data() {
return {
PracticeData: {},
highestAvg: '',
studentId: this.$store.state.studentId
};
},
computed: {
changeCourseId() {
return this.$store.state.courseId;
}
},
watch: {
changeCourseId() {
this.getPracticeData()
}
},
components: {
Achievement,
Headportrait
},
mounted() {
this.getPracticeData()
},
methods: {
getPracticeData: function() {
this.$get(this.api.queryPracticeVo, { studentId: this.$store.state.studentId, courseId:this.$store.state.courseId }).then(res => {
let h = parseInt(res.message.totalTime / 60);
let m = parseInt(res.message.totalTime % 60);
res.message.totalTime = h + 'h' + m + 'm';
this.PracticeData = res.message;
});
}
}
};
</script>
<style lang="scss" scoped>
.horizontalVerticalCenter {
display: flex;
align-items: center;
flex-direction: column;
background: #f5f5f5;
}
.headerContent {
display: flex;
align-self: flex-start;
margin-left: 20px;
margin-top: 20px;
.p {
height: 60px;
line-height: 60px;
font-size: 25px;
margin-left: 10px;
color: #328aff;
}
}
.AssesmentRecord {
width: 10%;
height: 120px;
background-color: red;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
p {
margin-left: 0px;
}
}
.newPractice {
width: 98%;
height: 229px;
margin-top: 20px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
border-radius: 10px;
.exerciseOverview {
padding: 30px 0;
}
p {
font-size: 20px;
margin-left: 25px;
}
.newPractice-card {
width: 97%;
margin: 0 auto;
display: flex;
justify-content: space-between;
.newPractice-card-first {
.card-first-up {
font-weight: 400;
display: flex;
justify-content: space-around;
width: 1050px;
height: 60px;
background: rgba(255, 255, 255, 1);
border-radius: 10px 10px 0 0;
box-shadow: 0px 3px 18px 0px rgba(84, 84, 84, 0.09);
p {
line-height: 60px;
width: 150px;
font-size: 18px;
color: #333333;
}
}
.card-first-down {
font-weight: 400;
display: flex;
justify-content: space-around;
width: 1050px;
height: 60px;
background: rgba(146, 120, 255, 1);
border-radius: 0 0 10px 10px;
box-shadow: 0px 3px 18px 0px rgba(84, 84, 84, 0.09);
p {
line-height: 60px;
width: 150px;
font-size: 26px;
color: #ffffff;
}
}
}
.newPractice-card-other {
width: 350px;
height: 120px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 3px 18px 0px rgba(84, 84, 84, 0.09);
border-radius: 8px;
display: flex;
.card-other-score {
margin-top: 18px;
height: 88px;
position: relative;
p:last-child {
position: absolute;
bottom: 0px;
color: #328aff;
font-size: 26px;
}
}
}
}
}
p {
margin: 0px;
}
.about-head1 {
width: 95%;
display: flex;
margin-bottom: 20px;
p {
margin-left: 20px;
color: #328aff;
font-size: 20px;
}
}
</style>

@ -25,7 +25,7 @@
</el-form-item>
<el-form-item>
<el-input placeholder="请输入实验班级/项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable @keyup.enter.native="onSearch"></el-input>
<el-input placeholder="请输入竞赛群组/项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable @keyup.enter.native="onSearch"></el-input>
</el-form-item>
</div>
</el-form>
@ -39,7 +39,7 @@
<div class="flex-between mgb20">
<div class="flex-center">
<p class="hr_tag"></p>
<span>实验教学管理</span>
<span>竞赛管理</span>
</div>
</div>
<el-table :data="customerData" class="table" stripe header-align="center" :row-key="getRowKeys">
@ -48,10 +48,10 @@
{{scope.$index + (pageNo - 1) * pageSize + 1}}
</template>
</el-table-column>
<el-table-column prop="experimentalName" label="实验教学名称" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="实验班级" align="center">
<el-table-column prop="experimentalName" label="竞赛名称" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="竞赛群组" align="center">
</el-table-column>
<el-table-column prop="experimentalNumber" label="实验人数" align="center"></el-table-column>
<el-table-column prop="experimentalNumber" label="参赛人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" label="考核时长" align="center">
</el-table-column>
<el-table-column prop="creationTime" label="创建时间" align="center">

@ -1,558 +0,0 @@
<template>
<div class="box">
<el-row :gutter="24">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="flex-between">
<div class="per_title" v-preventReClick @click="goback()">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school">查看报告</span>
</div>
<div>
<el-button type="primary" @click="exportPage">导出</el-button>
</div>
</div>
</el-card>
<div id="pdfDom">
<h6 style="text-align: center;font-size: 20px">标准实验报告</h6>
<div class="flex-center mgb20 user_header">
<p class="addhr_tag"></p>
<span style="font-size: 18px">基本信息</span>
</div>
<div>
<el-table :data="infoData" class="info-table" style="margin-bottom: 40px" header-align="center">
<el-table-column prop="userName" label="学生姓名" align="center">
</el-table-column>
<el-table-column prop="workNumber" label="学生学号" align="center">
</el-table-column>
<el-table-column prop="experimentalClassName" label="学生班级" align="center">
</el-table-column>
<el-table-column prop="teacherName" label="指导老师" align="center">
</el-table-column>
<el-table-column prop="period" label="实验学时" align="center">
</el-table-column>
<el-table-column prop="laboratory" label="实验室名称" align="center">
</el-table-column>
<el-table-column prop="startTime" label="实验时间" align="center">
</el-table-column>
<el-table-column prop="score" label="实验成绩" align="center">
</el-table-column>
</el-table>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验项目名称</p>
</div>
<el-input v-model="form.projectName" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验目的</p>
</div>
<el-input v-model="form.experimentGoal" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验原理</p>
</div>
<el-input v-model="form.principle" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验内容</p>
</div>
<el-input v-model="form.content" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验器材设备元器件</p>
</div>
<el-input v-model="form.tool" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验步骤</p>
</div>
<el-input v-model="form.step" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title">实验数据</p>
<span>得分50/60</span>
</div>
<el-table :data="sjData" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope">
{{scope.$index + 1}}
</template>
</el-table-column>
<el-table-column prop="judgmentPointsName" label="考核点" align="center">
</el-table-column>
<el-table-column prop="userAnswer" label="学生答案" align="center">
</el-table-column>
<el-table-column prop="answer" label="参考答案" align="center">
</el-table-column>
<el-table-column prop="codeScore" label="得分" align="center">
</el-table-column>
</el-table>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验数据及结果分析</p>
</div>
<el-table :data="expData" class="table" stripe header-align="center">
<el-table-column prop="module" label="期权平仓方式" align="center">
</el-table-column>
<el-table-column prop="judgmentPointsName" label="期权合约" align="center">
</el-table-column>
<el-table-column prop="userAnswer" label="期权合约持仓时间段" width="150" align="center">
</el-table-column>
<el-table-column prop="answer" label="期权交易方向" align="center">
</el-table-column>
<el-table-column prop="sl" label="委托数量" align="center">
</el-table-column>
<el-table-column prop="jg" label="委托价格" align="center">
</el-table-column>
<el-table-column prop="hy" label="期货合约" align="center">
</el-table-column>
<el-table-column prop="sjd" label="合约持仓时间段" align="center">
</el-table-column>
<el-table-column prop="fx" label="交易方向" align="center">
</el-table-column>
<el-table-column prop="hyyk" label="期权/期货合约盈亏" width="120" align="center">
</el-table-column>
<el-table-column prop="xhyk" label="现货盈亏" align="center">
</el-table-column>
<el-table-column prop="sxf" label="手续费" align="center">
</el-table-column>
<el-table-column prop="zyk" label="总盈亏" align="center">
</el-table-column>
</el-table>
<el-input style="margin-top: 20px" v-model="form.fx" type="textarea" :disabled="true" rows="5"></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 实验结论</p>
</div>
<el-input type="textarea" v-model="form.conclusion" rows="5" disabled></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 总结及心得体会</p>
</div>
<el-input type="textarea" v-model="form.summarize" rows="5" disabled></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 对本实验过程及方法手段的改进建议</p>
</div>
<el-input type="textarea" rows="5" v-model="form.improvement" disabled></el-input>
</div>
<div class="mgb20">
<div class="meta-title-wrap">
<p class="meta-title"><i class="el-icon-discount"></i> 老师评语</p>
</div>
<el-input type="textarea" rows="5" v-model="form.py" disabled></el-input>
</div>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import html2Canvas from 'html2canvas'
import JsPDF from 'jspdf'
export default {
data (){
return {
title: '实验报告',
userId: this.$store.state.userId,
studentId: this.$store.state.studentId,
form: {
analysis: '',
conclusion: '11111',
content: `本实验以商品期权的保险功能为主轴,以期权故事展开,衔接实战规则的介绍,之后进入案例和策略选择,并以此逐步完成期权交易的整个流程,最终输出实验报告。`,
tool: '计算机、行情软件(东方财富、叩富app)、纸张',
data: '',
experimentGoal: `期权策略的应用对学生学习能力和应用能力要求较高,需要扎实和期权期货理论知识和思辨能力,借助信息化技术,让学生有沉浸式的体验,增加学生学习和研究的积极性,同时提升期权期货的专业认知水平。`,
experimentId: '',
experimentalClassName: '',
improvement: '11111',
laboratory: '',
period: '',
principle: `本项目以商品期权在实际生产中的保险作用为研究对象,包括两个模块。共计4个学时。课时分配如下:模块一:期权保险基础实验(2学时)模块二:期权保险挑战实验(2学时)`,
projectName: '商品期货期权保险虚拟仿真实验项目',
score: 0,
step: `实验步骤:1.期权概念2.期权实战规则3.期权策略选择4.模拟开户5.银证转账6.选择期权合约7.期权开仓8.期权/期货平仓9.核算损益10.填写实验报告`,
submitTime: '',
summarize: '11111',
teacherName: '',
userId: this.userId,
userName: '',
workNumber: '',
fx: '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
py: '期权相关知识理论掌握扎实,相关测试题正确率高;对期权保险原理理解正确,选择了合理的合约及数量,选择的期权策略很好的满足案例中的保险需求。'
},
sjData: [
{
judgmentPointsName: '测试题1',
userAnswer: 'A',
answer: 'A',
codeScore: '3',
},{
judgmentPointsName: '测试题2',
userAnswer: 'A',
answer: 'A',
codeScore: '3',
},{
judgmentPointsName: '测试题3',
userAnswer: 'C',
answer: 'C',
codeScore: '3',
},{
judgmentPointsName: '测试题1',
userAnswer: 'C',
answer: 'C',
codeScore: '3',
},{
judgmentPointsName: '测试题2',
userAnswer: 'C',
answer: 'C',
codeScore: '3',
},{
judgmentPointsName: '测试题3',
userAnswer: 'A',
answer: 'A',
codeScore: '3',
},{
judgmentPointsName: '测试题1',
userAnswer: 'A',
answer: 'A',
codeScore: '3',
},{
judgmentPointsName: '测试题2',
userAnswer: 'B',
answer: 'B',
codeScore: '3',
},{
judgmentPointsName: '测试题3',
userAnswer: 'B',
answer: 'B',
codeScore: '3',
},{
judgmentPointsName: '总盈亏',
userAnswer: '3088',
answer: '>-5000',
codeScore: '20',
},{
judgmentPointsName: '实验数据及结果分析',
userAnswer: '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111',
answer: '字数>200',
codeScore: '20',
},{
judgmentPointsName: '实验结论',
userAnswer: '11111',
answer: '字数>200',
codeScore: '0',
}
],
type: this.$route.query.type,
id: this.$route.query.id,
recordId: this.$route.query.recordId,
reportId: this.$route.query.reportId,
infoData: [{
userName: "张黎",
workNumber: "00",
startTime: '2020-12-31 14:11:12',
score: 80
}],
expData: [
{
module: '卖出',
judgmentPointsName: '豆粕1911-看跌-2900',
userAnswer: '2019-06-06:2019-08-08',
answer: '多头',
sl: '8',
jg: '2900',
hy: '-',
sjd: '',
fx: '-',
hyyk: '-2400',
xhyk: '',
sxf: '36',
zyk: '',
},{
module: '卖出',
judgmentPointsName: '豆粕1911-看跌-2900',
userAnswer: '2019-08-09:2019-09-30',
answer: '多头',
sl: '8',
jg: '2900',
hy: '-',
sjd: '',
fx: '-',
hyyk: '880',
xhyk: '4720',
sxf: '36',
zyk: '3088',
}
],
accountData: [],
showData: '1',
autograph: '1',
pages: 1,
ipVisible: false,
fileList: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}, {name: 'food2.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}],
conclusionOptions: [
{
value: 1,
label: '结论符合预期'
}
],
}
},
mounted(){
// this.getData()
},
methods: {
getData(){
if(this.type){
let data = {
recordId: this.id,
}
this.$get(this.api.queryVirtualReport,data).then(res => {
this.form = res.data.report
this.expData = res.data.data
let form = this.form
this.infoData.push({
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
teacherName: form.teacherName,
period: form.period,
laboratory: form.laboratory,
startTime: form.submitTime,
score: form.score,
userName: form.userName
})
}).catch(res => {});
}else{
let data = {
studentId: this.studentId,
projectId: this.id,
recordId: this.recordId,
reportId: this.reportId
}
this.$get(this.api.queryArchievement,data).then(res => {
this.form = res.data.report
this.expData = res.data.data
let form = this.form
this.infoData.push({
workNumber: form.workNumber,
experimentalClassName: form.experimentalClassName,
teacherName: form.teacherName,
period: form.period,
laboratory: form.laboratory,
startTime: form.submitTime,
score: form.score,
userName: form.userName
})
}).catch(res => {});
}
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
saveAdd(){
let data = {
systemId: this.configId,
systemName: this.form.systemName,
systemType: this.form.systemType,
systemAttribution: this.form.systemAttribution,
}
if(this.configId){
this.$post(this.api.updateServiceConfig,data).then((res) => {
this.$message.success('编辑成功');
this.goback()
}).catch((res) => {
})
}else{
this.$post(this.api.updateServiceConfig,data).then((res) => {
this.$message.success('添加成功');
this.goback()
}).catch((res) => {
})
}
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
SpanMethod({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
if (columnIndex === 6) {
if(!row.Intranet){
return [1, 2];
}
}
// else if (columnIndex === 1) {
// return [0, 0];
// }
}
},
goback(){
this.$router.go(-1)
},
exportPage(){
var title = this.title;
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
}).then(function (canvas) {
let contentWidth = canvas.width
let contentHeight = canvas.height
let pageHeight = contentWidth / 592.28 * 841.89
let leftHeight = contentHeight
let position = 0
let imgWidth = 595.28
let imgHeight = 592.28 / contentWidth * contentHeight
let pageData = canvas.toDataURL('image/jpeg', 1.0)
let PDF = new JsPDF('', 'pt', 'a4')
if (leftHeight < pageHeight) {
PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
} else {
while (leftHeight > 0) {
PDF.addImage(pageData, 'JPEG', 0, position, imgWidth, imgHeight)
leftHeight -= pageHeight
position -= 841.89
if (leftHeight > 0) {
PDF.addPage()
}
}
}
PDF.save(title + '.pdf')
}
)
}
}
}
</script>
<style lang="scss" scoped>
.box{
padding: 0 50px;
background-color: #fff;
}
/deep/.el-textarea.is-disabled .el-textarea__inner{
background-color: #ebfafd;
}
#pdfDom{
padding: 0 50px;
/deep/.info-table{
border: 0;
th{
background-color: #fff !important;
.cell{
color: #444;
}
}
tr{
border: 0;
}
tr:hover,tr:hover>td{
background-color: #c6f2f8 !important;
}
td{
border: {
left: 4px solid #fff;
right: 4px solid #fff;
}
&:first-child{
border-left: 0;
}
&:last-child{
border-right: 0;
}
background-color: #c6f2f8;
border-bottom: 0;
}
}
/deep/.table th{
background-color: #a2a2a2 !important;
}
}
/deep/.cell{
font-size: 12px;
}
/deep/.el-row{
padding-top: 20px;
margin: 0 !important;
}
.form-item{
display: flex;
align-items: center;
}
.form-item .el-input{
width: auto;
}
.form-item span{
margin-right: 10px;
}
.meta-title-wrap{
display: flex;
justify-content: space-between;
align-items: center;
span{
font-size: 13px;
color: #444;
}
}
.flex-between{
span{
font-size: 13px;
color: #444;
}
}
.meta-title{
display: flex;
align-items: center;
padding: 10px 20px;
margin-bottom: 10px;
font-size: 16px;
color: #fff;
background-color: #9076FF;
i{
margin-right: 10px;
}
}
.step-title{
margin-bottom: 10px;
font-size: 16px;
color: #328aff;
}
.bd-title{
padding-top: 20px;
border-top: 1px dashed #ccc;
}
</style>

@ -1,174 +0,0 @@
<template>
<div>
<div class="header_tab">
<div class="selectSystem">
<el-select v-model="value" placeholder="请选择" size="small" @change="chooseCourse">
<el-option
v-for="(item,index) in options"
:key="index"
:label="item.courseName"
:value="item.courseId"
></el-option>
</el-select>
<div class="radius"></div>
</div>
<div class="tabs">
<el-tabs v-model="activeName">
<el-tab-pane label="实验学习" name="first">
<ExpLearning></ExpLearning>
</el-tab-pane>
<el-tab-pane label="考勤记录" name="second">
<CheckWorkAttendance></CheckWorkAttendance>
</el-tab-pane>
<el-tab-pane label="练习记录" name="third">
<Practice ></Practice>
</el-tab-pane>
<el-tab-pane label="考核记录" name="four">
<ExaminationRecord></ExaminationRecord>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</template>
<script>
import CheckWorkAttendance from './CheckWorkAttendance';
import ExpLearning from './ExpLearning';
import Practice from './Practice';
import ExaminationRecord from './ExaminationRecord';
export default {
data() {
return {
activeName: 'first',
options: [],
value: '',
schoolId: this.$store.state.schoolId,
studentId: this.$store.state.studentId
};
},
mounted(){
this.getCourse()
},
components: {
CheckWorkAttendance,
ExpLearning,
Practice,
ExaminationRecord
},
methods: {
chooseCourse(val){
this.$store.commit('courseIdData',{courseId: val})
},
async getCourse() {
let arr = await this.$get(this.api.queryStudentCourse, {
studentId: this.studentId
});
if(arr.message.length != 0){
this.value = arr.message[0].courseId
this.$store.commit('courseIdData',{ courseId: arr.message[0].courseId })
this.options = arr.message;
}else{
this.$store.commit('courseIdData',{ courseId: '' })
}
},
},
watch: {
value(n, o) {
this.$store.commit('courseIdData',{courseId:n})
}
}
};
</script>
<style scoped>
::v-deep .el-tabs__active-bar{
height: 3px;
border-radius: 20px;
}
::v-deep .el-input__icon {
line-height: 30px;
}
.header_tab /deep/ .el-select .el-input .el-select__caret {
background: #328aff;
border-radius: 50%;
position: relative;
height: 30px;
z-index: 1;
}
.selectSystem /deep/ .el-input--suffix .el-input__inner{
border: none ;
font-size: 16px;
letter-spacing:2px
}
.header_tab /deep/ .el-tabs__item{
font-size: 16px;
}
.header_tab /deep/ .el-tabs__header{
padding-top: 0px;
padding-left: 300px;
}
.header_tab /deep/ .el-tabs__item{
height: 60px;
line-height: 60px;
}
.header_tab /deep/ .el-tabs__nav-scroll {
margin-left: 100px;
}
.header_tab {
width: 100%;
height: 100%;
background-color: #fff;
position: relative;
}
.header_tab ::v-deep .el-tabs__item{
padding: 0 50px;
}
.selectSystem {
position: absolute;
z-index: 99999;
left: 20px;
top:12px;
margin-right: 60px;
}
.header_tab /deep/ .el-input--suffix .el-input__inner {
background: #f5f2ff;
position: relative;
z-index: -1;
}
.header_tab /deep/ input::-webkit-input-placeholder {
color: black;
}
.header_tab /deep/ input::-moz-input-placeholder {
color: black;
}
.header_tab /deep/ input::-ms-input-placeholder {
color: black;
}
.header_tab .radius {
position: absolute;
width: 32px;
height: 32px;
border-radius: 50%;
background: #328aff;
top: 0px;
right: 1px;
z-index: 0;
}
.header_tab ::v-deep .el-select__caret:before {
content: "\e78f";
font-size: 18px;
padding: 3px;
border-radius: 50%;
color: #ffffff;
}
</style>

@ -1,129 +0,0 @@
<template>
<div class="">
<div class="crumbs">
<el-breadcrumb separator="/">
<el-breadcrumb-item><i class="el-icon-lx-copy"></i> tab选项卡</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="container">
<el-tabs v-model="message">
<el-tab-pane :label="`未读消息(${unread.length})`" name="first">
<el-table :data="unread" :show-header="false" style="width: 100%">
<el-table-column>
<template slot-scope="scope">
<span class="message-title">{{scope.row.title}}</span>
</template>
</el-table-column>
<el-table-column prop="date" width="180"></el-table-column>
<el-table-column width="120">
<template slot-scope="scope">
<el-button size="small" @click="handleRead(scope.$index)">标为已读</el-button>
</template>
</el-table-column>
</el-table>
<div class="handle-row">
<el-button type="primary">全部标为已读</el-button>
</div>
</el-tab-pane>
<el-tab-pane :label="`已读消息(${read.length})`" name="second">
<template v-if="message === 'second'">
<el-table :data="read" :show-header="false" style="width: 100%">
<el-table-column>
<template slot-scope="scope">
<span class="message-title">{{scope.row.title}}</span>
</template>
</el-table-column>
<el-table-column prop="date" width="150"></el-table-column>
<el-table-column width="120">
<template slot-scope="scope">
<el-button type="danger" @click="handleDel(scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="handle-row">
<el-button type="danger">删除全部</el-button>
</div>
</template>
</el-tab-pane>
<el-tab-pane :label="`回收站(${recycle.length})`" name="third">
<template v-if="message === 'third'">
<el-table :data="recycle" :show-header="false" style="width: 100%">
<el-table-column>
<template slot-scope="scope">
<span class="message-title">{{scope.row.title}}</span>
</template>
</el-table-column>
<el-table-column prop="date" width="150"></el-table-column>
<el-table-column width="120">
<template slot-scope="scope">
<el-button @click="handleRestore(scope.$index)">还原</el-button>
</template>
</el-table-column>
</el-table>
<div class="handle-row">
<el-button type="danger">清空回收站</el-button>
</div>
</template>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
export default {
name: 'tabs',
data() {
return {
message: 'first',
showHeader: false,
unread: [{
date: '2018-04-19 20:00:00',
title: '【系统通知】该系统将于今晚凌晨2点到5点进行升级维护',
},{
date: '2018-04-19 21:00:00',
title: '今晚12点整发大红包,先到先得',
}],
read: [{
date: '2018-04-19 20:00:00',
title: '【系统通知】该系统将于今晚凌晨2点到5点进行升级维护'
}],
recycle: [{
date: '2018-04-19 20:00:00',
title: '【系统通知】该系统将于今晚凌晨2点到5点进行升级维护'
}]
}
},
methods: {
handleRead(index) {
const item = this.unread.splice(index, 1);
console.log(item);
this.read = item.concat(this.read);
},
handleDel(index) {
const item = this.read.splice(index, 1);
this.recycle = item.concat(this.recycle);
},
handleRestore(index) {
const item = this.recycle.splice(index, 1);
this.read = item.concat(this.read);
}
},
computed: {
unreadNum(){
return this.unread.length;
}
}
}
</script>
<style>
.message-title{
cursor: pointer;
}
.handle-row{
margin-top: 30px;
}
</style>

@ -1,173 +0,0 @@
<template>
<div>
<div class="header_tab">
<div class="selectSystem">
<el-select v-model="value" placeholder="请选择" size="small">
<el-option
v-for="item in options"
:key="item.courseId"
:label="item.courseName"
:value="item.courseId"
></el-option>
</el-select>
<div class="radius"></div>
</div>
<el-tabs v-model="activeName">
<el-tab-pane label="教学管理" name="first">
<!-- <TeacherIndex></TeacherIndex> -->
<TeacherManage @startCurriculum="startCurriculum" @into="into"></TeacherManage>
</el-tab-pane>
<el-tab-pane label="考核管理" name="second">
<Assessment @release="release" @check="check"></Assessment>
</el-tab-pane>
</el-tabs>
</div>
<!-- <el-row :gutter="20">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
</el-card>
</el-col>
</el-row>-->
</div>
</template>
<script>
import Assessment from '../common/Teachercommon/Assessment';
import TeacherManage from '../common/Teachercommon/TeacherManage';
export default {
data() {
return {
activeName: 'first',
isShow: true,
value: '',
options: [],
schoolId: this.$store.state.schoolId,
active: this.$route.query.active
};
},
created(){
if(this.active == true){
this.activeName = 'second'
}
},
async mounted() {
let arr = await this.$get(this.api.platformQueryCourse, {
schoolId: this.schoolId
});
if(arr.message.length != 0){
this.value = arr.message[0].courseId;
this.$store.commit('courseIdData',{courseId:arr.message[0].courseId})
this.options = arr.message;
}
},
components: {
Assessment,
TeacherManage
},
watch: {
value(n, o) {
this.$store.commit('courseIdData',{courseId:n})
}
},
methods: {
release() {
this.$store.commit("assesmentData", { assesmentId : ''});
this.$router.push('/addassessment');
},
startCurriculum(val) {
this.$store.commit('classData', { classId: val });
this.$router.push('/teacherindex');
},
check(val) {
this.$store.commit('resultData', { resultId: val });
this.$router.push('/checkresult');
},
into(val) {
this.$store.commit('classData', { classId: val.experimentalClassId, className: val.experimentalClassName });
this.$router.push('/classdetail');
}
}
};
</script>
<style scoped>
.selectSystem /deep/ .el-select .el-input .el-select__caret {
background: #328aff;
border-radius: 50%;
position: relative;
height: 30px;
z-index: 1;
}
.selectSystem /deep/ .el-input--suffix .el-input__inner {
border: none;
font-size: 14px;
}
.header_tab /deep/ .el-tabs__item {
font-size: 16px;
}
.header_tab /deep/ .el-tabs__header {
padding-top: 0px;
padding-left: 300px;
}
.header_tab /deep/ .el-tabs__item {
height: 60px;
line-height: 60px;
}
.header_tab /deep/ .el-tabs__nav-scroll {
margin-left: 100px;
}
::v-deep .el-input__icon {
line-height: 30px;
}
.header_tab {
width: 100%;
height: 100%;
background-color: #fff;
position: relative;
}
.selectSystem ::v-deep .el-tabs__item {
padding: 0 50px;
}
.selectSystem {
position: absolute;
z-index: 1000;
left: 20px;
top: 12px;
margin-right: 60px;
}
.selectSystem /deep/ .el-input--suffix .el-input__inner {
background: #f5f2ff;
position: relative;
z-index: -1;
}
.selectSystem /deep/ input::-webkit-input-placeholder {
color: black;
}
.selectSystem /deep/ input::-moz-input-placeholder {
color: black;
}
.selectSystem /deep/ input::-ms-input-placeholder {
color: black;
}
.radius {
position: absolute;
width: 32px;
height: 32px;
border-radius: 50%;
background: #328aff;
top: 0px;
right: 1px;
z-index: 0;
}
.selectSystem ::v-deep .el-select__caret:before {
content: '\e78f';
font-size: 18px;
padding: 3px;
border-radius: 50%;
color: #ffffff;
}
</style>

@ -1,370 +0,0 @@
<template>
<div>
<div>
<img src="../../assets/img/back.png" class="backimg" />
</div>
<el-row :gutter="20" style="margin-right:0px">
<el-col :span="4" class="introduce_col">
<el-card class="mgb200">
<div class="introduce">
<p class="introduce_title">{{courseName}}</p>
<ul>
<li
v-for="(item,index) in sideList"
:key="index"
:class="active === index ? 'activeBack' : ''"
@click="activeClick(index)"
>
<span>0{{index+1}}</span>
<span style="margin-left:20px">{{item.name}}</span>
</li>
</ul>
</div>
</el-card>
</el-col>
<el-col :span="20">
<div class="introduce_main" v-if="active == 0">
<span>{{courseIntroduction}}</span>
</div>
<div class="introduce_main" v-if="active == 1">
<span>{{teachingGoal}}</span>
</div>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-right:0px">
<el-col :span="24">
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<span>课程进度</span>
<div>
<el-button @click="toTeachingVideo" type="primary" size="small" round class="mag">开始课程</el-button>
<el-button type="primary" size="small" round @click="isRelease = true">发布考核</el-button>
</div>
</div>
<div>
<div class="div">
完成{{completeProject}}个实验项目的教学
<div class="div1"></div>
</div>
<el-progress text-inside :stroke-width="18" :percentage="projectTotal"></el-progress>
</div>
</el-card>
</el-col>
<el-col :span="24">
<el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20">
<span>实验项目</span>
<!-- <el-button type="primary" size="small" round>导出</el-button> -->
</div>
<el-table :data="customerData" class="table" stripe header-align="center">
<el-table-column type="index" width="100" label="次序" align="center"></el-table-column>
<el-table-column prop="projectName" label="教学名称" align="center"></el-table-column>
<el-table-column label="启用" align="center">
<template slot-scope="scope">
<el-switch
:active-value="0"
:inactive-value="1"
v-model="scope.row.isOpenProject"
@change="changeisExperimentSwitch(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="考勤" align="center">
<template slot-scope="scope">
<el-switch
:active-value="1"
:inactive-value="0"
v-model="scope.row.isAttendance"
@change="changeisAttendanceSwitch(scope.row)"
></el-switch>
</template>
</el-table-column>
<!-- <el-table-column label="实验演示" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toPython(scope.row.projectId)">实验演示</el-button>
</template>
</el-table-column> -->
</el-table>
<!-- <div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="pages"
></el-pagination>
</div> -->
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="pageNo" layout="total, prev, pager, next" :total="totals">
</el-pagination>
</div>
</el-card>
</el-col>
</el-col>
<!-- 发布考核 -->
<el-dialog title="发布考核" :visible.sync="isRelease" width="24%" center :close-on-click-modal="false">
<div>
<el-select v-model="assessmentId" clearable placeholder="请选择考核名称" @change="chooeseAss">
<el-option v-for="(item,index) in assessmentList" :key="index" :label="item.assesmentName" :value="item.id"></el-option>
</el-select>
<div class="addAssessment">
<el-button type="text" @click="toRelease">点击前往创建新考核</el-button>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="isRelease = false"> </el-button>
<el-button type="primary" @click="release"> </el-button>
</span>
</el-dialog>
</el-row>
</div>
</template>
<script>
export default {
data() {
return {
sideList: [
{
name: '课程简介'
},
{
name: '教学目标'
}
],
active: 0,
courseName: '', //
courseIntroduction: '', //
teachingGoal: '', //
customerData: [],
completeProject: 0,
projectTotal: 0,
isRelease: false,
assessmentId: '',
assessmentList: [],
timesum: '',
experimentalClassId: this.$store.state.classId,
courseId: this.$store.state.courseId,
pageNo: 1,
pageSize: 10,
totals: 1
};
},
components: {},
mounted() {
console.log(this.courseId)
this.getdata();
this.getAssesment()
},
methods: {
toPython(projectId) {
this.setCookie('staffId', this.$store.state.staffId);
this.setCookie('projectId', projectId);
this.setCookie('courseId', this.courseId);
window.location.href = 'http://www.occupationlab.com/pythonview/';
},
toTeachingVideo() {
this.$router.push('teachingVideo');
},
activeClick(index) {
this.active = index;
},
//
async courseSchedule() {
let schedule = await this.$get(this.api.getCourseSchedule, {
courseId: this.courseId,
experimentalClassId: this.experimentalClassId,
studentId: ''
});
if(schedule.message.number){
this.completeProject = schedule.message.number;
let projectTotal1 = schedule.message.number / schedule.message.total;
this.projectTotal = projectTotal1.toFixed(2);
this.projectTotal = this.NumberMul(this.projectTotal,100)
}
},
getdata() {
this.$get(this.api.getCourse, {
courseId: this.courseId
}).then((res) => {
//
this.courseIntroduction = res.message.courseIntroduction;
this.teachingGoal = res.message.teachingGoal;
this.courseName = res.message.courseName;
}).catch((err) => {});
this.courseSchedule()
this.getProject()
},
getProject(){
this.$get(this.api.queryProject, {
courseId: this.courseId,
experimentalClassId: this.experimentalClassId,
pageNo: this.pageNo,
pageSize: this.pageSize
})
.then(res => {
this.customerData = res.message.rows
this.totals = res.message.total
})
.catch(err => {
console.log(err);
});
},
changeisExperimentSwitch(row) {
//
// let flag = '';
// if (row.isOpenProject) {
// flag = 0;
// } else {
// flag = 1;
// }
this.$post(this.api.updateIsExperiment, {
courseId: this.courseId,
experimentalClassId: this.experimentalClassId,
project: {
projectId: row.projectId,
isOpenProject: row.isOpenProject
}
});
},
changeisAttendanceSwitch(row) {
this.$post(this.api.updateIsAttendance, {
courseId: this.courseId,
experimentalClassId: this.experimentalClassId,
project: {
projectId: row.projectId,
isAttendance: row.isAttendance
}
});
},
currentChange(val){
this.pageNo = val;
this.getProject();
},
getAssesment(){
let data = {
courseId: this.courseId
}
this.$get(this.api.releaseAssesment,data).then(res => {
this.assessmentList = res.message
}).catch(res => {});
},
chooeseAss(val){
let obj = {};
obj = this.assessmentList.find((item)=>{
return item.id === val;
});
this.timesum = obj.timesum;
},
release(){
let timestamp = Date.parse(new Date());
let data = {
id: this.assessmentId,
assesmentState: 1,
releaseType: 0,
creationTime: timestamp,
endTime: '',
timesum: this.timesum
}
this.$post(this.api.updateState,data).then(res => {
this.isRelease = false
this.$message.success('发布考核成功');
}).catch(res => {});
},
toRelease(){
this.$router.push('/addassessment');
}
}
};
</script>
<style scoped lang="scss">
.div {
width: 250px;
height: 40px;
background: rgba(60, 60, 60, 1);
box-shadow: 0px 3px 9px 0px rgba(146, 120, 255, 0.44);
border-radius: 12px;
text-align: center;
line-height: 40px;
color: #ffffff;
margin-bottom: 10px;
margin-left: 150px;
.div1 {
width: 0;
height: 0;
border: 5px solid;
margin-left: 120px;
border-color: #3c3c3c transparent transparent;
}
}
.el-container {
background-color: #f0f0f0;
}
.mag {
margin-right: 20px;
margin-left: 20px;
}
.backimg {
width: 100%;
height: 430px;
}
.introduce_col {
margin-top: -100px;
position: relative;
z-index: 99;
width: 290px;
}
.mgb200 {
margin-left: 10px;
height: 400px;
}
.introduce {
font-size: 20px;
color: #333;
padding-bottom: 100px;
}
.introduce_title {
font-size: 26px;
margin-top: 20px;
}
.introduce ul {
margin-top: 40px;
/* width: 300px; */
position: absolute;
z-index: 999;
}
.introduce li {
padding: 25px 10px;
transition: all 0.5s linear;
border-radius: 10px;
margin-bottom: 10px;
width: 240px;
display: inline-block;
}
.introduce li:hover{
cursor:pointer
}
.activeBack {
background-color: #9076ff;
border-radius: 10px;
color: #fff;
}
.introduce_main {
padding: 30px 30px;
width: 98%;
}
.introduce_main span {
font-size: 20px;
color: #333333;
line-height: 48px;
}
.addAssessment{
margin-top: 10px;
text-align: right;
}
</style>

@ -1,59 +0,0 @@
<template>
<div class="main">
<!-- <div class="top">
<div style="margin-left:30px;cursor:pointer;" @click="back">
<i class="el-icon-arrow-left"></i> Back
</div>
<div class="title">考核成绩</div>
</div> -->
<div class="bottom">
<Achievement :studentId="studentId" :projectPermissions="1"></Achievement>
</div>
<div></div>
</div>
</template>
<script>
import Achievement from '../../components/common/Studentcommon/Achievement'
export default {
data(){
return{
studentId: this.$store.state.studentId
}
},
methods:{
back(){
this.$router.go(-1)
}
},
components:{
Achievement
}
};
</script>
<style lang="scss" scoped>
.bottom{
margin-top: 10px;
}
.top {
display: flex;
font-weight: bold;
height: 60px;
line-height: 60px;
.el-icon-arrow-left {
font-size: 5px;
font-weight: bold;
}
.title {
margin-left: 30px;
}
}
.main {
background: #ffffff;
}
</style>

@ -1,59 +0,0 @@
<template>
<div class="main">
<!-- <div class="top">
<div style="margin-left:30px;cursor:pointer;" @click="back">
<i class="el-icon-arrow-left"></i> Back
</div>
<div class="title">练习成绩</div>
</div> -->
<div class="bottom">
<Achievement :studentId="studentId" :projectPermissions="0"></Achievement>
</div>
<div></div>
</div>
</template>
<script>
import Achievement from '../../components/common/Studentcommon/Achievement'
export default {
data(){
return{
studentId: this.$store.state.studentId
}
},
methods:{
back(){
this.$router.go(-1)
}
},
components:{
Achievement
}
};
</script>
<style lang="scss" scoped>
.bottom{
margin-top: 10px;
}
.top {
display: flex;
font-weight: bold;
height: 60px;
line-height: 60px;
.el-icon-arrow-left {
font-size: 5px;
font-weight: bold;
}
.title {
margin-left: 30px;
}
}
.main {
background: #ffffff;
}
</style>

@ -1,200 +0,0 @@
<template>
<div class="horizontalVerticalCenter">
<!-- 头像部分 -->
<div class="headerContent">
<p class="p">{{studentName}}</p>
</div>
<!-- 考勤概览 -->
<div class="cka-Overview">
<p style="padding:28px 0;margin-left:28px">考勤概览</p>
<div class="newPractice-card">
<div class="newPractice-card-other">
<div class="card-other-score" style>
<p style="font-size:18px">考勤总数</p>
<p style="font-size:36px">{{count}}</p>
</div>
<div></div>
</div>
<div class="newPractice-card-other">
<div class="card-other-score">
<p style="font-size:18px">签到次数</p>
<p style="font-size:36px">{{signInNumber}}</p>
</div>
<div></div>
</div>
<div class="newPractice-card-other">
<div class="card-other-score">
<p style="font-size:18px">缺勤次数</p>
<p style="font-size:36px">{{absence}}</p>
</div>
<div></div>
</div>
<div class="newPractice-card-other">
<div class="card-other-score">
<p style="font-size:18px">剩余考勤次数</p>
<p style="font-size:36px">{{getSurplus}}</p>
</div>
<div></div>
</div>
</div>
</div>
<!-- 考勤明细 -->
<div style="margin-top:40px;margin-bottom:50px;width:98%">
<registration :studentId="this.$store.state.studentId" :courseId="this.$store.state.courseId"></registration>
</div>
</div>
</template>
<script>
import Headportrait from '../common/Studentcommon/Headportrait.vue';
import registration from '../common/Studentcommon/registration.vue';
export default {
data() {
return {
studentName: '远方',
count: '',
signInNumber: '',
absence: ''
};
},
mounted() {
// this.getData();
},
computed: {
changeCourseId() {
return this.$store.state.courseId;
},
getSurplus() {
return this.count - this.signInNumber - this.absence;
}
},
watch: {
changeCourseId() {
this.getData();
}
},
methods: {
getData() {
this.$get(this.api.queryAttendanceSignIn, { studentId: this.$store.state.studentId, courseId: this.$store.state.courseId })
.then(res => {
this.studentName = res.message.studentName;
this.count = res.message.count;
this.signInNumber = res.message.signInNumber;
this.absence = res.message.absence;
})
.catch(err => {
console.log(err);
});
}
},
components: {
Headportrait,
registration
}
};
</script>
<style lang="scss">
.horizontalVerticalCenter {
display: flex;
align-items: center;
flex-direction: column;
background: #f5f5f5;
}
.headerContent {
display: flex;
align-self: flex-start;
margin-left: 20px;
margin-top: 20px;
.p {
height: 60px;
line-height: 60px;
font-size: 25px;
margin-left: 10px;
color: #328aff;
}
}
.cka-Overview {
margin-top: 20px;
width: 98%;
height: 229px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
border-radius: 10px;
p {
margin-left: 25px;
font-size: 20px;
}
.newPractice-card {
width: 97%;
margin: 0 auto;
display: flex;
justify-content: space-between;
.newPractice-card-other:nth-child(1) {
background: url('../../assets/img/student1.png');
box-shadow: 0px 25px 20px -22px #ec92e0;
}
.newPractice-card-other:nth-child(2) {
background: url('../../assets/img/student2.png');
box-shadow: 0px 25px 20px -22px #60b8f6;
}
.newPractice-card-other:nth-child(3) {
background: url('../../assets/img/student3.png');
box-shadow: 0px 25px 20px -22px #fe787a;
}
.newPractice-card-other:nth-child(4) {
background: url('../../assets/img/student4.png');
box-shadow: 0px 25px 20px -22px #fbbb6e;
}
.newPractice-card-other {
width: 400px;
height: 120px;
box-shadow: 0px 3px 18px 0px rgba(84, 84, 84, 0.09);
border-radius: 8px;
.card-other-score {
margin-left: 25px;
margin-top: 18px;
height: 88px;
position: relative;
p {
font-size: 18px;
color: #ffffff;
}
p:last-child {
position: absolute;
bottom: 0px;
color: #ffffff;
font-size: 26px;
}
}
}
}
}
.CKA-overview {
width: 1450px;
height: 200px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 21px 0px rgba(48, 115, 248, 0.1);
border-radius: 10px;
}
.CheckWorkAttendance-head {
margin-top: 20px;
width: 95%;
display: flex;
margin-bottom: 20px;
p {
margin-left: 20px;
color: #328aff;
font-size: 20px;
}
}
</style>

@ -36,50 +36,6 @@ export default new Router({
path: '/showExperiment',
component: () => import(/* webpackChunkName: "403" */ '../components/page/ShowExperiment.vue')
},
{
path: '/project',
component: () => import(/* webpackChunkName: "403" */ '../components/page/Project.vue')
},
{
path: '/teacherhome',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/TeacherHome.vue'),
meta: { title: '教师' }
},
{
path: '/addassessment',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/AddAssessment.vue'),
meta: { title: '创建考核' }
},
{
path: '/student',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Student.vue'),
meta: { title: '学生' }
},
{
path: '/teacherindex',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/TeacherIndex.vue'),
meta: { title: '实验教学' }
},
{
path: '/checkresult',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/CheckResult.vue'),
meta: { title: '查看成绩' }
},
{
path: '/classdetail',
component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ClassDetail.vue'),
meta: { title: '班级详情' }
},
{
path: '/icon',
component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
meta: { title: '自定义图标' }
},
{
path: '/tabs',
component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
meta: { title: 'tab选项卡' }
},
{
// 国际化组件
path: '/i18n',
@ -102,14 +58,6 @@ export default new Router({
component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
meta: { title: '403' }
}
,{
path: '/examinationResults',
component: () => import(/* webpackChunkName: "403" */ '../components/page/examinationResults.vue'),
}
,{
path: '/practiceResults',
component: () => import(/* webpackChunkName: "403" */ '../components/page/practiceResults.vue'),
}
]
},

@ -5,11 +5,12 @@
let host = ''
if(process.env.NODE_ENV === 'development'){
host = 'http://116.63.168.79'
host = 'http://122.9.154.146'
}
export default {
logins: `${host}/liuwanr/userInfo/logins`, //登录 
save: `${host}/evaluation/tms/userInfo/add`, //注册
updateLogInNumber: `${host}/liuwanr/userInfo/updateLogInNumber`, //用户登录修改登录次数和登陆时间
uploadUserAvatars: `${host}/liuwanr/userInfo/uploadUserAvatars`, //上传头像
loginSchool: `${host}/liuwanr/userInfo/loginSchoolClient`, //登陆查询学校
@ -18,114 +19,19 @@ export default {
queryCourseProfessionalClass: `${host}/liuwanr/course/queryCourseProfessionalClass`, //查询专业类
queryCourseProfessional: `${host}/liuwanr/course/queryCourseProfessional`, //查询专业
queryPhone: `${host}/liuwanr/userInfo/queryPhone`, //查询电话是否存在
findPasswordByEmail: `${host}/evaluation/tms/userInfo/findPasswordByEmail`,
findPasswordByPhone: `${host}/evaluation/tms/userInfo/findPasswordByPhone`,
resetPassword: `${host}/evaluation/tms/userInfo/resetPassword`,
checkCode: `${host}/evaluation/tms/userInfo/checkCode`,
save: `${host}/evaluation/tms/userInfo/add`, //注册
addStuPro: `${host}/evaluation/stuProfessionalArchitecture/addStuProfessionalArchitecture`, //添加学生专业
queryStuPro: `${host}/evaluation/stuProfessionalArchitecture/queryStuProfessionalArchitecture`, //查询学生专业
queryStuGrade: `${host}/evaluation/stuProfessionalArchitecture/queryStuGrade`, //查询学生年级
queryStuClass: `${host}/evaluation/stuProfessionalArchitecture/queryStuClass`, //查询学生班级
deleteStuPro: `${host}/evaluation/stuProfessionalArchitecture/deleteStuProfessionalArchitecture`, //删除学生专业
updateStuPro: `${host}/evaluation/stuProfessionalArchitecture/updateStuProfessionalArchitecture`, //编辑学生专业
queryStudentData: `${host}/evaluation/student/queryStudent`, //查询学生
queryStudentDetails: `${host}/evaluation/student/queryStudentDetails`, //查询学生详情
addStudent: `${host}/evaluation/student/addStudent`, //添加学生
deleteStudent: `${host}/evaluation/student/deleteStudent`, //删除学生
updateStudent: `${host}/evaluation/student/updateStudent`, //编辑学生
updateStuGrade: `${host}/evaluation/stuProfessionalArchitecture/updateStuGrade`, //编辑学生年级
addStuGrade: `${host}/evaluation/stuProfessionalArchitecture/addStuGrade`, //添加学生年级
deleteStuGrade: `${host}/evaluation/stuProfessionalArchitecture/deleteStuGrade`, //删除学生年级
updateStuClass: `${host}/evaluation/stuProfessionalArchitecture/updateStuClass`, //编辑学生班级
addStuClass: `${host}/evaluation/stuProfessionalArchitecture/addStuClass`, //添加学生班级
deleteStuClass: `${host}/evaluation/stuProfessionalArchitecture/deleteStuClass`, //删除学生班级
queryPersonalCenter:`${host}/evaluation/personalCenter/queryPersonalCenter`,
addStaffPro: `${host}/evaluation/staffProfessionalArchitecture/addStaffProfessionalArchitecture`, //添加员工专业
queryStaffPro: `${host}/evaluation/staffProfessionalArchitecture/queryAllStaffProfessionalArchitecture`, //查询员工专业
deleteStaffPro: `${host}/evaluation/staffProfessionalArchitecture/deleteStaffProfessionalArchitecture`, //删除员工专业
deleteStaffGrade: `${host}/evaluation/staffGrade/deleteStaffGrade`, //删除员工部门
updateStaffPro: `${host}/evaluation/staffProfessionalArchitecture/updateStaffProfessionalArchitecture`, //编辑员工专业
queryStaffGrade: `${host}/evaluation/staffGrade/queryStaffGrade`, //查询员工部门
queryStaffGradeDetails: `${host}/evaluation/staffGrade/queryStaffGradeDetails`, //查询员工部门详情
addStaffGrade: `${host}/evaluation/staffGrade/addStaffGrade`, //新增员工部门
updateStaffGrade: `${host}/evaluation/staffGrade/updateStaffGrade`, //编辑员工部
queryStaff: `${host}/evaluation/staff/queryStaff`, //查询员工
addStaff: `${host}/evaluation/staff/addStaff`, //添加员工
queryStaffDetails: `${host}/evaluation/staff/queryStaffDetails`, //员工详情
deleteStaff: `${host}/evaluation/staff/deleteStaff`, //删除员工
updateStaff: `${host}/evaluation/staff/updateStaff`, //更新员工
readStaff: `${host}/evaluation/staff/readStaff`, //上传员工模板
queryGetByClassName:`${host}/evaluation/makeuplist/queryGetByClassName`,
deleteExperimentalClass:`${host}/evaluation/experimentalClass/deleteExperimentalClass`,//删除实验班级
queryAssesmentcondition:`${host}/evaluation/assesment/queryAssesmentcondition`,//考核成绩表格
queryGetById:`${host}/evaluation/assesment/queryGetById`,//查询考核信息
updateAssesment:`${host}/evaluation/assesment/updateAssesment`,//修改考核
updateState:`${host}/evaluation/assesment/updateState`,//点击启动修改考核时间
updateAssesmentTime:`${host}/evaluation/assesment/updateAssesmentTime`,//点击提前结束获取当前时间
queryAssesmentScore:`${host}/evaluation/assesment/queryAssesmentScore`,//获取查询成绩页面
queryAssesmentAchievement:`${host}/evaluation/assesment/queryAssesmentAchievement`,//查询成绩明细板块
excelExport:`${host}/evaluation/makeuplist/excelExport`,//模板下载
importMakeuplist:`${host}/evaluation/makeuplist/importMakeuplist`, //模板上传
queryAllExperiment:`${host}/evaluation/experiment/queryAllExperiment`,//实验项目渲染,
queryAttendanceSignIn:`${host}/evaluation/attendance/queryAttendanceSignIn`,//获得用户ID 及考勤总数
insertAttendance:`${host}/evaluation/Experimentallearning/insertAttendance`,//改变签到状态
queryExperimentallearning:`${host}/evaluation/Experimentallearning/queryExperimentallearning`,//获取项目名和签到状态
queryCourseDetails:`${host}/evaluation/course/queryCourseDetails`,//获取课程简介和课程目标
queryTeacherName:`${host}/evaluation/Experimentallearning/queryTeacherName`,//获取教师信息
queryStudentName:`${host}/evaluation/Experimentallearning/queryStudentName`,//获取学生信息
queryPracticeVo:`${host}/evaluation/experiment/queryPracticeVo`,//获取表格数据
queryStudentAssessment:`${host}/evaluation/assesmentRecord/queryStudentAssessment`, //查询姓名和个人平均分和最高分
queryAssesmentRecordMaxScore:`${host}/evaluation/assesmentRecord/queryAssesmentRecordMaxScore`, //查询学校平均分最高分
queryAssesmentRecordWhole:`${host}/evaluation/assesmentRecord/queryAssesmentRecordWhole`,//查询全国平均考核得分
queryAssesmentRecordMaxWhole:`${host}/evaluation/assesmentRecord/queryAssesmentRecordMaxWhole`, //查询全国平均分最高分
queryStudentByPage:`${host}/evaluation/experiment/queryStudentByPage`, //查询练习记录表格数据
queryProject:`${host}/evaluation/ProjectAndCourse/queryProject`,//实验项目信息展示
updateIsExperiment:`${host}/evaluation/ProjectAndCourse/updateIsExperiment`,//修改是否开启项目
updateIsAttendance:`${host}/evaluation/ProjectAndCourse/updateIsAttendance`,//修改是否考勤
addAssesment:`${host}/evaluation/assesment/addAssesment`,//添加考核
queryStuProfessionalArchitecture:`${host}/evaluation/stuProfessionalArchitecture/queryStuProfessionalArchitecture`,//修改是否考勤
queryStuGrade:`${host}/evaluation/stuProfessionalArchitecture/queryStuGrade`,//修改是否考勤
queryStuClass:`${host}/evaluation/stuProfessionalArchitecture/queryStuClass`,//修改是否考勤
queryStudent:`${host}/evaluation/stuProfessionalArchitecture/queryStudent`,//修改是否考勤
queryAttendanceDetailed:`${host}/evaluation/attendance/queryAttendanceDetailed`,//获取考勤列表数据
queryExperimentClass:`${host}/evaluation/experimentalClass/queryExperimentalClass`,//查询实验班级
queryExperimentalClassSP:`${host}/evaluation/experimentalClass/queryExperimentalClassSP`,//查询实验班级学生专业
queryStudentClass:`${host}/evaluation/experimentalClass/queryStudentClass`,//查询学生行政班级
queryClassDetails:`${host}/evaluation/experimentalClass/queryExperimentClassDetails`,//查询实验班级详情
updateClassName:`${host}/evaluation/experimentalClass/updateExperimentClassName`,//修改实验班级名称
updateState:`${host}/evaluation/assesment/updateState`,//修改考核状态
experimentClassDeleteStudent:`${host}/evaluation/experimentalClass/experimentClassDeleteStudent`, //移除实验班学生
addExperimentalClass:`${host}/evaluation/experimentalClass/addExperimentalClass`,//添加实验班级
platformQueryCourse:`${host}/evaluation/course/platformQueryCourse`,
queryAssesment:`${host}/evaluation/Experimentallearning/queryAssesment`,
getCourse:`${host}/evaluation/course/getCourse`,//获取课程简介,教学目标,课程名称
getProfessionals:`${host}/evaluation/experimentalClass/getProfessionals`,// 请求专业下拉框数据
getStudentClass:`${host}/evaluation/experimentalClass/getStudentClass`,//请求行政班级下拉框数据
getCourseSchedule:`${host}/evaluation/ProjectAndCourse/getCourseSchedule`,//课程进度
releaseAssesment:`${host}/evaluation/assesment/releaseAssesment`,//发布考核
experimentClassAddStudent:`${host}/evaluation/experimentalClass/experimentClassAddStudent`,//发布考核
getExperimentalClass:`${host}/evaluation/assesment/getExperimentalClass`,//实验班级一级标题
getCreationTime:`${host}/evaluation/assesment/getCreationTime`,//实验班级二级标题
deleteAssesment:`${host}/evaluation/assesment/deleteAssesment`,//删除考核
queryStudentCourse:`${host}/evaluation/Experimentallearning/queryStudentCourse`,//学生查询课程
getByCourseId:`${host}/evaluation/assesment/getByCourseId`,//查询系统列表
getCoursevideo:`${host}/evaluation/tms/classTech/simulationPlayList`,//开始课程-课程视频
queryAccountIsExist:`${host}/evaluation/userInfo/queryAccountIsExist`,//查询员工,学生账号是否存在接口
queryWorkNumberIsExist:`${host}/evaluation/tms/userInfo/queryWorkNumberIsExist`,//查询学号、工号是否存在
queryStaffPAN:`${host}/liuwanr/staffProfessionalArchitecture/queryStaffPAN`,//查询员工专业是否存在
queryStudentisAssess:`${host}/evaluation/assesment/queryStudentisAssess`,//查看正在参与考核的学生
queryProvince: `${host}/liuwanr/province/queryProvince`, //查询省份
queryCity: `${host}/liuwanr/city/queryCity`, //查询城市
querySchoolData: `${host}/liuwanr/customer/querySchool`, //根据学校名称查询学校信息
findPasswordByEmail: `${host}/evaluation/tms/userInfo/findPasswordByEmail`,
findPasswordByPhone: `${host}/evaluation/tms/userInfo/findPasswordByPhone`,
resetPassword: `${host}/evaluation/tms/userInfo/resetPassword`,
checkCode: `${host}/evaluation/tms/userInfo/checkCode`,
getCoursevideo:`${host}/evaluation/tms/classTech/simulationPlayList`,//开始课程-课程视频
queryPersonalCenter:`${host}/evaluation/personalCenter/queryPersonalCenter`,
examinePassword:`${host}/evaluation/tms/user/examinePassword`,//更换密码
userinfoUpdate:`${host}/evaluation/tms/user/update`,//个人中心信息修改
@ -135,6 +41,7 @@ export default {
sendPhoneCode:`${host}/evaluation/tms/user/sendPhoneCode`,//发送手机验证码
bindPhone:`${host}/evaluation/tms/user/bindPhone`,//校验手机验证码
// 测评
canExperiment: `${host}/evaluation/tms/evaluationrecord/can_experiment`, //查询是否能够开启实验
openExercise: `${host}/evaluation/tms/evaluationrecord/openExercise`, //查询是否能够开启虚拟仿真实验
openExerciseOrTeaching: `${host}/evaluation/tms/evaluationrecord/openExerciseOrTeaching`, //查询是否能够开启虚拟仿真实验
@ -147,6 +54,7 @@ export default {
experimentStart: `${host}/evaluation/tms/evaluationrecord/start`, //开始测评
experimentSubmit: `${host}/evaluation/tms/evaluationrecord/submit`, //提交测评
// 实验记录
fictitiousRecord: `${host}/evaluation/fictitious/projectrecord/user/kdRecord`, //用户端实验记录
exportProjectRecord: `${host}/evaluation/fictitious/projectrecord/user/exportProjectRecord`, //虚拟实验记录导出
exportExperimentProjectRecord: `${host}/evaluation/fictitious/projectrecord/user/exportExperimentProjectRecord`, //个人实验记录导出
@ -154,6 +62,7 @@ export default {
experimentRecord: `${host}/evaluation/fictitious/projectrecord/user/experimentRecord`, //用户端教学实验记录
reportSignature:`${host}/evaluation/signature/reportSignature`,
// 我的考核
joinPractice: `${host}/evaluation/tms/classTech/joinPractice`, //通过邀请码进入实验
queryArchievement: `${host}/evaluation/tms/classTech/queryExperimentalReport`, //查看教学实验报告
queryVirtualReport: `${host}/evaluation/tms/classTech/queryVirtualReport`, //查看虚仿实验报告
@ -162,5 +71,7 @@ export default {
getReport: `${host}/evaluation/Achievement/getReport`,
uploadSignature:`${host}/evaluation/evaluation/signature/uploadSignature`,
getItemContentByIds:`${host}/kdSys/getItemContentByIds`,
queryItem: `http://116.63.168.79/kdSys/queryItem`,
queryItem: `${host}/kdSys/queryItem`,
mineClass: `${host}/evaluation/student/assessment/mineClass`,
stuAssessmentByScreen: `${host}/evaluation/student/assessment/stuAssessmentByScreen`,
}
Loading…
Cancel
Save