|
@@ -2,13 +2,13 @@
|
|
<div class="create-evaluation-container">
|
|
<div class="create-evaluation-container">
|
|
<div class="create-header">
|
|
<div class="create-header">
|
|
<p class="create-header-title" @click="consData">创建评测活动</p>
|
|
<p class="create-header-title" @click="consData">创建评测活动</p>
|
|
- <Button class="btn-save" type="text" :loading="isLoading" ghost icon="ios-albums-outline" @click="saveEvaluation">发布评测</Button>
|
|
|
|
|
|
+ <Button class="btn-save" type="text" :loading="isLoading" ghost icon="ios-albums-outline" @click="saveEvaluation" style="margin-right:30px;">发布评测</Button>
|
|
<Button class="btn-save" type="text" ghost icon="md-arrow-back" @click="confirmToManage">返回上级</Button>
|
|
<Button class="btn-save" type="text" ghost icon="md-arrow-back" @click="confirmToManage">返回上级</Button>
|
|
</div>
|
|
</div>
|
|
<div class="create-body">
|
|
<div class="create-body">
|
|
<div class="evaluation-attr-wrap">
|
|
<div class="evaluation-attr-wrap">
|
|
<p class="wrap-label">基础信息</p>
|
|
<p class="wrap-label">基础信息</p>
|
|
- <div style="width:100%; height:calc(100% - 45px);padding-top:30px;" class="dark-iview-form ivu-select-nochoose">
|
|
|
|
|
|
+ <div style="width:100%; height:calc(100% - 45px);padding-top:30px;" class="dark-iview-form ivu-select-nochoose dark-el-cascader">
|
|
<Form ref="evaluationInfo" :model="evaluationInfo" label-position="top" class="evaluation-attr-form " label-colon :rules="ruleValidate">
|
|
<Form ref="evaluationInfo" :model="evaluationInfo" label-position="top" class="evaluation-attr-form " label-colon :rules="ruleValidate">
|
|
<FormItem label="评测名称" prop="name">
|
|
<FormItem label="评测名称" prop="name">
|
|
<Input v-model="evaluationInfo.name" placeholder="评测名称" @on-change="handlePaperName"></Input>
|
|
<Input v-model="evaluationInfo.name" placeholder="评测名称" @on-change="handlePaperName"></Input>
|
|
@@ -34,9 +34,7 @@
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="施测对象">
|
|
<FormItem label="施测对象">
|
|
- <!--<select-tree v-model="queryVal" multiple :treeData="selectData" @on-select-change="selectChange"></select-tree>-->
|
|
|
|
- <el-cascader size="small" clearable filterable v-model="queryVal" :options="curGrades" :props="props" @change="treeChange" collapse-tags placeholder="请先选择学段" style="width:100%;">
|
|
|
|
- <p slot="empty">暂无数据</p>
|
|
|
|
|
|
+ <el-cascader size="small" :show-all-levels="false" clearable filterable v-model="queryVal" :options="curGrades" :props="props" @change="treeChange" style="width:100%;">
|
|
</el-cascader>
|
|
</el-cascader>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem label="发布方式" prop="publish">
|
|
<FormItem label="发布方式" prop="publish">
|
|
@@ -59,38 +57,36 @@
|
|
<div class="evaluation-question-wrap">
|
|
<div class="evaluation-question-wrap">
|
|
<div class="wrap-label" v-if="mode == 'school'">
|
|
<div class="wrap-label" v-if="mode == 'school'">
|
|
<p>测试科目:</p>
|
|
<p>测试科目:</p>
|
|
- <span v-for="(item,index) in evaluationInfo.paperInfo" :key="index" :class="index == currentSubjectIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
|
|
|
|
|
|
+ <span v-for="(item,index) in evaluationInfo.paperInfo" :key="index" :class="index == curSubIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
|
|
{{item.subjectName}}
|
|
{{item.subjectName}}
|
|
<Icon type="ios-close" size="18" class="delete-subject-btn" @click="deleteSubject(index)" />
|
|
<Icon type="ios-close" size="18" class="delete-subject-btn" @click="deleteSubject(index)" />
|
|
</span>
|
|
</span>
|
|
- <Icon @click="addSubject" type="md-add-circle" title="添加科目" color="white" class="add-subject-icon" size="20" />
|
|
|
|
|
|
+ <Icon @click="addSubject" type="md-add" title="添加科目" class="add-subject-icon"/>
|
|
</div>
|
|
</div>
|
|
<div class="evaluation-question-main">
|
|
<div class="evaluation-question-main">
|
|
<EmptyData :top="0" style="padding-top:100px;" v-if="evaluationInfo.paperInfo.length == 0" textContent="暂无科目,请添加科目"></EmptyData>
|
|
<EmptyData :top="0" style="padding-top:100px;" v-if="evaluationInfo.paperInfo.length == 0" textContent="暂无科目,请添加科目"></EmptyData>
|
|
<div class="create-type-wrap" v-if="evaluationInfo.paperInfo.length > 0 || mode == 'class'" >
|
|
<div class="create-type-wrap" v-if="evaluationInfo.paperInfo.length > 0 || mode == 'class'" >
|
|
<span>创建方式:</span>
|
|
<span>创建方式:</span>
|
|
- <RadioGroup v-model="evaluationInfo.paperInfo[currentSubjectIndex].createType" style="margin-left:25px;" @on-change="setActiveTab">
|
|
|
|
|
|
+ <RadioGroup v-model="evaluationInfo.paperInfo[curSubIndex].createType" style="margin-left:25px;" @on-change="setActiveTab">
|
|
<Radio label="manualPaper">手动挑卷</Radio>
|
|
<Radio label="manualPaper">手动挑卷</Radio>
|
|
<Radio label="import">试卷导入</Radio>
|
|
<Radio label="import">试卷导入</Radio>
|
|
</RadioGroup>
|
|
</RadioGroup>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
-
|
|
|
|
<Tabs v-model="activeTab" type="card" class="question-main-tabs" v-if="evaluationInfo.paperInfo.length > 0 || mode == 'class' " name="createTest">
|
|
<Tabs v-model="activeTab" type="card" class="question-main-tabs" v-if="evaluationInfo.paperInfo.length > 0 || mode == 'class' " name="createTest">
|
|
- <!--<TabPane label="组题条件" name="auto" v-if="evaluationInfo.paperInfo[currentSubjectIndex].createType == 'auto'" :index="1" tab="createTest">
|
|
|
|
- <AutoCreate :subjectCode="evaluationInfo.paperInfo[currentSubjectIndex].subjectCode" :periodCode="evaluationInfo.paperInfo[currentSubjectIndex].periodCode" @goToPreview="goToPreview" @autoQuestions="getAutoQuestions"></AutoCreate>
|
|
|
|
|
|
+ <!--<TabPane label="组题条件" name="auto" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'auto'" :index="1" tab="createTest">
|
|
|
|
+ <AutoCreate :subjectCode="evaluationInfo.paperInfo[curSubIndex].subjectCode" :periodCode="evaluationInfo.paperInfo[curSubIndex].periodCode" @goToPreview="goToPreview" @autoQuestions="getAutoQuestions"></AutoCreate>
|
|
</TabPane>-->
|
|
</TabPane>-->
|
|
- <!--<TabPane label="备选题目" name="manualQuestion" v-if="evaluationInfo.paperInfo[currentSubjectIndex].createType == 'manualQuestion'" :index="2" tab="createTest">
|
|
|
|
|
|
+ <!--<TabPane label="备选题目" name="manualQuestion" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'manualQuestion'" :index="2" tab="createTest">
|
|
<ManualCreate @goToPreview="goToPreview" @selectedQuestion="getSelectedQuestion"></ManualCreate>
|
|
<ManualCreate @goToPreview="goToPreview" @selectedQuestion="getSelectedQuestion"></ManualCreate>
|
|
</TabPane>-->
|
|
</TabPane>-->
|
|
- <TabPane label="备选试卷" name="manualPaper" v-if="evaluationInfo.paperInfo[currentSubjectIndex].createType == 'manualPaper'" :index="3" tab="createTest">
|
|
|
|
- <ManualPaper :periodCode="evaluationInfo.paperInfo[currentSubjectIndex].periodCode" :subjectCode="evaluationInfo.paperInfo[currentSubjectIndex].subjectCode" @selectPaper="selectPaper"></ManualPaper>
|
|
|
|
|
|
+ <TabPane label="备选试卷" name="manualPaper" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'manualPaper'" :index="3" tab="createTest">
|
|
|
|
+ <ManualPaper :periodId="evaluationInfo.period.id" :gradesObj="evaluationInfo.grades" :subjectId="evaluationInfo.paperInfo[curSubIndex].subjectId" @selectPaper="selectPaper"></ManualPaper>
|
|
</TabPane>
|
|
</TabPane>
|
|
- <TabPane label="导入说明" name="import" v-if="evaluationInfo.paperInfo[currentSubjectIndex].createType == 'import'" :index="4" tab="createTest">
|
|
|
|
|
|
+ <TabPane label="导入说明" name="import" v-if="evaluationInfo.paperInfo[curSubIndex].createType == 'import'" :index="4" tab="createTest">
|
|
<ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
|
|
<ImportCreate @importedQuestions="getImportQuestions" @goToPreview="goToPreview"></ImportCreate>
|
|
</TabPane>
|
|
</TabPane>
|
|
<TabPane label="试题预览" name="preview" :index="5" tab="createTest">
|
|
<TabPane label="试题预览" name="preview" :index="5" tab="createTest">
|
|
- <TeacherPreview :testPaper="evaluationInfo.paperInfo[currentSubjectIndex]" :examAnalysisStatus="examAnalysisStatus"></TeacherPreview>
|
|
|
|
|
|
+ <TeacherPreview :testPaper="evaluationInfo.paperInfo[curSubIndex]" :examAnalysisStatus="examAnalysisStatus"></TeacherPreview>
|
|
</TabPane>
|
|
</TabPane>
|
|
<TabPane label="学生作答体验" name="student" :index="6" tab="createTest">
|
|
<TabPane label="学生作答体验" name="student" :index="6" tab="createTest">
|
|
<StudentPreview></StudentPreview>
|
|
<StudentPreview></StudentPreview>
|
|
@@ -114,6 +110,7 @@
|
|
<span>{{subjectItem.name}}</span>
|
|
<span>{{subjectItem.name}}</span>
|
|
</Checkbox>
|
|
</Checkbox>
|
|
</CheckboxGroup>
|
|
</CheckboxGroup>
|
|
|
|
+ <p v-if="!evaluationInfo.period.id" style="color:white; text-align:center;">* 请先选择测试学段</p>
|
|
</Modal>
|
|
</Modal>
|
|
<Modal v-model="goToManageStatus"
|
|
<Modal v-model="goToManageStatus"
|
|
title="管理评测"
|
|
title="管理评测"
|
|
@@ -135,7 +132,6 @@
|
|
<script>
|
|
<script>
|
|
import AutoCreate from './AutoCreate.vue'
|
|
import AutoCreate from './AutoCreate.vue'
|
|
import MultiCascader from './MultiCascader.vue'
|
|
import MultiCascader from './MultiCascader.vue'
|
|
- import SelectTree from './SelectedTree.vue'
|
|
|
|
import ManualCreate from './ManualCreate.vue'
|
|
import ManualCreate from './ManualCreate.vue'
|
|
import ManualPaper from './ManualPaper.vue'
|
|
import ManualPaper from './ManualPaper.vue'
|
|
import ImportCreate from './ImportCreate.vue'
|
|
import ImportCreate from './ImportCreate.vue'
|
|
@@ -150,7 +146,6 @@
|
|
ImportCreate,
|
|
ImportCreate,
|
|
ManualPaper,
|
|
ManualPaper,
|
|
MultiCascader,
|
|
MultiCascader,
|
|
- SelectTree
|
|
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -162,7 +157,6 @@
|
|
lazy: true,
|
|
lazy: true,
|
|
//动态获取当前年级下面的班级数据
|
|
//动态获取当前年级下面的班级数据
|
|
lazyLoad: function (node, resolve) {
|
|
lazyLoad: function (node, resolve) {
|
|
- console.log('node', node)
|
|
|
|
let level = -1
|
|
let level = -1
|
|
if (node) {
|
|
if (node) {
|
|
level = node.level
|
|
level = node.level
|
|
@@ -250,7 +244,7 @@
|
|
},
|
|
},
|
|
deleteIndex: -1,
|
|
deleteIndex: -1,
|
|
activeTab: 'manualPaper',
|
|
activeTab: 'manualPaper',
|
|
- currentSubjectIndex: 0,
|
|
|
|
|
|
+ curSubIndex: 0,
|
|
evaluationInfo: {
|
|
evaluationInfo: {
|
|
name: '',
|
|
name: '',
|
|
targetClassIds: [],
|
|
targetClassIds: [],
|
|
@@ -314,7 +308,6 @@
|
|
},
|
|
},
|
|
//设置考试类型名称
|
|
//设置考试类型名称
|
|
setExamTypeName(data) {
|
|
setExamTypeName(data) {
|
|
- console.log(data)
|
|
|
|
this.evaluationInfo.examType.name = data.label
|
|
this.evaluationInfo.examType.name = data.label
|
|
},
|
|
},
|
|
//设置学段名称
|
|
//设置学段名称
|
|
@@ -372,9 +365,9 @@
|
|
this.confirmPaperStatus = true
|
|
this.confirmPaperStatus = true
|
|
},
|
|
},
|
|
comfirmSelectPaper() {
|
|
comfirmSelectPaper() {
|
|
- this.evaluationInfo.paperInfo[this.currentSubjectIndex] = JSON.parse(JSON.stringify(this.selectedPaper))
|
|
|
|
- this.evaluationInfo.papers[this.currentSubjectIndex] = JSON.parse(JSON.stringify(this.selectedPaperInfo))
|
|
|
|
- this.evaluationInfo.paperInfo[this.currentSubjectIndex].id = undefined
|
|
|
|
|
|
+ this.evaluationInfo.paperInfo[this.curSubIndex] = JSON.parse(JSON.stringify(this.selectedPaper))
|
|
|
|
+ this.evaluationInfo.papers[this.curSubIndex] = JSON.parse(JSON.stringify(this.selectedPaperInfo))
|
|
|
|
+ this.evaluationInfo.paperInfo[this.curSubIndex].id = undefined
|
|
this.goToPreview()
|
|
this.goToPreview()
|
|
},
|
|
},
|
|
|
|
|
|
@@ -395,15 +388,15 @@
|
|
* @param questions
|
|
* @param questions
|
|
*/
|
|
*/
|
|
getImportQuestions(questions) {
|
|
getImportQuestions(questions) {
|
|
- if (this.evaluationInfo.paperInfo[this.currentSubjectIndex].item != undefined) {
|
|
|
|
- this.evaluationInfo.paperInfo[this.currentSubjectIndex].item = [...questions, ...this.evaluationInfo.paperInfo[this.currentSubjectIndex].item]
|
|
|
|
|
|
+ if (this.evaluationInfo.paperInfo[this.curSubIndex].item != undefined) {
|
|
|
|
+ this.evaluationInfo.paperInfo[this.curSubIndex].item = [...questions, ...this.evaluationInfo.paperInfo[this.curSubIndex].item]
|
|
} else {
|
|
} else {
|
|
- this.evaluationInfo.paperInfo[this.currentSubjectIndex].item = [...questions]
|
|
|
|
|
|
+ this.evaluationInfo.paperInfo[this.curSubIndex].item = [...questions]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
goToPreview() {
|
|
goToPreview() {
|
|
this.activeTab = 'preview'
|
|
this.activeTab = 'preview'
|
|
- this.evaluationInfo.paperInfo[this.currentSubjectIndex].createType = 'manualPaper'
|
|
|
|
|
|
+ this.evaluationInfo.paperInfo[this.curSubIndex].createType = 'manualPaper'
|
|
},
|
|
},
|
|
checkIsDisabled(code) {
|
|
checkIsDisabled(code) {
|
|
return this.evaluationInfo.subjectIds.indexOf(code) !== -1
|
|
return this.evaluationInfo.subjectIds.indexOf(code) !== -1
|
|
@@ -424,7 +417,7 @@
|
|
this.evaluationInfo.subjects.splice(this.deleteIndex, 1)
|
|
this.evaluationInfo.subjects.splice(this.deleteIndex, 1)
|
|
this.evaluationInfo.subjectIds.splice(this.deleteIndex, 1)
|
|
this.evaluationInfo.subjectIds.splice(this.deleteIndex, 1)
|
|
this.evaluationInfo.paperInfo.splice(this.deleteIndex, 1)
|
|
this.evaluationInfo.paperInfo.splice(this.deleteIndex, 1)
|
|
- this.currentSubjectIndex = 0
|
|
|
|
|
|
+ this.curSubIndex = 0
|
|
this.deleteIndex = -1
|
|
this.deleteIndex = -1
|
|
this.$Message.success('删除成功!')
|
|
this.$Message.success('删除成功!')
|
|
}
|
|
}
|
|
@@ -475,7 +468,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
selectSubject(index) {
|
|
selectSubject(index) {
|
|
- this.currentSubjectIndex = index
|
|
|
|
|
|
+ this.curSubIndex = index
|
|
this.activeTab = this.evaluationInfo.paperInfo[index].createType
|
|
this.activeTab = this.evaluationInfo.paperInfo[index].createType
|
|
},
|
|
},
|
|
checkData() {
|
|
checkData() {
|
|
@@ -681,7 +674,6 @@
|
|
let res = this.schoolBase.period.filter((item) => {
|
|
let res = this.schoolBase.period.filter((item) => {
|
|
return item.id == this.evaluationInfo.period.id
|
|
return item.id == this.evaluationInfo.period.id
|
|
})
|
|
})
|
|
- console.log('grades', res)
|
|
|
|
if (res.length > 0) {
|
|
if (res.length > 0) {
|
|
return res[0].grades
|
|
return res[0].grades
|
|
} else {
|
|
} else {
|