Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tea-resources-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张伯涛
tea-resources-web
Commits
e360ca85
Commit
e360ca85
authored
May 15, 2024
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
题库管理暂存
parent
66577a3f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
538 additions
and
111 deletions
+538
-111
index.js
src/api/jobQuestionBank/index.js
+304
-0
index.vue
src/views/courseInformation/examinationCompany/index.vue
+52
-3
index.vue
src/views/courseInformation/jobQuestionBank/index.vue
+182
-108
No files found.
src/api/jobQuestionBank/index.js
0 → 100644
View file @
e360ca85
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
})
}
src/views/courseInformation/examinationCompany/index.vue
View file @
e360ca85
...
...
@@ -3,8 +3,8 @@
<div
class=
"app-container"
>
<!-- 标题-->
<div
class=
"examinationTitle"
>
<span>
岗位分类:
{{
n
ame
}}
</span>
<span
class=
"title-right"
>
题库难度:
{{
name
}}
</span>
<span>
岗位分类:
{{
getJobClassificationN
ame
}}
</span>
<span
class=
"title-right"
>
题库难度:
{{
getDifficultyLevelName
(
difficultyClassify
)
}}
</span>
</div>
<examination-paper
:bussiness-id=
"courseId"
/>
</div>
...
...
@@ -13,6 +13,7 @@
import
ExaminationPaper
from
'@/views/courseInformation/examinationCompany/examinationPaper.vue'
import
{
updateBLesson
}
from
'@/api/courseManagement/indexApi'
import
{
getDict
}
from
"@/api/system/dict/data"
;
export
default
{
name
:
'ExaminationManagement'
,
...
...
@@ -26,8 +27,14 @@ export default {
courseId
:
null
,
bussinessId
:
''
,
// 业务id
name
:
''
,
// 课程名称
jobClassify
:
''
,
// 岗位分类
passingGrade
:
''
,
// 及格分数
id
:
null
difficultyClassify
:
''
,
// 及格分数
id
:
null
,
valueOptions
:
[
],
difficultyOptions
:
[
]
}
},
// mounted() {
...
...
@@ -36,6 +43,8 @@ export default {
// this.name = this.$route.query.name
// },
created
()
{
this
.
getJobClassification
()
this
.
getDifficultyLevel
()
// 接受路由传递的参数
// this.courseId = this.$route.query.businessId
this
.
courseId
=
this
.
$route
.
query
.
courseId
...
...
@@ -43,9 +52,49 @@ export default {
this
.
id
=
this
.
$route
.
query
.
courseId
this
.
name
=
this
.
$route
.
query
.
name
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
)
},
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
:
{
// 获取难度等级
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
()
{
// 在tab切换时更新bussinessId
console
.
log
(
'name'
,
this
.
name
)
...
...
src/views/courseInformation/jobQuestionBank/index.vue
View file @
e360ca85
...
...
@@ -70,33 +70,33 @@
</div>
<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-item
label=
"岗位分类"
prop=
"
value
"
>
<el-select
v-model=
"form.
value"
placeholder=
"适用岗位
"
clearable
>
<el-form-item
label=
"岗位分类"
prop=
"
jobClassify
"
>
<el-select
v-model=
"form.
jobClassify"
placeholder=
"岗位分类
"
clearable
>
<el-option
v-for=
"item in valueOptions"
:key=
"item.
v
alue"
:label=
"item.
l
abel"
:value=
"item.
v
alue"
:key=
"item.
dictV
alue"
:label=
"item.
dictL
abel"
:value=
"item.
dictV
alue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"题库难度"
prop=
"
value2
"
>
<el-select
v-model=
"form.
value2
"
placeholder=
"难度等级"
clearable
>
<el-form-item
label=
"题库难度"
prop=
"
difficultyClassify
"
>
<el-select
v-model=
"form.
difficultyClassify
"
placeholder=
"难度等级"
clearable
>
<el-option
v-for=
"item in
value
Options"
:key=
"item.
v
alue"
:label=
"item.
l
abel"
:value=
"item.
v
alue"
v-for=
"item in
difficulty
Options"
:key=
"item.
dictV
alue"
:label=
"item.
dictL
abel"
:value=
"item.
dictV
alue"
/>
</el-select>
</el-form-item>
<el-form-item
label=
"及格分数"
prop=
"
totalStuHours
"
>
<el-input-number
v-model
.
trim=
"form.
totalStuHours
"
/>
<el-form-item
label=
"及格分数"
prop=
"
passingGrade
"
>
<el-input-number
v-model
.
trim=
"form.
passingGrade
"
/>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<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>
</el-dialog>
<!--------------------------------------------------------课程功能块---------------------------------------------------->
...
...
@@ -114,37 +114,37 @@
<span>
{{
scope
.
$index
+
1
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"岗位分类"
prop=
"jobClassify"
min-width=
"
20
0px"
:show-overflow-tooltip=
"true"
>
<el-table-column
align=
"center"
label=
"岗位分类"
prop=
"jobClassify"
min-width=
"
18
0px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getJobClassificationName
(
scope
.
row
.
jobClassify
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"题库难度"
prop=
"difficultyClassify"
min-width=
"
12
0px"
:show-overflow-tooltip=
"true"
>
<el-table-column
align=
"center"
label=
"题库难度"
prop=
"difficultyClassify"
min-width=
"
9
0px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
getDifficultyLevelName
(
scope
.
row
.
difficultyClassify
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"试题数量"
prop=
"
lessonBrief"
min-width=
"2
00px"
:show-overflow-tooltip=
"true"
>
<el-table-column
align=
"center"
label=
"试题数量"
prop=
"
questionsDTO"
min-width=
"3
00px"
:show-overflow-tooltip=
"true"
>
<
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
>
</el-table-column>
<!-- 满分-->
<el-table-column
align=
"center"
label=
"满分"
prop=
"lessonPrice"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
lessonPric
e
}}
</span>
<span>
{{
scope
.
row
.
fullScor
e
}}
</span>
</
template
>
</el-table-column>
<!-- 及格分-->
<el-table-column
align=
"center"
label=
"及格分"
prop=
"lessonPrice"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
lessonPrice
}}
</span>
<span>
{{
scope
.
row
.
passScore
?
scope
.
row
.
passScore
:
'--'
}}
</span>
</
template
>
</el-table-column>
<!-- 开放企业-->
<el-table-column
align=
"center"
label=
"开放企业"
prop=
"lessonPrice"
:show-overflow-tooltip=
"true"
>
<
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
>
</el-table-column>
<el-table-column
align=
"center"
label=
"题库状态"
prop=
"flag"
:show-overflow-tooltip=
"true"
>
...
...
@@ -159,12 +159,12 @@
</el-table-column>
<el-table-column
align=
"left"
label=
"修改人"
prop=
"lessonDescription"
min-width=
"150px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
lessonDescription
}}
</span>
<span>
{{
scope
.
row
.
updateUser
?
scope
.
row
.
updateUser
:
'--'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"left"
label=
"修改时间"
prop=
"lessonDescription"
min-width=
"150px"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
lessonDescription
}}
</span>
<span>
{{
scope
.
row
.
updateDate
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
fixed=
"right"
width=
"200"
>
...
...
@@ -327,10 +327,17 @@
>
<div
style=
"padding: 50px"
>
<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>
<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>
<!-- //查询按钮-->
...
...
@@ -364,20 +371,14 @@
:cell-style=
"{ textAlign: 'center' }"
:header-cell-style=
"{ textAlign: 'center' }"
border
:data=
"
scor
eTable"
:data=
"
enterpris
eTable"
>
<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"
>
<div
v-if=
"scope.row.anonymousFlag=='1'"
>
匿名用户
</div>
<div
v-else-if=
"scope.row.unitName===''"
>
{{
scope
.
row
.
userName
}}
</div>
<div
v-else
>
{{
scope
.
row
.
userName
+
'-'
+
scope
.
row
.
unitName
}}
<div>
{{
scope
.
row
.
enterpriseName
}}
</div>
</
template
>
...
...
@@ -389,7 +390,7 @@
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"removeFile(scope.row)"
>
删
除
</el-button>
>
移
除
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -405,35 +406,36 @@
:cell-style=
"{ textAlign: 'center' }"
:header-cell-style=
"{ textAlign: 'center' }"
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=
"企业名称"
prop=
"
userId
"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"企业名称"
prop=
"
enterpriseName
"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.anonymousFlag=='1'"
>
匿名用户
</div>
<div
v-else-if=
"scope.row.unitName===''"
>
{{
scope
.
row
.
userName
}}
</div>
<div
v-else
>
{{
scope
.
row
.
userName
+
'-'
+
scope
.
row
.
unitName
}}
<div>
{{
scope
.
row
.
unitName
}}
</div>
</
template
>
</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>
<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>
</div>
<pagination
...
...
@@ -462,13 +464,16 @@ import {
findZIpInfo
,
delZip
,
downloadZip
,
queryPcLessonEvaluationByPagination
}
from
'@/api/courseManagement/indexApi'
queryPcLessonEvaluationByPagination
,
findAllUnitInfo
,
getEnterpriseListById
,
addEnterprise
,
blessonUpdate
}
from
'@/api/jobQuestionBank/index'
import
commonField
from
'@/utils/commonField'
import
{
getDict
}
from
'@/api/system/dict/data'
import
{
listAllCmsLecturer
}
from
'@/api/courseManagement/cmsLecturer'
import
{
urlDecrypt
,
urlEncrypt
}
from
'@/utils/jsencrypt'
import
home_pic_kecheng
from
'@/assets/image/home_pic_kecheng.png'
import
{
batchAddTeaTrialCourse
}
from
'@/api/try/teaTrialCourse'
export
default
{
name
:
'Index'
,
components
:
{
...
...
@@ -524,6 +529,10 @@ export default {
}
}
return
{
multipleSelection
:
[],
selectedCount
:
0
,
enterpriseNameOptions
:
[],
enterpriseTable
:
[],
home_pic_kecheng
,
randomFiveDigitNumber
:
''
,
// 随机5位数字
zipUrl
:
''
,
...
...
@@ -542,6 +551,8 @@ export default {
},
// 抽屉开关
drawer
:
false
,
// 当前试卷id
currentLessionId
:
''
,
innerDrawer
:
false
,
resForm
:
{
exp
:
false
,
...
...
@@ -586,11 +597,9 @@ export default {
dialogProfile
:
false
,
// 新增课程
form
:
{
value
:
''
,
value2
:
''
,
value3
:
''
,
value4
:
''
,
value5
:
''
jobClassify
:
''
,
difficultyClassify
:
''
,
passingGrade
:
''
},
// 课程状态list
courseStatus
:
[
...
...
@@ -643,7 +652,8 @@ export default {
// search area
courseid
:
''
,
coursename
:
''
,
companyForm
:
{
},
queryParams
:
{
page
:
1
,
rows
:
10
,
...
...
@@ -675,20 +685,14 @@ export default {
bussid
:
[],
formrule1
:
{
id
:
[
{
required
:
true
,
validator
:
checkid
,
trigger
:
'blur
'
}
jobClassify
:
[
{
required
:
true
,
message
:
'请选择岗位分类'
,
trigger
:
'change
'
}
],
name
:
[
{
required
:
true
,
validator
:
validateName
,
trigger
:
'blur'
}
],
couDire
:
[
{
required
:
true
,
message
:
'请选择课程方向'
,
trigger
:
'blur'
}
],
credit
:
[
{
required
:
true
,
validator
:
checkNum
,
trigger
:
'blur'
}
difficultyClassify
:
[
{
required
:
true
,
message
:
'请选择题库难度'
,
trigger
:
'change'
}
],
totalStuHours
:
[
{
required
:
true
,
validator
:
checkTime
,
trigger
:
'blur'
}
passingGrade
:
[
{
required
:
true
,
message
:
'请输入题库分数'
,
trigger
:
'blur'
}
]
},
formrule2
:
{
...
...
@@ -732,6 +736,33 @@ export default {
this
.
loadData
()
},
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
()
{
this
.
randomFiveDigitNumber
=
Math
.
floor
(
10000
+
Math
.
random
()
*
90000
)
...
...
@@ -739,10 +770,24 @@ export default {
/**
* 点击开放企业
***/
handleCheckCompany
(
i
d
,
scoreAvg
)
{
handleCheckCompany
(
i
tem
)
{
this
.
drawer
=
true
this
.
scoreAvg
=
scoreAvg
this
.
getScoreList
(
id
)
this
.
currentLessionId
=
item
.
businessId
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 {
businessId: row.businessId
}
})*/
this
.
form
=
{
jobClassify
:
row
.
jobClassify
,
difficultyClassify
:
row
.
difficultyClassify
,
passingGrade
:
row
.
passScore
,
businessId
:
row
.
businessId
}
this
.
dialogFormVisible
=
true
this
.
title
=
'编辑题库'
},
...
...
@@ -925,7 +976,6 @@ export default {
loadData
()
{
// 列表渲染数据
var
data
=
[]
const
url
=
'BLesson/queryBLessonsByPagination'
const
_this
=
this
this
.
tableData
=
[]
_this
.
fullscreenLoading
=
true
...
...
@@ -984,6 +1034,7 @@ export default {
data
[
i
]
=
obj
}
_this
.
tableData
=
pages
console
.
log
(
'_this.tableData '
,
_this
.
tableData
)
_this
.
fullscreenLoading
=
false
if
(
res
.
rows
.
length
===
0
)
{
_this
.
tableDataTips
=
'暂无数据'
...
...
@@ -1126,14 +1177,26 @@ export default {
if
(
valid
)
{
that
.
fullscreenLoading
=
true
that
.
dialogFormVisible
=
false
const
params
=
{
code
:
that
.
form
.
id
,
lessonName
:
that
.
form
.
name
,
classHour
:
that
.
form
.
totalStuHours
,
directionId
:
that
.
form
.
couDire
,
credits
:
that
.
form
.
credit
if
(
this
.
title
===
'编辑题库'
)
{
blessonUpdate
(
that
.
form
).
then
(
res
=>
{
let
type
=
res
.
code
const
message
=
res
.
message
type
=
(
type
===
200
)
?
'success'
:
'warning'
that
.
$notify
({
title
:
type
===
'success'
?
'成功'
:
'提示'
,
message
:
message
,
type
:
type
})
that
.
fullscreenLoading
=
false
if
(
type
===
'success'
)
{
that
.
loadData
()
}
blessonAdd
(
params
).
then
(
res
=>
{
}).
catch
((
err
)
=>
{
that
.
fullscreenLoading
=
false
console
.
log
(
err
)
})
}
else
{
blessonAdd
(
that
.
form
).
then
(
res
=>
{
let
type
=
res
.
code
const
message
=
res
.
message
type
=
(
type
===
200
)
?
'success'
:
'warning'
...
...
@@ -1150,6 +1213,7 @@ export default {
that
.
fullscreenLoading
=
false
console
.
log
(
err
)
})
}
}
else
{
that
.
fullscreenLoading
=
false
console
.
log
(
'error submit!!'
)
...
...
@@ -1236,7 +1300,9 @@ export default {
bussinessId
:
data
.
bussinessId
,
courseId
:
data
.
businessId
,
name
:
data
.
lessonName
,
passingGrade
:
data
.
passingGrade
passingGrade
:
data
.
passingGrade
,
jobClassify
:
data
.
jobClassify
,
difficultyClassify
:
data
.
difficultyClassify
,
}
})
},
...
...
@@ -1433,10 +1499,7 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
that
.
fullscreenLoading
=
true
const
params
=
{
id
:
row
.
businessId
}
blessonRemove
(
params
).
then
(
response
=>
{
blessonRemove
(
row
.
businessId
).
then
(
response
=>
{
that
.
fullscreenLoading
=
false
// alert(JSON.stringify(response));
var
type
=
response
.
code
...
...
@@ -1758,5 +1821,16 @@ input::-webkit-inner-spin-button {
margin-bottom
:
50px
;
}
.drawerfooterCompany
{
position
:
relative
;
top
:
2%
;
height
:
400px
;
.drawer-area
{
margin-left
:
7%
;
display
:
flex
;
width
:
90%
;
justify-content
:
space-between
;
}
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment