Commit be0f9452 authored by 黄奎's avatar 黄奎

页面修改

parent 42a9ef08
......@@ -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>
&nbsp;<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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment