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
17059d3d
Commit
17059d3d
authored
Jan 11, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
6bff6db5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
233 additions
and
174 deletions
+233
-174
App.vue
src/App.vue
+62
-1
question.js
src/api/question/question.js
+0
-1
questionlist.vue
src/pages/course/questionlist.vue
+171
-172
No files found.
src/App.vue
View file @
17059d3d
...
...
@@ -7,6 +7,7 @@
<
script
>
export
default
{
name
:
"App"
,
mounted
()
{
if
(
navigator
.
userAgent
.
match
(
...
...
@@ -26,27 +27,34 @@ export default {
<
style
>
@import
url("//at.alicdn.com/t/font_2077629_3u1r9gsz178.css")
;
@font-face
{
font-family
:
"din"
;
src
:
url("./assets/font/DIN-Bold.otf")
format
(
"opentype"
);
font-weight
:
normal
;
font-style
:
normal
;
}
.border-radius
{
border-radius
:
5px
;
}
.din
{
font-family
:
din
!important
;
}
.q-scrollarea__thumb
{
z-index
:
999999
!important
;
}
body
{
/* min-width: 1360px !important; */
}
header
{
min-width
:
1360px
;
}
html
,
body
,
#q-app
{
...
...
@@ -58,124 +66,156 @@ body,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
,
"Noto Color Emoji"
;
color
:
#3f4254
;
}
.q-position-engine
{
z-index
:
9999
;
}
.el-date-picker
,
.time-select
{
z-index
:
999999
!important
;
}
.remark-font
{
font-size
:
12px
;
font-family
:
Poppins
,
Helvetica
,
sans-serif
;
font-weight
:
400
;
color
:
#b5b5c3
!important
;
}
.svg-icon.svg-icon-primary
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-primary
)
!important
;
}
.svg-icon.svg-icon-secondary
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-secondary
)
!important
;
}
.svg-icon.svg-icon-grey
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
#ccc
!important
;
}
.svg-icon.svg-icon-warning
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-warning
)
!important
;
}
.svg-icon.svg-icon-negative
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-negative
)
!important
;
}
.svg-icon.svg-icon-accent
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-accent
)
!important
;
}
.svg-icon.svg-icon-dark
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-dark
)
!important
;
}
.svg-icon.svg-icon-orange
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
rgb
(
255
,
152
,
0
)
!important
;
}
.svg-icon.svg-icon-positive
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
"#C9F7F5"
!important
;
}
.svg-icon.svg-icon-white
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
white
!important
;
}
.svg-icon.svg-icon-g-p
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
grey
!important
;
}
.svg-icon.svg-icon-g-p
{
cursor
:
pointer
;
}
.svg-icon.svg-icon-g-p
:hover
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-primary
)
!important
;
}
.svg-icon.svg-icon-b-p
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
#000
!important
;
}
.svg-icon.svg-icon-b-p
{
cursor
:
pointer
;
}
.svg-icon.svg-icon-b-p
:hover
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-primary
)
!important
;
}
.hover-primary
:hover
.svg-icon
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
white
!important
;
}
.hover-primary
:hover
.q-avatar
{
background-color
:
var
(
--q-color-primary
)
!important
;
}
.hover-primary
:hover
{
color
:
var
(
--q-color-primary
)
!important
;
}
.hover-d-p
{
cursor
:
pointer
;
color
:
var
(
--q-color-dark
)
!important
;
}
.hover-d-p
.svg-icon
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-dark
)
!important
;
}
.hover-d-p
:hover
{
color
:
var
(
--q-color-primary
)
!important
;
}
.hover-d-p
:hover
.svg-icon
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-primary
)
!important
;
}
.hover-g-p
{
cursor
:
pointer
;
color
:
#ccc
!important
;
}
.hover-g-p
.svg-icon
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
#ccc
!important
;
}
.hover-g-p
:hover
{
color
:
var
(
--q-color-primary
)
!important
;
}
.hover-g-p
:hover
.svg-icon
g
[
fill
]
{
transition
:
fill
0.3s
ease
;
fill
:
var
(
--q-color-primary
)
!important
;
}
.text-muted
{
color
:
#b5b5c3
!important
;
}
.page-body
{
border-radius
:
8px
;
background
:
#fff
;
...
...
@@ -214,10 +254,12 @@ body,
.micfont
{
font-family
:
perfectFont
!important
;
}
.fixed-right
,
.absolute-right
{
overflow
:
unset
;
}
.dialog-out-close
{
background
:
var
(
--q-color-primary
);
position
:
absolute
!important
;
...
...
@@ -232,56 +274,71 @@ body,
border-bottom-left-radius
:
4px
!important
;
cursor
:
pointer
;
}
.q-dialog__backdrop
{
background
:
rgba
(
0
,
0
,
0
,
0.1
);
}
/***************************************************** Begin 重写ElementUI 抽屉效果 ***************************************************************/
.el-drawer__wrapper
{
top
:
61px
!important
;
}
.v-modal
{
display
:
none
!important
;
}
.el-drawer__wrapper
.drawerTop
{
background
:
none
!important
;
border-bottom
:
1px
solid
#f5f5f5
;
}
.el-drawer__wrapper
.drawerTop
.drawer_Span
{
font-size
:
18px
!important
;
font-weight
:
500
!important
;
font-family
:
perfectFont
!important
;
}
.el-drawer__wrapper
.drawerTop
.icon-guanbi
{
display
:
none
!important
;
}
.el-tabs__item.is-active
{
color
:
var
(
--q-color-primary
)
!important
;
}
.el-tabs__active-bar
{
background-color
:
var
(
--q-color-primary
)
!important
;
}
.page-body
{
padding
:
15px
!important
;
min-height
:
calc
(
100%
-
30px
);
margin
:
15px
!important
;
}
.q-table__top
{
padding
:
0
0
12px
0px
!important
;
}
.q-btn__wrapper
.row
,
.q-btn__wrapper
.column
,
.q-btn__wrapper
.flex
{
flex-wrap
:
nowrap
!important
;
}
.q-toolbar__title
{
flex
:
unset
!important
;
}
button
.bg-accent
{
background
:
linear-gradient
(
90deg
,
#37adf7
,
#2961fe
)
!important
;
}
button
.bg-accent
:active
{
background
:
linear-gradient
(
270deg
,
#37adf7
,
#2961fe
)
!important
;
}
/*.q-avatar__content{
font-family: perfectFont !important;
font-size: 14px !important;
...
...
@@ -309,16 +366,20 @@ button.bg-accent:active {
min-height
:
32px
!important
;
border-radius
:
4px
!important
;
}
.left-menu-box
a
.q-item.q-router-link--active
,
.left-menu-box
.q-item--active
{
background
:
#ecf1ff
!important
;
color
:
var
(
--q-color-primary
)
!important
;
}
.big-dialog
.q-dialog__inner--minimized
>
div
{
.big-dialog
.q-dialog__inner--minimized
>
div
{
max-width
:
unset
!important
;
}
.f12
{
font-size
:
12px
;
}
/***************************************************** End 重写ElementUI 抽屉效果 ***************************************************************/
</
style
>
src/api/question/question.js
View file @
17059d3d
...
...
@@ -325,4 +325,3 @@ export function downLoadBank(data) {
data
})
}
\ No newline at end of file
src/pages/course/questionlist.vue
View file @
17059d3d
<
style
>
.page-content
p
{
margin
:
0
!important
;
}
.quetion_Title
{
background
:
transparent
!important
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
400px
;
.page-content
p
{
margin
:
0
!important
;
}
}
.quetion_Title
{
background
:
transparent
!important
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
width
:
400px
;
}
</
style
>
<
template
>
<div
class=
"page-body"
>
...
...
@@ -74,178 +73,178 @@
</div>
</template>
<
script
>
import
{
queryQuestionBankPage
,
RemoveQuestionBank
,
downLoadBank
}
from
'../../api/question/question'
;
import
{
EduDownLoad
}
from
"../../api/common/common"
;
import
questionbankForm
from
'../../components/question/questionbank-form'
;
export
default
{
meta
:
{
title
:
"题库管理"
},
components
:
{
questionbankForm
},
data
()
{
return
{
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
BankName
:
''
},
loading
:
false
,
isShowQuestionBankForm
:
false
,
questionBankObj
:
null
,
//传入参数
columns
:
[{
name
:
'RowNum'
,
label
:
'编号'
,
field
:
'RowNum'
,
align
:
'left'
},
{
name
:
'BankNo'
,
label
:
'题库序号'
,
field
:
'BankNo'
,
align
:
'left'
,
},
{
name
:
'BankName'
,
label
:
'题库名称'
,
field
:
'BankName'
,
align
:
'left'
,
},
{
name
:
'BankTypeName'
,
label
:
'等级'
,
field
:
'BankTypeName'
,
align
:
'left'
,
},
{
name
:
'CreateByName'
,
label
:
'创建人'
,
field
:
'CreateByName'
,
align
:
'left'
},
{
name
:
'QuestionCount'
,
label
:
'题量'
,
field
:
'QuestionCount'
,
align
:
'left'
},
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
}
],
data
:
[],
}
},
created
()
{},
mounted
()
{
this
.
getQuestionBankPage
();
},
methods
:
{
//下载
downloads
(
item
)
{
let
msg
=
{
BankId
:
item
.
BankId
,
}
this
.
loading
=
true
;
downLoadBank
(
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
let
cApiUrl
=
process
.
env
.
API
.
replace
(
'/api'
,
''
)
+
res
.
Data
;
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
cApiUrl
;
link
.
setAttribute
(
"download"
,
item
.
BankName
+
".zip"
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
}
})
import
{
queryQuestionBankPage
,
RemoveQuestionBank
,
downLoadBank
}
from
'../../api/question/question'
;
import
{
EduDownLoad
}
from
"../../api/common/common"
;
import
questionbankForm
from
'../../components/question/questionbank-form'
;
export
default
{
meta
:
{
title
:
"题库管理"
},
components
:
{
questionbankForm
},
data
()
{
return
{
pageCount
:
0
,
msg
:
{
pageIndex
:
1
,
pageSize
:
12
,
rowsPerPage
:
12
,
BankName
:
''
},
research
()
{
this
.
getQuestionBankPage
();
loading
:
false
,
isShowQuestionBankForm
:
false
,
questionBankObj
:
null
,
//传入参数
columns
:
[{
name
:
'RowNum'
,
label
:
'编号'
,
field
:
'RowNum'
,
align
:
'left'
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionBankPage
()
{
name
:
'BankNo'
,
label
:
'题库序号'
,
field
:
'BankNo'
,
align
:
'left'
,
},
//关闭弹窗
closeQuestionBank
()
{
this
.
isShowQuestionBankForm
=
false
;
{
name
:
'BankName'
,
label
:
'题库名称'
,
field
:
'BankName'
,
align
:
'left'
,
},
//获取题库分页列表
getQuestionBankPage
()
{
this
.
loading
=
true
;
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
})
{
name
:
'BankTypeName'
,
label
:
'等级'
,
field
:
'BankTypeName'
,
align
:
'left'
,
},
//刷新列表
refreshQuestion
()
{
this
.
getQuestionBankPage
();
{
name
:
'CreateByName'
,
label
:
'创建人'
,
field
:
'CreateByName'
,
align
:
'left'
},
//编辑题库
EditQuestion
(
obj
)
{
if
(
obj
)
{
this
.
questionBankObj
=
obj
}
else
{
this
.
questionBankObj
=
null
}
this
.
isShowQuestionBankForm
=
true
{
name
:
'QuestionCount'
,
label
:
'题量'
,
field
:
'QuestionCount'
,
align
:
'left'
},
//删除问题
deleteQuestionBank
(
item
)
{
let
delMsg
=
{
bankId
:
item
.
BankId
,
status
:
1
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该题库?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveQuestionBank
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getQuestionBankPage
();
}
})
}).
onCancel
(()
=>
{
{
name
:
'optioned'
,
label
:
'操作'
,
field
:
'QuestionId'
}
],
data
:
[],
}
},
created
()
{
},
mounted
()
{
this
.
getQuestionBankPage
();
},
methods
:
{
//下载
downloads
(
item
)
{
let
msg
=
{
BankId
:
item
.
BankId
,
}
this
.
loading
=
true
;
downLoadBank
(
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
let
cApiUrl
=
process
.
env
.
API
.
replace
(
'/api'
,
''
)
+
res
.
Data
;
});
},
//跳转至questionlist
goQuestionList
(
item
)
{
var
tempStr
=
'../course/question?BankId='
+
item
.
BankId
;
this
.
$router
.
push
({
path
:
tempStr
});
let
link
=
document
.
createElement
(
'a'
);
link
.
href
=
cApiUrl
;
link
.
setAttribute
(
"download"
,
item
.
BankName
+
".zip"
);
document
.
body
.
appendChild
(
link
);
link
.
click
();
}
})
},
research
()
{
this
.
getQuestionBankPage
();
},
//翻页
changePage
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getQuestionBankPage
()
},
//关闭弹窗
closeQuestionBank
()
{
this
.
isShowQuestionBankForm
=
false
;
},
//获取题库分页列表
getQuestionBankPage
()
{
this
.
loading
=
true
;
queryQuestionBankPage
(
this
.
msg
).
then
(
res
=>
{
this
.
loading
=
false
;
if
(
res
.
Code
==
1
)
{
this
.
data
=
res
.
Data
.
PageData
;
this
.
pageCount
=
res
.
Data
.
PageCount
;
}
})
},
//刷新列表
refreshQuestion
()
{
this
.
getQuestionBankPage
();
},
//编辑题库
EditQuestion
(
obj
)
{
if
(
obj
)
{
this
.
questionBankObj
=
obj
}
else
{
this
.
questionBankObj
=
null
}
this
.
isShowQuestionBankForm
=
true
},
//删除问题
deleteQuestionBank
(
item
)
{
let
delMsg
=
{
bankId
:
item
.
BankId
,
status
:
1
};
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否确定删除该题库?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
RemoveQuestionBank
(
delMsg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
icon
:
'iconfont icon-chenggong'
,
color
:
'accent'
,
timeout
:
2000
,
message
:
'删除成功!'
,
position
:
'top'
})
this
.
getQuestionBankPage
();
}
})
}).
onCancel
(()
=>
{
});
},
//跳转至questionlist
goQuestionList
(
item
)
{
var
tempStr
=
'../course/question?BankId='
+
item
.
BankId
;
this
.
$router
.
push
({
path
:
tempStr
});
}
}
}
</
script
>
<
style
lang=
"sass"
>
...
...
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