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
be0f9452
Commit
be0f9452
authored
Jan 22, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
42a9ef08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
37 deletions
+45
-37
question-upload.vue
src/components/question/question-upload.vue
+45
-37
No files found.
src/components/question/question-upload.vue
View file @
be0f9452
...
...
@@ -2,30 +2,21 @@
</
style
>
<
template
>
<q-dialog
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"width: 1400px;min-height:100px;"
>
<q-dialog
style=
"min-width:800px;max-width:1000px;min-height:100px;"
v-model=
"persistent"
persistent
content-class=
"bg-grey-1"
transition-show=
"scale"
transition-hide=
"scale"
>
<q-card
style=
"min-width:800px;max-width:1000px;min-height:100px;"
>
<q-card-section>
<div
class=
"text-h6"
>
{{
importType
==
1
?
'模板导入(EXCEL)'
:
'智能导入(WORD)'
}}
<el-upload
class=
"upload-demo"
action=
""
style=
"display:inline-block;margin-left:80px;"
:accept=
"accept"
:show-file-list=
"false"
:http-request=
"UploadAttachment"
>
<el-upload
class=
"upload-demo"
action=
""
style=
"display:inline-block;margin-left:80px;"
:accept=
"accept"
:
show-file-list=
"false"
:
http-request=
"UploadAttachment"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
<a
style=
"color:blue;font-size:14px;cursor:pointer;float:right;margin-right:5px;text-decoration:none;"
:href=
"downLoadUrl"
:download=
"downLoadName"
>
下载模板文件
</a>
<a
style=
"color:blue;font-size:14px;cursor:pointer;float:right;margin-right:5px;text-decoration:none;"
:
href=
"downLoadUrl"
:
download=
"downLoadName"
>
下载模板文件
</a>
</div>
</q-card-section>
<q-card-section
class=
"q-pt-none scroll"
style=
"max-height: 70vh"
>
<table>
<!--
<thead>
<tr>
<td>
<el-upload
class=
"upload-demo"
action=
""
:accept=
"accept"
:show-file-list=
"false"
:http-request=
"UploadAttachment"
>
<el-button
size=
"small"
type=
"primary"
>
点击上传
</el-button>
</el-upload>
</td>
</tr>
</thead>
-->
<tr>
<td>
<template
v-for=
"(item,index) in questionData"
>
...
...
@@ -37,12 +28,11 @@
<
template
v-else
>
<span
v-html=
"item.Title"
></span>
</
template
>
<a
style=
"cursor:pointer;color:red;"
@
click=
"DeleteQuestion(index)"
>
删除
</a>
</span><br
/>
<!--选择题-->
<
template
v-if=
"item.QuestionTypeKey=='single'||item.QuestionTypeKey=='multiple'||item.QuestionTypeKey=='single-number'"
<
template
v-if=
"item.QuestionTypeKey=='single'||item.QuestionTypeKey=='multiple'||item.QuestionTypeKey=='single-number'"
v-for=
"subItem in item.QuestionContentObj"
>
<span>
{{
subItem
.
Name
}}
.
{{
subItem
.
Content
}}
</span><br
/>
</
template
>
...
...
@@ -57,7 +47,8 @@
<!--阅读理解-->
<
template
v-if=
"item.QuestionTypeKey=='reading-comprehensio'"
>
<template
v-for=
"(subItem,subIndex) in item.QuestionContentObj"
>
<div>
<br
/>
<span>
<template>
<span>
第
{{
subIndex
+
1
}}
小题
{{
subItem
.
SubTitle
}}
</span><br
/>
</
template
>
...
...
@@ -65,10 +56,11 @@
v-for=
"childItem in subItem.SubAnwser"
>
<span>
{{
childItem
.
Name
}}
.
{{
childItem
.
Content
}}
</span><br
/>
</
template
>
</
div
>
</
span
>
<
template
v-if=
"subItem.QuestionKey=='single'||subItem.QuestionKey=='multiple'"
>
<template
v-for=
"childItem in subItem.SubAnwser"
>
<span
v-if=
"childItem.IsAnswer"
>
答案:
{{
childItem
.
Name
}}
</span><br
/>
<span
v-if=
"childItem.IsAnswer"
>
答案:
{{
childItem
.
Name
}}
</span>
<br
v-if=
"childItem.IsAnswer"
/>
</
template
>
</template>
</template>
...
...
@@ -95,7 +87,6 @@
</q-card-actions>
</q-card>
</q-dialog>
</template>
<
script
>
...
...
@@ -213,7 +204,18 @@
},
//删除问题
DeleteQuestion
(
index
)
{
this
.
$q
.
dialog
({
title
:
'提示信息'
,
message
:
'是否要删除此问题?'
,
cancel
:
true
,
persistent
:
true
,
ok
:
"确定"
,
cancel
:
"取消"
,
}).
onOk
(()
=>
{
this
.
questionData
.
splice
(
index
,
1
);
}).
onCancel
(()
=>
{
});
},
//上传文件
UploadAttachment
(
files
)
{
...
...
@@ -245,7 +247,6 @@
this
.
questionData
.
forEach
(
item
=>
{
item
.
CourseId
=
this
.
CourseId
})
}
this
.
saveCourseLoading
=
true
;
saveQuestionBeatch
(
this
.
questionData
).
then
(
res
=>
{
this
.
saveCourseLoading
=
false
...
...
@@ -259,8 +260,15 @@
this
.
$emit
(
"success"
)
this
.
closeCourseForm
()
})
}
else
{
this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`请先上传文件!`
})
}
},
}
}
</
script
>
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