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
707b2169
Commit
707b2169
authored
Aug 23, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a288c96a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
76 additions
and
48 deletions
+76
-48
movefolder-form.vue
src/components/exam/movefolder-form.vue
+18
-9
examPaper.vue
src/pages/exam/examPaper.vue
+57
-38
paperEdit.vue
src/pages/exam/paperEdit.vue
+1
-1
No files found.
src/components/exam/movefolder-form.vue
View file @
707b2169
...
...
@@ -23,15 +23,17 @@
.treeDiv
.el-tree-node__content
{
height
:
auto
;
}
.Move_PaperName
{
.Move_PaperName
{
display
:
inline-block
;
width
:
300px
;
width
:
300px
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
position
:
relative
;
top
:
4px
;
top
:
4px
;
}
</
style
>
<!--移动到文件夹-->
<
template
>
...
...
@@ -88,6 +90,10 @@
saveObj
:
{
type
:
Object
,
default
:
null
},
Ids
:
{
type
:
String
,
default
:
''
}
},
data
()
{
...
...
@@ -108,7 +114,7 @@
dataList
:
[],
//数据列表
//移动文件夹参数
moveMsg
:
{
PaperId
:
0
,
PaperId
s
:
0
,
ParentId
:
0
,
},
//选中的文件夹
...
...
@@ -117,7 +123,10 @@
},
created
()
{
if
(
this
.
saveObj
&&
this
.
saveObj
.
PaperId
)
{
this
.
moveMsg
.
PaperId
=
this
.
saveObj
.
PaperId
;
this
.
moveMsg
.
PaperIds
=
this
.
saveObj
.
PaperId
;
}
if
(
this
.
Ids
)
{
this
.
moveMsg
.
PaperIds
=
this
.
Ids
;
}
},
mounted
()
{
...
...
@@ -146,10 +155,10 @@
//同级目录
if
(
type
==
1
)
{
//选择了父级
if
(
this
.
checkFolder
)
{
if
(
this
.
checkFolder
)
{
this
.
folderMsg
.
ParentId
=
this
.
checkFolder
.
ParentId
;
this
.
checkFolder
.
ChildList
.
push
(
obj
);
}
else
{
}
else
{
//直接点击不选父级
this
.
folderMsg
.
ParentId
=
0
;
this
.
dataList
.
push
(
obj
);
...
...
@@ -214,7 +223,7 @@
return
}
this
.
saveLoading
=
true
;
this
.
moveMsg
.
ParentId
=
this
.
checkFolder
.
PaperId
;
this
.
moveMsg
.
ParentId
=
this
.
checkFolder
.
PaperId
;
movePaperInfo
(
this
.
moveMsg
).
then
(
res
=>
{
this
.
saveLoading
=
false
this
.
$q
.
notify
({
...
...
src/pages/exam/examPaper.vue
View file @
707b2169
...
...
@@ -70,14 +70,15 @@
<div
class=
"col-3"
>
<q-input
@
change=
"getList"
clearable
filled
v-model=
"msg.PaperName"
@
clear=
"getList"
maxlength=
"20"
label=
"输入试卷名称、组卷人查找"
/>
<div
style=
"margin-top:15px;"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"movePaperFile()"
label=
"移动到"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"删除
"
/>
</div>
<div
style=
"margin-top:15px;"
>
<q-btn
v-if=
"multipleSelection&&multipleSelection.length>0"
color=
"accent"
size=
"sm"
class=
"q-mr-md"
@
click=
"movePaperFile()"
label=
"移动到"
/>
<q-btn
v-if=
"multipleSelection&&multipleSelection.length>0"
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"删除"
@
click=
"batchDelete()
"
/>
</div>
</div>
</div>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
size=
"sm"
v-if=
"IsCreateFolder"
class=
"q-mr-md"
label=
"新增文件夹"
@
click=
"showExamFolder(null)"
/>
<q-btn
color=
"accent"
size=
"sm"
v-if=
"IsCreateFolder"
class=
"q-mr-md"
label=
"新增文件夹"
@
click=
"showExamFolder(null)"
/>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"新增试卷"
v-if=
"IsCreatePaper"
style=
"margin-left:10px;"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"CreatePaper()"
>
...
...
@@ -105,9 +106,7 @@
</
template
>
</div>
<el-table
:data=
"dataList"
v-loading=
"loading"
ref=
"multipleTable"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"PaperName"
label=
"文件夹/试卷"
width=
"300"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -182,15 +181,16 @@
<
template
slot-scope=
"scope"
>
<template
v-if=
"scope.row.PaperType==1"
>
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400"
@
click=
"showExamFolder(scope.row)"
label=
"重命名"
/>
label=
"重命名"
v-if=
"currentUserInfo.Id==scope.row.CreateBy"
/>
</
template
>
<
template
v-if=
"scope.row.PaperType==2"
>
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400"
@
click=
"goExameEdit(scope.row)"
label=
"编辑
"
/>
<q-btn
flat
size=
"xs"
color=
"primary"
style=
"font-weight:400"
@
click=
"goExameEdit(scope.row)"
label=
"编辑"
v-if=
"currentUserInfo.Id==scope.row.CreateBy
"
/>
</
template
>
<q-btn-dropdown
flat
size=
"xs"
color=
"dark"
label=
"更多"
style=
"margin-left: 10px"
>
<q-list>
<q-item
clickable
v-close-popup
@
click=
"publishExam(scope.row)"
v-if=
"scope.row.PaperType==2"
>
<q-item
clickable
v-close-popup
@
click=
"publishExam(scope.row)"
v-if=
"scope.row.PaperType==2 &¤tUserInfo.Id==scope.row.CreateBy"
>
<q-item-section>
<q-item-label>
发布考试
</q-item-label>
</q-item-section>
...
...
@@ -200,7 +200,8 @@
<q-item-label>
详情
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"movePaperInfo(scope.row)"
>
<q-item
clickable
v-close-popup
@
click=
"movePaperInfo(scope.row)"
v-if=
"currentUserInfo.Id==scope.row.CreateBy"
>
<q-item-section>
<q-item-label>
移动到
</q-item-label>
</q-item-section>
...
...
@@ -210,7 +211,8 @@
<q-item-label>
复制
</q-item-label>
</q-item-section>
</q-item>
<q-item
clickable
v-close-popup
@
click=
"deletePaperInfo(scope.row)"
>
<q-item
clickable
v-close-popup
@
click=
"deletePaperInfo(scope.row)"
v-if=
"currentUserInfo.Id==scope.row.CreateBy"
>
<q-item-section>
<q-item-label>
删除
</q-item-label>
</q-item-section>
...
...
@@ -223,9 +225,11 @@
<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"
:FaParentId=
"msg.ParentId"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
<paperfolderForm
v-if=
"isShowExamFolder"
:saveObj=
"examObj"
:FaParentId=
"msg.ParentId"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</paperfolderForm>
<movefolderForm
v-if=
"isShowMoveFolder"
:saveObj=
"examObj"
:Ids=
"MoveIds"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
<movefolderForm
v-if=
"isShowMoveFolder"
:saveObj=
"examObj"
:Ids=
"MoveIds"
@
close=
"closeExamForm"
@
success=
"refreshPage"
>
</movefolderForm>
</div>
</template>
...
...
@@ -263,19 +267,21 @@
isShowMoveFolder
:
false
,
//是否显示
examObj
:
{},
//弹窗对象
navList
:
[],
//导航列表
IsCreateFolder
:
false
,
//是否试卷创建文件夹权限
IsCreatePaper
:
false
,
//是否创建试卷权限
IsCreateFolder
:
false
,
//是否试卷创建文件夹权限
IsCreatePaper
:
false
,
//是否创建试卷权限
multipleSelection
:
[],
MoveIds
:
''
MoveIds
:
''
,
currentUserInfo
:
{},
//当前登录用户
}
},
created
()
{
let
userinfo
=
this
.
getLocalStorage
();
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"Paper_CreateManager"
){
//判断是否试卷创建文件夹权限
this
.
currentUserInfo
=
userinfo
;
userinfo
.
ActionMenuList
.
map
(
x
=>
{
//判断权限
if
(
x
.
FunctionCode
==
"Paper_CreateManager"
)
{
//判断是否试卷创建文件夹权限
this
.
IsCreateFolder
=
true
;
}
if
(
x
.
FunctionCode
==
"Paper_CreatePaper"
){
//判断是否创建
if
(
x
.
FunctionCode
==
"Paper_CreatePaper"
)
{
//判断是否创建
this
.
IsCreatePaper
=
true
;
}
})
...
...
@@ -286,26 +292,26 @@
},
methods
:
{
//全选
handleSelectionChange
(
val
){
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
var
myArray
=
[];
if
(
this
.
multipleSelection
.
length
>
0
)
{
this
.
multipleSelection
.
forEach
(
x
=>
{
var
myArray
=
[];
if
(
this
.
multipleSelection
.
length
>
0
)
{
this
.
multipleSelection
.
forEach
(
x
=>
{
myArray
.
push
(
x
.
PaperId
);
})
this
.
MoveIds
=
myArray
.
toString
();
}
},
//移动文件
movePaperFile
(){
if
(
this
.
multipleSelection
.
length
==
0
)
{
movePaperFile
()
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请选择文件夹`
})
return
}
else
{
return
}
else
{
this
.
isShowMoveFolder
=
true
;
}
},
...
...
@@ -315,7 +321,7 @@
//创建试卷
CreatePaper
()
{
this
.
OpenNewUrl
(
'/exam/paperCreate'
,
{
ToParentId
:
this
.
msg
.
ParentId
ToParentId
:
this
.
msg
.
ParentId
})
},
//翻页
...
...
@@ -349,14 +355,15 @@
},
//点击编辑 跳转
goExameEdit
(
item
)
{
let
PaperId
=
0
;
var
obj
=
{
Id
:
0
,
ToParentId
:
this
.
msg
.
ParentId
}
if
(
item
)
{
PaperId
=
item
.
PaperId
obj
.
Id
=
item
.
PaperId
;
obj
.
ToParentId
=
item
.
ParentId
;
}
this
.
OpenNewUrl
(
'/exam/paperEdit'
,
{
Id
:
PaperId
,
ToParentId
:
this
.
msg
.
ParentId
})
this
.
OpenNewUrl
(
'/exam/paperEdit'
,
obj
)
},
//新增修改文件夹
showExamFolder
(
obj
)
{
...
...
@@ -421,6 +428,14 @@
});
})
},
//批量删除
batchDelete
()
{
var
msg
=
{
PaperIds
:
this
.
MoveIds
}
var
message
=
"是否要删除选中的文件信息"
;
this
.
deletePaperCommon
(
msg
,
message
);
},
//删除
deletePaperInfo
(
item
)
{
var
msg
=
{
...
...
@@ -432,9 +447,12 @@
}
else
{
message
=
"是否要删除【"
+
item
.
PaperName
+
"】试卷?"
}
this
.
deletePaperCommon
(
msg
,
message
);
},
deletePaperCommon
(
msg
,
tipMsg
)
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
message
,
message
:
tipMsg
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
...
...
@@ -454,6 +472,7 @@
});
})
}
}
}
...
...
src/pages/exam/paperEdit.vue
View file @
707b2169
...
...
@@ -239,7 +239,7 @@
</div>
</div>
<div
style=
"width:20%;text-align:right;"
>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"预览"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"预览"
style=
"display:none;"
/>
<q-btn
color=
"accent"
size=
"sm"
class=
"q-mr-md"
label=
"保存并返回"
:loading=
"savePaperLoading"
@
click=
"SavePaper()"
/>
</div>
...
...
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