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
709035d4
Commit
709035d4
authored
Aug 18, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增页面
parent
3e8e28bf
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
193 additions
and
21 deletions
+193
-21
question.js
src/api/question/question.js
+0
-11
index.js
src/api/teacher/index.js
+37
-0
movefolder-form.vue
src/components/exam/movefolder-form.vue
+118
-0
examPaper.vue
src/pages/exam/examPaper.vue
+38
-10
No files found.
src/api/question/question.js
View file @
709035d4
...
...
@@ -292,14 +292,3 @@ export function DeletePaperDetails(data) {
})
}
/**
* 删除试卷、文件夹
* @param {*} data
*/
export
function
deletePaperInfo
(
data
)
{
return
request
({
url
:
'/Exam/DeletePaper'
,
method
:
'post'
,
data
})
}
src/api/teacher/index.js
View file @
709035d4
...
...
@@ -227,3 +227,40 @@ export function deletePaperInfo(data) {
data
})
}
/**
* 复制试卷
* @param {*} data
*/
export
function
copyPaperInfo
(
data
)
{
return
request
({
url
:
'/Exam/CopyPaper'
,
method
:
'post'
,
data
})
}
/**
* 获取文件夹树形结构
* @param {*} data
*/
export
function
queryFolderTree
(
data
)
{
return
request
({
url
:
'/Exam/GetFolderTree'
,
method
:
'post'
,
data
})
}
/**
* 移动到文件夹
* @param {*} data
*/
export
function
movePaperInfo
(
data
)
{
return
request
({
url
:
'/Exam/MovePaper'
,
method
:
'post'
,
data
})
}
\ No newline at end of file
src/components/exam/movefolder-form.vue
0 → 100644
View file @
709035d4
<!--移动到文件夹-->
<
template
>
<q-dialog
v-model=
"persistent"
content-class=
"bg-grey-1"
persistent
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 500px;max-width:500px;"
>
<q-card-section>
<div
class=
"text-h6"
>
移动至 (选择目标目录)
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<div>
<el-tree
:data=
"dataList"
show-checkbox
node-key=
"PaperId"
ref=
"paperFolderTree"
highlight-current
:props=
"defaultProps"
@
check=
"checkChange"
>
</el-tree>
</div>
</q-card-section>
<q-separator
/>
<q-card-actions
align=
"right"
class=
"bg-white"
>
<q-btn
label=
"取消"
flat
color=
"grey-10"
style=
"font-weight:400 !important"
@
click=
"closeSaveForm"
/>
<q-btn
label=
"确认"
color=
"accent"
class=
"q-px-md"
style=
"font-weight:400 !important"
:loading=
"saveLoading"
@
click=
"setMoveFolderInfo"
/>
</q-card-actions>
</q-card>
</q-dialog>
</
template
>
<
script
>
import
{
queryFolderTree
,
movePaperInfo
,
savePaperFolderInfo
}
from
'../../api/teacher/index'
export
default
{
props
:
{
saveObj
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
persistent
:
true
,
objOption
:
{
PaperId
:
0
,
PaperName
:
''
,
//文件夹名称
PaperType
:
1
,
//试卷类型(1-文件夹,2-试卷)
ParentId
:
0
,
//上级文件夹编号
},
saveLoading
:
false
,
defaultProps
:
{
children
:
'ChildList'
,
label
:
'PaperName'
},
dataList
:
[],
//数据列表
//移动文件夹参数
moveMsg
:
{
PaperId
:
0
,
ParentId
:
0
,
},
}
},
created
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
PaperId
)
{
this
.
moveMsg
.
PaperId
=
this
.
saveObj
.
PaperId
;
}
},
mounted
()
{
this
.
initObj
();
},
methods
:
{
//选择改变
checkChange
(
data
)
{
var
labvalojb
=
data
;
//暂存选中节点
this
.
$refs
.
paperFolderTree
.
setCheckedKeys
([]);
//删除所有选中节点
this
.
$refs
.
paperFolderTree
.
setCheckedNodes
([
labvalojb
]);
//选中已选中节点
},
initObj
()
{
queryFolderTree
({}).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
dataList
=
res
.
Data
;
}
})
},
closeSaveForm
()
{
this
.
$emit
(
'close'
)
this
.
persistent
=
false
},
setMoveFolderInfo
()
{
this
.
saveLoading
=
true
;
var
checkArray
=
this
.
$refs
.
paperFolderTree
.
getCheckedNodes
();
if
(
checkArray
!=
null
&&
checkArray
.
length
>
0
)
{
this
.
moveMsg
.
ParentId
=
checkArray
[
0
].
PaperId
;
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择目标文件夹`
})
}
movePaperInfo
(
this
.
moveMsg
).
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
})
},
},
}
</
script
>
<
style
>
</
style
>
src/pages/exam/examPaper.vue
View file @
709035d4
...
...
@@ -167,18 +167,23 @@
</div>
<paperfolderForm
v-if=
"isShowExamFolder"
:saveObj=
"examObj"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</paperfolderForm>
<movefolderForm
v-if=
"isShowMoveFolder"
:saveObj=
"examObj"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</movefolderForm>
</div>
</template>
<
script
>
import
paperfolderForm
from
'../../components/exam/paperfolder-form'
import
movefolderForm
from
'../../components/exam/movefolder-form'
import
{
GetPaperPage
,
deletePaperInfo
deletePaperInfo
,
copyPaperInfo
}
from
'../../api/teacher/index'
;
//获取校区列表
export
default
{
components
:
{
paperfolderForm
paperfolderForm
,
movefolderForm
,
},
meta
:
{
title
:
"考试管理"
...
...
@@ -197,6 +202,7 @@
dataList
:
[],
expandKeys
:
[],
isShowExamFolder
:
false
,
//是否显示新增文件夹
isShowMoveFolder
:
false
,
//是否显示
examObj
:
{},
//弹窗对象
}
},
...
...
@@ -251,6 +257,7 @@
//关闭弹窗
closeExamForm
()
{
this
.
isShowExamFolder
=
false
;
this
.
isShowMoveFolder
=
false
;
},
//发布考试
publishExam
(
item
)
{
...
...
@@ -274,11 +281,36 @@
},
//移动到文件夹
movePaperInfo
(
item
)
{
this
.
examObj
=
item
;
this
.
isShowMoveFolder
=
true
;
},
//复制
//复制
试卷
copyPaperInfo
(
item
)
{
var
msg
=
{
PaperId
:
item
.
PaperId
}
var
message
=
"是否要复制【"
+
item
.
PaperName
+
"】试卷?"
;
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
copyPaperInfo
(
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'操作成功!'
,
position
:
'top'
})
this
.
refreshPage
();
}
});
})
},
//删除
deletePaperInfo
(
item
)
{
...
...
@@ -311,11 +343,7 @@
this
.
refreshPage
();
}
});
}).
onCancel
(()
=>
{
});
})
}
}
}
...
...
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