yujialong 4 years ago
parent 356f120dcd
commit 68af41a4b7
  1. 2
      public/index.html
  2. 35
      src/api/index.js
  3. 8
      src/components/doReview/index.vue
  4. 24
      src/pages/achievement/list/examResults.vue
  5. 264
      src/pages/assessment/add/index.vue
  6. 232
      src/pages/assessment/list/index.vue
  7. 139
      src/pages/assessment/list/studentSide.vue
  8. 154
      src/pages/assessment/list/studentTree.vue
  9. 102
      src/pages/assessment/monitor/index.vue
  10. 6
      src/pages/assessment/review/index.vue
  11. 28
      src/pages/quesBank/list/globalQuesBank.vue
  12. 17
      src/pages/quesBank/list/myQuesBank.vue
  13. 2
      src/pages/quesBank/list/quesDialog.vue
  14. 62
      src/pages/student/list/index.vue
  15. 93
      src/pages/student/list/studentSide.vue
  16. 142
      src/pages/student/list/studentTree.vue
  17. 2
      src/pages/system/list/role.vue
  18. 4
      src/pages/system/list/staff.vue
  19. 182
      src/pages/testPaper/add/index.vue
  20. 30
      src/pages/testPaper/list/allTestPaper.vue
  21. 37
      src/pages/testPaper/list/myTestPaper.vue
  22. 2
      src/pages/testPaper/review/index.vue
  23. 3
      src/plugins/requests/index.js
  24. 3
      src/setting.js
  25. 27
      src/store/modules/assessment.js
  26. 104
      src/styles/pages/tree.scss
  27. 12
      vue.config.js

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css">
<title>电子竞技在线教学资源管理平台</title> <title>电子竞技数字化考试系统-管理端</title>
</head> </head>
<body> <body>
<noscript> <noscript>

@ -1,10 +1,11 @@
let host = 'http://192.168.31.152:8001'
export default { export default {
logins: `management/userInfo/login`, //登录  logins: `management/userInfo/login`, //登录 
// 查询省份城市 // 查询省份城市
queryProvince: `enterprise/province/queryProvince`, queryProvince: `cjEnterprise/province/queryProvince`,
queryCity: `enterprise/city/queryCity`, queryCity: `cjEnterprise/city/queryCity`,
queryClient: `enterprise/client/list`, queryClient: `cjEnterprise/client/list`,
userinfoUpdate:`management/userInfo/update`,//个人中心信息修改 userinfoUpdate:`management/userInfo/update`,//个人中心信息修改
userinfo:`management/userInfo/getUserInfo`,//个人中心信息展示 userinfo:`management/userInfo/getUserInfo`,//个人中心信息展示
@ -83,18 +84,19 @@ export default {
removeMoreVideo: `oss/manage/removeMoreVideo`, //批量删除视频文件 removeMoreVideo: `oss/manage/removeMoreVideo`, //批量删除视频文件
removeVideo: `oss/manage/removeVideo`, //删除视频文件 removeVideo: `oss/manage/removeVideo`, //删除视频文件
getTypeByOneLever:`enterprise/questionBank/getTypeByOneLever`, getTypeByOneLever:`cjEnterprise/questionBank/getTypeByOneLever`,
typesList:`enterprise/questionTypes/typesList`, typesList:`cjEnterprise/questionTypes/typesList`,
// 共享相关 // 共享相关
deleteBySharing:`management/questionSharing/deleteBySharing`, deleteBySharing:`management/questionSharing/deleteBySharing`,
detailSharing:`management/questionSharing/detail`, detailSharing:`management/questionSharing/detail`,
getMeSharingInfo:`management/questionSharing/getMeSharingInfo`, getMeSharingInfo:`management/questionSharing/getMeSharingInfo`,
pageByConditionSharing:`management/questionSharing/pageByConditionSharing`, pageByConditionSharing:`management/questionSharing/pageByConditionSharing`,
saveSharing:`management/questionSharing/save`, saveSharing:`management/questionSharing/save`,
batchSave:`enterprise/questionSharing/batchSave`, batchSave:`cjEnterprise/questionSharing/batchSave`,
cancelByMySharing:`enterprise/questionSharing/cancelByMySharing`, cancelByMySharing:`cjEnterprise/questionSharing/cancelByMySharing`,
delByMySharing:`management/questionSharing/delByMySharing`, delByMySharing:`management/questionSharing/delByMySharing`,
deleteByMeSubject:`enterprise/questionSharing/deleteByMeSubject`, deleteByMeSubject:`cjEnterprise/questionSharing/deleteByMeSubject`,
deleteByMeSubjectBySharing:`cjEnterprise/questionSharing/deleteByMeSubjectBySharing`,
// 试卷管理 // 试卷管理
copyPaper:`management/testPaper/copyPaper`, copyPaper:`management/testPaper/copyPaper`,
@ -105,6 +107,8 @@ export default {
previewtestPaper:`management/testPaper/preview`, previewtestPaper:`management/testPaper/preview`,
saveOrUpdatetestPaper:`management/testPaper/saveOrUpdate`, saveOrUpdatetestPaper:`management/testPaper/saveOrUpdate`,
getModifyByList:`management/testPaper/getModifyByList`, getModifyByList:`management/testPaper/getModifyByList`,
modifyState:`management/testPaper/modifyState`,
schoolTestPaperByRelease:`management/testPaper/schoolTestPaperByRelease`,
// 试题信息相关 // 试题信息相关
addQuestions:`management/questions/addQuestions`, addQuestions:`management/questions/addQuestions`,
@ -119,7 +123,12 @@ export default {
deleteAssessment:`/management/assessment/deleteAssessment`, deleteAssessment:`/management/assessment/deleteAssessment`,
queryAssessment:`/management/assessment/queryAssessment`, queryAssessment:`/management/assessment/queryAssessment`,
queryAssessmentName:`/management/assessment/queryAssessmentName`, queryAssessmentName:`/management/assessment/queryAssessmentName`,
queryClassAssessment:`/management/assessment/queryClass`,
updateAssessment:`/management/assessment/updateAssessment`, updateAssessment:`/management/assessment/updateAssessment`,
queryAssessmentDetails:`/management/assessment/queryAssessmentDetails`,
queryAssessmentNumber:`/management/assessment/queryAssessmentNumber`,
monitorList:`management/monitor/monitorList`,
compulsory:`management/monitor/compulsory`,
// 考试批阅 // 考试批阅
correcting:`/management/review/correcting`, correcting:`/management/review/correcting`,
@ -128,11 +137,11 @@ export default {
reviewList:`/management/review/reviewList`, reviewList:`/management/review/reviewList`,
// 题库管理 // 题库管理
deleteByOne:`enterprise/questions/deleteByOne`, deleteByOne:`cjEnterprise/questions/deleteByOne`,
findById:`enterprise/questions/findById`, findById:`cjEnterprise/questions/findById`,
pageByCondition:`enterprise/questions/pageByCondition`, pageByCondition:`cjEnterprise/questions/pageByCondition`,
updateQuestions:`enterprise/questions/update`, updateQuestions:`cjEnterprise/questions/update`,
getExcel:`enterprise/questions/getExcel`, getExcel:`cjEnterprise/questions/getExcel`,
impExcel:`management/questions/impExcel`, impExcel:`management/questions/impExcel`,
// 成绩管理 // 成绩管理

@ -82,7 +82,7 @@ export default {
'userId','clientId' 'userId','clientId'
]), ]),
...mapState('assessment', [ ...mapState('assessment', [
'id','paperId','isReview','reviewStatus' 'reviewId','paperId','isReview','reviewStatus'
]), ]),
...mapGetters('assessment', [ ...mapGetters('assessment', [
'getCorrectingName' 'getCorrectingName'
@ -98,7 +98,7 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
this.$post(`${this.api.correcting}?assessmentId=${1}&userId=${566}&paperId=${1}`) this.$post(`${this.api.correcting}?assessmentId=${this.reviewId}&userId=${this.userId}&paperId=${this.paperId}`)
.then(res => { .then(res => {
this.list = res.data.list this.list = res.data.list
this.list.forEach(n => { this.list.forEach(n => {
@ -142,9 +142,7 @@ export default {
this.$message.success(status ? '提交成功' : '保存成功') this.$message.success(status ? '提交成功' : '保存成功')
this.$router.back() this.$router.back()
}) })
.catch(err => { .catch(err => {})
})
}, },
}, },
}; };

@ -156,8 +156,8 @@ export default {
}, },
getClass() { getClass() {
this.$post(this.api.getMyClass,{ this.$post(this.api.getMyClass,{
// userId: this.userId userId: this.userId
userId: 1 // userId: 1
}) })
.then(res => { .then(res => {
this.classList = res.data.list this.classList = res.data.list
@ -168,7 +168,7 @@ export default {
}, },
getAssess() { getAssess() {
this.$post(this.api.getAssessmentByClass,{ this.$post(this.api.getAssessmentByClass,{
userId: 1, userId: this.userId,
classId: this.classId classId: this.classId
}) })
.then(res => { .then(res => {
@ -198,13 +198,17 @@ export default {
this.$router.push('detail') this.$router.push('detail')
}, },
toStat(){ toStat(){
this.setInfo({ if(this.listData.length){
id: this.listData[0].paperId, this.setInfo({
assessmentId: this.assessmentId, id: this.listData[0].paperId,
assessmentName: this.assessmentName, assessmentId: this.assessmentId,
classId: this.classId assessmentName: this.assessmentName,
}) classId: this.classId
this.$router.push('statistics') })
this.$router.push('statistics')
}else{
this.$message.warning('没有考试成绩')
}
}, },
exportData(){ exportData(){

@ -1,264 +0,0 @@
<template>
<div>
<el-form :disabled="isDetail">
<el-card shadow="hover" class="m-b-20">
<div class="flex j-between">
<div class="per_title" v-throttle @click="goback()">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school">{{isDetail ? '查看' : (id ? '更新' : '创建')}}考核</span>
</div>
<div>
<el-button type="primary" size="small" round v-throttle @click="save" v-show="!isDetail">{{id ? '更新' : '创建'}}</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">考核名称</p>
<el-input
placeholder="请输入考核名称"
v-model="assessmentName"
clearable
maxlength="25"
class="inline_input"
></el-input>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">考核类型</p>
<div class="inline_input">
<el-select v-model="classificationId" placeholder="请选择考核类型">
<el-option
v-for="item in classificationList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">考核时间</p>
<el-date-picker
size="small"
v-model="date"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions"
></el-date-picker>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">试卷选择</p>
<div class="inline_input">
<el-button type="primary" @click="openSelect">试卷选择</el-button>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">发布班级</p>
<div class="inline_input">
<div class="per-wrap">
<el-tree
ref="per"
:data="permissions"
show-checkbox
node-key="id"
:default-expanded-keys="checkedIds"
:default-checked-keys="checkedIds"
:props="defaultProps">
</el-tree>
</div>
</div>
</div>
</el-card>
</el-form>
<el-dialog title="试卷选择" :visible.sync="selectVisible" width="40%" @close="closeSelect" :close-on-click-modal="false">
<div class="flex-justify-end">
<el-form label-width="80px" inline>
<el-form-item class="no-mb" label="所属考核">
<el-select v-model="publishStatus" 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 class="no-mb">
<el-input
placeholder="请输入试卷名称"
prefix-icon="el-icon-search"
v-model="keyword"
clearable
></el-input>
</el-form-item>
</el-form>
</div>
<el-table
:data="listData"
ref="table"
row-key="id"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
>
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="projectId" :label="scope.row.projectId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="100" label="序号" align="center">
<template
slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column>
<el-table-column prop="name" label="试卷名称" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="showQues(scope.row)">预览</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
@current-change="handleCurrentChange"
:current-page="page"
:page-size="pageSize"
layout="total,prev, pager, next"
:total="total"
></el-pagination>
</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 { mapState } from 'vuex'
export default {
data() {
return {
id: '',
assessmentName: '',
classId: '',
date: [],
startTime: '',
endTime: '',
state: '',
testPaperId: '',
type: '',
page: 1,
pageSize: 10,
total: 0,
isDetail: Boolean(this.$route.query.show),
selectVisible: false
};
},
computed: {
...mapState('user', [
'userId','clientId'
])
},
watch: {
date: function(val){
if(val){
this.startTime = val[0]
this.endTime = val[1]
}else{
this.startTime = ''
this.endTime = ''
}
this.getData()
}
},
mounted() {
this.id = this.$route.query.id
this.id && this.getData()
},
methods: {
save() {
if(this.assessmentName === '') return this.$message.warning('请填写考核名称')
if(this.type === '') return this.$message.warning('请选择考核类型')
if(this.startTime === '') return this.$message.warning('请选择考核时间')
if(this.testPaperId === '') return this.$message.warning('请选择试卷')
let data = {
id: this.id,
userId: this.userId,
assessmentName: this.assessmentName,
type: this.type,
startTime: this.startTime,
endTime: this.endTime,
}
if(this.id){
this.$put(this.api.editCourse, data).then(res => {
this.$message.success('修改成功');
this.$router.back()
})
.catch(err => {
});
}else{
this.$post(this.api.addCourse, data).then(res => {
this.$message.success('创建成功');
this.$router.back()
})
.catch(err => {
});
}
},
getData() {
this.$get(`${this.api.getCourse}/${this.id}`)
.then(res => {
})
.catch(err => {
});
},
goback() {
if(this.isDetail){
this.$router.back()
}else{
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', {
type: 'warning'
})
.then(() => {
this.$router.back()
})
.catch(() => {});
}
},
openSelect(){
this.selectVisible = true
}
},
};
</script>
<style lang="scss" scoped>
.inline_input {
width: 300px;
}
.per-wrap{
max-height: 400px;
overflow: auto;
}
</style>

@ -59,7 +59,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="className" label="考试班级" align="center"></el-table-column> <el-table-column prop="className" label="考试班级" align="center"></el-table-column>
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> <el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<template v-if="scope.row.state == 1"> <template v-if="scope.row.state == 1">
@ -123,15 +123,7 @@
</el-tag> </el-tag>
</el-form-item> </el-form-item>
<el-form-item label="发布班级"> <el-form-item label="发布班级">
<el-tree <studentSide ref="getSelectData" :classId="form.classId" :studentId="form.studentId" :key="form.id" @fircheck="fircheck" @twocheck="twocheck" @threecheck="threecheck" @fourcheck="fourcheck"></studentSide>
ref="class"
:data="classList"
show-checkbox
node-key="classId"
:default-expanded-keys="checkedIds"
:default-checked-keys="checkedIds"
:props="defaultProps">
</el-tree>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -162,6 +154,7 @@
<el-table <el-table
:data="testPaperData" :data="testPaperData"
max-height="400"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
@ -185,7 +178,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <!-- <div class="pagination">
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@ -194,7 +187,7 @@
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="totalPaper" :total="totalPaper"
></el-pagination> ></el-pagination>
</div> </div> -->
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="selectVisible = false">取消</el-button> <el-button @click="selectVisible = false">取消</el-button>
@ -206,15 +199,15 @@
<div class="details"> <div class="details">
<div class="line"> <div class="line">
<span class="key">考核内容</span> <span class="key">考核内容</span>
<p class="val">测试</p> <p class="val">{{testPaperName}}</p>
</div> </div>
<div class="line"> <div class="line">
<span class="key">考核题数</span> <span class="key">考核题数</span>
<p class="val">12000</p> <p class="val">{{quesNum}}</p>
</div> </div>
<div class="line"> <div class="line">
<span class="key">考核人数</span> <span class="key">考核人数</span>
<p class="val">211</p> <p class="val">{{assPeopleNum}}</p>
</div> </div>
<div class="line"> <div class="line">
<span class="key">考核总分</span> <span class="key">考核总分</span>
@ -227,6 +220,8 @@
<script> <script>
import { mapState,mapGetters,mapActions } from 'vuex' import { mapState,mapGetters,mapActions } from 'vuex'
import studentSide from './studentSide'
import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
@ -246,6 +241,8 @@ export default {
originalName: '', originalName: '',
nameRepeat: false, nameRepeat: false,
form: { form: {
classId: '',
studentId: [],
assessmentName: '', assessmentName: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
@ -259,7 +256,6 @@ export default {
return time.getTime() < new Date().getTime() - 86400000 return time.getTime() < new Date().getTime() - 86400000
} }
}, },
testPaperName: '',
classList: [], classList: [],
checkedIds: [], checkedIds: [],
defaultProps: { defaultProps: {
@ -273,9 +269,15 @@ export default {
pageSizePaper: 10, pageSizePaper: 10,
totalPaper: 0, totalPaper: 0,
testPaperData: [], testPaperData: [],
testPaperId: '' testPaperId: '',
testPaperName: '',
quesNum: 0,
assPeopleNum: 0
}; };
}, },
components: {
studentSide
},
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'userId','clientId' 'userId','clientId'
@ -326,7 +328,8 @@ export default {
size: this.pageSize, size: this.pageSize,
type: this.type, type: this.type,
state: this.state, state: this.state,
assessmentName: this.keyword assessmentName: this.keyword,
userId: this.userId
}) })
.then(res => { .then(res => {
this.listData = res.data.Assessment this.listData = res.data.Assessment
@ -334,6 +337,119 @@ export default {
}) })
.catch(err => {}) .catch(err => {})
}, },
handleCheck(data){
let professionalStudentIds = []
let gradeIds = []
let classIds = []
let studentId = []
data.forEach( e => {
if(e.ischeck){
professionalStudentIds.push(e.stuProfessionalArchitectureId)
}else{
util.removeByValue(professionalStudentIds, e.stuProfessionalArchitectureId);
}
e.children.forEach( r => {
if(r.ischeck){
gradeIds.push(r.gradeId)
}else{
util.removeByValue(gradeIds, r.gradeId);
}
r.children.forEach( n => {
if(n.ischeck){
classIds.push(n.classId)
}else{
util.removeByValue(classIds, n.classId);
}
n.children.forEach( j => {
if(j.ischeck){
studentId.push(j.userId)
}else{
util.removeByValue(studentId, j.userId);
}
})
})
})
})
this.form.classId = classIds.toString()
this.form.studentId = studentId
},
fircheck(val,val2){
val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck)
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck))
this.handleCheck(val2)
},
twocheck(val,val2){
val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck)
val2.forEach( e => {
e.children.forEach( r => {
if(r.gradeId == val.gradeId){
if(e.children.every(i => i.ischeck)){
e.ischeck = true
}else{
e.ischeck = false
}
}
})
})
this.handleCheck(val2)
},
threecheck(val,val2){
val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck)
val2.forEach( e => {
e.children.forEach( r => {
r.children.forEach( n => {
if(n.classId == val.classId){
if(r.children.every(i => i.ischeck)){
r.ischeck = true
}else{
r.ischeck = false
}
}
})
if(e.children.every(i => i.ischeck)){
e.ischeck = true
}else{
e.ischeck = false
}
})
})
this.handleCheck(val2)
},
fourcheck(val,val2){
val.ischeck = !val.ischeck
val2.forEach( e => {
e.children.forEach( r => {
r.children.forEach( n => {
n.children.forEach( j => {
if(j.studentId == val.studentId){
if(n.children.every(i => i.ischeck)){
n.ischeck = true
}else{
n.ischeck = false
}
}
})
})
if(r.children.every(i => i.ischeck)){
r.ischeck = true
}else{
r.ischeck = false
}
})
if(e.children.every(i => i.ischeck)){
e.ischeck = true
}else{
e.ischeck = false
}
})
this.handleCheck(val2)
},
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val;
this.getData(); this.getData();
@ -346,16 +462,19 @@ export default {
this.$post(`${this.api.deleteAssessment}?assessmentIds=${row.id}`).then(res => { this.$post(`${this.api.deleteAssessment}?assessmentIds=${row.id}`).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {})
}) })
.catch(() => {}); .catch(() => {})
}, },
edit(row){ edit(row){
this.isAdd = false this.$get(`${this.api.queryAssessmentNumber}?id=${row.id}`).then(res => {
this.form = row this.form = row
this.time = [this.form.startTime,this.form.endTime] this.form.studentId = res.data.studentId
this.addVisible = true this.testPaperName = row.name
this.getClass(row) this.time = [this.form.startTime,this.form.endTime]
this.addVisible = true
this.isAdd = false
}).catch(err => {})
}, },
nameChange(){ nameChange(){
if(this.form.assessmentName !== this.originalName){ if(this.form.assessmentName !== this.originalName){
@ -372,10 +491,18 @@ export default {
} }
}, },
monitor(row){ monitor(row){
this.setAssInfo({
id: row.id
})
this.$router.push('monitor') this.$router.push('monitor')
}, },
finish(row){ finish(row){
this.$post(`${this.api.compulsory}?id=${row.id}`)
.then(res => {
this.$message.success('结束成功')
this.getData()
})
.catch(err => {})
}, },
scoreQuery(){ scoreQuery(){
this.$router.push('scoreQuery') this.$router.push('scoreQuery')
@ -386,25 +513,9 @@ export default {
}) })
this.$router.push('review') this.$router.push('review')
}, },
getClass(row) {
this.$post(this.api.getMyClass,{
// userId: this.userId
userId: 1
})
.then(res => {
this.classList = res.data.list
if(row){
this.$nextTick(() => {
this.$refs.class.setCheckedNodes(row.classId.split(','))
})
}
})
.catch(err => {})
},
addAss(){ addAss(){
this.isAdd = true this.isAdd = true
this.addVisible = true this.addVisible = true
this.getClass()
}, },
save(){ save(){
let form = this.form let form = this.form
@ -413,14 +524,15 @@ export default {
if(form.type === '') return this.$message.warning('请选择考核类型') if(form.type === '') return this.$message.warning('请选择考核类型')
if(form.startTime === '') return this.$message.warning('请选择考核时间') if(form.startTime === '') return this.$message.warning('请选择考核时间')
if(form.testPaperId === '') return this.$message.warning('请选择试卷') if(form.testPaperId === '') return this.$message.warning('请选择试卷')
if(!this.$refs.class.getCheckedKeys().length) return this.$message.warning('请选择发布班级') if(form.classId === '') return this.$message.warning('请选择发布班级')
form.classId = this.$refs.class.getCheckedKeys().join() if(!form.studentId.length) return this.$message.warning('请选择学生')
let data = { let data = {
id: form.id, id: form.id,
userId: this.userId, userId: this.userId,
assessmentName: form.assessmentName, assessmentName: form.assessmentName,
classId: form.classId, classId: form.classId,
studentId: form.studentId,
startTime: form.startTime, startTime: form.startTime,
endTime: form.endTime, endTime: form.endTime,
state: form.state, state: form.state,
@ -433,20 +545,20 @@ export default {
this.addVisible = false this.addVisible = false
this.getData() this.getData()
}) })
.catch(err => { .catch(err => {})
});
}else{ }else{
this.$post(this.api.addAssessment, data).then(res => { this.$post(this.api.addAssessment, data).then(res => {
this.$message.success('创建成功') this.$message.success('创建成功')
this.addVisible = false this.addVisible = false
this.getData() this.getData()
}) })
.catch(err => { .catch(err => {})
});
} }
}, },
closeAdd(){ closeAdd(){
this.form = { this.form = {
classId: '',
studentId: [],
assessmentName: '', assessmentName: '',
startTime: '', startTime: '',
endTime: '', endTime: '',
@ -461,6 +573,7 @@ export default {
this.getPapers() this.getPapers()
}, },
removeTestPaper(){ removeTestPaper(){
this.form.testPaperId = ''
this.testPaperName = '' this.testPaperName = ''
}, },
getCourses() { getCourses() {
@ -471,17 +584,10 @@ export default {
.catch(err => {}) .catch(err => {})
}, },
getPapers() { getPapers() {
this.$post(this.api.pageBySchoolTestPaper, { this.$post(`${this.api.schoolTestPaperByRelease}?schoolId=${this.clientId}`)
pageNum: this.pagePaper,
pageSize: this.pageSizePaper,
userId: this.userId,
schoolId: this.clientId,
questionStem: this.keywordPaper,
})
.then(res => { .then(res => {
this.testPaperData = res.data.list.list this.testPaperData = res.data.list
this.totalPaper = res.data.list.totalCount // this.totalPaper = res.data.list.totalCount
this.$refs.table.clearSelection()
}) })
.catch(err => {}) .catch(err => {})
}, },
@ -494,6 +600,7 @@ export default {
this.$router.push('/testPaper/show') this.$router.push('/testPaper/show')
}, },
savePaper(){ savePaper(){
if(this.testPaperId === '') return this.$message.error('请选择试卷')
this.form.testPaperId = this.testPaperId this.form.testPaperId = this.testPaperId
this.testPaperName = this.testPaperData.find(n => n.id == this.testPaperId).name this.testPaperName = this.testPaperData.find(n => n.id == this.testPaperId).name
this.selectVisible = false this.selectVisible = false
@ -502,7 +609,14 @@ export default {
}, },
show(row){ show(row){
this.form = row this.$get(`${this.api.queryAssessmentDetails}?id=${row.id}`)
.then(res => {
let data = res.data.data
this.testPaperName = data.name
this.quesNum = data.questionNumber.split(',').length
this.assPeopleNum = data.number
})
.catch(err => {})
this.detailVisible = true this.detailVisible = true
}, },
closeDetail(){ closeDetail(){

@ -0,0 +1,139 @@
<template>
<div>
<div>
<lctree :data="majorList" @fircheckitem="fircheckitem" @twocheckitem="twocheckitem" @threecheckitem="threecheckitem" @fourcheckitem="fourcheckitem"></lctree>
</div>
</div>
</template>
<script>
import lctree from './studentTree'
import { mapState } from 'vuex'
export default {
props:["Data",'classId','studentId'],
data() {
return {
majorList: [],
firactive: 0,
twoactive: 0,
threeactive: 0,
isaddClassMajor: false,
isAddDepartment: false,
isAddClass: false,
Form: {
classmajorId: '',
classmajorName: '',
},
Form2: {
departmentId: '',
departmentName: '',
},
Form3: {
classId: '',
className: ''
},
majorNoAdd: true,
};
},
computed: {
...mapState('user', [
'userId','clientId'
])
},
components: {
lctree
},
mounted(){
this.getStaff()
},
methods: {
getStaff(){
let data = {
schoolId: this.clientId
}
let classId = this.classId ? this.classId.split(',') : []
let studentId = this.studentId
this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => {
let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList
StaffProfessionalArchitectureList.map(n => {
(n.ifVisible = false), (n.ischeck = false), (n.label = n.stuProfessionalArchitectureName);
let data = {
stuProfessionalArchitectureId: n.stuProfessionalArchitectureId
}
this.$get(this.api.queryGrade,data).then(res => {
n.children = res.data.Grade
n.children.map(j => {
(j.ifVisible = false), (j.ischeck = false), (j.label = j.gradeName);
let data = {
gradeId: j.gradeId
}
this.$get(this.api.queryClass,data).then(res => {
res.data.Class.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.className)
let data = {
searchContent: '',
professionalIds: n.stuProfessionalArchitectureId,
gradeIds: j.gradeId,
classIds: e.classId,
schoolId: this.clientId
}
this.$get(`${this.api.queryStudent}/1/200`,data).then(res => {
res.data.studentList.map(s => {
(s.ifVisible = false), (s.ischeck = false), (s.label = s.studentName)
if(studentId.includes(s.userId)){
s.ischeck = true
e.ifVisible = true
j.ifVisible = true
n.ifVisible = true
}
})
e.children = res.data.studentList
}).catch(res => {})
if(classId.includes(String(e.classId))){
e.ischeck = true
j.ifVisible = true
n.ifVisible = true
}
})
j.children = res.data.Class
if(j.children.every(i => i.ischeck)){
j.ischeck = true
}
if(n.children.every(i => i.ischeck)){
n.ischeck = true
}
}).catch(res => {});
})
}).catch(res => {});
})
setTimeout(() => {
this.majorList = StaffProfessionalArchitectureList
this.majorList[0].ifVisible = true
}, 500);
}).catch(res => {});
},
//
fircheckitem(item){
this.$emit("fircheck",item,this.majorList)
},
//
twocheckitem(item){
this.$emit("twocheck",item,this.majorList)
},
threeClick(index){
this.threeactive = index
},
//
threecheckitem(three){
this.$emit("threecheck",three,this.majorList)
},
//
fourcheckitem(four){
this.$emit("fourcheck",four,this.majorList)
},
}
};
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,154 @@
<template>
<div class="side_view">
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)">
<img
v-if="item.children&&item.children.length!=0"
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
src="../../../assets/img/icon-xiangyou.png"
alt
/>
<i v-else class="empty"></i>
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span>
</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
v-if="item1.children&&item1.children.length!=0"
:class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}"
src="../../../assets/img/icon-xiangyou.png"
alt
/>
<i v-else class="empty"></i>
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i>
<span>{{item1.label}}年级</span>
</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)">
<img
v-if="item2.children&&item2.children.length!=0"
:class="{ 'arrowTransform': !item2.ifVisible, 'arrowTransformReturn': item2.ifVisible}"
src="../../../assets/img/icon-xiangyou.png"
alt
/>
<i v-else class="empty"></i>
<i :class="item2.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="threecheckitem(item2)"></i>
<span>{{item2.label}}</span>
</div>
<div v-show="item2.ifVisible" v-if="item2.children&&item2.children.length!=0">
<div v-for="(item3,index3) in item2.children" :key="index3">
<div class="item3" @click.stop="open(item3)">
<i :class="item3.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fourcheckitem(item3)"></i>
<span>{{item3.label}}</span>
</div>
</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){
console.log(22,item)
this.$emit('twocheckitem',item);
},
threecheckitem(item){
this.$emit('threecheckitem',item);
},
fourcheckitem(item){
this.$emit('fourcheckitem',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>
@import '../../../styles/pages/tree.scss';
.side_view{
max-height: 300px;
overflow: auto;;
padding: 10px 20px;
i {
color: #cb221c;
}
}
.item{
padding: 5px 0;
margin-top: 10px;
}
.item2 {
margin-left:43px
}
.item1,.item2,.item3{
padding: 0;
margin-top: 0;
}
</style>

@ -5,31 +5,31 @@
<div class="info"> <div class="info">
<div class="item"> <div class="item">
<p class="key">试卷名称</p> <p class="key">试卷名称</p>
<p class="val">测试</p> <p class="val">{{paperName}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">试卷总分</p> <p class="key">试卷总分</p>
<p class="val">发布考试的名称</p> <p class="val">{{paperScore}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">剩余时间</p> <p class="key">剩余时间</p>
<p class="val">发布考试的名称</p> <p class="val">{{remainingTime}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">应考人数</p> <p class="key">应考人数</p>
<p class="val">发布考试的名称</p> <p class="val">{{shouldArrive}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">在考人数</p> <p class="key">在考人数</p>
<p class="val">发布考试的名称</p> <p class="val">{{inExamination}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">已考人数</p> <p class="key">已考人数</p>
<p class="val">发布考试的名称</p> <p class="val">{{completed}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">未考人数</p> <p class="key">未考人数</p>
<p class="val">发布考试的名称</p> <p class="val">{{notTested}}</p>
</div> </div>
</div> </div>
</div> </div>
@ -37,8 +37,9 @@
<div class="filter"> <div class="filter">
<div class="item"> <div class="item">
<p class="key">考试状态</p> <p class="key">考试状态</p>
<el-select v-model="purpose" placeholder="请选择考试状态" size="small"> <el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData">
<el-option v-for="(item,index) in purposeList" :key="index" :label="item.label" :value="item.id"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</div> </div>
<div class="item"> <div class="item">
@ -49,7 +50,7 @@
<div class="table"> <div class="table">
<div class="flex-justify-end"> <div class="flex-justify-end">
<el-button type="primary" size="small" round>强制收卷</el-button> <el-button type="primary" size="small" round @click="rollUp">强制收卷</el-button>
</div> </div>
<el-table <el-table
:data="listData" :data="listData"
@ -58,6 +59,7 @@
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange"
> >
<el-table-column <el-table-column
type="selection" type="selection"
@ -70,12 +72,16 @@
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="真实姓名" align="center"></el-table-column> <el-table-column prop="userName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="name" label="学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="name" label="所属班级" align="center"></el-table-column> <el-table-column prop="className" label="所属班级" align="center"></el-table-column>
<el-table-column prop="name" label="考试状态" align="center"></el-table-column> <el-table-column label="考试状态" align="center">
<el-table-column prop="name" label="开始时间" align="center"></el-table-column> <template slot-scope="scope">
<el-table-column prop="name" label="提交时间" align="center"></el-table-column> {{getStudentStateName(scope.row.state)}}
</template>
</el-table-column>
<el-table-column prop="start_time" label="开始时间" align="center"></el-table-column>
<el-table-column prop="submit_time" label="提交时间" align="center"></el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
@ -92,35 +98,85 @@
</div> </div>
</template> </template>
<script> <script>
import mixins from '@/mixins/setBackground'; import mixins from '@/mixins/setBackground'
import { mapState,mapGetters } from 'vuex'
export default { export default {
mixins: [ mixins ], mixins: [ mixins ],
data() { data() {
return { return {
keyword: '', keyword: '',
state: '',
listData: [], listData: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0 total: 0,
multipleSelection: [],
paperName: '',
paperScore: '',
remainingTime: '',
shouldArrive: '',
inExamination: '',
completed: '',
notTested: '',
}; };
}, },
computed: {
...mapState('user', [
'userId','clientId'
]),
...mapState('assessment', [
'id','stateList'
]),
...mapGetters('assessment', [
'getTypeName','getStudentStateName'
])
},
mounted() { mounted() {
this.getData() this.getData()
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.getCourse}/${this.id}`) let data = {
assessmentId: this.id,
keyword: this.keyword,
pageNum: this.page,
pageSize: this.pageSize,
state: this.state,
userId: this.userId
}
this.$post(this.api.monitorList,data)
.then(res => { .then(res => {
let list = res.data
this.paperName = list.paperName
this.paperScore = list.paperScore
this.remainingTime = list.remainingTime
this.shouldArrive = list.shouldArrive
this.inExamination = list.inExamination
this.completed = list.completed
this.notTested = list.notTested
this.listData = list.list.list ? list.list.list : []
this.total = list.totalCount
}) })
.catch(err => { .catch(err => {})
});
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.getData() this.getData()
}, },
handleSelectionChange(val) {
this.multipleSelection = val
},
rollUp(){
if(this.listData.length){
this.$post(`${this.api.compulsory}?id=${this.id}`)
.then(res => {
this.$message.success('强制收卷成功')
})
.catch(err => {})
}else{
this.$message.warning('没有学生在考中')
}
}
}, },
}; };
</script> </script>

@ -118,10 +118,10 @@ export default {
}, },
methods: { methods: {
...mapActions('assessment', [ ...mapActions('assessment', [
'setAssInfo' 'setReviewInfo'
]), ]),
getData() { getData() {
this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${this.pageSize}&userId=${2}&assessmentId=${1}`) this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${this.pageSize}&userId=${this.userId}&assessmentId=${this.id}`)
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
@ -133,7 +133,7 @@ export default {
this.getData() this.getData()
}, },
review(row,isReview){ review(row,isReview){
this.setAssInfo({ this.setReviewInfo({
isReview, isReview,
id: row.id, id: row.id,
paperId: row.paperId, paperId: row.paperId,

@ -45,19 +45,19 @@
</div> </div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange"> <el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center"> <el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="scope.row.questionStem"></div> <div v-html="scope.row.questionStem"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="共享时间" align="center"></el-table-column> <el-table-column prop="createTime" label="共享时间" width="140" align="center"></el-table-column>
<el-table-column prop="createUser" label="创建人" align="center"></el-table-column> <el-table-column prop="createUser" label="创建人" width="100" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="120"> <el-table-column label="操作" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> <el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
@ -104,6 +104,11 @@ export default {
topicsTitle: '' topicsTitle: ''
}; };
}, },
computed: {
...mapState('user', [
'userId','clientId'
])
},
components: {quesDialog}, components: {quesDialog},
mounted() { mounted() {
this.getData() this.getData()
@ -124,7 +129,8 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
questionStem: this.keyword, questionStem: this.keyword,
createUser: this.createUser, createUser: this.createUser,
name: this.name name: this.name,
schoolId: this.clientId
}) })
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
@ -163,7 +169,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => { this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=2&ids=${row.id}`).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
@ -181,7 +187,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => { this.$post(`${this.api.deleteByMeSubjectBySharing}?identification=2&ids=${delList.join()}`).then(res => {
this.multipleSelection = []; this.multipleSelection = [];
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()

@ -84,7 +84,7 @@
align="center" align="center"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
@ -94,13 +94,13 @@
<div v-html="scope.row.questionStem"></div> <div v-html="scope.row.questionStem"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="140" align="center"></el-table-column>
<el-table-column prop="typeName" label="所属题库" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="140" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="140" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" width="170" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="edit(scope.row)">修改</el-button> <el-button type="text" @click="edit(scope.row)">修改</el-button>
@ -398,7 +398,6 @@ export default {
location.href = `${this.api.export_failure}?token=${this.token}` location.href = `${this.api.export_failure}?token=${this.token}`
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
console.log(222)
this.$message({ this.$message({
message: "上传出错,请重试!", message: "上传出错,请重试!",
type: "error", type: "error",

@ -174,6 +174,7 @@ export default {
}, },
components: { quill }, components: { quill },
mounted() { mounted() {
this.topicForm.schoolId = this.clientId
this.getQuesBank() this.getQuesBank()
}, },
// watch: { // watch: {
@ -310,6 +311,7 @@ export default {
resetForm() { resetForm() {
this.topicForm = { this.topicForm = {
userId: this.userId, userId: this.userId,
schoolId: this.clientId,
cid : '', cid : '',
typeId: '', typeId: '',
courses: '', courses: '',

@ -26,7 +26,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="workNumber" label="学生学号" align="center"> <el-table-column prop="workNumber" label="学生学号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="professionalName" label="专业" align="center"> <el-table-column prop="stuProfessionalArchitectureName" label="专业" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="gradeName" label="年级" align="center"> <el-table-column prop="gradeName" label="年级" align="center">
</el-table-column> </el-table-column>
@ -222,7 +222,9 @@ export default {
schooldId: 1, schooldId: 1,
isAdd: true, isAdd: true,
accountRepeat: false, accountRepeat: false,
workNumberRepeat: false workNumberRepeat: false,
originalAccount: '',
originalWorkNumber: ''
}; };
}, },
computed: { computed: {
@ -258,7 +260,7 @@ export default {
this.$get(`${this.api.queryStudent}/${this.page}/${this.pageSize}`,data).then(res => { this.$get(`${this.api.queryStudent}/${this.page}/${this.pageSize}`,data).then(res => {
this.listData = res.data.studentList this.listData = res.data.studentList
this.total = res.data.total this.total = res.data.total
}).catch(res => {}); }).catch(res => {})
}, },
handleCheck(data){ handleCheck(data){
let professionalStudentIds = [] let professionalStudentIds = []
@ -327,13 +329,11 @@ export default {
} }
} }
}) })
// if(r.gradeId == val.gradeId){ if(e.children.every(i => i.ischeck)){
if(e.children.every(i => i.ischeck)){ e.ischeck = true
e.ischeck = true }else{
}else{ e.ischeck = false
e.ischeck = false }
}
// }
}) })
}) })
this.handleCheck(val2) this.handleCheck(val2)
@ -358,6 +358,7 @@ export default {
let userInfo = res.data.userInfo let userInfo = res.data.userInfo
this.studentForm.userName = userInfo.userName, this.studentForm.userName = userInfo.userName,
this.studentForm.workNumber = student.workNumber, this.studentForm.workNumber = student.workNumber,
this.originalWorkNumber = student.workNumber,
this.studentForm.uniqueIdentificationAccount = userInfo.uniqueIdentificationAccount, this.studentForm.uniqueIdentificationAccount = userInfo.uniqueIdentificationAccount,
this.studentForm.professionalId = student.professionalId, this.studentForm.professionalId = student.professionalId,
this.studentForm.gradeId = student.gradeId, this.studentForm.gradeId = student.gradeId,
@ -365,6 +366,7 @@ export default {
this.studentForm.phone = userInfo.phone, this.studentForm.phone = userInfo.phone,
this.studentForm.email = userInfo.email, this.studentForm.email = userInfo.email,
this.studentForm.account = userInfo.account this.studentForm.account = userInfo.account
this.originalAccount = userInfo.account
this.getGradeData() this.getGradeData()
this.getClassData() this.getClassData()
}).catch(res => {}); }).catch(res => {});
@ -397,24 +399,32 @@ export default {
}).catch(res => {}); }).catch(res => {});
}, },
async accountChange(){ async accountChange(){
this.$get(`${this.api.getAccount}?account=${this.studentForm.account}`).then(res => { if(this.studentForm.account !== this.originalAccount){
if(res.data.userInfo){ this.$get(`${this.api.getAccount}?account=${this.studentForm.account}`).then(res => {
this.accountRepeat = true if(res.data.userInfo){
this.$message.warning('该账号已存在') this.accountRepeat = true
}else{ this.$message.warning('该账号已存在')
this.accountRepeat = false }else{
} this.accountRepeat = false
}).catch(res => {}); }
}).catch(res => {})
}else{
this.accountRepeat = false
}
}, },
workNumberChange(){ workNumberChange(){
this.$get(`${this.api.studentGetWorkNumber}?workNumber=${this.studentForm.workNumber}`).then(res => { if(this.studentForm.workNumber !== this.originalWorkNumber){
if(res.data.student){ this.$get(`${this.api.studentGetWorkNumber}?workNumber=${this.studentForm.workNumber}`).then(res => {
this.workNumberRepeat = true if(res.data.student){
this.$message.warning('该学号已存在') this.workNumberRepeat = true
}else{ this.$message.warning('该学号已存在')
this.workNumberRepeat = false }else{
} this.workNumberRepeat = false
}).catch(res => {}); }
}).catch(res => {})
}else{
this.workNumberRepeat = false
}
}, },
saveSure(studentForm){ saveSure(studentForm){
this.$refs[studentForm].validate((valid) => { this.$refs[studentForm].validate((valid) => {

@ -407,96 +407,5 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" 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: #9278FF;
}
.side_tree{
width: 100%;
font-size: 18px;
color: #333;
}
.side_tree i{
color: #9278FF;
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: #9278FF;
}
/* .two_active:hover{
color: #9278FF;
cursor:pointer;
} */
.two_back{
width: 100%;
margin-top: 20px;
text-align: left;
}
.two_back:hover{
cursor:pointer;
color: #9278FF;
}
.three_back{
width: 100%;
margin-top: 20px;
text-align: left;
}
.three_back:hover{
cursor:pointer;
color: #9278FF;
}
.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> </style>

@ -2,11 +2,9 @@
<div class="side_view"> <div class="side_view">
<p class="side_icon mab20"> <p class="side_icon mab20">
<i class="icon-jiahao mar20" @click="addMajor()"></i> <i class="icon-jiahao mar20" @click="addMajor()"></i>
<!-- <i class="icon-delete"></i> -->
</p> </p>
<div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index"> <div class="side_tree" @click.stop="open(item)" v-for="(item,index) in data" :key="index">
<div class="item" @click.stop="open(item)"> <div class="item" @click.stop="open(item)">
<!-- <i :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" class="icon-shixiangyoujiantou-"></i> -->
<img <img
v-if="item.children&&item.children.length!=0" v-if="item.children&&item.children.length!=0"
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
@ -46,20 +44,6 @@
<i class="edit ft" @click.stop="editClass(item2)"></i> <i class="edit ft" @click.stop="editClass(item2)"></i>
<i class="icon-delete ft" @click.stop="delClass(item2,index2)"></i> <i class="icon-delete ft" @click.stop="delClass(item2,index2)"></i>
</div> </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>
@ -167,125 +151,15 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
$insideColor: rgba(245, 242, 255, 0.8); // @import '../../../styles/pages/tree.scss';
$outColor: rgba(255, 255, 255, 0.8); //
//,item .side_view{
@mixin public { height: 800px;
cursor: pointer; padding: 40px 20px;
font-size: 14px; background-color: #fff;
color: #333333; box-shadow:-2px 0px 57px 0px rgba(192,189,216,0.39);
display: flex; i {
align-items: center; color: #cb221c;
img {
height: 20px;
width: 20px;
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(255,69,69,0.19);
border-radius:10px;
text-align: left;
margin-top: 20px;
}
.empty{
width: 25px;
}
.item:first{
margin-top: 0;
}
.item1 {
@include public;
margin-top: 20px;
margin-left: 15px;
}
.item2 {
@include public;
margin-top: 20px;
margin-left:60px
}
.item2:hover{
color: #cb221c;
}
.edit{
display: inline-block;
width: 17px;
height: 17px;
background: url(../../../assets/svg/edit.svg) 0 0/cover no-repeat;
}
//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: #cb221c;
}
}
.side_icon{
text-align: right;
}
.side_icon i{
cursor:pointer;
font-size: 20px;
}
.side_tree{
width: 100%;
font-size: 14px;
color: #333;
i{
margin-left: 5px;
font-size: 17px;
}
span{
margin-left: 5px;
font-size: 14px;
} }
}
</style> </style>

@ -142,7 +142,7 @@ export default {
this.$get(`${this.api.queryRoles}/${this.pageNo}/${this.pageSize}`,data).then(res => { this.$get(`${this.api.queryRoles}/${this.pageNo}/${this.pageSize}`,data).then(res => {
this.roleData = res.data.items this.roleData = res.data.items
this.totals = res.data.total this.totals = res.data.total
}).catch(res => {}); }).catch(res => {})
}, },
closeRole(){ closeRole(){
this.isDetail = false this.isDetail = false

@ -62,7 +62,7 @@
<!-- 新增用户 --> <!-- 新增用户 -->
<el-dialog :title="isDetail ? '查看员工' : (isAddteacher ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible" <el-dialog :title="isDetail ? '查看员工' : (isAddteacher ? '新增员工' : '编辑员工')" :visible.sync="teacherVisible"
width="30%" :center="!isIE" @close="closeTeacher" class="dialog" :close-on-click-modal="false"> width="30%" :center="!isIE" @close="closeTeacher" class="dialog" :close-on-click-modal="false">
<el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="120px" :disabled="isDetail"> <el-form ref="teacherForm" :model="teacherForm" :rules="rules" label-width="100px" :disabled="isDetail">
<el-form-item prop="userAccount" label="账号"> <el-form-item prop="userAccount" label="账号">
<el-input v-model="teacherForm.userAccount" ref="account" placeholder="请输入职工账号" @change="accountChange"></el-input> <el-input v-model="teacherForm.userAccount" ref="account" placeholder="请输入职工账号" @change="accountChange"></el-input>
</el-form-item> </el-form-item>
@ -472,7 +472,7 @@ export default {
data.staff = { data.staff = {
roleId: this.teacherForm.roleValue, roleId: this.teacherForm.roleValue,
isPort: 2, isPort: 2,
schoolId: this.schoolId, schoolId: this.teacherForm.clientId,
staffId: this.teacherForm.staffId, staffId: this.teacherForm.staffId,
userId: this.teacherForm.userId, userId: this.teacherForm.userId,
workNumber: this.teacherForm.workNumber, workNumber: this.teacherForm.workNumber,

@ -54,19 +54,19 @@
<div class="testpaper"> <div class="testpaper">
<el-table :data="selectedData" ref="selectedTable" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange"> <el-table :data="selectedData" ref="selectedTable" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelecteChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="questionSource" label="题库来源" align="center"></el-table-column> <el-table-column prop="questionSource" label="题库来源" width="120" align="center"></el-table-column>
<el-table-column prop="questionStem" label="题干" align="center"> <el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-html="scope.row.questionStem"></div> <div v-html="scope.row.questionStem"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" width="100" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" width="120" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" width="120" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="150" align="center"></el-table-column>
<el-table-column prop="createUser" label="创建人" align="center"></el-table-column> <el-table-column prop="createUser" label="创建人" width="80" align="center"></el-table-column>
</el-table> </el-table>
<div class="point"> <div class="point">
@ -110,7 +110,7 @@
</div> </div>
<div class="btns"> <div class="btns">
<button type="button" v-throttle @click="save(0)">保存</button> <button type="button" v-throttle @click="save(0)" v-if="!state">保存</button>
<button type="button" v-throttle class="submit" @click="save(1)">完成并发布</button> <button type="button" v-throttle class="submit" @click="save(1)">完成并发布</button>
</div> </div>
@ -159,7 +159,8 @@
<el-table <el-table
:data="listData" :data="listData"
ref="table" max-height="400"
ref="listTable"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
@ -167,7 +168,7 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
@ -181,8 +182,8 @@
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" align="center"></el-table-column>
<el-table-column prop="courses" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" width="150" align="center"></el-table-column>
<el-table-column prop="createUser" label="创建人" align="center"></el-table-column> <el-table-column prop="createUser" label="创建人" align="center"></el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
@ -220,18 +221,18 @@
<el-checkbox v-model="countCheck.countCheck2">多选题</el-checkbox> <el-checkbox v-model="countCheck.countCheck2">多选题</el-checkbox>
<input type="text" v-model.number="countNumberInput2" :disabled="!countCheck.countCheck2"> 可选{{countNumber2}} <input type="text" v-model.number="countNumberInput2" :disabled="!countCheck.countCheck2"> 可选{{countNumber2}}
</div> </div>
<div class="item">
<el-checkbox v-model="countCheck.countCheck5">填空题</el-checkbox>
<input type="text" v-model.number="countNumberInput5" :disabled="!countCheck.countCheck5"> 可选{{countNumber5}}
</div>
<div class="item"> <div class="item">
<el-checkbox v-model="countCheck.countCheck3">判断题</el-checkbox> <el-checkbox v-model="countCheck.countCheck3">判断题</el-checkbox>
<input type="text" v-model.number="countNumberInput3" :disabled="!countCheck.countCheck3"> 可选{{countNumber3}} <input type="text" v-model.number="countNumberInput3" :disabled="!countCheck.countCheck3"> 可选{{countNumber3}}
</div> </div>
<div class="item"> <div class="item">
<el-checkbox v-model="countCheck.countCheck4">简答</el-checkbox> <el-checkbox v-model="countCheck.countCheck4">填空</el-checkbox>
<input type="text" v-model.number="countNumberInput4" :disabled="!countCheck.countCheck4"> 可选{{countNumber4}} <input type="text" v-model.number="countNumberInput4" :disabled="!countCheck.countCheck4"> 可选{{countNumber4}}
</div> </div>
<div class="item">
<el-checkbox v-model="countCheck.countCheck5">简答题</el-checkbox>
<input type="text" v-model.number="countNumberInput5" :disabled="!countCheck.countCheck5"> 可选{{countNumber5}}
</div>
</div> </div>
</div> </div>
</div> </div>
@ -259,6 +260,7 @@ export default {
degree: '', degree: '',
duration: '', duration: '',
qid: '', qid: '',
state: '',
singleCount: '', singleCount: '',
multipleCount: '', multipleCount: '',
fillBlankCount: '', fillBlankCount: '',
@ -270,9 +272,10 @@ export default {
fillBlanksScore: '', fillBlanksScore: '',
briefAnswerScore: '', briefAnswerScore: '',
multipleSelected: [], multipleSelected: [],
typeNameList: ['单选题','多选题','判断题','简答题','填空题'], typeNameList: ['单选题','多选题','判断题','填空题','简答题'],
// //
isFirstSubmitMana: true,
manualVisible: false, manualVisible: false,
multipleSelection: [], multipleSelection: [],
listData: [], listData: [],
@ -317,7 +320,7 @@ export default {
countCheck4: false, countCheck4: false,
countCheck5: false, countCheck5: false,
}, },
pointRules: [30,20,10,2,10], pointRules: [30,20,10,10,2],
selectedData: [] selectedData: []
}; };
}, },
@ -356,6 +359,7 @@ export default {
this.duration = list.duration this.duration = list.duration
this.type = list.type this.type = list.type
this.qid = list.qid this.qid = list.qid
this.state = list.state
this.singleChoiceScore = list.singleChoiceScore this.singleChoiceScore = list.singleChoiceScore
this.multipleChoiceScore = list.multipleChoiceScore this.multipleChoiceScore = list.multipleChoiceScore
this.fillBlanksScore = list.fillBlanksScore this.fillBlanksScore = list.fillBlanksScore
@ -363,9 +367,7 @@ export default {
this.briefAnswerScore = list.briefAnswerScore this.briefAnswerScore = list.briefAnswerScore
this.getQuesList() this.getQuesList()
}) })
.catch(err => { .catch(err => {})
});
}, },
getQuesList(){ getQuesList(){
if(this.qid){ if(this.qid){
@ -378,8 +380,7 @@ export default {
this.selectedData = res.data.list this.selectedData = res.data.list
this.computeTypeCount() this.computeTypeCount()
}) })
.catch(err => { .catch(err => {})
});
} }
}, },
defaultZero(val){ defaultZero(val){
@ -410,6 +411,11 @@ export default {
qid: qid, qid: qid,
state: status, state: status,
type: this.type, type: this.type,
singleChoiceNum : this.defaultZero(this.singleCount),
multipleChoiceNum : this.defaultZero(this.multipleCount),
judgeNum : this.defaultZero(this.judgeCount),
fillBlanksNum : this.defaultZero(this.fillBlankCount),
briefAnswerNum : this.defaultZero(this.briefCount),
singleChoiceScore : this.defaultZero(this.singleChoiceScore), singleChoiceScore : this.defaultZero(this.singleChoiceScore),
multipleChoiceScore : this.defaultZero(this.multipleChoiceScore), multipleChoiceScore : this.defaultZero(this.multipleChoiceScore),
fillBlanksScore : this.defaultZero(this.fillBlanksScore), fillBlanksScore : this.defaultZero(this.fillBlanksScore),
@ -421,15 +427,13 @@ export default {
this.$message.success('修改成功') this.$message.success('修改成功')
this.$router.back() this.$router.back()
}) })
.catch(err => { .catch(err => {})
});
}else{ }else{
this.$post(this.api.saveOrUpdatetestPaper, data).then(res => { this.$post(this.api.saveOrUpdatetestPaper, data).then(res => {
this.$message.success('创建成功') this.$message.success('创建成功')
this.$router.back() this.$router.back()
}) })
.catch(err => { .catch(err => {})
});
} }
}, },
selectQues(){ selectQues(){
@ -457,8 +461,14 @@ export default {
} }
this.$post(this.api.pageByChoiceList,data) this.$post(this.api.pageByChoiceList,data)
.then(res => { .then(res => {
this.listData = res.data.list.list let listData = res.data.list.list
this.total = res.data.list.totalCount let newData = []
listData.forEach((n,i) => {
this.selectedData.every(e => e.id != n.id) && newData.push(n)
})
this.listData = newData
this.total = newData.length
this.$refs.listData.clearSelection()
}) })
.catch(err => {}); .catch(err => {});
}, },
@ -475,7 +485,6 @@ export default {
this.selectedData.forEach((n,i) => { this.selectedData.forEach((n,i) => {
this.multipleSelected.every(e => e.id != n.id) && newData.push(n) this.multipleSelected.every(e => e.id != n.id) && newData.push(n)
}) })
console.log(33,newData,this.selectedData,this.multipleSelected)
this.selectedData = newData this.selectedData = newData
this.computeTypeCount() this.computeTypeCount()
this.$refs.selectedTable.clearSelection() this.$refs.selectedTable.clearSelection()
@ -498,7 +507,7 @@ export default {
this.getManualData(); this.getManualData();
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val
}, },
getSelectFilter(){ getSelectFilter(){
this.$post(`${this.api.getSelectInfo}?type=1`) this.$post(`${this.api.getSelectInfo}?type=1`)
@ -529,15 +538,30 @@ export default {
}, },
computeTypeCount(){ computeTypeCount(){
let selected = this.selectedData let selected = this.selectedData
this.singleCount = selected.filter(n => n.name == '单项选择').length let singleCount = selected.filter(n => n.name == '单项选择').length
this.multipleCount = selected.filter(n => n.name == '多项选择').length let multipleCount = selected.filter(n => n.name == '多项选择').length
this.fillBlankCount = selected.filter(n => n.name == '填空题').length let fillBlankCount = selected.filter(n => n.name == '填空题').length
this.judgeCount = selected.filter(n => n.name == '判断题').length let judgeCount = selected.filter(n => n.name == '判断题').length
this.briefCount = selected.filter(n => n.name == '简答题').length let briefCount = selected.filter(n => n.name == '简答题').length
if(this.id && this.isFirstSubmitMana){
this.singleCount = Number(this.singleCount) + singleCount
this.multipleCount = Number(this.multipleCount) + multipleCount
this.fillBlankCount = Number(this.fillBlankCount) + fillBlankCount
this.judgeCount = Number(this.judgeCount) + judgeCount
this.briefCount = Number(this.briefCount) + briefCount
this.isFirstSubmitMana = false
}else{
this.singleCount = singleCount
this.multipleCount = multipleCount
this.fillBlankCount = fillBlankCount
this.judgeCount = judgeCount
this.briefCount = briefCount
}
}, },
submitManual(){ submitManual(){
if(this.multipleSelection.length){ if(this.multipleSelection.length){
this.selectedData = this.multipleSelection this.selectedData = [...this.selectedData,...this.multipleSelection]
this.computeTypeCount() this.computeTypeCount()
this.manualVisible = false this.manualVisible = false
}else{ }else{
@ -559,10 +583,10 @@ export default {
getInteData() { getInteData() {
let data = { let data = {
// courses: '', // courses: '',
// schoolId: this.clientId, schoolId: this.clientId,
// userId: this.userId, userId: this.userId,
schoolId: 2, // schoolId: 2,
userId: 2, // userId: 2,
} }
this.$post(this.api.fuzzyQuery,data) this.$post(this.api.fuzzyQuery,data)
.then(res => { .then(res => {
@ -571,13 +595,12 @@ export default {
.catch(err => {}); .catch(err => {});
}, },
courseChange(val,dir,allData){ courseChange(val,dir,allData){
console.log(val,dir,allData)
let data = { let data = {
coursesList: val, coursesList: val,
// schoolId: this.clientId, schoolId: this.clientId,
// userId: this.userId, userId: this.userId,
schoolId: 2, // schoolId: 2,
userId: 2, // userId: 2,
} }
this.$post(this.api.statistical,data) this.$post(this.api.statistical,data)
.then(res => { .then(res => {
@ -601,7 +624,6 @@ export default {
return true return true
}, },
submitInte(){ submitInte(){
// return false
let invalid = false let invalid = false
let everyUnchecked = true let everyUnchecked = true
let everyIsZero = true let everyIsZero = true
@ -609,24 +631,19 @@ export default {
if(this.countCheck[i]){ if(this.countCheck[i]){
everyUnchecked = false everyUnchecked = false
let index = i.replace('countCheck','') let index = i.replace('countCheck','')
// console.log(33,this[`countNumberInput${index}`])
if(this[`countNumberInput${index}`]){ if(this[`countNumberInput${index}`]){
everyIsZero = false everyIsZero = false
// if(this[`countNumberInput${index}`] !== ''){ if(this[`countNumberInput${index}`] < this.pointRules[index-1]){
if(this[`countNumberInput${index}`] < this.pointRules[index-1]){ invalid = true
invalid = true }else if(this[`countNumberInput${index}`] > this.pointRules[index-1]){
}else if(this[`countNumberInput${index}`] > this.pointRules[index-1]){ this.$message.error('题目数量不能大于可选题数')
this.$message.error('题目数量不能大于可选题数') return false
return false }
}
// }
} }
}else{ }else{
invalid = true invalid = true
} }
} }
// console.log(11,everyIsZero)
if(everyUnchecked) return this.$message.error('请选择题型') if(everyUnchecked) return this.$message.error('请选择题型')
if(everyIsZero) return this.$message.error('请输入题目数量') if(everyIsZero) return this.$message.error('请输入题目数量')
let totalCount = 0 let totalCount = 0
@ -666,14 +683,6 @@ export default {
return false return false
} }
} }
if(this.typeValid(5)){
if(this.countValid(5)){
this.fillBlankCount = this.countNumberInput5
this.fillBlanksScore = avgPoint
}else{
return false
}
}
if(this.typeValid(3)){ if(this.typeValid(3)){
if(this.countValid(3)){ if(this.countValid(3)){
this.judgeCount = this.countNumberInput3 this.judgeCount = this.countNumberInput3
@ -684,7 +693,15 @@ export default {
} }
if(this.typeValid(4)){ if(this.typeValid(4)){
if(this.countValid(4)){ if(this.countValid(4)){
this.briefCount = this.countNumberInput4 this.fillBlankCount = this.countNumberInput4
this.fillBlanksScore = avgPoint
}else{
return false
}
}
if(this.typeValid(5)){
if(this.countValid(5)){
this.briefCount = this.countNumberInput5
this.briefAnswerScore = avgPoint this.briefAnswerScore = avgPoint
}else{ }else{
return false return false
@ -694,9 +711,8 @@ export default {
let remainScore = 0 let remainScore = 0
let remainPlusAvg = remainder + avgPoint let remainPlusAvg = remainder + avgPoint
let invalid = false let invalid = false
if(this.typeValid(4)){ if(this.typeValid(5)){
remainScore = this.briefCount * avgPoint + remainder remainScore = this.briefCount * avgPoint + remainder
console.log(11,remainScore,remainScore % this.briefCount)
if(remainScore % this.briefCount){ if(remainScore % this.briefCount){
invalid = true invalid = true
}else{ }else{
@ -707,24 +723,24 @@ export default {
invalid = true invalid = true
} }
if(invalid){ if(invalid){
if(this.typeValid(3)){ if(this.typeValid(4)){
remainScore = this.judgeCount * avgPoint + remainder remainScore = this.fillBlankCount * avgPoint + remainder
if(remainScore % this.judgeCount){ if(remainScore % this.fillBlankCount){
invalid = true invalid = true
}else{ }else{
this.judgeScore = remainScore / this.judgeCount this.fillBlanksScore = remainScore / this.fillBlankCount
invalid = false invalid = false
} }
}else{ }else{
invalid = true invalid = true
} }
if(invalid){ if(invalid){
if(this.typeValid(5)){ if(this.typeValid(3)){
remainScore = this.fillBlankCount * avgPoint + remainder remainScore = this.judgeCount * avgPoint + remainder
if(remainScore % this.fillBlankCount){ if(remainScore % this.judgeCount){
invalid = true invalid = true
}else{ }else{
this.fillBlanksScore = remainScore / this.fillBlankCount this.judgeScore = remainScore / this.judgeCount
invalid = false invalid = false
} }
}else{ }else{
@ -762,10 +778,10 @@ export default {
} }
let data = { let data = {
coursesList: this.course, coursesList: this.course,
// schoolId: this.clientId, schoolId: this.clientId,
// userId: this.userId, userId: this.userId,
schoolId: 2, // schoolId: 2,
userId: 2, // userId: 2,
} }
this.$post(this.api.getQuestionListBySelect,data) this.$post(this.api.getQuestionListBySelect,data)
.then(res => { .then(res => {

@ -180,6 +180,36 @@ export default {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
publish(row){
this.$post(`${this.api.detailtestPaper}?id=${row.id}`)
.then(res => {
let qid = res.data.list.qid
if(qid){
let data = {
ids: qid.split(','),
schoolId: this.clientId,
userId: this.userId
}
this.$post(this.api.getModifyByList, data).then(res => {
let selected = res.data.list
let singleCount = selected.filter(n => n.name == '单项选择').length
let multipleCount = selected.filter(n => n.name == '多项选择').length
let fillBlankCount = selected.filter(n => n.name == '填空题').length
let judgeCount = selected.filter(n => n.name == '判断题').length
let briefCount = selected.filter(n => n.name == '简答题').length
let totalScore = singleCount * row.singleChoiceScore + multipleCount * row.multipleChoiceScore + fillBlankCount * row.fillBlanksScore + judgeCount * row.judgeScore + briefCount * row.briefAnswerScore
if(totalScore < 100) return this.$message.warning('总分值未满100分,请重新设置')
if(totalScore > 100) return this.$message.warning('总分值超过100分,请重新设置')
this.$post(`${this.api.modifyState}?id=${row.id}`).then(res => {
this.$message.success('发布成功')
this.getData()
}).catch(res => {})
}).catch(err => {})
}
})
.catch(err => {})
},
preview(row){ preview(row){
this.setInfo({ this.setInfo({
id: row.id, id: row.id,

@ -83,7 +83,7 @@
{{getStatusName(scope.row.state)}} {{getStatusName(scope.row.state)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="scope.row.state == 0" @click="publish(scope.row)" v-auth>发布</el-button> <el-button type="text" v-if="scope.row.state == 0" @click="publish(scope.row)" v-auth>发布</el-button>
<el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button> <el-button type="text" @click="preview(scope.row)" v-auth>预览</el-button>
@ -171,7 +171,6 @@ export default {
.then(res => { .then(res => {
this.listData = res.data.list.list this.listData = res.data.list.list
this.total = res.data.list.totalCount this.total = res.data.list.totalCount
this.$refs.table.clearSelection()
}) })
.catch(err => {}) .catch(err => {})
}, },
@ -224,12 +223,34 @@ export default {
} }
}, },
publish(row){ publish(row){
let data = row this.$post(`${this.api.detailtestPaper}?id=${row.id}`)
data.state = 1 .then(res => {
this.$post(this.api.saveOrUpdatetestPaper,data).then(res => { let qid = res.data.list.qid
this.$message.success('发布成功') if(qid){
this.getData() let data = {
}).catch(res => {}); ids: qid.split(','),
schoolId: this.clientId,
userId: this.userId
}
this.$post(this.api.getModifyByList, data).then(res => {
let selected = res.data.list
let singleCount = selected.filter(n => n.name == '单项选择').length
let multipleCount = selected.filter(n => n.name == '多项选择').length
let fillBlankCount = selected.filter(n => n.name == '填空题').length
let judgeCount = selected.filter(n => n.name == '判断题').length
let briefCount = selected.filter(n => n.name == '简答题').length
let totalScore = singleCount * row.singleChoiceScore + multipleCount * row.multipleChoiceScore + fillBlankCount * row.fillBlanksScore + judgeCount * row.judgeScore + briefCount * row.briefAnswerScore
if(totalScore < 100) return this.$message.warning('总分值未满100分,请重新设置')
if(totalScore > 100) return this.$message.warning('总分值超过100分,请重新设置')
this.$post(`${this.api.modifyState}?id=${row.id}`).then(res => {
this.$message.success('发布成功')
this.getData()
}).catch(res => {})
}).catch(err => {})
}
})
.catch(err => {})
}, },
preview(row){ preview(row){
this.setInfo({ this.setInfo({

@ -92,7 +92,7 @@
export default { export default {
data() { data() {
return { return {
listData: [{}], listData: [],
courseId: '', courseId: '',
courseList: [ courseList: [
{ {

@ -1,6 +1,5 @@
import axios from 'axios'; import axios from 'axios';
import QS from 'qs'; import QS from 'qs';
// import store from '../store/index'
import { Message } from 'element-ui' import { Message } from 'element-ui'
import router from '@/router/index' import router from '@/router/index'
import Setting from '@/setting' import Setting from '@/setting'
@ -39,7 +38,7 @@ service.interceptors.response.use(
} else { } else {
switch (res.code) { switch (res.code) {
case 201: case 201:
Message.error(res.message) Message.error(res.message ? res.message : '数据请求异常')
break; break;
default: default:
Promise.reject(res).catch(e => {}) Promise.reject(res).catch(e => {})

@ -15,7 +15,8 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条 // 页面切换时,是否显示模拟的进度条
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/', // apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -5,13 +5,14 @@ export default {
namespaced: true, namespaced: true,
state: { state: {
id: '', id: '',
reviewId: '',
paperId: '', paperId: '',
isReview: false, isReview: false,
reviewStatus: '', reviewStatus: '',
typeList: [ typeList: [
{ {
id: 1, id: 1,
name: '期中开始' name: '期中考试'
},{ },{
id: 2, id: 2,
name: '期末考试' name: '期末考试'
@ -32,6 +33,18 @@ export default {
name: '已结束' name: '已结束'
} }
], ],
studentStateList: [
{
id: 0,
name: '未考'
},{
id: 1,
name: '在考'
},{
id: 2,
name: '已考'
}
],
reviewStatusList: [ reviewStatusList: [
{ {
id: 0, id: 0,
@ -42,6 +55,9 @@ export default {
},{ },{
id: 2, id: 2,
name: '已批阅' name: '已批阅'
},{
id: 3,
name: '没有主观题,不需要批阅'
} }
], ],
examStatusList: [ examStatusList: [
@ -79,10 +95,16 @@ export default {
getCorrectingName: state => id => { getCorrectingName: state => id => {
return state.correctingList.find(n => n.id == id).name return state.correctingList.find(n => n.id == id).name
}, },
getStudentStateName: state => id => {
return state.studentStateList.find(n => n.id == id).name
},
}, },
mutations: { mutations: {
SET_INFO: (state, info) => { SET_INFO: (state, info) => {
state.id = info.id state.id = info.id
},
SET_REVIEW_INFO: (state, info) => {
state.reviewId = info.id
state.paperId = info.paperId state.paperId = info.paperId
state.isReview = info.isReview state.isReview = info.isReview
state.reviewStatus = info.reviewStatus state.reviewStatus = info.reviewStatus
@ -92,5 +114,8 @@ export default {
setAssInfo({ commit },info) { setAssInfo({ commit },info) {
commit('SET_INFO',info) commit('SET_INFO',info)
}, },
setReviewInfo({ commit },info) {
commit('SET_REVIEW_INFO',info)
},
} }
} }

@ -0,0 +1,104 @@
$insideColor: rgba(245, 242, 255, 0.8); //内部节点的边框颜色
$outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色
//混合代码,提取item共同样式
@mixin public {
cursor: pointer;
font-size: 14px;
color: #333333;
display: flex;
align-items: center;
img {
height: 20px;
width: 20px;
margin-left: 10px;
}
}
.side_tree{
width: 100%;
font-size: 14px;
color: #333;
i{
margin-left: 5px;
font-size: 17px;
}
span{
margin-left: 5px;
font-size: 14px;
}
}
.item {
@include public;
width: 100%;
padding: 15px 0;
background:rgba(255,255,255,1);
box-shadow:1px 14px 29px 0px rgba(255,69,69,0.19);
border-radius:10px;
text-align: left;
margin-top: 20px;
}
.empty{
width: 25px;
}
.item:first{
margin-top: 0;
}
.item1 {
@include public;
margin-top: 20px;
margin-left: 23px;
}
.item2 {
@include public;
margin-top: 20px;
margin-left:80px
}
.item3 {
@include public;
margin-top: 20px;
margin-left:95px
}
.item2:hover{
color: #cb221c;
}
.edit{
display: inline-block;
width: 17px;
height: 17px;
background: url(../../../assets/svg/edit.svg) 0 0/cover no-repeat;
}
// 使三角形旋转动画
.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_icon{
text-align: right;
}
.side_icon i{
cursor:pointer;
font-size: 20px;
}

@ -1,3 +1,4 @@
const Setting = require('./src/setting.env')
// 引入等比适配插件 // 引入等比适配插件
const px2rem = require('postcss-px2rem') const px2rem = require('postcss-px2rem')
@ -19,10 +20,11 @@ module.exports = {
} }
} }
}, },
publicPath: './', publicPath: Setting.publicPath,
  outputDir: 'dist',   outputDir: Setting.outputDir,
  assetsDir: 'static'   assetsDir: Setting.assetsDir,
// devServer: { devServer: {
port: 8083
// proxy: { // proxy: {
// "/api": { // "/api": {
// target: "http://192.168.0.106:8080", // target: "http://192.168.0.106:8080",
@ -33,5 +35,5 @@ module.exports = {
// } // }
// } // }
// } // }
// } }
} }
Loading…
Cancel
Save