项目管理更新课程Form页面
This commit is contained in:
parent
28296c7b4f
commit
0d242f5f8a
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<a-card :bordered="false" title="题库管理">
|
||||
<template slot="extra">
|
||||
<a-card :bordered="true" hoverable :title="title">
|
||||
<template v-if="!courseId" slot="extra">
|
||||
<a-button size="small" @click="questionColse">返回</a-button>
|
||||
</template>
|
||||
<div class="questionLeft">
|
||||
|
@ -14,14 +14,14 @@
|
|||
<div class="questionDetail">
|
||||
<br />
|
||||
<div>
|
||||
<a-button type="primary" class="create-button" style="font-size: 15px; margin: 0px 10px 10px 0px" @click="questionSave">新增题目</a-button>
|
||||
<a-button type="primary" class="create-button" style="font-size: 15px; margin: 0px 10px 10px 0px" @click="questionBatch">
|
||||
<a-button v-if="!courseId" type="primary" class="create-button" style="font-size: 15px; margin: 0px 10px 10px 0px" @click="questionSave">新增题目</a-button>
|
||||
<a-button v-if="!courseId" type="primary" class="create-button" style="font-size: 15px; margin: 0px 10px 10px 0px" @click="questionBatch">
|
||||
批量导入
|
||||
</a-button>
|
||||
<a-button type="primary" class="create-button" style="font-size: 15px; margin: 0px 10px 10px 0px" @click="showModal">
|
||||
<a-button v-if="!courseId" type="primary" class="create-button" style="font-size: 15px; margin: 0px 10px 10px 0px" @click="showModal">
|
||||
模板下载
|
||||
</a-button>
|
||||
<a-modal v-model="visible" title="模板下载" cancelText="关闭" :ok-button-props="{ style: { display: 'none' } }">
|
||||
<a-modal v-if="!courseId" v-model="visible" title="模板下载" cancelText="关闭" :ok-button-props="{ style: { display: 'none' } }">
|
||||
<a-button type="primary" class="create-button" style="font-size: 15px; margin:-15px 50px 3px 50px" @click="questionBatchDownloadDemo">示例模板</a-button>
|
||||
<a-button type="primary" class="create-button" style="font-size: 15px; margin:-15px 30px 3px 70px" @click="questionBatchDownload">纯净模板</a-button>
|
||||
</a-modal>
|
||||
|
@ -33,8 +33,8 @@
|
|||
<div class="question">
|
||||
<h1 class="questionName" v-if="quesitonList != null && quesitonList.length != 0">
|
||||
({{ questionDetail.questionTypeName }}){{ questionDetail.questionName }}
|
||||
<span class="edit" @click="edit(questionDetail.id)">编辑</span>
|
||||
<a-popconfirm title="确定要删除此题?" ok-text="确定" cancel-text="取消" @confirm="del(questionDetail.id)">
|
||||
<span v-if="!courseId" class="edit" @click="edit(questionDetail.id)">编辑</span>
|
||||
<a-popconfirm v-if="!courseId" title="确定要删除此题?" ok-text="确定" cancel-text="取消" @confirm="del(questionDetail.id)">
|
||||
<span class="edit">删除</span>
|
||||
</a-popconfirm>
|
||||
</h1>
|
||||
|
@ -85,8 +85,14 @@ import storage from 'store'
|
|||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
props:{
|
||||
courseId:{
|
||||
type: String,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title:"题库管理",
|
||||
quesitonList: [],
|
||||
questionDetail: {},
|
||||
isactive: 1,
|
||||
|
@ -101,7 +107,7 @@ export default {
|
|||
methods: {
|
||||
getQuestion() {
|
||||
// 查询所有题目id列表
|
||||
getQuestionListByCourseId({ id: this.$route.query.id }).then((res) => {
|
||||
getQuestionListByCourseId({ id: this.$route.query.id || this.courseId }).then((res) => {
|
||||
this.quesitonList = res.data
|
||||
|
||||
if (!res.data) return
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<p>课程预览</p>
|
||||
</a-drawer>
|
||||
<a-drawer title="题库预览" placement="right" width="1200" :closable="true" :visible="questionVisible" @close="drawerClose">
|
||||
<p>题库预览</p>
|
||||
<question-list :courseId="selectCourseId"></question-list>
|
||||
</a-drawer>
|
||||
<a-drawer title="必选题设置" placement="right" width="1200" :closable="true" :visible="requiredTopicVisible" @close="drawerClose">
|
||||
<p>必选题设置</p>
|
||||
|
@ -69,12 +69,15 @@
|
|||
import { STable } from '@/components'
|
||||
import ProjectCourseSelect from './ProjectCourseSelect.vue'
|
||||
import { getCourseList, getCourseListByCourseIds } from '@/api/project/projectCourse'
|
||||
import QuestionList from '@/views/course/question/QuestionList.vue'
|
||||
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用
|
||||
components: {
|
||||
STable,
|
||||
QuestionList,
|
||||
ProjectCourseSelect,
|
||||
QuestionList,
|
||||
},
|
||||
props: {
|
||||
projectForm: {
|
||||
|
@ -92,6 +95,7 @@ export default {
|
|||
totalHours: 0, //总课时
|
||||
totalLearnHours: 0, //总学时
|
||||
totalTopicNum: 0, //题目数量
|
||||
selectCourseId: '', //课程id
|
||||
|
||||
courseVisible: false, //课程预览页面显示控制
|
||||
questionVisible: false, //题库预览页面显示控制
|
||||
|
@ -144,7 +148,8 @@ export default {
|
|||
},
|
||||
|
||||
//打开抽屉
|
||||
openVisible(type) {
|
||||
openVisible(type,record) {
|
||||
this.selectCourseId = record.id;
|
||||
if(type === 'course') this.courseVisible = true;
|
||||
else if(type === 'topic') this.requiredTopicVisible = true;
|
||||
else if(type === 'question') this.questionVisible = true;
|
||||
|
|
|
@ -44,12 +44,18 @@
|
|||
</a-row>
|
||||
|
||||
<a-card :bordered="false" title="组卷策略详情">
|
||||
<a-table :columns="columns" :data-source="tableData" bordered :position="{ disabled: false }">
|
||||
<a-table :columns="columns" :data-source="tableData" bordered :position="{ disabled: false }" :pagination="false">
|
||||
<template slot="topicNum" slot-scope="text, record">
|
||||
<a-input-number style="margin: -5px 0" v-model="record.topicNum" />
|
||||
<a-input-number style="margin: -5px 0" v-model="record.topicNum" min="0" :max="record.totalNum" />
|
||||
</template>
|
||||
<template slot="topicScore" slot-scope="text, record">
|
||||
<a-input-number style="margin: -5px 0" v-model="record.topicScore" />
|
||||
<a-input-number style="margin: -5px 0" v-model="record.topicScore" min="0" />
|
||||
</template>
|
||||
<template slot="totalScore" slot-scope="text, record">
|
||||
<p>{{record.topicScore}}</p>
|
||||
</template>
|
||||
<template slot="footer" :style="{ float:left }">
|
||||
<p>总分数:{{form.totalScore}} 分</p>
|
||||
</template>
|
||||
</a-table>
|
||||
</a-card>
|
||||
|
@ -123,7 +129,8 @@ export default {
|
|||
title: '总分',
|
||||
dataIndex: 'totalScore',
|
||||
customRender: (value, row, index) => {
|
||||
return { children: value, attrs: { rowSpan: index == 0 ? 5 : 0 } }
|
||||
if (!row.topicNum || !row.topicScore) return '';
|
||||
return (row.topicNum * row.topicScore) + '分'
|
||||
},
|
||||
},
|
||||
],
|
||||
|
@ -136,6 +143,9 @@ export default {
|
|||
watch: {},
|
||||
// 方法集合
|
||||
methods: {
|
||||
validataScore() {
|
||||
|
||||
},
|
||||
//保存
|
||||
toSave() {
|
||||
this.form.testPaperTactics = this.tableData
|
||||
|
|
Loading…
Reference in New Issue