考试调整
This commit is contained in:
parent
5090b14819
commit
64a673419b
@ -309,3 +309,18 @@ export function getCanApplyToList(ruleId) {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 给班级安排考试 */
|
||||||
|
export function applyExamToClass(clsId, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/company/orgExam/${clsId}`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询班级下的考试 */
|
||||||
|
export function getExamListInClass(clsId) {
|
||||||
|
return request({
|
||||||
|
url: `api/company/orgExam/${clsId}/list`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -93,7 +93,7 @@ export function getExamListProject(params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 查询本项目下自己创建的考试列表不分页 */
|
/** 查询本项目下的考试列表不分页 */
|
||||||
export function getExamListProjectUnpage(params) {
|
export function getExamListProjectUnpage(params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/exam/list/loginProject`,
|
url: `/api/exam/list/loginProject`,
|
||||||
@ -109,3 +109,11 @@ export function getExamListSelfByClassId(params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 根据地图ID和prdType查询试卷列表 */
|
||||||
|
export function getExamListByMapIdAndPrdType(mapId, prdType) {
|
||||||
|
return request({
|
||||||
|
url: `/api/exam/list/${mapId}`,
|
||||||
|
method: 'get',
|
||||||
|
params: { prdType: prdType }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="joylink-card">
|
<div class="joylink-card">
|
||||||
<div class="examDetailName">
|
<div class="examDetailName">
|
||||||
{{ $t('exam.courseName') + ': '+ courseModel.name }}
|
试卷列表
|
||||||
</div>
|
</div>
|
||||||
<div id="examDetail">
|
<div id="examDetail">
|
||||||
<el-tabs
|
<!--<el-tabs-->
|
||||||
v-model="activeName"
|
<!--v-model="activeName"-->
|
||||||
class="examDetailActive"
|
<!--class="examDetailActive"-->
|
||||||
>
|
<!-->-->
|
||||||
<el-tab-pane :label="this.$t('exam.itemList')" name="first" class="examDetailPane">
|
<!--<el-tab-pane :label="this.$t('exam.itemList')" name="first" class="examDetailPane">-->
|
||||||
<div v-if="courseModel.treeList.length != 0" style="height:100%;overflow:auto;">
|
<div style="height:100%;overflow:auto;">
|
||||||
<el-table :data="courseModel.treeList" border style="width: 100%;">
|
<el-table :data="tableData" border style="width: 100%;">
|
||||||
<el-table-column label="试卷名称">
|
<el-table-column label="试卷名称">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span :style="{color: scope.row.trial||valid ?'green':'black'}">{{ scope.row.name }}</span>
|
<span :style="{color: scope.row.trial||valid ?'green':'black'}">{{ scope.row.name }}</span>
|
||||||
@ -34,49 +34,38 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="noList">
|
<!--</el-tab-pane>-->
|
||||||
{{ $t('global.temporarilyNoData') }}
|
<!--<el-tab-pane :label="this.$t('exam.permissionsDetails')" name="second" class="examDetailPane">-->
|
||||||
</div>
|
<!--<limit-list ref="limitList" :course-model="courseModel" style="height:100%;overflow:auto;" @initLoadPage="loadInitPage" />-->
|
||||||
</el-tab-pane>
|
<!--</el-tab-pane>-->
|
||||||
<el-tab-pane :label="this.$t('exam.permissionsDetails')" name="second" class="examDetailPane">
|
<!--</el-tabs>-->
|
||||||
<limit-list ref="limitList" :course-model="courseModel" style="height:100%;overflow:auto;" @initLoadPage="loadInitPage" />
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-buy">
|
<div class="btn-buy">
|
||||||
<!-- <el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button> -->
|
<!-- <el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button> -->
|
||||||
<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
<!--<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>-->
|
||||||
<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
|
<!--<el-button v-if="!$route.query.noPreLogout" type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>-->
|
||||||
<el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button>
|
<el-button v-if="$route.query.noPreLogout" type="primary" :disabled="disabled" @click="quit">退出</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getCourseLessonDetail } from '@/api/management/exam';
|
import { getExamListByMapIdAndPrdType } from '@/api/management/exam';
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
// import { PermissionType } from '@/scripts/ConstDic';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import LimitList from '@/views/components/limits/index';
|
// import LimitList from '@/views/components/limits/index';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
import { superAdmin, admin } from '@/router/index';
|
import { superAdmin, admin } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamDetailView',
|
name: 'ExamDetailView',
|
||||||
components: {
|
// components: {
|
||||||
LimitList
|
// LimitList
|
||||||
},
|
// },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
courseModel: {
|
tableData: [],
|
||||||
id: '',
|
|
||||||
name: this.$t('rules.lessonInput'),
|
|
||||||
price: 0,
|
|
||||||
remarks: '',
|
|
||||||
detail: [],
|
|
||||||
pmsList: [],
|
|
||||||
treeList: []
|
|
||||||
},
|
|
||||||
EffectiveTypeList: [],
|
EffectiveTypeList: [],
|
||||||
activeName: 'first',
|
activeName: 'first',
|
||||||
expandList: [],
|
expandList: [],
|
||||||
@ -87,19 +76,6 @@ export default {
|
|||||||
isGzbShow() {
|
isGzbShow() {
|
||||||
return getSessionStorage('project').startsWith('gzb');
|
return getSessionStorage('project').startsWith('gzb');
|
||||||
},
|
},
|
||||||
hasPermssion() {
|
|
||||||
let isShow = false;
|
|
||||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
|
||||||
let count = 0;
|
|
||||||
this.courseModel.pmsList.forEach(element => {
|
|
||||||
count += element.remains;
|
|
||||||
});
|
|
||||||
if (count > 0) {
|
|
||||||
isShow = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return this.$store.state.user.companyId || isShow;
|
|
||||||
},
|
|
||||||
isLocal() { // 是否为本地项目
|
isLocal() { // 是否为本地项目
|
||||||
return process.env.VUE_APP_PRO === 'local';
|
return process.env.VUE_APP_PRO === 'local';
|
||||||
},
|
},
|
||||||
@ -120,30 +96,16 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitPage() {
|
loadInitPage() {
|
||||||
getCourseLessonDetail({lessonId: this.$route.query.lessonId}).then(resp =>{
|
getExamListByMapIdAndPrdType(this.$route.query.mapId, this.$route.query.prdType).then(resp =>{
|
||||||
if (resp.data) {
|
if (resp.data && resp.data.length) {
|
||||||
this.courseModel = {
|
this.tableData = resp.data;
|
||||||
id: resp.data.id,
|
|
||||||
name: resp.data.name,
|
|
||||||
pmsList: resp.data.permissionList || [],
|
|
||||||
prdType: resp.data.prdType,
|
|
||||||
mapId: resp.data.mapId,
|
|
||||||
PermissionType: PermissionType.EXAM,
|
|
||||||
treeList: resp.data.examDefinitionList,
|
|
||||||
systemFault: resp.data.systemFault
|
|
||||||
};
|
|
||||||
if (this.hasPermssion || resp.data.available) {
|
|
||||||
this.valid = true;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.getExpandList(this.courseModel.id);
|
|
||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$alert('获取考试信息失败!', '提示', {
|
this.$alert('获取考试信息失败!', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
type: 'error',
|
type: 'error',
|
||||||
center: true,
|
center: true,
|
||||||
callback: action => {
|
callback: action => {
|
||||||
this.backLessonList();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -166,36 +128,12 @@ export default {
|
|||||||
}
|
}
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
},
|
},
|
||||||
backLessonList() {
|
|
||||||
this.disabled = true;
|
|
||||||
setTimeout(() => {
|
|
||||||
localStore.remove('examDetail' + this.$route.params.subSystem);
|
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.params.subSystem}`});
|
|
||||||
}, 100);
|
|
||||||
},
|
|
||||||
clickEvent(obj) {
|
clickEvent(obj) {
|
||||||
const path = `${this.$route.path.match(/(\/.*)\/course/)[1]}${UrlConfig.examDetail}`;
|
const path = `${this.$route.path.match(/(\/.*)\/course/)[1]}${UrlConfig.examDetail}`;
|
||||||
if ((this.valid || obj.trial) && path.includes('device')) {
|
if (path.includes('device')) {
|
||||||
this.$router.replace({ path: `${path}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId, noPreLogout: this.$route.query.noPreLogout }});
|
this.$router.replace({ path: `${path}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: obj.mapId, prdType: obj.prdType, noPreLogout: this.$route.query.noPreLogout }});
|
||||||
} else if (this.valid || obj.trial) {
|
|
||||||
this.$router.push({ path: `${path}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: this.courseModel.mapId, noPreLogout: this.$route.query.noPreLogout }});
|
|
||||||
} else {
|
} else {
|
||||||
this.confirmToBuy();
|
this.$router.push({ path: `${path}/${obj.id}`, query: { subSystem: this.$route.params.subSystem, mapId: obj.mapId, noPreLogout: this.$route.query.noPreLogout }});
|
||||||
}
|
|
||||||
},
|
|
||||||
confirmToBuy() {
|
|
||||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
|
||||||
cancelButtonText: this.$t('tip.cancel')
|
|
||||||
}).then(() => {
|
|
||||||
this.buy();
|
|
||||||
}).catch(() => { });
|
|
||||||
},
|
|
||||||
getExpandList(id) {
|
|
||||||
let expand = getSessionStorage('trainingExamExpandList' + id);
|
|
||||||
expand = expand ? (expand + '').split(',') : '';
|
|
||||||
if (expand instanceof Array) {
|
|
||||||
this.expandList = expand;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
quit() {
|
quit() {
|
||||||
|
@ -216,9 +216,9 @@ export default {
|
|||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (this.$route.query.subSystem) {
|
if (this.$route.query.subSystem) {
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.examHome}/${this.$route.query.subSystem}`, query: {lessonId: this.examDetails.lessonId}});
|
||||||
} else {
|
} else {
|
||||||
this.$router.replace({ path: '/device/course', query: {lessonId: this.examDetails.lessonId, noPreLogout: this.$route.query.noPreLogout}});
|
this.$router.replace({ path: '/device/course', query: {mapId: this.$route.query.mapId, prdType: this.$route.query.prdType, noPreLogout: this.$route.query.noPreLogout}});
|
||||||
}
|
}
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
|
@ -6,21 +6,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card v-loading="loading">
|
<el-card v-loading="loading">
|
||||||
<el-table :data="tableData" border style="width: 100%">
|
<el-table :data="tableData" border style="width: 100%" height="calc(100vh - 150px)">
|
||||||
<el-table-column prop="name" :label="this.$t('exam.courseName')" />
|
<el-table-column prop="name" label="试卷名称" />
|
||||||
<el-table-column v-if="isGzbShow" prop="classNames" label="所属班级">
|
<el-table-column v-if="isGzbShow" prop="classNames" label="所属班级">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-for="(item, index) in scope.row.classNames" :key="index" type="success">{{ item }}</el-tag>
|
<el-tag v-for="(item, index) in scope.row.classNames" :key="index" type="success">{{ item }}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="remarks" show-overflow-tooltip :label="this.$t('exam.courseDescription')" />
|
<el-table-column prop="duration" label="考试时长(分钟)">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ Number(scope.row.duration) / 60 }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="fullPoint" label="总分" />
|
||||||
|
<el-table-column prop="remarks" show-overflow-tooltip label="试卷说明" />
|
||||||
<el-table-column :label="this.$t('global.operate')">
|
<el-table-column :label="this.$t('global.operate')">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="primary" @click="goLesson(scope.row)">
|
<el-button size="mini" type="primary" @click="goExamDetail(scope.row)">
|
||||||
{{ $t('exam.enterTheExam') }}
|
考试详情
|
||||||
</el-button>
|
|
||||||
<el-button v-if="project.endsWith('gzb') && isTeacher && userId === scope.row.creatorId" size="mini" type="danger" @click="handleDelete(scope.row)">
|
|
||||||
删除课程
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -69,7 +72,7 @@ export default {
|
|||||||
if (this.$route.params.subSystem) {
|
if (this.$route.params.subSystem) {
|
||||||
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
getSubSystemDetail(this.$route.params.subSystem).then(resp =>{
|
||||||
if (resp.data) {
|
if (resp.data) {
|
||||||
this.tableData = resp.data.lessonList;
|
this.tableData = resp.data.examList;
|
||||||
} else {
|
} else {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
}
|
}
|
||||||
@ -85,24 +88,13 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
goLesson(row) {
|
goExamDetail(row) {
|
||||||
localStore.set('examDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}?lessonId=${row.id}`);
|
const path = `${this.$route.path.match(/(\/.*)\/examHome/)[1]}${UrlConfig.examDetail}`;
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.params.subSystem}`, query: {lessonId: row.id}});
|
if (path.includes('device')) {
|
||||||
},
|
this.$router.replace({ path: `${path}/${row.id}`, query: { subSystem: this.$route.params.subSystem, mapId: row.mapId, noPreLogout: this.$route.query.noPreLogout }});
|
||||||
handleDelete(row) {
|
} else {
|
||||||
this.$confirm('此操作将删除课程及所有对应的试卷,且无法恢复,是否继续?', this.$t('global.tips'), {
|
this.$router.push({ path: `${path}/${row.id}`, query: { subSystem: this.$route.params.subSystem, mapId: row.mapId, noPreLogout: this.$route.query.noPreLogout }});
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
}
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
forceDeleteLesson(row.id).then(response => {
|
|
||||||
this.$message.success(this.$t('publish.deleteSuccess'));
|
|
||||||
this.loadInitPage();
|
|
||||||
}).catch((error) => {
|
|
||||||
this.loadInitPage();
|
|
||||||
this.$messageBox(this.$t('error.deleteFailed') + ':' + error.message);
|
|
||||||
});
|
|
||||||
}).catch(() => { });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -497,26 +497,23 @@ export default {
|
|||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank');
|
window.open(routeData.href, '_blank');
|
||||||
} else {
|
} else {
|
||||||
getPublishLessonListByMapId({mapId: this.mapId}).then(resp => {
|
let prdType = '';
|
||||||
const lesson = resp.data.find(item => {
|
if (this.$route.query.type === 'LW') {
|
||||||
return (this.$route.query.type === 'LW' && item.prdType === '01') || (this.$route.query.type === 'CW' && item.prdType === '02');
|
prdType = '01';
|
||||||
});
|
} else if (this.$route.query.type === 'CW') {
|
||||||
if (lesson) {
|
prdType = '02';
|
||||||
|
}
|
||||||
|
if (prdType) {
|
||||||
const routeData = this.$router.resolve({
|
const routeData = this.$router.resolve({
|
||||||
path:'/device/course',
|
path:'/device/course',
|
||||||
query:{
|
query:{
|
||||||
lessonId: lesson.id,
|
prdType: prdType,
|
||||||
mapId:this.mapId,
|
mapId:this.mapId,
|
||||||
noPreLogout: true
|
noPreLogout: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.open(routeData.href, '_blank');
|
window.open(routeData.href, '_blank');
|
||||||
} else {
|
|
||||||
this.$message.error('暂无考试系统数据!');
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
|
||||||
this.$message.error('获取课程ID失败!');
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
97
src/views/organization/classManage/bindExams.vue
Normal file
97
src/views/organization/classManage/bindExams.vue
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag title="班级排考试" :visible.sync="dialogShow" width="400px" :before-close="doClose">
|
||||||
|
<el-form ref="form" :model="classModel" :rules="rules" label-width="120px" size="mini">
|
||||||
|
<el-form-item label="班级名称:" prop="name">
|
||||||
|
<el-input v-model="classModel.name" style="width: 220px;" :disabled="true" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="安排考试:" prop="lessonIds">
|
||||||
|
<el-select v-model="classModel.examIds" multiple placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in examList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id+''"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||||
|
<el-button type="primary" :loading="loading" @click="create">{{ $t('global.confirm') }}</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getExamListProjectUnpage } from '@/api/management/exam';
|
||||||
|
import { getExamListInClass, applyExamToClass } from '@/api/company';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'CreateClass',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogShow: false,
|
||||||
|
loading: false,
|
||||||
|
examList: [],
|
||||||
|
classModel: {
|
||||||
|
id: '',
|
||||||
|
name: '',
|
||||||
|
examIds: []
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
rules() {
|
||||||
|
const baseRules = {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入班级名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
examIds: [
|
||||||
|
{ required: true, message: '请选择安排考试', trigger: 'change' }
|
||||||
|
]
|
||||||
|
};
|
||||||
|
return baseRules;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async doShow(row) {
|
||||||
|
try {
|
||||||
|
this.examList = [];
|
||||||
|
const resp = await getExamListProjectUnpage();
|
||||||
|
this.examList = resp.data;
|
||||||
|
const rest = await getExamListInClass(row.id);
|
||||||
|
this.classModel.id = row.id;
|
||||||
|
this.classModel.name = row.name;
|
||||||
|
this.classModel.examIds = rest.data;
|
||||||
|
this.dialogShow = true;
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
this.$message.error('获取试卷列表或班级数据异常!');
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
create() {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
applyExamToClass( this.classModel.id, this.classModel.examIds).then(response => {
|
||||||
|
this.doClose();
|
||||||
|
this.$message.success('班级安排考试成功!');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('班级安排考试失败!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
this.dialogShow = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.option-group {
|
||||||
|
margin: 10px 100px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -9,6 +9,7 @@
|
|||||||
/>
|
/>
|
||||||
<create-class ref="createClass" @refresh="classRefresh" />
|
<create-class ref="createClass" @refresh="classRefresh" />
|
||||||
<bind-lessons ref="bindLessons" />
|
<bind-lessons ref="bindLessons" />
|
||||||
|
<bind-exams ref="bindExams" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -16,11 +17,13 @@
|
|||||||
import { getClassListPage, deleteDeptInfo } from '@/api/company';
|
import { getClassListPage, deleteDeptInfo } from '@/api/company';
|
||||||
import CreateClass from './createClass';
|
import CreateClass from './createClass';
|
||||||
import BindLessons from './bindLessons';
|
import BindLessons from './bindLessons';
|
||||||
|
import BindExams from './bindExams';
|
||||||
export default {
|
export default {
|
||||||
name: 'ClassManage',
|
name: 'ClassManage',
|
||||||
components: {
|
components: {
|
||||||
CreateClass,
|
CreateClass,
|
||||||
BindLessons
|
BindLessons,
|
||||||
|
BindExams
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -70,7 +73,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '450',
|
width: '510',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '编辑班级',
|
name: '编辑班级',
|
||||||
@ -95,6 +98,11 @@ export default {
|
|||||||
handleClick: this.handleBindLesson,
|
handleClick: this.handleBindLesson,
|
||||||
type: 'primary'
|
type: 'primary'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '安排考试',
|
||||||
|
handleClick: this.handleBindExam,
|
||||||
|
type: 'primary'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: '删除',
|
||||||
handleClick: this.handleDeleteClass,
|
handleClick: this.handleDeleteClass,
|
||||||
@ -152,6 +160,9 @@ export default {
|
|||||||
},
|
},
|
||||||
classCreate() {
|
classCreate() {
|
||||||
this.$refs.createClass.doShow();
|
this.$refs.createClass.doShow();
|
||||||
|
},
|
||||||
|
handleBindExam(index, row) {
|
||||||
|
this.$refs.bindExams.doShow(row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -15,6 +15,7 @@ import { getLessonProjectListNoPage } from '@/api/jmap/lesson';
|
|||||||
import { getClassListUnPage } from '@/api/company';
|
import { getClassListUnPage } from '@/api/company';
|
||||||
import { getExamListProject, deleteExam } from '@/api/management/exam';
|
import { getExamListProject, deleteExam } from '@/api/management/exam';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ExamManage',
|
name: 'ExamManage',
|
||||||
@ -24,6 +25,7 @@ export default {
|
|||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
|
mapIdList: [],
|
||||||
examQueryForm: {
|
examQueryForm: {
|
||||||
leftSpan: 14,
|
leftSpan: 14,
|
||||||
textAlign: 'right',
|
textAlign: 'right',
|
||||||
@ -46,23 +48,6 @@ export default {
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
label: '创建人:'
|
label: '创建人:'
|
||||||
}
|
}
|
||||||
// self: {
|
|
||||||
// type: 'select',
|
|
||||||
// label: '本人创建:',
|
|
||||||
// config: {
|
|
||||||
// data: [
|
|
||||||
// { label: '是', value: true },
|
|
||||||
// { label: '否', value: false }
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// clsId: {
|
|
||||||
// type: 'select',
|
|
||||||
// label: '班级:',
|
|
||||||
// config: {
|
|
||||||
// data: []
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
examQueryList: {
|
examQueryList: {
|
||||||
@ -74,15 +59,20 @@ export default {
|
|||||||
title: '试卷名称',
|
title: '试卷名称',
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// title: '课程名称',
|
title: '归属地图',
|
||||||
// prop: 'lessonId',
|
prop: 'mapId',
|
||||||
// type: 'tag',
|
type: 'tag',
|
||||||
// columnValue: (row) => {
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']); },
|
||||||
// return this.$convertField(row.lessonId, this.lessonList || [], ['id', 'name']);
|
tagType: (row) => { return ''; }
|
||||||
// },
|
},
|
||||||
// tagType: (row) => { }
|
{
|
||||||
// },
|
title: '产品类型',
|
||||||
|
prop: 'prdType',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { if (row.prdType === '01') { return '现地工作站'; } else if (row.prdType === '02') { return '行调工作站'; } },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '班级',
|
title: '班级',
|
||||||
prop: 'clsIds',
|
prop: 'clsIds',
|
||||||
@ -151,15 +141,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
getLessonProjectListNoPage().then(response => {
|
|
||||||
this.lessonList = response.data;
|
|
||||||
this.lessonList.forEach(item => {
|
|
||||||
this.examQueryForm.queryObject.lessonId.config.data.push({ value: item.id, label: item.name });
|
|
||||||
});
|
|
||||||
});
|
|
||||||
getClassListUnPage().then(response => {
|
getClassListUnPage().then(response => {
|
||||||
this.classList = response.data;
|
this.classList = response.data;
|
||||||
});
|
});
|
||||||
|
this.mapIdList = [];
|
||||||
|
getPublishMapListOnline().then(response => {
|
||||||
|
this.mapIdList = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleQueryGrade(index, row) {
|
handleQueryGrade(index, row) {
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
import { getLessonProjectList, forceDeleteLesson } from '@/api/jmap/lesson';
|
import { getLessonProjectList, forceDeleteLesson } from '@/api/jmap/lesson';
|
||||||
import EditLessonInfo from './editLessonInfo';
|
import EditLessonInfo from './editLessonInfo';
|
||||||
import localStore from 'storejs';
|
|
||||||
export default {
|
export default {
|
||||||
name: 'LessonManage',
|
name: 'LessonManage',
|
||||||
components: {
|
components: {
|
||||||
@ -96,11 +95,6 @@ export default {
|
|||||||
return row.creatorId == this.userId;
|
return row.creatorId == this.userId;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: '考试管理',
|
|
||||||
handleClick: this.handleExamManage,
|
|
||||||
type: 'primary'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: '课程详情',
|
name: '课程详情',
|
||||||
handleClick: this.handleLessonDetail,
|
handleClick: this.handleLessonDetail,
|
||||||
@ -155,10 +149,6 @@ export default {
|
|||||||
this.$refs.lessonQueryListPage.refresh(true);
|
this.$refs.lessonQueryListPage.refresh(true);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleExamManage(index, row) {
|
|
||||||
localStore.set('/info/organization/examManage', { lessonId: row.id });
|
|
||||||
this.$router.replace('/info/organization/examManage');
|
|
||||||
},
|
|
||||||
handleLessonDetail(index, row) {
|
handleLessonDetail(index, row) {
|
||||||
this.$router.push(`/info/lessonDetail?lessonId=${row.id}`);
|
this.$router.push(`/info/lessonDetail?lessonId=${row.id}`);
|
||||||
}
|
}
|
||||||
|
@ -14,12 +14,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'List',
|
name: 'List',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
BizTypeList: [],
|
BizTypeList: [],
|
||||||
|
mapIdList: [],
|
||||||
OrderTypeList: [],
|
OrderTypeList: [],
|
||||||
PayTypeList: [],
|
PayTypeList: [],
|
||||||
PayStatusList: [],
|
PayStatusList: [],
|
||||||
@ -39,6 +41,13 @@ export default {
|
|||||||
title: this.$t('publish.paperName'),
|
title: this.$t('publish.paperName'),
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '归属地图',
|
||||||
|
prop: 'mapId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.mapId, this.mapIdList, ['id', 'name']); },
|
||||||
|
tagType: (row) => { return ''; }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '产品类型',
|
title: '产品类型',
|
||||||
prop: 'prdType',
|
prop: 'prdType',
|
||||||
@ -177,6 +186,10 @@ export default {
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.mapIdList = [];
|
||||||
|
getPublishMapListOnline().then(response => {
|
||||||
|
this.mapIdList = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
|
Loading…
Reference in New Issue
Block a user