|
@@ -25,6 +25,8 @@
|
|
|
<div class="evaluation-detail-bar">
|
|
|
<span :class="currentBraIndex == 0 ? 'evalustion-bar-item evalustion-bar-item-active':'evalustion-bar-item'" @click="selectBar(0)">评测信息</span>
|
|
|
<span :class="currentBraIndex == 1 ? 'evalustion-bar-item evalustion-bar-item-active':'evalustion-bar-item'" @click="selectBar(1)">活动数据</span>
|
|
|
+ <span class="edit-evaluation"><Icon type="ios-create-outline" size="20"/>编辑信息</span>
|
|
|
+ <span class="edit-evaluation"><Icon type="ios-send" size="20"/>发布评测</span>
|
|
|
</div>
|
|
|
<div class="evaluation-base-info">
|
|
|
<div class="evalustion-base-attr drak-iview-input dark-iview-select">
|
|
@@ -60,21 +62,75 @@
|
|
|
<span>测试科目</span>
|
|
|
<span v-if="examPaperList.length > 0" v-for="(item,index) in examPaperList" :class="index == currentSubjectIndex ? 'subject-item subject-item-active':'subject-item'" @click="selectSubject(index)">
|
|
|
{{jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode).periodName}}
|
|
|
- <span style="margin:0px 5px;">·</span>
|
|
|
- {{item.getSubjectName($store.state.schoolBaseInfo.schoolBaseInfo, item.subjectCode)}}
|
|
|
+ <span style="margin:0px 2px;">·</span>
|
|
|
+ {{jsFn.getSubjectName(jsFn.getPeriod($store.state.schoolBaseInfo.schoolBaseInfo, item.periodCode), item.subjectCode)}}
|
|
|
</span>
|
|
|
</div>
|
|
|
+ <div class="test-paper-detail">
|
|
|
+ <vuescroll>
|
|
|
+ <div class="test-paper-info" v-if="examPaperList.length > 0">
|
|
|
+ <h3 style="text-align:center;margin-bottom:15px;">{{evaluationList[avtiveEvaluationIndex].name}}<span style="color:aqua;">{{ ' (' + jsFn.getSubjectName($store.state.schoolBaseInfo.schoolBaseInfo, examPaperList[currentSubjectIndex].subjectCode)+ ')'}}</span></h3>
|
|
|
+ <Row class="dark-iview-inputnumber">
|
|
|
+ <Col :xs="24" :sm="24" :md="12" :lg="6">
|
|
|
+ <span>总分:</span>
|
|
|
+ <InputNumber :max="1000" :min="1" v-model="evaluationList[avtiveEvaluationIndex].score" size="small"></InputNumber>
|
|
|
+ </Col>
|
|
|
+ <Col :xs="24" :sm="24" :md="12" :lg="6">
|
|
|
+ <span>整体难度:</span>
|
|
|
+ <span>0.6</span>
|
|
|
+ </Col>
|
|
|
+ <Col :xs="24" :sm="24" :md="12" :lg="6">
|
|
|
+ <span>题量:</span>
|
|
|
+ <span>{{examPaperList[currentSubjectIndex].item.length}}</span>
|
|
|
+ </Col>
|
|
|
+ </Row>
|
|
|
+ </div>
|
|
|
+ <div class="question-type-scope" v-if="groupQuestion.Single != undefined">
|
|
|
+ <span class="question-type-count">{{getOrder('Single')}}单选题(共{{groupQuestion.Single.length}}题)</span>
|
|
|
+ <QuestionList :questions="groupQuestion.Single" :config="questionConfig"></QuestionList>
|
|
|
+ </div>
|
|
|
+ <div class="question-type-scope" v-if="groupQuestion.Multiple != undefined">
|
|
|
+ <span class="question-type-count">{{getOrder('Multiple')}}多选题(共{{groupQuestion.Multiple.length}}题)</span>
|
|
|
+ <QuestionList :questions="groupQuestion.Multiple" :config="questionConfig"></QuestionList>
|
|
|
+ </div>
|
|
|
+ <div class="question-type-scope" v-if="groupQuestion.Complete != undefined">
|
|
|
+ <span class="question-type-count">{{getOrder('Complete')}}填空题(共{{groupQuestion.Complete.length}}题)</span>
|
|
|
+ <QuestionList :questions="groupQuestion.Complete" :config="questionConfig"></QuestionList>
|
|
|
+ </div>
|
|
|
+ <div class="question-type-scope" v-if="groupQuestion.Judge != undefined">
|
|
|
+ <span class="question-type-count">{{getOrder('Judge')}}判断题(共{{groupQuestion.Judge.length}}题)</span>
|
|
|
+ <QuestionList :questions="groupQuestion.Judge" :config="questionConfig"></QuestionList>
|
|
|
+ </div>
|
|
|
+ <div class="question-type-scope" v-if="groupQuestion.Subjective != undefined">
|
|
|
+ <span class="question-type-count">{{getOrder('Subjective')}}问答题(共{{groupQuestion.Subjective.length}}题)</span>
|
|
|
+ <QuestionList :questions="groupQuestion.Subjective" :config="questionConfig"></QuestionList>
|
|
|
+ </div>
|
|
|
+ <div class="question-type-scope" v-if="groupQuestion.Compose != undefined">
|
|
|
+ <span class="question-type-count">{{getOrder('Compose')}}综合题(共{{groupQuestion.Compose.length}}题)</span>
|
|
|
+ <QuestionList :questions="groupQuestion.Compose" :config="questionConfig"></QuestionList>
|
|
|
+ </div>
|
|
|
+ <NoData v-if="examPaperList.length == 0" style="margin-top:50px;"></NoData>
|
|
|
+ </vuescroll>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+ import QuestionList from '@/components/learnactivity/QuestionList.vue'
|
|
|
+ import NoData from '@/common/NoData.vue'
|
|
|
import jsFn from '@/utils/js-fn.js'
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ QuestionList,
|
|
|
+ NoData
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ questionConfig: {},
|
|
|
jsFn,
|
|
|
+ groupQuestion: {},
|
|
|
currentSubjectIndex:0,
|
|
|
ruleValidate: {
|
|
|
name: [
|
|
@@ -133,6 +189,14 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ selectSubject(index) {
|
|
|
+ this.currentSubjectIndex = index
|
|
|
+ this.groupQuestion = {}
|
|
|
+ let groupResult = jsFn.groupBy(this.examPaperList[this.currentSubjectIndex].item, 'type')
|
|
|
+ for (let i = 0; i < groupResult.length; i++) {
|
|
|
+ this.groupQuestion[groupResult[i][0].type] = groupResult[i]
|
|
|
+ }
|
|
|
+ },
|
|
|
getDate() {
|
|
|
|
|
|
},
|
|
@@ -170,12 +234,21 @@
|
|
|
},
|
|
|
findExamPaper() {
|
|
|
let requestData = {
|
|
|
- examCode: this.evaluationList[this.avtiveEvaluationIndex].examCode
|
|
|
+ scopeCode: this.evaluationList[this.avtiveEvaluationIndex].id
|
|
|
}
|
|
|
this.$api.learnActivity.FindExamPaper(requestData).then(
|
|
|
res => {
|
|
|
if (res.error == null) {
|
|
|
this.examPaperList = res.result.data
|
|
|
+ if (this.examPaperList.length > 0) {
|
|
|
+ let groupResult = jsFn.groupBy(this.examPaperList[0].item, 'type')
|
|
|
+ for (let i = 0; i < groupResult.length; i++) {
|
|
|
+ this.groupQuestion[groupResult[i][0].type] = groupResult[i]
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.groupQuestion = {}
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
this$Message.error('API ERROR!')
|
|
|
}
|
|
@@ -184,6 +257,82 @@
|
|
|
|
|
|
}
|
|
|
)
|
|
|
+ },
|
|
|
+ checkCount(count) {
|
|
|
+ switch (count) {
|
|
|
+ case 0:
|
|
|
+ return '一、'
|
|
|
+ break
|
|
|
+ case 1:
|
|
|
+ return '二、'
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ return '三、'
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ return '四、'
|
|
|
+ break
|
|
|
+ case 4:
|
|
|
+ return '五、'
|
|
|
+ break
|
|
|
+ case 5:
|
|
|
+ return '六、'
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ return ''
|
|
|
+ break
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getOrder(type) {
|
|
|
+ let count = 0
|
|
|
+ switch (type) {
|
|
|
+ case 'Single':
|
|
|
+ return '一、'
|
|
|
+ break
|
|
|
+ case 'Multiple':
|
|
|
+ if (this.groupQuestion.Single != undefined) {
|
|
|
+ return '二、'
|
|
|
+ } else {
|
|
|
+ return '一、'
|
|
|
+ }
|
|
|
+ break
|
|
|
+ case 'Complete':
|
|
|
+ for (let key in this.groupQuestion) {
|
|
|
+ if (key == 'Single' || key == 'Multiple') {
|
|
|
+ count++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.checkCount(count)
|
|
|
+ break
|
|
|
+ case 'Judge':
|
|
|
+
|
|
|
+ for (let key in this.groupQuestion) {
|
|
|
+ if (key == 'Single' || key == 'Complete' || key == 'Multiple') {
|
|
|
+ count++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.checkCount(count)
|
|
|
+ break
|
|
|
+ case 'Subjective':
|
|
|
+ for (let key in this.groupQuestion) {
|
|
|
+ if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge') {
|
|
|
+ count++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.checkCount(count)
|
|
|
+ break
|
|
|
+ case 'Compose':
|
|
|
+ for (let key in this.groupQuestion) {
|
|
|
+ if (key == 'Single' || key == 'Complete' || key == 'Multiple' || key == 'Judge' || key == 'Subjective') {
|
|
|
+ count++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return this.checkCount(count)
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ return ''
|
|
|
+ break
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|