Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
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
罗超
confucius
Commits
4db7b3a9
Commit
4db7b3a9
authored
Aug 23, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
6d980f3f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
24 deletions
+59
-24
paperfolder-form.vue
src/components/exam/paperfolder-form.vue
+29
-17
examPaper.vue
src/pages/exam/examPaper.vue
+7
-4
paperCreate.vue
src/pages/exam/paperCreate.vue
+14
-2
paperEdit.vue
src/pages/exam/paperEdit.vue
+9
-1
No files found.
src/components/exam/paperfolder-form.vue
View file @
4db7b3a9
...
...
@@ -30,6 +30,10 @@
saveObj
:
{
type
:
Object
,
default
:
null
},
FaParentId
:
{
type
:
Number
,
default
:
null
}
},
data
()
{
...
...
@@ -41,13 +45,14 @@
PaperType
:
1
,
//试卷类型(1-文件夹,2-试卷)
ParentId
:
0
,
//上级文件夹编号
},
saveLoading
:
false
saveLoading
:
false
}
},
created
()
{
},
mounted
()
{
this
.
initObj
()
},
methods
:
{
...
...
@@ -67,24 +72,31 @@
this
.
persistent
=
false
},
setPaperFolderInfo
()
{
this
.
saveLoading
=
true
savePaperFolderInfo
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
this
.
$refs
.
PaperName
.
validate
();
if
(
!
this
.
$refs
.
PaperName
.
hasError
)
{
this
.
saveLoading
=
true
;
if
(
this
.
FaParentId
)
{
this
.
objOption
.
ParentId
=
this
.
FaParentId
;
}
savePaperFolderInfo
(
this
.
objOption
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'数据保存成功!'
,
position
:
'top'
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
this
.
$emit
(
"success"
)
this
.
closeSaveForm
()
}).
catch
(()
=>
{
this
.
saveLoading
=
false
})
}
},
},
}
</
script
>
<
style
>
</
style
>
\ No newline at end of file
</
style
>
src/pages/exam/examPaper.vue
View file @
4db7b3a9
...
...
@@ -215,7 +215,7 @@
<q-pagination
class=
"full-width justify-end"
v-model=
"msg.pageIndex"
color=
"primary"
:max=
"pageCount"
:input=
"true"
@
input=
"changePage"
/>
</div>
<paperfolderForm
v-if=
"isShowExamFolder"
:saveObj=
"examObj"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
<paperfolderForm
v-if=
"isShowExamFolder"
:saveObj=
"examObj"
:FaParentId=
"msg.ParentId"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</paperfolderForm>
<movefolderForm
v-if=
"isShowMoveFolder"
:saveObj=
"examObj"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</movefolderForm>
...
...
@@ -254,7 +254,7 @@
isShowExamFolder
:
false
,
//是否显示新增文件夹
isShowMoveFolder
:
false
,
//是否显示
examObj
:
{},
//弹窗对象
navList
:
[]
,
//导航列表
navList
:
[]
//导航列表
}
},
created
()
{
...
...
@@ -269,7 +269,9 @@
},
//创建试卷
CreatePaper
()
{
this
.
OpenNewUrl
(
'/exam/paperCreate'
,
{})
this
.
OpenNewUrl
(
'/exam/paperCreate'
,
{
ToParentId
:
this
.
msg
.
ParentId
})
},
//翻页
changePage
(
val
)
{
...
...
@@ -307,7 +309,8 @@
PaperId
=
item
.
PaperId
}
this
.
OpenNewUrl
(
'/exam/paperEdit'
,
{
Id
:
PaperId
Id
:
PaperId
,
ToParentId
:
this
.
msg
.
ParentId
})
},
//新增修改文件夹
...
...
src/pages/exam/paperCreate.vue
View file @
4db7b3a9
...
...
@@ -102,9 +102,16 @@
<div
class=
"row"
>
<q-select
filled
option-value=
"QId"
option-label=
"Name"
:options=
"questionTypeList"
emit-value
map-options
label=
"更多题型"
class=
"col-6 q-pr-lg"
use-input
clearable
v-model=
"MoreQuestionTypeId"
@
input=
"changeQuestion"
/>
<q-checkbox
v-model=
"templateMsg.IsSaveTemplate"
label=
"同时保存为组卷模板"
/>
<div
class=
"row col-6"
style=
"align-items:center;"
>
<div
class=
"col-6"
>
<q-radio
v-model=
"templateMsg.IsOpen"
:val=
"1"
label=
"私有"
/>
<q-radio
v-model=
"templateMsg.IsOpen"
:val=
"2"
label=
"公开"
/>
</div>
<div
class=
"col-6"
>
<q-checkbox
v-model=
"templateMsg.IsSaveTemplate"
label=
"同时保存为组卷模板"
/>
</div>
</div>
</div>
<br
/>
<div
class=
"row"
>
<q-btn
color=
"accent"
size=
"sm"
@
click=
"setPaperTemplate"
class=
"q-mr-md"
label=
"保存"
:loading=
"saveLoading"
/>
...
...
@@ -150,6 +157,8 @@
TemplateData
:
[],
TemplateBankIds
:
""
,
IsSaveTemplate
:
false
,
ParentId
:
0
,
IsOpen
:
1
//(1-私有,2-开放)
},
ShowBankName
:
""
,
//显示题库名称
BankList
:
[],
...
...
@@ -160,6 +169,9 @@
}
},
created
()
{
if
(
this
.
$route
.
query
.
ToParentId
){
this
.
templateMsg
.
ParentId
=
parseInt
(
this
.
$route
.
query
.
ToParentId
);
}
this
.
getQuestionType
();
this
.
getDifficultyType
();
},
...
...
src/pages/exam/paperEdit.vue
View file @
4db7b3a9
...
...
@@ -233,6 +233,10 @@
<q-select
filled
option-value=
"Id"
option-label=
"Name"
:options=
"questionDifficultyTypeList"
emit-value
map-options
label=
"难度"
use-input
clearable
v-model=
"DataObj.DifficultyType"
/>
</div>
<div
style=
"margin:8px 0 0 20px"
>
<q-radio
v-model=
"DataObj.IsOpen"
:val=
"1"
label=
"私有"
/>
<q-radio
v-model=
"DataObj.IsOpen"
:val=
"2"
label=
"公开"
/>
</div>
</div>
<div
style=
"width:20%;text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"预览"
/>
...
...
@@ -503,6 +507,7 @@
PaperType
:
2
,
//试卷类型(1-文件夹,2-试卷)
ParentId
:
0
,
//父节点编号,
GroupList
:
[],
//试卷答题分类
IsOpen
:
1
//(1-私有,2-开放)
},
//点击问题对象
ChooseItem
:
null
,
...
...
@@ -525,7 +530,10 @@
},
created
()
{
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
Id
)
{
this
.
msg
.
PaperId
=
decodeURI
(
this
.
$route
.
query
.
Id
)
this
.
msg
.
PaperId
=
decodeURI
(
this
.
$route
.
query
.
Id
);
}
if
(
this
.
$route
.
query
&&
this
.
$route
.
query
.
ToParentId
){
this
.
DataObj
.
ParentId
=
parseInt
(
this
.
$route
.
query
.
ToParentId
);
}
this
.
getQuestionType
();
this
.
getDifficultyType
();
...
...
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