|
@@ -50,161 +50,185 @@
|
|
|
<Button @click="backToBank" class="btn-back-to-bank" icon="md-arrow-round-back" style="margin-left: 10px">{{ $t('evaluation.newExercise.backToBank')}}</Button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="create-body">
|
|
|
- <div class="filter-wrap">
|
|
|
- <div class="filter-item">
|
|
|
- <span class="filter-title">{{$t('evaluation.filter.grade')}}:</span>
|
|
|
- <RadioGroup v-model="filterGrade" type="button" @on-change="getDfList()">
|
|
|
- <Radio v-for="(item, index) in gradeList" :key="index" :label="index + 1" style="margin-bottom: 5px;">{{ item }}</Radio>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- <div class="filter-item">
|
|
|
- <span class="filter-title">{{$t('evaluation.filter.subject')}}:</span>
|
|
|
- <RadioGroup v-model="filterSubject" type="button" @on-change="getDfList()">
|
|
|
- <Radio v-for="(item, index) in subjectList" :key="index" :label="item.id" style="margin-bottom: 5px;">{{ item.name }}</Radio>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- <div class="filter-item">
|
|
|
- <span class="filter-title">{{$t('evaluation.filter.type')}}:</span>
|
|
|
- <RadioGroup v-model="filterType" type="button" @on-change="getDfList()">
|
|
|
- <Radio label="all" style="margin-bottom: 5px;">全部</Radio>
|
|
|
- <Radio v-for="(item, index) in typeList" :key="index" :label="item.id" style="margin-bottom: 5px;">{{ item.name }}</Radio>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- <div class="filter-item">
|
|
|
- <span class="filter-title">{{$t('evaluation.filter.diff')}}:</span>
|
|
|
- <RadioGroup v-model="filterDiff" type="button" @on-change="getDfList()">
|
|
|
- <Radio label="all" style="margin-bottom: 5px;">全部</Radio>
|
|
|
- <Radio v-for="(item, index) in exersicesDiff" :key="index" :label="index + 1" style="margin-bottom: 5px;">{{ item }}</Radio>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- <div class="filter-item" v-if="$store.state.userInfo.hasSchool">
|
|
|
- <span class="filter-title">{{$t('evaluation.filter.origin')}}:</span>
|
|
|
- <RadioGroup v-model="filterOrigin" type="button" @on-change="getDfList()">
|
|
|
- <Radio label="public" style="margin-bottom: 5px;">公共题库</Radio>
|
|
|
- <Radio label="school" style="margin-bottom: 5px;">学校题库</Radio>
|
|
|
- </RadioGroup>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="bank-action-bar">
|
|
|
- <div class="action-tools">
|
|
|
- <div class="action-tool">
|
|
|
- <Input v-model="searchVal" placeholder="输入关键词搜索试题..." style="width: 300px;" clearable search @on-search="getDfList()"></Input>
|
|
|
- </div>
|
|
|
- <div class="action-tool">
|
|
|
- <Checkbox v-model="isAllOpen" @on-change="onHandleToggle">{{ $t('evaluation.exerciseList.showAllAnswer') }}</Checkbox>
|
|
|
+ <div class="exercise-box">
|
|
|
+ <div class="point-tree">
|
|
|
+ <vuescroll>
|
|
|
+ <div class="filter-wrap">
|
|
|
+ <!-- 根据学段展示对应科目以及年级 -->
|
|
|
+ <div class="filter-item">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.period')}}:</span>
|
|
|
+ <RadioGroup v-model="filterFixedPeriod" type="button" @on-change="getFixedSub">
|
|
|
+ <Radio v-for="(item, index) in fixedGrade" :key="index" :label="item.periodId" style="margin-bottom: 5px;">{{ item.period }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div>
|
|
|
+ <div class="filter-item">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.subject')}}:</span>
|
|
|
+ <RadioGroup v-model="filterSubject" type="button" @on-change="getPointArr()">
|
|
|
+ <Radio v-for="(item, index) in fixedSubjectShow" :key="index" :label="index" style="margin-bottom: 5px;">{{ item.subject }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="action-tools" style="display:flex;align-items: center;">
|
|
|
- <Checkbox v-model="isSelectAll" @on-change="onSelectAll" v-if="($access.can('admin.*||exercise-upd'))">{{ $t('evaluation.choosePageItems') }}</Checkbox>
|
|
|
- <span style="margin-left:20px">
|
|
|
- {{ $t('evaluation.exerciseList.totalTip1') }}
|
|
|
- <span style="font-size: 18px;color: #ff0206;margin: 0 10px;font-weight: bold;">{{ totalNum }}</span>
|
|
|
- {{ $t('evaluation.exerciseList.unit') }}
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-if="!exerciseList.length" class="no-data-text">
|
|
|
- <img src="@/assets/icon/no_data_evaluation.png" width="120" />
|
|
|
- <span style="margin-top: 15px; color: #808080">{{$t('evaluation.noData')}}</span>
|
|
|
+ <el-tree ref="pointTree" class="tree" :data="pointList" :props="defaultProps" node-key="tid" check-on-click-node accordion highlight-current @node-click="handleNodeClick" style="height: 100%"></el-tree>
|
|
|
+ </vuescroll>
|
|
|
</div>
|
|
|
- <div v-else class="content-wrap" ref="mathJaxContainer">
|
|
|
- <div class="exercise-item" v-for="(item, index) of exerciseList" :key="index" @click="onQuestionToggle(index, item.id, $event)">
|
|
|
- <!-- 题干部分 -->
|
|
|
- <div class="item-question">
|
|
|
- <div>
|
|
|
- <div class="item-question-order">{{ pageSize * (pageNum - 1) + index + 1 }} :</div>
|
|
|
- <div class="item-question-text" v-html="item.question"></div>
|
|
|
+ <div class="create-body">
|
|
|
+ <vuescroll>
|
|
|
+ <div class="filter-wrap">
|
|
|
+ <div class="filter-item">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.grade')}}:</span>
|
|
|
+ <RadioGroup v-model="filterGrade" type="button" @on-change="getDfList()">
|
|
|
+ <Radio v-for="(item, index) in gradeListShow" :key="index" :label="item" style="margin-bottom: 5px;">{{ item }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="filter-item">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.subject')}}:</span>
|
|
|
+ <RadioGroup v-model="filterSubject" type="button" @on-change="getDfList()">
|
|
|
+ <Radio v-for="(item, index) in subjectList" :key="index" :label="item.id" style="margin-bottom: 5px;">{{ item.name }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div> -->
|
|
|
+ <div class="filter-item">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.type')}}:</span>
|
|
|
+ <RadioGroup v-model="filterType" type="button" @on-change="getDfList()">
|
|
|
+ <Radio label="all" style="margin-bottom: 5px;">全部</Radio>
|
|
|
+ <Radio v-for="(item, index) in typeList" :key="index" :label="item.id" style="margin-bottom: 5px;">{{ item.name }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div>
|
|
|
+ <div class="filter-item">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.diff')}}:</span>
|
|
|
+ <RadioGroup v-model="filterDiff" type="button" @on-change="getDfList()">
|
|
|
+ <Radio label="all" style="margin-bottom: 5px;">全部</Radio>
|
|
|
+ <Radio v-for="(item, index) in exersicesDiff" :key="index" :label="index + 1" style="margin-bottom: 5px;">{{ item }}</Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ </div>
|
|
|
+ <div class="filter-item" v-if="$store.state.userInfo.hasSchool">
|
|
|
+ <span class="filter-title">{{$t('evaluation.filter.origin')}}:</span>
|
|
|
+ <RadioGroup v-model="filterOrigin" type="button" @on-change="getDfList()">
|
|
|
+ <Radio label="public" style="margin-bottom: 5px;">公共题库</Radio>
|
|
|
+ <Radio label="school" style="margin-bottom: 5px;">学校题库</Radio>
|
|
|
+ </RadioGroup>
|
|
|
</div>
|
|
|
- <span class="item-btn-toggle" style="justify-content: flex-end;">
|
|
|
- <Icon v-if="item.type !== 'compose'" :type="collapseList.indexOf(index) > -1 ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'" />
|
|
|
- </span>
|
|
|
- </div>
|
|
|
- <div class="exercise-item-children" v-if="item.children.length">
|
|
|
- <BaseChild ref="childRef" :children="item.children" inBank></BaseChild>
|
|
|
</div>
|
|
|
- <!-- 选项部分 -->
|
|
|
- <div v-for="(option, optionIndex) in item.option" :key="optionIndex" class="item-options">
|
|
|
- <div class="item-option-content">
|
|
|
- <div class="item-option-order">
|
|
|
- {{ String.fromCharCode(64 + parseInt(optionIndex + 1)) }} :
|
|
|
+ <div class="bank-action-bar">
|
|
|
+ <div class="action-tools">
|
|
|
+ <div class="action-tool">
|
|
|
+ <Input v-model="searchVal" placeholder="输入关键词搜索试题..." style="width: 300px;" clearable search @on-search="getDfList()"></Input>
|
|
|
</div>
|
|
|
- <div class="item-option-text" v-html="option.value"></div>
|
|
|
+ <div class="action-tool">
|
|
|
+ <Checkbox v-model="isAllOpen" @on-change="onHandleToggle">{{ $t('evaluation.exerciseList.showAllAnswer') }}</Checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="action-tools" style="display:flex;align-items: center;">
|
|
|
+ <Checkbox v-model="isSelectAll" @on-change="onSelectAll" v-if="($access.can('admin.*||exercise-upd'))">{{ $t('evaluation.choosePageItems') }}</Checkbox>
|
|
|
+ <span style="margin-left:20px">
|
|
|
+ {{ $t('evaluation.exerciseList.totalTip1') }}
|
|
|
+ <span style="font-size: 18px;color: #ff0206;margin: 0 10px;font-weight: bold;">{{ totalNum }}</span>
|
|
|
+ {{ $t('evaluation.exerciseList.unit') }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <transition name="slide" v-if="item.type !== 'compose'">
|
|
|
- <div v-show="collapseList.indexOf(exerciseList.indexOf(item)) > -1" class="toggle-area">
|
|
|
- <div>
|
|
|
- <!-- 答案展示部分 -->
|
|
|
- <div class="item-explain">
|
|
|
- <span class="explain-title">【{{$t('evaluation.answer')}}】</span>
|
|
|
- <div class="item-explain-details">
|
|
|
- <!-- 问答题答案 -->
|
|
|
- <div v-if="item.type === 'subjective' || item.type === 'complete' || item.type === 'connector' || item.type === 'correct' ">
|
|
|
- <span v-for="(answer, index) in item.answer" :key="index" v-html="item.answer.length ? answer : $t('evaluation.noAnswer')"></span>
|
|
|
- </div>
|
|
|
- <!-- 判断题答案 -->
|
|
|
- <div v-else-if="item.type === 'judge'">
|
|
|
- <span>{{ item.answer.length ? (item.answer[0] === 'A' ? $t('evaluation.isTrue') : $t('evaluation.isFalse')) : $t('utils.noData') }}</span>
|
|
|
- </div>
|
|
|
- <!-- 其余题型答案 -->
|
|
|
- <div v-else>
|
|
|
- <span :class="[ item.type === 'complete' ? 'item-answer-item' : '']" v-for="(answer, index) in item.answer" :key="index">{{ answer }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div v-if="!exerciseList.length" class="no-data-text">
|
|
|
+ <img src="@/assets/icon/no_data_evaluation.png" width="120" />
|
|
|
+ <span style="margin-top: 15px; color: #808080">{{$t('evaluation.noData')}}</span>
|
|
|
+ </div>
|
|
|
+ <div v-else class="content-wrap" ref="mathJaxContainer">
|
|
|
+ <div class="exercise-item" v-for="(item, index) of exerciseList" :key="index" @click="onQuestionToggle(index, item.id, $event)">
|
|
|
+ <!-- 题干部分 -->
|
|
|
+ <div class="item-question">
|
|
|
+ <div>
|
|
|
+ <div class="item-question-order">{{ pageSize * (pageNum - 1) + index + 1 }} :</div>
|
|
|
+ <div class="item-question-text" v-html="item.question"></div>
|
|
|
</div>
|
|
|
- <!-- 解析部分 -->
|
|
|
- <div class="item-explain">
|
|
|
- <span class="explain-title">【{{$t('evaluation.explain')}}】</span>
|
|
|
- <div class="item-explain-details">
|
|
|
- <span v-html="item.explain ||$t('utils.noData')"></span>
|
|
|
+ <span class="item-btn-toggle" style="justify-content: flex-end;">
|
|
|
+ <Icon v-if="item.type !== 'compose'" :type="collapseList.indexOf(index) > -1 ? 'ios-arrow-dropup' : 'ios-arrow-dropdown'" />
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="exercise-item-children" v-if="item.children.length">
|
|
|
+ <BaseChild ref="childRef" :children="item.children" inBank></BaseChild>
|
|
|
+ </div>
|
|
|
+ <!-- 选项部分 -->
|
|
|
+ <div v-for="(option, optionIndex) in item.option" :key="optionIndex" class="item-options">
|
|
|
+ <div class="item-option-content">
|
|
|
+ <div class="item-option-order">
|
|
|
+ {{ String.fromCharCode(64 + parseInt(optionIndex + 1)) }} :
|
|
|
</div>
|
|
|
+ <div class="item-option-text" v-html="option.value"></div>
|
|
|
</div>
|
|
|
- <!-- 知识点部分 -->
|
|
|
- <div class="item-explain">
|
|
|
- <span class="explain-title">【{{$t('evaluation.knowledgePoints')}}】</span>
|
|
|
- <div class="item-explain-details">
|
|
|
- <span v-if="!item.knowledge || !item.knowledge.length">{{ $t('utils.noData') }}</span>
|
|
|
- <div v-else>
|
|
|
- <span v-for="(point, index) in item.knowledge" class="item-point-tag" :key="index">
|
|
|
- {{ point }}
|
|
|
- </span>
|
|
|
+ </div>
|
|
|
+ <transition name="slide" v-if="item.type !== 'compose'">
|
|
|
+ <div v-show="collapseList.indexOf(exerciseList.indexOf(item)) > -1" class="toggle-area">
|
|
|
+ <div>
|
|
|
+ <!-- 答案展示部分 -->
|
|
|
+ <div class="item-explain">
|
|
|
+ <span class="explain-title">【{{$t('evaluation.answer')}}】</span>
|
|
|
+ <div class="item-explain-details">
|
|
|
+ <!-- 问答题答案 -->
|
|
|
+ <div v-if="item.type === 'subjective' || item.type === 'complete' || item.type === 'connector' || item.type === 'correct' ">
|
|
|
+ <span v-for="(answer, index) in item.answer" :key="index" v-html="item.answer.length ? answer : $t('evaluation.noAnswer')"></span>
|
|
|
+ </div>
|
|
|
+ <!-- 判断题答案 -->
|
|
|
+ <div v-else-if="item.type === 'judge'">
|
|
|
+ <span>{{ item.answer.length ? (item.answer[0] === 'A' ? $t('evaluation.isTrue') : $t('evaluation.isFalse')) : $t('utils.noData') }}</span>
|
|
|
+ </div>
|
|
|
+ <!-- 其余题型答案 -->
|
|
|
+ <div v-else>
|
|
|
+ <span :class="[ item.type === 'complete' ? 'item-answer-item' : '']" v-for="(answer, index) in item.answer" :key="index">{{ answer }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 补救资源部分 -->
|
|
|
- <div class="item-explain" v-show="isShowAnswer">
|
|
|
- <span class="explain-title">【{{ $t('evaluation.newExercise.repair') }}】</span>
|
|
|
- <div class="item-explain-details">
|
|
|
- <div v-if="item.repair && item.repair.length" style="display: flex; flex-wrap: wrap;">
|
|
|
- <div class="repair-item" v-for="(link, index) in item.repair" :key="index">
|
|
|
- <img :src="$tools.getFileThum(link.type, link.name)" width="20" />
|
|
|
- <span class="repair-item-link" @click.stop="onRepairLinkClick(link)">{{ link.name }}</span>
|
|
|
+ <!-- 解析部分 -->
|
|
|
+ <div class="item-explain">
|
|
|
+ <span class="explain-title">【{{$t('evaluation.explain')}}】</span>
|
|
|
+ <div class="item-explain-details">
|
|
|
+ <span v-html="item.explain ||$t('utils.noData')"></span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 知识点部分 -->
|
|
|
+ <div class="item-explain">
|
|
|
+ <span class="explain-title">【{{$t('evaluation.knowledgePoints')}}】</span>
|
|
|
+ <div class="item-explain-details">
|
|
|
+ <span v-if="!item.knowledge || !item.knowledge.length">{{ $t('utils.noData') }}</span>
|
|
|
+ <div v-else>
|
|
|
+ <span v-for="(point, index) in item.knowledge" class="item-point-tag" :key="index">
|
|
|
+ {{ point }}
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 补救资源部分 -->
|
|
|
+ <div class="item-explain" v-show="isShowAnswer">
|
|
|
+ <span class="explain-title">【{{ $t('evaluation.newExercise.repair') }}】</span>
|
|
|
+ <div class="item-explain-details">
|
|
|
+ <div v-if="item.repair && item.repair.length" style="display: flex; flex-wrap: wrap;">
|
|
|
+ <div class="repair-item" v-for="(link, index) in item.repair" :key="index">
|
|
|
+ <img :src="$tools.getFileThum(link.type, link.name)" width="20" />
|
|
|
+ <span class="repair-item-link" @click.stop="onRepairLinkClick(link)">{{ link.name }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span v-else>{{ $t('utils.noData') }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <span v-else>{{ $t('utils.noData') }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </transition>
|
|
|
- <!-- 底部题目操作栏 -->
|
|
|
- <div class="item-tools">
|
|
|
- <span class="item-tools-info">{{$t('evaluation.filter.grade')}}:{{ gradeList[parseInt(item.grade) - 1] }}</span>
|
|
|
- <span class="item-tools-info">{{$t('evaluation.filter.subject')}}:{{ item.subject }}</span>
|
|
|
- <span class="item-tools-info">{{$t('evaluation.filter.type')}}:{{ exersicesType[item.type] }}</span>
|
|
|
- <span class="item-tools-info">{{$t('evaluation.filter.diff')}}:{{ exersicesDiff[item.level - 1] }}</span>
|
|
|
+ </transition>
|
|
|
+ <!-- 底部题目操作栏 -->
|
|
|
+ <div class="item-tools">
|
|
|
+ <span class="item-tools-info">{{$t('evaluation.filter.grade')}}:{{ gradeList[parseInt(item.grade) - 1] }}</span>
|
|
|
+ <span class="item-tools-info">{{$t('evaluation.filter.subject')}}:{{ item.subject }}</span>
|
|
|
+ <span class="item-tools-info">{{$t('evaluation.filter.type')}}:{{ exersicesType[item.type] }}</span>
|
|
|
+ <span class="item-tools-info">{{$t('evaluation.filter.diff')}}:{{ exersicesDiff[item.level - 1] }}</span>
|
|
|
|
|
|
- <div class="buttons" style="float:right;display:flex;flex-direction:row-reverse;align-items:center">
|
|
|
- <Button type="info" :style="{backgroundColor: selectedArr.map((i) => i.id).indexOf(item.id) > -1 ? '#bbbbbb' : '#2db7f5'}" @click.stop="handleChoose(item)">
|
|
|
- {{ids.indexOf(item.id) > -1 ? $t('evaluation.removeItem') : $t('evaluation.selectItem')}}
|
|
|
- </Button>
|
|
|
+ <div class="buttons" style="float:right;display:flex;flex-direction:row-reverse;align-items:center">
|
|
|
+ <Button type="info" :style="{backgroundColor: selectedArr.map((i) => i.id).indexOf(item.id) > -1 ? '#bbbbbb' : '#2db7f5'}" @click.stop="handleChoose(item)">
|
|
|
+ {{ids.indexOf(item.id) > -1 ? $t('evaluation.removeItem') : $t('evaluation.selectItem')}}
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ <!-- 底部分页区域 -->
|
|
|
+ <Page :total="totalNum" show-sizer show-total :page-size="pageSize" :current="pageNum" @on-page-size-change="pageSizeChange" @on-change="pageChange" :page-size-opts="[10, 20, 30]" />
|
|
|
+ </vuescroll>
|
|
|
</div>
|
|
|
- <!-- 底部分页区域 -->
|
|
|
- <Page :total="totalNum" show-sizer show-total :page-size="pageSize" :current="pageNum" @on-page-size-change="pageSizeChange" @on-change="pageChange" :page-size-opts="[10, 20, 30]" />
|
|
|
</div>
|
|
|
<Drawer title="已选择题目" width="40" :mask-closable="false" v-model="showQues" class="select-ques">
|
|
|
<!-- <RadioGroup v-model="saveType" @on-change="saveTypeChange">
|
|
@@ -381,6 +405,7 @@ export default {
|
|
|
return {
|
|
|
isLoading: false,
|
|
|
gradeList: ['一年级', '二年级', '三年级', '四年级', '五年级', '六年级', '七年级', '八年级', '九年级', '十年级', '十一年级', '十二年级'],
|
|
|
+ gradeListShow: [],
|
|
|
subjectList: [
|
|
|
{id: '语文', name: '语文'},
|
|
|
{id: '数学', name: '数学'},
|
|
@@ -402,8 +427,8 @@ export default {
|
|
|
exersicesDiff: this.$GLOBAL.EXERCISE_DIFFS(),
|
|
|
exersicesType: this.$GLOBAL.EXERCISE_TYPES(),
|
|
|
exersicesField: this.$GLOBAL.EXERCISE_LEVELS(),
|
|
|
- filterGrade: 1,
|
|
|
- filterSubject: '语文',
|
|
|
+ filterGrade: '一年级',
|
|
|
+ filterSubject: 0,
|
|
|
filterType: 'all',
|
|
|
filterDiff: 'all',
|
|
|
filterOrigin: 'public',
|
|
@@ -449,10 +474,20 @@ export default {
|
|
|
schoolInfo: {},
|
|
|
schGradeList: [], //当前学校的年级
|
|
|
schSubjectList: [], //当前学校的学科
|
|
|
+ fixedGrade: [],
|
|
|
+ fixedSubject: [],
|
|
|
+ fixedSubjectShow: [],
|
|
|
+ filterFixedPeriod: 'primary',
|
|
|
+ pointList: [],
|
|
|
+ defaultProps: {
|
|
|
+ children: 'children',
|
|
|
+ label: 'name'
|
|
|
+ },
|
|
|
+ nodePoint: null,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getDfList()
|
|
|
+ // this.getDfList()
|
|
|
},
|
|
|
computed: {
|
|
|
ids() {
|
|
@@ -478,22 +513,161 @@ export default {
|
|
|
watch: {
|
|
|
},
|
|
|
async mounted () {
|
|
|
+ this.fixedSubject = [
|
|
|
+ {
|
|
|
+ "subject": "语文",
|
|
|
+ "subjectId": "subject_chinese"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "数学",
|
|
|
+ "subjectId": "subject_math"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "英语",
|
|
|
+ "subjectId": "subject_english"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "物理",
|
|
|
+ "subjectId": "subject_physics"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "化学",
|
|
|
+ "subjectId": "subject_chemistry"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "生物",
|
|
|
+ "subjectId": "subject_biology"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "政治",
|
|
|
+ "subjectId": "subject_politics"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "历史",
|
|
|
+ "subjectId": "subject_history"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "subject": "地理",
|
|
|
+ "subjectId": "subject_geography"
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ if(this.isSchool && this.$store.state.user?.schoolProfile?.school_base.period) {
|
|
|
+ let periodArr = ['primary', 'junior', 'senior']
|
|
|
+ this.$store.state.user?.schoolProfile?.school_base.period.forEach(item => {
|
|
|
+ if(periodArr.includes(item.periodType)) {
|
|
|
+ this.fixedGrade.push({
|
|
|
+ period: item.periodType === 'primary' ? '小学' : (item.periodType === 'junior' ? '初中' : '高中'),
|
|
|
+ key: item.periodType === 'primary' ? '1' : (item.periodType === 'junior' ? '2' : '3'),
|
|
|
+ periodId: item.periodType,
|
|
|
+ gradeCount: item.gradeCount
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(!this.fixedGrade.length) {
|
|
|
+ this.$Modal.confirm({
|
|
|
+ content: '学段类型不符合,请设置学段类型(目前支持小学、初中、高中),当前页面将展示默认学段',
|
|
|
+ })
|
|
|
+ this.fixedGrade = [
|
|
|
+ {
|
|
|
+ "period": "小学",
|
|
|
+ "periodId": "primary",
|
|
|
+ gradeCount: 6,
|
|
|
+ key: '1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "period": "初中",
|
|
|
+ "periodId": "junior",
|
|
|
+ gradeCount: 3,
|
|
|
+ key: '2',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "period": "高中",
|
|
|
+ "periodId": "senior",
|
|
|
+ gradeCount: 3,
|
|
|
+ key: '3',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.fixedGrade = [
|
|
|
+ {
|
|
|
+ "period": "小学",
|
|
|
+ "periodId": "primary",
|
|
|
+ gradeCount: 6,
|
|
|
+ key: '1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "period": "初中",
|
|
|
+ "periodId": "junior",
|
|
|
+ gradeCount: 3,
|
|
|
+ key: '2',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "period": "高中",
|
|
|
+ "periodId": "senior",
|
|
|
+ gradeCount: 3,
|
|
|
+ key: '3',
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ this.getFixedSub('primary')
|
|
|
this.schoolInfo = await this.getSchoolBaseInfo()
|
|
|
if(this.$store.state.userInfo.hasSchool) {
|
|
|
this.onPeriodChange(0)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ async getFixedSub(data) {
|
|
|
+ // 个人未加入学校,使用默认小学:1-6年级 初中:7-9九年 高中:10-12年级
|
|
|
+ console.log('111111', data);
|
|
|
+ this.filterFixedPeriod = data
|
|
|
+ this.filterSubject = 0
|
|
|
+ switch (data) {
|
|
|
+ case 'primary':
|
|
|
+ this.fixedSubjectShow = this.fixedSubject.slice(0, 3)
|
|
|
+ this.gradeListShow = this.gradeList.slice(0, this.fixedGrade[0].gradeCount === 5 ? 5 : 6)
|
|
|
+ break
|
|
|
+ case 'junior':
|
|
|
+ this.fixedSubjectShow = this.fixedSubject
|
|
|
+ this.gradeListShow = this.gradeList.slice(this.fixedGrade[0].gradeCount === 5 ? 5 : 6, 9)
|
|
|
+ break
|
|
|
+ case 'senior':
|
|
|
+ this.fixedSubjectShow = this.fixedSubject
|
|
|
+ this.gradeListShow = this.gradeList.slice(9, 12)
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ this.filterGrade = this.gradeListShow[0]
|
|
|
+ this.getPointArr()
|
|
|
+ },
|
|
|
+ async getPointArr() {
|
|
|
+ this.isLoading = true
|
|
|
+ let host = this.$store.state.user.userProfile.osblob_uri
|
|
|
+ let url = `${host}/third/moofen/kp-${this.filterFixedPeriod}-${this.fixedSubjectShow[this.filterSubject].subjectId}.json?${this.$store.state.user.userProfile.osblob_sas}`
|
|
|
+ let jsonInfo = await this.$tools.getFile(url)
|
|
|
+ this.pointList = JSON.parse(jsonInfo)
|
|
|
+ this.nodePoint = `${this.filterFixedPeriod === 'primary' ? '1' : (this.filterFixedPeriod === 'junior' ? '2' : '3')}${this.pointList[0].tid}`
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.pointTree.setCurrentKey(this.pointList[0].tid)
|
|
|
+ })
|
|
|
+ // this.isLoading = false
|
|
|
+ this.getDfList()
|
|
|
+ },
|
|
|
getDfList() {
|
|
|
this.isLoading = true
|
|
|
let param = {
|
|
|
- subject: this.filterSubject,
|
|
|
- grades: this.filterGrade,
|
|
|
+ subject: this.fixedSubjectShow[this.filterSubject].subject,
|
|
|
+ grades: null,
|
|
|
// type: this.filterType,
|
|
|
// difficulty: this.filterDiff,
|
|
|
pageSize: this.pageSize,
|
|
|
currentPage: this.pageNum,
|
|
|
+ // hasKps: '1',
|
|
|
+ // kpIds: []
|
|
|
}
|
|
|
+ param.grades = this.gradeList.findIndex(item => item === this.filterGrade) + 1
|
|
|
+ if(this.pointList.length) param.kpIds = [this.nodePoint]
|
|
|
if(this.filterDiff != 'all') param.difficulty = this.filterDiff
|
|
|
if(this.filterType != 'all') param.type = this.filterType
|
|
|
if(this.searchVal) param.search = this.searchVal
|
|
@@ -740,14 +914,15 @@ export default {
|
|
|
this.$Message.warning('请完善信息')
|
|
|
return
|
|
|
}
|
|
|
- // 弹出框让用户选择学段、年级、学科,以及试卷名称
|
|
|
- if(this.isSchool) {
|
|
|
- this.selectedArr.forEach(item => {
|
|
|
+ this.selectedArr.forEach(item => {
|
|
|
+ if(this.isSchool) {
|
|
|
item.periodId = this.schoolInfo.period[this.selEvalInfo.paperPeriod].id
|
|
|
item.gradeIds = [String(this.selEvalInfo.paperGrade)]
|
|
|
item.subjectId = this.schSubjectList[this.selEvalInfo.paperSubject].id
|
|
|
- })
|
|
|
- }
|
|
|
+ }
|
|
|
+ item.scope = this.isSchool ? 'school' : 'private'
|
|
|
+ item.code = this.isSchool ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
|
|
|
+ })
|
|
|
console.log('开始保存');
|
|
|
// 组成试卷,必要将题目保存在blob
|
|
|
if(this.selEvalInfo.savetype.includes('paper')) {
|
|
@@ -1278,6 +1453,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ handleNodeClick(data) {
|
|
|
+ if(data.id != this.nodePoint) {
|
|
|
+ this.nodePoint = `${this.filterFixedPeriod === 'primary' ? '1' : (this.filterFixedPeriod === 'junior' ? '2' : '3')}${data.tid}`
|
|
|
+ this.getDfList()
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -1334,4 +1515,73 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.point-tree {
|
|
|
+ .el-tree-node__label {
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
+ .el-tree-node__content {
|
|
|
+ height: 35px;
|
|
|
+ padding-left: 0 !important;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.tree /deep/ .el-tree-node {
|
|
|
+ position: relative;
|
|
|
+ padding-left: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree-node__children {
|
|
|
+ padding-left: 16px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree-node :last-child:before {
|
|
|
+ height: 38px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree > .el-tree-node:before {
|
|
|
+ border-left: none;
|
|
|
+}
|
|
|
+
|
|
|
+.tree-container /deep/ .el-tree > .el-tree-node:after {
|
|
|
+ border-top: none;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree-node:before {
|
|
|
+ content: "";
|
|
|
+ left: -4px;
|
|
|
+ position: absolute;
|
|
|
+ right: auto;
|
|
|
+ border-width: 1px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree-node:after {
|
|
|
+ content: "";
|
|
|
+ left: -4px;
|
|
|
+ position: absolute;
|
|
|
+ right: auto;
|
|
|
+ border-width: 1px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree-node:before {
|
|
|
+ border-left: 1px dashed #bebebe;
|
|
|
+ bottom: 0px;
|
|
|
+ height: 100%;
|
|
|
+ top: -20px;
|
|
|
+ width: 1px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .el-tree-node:after {
|
|
|
+ border-top: 1px dashed #bebebe;
|
|
|
+ height: 20px;
|
|
|
+ top: 20px;
|
|
|
+ width: 12px;
|
|
|
+}
|
|
|
+
|
|
|
+.tree /deep/ .ivu-tooltip-popper {
|
|
|
+ font-size: 12px !important;
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|