Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zhengyuan-danger-chemistry-manage
Project
Project
Details
Activity
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
耿迪迪
zhengyuan-danger-chemistry-manage
Commits
06059cb8
Commit
06059cb8
authored
2 years ago
by
纪泽龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jzl'
parents
3aeab2fa
524a971b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
802 additions
and
319 deletions
+802
-319
index.vue
danger-manage-web/src/components/FileUpload/index.vue
+191
-188
ChangPapelTable.vue
...anage-web/src/components/PeopleChange/ChangPapelTable.vue
+17
-2
index.vue
danger-manage-web/src/components/PeopleChange/index.vue
+8
-3
AddQuestion.vue
...ucationPlanExam/lessonsProgram/components/AddQuestion.vue
+31
-11
ChangeQuestion.vue
...tionPlanExam/lessonsProgram/components/ChangeQuestion.vue
+7
-4
Dia.vue
...views/educationPlanExam/lessonsProgram/components/Dia.vue
+33
-14
Lesson.vue
...ws/educationPlanExam/lessonsProgram/components/Lesson.vue
+59
-30
QuestionList.vue
...cationPlanExam/lessonsProgram/components/QuestionList.vue
+18
-1
index.vue
...-web/src/views/educationPlanExam/lessonsProgram/index.vue
+153
-15
AddQuestion.vue
...ws/educationPlanExam/textPaper/components/AddQuestion.vue
+26
-8
ChangeQuestion.vue
...educationPlanExam/textPaper/components/ChangeQuestion.vue
+6
-4
Dia.vue
.../src/views/educationPlanExam/textPaper/components/Dia.vue
+54
-6
Lesson.vue
...c/views/educationPlanExam/textPaper/components/Lesson.vue
+17
-4
QuestionList.vue
...s/educationPlanExam/textPaper/components/QuestionList.vue
+24
-5
index.vue
...anage-web/src/views/educationPlanExam/textPaper/index.vue
+158
-24
No files found.
danger-manage-web/src/components/FileUpload/index.vue
View file @
06059cb8
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/PeopleChange/ChangPapelTable.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 15:23:58
* @Date: 2022-12-19 15:23:58
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-21 16:56:26
* @LastEditTime: 202
3-02-01 17:24:30
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/Lesson-table.vue
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/Lesson-table.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -16,7 +16,10 @@
...
@@ -16,7 +16,10 @@
@
select-all=
"all"
@
select-all=
"all"
ref=
"multipleTable"
ref=
"multipleTable"
>
>
<el-table-column
type=
"selection"
></el-table-column>
<el-table-column
v-if=
'!disabled'
type=
"selection"
></el-table-column>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"staffName"
>
<el-table-column
label=
"姓名"
align=
"center"
prop=
"staffName"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -55,10 +58,14 @@ export default {
...
@@ -55,10 +58,14 @@ export default {
selectNameList
:
{
selectNameList
:
{
type
:
Array
,
type
:
Array
,
},
},
disabled
:
{
type
:
Boolean
,
},
},
},
created
()
{
created
()
{
// this.listStaff();
// this.listStaff();
},
},
data
()
{
data
()
{
return
{
return
{
queryParams
:
{
queryParams
:
{
...
@@ -71,6 +78,9 @@ export default {
...
@@ -71,6 +78,9 @@ export default {
nameList
:
[],
nameList
:
[],
loading
:
false
,
loading
:
false
,
};
};
},
mounted
()
{
},
},
methods
:
{
methods
:
{
listStaff
()
{
listStaff
()
{
...
@@ -109,6 +119,11 @@ export default {
...
@@ -109,6 +119,11 @@ export default {
}
}
this
.
$emit
(
"selectAll"
,
this
.
nameList
,
allSelect
);
this
.
$emit
(
"selectAll"
,
this
.
nameList
,
allSelect
);
},
},
selectable
(
row
,
rowIndex
)
{
if
(
!
this
.
disabled
)
{
return
true
;
}
},
// 切换选项
// 切换选项
toggleSelection
(
staffId
,
SeclctFlag
=
false
)
{
toggleSelection
(
staffId
,
SeclctFlag
=
false
)
{
const
item
=
this
.
nameList
.
find
((
item
)
=>
{
const
item
=
this
.
nameList
.
find
((
item
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/components/PeopleChange/index.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-19 17:39:55
* @Date: 2022-12-19 17:39:55
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-13 15:37:54
* @LastEditTime: 2023-0
2-02 10:56:52
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangePapel.vue
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangePapel.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -36,13 +36,14 @@
...
@@ -36,13 +36,14 @@
>
>
</el-input>
</el-input>
<div>
<div>
<el-button
@
click=
"searchTable"
size=
"mini"
>
搜索
</el-button>
<el-button
@
click=
"searchTable"
size=
"mini"
>
搜索
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"left-middle-table"
>
<div
class=
"left-middle-table"
>
<ChangPapelTable
<ChangPapelTable
ref=
"table"
ref=
"table"
:selectNameList
.
sync=
"selectNameList"
:selectNameList
.
sync=
"selectNameList"
:disabled=
"disabled"
@
selectOne=
"selectOne"
@
selectOne=
"selectOne"
@
selectAll=
"selectAll"
@
selectAll=
"selectAll"
/>
/>
...
@@ -60,7 +61,7 @@
...
@@ -60,7 +61,7 @@
:key=
"item.staffId"
:key=
"item.staffId"
>
>
<div>
{{
item
.
staffName
}}
</div>
<div>
{{
item
.
staffName
}}
</div>
<div
class=
"close"
@
click=
"deleteName(item.staffId)"
>
x
</div>
<div
class=
"close"
@
click=
"deleteName(item.staffId)"
>
x
</div>
</div>
</div>
</div>
</div>
<div
class=
"bottom-text"
>
已选择
{{
selectNameList
.
length
}}
人
</div>
<div
class=
"bottom-text"
>
已选择
{{
selectNameList
.
length
}}
人
</div>
...
@@ -83,6 +84,9 @@ export default {
...
@@ -83,6 +84,9 @@ export default {
type
:
String
,
type
:
String
,
default
:
null
,
default
:
null
,
},
},
disabled
:{
type
:
Boolean
,
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -143,6 +147,7 @@ export default {
...
@@ -143,6 +147,7 @@ export default {
this
.
$refs
.
table
.
listStaff
();
this
.
$refs
.
table
.
listStaff
();
},
},
deleteName
(
staffId
)
{
deleteName
(
staffId
)
{
if
(
this
.
disabled
)
return
;
const
index
=
this
.
selectNameList
.
findIndex
((
item
)
=>
{
const
index
=
this
.
selectNameList
.
findIndex
((
item
)
=>
{
return
item
.
staffId
==
staffId
;
return
item
.
staffId
==
staffId
;
});
});
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/AddQuestion.vue
View file @
06059cb8
...
@@ -11,9 +11,15 @@
...
@@ -11,9 +11,15 @@
size=
"mini"
size=
"mini"
@
input=
"topicTypeChange"
@
input=
"topicTypeChange"
>
>
<el-radio-button
:label=
"1"
>
单选
</el-radio-button>
<el-radio-button
:disabled=
"checkLock"
:label=
"1"
<el-radio-button
:label=
"2"
>
多选
</el-radio-button>
>
单选
</el-radio-button
<el-radio-button
:label=
"3"
>
判断
</el-radio-button>
>
<el-radio-button
:disabled=
"checkLock"
:label=
"2"
>
多选
</el-radio-button
>
<el-radio-button
:disabled=
"checkLock"
:label=
"3"
>
判断
</el-radio-button
>
</el-radio-group>
</el-radio-group>
</div>
</div>
...
@@ -29,7 +35,7 @@
...
@@ -29,7 +35,7 @@
:rules=
"
{
:rules=
"
{
required: true,
required: true,
message: '必须输入题目内容',
message: '必须输入题目内容',
trigger:
'blur'
,
trigger:
['blur', 'change']
,
}"
}"
>
>
<el-input
<el-input
...
@@ -38,6 +44,7 @@
...
@@ -38,6 +44,7 @@
resize=
"none"
resize=
"none"
rows=
"4"
rows=
"4"
v-model=
"form.topicTitle"
v-model=
"form.topicTitle"
:disabled=
"checkLock"
>
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
...
@@ -55,7 +62,7 @@
...
@@ -55,7 +62,7 @@
:rules=
"
{
:rules=
"
{
required: true,
required: true,
message: '选项内容不能为空不能为空',
message: '选项内容不能为空不能为空',
trigger:
'change'
,
trigger:
['blur', 'change']
,
}"
}"
>
>
<div
class=
"add-select flex"
>
<div
class=
"add-select flex"
>
...
@@ -65,6 +72,7 @@
...
@@ -65,6 +72,7 @@
style=
"flex: 1; margin-right: 10px"
style=
"flex: 1; margin-right: 10px"
rows=
"2"
rows=
"2"
v-model=
"question.value"
v-model=
"question.value"
:disabled=
"checkLock"
></el-input>
></el-input>
<div
class=
"flex algin-items"
>
<div
class=
"flex algin-items"
>
<div
<div
...
@@ -81,6 +89,7 @@
...
@@ -81,6 +89,7 @@
type=
"danger"
type=
"danger"
v-if=
"index > 0"
v-if=
"index > 0"
@
click
.
prevent=
"removeDomain(question)"
@
click
.
prevent=
"removeDomain(question)"
:disabled=
"checkLock"
>
删除
</el-button
>
删除
</el-button
>
>
</div>
</div>
...
@@ -111,7 +120,11 @@
...
@@ -111,7 +120,11 @@
设为正确答案
设为正确答案
</div>
-->
</div>
-->
<div
style=
"padding-left: 30px"
v-if=
"form.topicType != 3"
>
<div
style=
"padding-left: 30px"
v-if=
"form.topicType != 3"
>
<el-button
size=
"mini"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
<el-button
size=
"mini"
:disabled=
"checkLock"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
>
新增选项
</el-button
>
新增选项
</el-button
>
>
</div>
</div>
...
@@ -146,6 +159,10 @@ export default {
...
@@ -146,6 +159,10 @@ export default {
topicId
:
{
topicId
:
{
type
:
Number
,
type
:
Number
,
},
},
// 如果是查看,就禁止修改
checkLock
:
{
type
:
Boolean
,
},
},
},
components
:
{},
components
:
{},
data
()
{
data
()
{
...
@@ -171,7 +188,7 @@ export default {
...
@@ -171,7 +188,7 @@ export default {
console
.
log
(
res
.
data
);
console
.
log
(
res
.
data
);
const
data
=
res
.
data
;
const
data
=
res
.
data
;
this
.
form
=
{
this
.
form
=
{
topicType
:
data
.
topicType
,
topicType
:
data
.
topicType
,
topicTitle
:
data
.
topicTitle
,
topicTitle
:
data
.
topicTitle
,
questions
:
JSON
.
parse
(
data
.
topicOption
),
questions
:
JSON
.
parse
(
data
.
topicOption
),
};
};
...
@@ -232,6 +249,7 @@ export default {
...
@@ -232,6 +249,7 @@ export default {
}
}
},
},
rightAnswerClick
(
index
)
{
rightAnswerClick
(
index
)
{
if
(
this
.
checkLock
)
return
;
if
(
this
.
form
.
topicType
===
2
)
{
if
(
this
.
form
.
topicType
===
2
)
{
const
ind
=
this
.
answerNum
.
indexOf
(
index
);
const
ind
=
this
.
answerNum
.
indexOf
(
index
);
if
(
ind
<
0
)
{
if
(
ind
<
0
)
{
...
@@ -250,6 +268,8 @@ export default {
...
@@ -250,6 +268,8 @@ export default {
},
},
// 删除选项
// 删除选项
removeDomain
(
question
)
{
removeDomain
(
question
)
{
if
(
this
.
checkLock
)
return
;
const
index
=
this
.
form
.
questions
.
indexOf
(
question
);
const
index
=
this
.
form
.
questions
.
indexOf
(
question
);
console
.
log
(
index
);
console
.
log
(
index
);
// 如果是正确答案,就让正确答案清空
// 如果是正确答案,就让正确答案清空
...
@@ -279,7 +299,7 @@ export default {
...
@@ -279,7 +299,7 @@ export default {
},
},
save
(
num
=
2
)
{
save
(
num
=
2
)
{
return
new
Promise
((
resove
)
=>
{
return
new
Promise
((
resove
)
=>
{
if
(
this
.
answerNum
.
length
<=
0
)
{
if
(
this
.
answerNum
.
length
<=
0
)
{
this
.
$message
({
this
.
$message
({
message
:
"警告,请设置一个正确答案"
,
message
:
"警告,请设置一个正确答案"
,
type
:
"warning"
,
type
:
"warning"
,
...
@@ -292,8 +312,8 @@ export default {
...
@@ -292,8 +312,8 @@ export default {
data
.
topicTitle
=
this
.
form
.
topicTitle
;
data
.
topicTitle
=
this
.
form
.
topicTitle
;
data
.
topicOption
=
JSON
.
stringify
(
this
.
form
.
questions
);
data
.
topicOption
=
JSON
.
stringify
(
this
.
form
.
questions
);
data
.
answer
=
JSON
.
stringify
(
this
.
answerNum
);
data
.
answer
=
JSON
.
stringify
(
this
.
answerNum
);
data
.
topicType
=
this
.
form
.
topicType
;
data
.
topicType
=
this
.
form
.
topicType
;
console
.
log
(
data
)
console
.
log
(
data
)
;
this
.
addQuestion
(
data
).
then
((
res
)
=>
{
this
.
addQuestion
(
data
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
// 把修改的这个归位,变成正常添加
// 把修改的这个归位,变成正常添加
...
@@ -323,7 +343,7 @@ export default {
...
@@ -323,7 +343,7 @@ export default {
});
});
},
},
reset
()
{
reset
()
{
const
topicType
=
this
.
form
.
topicType
const
topicType
=
this
.
form
.
topicType
;
this
.
form
=
{
this
.
form
=
{
topicType
,
topicType
,
topicTitle
:
""
,
topicTitle
:
""
,
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/ChangeQuestion.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 09:30:19
* @Date: 2022-12-27 09:30:19
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-28 10:29:18
* @LastEditTime: 202
3-02-01 16:15:10
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -193,7 +193,8 @@ export default {
...
@@ -193,7 +193,8 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
saveAndNext
()
{
save
(
num
=
2
)
{
const
topicInfos
=
this
.
list
const
topicInfos
=
this
.
list
.
filter
((
item
)
=>
item
.
checked
)
.
filter
((
item
)
=>
item
.
checked
)
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
...
@@ -202,18 +203,20 @@ export default {
...
@@ -202,18 +203,20 @@ export default {
quan
:
item
.
changeNum
,
quan
:
item
.
changeNum
,
};
};
});
});
console
.
log
(
this
.
courseId
,
topicInfos
);
console
.
log
(
this
.
courseId
,
topicInfos
);
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
};
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
};
console
.
log
(
data
);
console
.
log
(
data
);
bachAddTopic
(
data
).
then
((
res
)
=>
{
bachAddTopic
(
data
).
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$parent
.
$parent
.
componentsNumChange
(
2
);
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
$parent
.
getList
();
this
.
$parent
.
$parent
.
$parent
.
getList
();
}
}
});
});
},
},
saveAndNext
(){
this
.
save
(
3
)
},
resetClick
()
{},
resetClick
()
{},
search
()
{
search
()
{
this
.
getList
();
this
.
getList
();
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/Dia.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-13 15:59:47
* @LastEditTime: 2023-0
2-01 16:16:44
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
:is=
"currentComponent"
:is=
"currentComponent"
:courseId
.
sync=
"courseId"
:courseId
.
sync=
"courseId"
:topicId
.
sync=
"topicId"
:topicId
.
sync=
"topicId"
:checkLock=
"checkLock"
ref=
"current"
ref=
"current"
></component>
></component>
</transition>
</transition>
...
@@ -32,27 +33,31 @@
...
@@ -32,27 +33,31 @@
<QuestionList/>
-->
<QuestionList/>
-->
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"!checkLock"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
v-if=
"this.componentsNum == 2"
v-if=
"this.componentsNum == 2
&& !checkLock
"
@
click=
"componentsNumChange(4)"
@
click=
"componentsNumChange(4)"
>
从题库选择
</el-button
>
从题库选择
</el-button
>
>
<el-button
<el-button
type=
"primary"
type=
"primary"
v-if=
"this.componentsNum ==
1 || this.componentsNum ==
3"
v-if=
"this.componentsNum ==
4 ||this.componentsNum==
3"
@
click=
"
save
"
@
click=
"
componentsNumChange(2)
"
>
保存
</el-button
>
返回题目列表
</el-button
>
>
<el-button
<el-button
type=
"primary"
type=
"primary"
v-if=
"this.componentsNum == 4"
v-if=
"
@
click=
"componentsNumChange(2)"
this.componentsNum == 1 ||
>
返回题目列表
</el-button
this.componentsNum == 3 ||
this.componentsNum == 4
"
@
click=
"save"
>
保存
</el-button
>
>
<el-button
type=
"primary"
@
click=
"saveAndNext"
>
{{
<el-button
type=
"primary"
@
click=
"saveAndNext"
v-if=
"!checkLock"
>
{{
saveNextText
saveNextText
}}
</el-button>
}}
</el-button>
<el-button
<el-button
...
@@ -63,6 +68,16 @@
...
@@ -63,6 +68,16 @@
>
>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
v-else
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 3 && checkLock"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
@
click=
"dialogCancel"
>
{{
"确认"
}}
</el-button>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
@@ -72,7 +87,6 @@ import AddQuestion from "./AddQuestion";
...
@@ -72,7 +87,6 @@ import AddQuestion from "./AddQuestion";
import
QuestionList
from
"./QuestionList"
;
import
QuestionList
from
"./QuestionList"
;
import
ChangeQuestion
from
"./ChangeQuestion"
;
import
ChangeQuestion
from
"./ChangeQuestion"
;
export
default
{
export
default
{
name
:
"AnswerLesson"
,
name
:
"AnswerLesson"
,
props
:
{
props
:
{
...
@@ -87,6 +101,9 @@ export default {
...
@@ -87,6 +101,9 @@ export default {
courseId
:
{
courseId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:
{
type
:
Boolean
,
},
},
},
// components: {
// components: {
// Lesson,
// Lesson,
...
@@ -116,14 +133,14 @@ export default {
...
@@ -116,14 +133,14 @@ export default {
this
.
currentComponent
=
QuestionList
;
this
.
currentComponent
=
QuestionList
;
this
.
title
=
"题目列表"
;
this
.
title
=
"题目列表"
;
}
else
if
(
num
===
3
)
{
}
else
if
(
num
===
3
)
{
this
.
currentComponent
=
AddQuestion
;
this
.
currentComponent
=
AddQuestion
;
if
(
this
.
topicId
)
{
if
(
this
.
topicId
)
{
this
.
title
=
"修改题目"
;
this
.
title
=
"修改题目"
;
}
else
{
}
else
{
this
.
title
=
"新增题目"
;
this
.
title
=
"新增题目"
;
}
}
}
else
if
(
num
==
4
)
{
}
else
if
(
num
==
4
)
{
this
.
currentComponent
=
ChangeQuestion
;
this
.
currentComponent
=
ChangeQuestion
;
this
.
title
=
"从题库选题"
;
this
.
title
=
"从题库选题"
;
}
}
...
@@ -167,6 +184,8 @@ export default {
...
@@ -167,6 +184,8 @@ export default {
this
.
topicId
=
null
;
this
.
topicId
=
null
;
}
}
this
.
$emit
(
"update:visible"
,
false
);
this
.
$emit
(
"update:visible"
,
false
);
// 关闭的时候归位
this
.
$emit
(
"update:checkLock"
,
false
);
},
},
// 把ID改变了
// 把ID改变了
changeCourseId
(
courseId
)
{
changeCourseId
(
courseId
)
{
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/Lesson.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:59:44
* @Date: 2022-09-22 10:59:44
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-04 17:47:53
* @LastEditTime: 2023-0
2-01 15:21:15
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -17,34 +17,33 @@
...
@@ -17,34 +17,33 @@
>
>
<div
class=
"top flex"
>
<div
class=
"top flex"
>
<el-form-item
label=
"课程标题"
prop=
"courseName"
>
<el-form-item
label=
"课程标题"
prop=
"courseName"
>
<el-input
style=
"width: 400px"
v-model=
"form.courseName"
></el-input>
<el-input
style=
"width: 400px"
v-model=
"form.courseName"
:disabled=
"checkLock"
></el-input>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"培训计划"
prop=
"courseType"
>
-->
<!--
<el-form-item
label=
"培训计划"
prop=
"courseType"
>
-->
<!--
<el-select-->
<!--
<el-select-->
<!--v-model="form.courseType"-->
<!--v-model="form.courseType"-->
<!--placeholder="请选择培训计划"-->
<!--placeholder="请选择培训计划"-->
<!--clearable-->
<!--clearable-->
<!--size="small"-->
<!--size="small"-->
<!-->-->
<!-->-->
<!--
<el-option-->
<!--
<el-option-->
<!--v-for="course in courseOptions"-->
<!--v-for="course in courseOptions"-->
<!--:key="course.planId"-->
<!--:key="course.planId"-->
<!--:label="course.planName"-->
<!--:label="course.planName"-->
<!--:value="course.planId"-->
<!--:value="course.planId"-->
<!--/>-->
<!--/>-->
<!--
</el-select>
-->
<!--
</el-select>
-->
<!--
</el-form-item>
-->
<!--
</el-form-item>
-->
</div>
</div>
<div
class=
"flex"
>
<div
class=
"flex"
>
<el-form-item
label=
"培训计划"
prop=
"courseType"
>
<el-form-item
label=
"培训计划"
prop=
"courseType"
>
<el-select
<el-select
v-model=
"form.courseType"
v-model=
"form.courseType"
placeholder=
"请选择培训计划"
placeholder=
"请选择培训计划"
clearable
clearable
size=
"small"
size=
"small"
:disabled=
"checkLock"
>
>
<el-option
<el-option
v-for=
"course in courseOptions"
v-for=
"course in courseOptions"
...
@@ -54,8 +53,18 @@
...
@@ -54,8 +53,18 @@
/>
/>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"培训时长"
prop=
"duration"
style=
"margin-left: 55px"
>
<el-form-item
<el-input
style=
"width: 220px"
placeholder=
"分钟"
type=
"number"
v-model=
"form.duration"
></el-input>
label=
"培训时长"
prop=
"duration"
style=
"margin-left: 55px"
>
<el-input
style=
"width: 220px"
placeholder=
"分钟"
type=
"number"
v-model=
"form.duration"
:disabled=
"checkLock"
></el-input>
</el-form-item>
</el-form-item>
</div>
</div>
<div
class=
"flex"
>
<div
class=
"flex"
>
...
@@ -67,6 +76,7 @@
...
@@ -67,6 +76,7 @@
type=
"datetime"
type=
"datetime"
placeholder=
"选择日期时间"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"testEndTime"
>
<el-form-item
label=
"结束时间"
prop=
"testEndTime"
>
...
@@ -76,12 +86,13 @@
...
@@ -76,12 +86,13 @@
type=
"datetime"
type=
"datetime"
placeholder=
"选择日期时间"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
/>
</el-form-item>
</el-form-item>
</div>
</div>
<!--
</div>
-->
<!--
</div>
-->
<el-form-item
label=
"课程内容"
prop=
"courseConent"
>
<el-form-item
label=
"课程内容"
prop=
"courseConent"
>
<Editor
v-model=
"form.courseConent"
:min-height=
"192"
/>
<Editor
v-model=
"form.courseConent"
:min-height=
"192"
:readOnly=
"checkLock"
/>
<el-input
<el-input
v-show=
"false"
v-show=
"false"
disabled
disabled
...
@@ -90,7 +101,7 @@
...
@@ -90,7 +101,7 @@
</el-form-item>
</el-form-item>
<div
class=
"flex"
>
<div
class=
"flex"
>
<el-form-item
label=
"视频上传"
v-if=
"!readOnly"
prop=
"video"
>
<el-form-item
label=
"视频上传"
v-if=
"!readOnly"
prop=
"video"
>
<FileUpload
<FileUpload
listType=
"picture"
listType=
"picture"
@
resFun=
"getFileInfoVideo"
@
resFun=
"getFileInfoVideo"
...
@@ -98,6 +109,7 @@
...
@@ -98,6 +109,7 @@
:fileArr=
"fileListVideo"
:fileArr=
"fileListVideo"
:fileSize=
"500"
:fileSize=
"500"
:fileType=
"['mp4']"
:fileType=
"['mp4']"
:disabled=
"checkLock"
/>
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.video"
></el-input>
<el-input
v-show=
"false"
disabled
v-model=
"form.video"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -108,6 +120,7 @@
...
@@ -108,6 +120,7 @@
@
remove=
"listRemoveFile"
@
remove=
"listRemoveFile"
:fileArr=
"fileListFile"
:fileArr=
"fileListFile"
:fileType=
"fileType"
:fileType=
"fileType"
:disabled=
"checkLock"
/>
/>
<el-input
v-show=
"false"
disabled
v-model=
"form.enclosure"
></el-input>
<el-input
v-show=
"false"
disabled
v-model=
"form.enclosure"
></el-input>
</el-form-item>
</el-form-item>
...
@@ -133,6 +146,9 @@ export default {
...
@@ -133,6 +146,9 @@ export default {
courseId
:
{
courseId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:{
type
:
Boolean
,
}
},
},
components
:
{
components
:
{
Editor
,
Editor
,
...
@@ -204,8 +220,16 @@ export default {
...
@@ -204,8 +220,16 @@ export default {
getLessonById
(
this
.
courseId
).
then
((
res
)
=>
{
getLessonById
(
this
.
courseId
).
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
const
data
=
res
.
data
;
const
data
=
res
.
data
;
const
{
courseName
,
courseType
,
courseConent
,
video
,
enclosure
,
duration
,
testStartTime
,
testEndTime
}
=
const
{
data
;
courseName
,
courseType
,
courseConent
,
video
,
enclosure
,
duration
,
testStartTime
,
testEndTime
,
}
=
data
;
this
.
form
=
{
this
.
form
=
{
courseName
,
courseName
,
courseType
,
courseType
,
...
@@ -214,21 +238,22 @@ export default {
...
@@ -214,21 +238,22 @@ export default {
enclosure
,
enclosure
,
duration
,
duration
,
testStartTime
,
testStartTime
,
testEndTime
testEndTime
,
};
};
this
.
fileListVideo
=
[
console
.
log
(
'video'
,
video
)
this
.
fileListVideo
=
video
?
[
{
{
name
:
courseName
+
"视频"
,
name
:
courseName
+
"视频"
,
url
:
uploadfile
,
url
:
uploadfile
,
},
},
];
]
:[]
;
this
.
fileListFile
=
[
this
.
fileListFile
=
[
{
{
name
:
courseName
+
"附件"
,
name
:
courseName
+
"附件"
,
url
:
uploadfile
,
url
:
uploadfile
,
},
},
];
];
console
.
log
(
"--"
,
this
.
fileListFile
);
console
.
log
(
"--"
,
this
.
fileListFile
);
}
}
});
});
},
},
...
@@ -280,14 +305,18 @@ export default {
...
@@ -280,14 +305,18 @@ export default {
message
:
"保存课程成功"
,
message
:
"保存课程成功"
,
type
:
"success"
,
type
:
"success"
,
});
});
// 隐藏dia
this
.
$parent
.
$parent
.
dialogCancel
()
}
else
if
(
num
==
3
)
{
}
else
if
(
num
==
3
)
{
this
.
$message
({
this
.
$message
({
message
:
"保存课程成功,请开始录入题目"
,
message
:
"保存课程成功,请开始录入题目"
,
type
:
"success"
,
type
:
"success"
,
});
});
// 跳转动态路由,并且把ID改变添加用
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
}
}
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
this
.
$parent
.
$parent
.
$parent
.
getList
();
this
.
$parent
.
$parent
.
$parent
.
getList
();
return
true
;
return
true
;
...
@@ -307,7 +336,7 @@ export default {
...
@@ -307,7 +336,7 @@ export default {
.form-wrapper
{
.form-wrapper
{
padding-top
:
22px
;
padding-top
:
22px
;
width
:
100%
;
width
:
100%
;
height
:
6
5
0px
;
height
:
6
8
0px
;
overflow
:
hidden
;
overflow
:
hidden
;
// padding-bottom: 10px;
// padding-bottom: 10px;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/components/QuestionList.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 17:56:05
* @Date: 2022-09-22 17:56:05
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-31 14:03:36
* @LastEditTime: 2023-0
2-02 10:05:15
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -71,12 +71,21 @@
...
@@ -71,12 +71,21 @@
<div
class=
"right"
>
<div
class=
"right"
>
<div>
<div>
<el-button
<el-button
v-if=
"!checkLock"
@
click=
"edit(item.topicId)"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
type=
"text"
type=
"text"
>
修改
</el-button
>
修改
</el-button
>
>
<el-button
<el-button
v-if=
"checkLock"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
type=
"text"
>
查看
</el-button
>
<el-button
v-if=
"!checkLock"
@
click=
"deleteLesson(item.topicId)"
@
click=
"deleteLesson(item.topicId)"
icon=
"el-icon-delete"
icon=
"el-icon-delete"
type=
"text"
type=
"text"
...
@@ -98,6 +107,7 @@
...
@@ -98,6 +107,7 @@
v-model=
"bottomFrom.singleChoiceScore"
v-model=
"bottomFrom.singleChoiceScore"
style=
"width: 50px"
style=
"width: 50px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
分
</div>
<div>
分
</div>
...
@@ -109,6 +119,7 @@
...
@@ -109,6 +119,7 @@
v-model=
"bottomFrom.multipleChoiceScore"
v-model=
"bottomFrom.multipleChoiceScore"
style=
"width: 50px"
style=
"width: 50px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
分
</div>
<div>
分
</div>
...
@@ -121,6 +132,7 @@
...
@@ -121,6 +132,7 @@
v-model=
"bottomFrom.judgmentScore"
v-model=
"bottomFrom.judgmentScore"
style=
"width: 50px"
style=
"width: 50px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
分
</div>
<div>
分
</div>
...
@@ -133,6 +145,7 @@
...
@@ -133,6 +145,7 @@
v-model=
"bottomFrom.qualifiedNum"
v-model=
"bottomFrom.qualifiedNum"
style=
"width: 60px"
style=
"width: 60px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
为合格
</div>
<div>
为合格
</div>
...
@@ -144,6 +157,7 @@
...
@@ -144,6 +157,7 @@
icon=
"el-icon-check"
icon=
"el-icon-check"
size=
"mini"
size=
"mini"
type=
"success"
type=
"success"
:disabled=
"checkLock"
>
保存
</el-button
>
保存
</el-button
>
>
</div>
</div>
...
@@ -164,6 +178,9 @@ export default {
...
@@ -164,6 +178,9 @@ export default {
courseId
:
{
courseId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:
{
type
:
Boolean
,
},
},
},
components
:
{},
components
:
{},
data
()
{
data
()
{
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/lessonsProgram/index.vue
View file @
06059cb8
...
@@ -131,9 +131,11 @@
...
@@ -131,9 +131,11 @@
prop=
"topicNum"
prop=
"topicNum"
width=
"180"
width=
"180"
>
>
<
template
v-slot=
"{ row: { topicNum, courseId } }"
>
<
template
v-slot=
"{ row: { topicNum, courseId, status } }"
>
<div
@
click=
"checkQuestion(courseId)"
class=
"timuNum"
>
<div
@
click=
"checkQuestion(courseId, status)"
class=
"timuNum"
>
<div
v-if=
"topicNum > 0"
>
{{
`已录入${topicNum
}
题`
}}
<
/div
>
<div
v-if=
"topicNum > 0"
>
{{
status
==
0
?
`已录入${topicNum
}
题`
:
"查看"
}}
<
/div
>
<
div
v
-
else
>
未录入
<
/div
>
<
div
v
-
else
>
未录入
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -153,6 +155,14 @@
...
@@ -153,6 +155,14 @@
@
click
=
"changeLesson(courseId)"
@
click
=
"changeLesson(courseId)"
>
修改
<
/el-butto
n
>
修改
<
/el-butto
n
>
>
<
el
-
button
v
-
if
=
"status == 1"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"checkLesson(courseId)"
>
详情
<
/el-butto
n
>
<
el
-
button
<
el
-
button
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
...
@@ -165,7 +175,7 @@
...
@@ -165,7 +175,7 @@
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
icon
=
"el-icon-delete"
icon
=
"el-icon-delete"
@
click
=
"issue
Lesson
(courseId)"
@
click
=
"issue
Dilog
(courseId)"
>
发布
<
/el-butto
n
>
发布
<
/el-butto
n
>
>
<
/template
>
<
/template
>
...
@@ -183,18 +193,68 @@
...
@@ -183,18 +193,68 @@
ref
=
"Dia"
ref
=
"Dia"
:
componentsNum
.
sync
=
"componentsNum"
:
componentsNum
.
sync
=
"componentsNum"
:
courseId
.
sync
=
"courseId"
:
courseId
.
sync
=
"courseId"
:
checkLock
.
sync
=
"checkLock"
:
visible
.
sync
=
"dilogFlag"
:
visible
.
sync
=
"dilogFlag"
/>
/>
<
el
-
dialog
title
=
"发布详情"
:
visible
.
sync
=
"issueVisible"
width
=
"60%"
>
<
div
class
=
"detail flex"
>
<
div
class
=
"detail-item"
>
单选题
<
span
>
{{
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
danxs
}}
<
/spa
n
>
题,计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
多选题
<
span
>
{{
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
duoxs
}}
<
/span> 题,计<span class="textC">{{
duoxs
*
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
判断提
<
span
>
{{
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
/题,共<span>{{ pds
}}
</
span
>
题,计
<
span
class
=
"textC"
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
合格分数为
<
span
class
=
"textC"
>
{{
bottomFrom
.
qualifiedNum
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
一共
<
span
>
{{
danxs
+
duoxs
+
pds
}}
<
/spa
n
>
道题,总共计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
/div
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"issueVisible = false"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"issueLesson(issueCourseId)"
>
确认发布
<
/el-butto
n
>
<
/span
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
import
{
getQuestion
,
getLessons
,
getLessons
,
getLessonById
,
getLessonById
,
issue
,
issue
,
deleteLesson
,
deleteLesson
,
}
from
"@/api/educationPlanExam/lessonsProgram.js"
;
}
from
"@/api/educationPlanExam/lessonsProgram.js"
;
// 获取培训计划
// 获取培训计划
import
{
getPlanList
}
from
"@/api/educationPlanExam/trainingProgram"
;
import
{
getPlanList
}
from
"@/api/educationPlanExam/trainingProgram"
;
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
import
{
mapGetters
,
mapMutations
}
from
"vuex"
;
...
@@ -222,18 +282,39 @@ export default {
...
@@ -222,18 +282,39 @@ export default {
courseName
:
null
,
courseName
:
null
,
releaseTime
:
""
,
releaseTime
:
""
,
}
,
}
,
// 表单参数
// 表单参数
form
:
{
}
,
form
:
{
}
,
// 表单校验
// 表单校验
dilogFlag
:
false
,
dilogFlag
:
false
,
// 发布弹框
issueVisible
:
false
,
bottomFrom
:
{
singleChoiceScore
:
0
,
multipleChoiceScore
:
0
,
judgmentScore
:
0
,
qualifiedNum
:
0
,
}
,
issueCourseId
:
null
,
questionList
:
[],
componentsNum
:
1
,
componentsNum
:
1
,
// 点击的id,如果是新增为空
// 点击的id,如果是新增为空
courseId
:
null
,
courseId
:
null
,
// false为编辑,true为查看,查看不允许编辑的时候
checkLock
:
false
,
}
;
}
;
}
,
}
,
computed
:
{
computed
:
{
...
mapGetters
([
"courseOptions"
]),
...
mapGetters
([
"courseOptions"
]),
danxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
1
).
length
;
}
,
duoxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
2
).
length
;
}
,
pds
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
3
).
length
;
}
,
}
,
}
,
created
()
{
created
()
{
this
.
getPlanList
();
this
.
getPlanList
();
...
@@ -275,21 +356,34 @@ export default {
...
@@ -275,21 +356,34 @@ export default {
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"新增培训课程"
;
this
.
$refs
.
Dia
.
title
=
"新增培训课程"
;
this
.
componentsNum
=
1
;
this
.
componentsNum
=
1
;
this
.
courseId
=
null
;
this
.
courseId
=
null
;
this
.
dilogFlag
=
true
;
this
.
dilogFlag
=
true
;
}
,
}
,
changeLesson
(
courseId
)
{
changeLesson
(
courseId
)
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"修改培训课程"
;
this
.
$refs
.
Dia
.
title
=
"修改培训课程"
;
this
.
componentsNum
=
1
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
courseId
=
courseId
;
this
.
dilogFlag
=
true
;
this
.
dilogFlag
=
true
;
}
,
}
,
checkLesson
(
courseId
)
{
this
.
checkLock
=
true
;
this
.
$refs
.
Dia
.
title
=
"查看培训课程"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
dilogFlag
=
true
;
}
,
// 直接查看考题
// 直接查看考题
checkQuestion
(
courseId
)
{
checkQuestion
(
courseId
,
status
)
{
// 要查看考题的id
// 要查看考题的id
if
(
status
==
1
)
{
this
.
checkLock
=
true
;
}
this
.
courseId
=
courseId
;
this
.
courseId
=
courseId
;
console
.
log
(
this
.
courseId
);
console
.
log
(
this
.
courseId
);
// 2代表列表组件
// 2代表列表组件
...
@@ -331,9 +425,39 @@ export default {
...
@@ -331,9 +425,39 @@ export default {
}
)
}
)
.
catch
(()
=>
{
}
);
.
catch
(()
=>
{
}
);
}
,
}
,
// 发布弹框
issueDilog
(
courseId
)
{
getQuestion
({
courseId
}
)
.
then
((
res
)
=>
{
this
.
questionList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
topicType
:
item
.
topicType
,
topicId
:
item
.
topicId
,
topicTitle
:
item
.
topicTitle
,
}
;
}
);
}
)
.
then
((
res
)
=>
{
return
getLessonById
(
courseId
);
}
)
.
then
((
res
)
=>
{
this
.
bottomFrom
=
{
singleChoiceScore
:
res
.
data
.
singleChoiceScore
,
multipleChoiceScore
:
res
.
data
.
multipleChoiceScore
,
judgmentScore
:
res
.
data
.
judgmentScore
,
qualifiedNum
:
res
.
data
.
qualifiedNum
,
}
;
}
)
.
then
((
res
)
=>
{
this
.
issueVisible
=
true
;
this
.
issueCourseId
=
courseId
;
}
);
//
}
,
// 发布
// 发布
issueLesson
(
courseId
)
{
issueLesson
(
courseId
)
{
this
.
$confirm
(
"
请确定发布
"
,
{
this
.
$confirm
(
"
确定要发布吗
"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
type
:
"warning"
,
...
@@ -343,14 +467,14 @@ export default {
...
@@ -343,14 +467,14 @@ export default {
return
getLessonById
(
courseId
);
return
getLessonById
(
courseId
);
}
)
}
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
//
if (
res
.
data
.
singleChoiceScore
>
0
&&
// res.data.singleChoiceScore >=
0 &&
res
.
data
.
multipleChoiceScore
>
0
&&
// res.data.multipleChoiceScore >=
0 &&
res
.
data
.
judgmentScore
>
0
&&
// res.data.judgmentScore >=
0 &&
res
.
data
.
qualifiedNum
>
0
// res.data.qualifiedNum >=
0
)
{
//
)
{
return
true
;
return
true
;
}
//
}
}
)
}
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
...
@@ -370,6 +494,7 @@ export default {
...
@@ -370,6 +494,7 @@ export default {
type
:
"success"
,
type
:
"success"
,
}
);
}
);
this
.
getList
();
this
.
getList
();
this
.
issueVisible
=
false
;
}
}
}
)
}
)
.
catch
(()
=>
{
}
);
.
catch
(()
=>
{
}
);
...
@@ -469,4 +594,17 @@ export default {
...
@@ -469,4 +594,17 @@ export default {
::
v
-
deep
.
el
-
dialog
{
::
v
-
deep
.
el
-
dialog
{
margin
-
top
:
15
vh
!
important
;
margin
-
top
:
15
vh
!
important
;
}
}
.
detail
{
// position: absolute;
// bottom: -20px;
// left: 10px;
.
textC
{
font
-
weight
:
800
;
font
-
size
:
18
px
;
}
.
detail
-
item
{
margin
-
right
:
20
px
;
color
:
red
;
}
}
<
/style
>
<
/style
>
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/AddQuestion.vue
View file @
06059cb8
...
@@ -11,9 +11,15 @@
...
@@ -11,9 +11,15 @@
size=
"mini"
size=
"mini"
@
input=
"topicTypeChange"
@
input=
"topicTypeChange"
>
>
<el-radio-button
:label=
"1"
>
单选
</el-radio-button>
<el-radio-button
:disabled=
"checkLock"
:label=
"1"
<el-radio-button
:label=
"2"
>
多选
</el-radio-button>
>
单选
</el-radio-button
<el-radio-button
:label=
"3"
>
判断
</el-radio-button>
>
<el-radio-button
:disabled=
"checkLock"
:label=
"2"
>
多选
</el-radio-button
>
<el-radio-button
:disabled=
"checkLock"
:label=
"3"
>
判断
</el-radio-button
>
</el-radio-group>
</el-radio-group>
</div>
</div>
<div
class=
"right"
>
{{
courseName
}}
</div>
<div
class=
"right"
>
{{
courseName
}}
</div>
...
@@ -28,7 +34,7 @@
...
@@ -28,7 +34,7 @@
:rules=
"
{
:rules=
"
{
required: true,
required: true,
message: '必须输入题目内容',
message: '必须输入题目内容',
trigger:
'blur'
,
trigger:
['blur', 'change']
,
}"
}"
>
>
<el-input
<el-input
...
@@ -37,6 +43,7 @@
...
@@ -37,6 +43,7 @@
resize=
"none"
resize=
"none"
rows=
"4"
rows=
"4"
v-model=
"form.topicTitle"
v-model=
"form.topicTitle"
:disabled=
"checkLock"
>
>
</el-input>
</el-input>
</el-form-item>
</el-form-item>
...
@@ -54,7 +61,7 @@
...
@@ -54,7 +61,7 @@
:rules=
"
{
:rules=
"
{
required: true,
required: true,
message: '第一项不能为空不能为空',
message: '第一项不能为空不能为空',
trigger:
'blur'
,
trigger:
['blur', 'change']
,
}"
}"
>
>
<div
class=
"add-select flex"
>
<div
class=
"add-select flex"
>
...
@@ -64,6 +71,7 @@
...
@@ -64,6 +71,7 @@
style=
"flex: 1; margin-right: 10px"
style=
"flex: 1; margin-right: 10px"
rows=
"2"
rows=
"2"
v-model=
"question.value"
v-model=
"question.value"
:disabled=
"checkLock"
></el-input>
></el-input>
<div
class=
"flex algin-items"
>
<div
class=
"flex algin-items"
>
<div
<div
...
@@ -78,6 +86,7 @@
...
@@ -78,6 +86,7 @@
type=
"danger"
type=
"danger"
v-if=
"index > 0"
v-if=
"index > 0"
@
click
.
prevent=
"removeDomain(question)"
@
click
.
prevent=
"removeDomain(question)"
:disabled=
"checkLock"
>
删除
</el-button
>
删除
</el-button
>
>
</div>
</div>
...
@@ -108,7 +117,11 @@
...
@@ -108,7 +117,11 @@
设为正确答案
设为正确答案
</div>
-->
</div>
-->
<div
style=
"padding-left: 30px"
>
<div
style=
"padding-left: 30px"
>
<el-button
size=
"mini"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
<el-button
size=
"mini"
type=
"primary"
@
click
.
prevent=
"add(addValue)"
:disabled=
"checkLock"
>
新增选项
</el-button
>
新增选项
</el-button
>
>
</div>
</div>
...
@@ -143,6 +156,9 @@ export default {
...
@@ -143,6 +156,9 @@ export default {
topicId
:
{
topicId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:
{
type
:
Boolean
,
},
},
},
components
:
{},
components
:
{},
data
()
{
data
()
{
...
@@ -229,6 +245,7 @@ export default {
...
@@ -229,6 +245,7 @@ export default {
}
}
},
},
rightAnswerClick
(
index
)
{
rightAnswerClick
(
index
)
{
if
(
this
.
checkLock
)
return
;
if
(
this
.
form
.
topicType
===
2
)
{
if
(
this
.
form
.
topicType
===
2
)
{
const
ind
=
this
.
answerNum
.
indexOf
(
index
);
const
ind
=
this
.
answerNum
.
indexOf
(
index
);
if
(
ind
<
0
)
{
if
(
ind
<
0
)
{
...
@@ -247,6 +264,7 @@ export default {
...
@@ -247,6 +264,7 @@ export default {
},
},
// 删除选项
// 删除选项
removeDomain
(
question
)
{
removeDomain
(
question
)
{
if
(
this
.
checkLock
)
return
;
const
index
=
this
.
form
.
questions
.
indexOf
(
question
);
const
index
=
this
.
form
.
questions
.
indexOf
(
question
);
console
.
log
(
index
);
console
.
log
(
index
);
// 如果是正确答案,就让正确答案清空
// 如果是正确答案,就让正确答案清空
...
@@ -333,9 +351,9 @@ export default {
...
@@ -333,9 +351,9 @@ export default {
reset
()
{
reset
()
{
this
.
form
=
{
this
.
form
=
{
topicTitle
:
""
,
topicTitle
:
""
,
questions
:
[{
value
:
""
},
{
value
:
""
}
,
{
value
:
""
}
],
questions
:
[{
value
:
""
},
{
value
:
""
}],
};
};
this
.
answerNum
=
null
;
this
.
answerNum
=
[]
;
this
.
addValue
=
""
;
this
.
addValue
=
""
;
},
},
},
},
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-12-27 09:30:19
* @Date: 2022-12-27 09:30:19
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-28 10:29:18
* @LastEditTime: 202
3-02-01 18:02:14
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @FilePath: /danger-manage-web/src/views/educationPlanExam/textPaper/components/ChangeQuestion.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -193,7 +193,7 @@ export default {
...
@@ -193,7 +193,7 @@ export default {
this
.
loading
=
false
;
this
.
loading
=
false
;
});
});
},
},
save
AndNext
(
)
{
save
(
num
=
2
)
{
const
topicInfos
=
this
.
list
const
topicInfos
=
this
.
list
.
filter
((
item
)
=>
item
.
checked
)
.
filter
((
item
)
=>
item
.
checked
)
.
map
((
item
)
=>
{
.
map
((
item
)
=>
{
...
@@ -202,18 +202,20 @@ export default {
...
@@ -202,18 +202,20 @@ export default {
quan
:
item
.
changeNum
,
quan
:
item
.
changeNum
,
};
};
});
});
console
.
log
(
this
.
courseId
,
topicInfos
);
console
.
log
(
this
.
courseId
,
topicInfos
);
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
};
const
data
=
{
courseId
:
this
.
courseId
,
topicInfos
};
console
.
log
(
data
);
console
.
log
(
data
);
bachAddTopic
(
data
).
then
((
res
)
=>
{
bachAddTopic
(
data
).
then
((
res
)
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$parent
.
$parent
.
componentsNumChange
(
2
);
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
$parent
.
getList
();
this
.
$parent
.
$parent
.
$parent
.
getList
();
}
}
});
});
},
},
saveAndNext
()
{
this
.
save
(
3
);
},
resetClick
()
{},
resetClick
()
{},
search
()
{
search
()
{
this
.
getList
();
this
.
getList
();
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/Dia.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:38:49
* @Date: 2022-09-22 10:38:49
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-28 10:31:06
* @LastEditTime: 202
3-02-01 17:34:25
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/addLesson.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
:is=
"currentComponent"
:is=
"currentComponent"
:courseId
.
sync=
"courseId"
:courseId
.
sync=
"courseId"
:topicId
.
sync=
"topicId"
:topicId
.
sync=
"topicId"
:checkLock=
"checkLock"
ref=
"current"
ref=
"current"
></component>
></component>
</transition>
</transition>
...
@@ -32,7 +33,7 @@
...
@@ -32,7 +33,7 @@
<QuestionList/>
-->
<QuestionList/>
-->
</div>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<
!--
<
div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
v-if=
"this.componentsNum == 2"
v-if=
"this.componentsNum == 2"
...
@@ -62,6 +63,51 @@
...
@@ -62,6 +63,51 @@
>
{{
"确认"
}}
</el-button
>
{{
"确认"
}}
</el-button
>
>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
-->
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"!checkLock"
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 2 && !checkLock"
@
click=
"componentsNumChange(4)"
>
从题库选择
</el-button
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 4 || this.componentsNum == 3"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
v-if=
"
this.componentsNum == 1 ||
this.componentsNum == 3 ||
this.componentsNum == 4
"
@
click=
"save"
>
保存
</el-button
>
<el-button
type=
"primary"
@
click=
"saveAndNext"
v-if=
"!checkLock"
>
{{
saveNextText
}}
</el-button>
<el-button
v-if=
"this.componentsNum == 2"
type=
"primary"
@
click=
"dialogCancel"
>
{{
"确认"
}}
</el-button
>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
v-else
>
<el-button
type=
"primary"
v-if=
"this.componentsNum == 3 && checkLock"
@
click=
"componentsNumChange(2)"
>
返回题目列表
</el-button
>
<el-button
type=
"primary"
@
click=
"dialogCancel"
>
{{
"确认"
}}
</el-button>
<el-button
@
click=
"dialogCancel"
>
取消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</
template
>
</
template
>
...
@@ -86,6 +132,9 @@ export default {
...
@@ -86,6 +132,9 @@ export default {
courseId
:
{
courseId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:
{
type
:
Boolean
,
},
},
},
// components: {
// components: {
// Lesson,
// Lesson,
...
@@ -137,11 +186,9 @@ export default {
...
@@ -137,11 +186,9 @@ export default {
text
=
"保存并录入题目"
;
text
=
"保存并录入题目"
;
}
else
if
(
this
.
componentsNum
==
2
)
{
}
else
if
(
this
.
componentsNum
==
2
)
{
text
=
"录入考题"
;
text
=
"录入考题"
;
}
else
if
(
this
.
componentsNum
==
3
)
{
}
else
{
text
=
"保存并录入下一题"
;
text
=
"保存并录入下一题"
;
}
else
{
}
text
=
"确定选择"
;
}
return
text
;
return
text
;
},
},
},
},
...
@@ -168,6 +215,7 @@ export default {
...
@@ -168,6 +215,7 @@ export default {
this
.
topicId
=
null
;
this
.
topicId
=
null
;
}
}
this
.
$emit
(
"update:visible"
,
false
);
this
.
$emit
(
"update:visible"
,
false
);
this
.
$emit
(
"update:checkLock"
,
false
);
},
},
// 把ID改变了
// 把ID改变了
changeCourseId
(
courseId
)
{
changeCourseId
(
courseId
)
{
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/Lesson.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 10:59:44
* @Date: 2022-09-22 10:59:44
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 202
2-12-26 16:31:34
* @LastEditTime: 202
3-02-01 16:58:26
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/Lession.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -16,7 +16,11 @@
...
@@ -16,7 +16,11 @@
:rules=
"rules"
:rules=
"rules"
>
>
<el-form-item
label=
"考试标题"
prop=
"courseName"
>
<el-form-item
label=
"考试标题"
prop=
"courseName"
>
<el-input
style=
"width: 700px"
v-model=
"form.courseName"
></el-input>
<el-input
:disabled=
"checkLock"
style=
"width: 700px"
v-model=
"form.courseName"
></el-input>
</el-form-item>
</el-form-item>
<div
class=
"top flex"
>
<div
class=
"top flex"
>
<el-form-item
label=
"开始时间"
prop=
"testStartTime"
>
<el-form-item
label=
"开始时间"
prop=
"testStartTime"
>
...
@@ -27,6 +31,7 @@
...
@@ -27,6 +31,7 @@
type=
"datetime"
type=
"datetime"
placeholder=
"选择日期时间"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"结束时间"
prop=
"testEndTime"
>
<el-form-item
label=
"结束时间"
prop=
"testEndTime"
>
...
@@ -36,6 +41,7 @@
...
@@ -36,6 +41,7 @@
type=
"datetime"
type=
"datetime"
placeholder=
"选择日期时间"
placeholder=
"选择日期时间"
default-time=
"00:00:00"
default-time=
"00:00:00"
:disabled=
"checkLock"
/>
/>
</el-form-item>
</el-form-item>
</div>
</div>
...
@@ -43,6 +49,7 @@
...
@@ -43,6 +49,7 @@
<ChangePapel
<ChangePapel
ref=
"changePaple"
ref=
"changePaple"
:jsonSelectNameList=
"jsonSelectNameList"
:jsonSelectNameList=
"jsonSelectNameList"
:disabled=
"checkLock"
@
getPeopleList=
"getPeopleList"
@
getPeopleList=
"getPeopleList"
/>
/>
</el-form-item>
</el-form-item>
...
@@ -70,6 +77,9 @@ export default {
...
@@ -70,6 +77,9 @@ export default {
courseId
:
{
courseId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:
{
type
:
Boolean
,
},
},
},
components
:
{
components
:
{
// Editor,
// Editor,
...
@@ -196,14 +206,17 @@ export default {
...
@@ -196,14 +206,17 @@ export default {
message
:
"保存课程成功"
,
message
:
"保存课程成功"
,
type
:
"success"
,
type
:
"success"
,
});
});
this
.
$parent
.
$parent
.
dialogCancel
();
}
else
if
(
num
==
3
)
{
}
else
if
(
num
==
3
)
{
this
.
$message
({
this
.
$message
({
message
:
"保存课程成功,请开始录入题目"
,
message
:
"保存课程成功,请开始录入题目"
,
type
:
"success"
,
type
:
"success"
,
});
});
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
}
}
this
.
$parent
.
$parent
.
componentsNumChange
(
num
);
//
this.$parent.$parent.componentsNumChange(num);
this
.
$parent
.
$parent
.
changeCourseId
(
courseId
);
//
this.$parent.$parent.changeCourseId(courseId);
this
.
$parent
.
$parent
.
$parent
.
getList
();
this
.
$parent
.
$parent
.
$parent
.
getList
();
return
true
;
return
true
;
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/components/QuestionList.vue
View file @
06059cb8
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: 纪泽龙 jizelong@qq.com
* @Author: 纪泽龙 jizelong@qq.com
* @Date: 2022-09-22 17:56:05
* @Date: 2022-09-22 17:56:05
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditors: 纪泽龙 jizelong@qq.com
* @LastEditTime: 2023-0
1-31 14:04
:09
* @LastEditTime: 2023-0
2-01 17:45
:09
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue
* @FilePath: /danger-manage-web/src/views/lessonsProgram/components/QuestionList.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
...
@@ -34,13 +34,15 @@
...
@@ -34,13 +34,15 @@
>
分
>
分
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-item"
>
判断提
<span>
{{
bottomFrom
.
judgmentScore
}}
</span>
/题,共
<span>
{{
pds
}}
</span>
题,计
<span
判断提
<span>
{{
bottomFrom
.
judgmentScore
}}
</span
class=
"textC"
>
/题,共
<span>
{{
pds
}}
</span>
题,计
<span
class=
"textC"
>
{{
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
</span
pds
*
bottomFrom
.
judgmentScore
}}
</span
>
分
>
分
</div>
</div>
<div
class=
"detail-item"
>
<div
class=
"detail-item"
>
一共
<span>
{{
danxs
+
duoxs
+
pds
}}
</span>
道题,总共计
<span
class=
"textC"
>
{{
一共
<span>
{{
danxs
+
duoxs
+
pds
}}
</span
>
道题,总共计
<span
class=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
+
danxs
*
bottomFrom
.
singleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
pds
*
bottomFrom
.
judgmentScore
pds
*
bottomFrom
.
judgmentScore
...
@@ -70,12 +72,21 @@
...
@@ -70,12 +72,21 @@
<div
class=
"right"
>
<div
class=
"right"
>
<div>
<div>
<el-button
<el-button
v-if=
"!checkLock"
@
click=
"edit(item.topicId)"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
icon=
"el-icon-edit"
type=
"text"
type=
"text"
>
修改
</el-button
>
修改
</el-button
>
>
<el-button
<el-button
v-if=
"checkLock"
@
click=
"edit(item.topicId)"
icon=
"el-icon-edit"
type=
"text"
>
查看
</el-button
>
<el-button
v-if=
"!checkLock"
@
click=
"deleteLesson(item.topicId)"
@
click=
"deleteLesson(item.topicId)"
icon=
"el-icon-delete"
icon=
"el-icon-delete"
type=
"text"
type=
"text"
...
@@ -106,6 +117,7 @@
...
@@ -106,6 +117,7 @@
v-model=
"bottomFrom.singleChoiceScore"
v-model=
"bottomFrom.singleChoiceScore"
style=
"width: 50px"
style=
"width: 50px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
分
</div>
<div>
分
</div>
...
@@ -117,6 +129,7 @@
...
@@ -117,6 +129,7 @@
v-model=
"bottomFrom.multipleChoiceScore"
v-model=
"bottomFrom.multipleChoiceScore"
style=
"width: 50px"
style=
"width: 50px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
分
</div>
<div>
分
</div>
...
@@ -129,6 +142,7 @@
...
@@ -129,6 +142,7 @@
v-model=
"bottomFrom.judgmentScore"
v-model=
"bottomFrom.judgmentScore"
style=
"width: 50px"
style=
"width: 50px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
分
</div>
<div>
分
</div>
...
@@ -141,6 +155,7 @@
...
@@ -141,6 +155,7 @@
v-model=
"bottomFrom.qualifiedNum"
v-model=
"bottomFrom.qualifiedNum"
style=
"width: 60px"
style=
"width: 60px"
size=
"mini"
size=
"mini"
:disabled=
"checkLock"
></el-input>
></el-input>
</div>
</div>
<div>
为合格
</div>
<div>
为合格
</div>
...
@@ -151,6 +166,7 @@
...
@@ -151,6 +166,7 @@
icon=
"el-icon-check"
icon=
"el-icon-check"
size=
"mini"
size=
"mini"
type=
"success"
type=
"success"
:disabled=
"checkLock"
>
保存
</el-button
>
保存
</el-button
>
>
</div>
</div>
...
@@ -171,6 +187,9 @@ export default {
...
@@ -171,6 +187,9 @@ export default {
courseId
:
{
courseId
:
{
type
:
Number
,
type
:
Number
,
},
},
checkLock
:
{
type
:
Boolean
,
},
},
},
components
:
{},
components
:
{},
data
()
{
data
()
{
...
...
This diff is collapsed.
Click to expand it.
danger-manage-web/src/views/educationPlanExam/textPaper/index.vue
View file @
06059cb8
...
@@ -82,9 +82,11 @@
...
@@ -82,9 +82,11 @@
prop=
"topicNum"
prop=
"topicNum"
width=
"180"
width=
"180"
>
>
<template
v-slot=
"
{ row: { topicNum, courseId } }">
<template
v-slot=
"
{ row: { topicNum, courseId, status } }">
<div
class=
"timuNum"
>
<div
class=
"timuNum"
@
click=
"checkQuestion(courseId, status)"
>
<div
v-if=
"topicNum > 0"
>
{{
`已录入${topicNum
}
题`
}}
<
/div
>
<div
v-if=
"topicNum > 0"
>
{{
status
==
0
?
`已录入${topicNum
}
题`
:
"查看"
}}
<
/div
>
<
div
v
-
else
>
未录入
<
/div
>
<
div
v
-
else
>
未录入
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -102,17 +104,15 @@
...
@@ -102,17 +104,15 @@
>
>
<
template
v
-
slot
=
"{ row: { status, courseId, qualifiedNum
}
}
"
>
<
template
v
-
slot
=
"{ row: { status, courseId, qualifiedNum
}
}
"
>
<!--
<
div
>
{{
status
}}
<
/div> --
>
<!--
<
div
>
{{
status
}}
<
/div> --
>
<
el
-
button
<!--
<
el
-
button
:
disabled
=
"status == 1"
v
-
if
=
"status == 0"
v
-
if
=
"status == 0"
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
icon
=
"el-icon-edit"
icon
=
"el-icon-edit"
@
click
=
"checkQuestion(courseId)"
@
click
=
"checkQuestion(courseId)"
>
录入考题
<
/el-butto
n
>
录入考题
<
/el-butto
n
>
>
-->
<
el
-
button
<
el
-
button
:
disabled
=
"status == 1"
v
-
if
=
"status == 0"
v
-
if
=
"status == 0"
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
...
@@ -120,6 +120,14 @@
...
@@ -120,6 +120,14 @@
@
click
=
"changeLesson(courseId)"
@
click
=
"changeLesson(courseId)"
>
编辑
<
/el-butto
n
>
编辑
<
/el-butto
n
>
>
<
el
-
button
v
-
if
=
"status == 1"
size
=
"mini"
type
=
"text"
icon
=
"el-icon-edit"
@
click
=
"checkLesson(courseId)"
>
详情
<
/el-butto
n
>
<
el
-
button
<
el
-
button
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
...
@@ -128,13 +136,12 @@
...
@@ -128,13 +136,12 @@
>
删除
<
/el-butto
n
>
删除
<
/el-butto
n
>
>
<
el
-
button
<
el
-
button
:
disabled
=
"status == 1"
v
-
if
=
"status == 0"
v
-
if
=
"status == 0"
size
=
"mini"
size
=
"mini"
type
=
"text"
type
=
"text"
icon
=
"el-icon-delete"
icon
=
"el-icon-delete"
@
click
=
"issue
Lesson(courseId, qualifiedNum
)"
@
click
=
"issue
Dilog(courseId
)"
>
发布
考试
<
/el-butto
n
>
发布
<
/el-butto
n
>
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
@@ -151,16 +158,62 @@
...
@@ -151,16 +158,62 @@
ref
=
"Dia"
ref
=
"Dia"
:
componentsNum
.
sync
=
"componentsNum"
:
componentsNum
.
sync
=
"componentsNum"
:
courseId
.
sync
=
"courseId"
:
courseId
.
sync
=
"courseId"
:
checkLock
.
sync
=
"checkLock"
:
visible
.
sync
=
"dilogFlag"
:
visible
.
sync
=
"dilogFlag"
/>
/>
<
el
-
dialog
title
=
"提示"
:
visible
.
sync
=
"issue"
width
=
"30%"
>
<
el
-
dialog
title
=
"发布详情"
:
visible
.
sync
=
"issueVisible"
width
=
"60%"
>
<
div
>
123
<
/div
>
<
div
class
=
"detail flex"
>
<
div
class
=
"detail-item"
>
单选题
<
span
>
{{
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
danxs
}}
<
/spa
n
>
题,计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
多选题
<
span
>
{{
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
/
题
,
共
<
span
>
{{
duoxs
}}
<
/span> 题,计<span class="textC">{{
duoxs
*
bottomFrom
.
multipleChoiceScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
判断提
<
span
>
{{
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
/题,共<span>{{ pds
}}
</
span
>
题,计
<
span
class
=
"textC"
>
{{
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
合格分数为
<
span
class
=
"textC"
>
{{
bottomFrom
.
qualifiedNum
}}
<
/spa
n
>
分
<
/div
>
<
div
class
=
"detail-item"
>
一共
<
span
>
{{
danxs
+
duoxs
+
pds
}}
<
/spa
n
>
道题,总共计
<
span
class
=
"textC"
>
{{
danxs
*
bottomFrom
.
singleChoiceScore
+
duoxs
*
bottomFrom
.
multipleChoiceScore
+
pds
*
bottomFrom
.
judgmentScore
}}
<
/spa
n
>
分
<
/div
>
<
/div
>
<
span
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"issueVisible = false"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"issueLesson(issueCourseId)"
>
确认发布
<
/el-butto
n
>
<
/span
>
<
/el-dialog
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
import
{
getQuestion
,
getLessons
,
getLessons
,
getLessonById
,
getLessonById
,
issue
,
issue
,
...
@@ -200,14 +253,36 @@ export default {
...
@@ -200,14 +253,36 @@ export default {
// 表单校验
// 表单校验
dilogFlag
:
false
,
dilogFlag
:
false
,
// 发布
issueVisible
:
false
,
bottomFrom
:
{
singleChoiceScore
:
0
,
multipleChoiceScore
:
0
,
judgmentScore
:
0
,
qualifiedNum
:
0
,
}
,
issueCourseId
:
null
,
questionList
:
[],
componentsNum
:
1
,
componentsNum
:
1
,
// 点击的id,如果是新增为空
// 点击的id,如果是新增为空
courseId
:
null
,
courseId
:
null
,
issue
:
false
,
issue
:
false
,
// false为编辑,true为查看,查看不允许编辑的时候
checkLock
:
false
,
}
;
}
;
}
,
}
,
computed
:
{
computed
:
{
...
mapGetters
([
"courseOptions"
]),
...
mapGetters
([
"courseOptions"
]),
danxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
1
).
length
;
}
,
duoxs
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
2
).
length
;
}
,
pds
()
{
return
this
.
questionList
.
filter
((
item
)
=>
item
.
topicType
===
3
).
length
;
}
,
}
,
}
,
created
()
{
created
()
{
// this.getPlanList();
// this.getPlanList();
...
@@ -257,12 +332,22 @@ export default {
...
@@ -257,12 +332,22 @@ export default {
}
,
}
,
/** 新增按钮操作 */
/** 新增按钮操作 */
handleAdd
()
{
handleAdd
()
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"新增考试试卷"
;
this
.
$refs
.
Dia
.
title
=
"新增考试试卷"
;
this
.
componentsNum
=
1
;
this
.
componentsNum
=
1
;
this
.
courseId
=
null
;
this
.
courseId
=
null
;
this
.
dilogFlag
=
true
;
this
.
dilogFlag
=
true
;
}
,
}
,
changeLesson
(
courseId
)
{
changeLesson
(
courseId
)
{
this
.
checkLock
=
false
;
this
.
$refs
.
Dia
.
title
=
"修改考试试卷"
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
dilogFlag
=
true
;
}
,
checkLesson
(
courseId
)
{
this
.
checkLock
=
true
;
this
.
$refs
.
Dia
.
title
=
"修改考试试卷"
;
this
.
$refs
.
Dia
.
title
=
"修改考试试卷"
;
this
.
componentsNum
=
1
;
this
.
componentsNum
=
1
;
this
.
courseId
=
courseId
;
this
.
courseId
=
courseId
;
...
@@ -270,8 +355,12 @@ export default {
...
@@ -270,8 +355,12 @@ export default {
}
,
}
,
// 直接查看考题
// 直接查看考题
checkQuestion
(
courseId
)
{
checkQuestion
(
courseId
,
status
)
{
// 要查看考题的id
// 要查看考题的id
if
(
status
==
1
)
{
this
.
checkLock
=
true
;
}
this
.
courseId
=
courseId
;
this
.
courseId
=
courseId
;
console
.
log
(
this
.
courseId
);
console
.
log
(
this
.
courseId
);
// 2代表列表组件
// 2代表列表组件
...
@@ -315,8 +404,39 @@ export default {
...
@@ -315,8 +404,39 @@ export default {
.
catch
(()
=>
{
}
);
.
catch
(()
=>
{
}
);
}
,
}
,
// 发布
// 发布
issueLesson
(
courseId
,
qualifiedNum
)
{
issueDilog
(
courseId
)
{
this
.
$confirm
(
"请确定发布"
,
{
getQuestion
({
courseId
}
)
.
then
((
res
)
=>
{
console
.
log
(
res
)
this
.
questionList
=
res
.
rows
.
map
((
item
)
=>
{
return
{
topicType
:
item
.
topicType
,
topicId
:
item
.
topicId
,
topicTitle
:
item
.
topicTitle
,
}
;
}
);
}
)
.
then
((
res
)
=>
{
return
getLessonById
(
courseId
);
}
)
.
then
((
res
)
=>
{
this
.
bottomFrom
=
{
singleChoiceScore
:
res
.
data
.
singleChoiceScore
||
0
,
multipleChoiceScore
:
res
.
data
.
multipleChoiceScore
||
0
,
judgmentScore
:
res
.
data
.
judgmentScore
||
0
,
qualifiedNum
:
res
.
data
.
qualifiedNum
||
0
,
}
;
}
)
.
then
((
res
)
=>
{
this
.
issueVisible
=
true
;
this
.
issueCourseId
=
courseId
;
}
);
//
}
,
issueLesson
(
courseId
)
{
this
.
$confirm
(
"确定要发布吗"
,
{
confirmButtonText
:
"确定"
,
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
type
:
"warning"
,
...
@@ -326,14 +446,14 @@ export default {
...
@@ -326,14 +446,14 @@ export default {
return
getLessonById
(
courseId
);
return
getLessonById
(
courseId
);
}
)
}
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
//
if (
res
.
data
.
singleChoiceScore
>
0
&&
//
res.data.singleChoiceScore > 0 &&
res
.
data
.
multipleChoiceScore
>
0
&&
//
res.data.multipleChoiceScore > 0 &&
res
.
data
.
judgmentScore
>
0
&&
//
res.data.judgmentScore > 0 &&
res
.
data
.
qualifiedNum
>
0
//
res.data.qualifiedNum > 0
)
{
//
)
{
return
true
;
return
true
;
}
//
}
}
)
}
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
...
@@ -355,6 +475,7 @@ export default {
...
@@ -355,6 +475,7 @@ export default {
type
:
"success"
,
type
:
"success"
,
}
);
}
);
this
.
getList
();
this
.
getList
();
this
.
issueVisible
=
false
;
}
}
}
)
}
)
.
catch
(()
=>
{
}
);
.
catch
(()
=>
{
}
);
...
@@ -373,7 +494,7 @@ export default {
...
@@ -373,7 +494,7 @@ export default {
}
}
.
timuNum
{
.
timuNum
{
color
:
#
1
d84ff
;
color
:
#
1
d84ff
;
//
cursor: pointer;
cursor
:
pointer
;
}
}
::
v
-
deep
.
el
-
select
{
::
v
-
deep
.
el
-
select
{
width
:
100
%
;
width
:
100
%
;
...
@@ -381,4 +502,17 @@ export default {
...
@@ -381,4 +502,17 @@ export default {
::
v
-
deep
.
el
-
dialog
{
::
v
-
deep
.
el
-
dialog
{
margin
-
top
:
15
vh
!
important
;
margin
-
top
:
15
vh
!
important
;
}
}
.
detail
{
// position: absolute;
// bottom: -20px;
// left: 10px;
.
textC
{
font
-
weight
:
800
;
font
-
size
:
18
px
;
}
.
detail
-
item
{
margin
-
right
:
20
px
;
color
:
red
;
}
}
<
/style
>
<
/style
>
This diff is collapsed.
Click to expand it.
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