Commit e360ca85 authored by 刘怀志's avatar 刘怀志

题库管理暂存

parent 66577a3f
import request from '@/utils/request'
import Qs from 'qs'
// 课程管理列表查询
export function queryBLessonsByPagination(query) {
return request({
url: '/post/blesson/queryBLessonByPagination\n',
method: 'get',
params: query
})
}
// 查询企业信息
export function findAllUnitInfo(query) {
return request({
url: '/sysunit/findAllUnitInfo',
method: 'get',
params: query
})
}
// 查询岗位题库下面的公司集合
export function getEnterpriseListById(id) {
return request({
url: '/post/blesson/enterprise/' + id,
method: 'get'
})
}
// 课程管理查询详细信息
export function detailBLesson(businessId) {
return request({
url: '/blesson/detail/' + businessId,
method: 'get'
})
}
// 修改课程管理
export function updateBLesson(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/blesson/update/' + businessId,
method: 'put',
data
})
}
// 课程管理目录查询
export function queryBChaptersWithoutAuth(query) {
return request({
url: '/bchapter/queryBChaptersWithoutAuth',
method: 'get',
params: query
})
}
// 查询课程方向下拉
export function queryDirectionsList(query) {
return request({
url: '/bdirection/queryDirectionsList',
method: 'get',
params: query
})
}
// 课程管理新增
export function blessonAdd(data) {
data = Qs.stringify(data)
return request({
url: '/post/blesson/add',
method: 'post',
data,
headers: {}
})
}// 课程管理新增
export function blessonUpdate(data) {
data = Qs.stringify(data)
return request({
url: '/post/blesson/update',
method: 'post',
data,
headers: {}
})
}
// 添加企业
export function addEnterprise(data) {
data = Qs.stringify(data)
return request({
url: '/post/blesson/addEnterprise',
method: 'post',
data
})
}
// 课程管理删除
export function blessonRemove(data) {
return request({
url: '/post/blesson/deleteLogical/' + data,
method: 'DELETE'
})
}
// 课程管理导入
export function excelImport(data) {
return request({
url: '/blesson/excelImport',
method: 'post',
headers: {
'Content-Type': 'multipart/form-data'
},
transformRequest: [(data) => {
return data
}],
data
})
}
// 课程管理恢复封面
export function defaultUrl(data) {
data = Qs.stringify(data)
return request({
url: '/blesson/defaultUrl',
method: 'post',
data,
headers: {}
})
}
// 课程管理修改封面
export function picImport(data) {
return request({
url: '/blesson/picImport',
method: 'post',
headers: {
'Content-Type': 'multipart/form-data'
},
transformRequest: [(data) => {
return data
}],
data
})
}
// 课程管理-目录添加章
export function bchapterAdd(data) {
data = Qs.stringify(data)
return request({
url: '/bchapter/add',
method: 'post',
data,
headers: {}
})
}
// 课程管理-章节查询视频
export function findVideoUrl(data) {
data = Qs.stringify(data)
return request({
url: '/bfile/findVideoUrl',
method: 'post',
data,
headers: {}
})
}
// 课程管理-目录删除节
export function bchapterRemove(data) {
data = Qs.stringify(data)
return request({
url: '/bchapter/remove',
method: 'post',
data,
headers: {}
})
}
// 课程管理-目录章节上移
export function updateTopChapter(data) {
data = Qs.stringify(data)
return request({
url: '/bchapter/updateTopChapter',
method: 'post',
data,
headers: {}
})
}
// 课程管理-目录章节下移
export function updateDownChapter(data) {
data = Qs.stringify(data)
return request({
url: '/bchapter/updateDownChapter',
method: 'post',
data,
headers: {}
})
}
// 6.导入
export function uploadVideo(data) {
return request({
url: '/bfile/uploadVideo',
method: 'post',
headers: {
'Content-Type': 'multipart/form-data'
},
transformRequest: [(data) => {
return data
}],
data
})
}
// 上传压缩包
export function uploadZip(data) {
return request({
url: '/bfile/uploadData',
method: 'post',
headers: {
'Content-Type': 'multipart/form-data'
},
transformRequest: [(data) => {
return data
}],
data
})
}
// 课程管理-章节查询PDF信息
export function findPdfInfo(data) {
data = Qs.stringify(data)
return request({
url: '/bfile/findPdfInfo',
method: 'post',
data,
headers: {}
})
}
export function findZIpInfo(data) {
data = Qs.stringify(data)
return request({
url: '/bfile/findDataUrl',
method: 'post',
data,
headers: {}
})
}
// 课程管理-根据章id查询节
export function findSection(query) {
return request({
url: '/bchapter/querySections',
method: 'get',
params: query
})
}
// 课程管理-章节查询PDF_url信息
export function findPdfUrl(data) {
data = Qs.stringify(data)
return request({
url: '/bfile/findPdfUrl ',
method: 'post',
data,
headers: {}
})
}
// 课程管理-视频/pdf删除
export function delData(query) {
return request({
url: '/bfile/deleteFile',
method: 'delete',
params: query
})
}
export function delZip(query) {
return request({
url: '/bfile/deleteDataFile',
method: 'delete',
params: query
})
}
// 课程管理 岗位分类查询
export function queryTeaLessonJobs(query) {
return request({
url: '/tealessonjob/queryTeaLessonJobs',
method: 'get',
params: query
})
}
// 课程管理 技术分类查询
export function queryTeaLessonTecs(query) {
return request({
url: '/tealessontec/queryTeaLessonTec',
method: 'get',
params: query
})
}
// 课程管理 修改状态
export function updateCourseStatus(data) {
return request({
url: `/post/blesson/updateStatus/${data.flag}/${data.businessId}`,
method: 'put'
})
}
// 下载zip文件
export function downloadZip(params) {
return request({
url: '/bfile/download/',
method: 'post',
params
})
}
// 分页查询课程评分
export function queryPcLessonEvaluationByPagination(query) {
return request({
url: '/pclessonevaluation/evaluationList',
method: 'get',
params: query
})
}
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<div class="app-container"> <div class="app-container">
<!-- 标题--> <!-- 标题-->
<div class="examinationTitle"> <div class="examinationTitle">
<span>岗位分类:{{ name }}</span> <span>岗位分类:{{ getJobClassificationName }}</span>
<span class="title-right">题库难度:{{name}}</span> <span class="title-right">题库难度:{{ getDifficultyLevelName(difficultyClassify) }}</span>
</div> </div>
<examination-paper :bussiness-id="courseId" /> <examination-paper :bussiness-id="courseId" />
</div> </div>
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
import ExaminationPaper from '@/views/courseInformation/examinationCompany/examinationPaper.vue' import ExaminationPaper from '@/views/courseInformation/examinationCompany/examinationPaper.vue'
import { updateBLesson } from '@/api/courseManagement/indexApi' import { updateBLesson } from '@/api/courseManagement/indexApi'
import {getDict} from "@/api/system/dict/data";
export default { export default {
name: 'ExaminationManagement', name: 'ExaminationManagement',
...@@ -26,8 +27,14 @@ export default { ...@@ -26,8 +27,14 @@ export default {
courseId: null, courseId: null,
bussinessId: '', // 业务id bussinessId: '', // 业务id
name: '', // 课程名称 name: '', // 课程名称
jobClassify: '', // 岗位分类
passingGrade: '', // 及格分数 passingGrade: '', // 及格分数
id: null difficultyClassify: '', // 及格分数
id: null,
valueOptions: [
],
difficultyOptions: [
]
} }
}, },
// mounted() { // mounted() {
...@@ -36,6 +43,8 @@ export default { ...@@ -36,6 +43,8 @@ export default {
// this.name = this.$route.query.name // this.name = this.$route.query.name
// }, // },
created() { created() {
this.getJobClassification()
this.getDifficultyLevel()
// 接受路由传递的参数 // 接受路由传递的参数
// this.courseId = this.$route.query.businessId // this.courseId = this.$route.query.businessId
this.courseId = this.$route.query.courseId this.courseId = this.$route.query.courseId
...@@ -43,9 +52,49 @@ export default { ...@@ -43,9 +52,49 @@ export default {
this.id = this.$route.query.courseId this.id = this.$route.query.courseId
this.name = this.$route.query.name this.name = this.$route.query.name
this.passingGrade = this.$route.query.passingGrade this.passingGrade = this.$route.query.passingGrade
this.jobClassify = this.$route.query.jobClassify
this.difficultyClassify = this.$route.query.difficultyClassify
console.log(this.id, this.name, this.passingGrade) console.log(this.id, this.name, this.passingGrade)
}, },
computed: {
// 根据岗位的id获取岗位的名称
getJobClassificationName() {
if (!this.jobClassify) {
return ''
}
const values = this.jobClassify.split(',') // 将逗号分隔的多个值分割成数组
const names = []
this.valueOptions.forEach(item => {
if (values.includes(item.dictValue)) {
names.push(item.dictLabel) // 将找到的名称添加到数组中
}
})
return names.join(',') // 将名称数组拼接成逗号分隔的字符串
}
},
methods: { methods: {
// 获取难度等级
getDifficultyLevel() {
getDict('difficulty_grade').then(res => {
this.difficultyOptions = res.data
})
},
// 根据难度等级的id获取难度等级的名称
getDifficultyLevelName(dictValue) {
let name = ''
this.difficultyOptions.forEach(item => {
if (item.dictValue === dictValue) {
name = item.dictLabel
}
})
return name
},
// 获取岗位类型
getJobClassification() {
getDict('job_classify').then(res => {
this.valueOptions = res.data
})
},
tabClick() { tabClick() {
// 在tab切换时更新bussinessId // 在tab切换时更新bussinessId
console.log('name', this.name) console.log('name', this.name)
......
...@@ -70,33 +70,33 @@ ...@@ -70,33 +70,33 @@
</div> </div>
<el-dialog :title="title" :visible.sync="dialogFormVisible" size="tiny" :close-on-click-modal="false" @close="callOf('form')"> <el-dialog :title="title" :visible.sync="dialogFormVisible" size="tiny" :close-on-click-modal="false" @close="callOf('form')">
<el-form ref="form" :model="form" style="margin-top: 1em;margin-right: 1em;" label-width="auto" :rules="formrule1"> <el-form ref="form" :model="form" style="margin-top: 1em;margin-right: 1em;" label-width="auto" :rules="formrule1">
<el-form-item label="岗位分类" prop="value"> <el-form-item label="岗位分类" prop="jobClassify">
<el-select v-model="form.value" placeholder="适用岗位" clearable> <el-select v-model="form.jobClassify" placeholder="岗位分类" clearable>
<el-option <el-option
v-for="item in valueOptions" v-for="item in valueOptions"
:key="item.value" :key="item.dictValue"
:label="item.label" :label="item.dictLabel"
:value="item.value" :value="item.dictValue"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="题库难度" prop="value2"> <el-form-item label="题库难度" prop="difficultyClassify">
<el-select v-model="form.value2" placeholder="难度等级" clearable> <el-select v-model="form.difficultyClassify" placeholder="难度等级" clearable>
<el-option <el-option
v-for="item in valueOptions" v-for="item in difficultyOptions"
:key="item.value" :key="item.dictValue"
:label="item.label" :label="item.dictLabel"
:value="item.value" :value="item.dictValue"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="及格分数" prop="totalStuHours"> <el-form-item label="及格分数" prop="passingGrade">
<el-input-number v-model.trim="form.totalStuHours" /> <el-input-number v-model.trim="form.passingGrade" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button> <el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="info" @click="createClass('form')">保 存</el-button> <el-button :type="commonField.typePrimary" @click="createClass('form')">保 存</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--------------------------------------------------------课程功能块----------------------------------------------------> <!--------------------------------------------------------课程功能块---------------------------------------------------->
...@@ -114,37 +114,37 @@ ...@@ -114,37 +114,37 @@
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="岗位分类" prop="jobClassify" min-width="200px" :show-overflow-tooltip="true"> <el-table-column align="center" label="岗位分类" prop="jobClassify" min-width="180px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getJobClassificationName(scope.row.jobClassify) }}</span> <span>{{ getJobClassificationName(scope.row.jobClassify) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="题库难度" prop="difficultyClassify" min-width="120px" :show-overflow-tooltip="true"> <el-table-column align="center" label="题库难度" prop="difficultyClassify" min-width="90px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ getDifficultyLevelName(scope.row.difficultyClassify) }}</span> <span>{{ getDifficultyLevelName(scope.row.difficultyClassify) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="试题数量" prop="lessonBrief" min-width="200px" :show-overflow-tooltip="true"> <el-table-column align="center" label="试题数量" prop="questionsDTO" min-width="300px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.lessonBrief }}</span> <span>单选题:{{ scope.row.questionsDTO ? scope.row.questionsDTO.singleChoice : 0 }}道;多选题:{{ scope.row.questionsDTO ? scope.row.questionsDTO.multipleChoice : 0 }}道;判断题:{{ scope.row.questionsDTO ? scope.row.questionsDTO.judgment : 0 }}道;</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 满分--> <!-- 满分-->
<el-table-column align="center" label="满分" prop="lessonPrice" :show-overflow-tooltip="true"> <el-table-column align="center" label="满分" prop="lessonPrice" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.lessonPrice }}</span> <span>{{ scope.row.fullScore }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 及格分--> <!-- 及格分-->
<el-table-column align="center" label="及格分" prop="lessonPrice" :show-overflow-tooltip="true"> <el-table-column align="center" label="及格分" prop="lessonPrice" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.lessonPrice }}</span> <span>{{ scope.row.passScore ? scope.row.passScore : '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- 开放企业--> <!-- 开放企业-->
<el-table-column align="center" label="开放企业" prop="lessonPrice" :show-overflow-tooltip="true"> <el-table-column align="center" label="开放企业" prop="lessonPrice" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" @click="handleCheckCompany">{{ scope.row.lessonPrice }}</el-link> <el-link type="primary" @click="handleCheckCompany(scope.row)">{{ scope.row.companyNum }}</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="题库状态" prop="flag" :show-overflow-tooltip="true"> <el-table-column align="center" label="题库状态" prop="flag" :show-overflow-tooltip="true">
...@@ -159,12 +159,12 @@ ...@@ -159,12 +159,12 @@
</el-table-column> </el-table-column>
<el-table-column align="left" label="修改人" prop="lessonDescription" min-width="150px" :show-overflow-tooltip="true"> <el-table-column align="left" label="修改人" prop="lessonDescription" min-width="150px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.lessonDescription }}</span> <span>{{ scope.row.updateUser ? scope.row.updateUser : '--' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="left" label="修改时间" prop="lessonDescription" min-width="150px" :show-overflow-tooltip="true"> <el-table-column align="left" label="修改时间" prop="lessonDescription" min-width="150px" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.lessonDescription }}</span> <span>{{ scope.row.updateDate }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" fixed="right" width="200"> <el-table-column align="center" label="操作" fixed="right" width="200">
...@@ -327,10 +327,17 @@ ...@@ -327,10 +327,17 @@
> >
<div style="padding: 50px"> <div style="padding: 50px">
<div class="scoreTitle"> <div class="scoreTitle">
<el-form ref="queryForm" style="padding: 0 0 0 10px" class="addCompany" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" class="addCompany" :model="companyForm" :inline="true">
<div> <div>
<el-form-item label="企业名称:" prop="jobClassify"> <el-form-item label="企业名称:" prop="jobClassify">
<el-select v-model.trim="queryParams.jobClassify" placeholder="企业名称" clearable /> <el-select v-model="companyForm.enterpriseName" size="small" placeholder="请选择企业名称" clearable>
<el-option
v-for="item in enterpriseNameOptions"
:key="item.businessId"
:label="item.unitName"
:value="item.businessId"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<!-- //查询按钮--> <!-- //查询按钮-->
...@@ -364,20 +371,14 @@ ...@@ -364,20 +371,14 @@
:cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
:header-cell-style="{ textAlign: 'center' }" :header-cell-style="{ textAlign: 'center' }"
border border
:data="scoreTable" :data="enterpriseTable"
> >
<el-table-column label="序号" type="index" width="60px" /> <el-table-column label="序号" type="index" width="60px" />
<el-table-column label="企业名称" prop="userId" :show-overflow-tooltip="true"> <el-table-column label="企业名称" prop="enterpriseName" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.anonymousFlag=='1'"> <div>
匿名用户 {{ scope.row.enterpriseName }}
</div>
<div v-else-if="scope.row.unitName===''">
{{ scope.row.userName }}
</div>
<div v-else>
{{ scope.row.userName+'-'+scope.row.unitName }}
</div> </div>
</template> </template>
...@@ -389,7 +390,7 @@ ...@@ -389,7 +390,7 @@
:type="commonField.typeParent" :type="commonField.typeParent"
:size="commonField.size" :size="commonField.size"
@click="removeFile(scope.row)" @click="removeFile(scope.row)"
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -405,35 +406,36 @@ ...@@ -405,35 +406,36 @@
:cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
:header-cell-style="{ textAlign: 'center' }" :header-cell-style="{ textAlign: 'center' }"
border border
:data="scoreTable" :data="enterpriseNameOptions"
max-height="60vh"
@selection-change="handleSelectionChange"
> >
<el-table-column
type="selection"
:reserve-selection="true"
/>
<el-table-column label="序号" type="index" width="60px" /> <el-table-column label="序号" type="index" width="60px" />
<el-table-column label="企业名称" prop="userId" :show-overflow-tooltip="true"> <el-table-column label="企业名称" prop="enterpriseName" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.anonymousFlag=='1'"> <div>
匿名用户 {{ scope.row.unitName }}
</div>
<div v-else-if="scope.row.unitName===''">
{{ scope.row.userName }}
</div>
<div v-else>
{{ scope.row.userName+'-'+scope.row.unitName }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="150">
<template slot-scope="scope">
<el-button
:class="commonField.updateClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="removeFile(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<div class="drawerfooterCompany">
<div class="drawer-area">
<div class="test">
<span style="color: #FF9900;cursor: pointer;"><span style="text-decoration: underline">已选{{ selectedCount }}家企业</span></span>
</div>
<div class="cancelArea">
<el-button class="cancelBtn" @click="innerDrawer = false">取 消</el-button>
<el-button class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
</div>
</div>
</div>
</el-drawer> </el-drawer>
</div> </div>
<pagination <pagination
...@@ -462,13 +464,16 @@ import { ...@@ -462,13 +464,16 @@ import {
findZIpInfo, findZIpInfo,
delZip, delZip,
downloadZip, downloadZip,
queryPcLessonEvaluationByPagination queryPcLessonEvaluationByPagination,
} from '@/api/courseManagement/indexApi' findAllUnitInfo,
getEnterpriseListById, addEnterprise, blessonUpdate
} from '@/api/jobQuestionBank/index'
import commonField from '@/utils/commonField' import commonField from '@/utils/commonField'
import { getDict } from '@/api/system/dict/data' import { getDict } from '@/api/system/dict/data'
import { listAllCmsLecturer } from '@/api/courseManagement/cmsLecturer' import { listAllCmsLecturer } from '@/api/courseManagement/cmsLecturer'
import { urlDecrypt, urlEncrypt } from '@/utils/jsencrypt' import { urlDecrypt, urlEncrypt } from '@/utils/jsencrypt'
import home_pic_kecheng from '@/assets/image/home_pic_kecheng.png' import home_pic_kecheng from '@/assets/image/home_pic_kecheng.png'
import { batchAddTeaTrialCourse } from '@/api/try/teaTrialCourse'
export default { export default {
name: 'Index', name: 'Index',
components: { components: {
...@@ -524,6 +529,10 @@ export default { ...@@ -524,6 +529,10 @@ export default {
} }
} }
return { return {
multipleSelection: [],
selectedCount: 0,
enterpriseNameOptions: [],
enterpriseTable: [],
home_pic_kecheng, home_pic_kecheng,
randomFiveDigitNumber: '', // 随机5位数字 randomFiveDigitNumber: '', // 随机5位数字
zipUrl: '', zipUrl: '',
...@@ -542,6 +551,8 @@ export default { ...@@ -542,6 +551,8 @@ export default {
}, },
// 抽屉开关 // 抽屉开关
drawer: false, drawer: false,
// 当前试卷id
currentLessionId: '',
innerDrawer: false, innerDrawer: false,
resForm: { resForm: {
exp: false, exp: false,
...@@ -586,11 +597,9 @@ export default { ...@@ -586,11 +597,9 @@ export default {
dialogProfile: false, dialogProfile: false,
// 新增课程 // 新增课程
form: { form: {
value: '', jobClassify: '',
value2: '', difficultyClassify: '',
value3: '', passingGrade: ''
value4: '',
value5: ''
}, },
// 课程状态list // 课程状态list
courseStatus: [ courseStatus: [
...@@ -643,7 +652,8 @@ export default { ...@@ -643,7 +652,8 @@ export default {
// search area // search area
courseid: '', courseid: '',
coursename: '', coursename: '',
companyForm: {
},
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
...@@ -675,20 +685,14 @@ export default { ...@@ -675,20 +685,14 @@ export default {
bussid: [], bussid: [],
formrule1: { formrule1: {
id: [ jobClassify: [
{ required: true, validator: checkid, trigger: 'blur' } { required: true, message: '请选择岗位分类', trigger: 'change' }
], ],
name: [ difficultyClassify: [
{ required: true, validator: validateName, trigger: 'blur' } { required: true, message: '请选择题库难度', trigger: 'change' }
],
couDire: [
{ required: true, message: '请选择课程方向', trigger: 'blur' }
],
credit: [
{ required: true, validator: checkNum, trigger: 'blur' }
], ],
totalStuHours: [ passingGrade: [
{ required: true, validator: checkTime, trigger: 'blur' } { required: true, message: '请输入题库分数', trigger: 'blur' }
] ]
}, },
formrule2: { formrule2: {
...@@ -732,6 +736,33 @@ export default { ...@@ -732,6 +736,33 @@ export default {
this.loadData() this.loadData()
}, },
methods: { methods: {
/** 提交按钮 */
submitForm: function() {
if (this.multipleSelection.length === 0) {
return this.$message.error('请选择企业')
}
const temp = this.multipleSelection.map(item => {
return item.businessId
})
const data = {
lessonId: this.currentLessionId,
integerList: temp
}
console.log('data', data)
addEnterprise(data).then(res => {
console.log('addEnterprise', res)
if (res.data) {
this.getEnterpriseList(this.currentLessionId)
this.$message.success('添加成功')
this.innerDrawer = false
}
})
},
handleSelectionChange(val) {
this.multipleSelection = val
this.selectedCount = this.multipleSelection.length
console.log(this.multipleSelection)
},
/** 生成随机数*/ /** 生成随机数*/
generateRandomNumber() { generateRandomNumber() {
this.randomFiveDigitNumber = Math.floor(10000 + Math.random() * 90000) this.randomFiveDigitNumber = Math.floor(10000 + Math.random() * 90000)
...@@ -739,10 +770,24 @@ export default { ...@@ -739,10 +770,24 @@ export default {
/** /**
* 点击开放企业 * 点击开放企业
***/ ***/
handleCheckCompany(id, scoreAvg) { handleCheckCompany(item) {
this.drawer = true this.drawer = true
this.scoreAvg = scoreAvg this.currentLessionId = item.businessId
this.getScoreList(id) this.getEnterpriseNameOptions()
this.getEnterpriseList(item.businessId)
},
// 查询岗位题库下面的公司集合
getEnterpriseList(id) {
getEnterpriseListById(id).then(res => {
this.enterpriseTable = res.data
})
},
// 查询企业信息
getEnterpriseNameOptions() {
findAllUnitInfo().then(res => {
console.log('getEnterpriseNameOptions', res)
this.enterpriseNameOptions = res.data
})
}, },
/** /**
* 分页查询课程评分 * 分页查询课程评分
...@@ -780,6 +825,12 @@ export default { ...@@ -780,6 +825,12 @@ export default {
businessId: row.businessId businessId: row.businessId
} }
})*/ })*/
this.form = {
jobClassify: row.jobClassify,
difficultyClassify: row.difficultyClassify,
passingGrade: row.passScore,
businessId: row.businessId
}
this.dialogFormVisible = true this.dialogFormVisible = true
this.title = '编辑题库' this.title = '编辑题库'
}, },
...@@ -925,7 +976,6 @@ export default { ...@@ -925,7 +976,6 @@ export default {
loadData() { loadData() {
// 列表渲染数据 // 列表渲染数据
var data = [] var data = []
const url = 'BLesson/queryBLessonsByPagination'
const _this = this const _this = this
this.tableData = [] this.tableData = []
_this.fullscreenLoading = true _this.fullscreenLoading = true
...@@ -984,6 +1034,7 @@ export default { ...@@ -984,6 +1034,7 @@ export default {
data[i] = obj data[i] = obj
} }
_this.tableData = pages _this.tableData = pages
console.log('_this.tableData ', _this.tableData)
_this.fullscreenLoading = false _this.fullscreenLoading = false
if (res.rows.length === 0) { if (res.rows.length === 0) {
_this.tableDataTips = '暂无数据' _this.tableDataTips = '暂无数据'
...@@ -1126,30 +1177,43 @@ export default { ...@@ -1126,30 +1177,43 @@ export default {
if (valid) { if (valid) {
that.fullscreenLoading = true that.fullscreenLoading = true
that.dialogFormVisible = false that.dialogFormVisible = false
const params = { if (this.title === '编辑题库') {
code: that.form.id, blessonUpdate(that.form).then(res => {
lessonName: that.form.name, let type = res.code
classHour: that.form.totalStuHours, const message = res.message
directionId: that.form.couDire, type = (type === 200) ? 'success' : 'warning'
credits: that.form.credit that.$notify({
} title: type === 'success' ? '成功' : '提示',
blessonAdd(params).then(res => { message: message,
let type = res.code type: type
const message = res.message })
type = (type === 200) ? 'success' : 'warning' that.fullscreenLoading = false
that.$notify({ if (type === 'success') {
title: type === 'success' ? '成功' : '提示', that.loadData()
message: message, }
type: type }).catch((err) => {
that.fullscreenLoading = false
console.log(err)
}) })
that.fullscreenLoading = false }else{
if (type === 'success') { blessonAdd(that.form).then(res => {
that.loadData() let type = res.code
} const message = res.message
}).catch((err) => { type = (type === 200) ? 'success' : 'warning'
that.fullscreenLoading = false that.$notify({
console.log(err) title: type === 'success' ? '成功' : '提示',
}) message: message,
type: type
})
that.fullscreenLoading = false
if (type === 'success') {
that.loadData()
}
}).catch((err) => {
that.fullscreenLoading = false
console.log(err)
})
}
} else { } else {
that.fullscreenLoading = false that.fullscreenLoading = false
console.log('error submit!!') console.log('error submit!!')
...@@ -1236,7 +1300,9 @@ export default { ...@@ -1236,7 +1300,9 @@ export default {
bussinessId: data.bussinessId, bussinessId: data.bussinessId,
courseId: data.businessId, courseId: data.businessId,
name: data.lessonName, name: data.lessonName,
passingGrade: data.passingGrade passingGrade: data.passingGrade,
jobClassify: data.jobClassify,
difficultyClassify: data.difficultyClassify,
} }
}) })
}, },
...@@ -1433,10 +1499,7 @@ export default { ...@@ -1433,10 +1499,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
that.fullscreenLoading = true that.fullscreenLoading = true
const params = { blessonRemove(row.businessId).then(response => {
id: row.businessId
}
blessonRemove(params).then(response => {
that.fullscreenLoading = false that.fullscreenLoading = false
// alert(JSON.stringify(response)); // alert(JSON.stringify(response));
var type = response.code var type = response.code
...@@ -1758,5 +1821,16 @@ input::-webkit-inner-spin-button { ...@@ -1758,5 +1821,16 @@ input::-webkit-inner-spin-button {
margin-bottom: 50px; margin-bottom: 50px;
} }
.drawerfooterCompany {
position: relative;
top: 2%;
height: 400px;
.drawer-area {
margin-left: 7%;
display: flex;
width: 90%;
justify-content: space-between;
}
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment