|
@@ -61,10 +61,9 @@
|
|
|
<div class="test-paper-detail">
|
|
|
<vuescroll ref="test-paper-detail" @handle-scroll="checkBackTop">
|
|
|
<!--试卷题目信息-->
|
|
|
- <TestPaper v-if="evaListShow[curEvaIndex] && evaListShow[curEvaIndex].papers && evaListShow[curEvaIndex].papers[curSubIndex] && evaListShow[curEvaIndex].papers[curSubIndex].item"
|
|
|
- :paper="evaListShow[curEvaIndex].papers[curSubIndex]" style="color:#515a6e;margin-top:-30px;" :isShowTools="false" isExamPaper></TestPaper>
|
|
|
+ <TestPaper v-if="evaListShow[curEvaIndex] && evaListShow[curEvaIndex].papers && evaListShow[curEvaIndex].papers[curSubIndex] && evaListShow[curEvaIndex].papers[curSubIndex].item" :paper="evaListShow[curEvaIndex].papers[curSubIndex]" style="color:#515a6e;margin-top:-30px;" :isShowTools="false" isExamPaper></TestPaper>
|
|
|
<EmptyData v-else style="margin-top:60px;"></EmptyData>
|
|
|
-
|
|
|
+
|
|
|
<!--返回顶部-->
|
|
|
<div class="back-to-top fl-col-center" title="返回顶部" v-if="showBack" @click="handleBackToTop">
|
|
|
<Icon type="ios-arrow-up" />
|
|
@@ -74,358 +73,387 @@
|
|
|
</div>
|
|
|
<!-- 试卷评测打分 -->
|
|
|
<div :class="curBarIndex == 0 ? 'animated fadeIn evaluation-base-info':'evaluation-base-info animated fadeOutRight'" v-show="curBarIndex == 0">
|
|
|
- <Scoring :examInfo="examPaperList"></Scoring>
|
|
|
+ <div class="overview-box" style="display:none;">
|
|
|
+ <div class="count-box">
|
|
|
+ <span class="count-subject-num">1</span>
|
|
|
+ <span class="count-subject-text">
|
|
|
+ <Icon custom="iconfont icon-kecheng" class="count-icon" size="14" style="vertical-align: text-top;" />
|
|
|
+ 学科
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="count-box">
|
|
|
+ <span class="count-subject-num">2</span>
|
|
|
+ <span class="count-subject-text">
|
|
|
+ <Icon custom="iconfont icon-schedule" class="count-icon" size="14" style="vertical-align: text-top;" />
|
|
|
+ 年级
|
|
|
+ </span>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="count-box">
|
|
|
+ <span class="count-subject-num">5</span>
|
|
|
+ <span class="count-subject-text">
|
|
|
+ <Icon custom="iconfont icon-class-self" class="count-icon" />
|
|
|
+ 班级
|
|
|
+ </span>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="count-box">
|
|
|
+ <span class="count-subject-num">752</span>
|
|
|
+ <span class="count-subject-text">
|
|
|
+ <Icon type="ios-people" class="count-icon" />
|
|
|
+ 人数
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="count-box">
|
|
|
+ <span class="count-subject-num">602</span>
|
|
|
+ <span class="count-subject-text">
|
|
|
+ <Icon type="ios-paper" class="count-icon" />
|
|
|
+ 已作答
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <div class="count-box">
|
|
|
+ <span class="count-subject-num">600</span>
|
|
|
+ <span class="count-subject-text">
|
|
|
+ <Icon type="md-star" class="count-icon" />
|
|
|
+ 已评分
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <Scoring :examInfo="examDetaiInfo"></Scoring>
|
|
|
</div>
|
|
|
<Loading :top="200" type="1" style="text-align:center" v-show="isLoading"></Loading>
|
|
|
</div>
|
|
|
</Split>
|
|
|
- <Modal v-model="editEvaluationStatus"
|
|
|
- title="编辑评测"
|
|
|
- @on-ok="confirmEdit">
|
|
|
+ <Modal v-model="editEvaluationStatus" title="编辑评测" @on-ok="confirmEdit">
|
|
|
<p>即将跳转到评测编辑页面?</p>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
- import TestPaper from '@/view/evaluation/index/TestPaper.vue'
|
|
|
- import Scoring from './Scoring.vue'
|
|
|
- export default {
|
|
|
- components: {
|
|
|
- TestPaper,
|
|
|
- Scoring
|
|
|
+import TestPaper from '@/view/evaluation/index/TestPaper.vue'
|
|
|
+import Scoring from './Scoring.vue'
|
|
|
+export default {
|
|
|
+ components: {
|
|
|
+ TestPaper,
|
|
|
+ Scoring
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ split1: 0.2,
|
|
|
+ scope: '',//school 校本 private 个人
|
|
|
+ showBack: false,
|
|
|
+ editEvaluationStatus: false,
|
|
|
+ curSubIndex: 0,
|
|
|
+ curBarIndex: 0,
|
|
|
+ curEvaIndex: 0,
|
|
|
+ evaluationList: [],
|
|
|
+ evaListShow: [],
|
|
|
+ examDetaiInfo: {},
|
|
|
+ targetList: [],
|
|
|
+ evaType: [
|
|
|
+ {
|
|
|
+ value: 'regular',
|
|
|
+ label: '正规考'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'simulation',
|
|
|
+ label: '模拟考'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: 'normal',
|
|
|
+ label: '普通考'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ isLoading: false,
|
|
|
+ filterPeriod: undefined,
|
|
|
+ schoolBase: {
|
|
|
+ period: []
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ dropdownStates(flag) {
|
|
|
+ if (!flag) this.filterByPeriod()
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
- split1:0.2,
|
|
|
- scope:'',//school 校本 private 个人
|
|
|
- showBack: false,
|
|
|
- editEvaluationStatus: false,
|
|
|
- curSubIndex: 0,
|
|
|
- curBarIndex: 0,
|
|
|
- curEvaIndex: 0,
|
|
|
- evaluationList: [],
|
|
|
- evaListShow:[],
|
|
|
- examPaperList: {},
|
|
|
- targetList: [],
|
|
|
- evaType: [
|
|
|
- {
|
|
|
- value: 'regular',
|
|
|
- label: '正规考'
|
|
|
- },
|
|
|
- {
|
|
|
- value: 'simulation',
|
|
|
- label: '模拟考'
|
|
|
+ /**获取type对应的label */
|
|
|
+ getTypeLabel(code) {
|
|
|
+ for (let item of this.evaType) {
|
|
|
+ if (item.value == code) {
|
|
|
+ return item.label
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 查找班级课程下的班级
|
|
|
+ * */
|
|
|
+ findClassroom() {
|
|
|
+ if (this.targetList.length == 0) {
|
|
|
+ let requestData = this.$store.state.userInfo.TEAMModelId
|
|
|
+ this.$api.learnActivity.FindClassroomByTeacherId({
|
|
|
+ code: requestData
|
|
|
+ }).then(
|
|
|
+ res => {
|
|
|
+ if (res.error == null) {
|
|
|
+ this.targetList = res.result.data
|
|
|
+ } else {
|
|
|
+ this.$Message.error('API ERROR!')
|
|
|
+ }
|
|
|
},
|
|
|
- {
|
|
|
- value: 'normal',
|
|
|
- label: '普通考'
|
|
|
+ err => {
|
|
|
+
|
|
|
}
|
|
|
- ],
|
|
|
- isLoading: false,
|
|
|
- filterPeriod: undefined,
|
|
|
- schoolBase: {
|
|
|
- period:[]
|
|
|
- }
|
|
|
+ )
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
- dropdownStates(flag) {
|
|
|
- if (!flag) this.filterByPeriod()
|
|
|
- },
|
|
|
- /**获取type对应的label */
|
|
|
- getTypeLabel(code) {
|
|
|
- for (let item of this.evaType ) {
|
|
|
- if (item.value == code) {
|
|
|
- return item.label
|
|
|
+ /**
|
|
|
+ * 判断是否显示回到顶部按钮
|
|
|
+ * @param vertical
|
|
|
+ * @param horizontal
|
|
|
+ * @param nativeEvent
|
|
|
+ */
|
|
|
+ checkBackTop(vertical, horizontal, nativeEvent) {
|
|
|
+ if (vertical.scrollTop > 100) {
|
|
|
+ this.showBack = true
|
|
|
+ } else {
|
|
|
+ this.showBack = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**vuescroll回到顶部 */
|
|
|
+ handleBackToTop() {
|
|
|
+ this.$refs['test-paper-detail'].scrollTo(
|
|
|
+ {
|
|
|
+ y: '0'
|
|
|
+ },
|
|
|
+ 300
|
|
|
+ )
|
|
|
+ },
|
|
|
+ /**删除评测信息 */
|
|
|
+ deleteEvaluation() {
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: '删除评测',
|
|
|
+ content: `确认删除${this.evaListShow[this.curEvaIndex].name}吗?`,
|
|
|
+ onOk: () => {
|
|
|
+ let params = {
|
|
|
+ id: this.evaListShow[this.curEvaIndex].id,
|
|
|
+ code: this.evaListShow[this.curEvaIndex].code.replace('Exam-', '')
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- /**
|
|
|
- * 查找班级课程下的班级
|
|
|
- * */
|
|
|
- findClassroom() {
|
|
|
- if (this.targetList.length == 0) {
|
|
|
- let requestData = this.$store.state.userInfo.TEAMModelId
|
|
|
- this.$api.learnActivity.FindClassroomByTeacherId({
|
|
|
- code:requestData
|
|
|
- }).then(
|
|
|
+ this.isLoading = true
|
|
|
+ this.$api.learnActivity.DeleteExamInfo(params).then(
|
|
|
res => {
|
|
|
if (res.error == null) {
|
|
|
- this.targetList = res.result.data
|
|
|
+ let index = this.curEvaIndex
|
|
|
+ this.selectEvaluation(0)
|
|
|
+ this.evaListShow.splice(index, 1)
|
|
|
+ this.$Message.success('删除成功!')
|
|
|
} else {
|
|
|
- this.$Message.error('API ERROR!')
|
|
|
+ this.$Message.error('删除失败!')
|
|
|
}
|
|
|
},
|
|
|
err => {
|
|
|
-
|
|
|
+ this.$Message.error('删除失败!')
|
|
|
}
|
|
|
- )
|
|
|
- }
|
|
|
- },
|
|
|
- /**
|
|
|
- * 判断是否显示回到顶部按钮
|
|
|
- * @param vertical
|
|
|
- * @param horizontal
|
|
|
- * @param nativeEvent
|
|
|
- */
|
|
|
- checkBackTop(vertical, horizontal, nativeEvent) {
|
|
|
- if (vertical.scrollTop > 100) {
|
|
|
- this.showBack = true
|
|
|
- } else {
|
|
|
- this.showBack = false
|
|
|
+ ).finally(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.isLoading = false
|
|
|
+ }, 500)
|
|
|
+ })
|
|
|
}
|
|
|
- },
|
|
|
- /**vuescroll回到顶部 */
|
|
|
- handleBackToTop() {
|
|
|
- this.$refs['test-paper-detail'].scrollTo(
|
|
|
- {
|
|
|
- y: '0'
|
|
|
- },
|
|
|
- 300
|
|
|
- )
|
|
|
- },
|
|
|
- /**删除评测信息 */
|
|
|
- deleteEvaluation() {
|
|
|
- this.$Modal.confirm({
|
|
|
- title: '删除评测',
|
|
|
- content: `确认删除${this.evaListShow[this.curEvaIndex].name}吗?`,
|
|
|
- onOk: () => {
|
|
|
- let params = {
|
|
|
- id: this.evaListShow[this.curEvaIndex].id,
|
|
|
- code: this.evaListShow[this.curEvaIndex].code.replace('Exam-','')
|
|
|
- }
|
|
|
- this.isLoading = true
|
|
|
- this.$api.learnActivity.DeleteExamInfo(params).then(
|
|
|
- res => {
|
|
|
- if (res.error == null) {
|
|
|
- let index = this.curEvaIndex
|
|
|
- this.selectEvaluation(0)
|
|
|
- this.evaListShow.splice(index, 1)
|
|
|
- this.$Message.success('删除成功!')
|
|
|
- } else {
|
|
|
- this.$Message.error('删除失败!')
|
|
|
- }
|
|
|
- },
|
|
|
- err => {
|
|
|
- this.$Message.error('删除失败!')
|
|
|
- }
|
|
|
- ).finally(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.isLoading = false
|
|
|
- },500)
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- goToCreate() {
|
|
|
- if (this.$store.state.user.schoolProfile.school_base != undefined) {
|
|
|
- if (this.scope == 'school') {
|
|
|
- this.$router.push({
|
|
|
- name: 'createSchoolEva'
|
|
|
- })
|
|
|
- } else if (this.scope == 'private') {
|
|
|
- this.$router.push({
|
|
|
- name: 'createPrivateEva'
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.$Message.warning("此账号暂未加入任何学校!")
|
|
|
+ })
|
|
|
+ },
|
|
|
+ goToCreate() {
|
|
|
+ if (this.$store.state.user.schoolProfile.school_base != undefined) {
|
|
|
+ if (this.scope == 'school') {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'createSchoolEva'
|
|
|
+ })
|
|
|
+ } else if (this.scope == 'private') {
|
|
|
+ this.$router.push({
|
|
|
+ name: 'createPrivateEva'
|
|
|
+ })
|
|
|
}
|
|
|
- },
|
|
|
- confirmEdit() {
|
|
|
- let evaluationInfo = this.evaluationList[this.curEvaIndex]
|
|
|
- evaluationInfo.testPaper = this.examPaperList
|
|
|
- this.$router.push({
|
|
|
- name: 'createEvaluation',
|
|
|
- params: {
|
|
|
- evaluationInfo
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- editEvaluation() {
|
|
|
- this.$Message.warning('暂未处理编辑评测功能!')
|
|
|
- //if (this.evaluationList.length > 0) {
|
|
|
- // this.editEvaluationStatus = true
|
|
|
- //}
|
|
|
- },
|
|
|
- selectSubject(index) {
|
|
|
- this.curSubIndex = index
|
|
|
- },
|
|
|
- selectBar(index) {
|
|
|
- this.curBarIndex = index
|
|
|
- //if (index == 0) {
|
|
|
- // this.selectEvaluation(this.curEvaIndex)
|
|
|
- //}
|
|
|
- },
|
|
|
- dateFormat(timestamp) {
|
|
|
- var date = new Date(timestamp)
|
|
|
- var Y = date.getFullYear() + '-'
|
|
|
- var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
|
|
|
- var D = date.getDate() + ' '
|
|
|
- return Y + M + D;
|
|
|
- },
|
|
|
-
|
|
|
- //查询评测列表
|
|
|
- findEvaluation() {
|
|
|
- let requestData = {
|
|
|
- code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
|
|
|
+ } else {
|
|
|
+ this.$Message.warning("此账号暂未加入任何学校!")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ confirmEdit() {
|
|
|
+ let evaluationInfo = this.evaluationList[this.curEvaIndex]
|
|
|
+ evaluationInfo.testPaper = this.examDetaiInfo
|
|
|
+ this.$router.push({
|
|
|
+ name: 'createEvaluation',
|
|
|
+ params: {
|
|
|
+ evaluationInfo
|
|
|
}
|
|
|
- this.$api.learnActivity.FindExamInfo(requestData).then(
|
|
|
- res => {
|
|
|
- if (res.error == null) {
|
|
|
- this.evaluationList = res.examInfo
|
|
|
- this.filterByPeriod()
|
|
|
- //如果当前学段没有评测则自动切换下一个学段
|
|
|
- if (!this.evaListShow.length) {
|
|
|
- if (this.schoolBase.period && this.schoolBase.period.length > 1) {
|
|
|
- this.filterPeriod = this.schoolBase.period[1].id
|
|
|
- this.filterByPeriod()
|
|
|
- }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ editEvaluation() {
|
|
|
+ this.$Message.warning('暂未处理编辑评测功能!')
|
|
|
+ },
|
|
|
+ selectSubject(index) {
|
|
|
+ this.curSubIndex = index
|
|
|
+ },
|
|
|
+ selectBar(index) {
|
|
|
+ this.curBarIndex = index
|
|
|
+ },
|
|
|
+ dateFormat(timestamp) {
|
|
|
+ var date = new Date(timestamp)
|
|
|
+ var Y = date.getFullYear() + '-'
|
|
|
+ var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
|
|
|
+ var D = date.getDate() + ' '
|
|
|
+ return Y + M + D;
|
|
|
+ },
|
|
|
+
|
|
|
+ //查询评测列表
|
|
|
+ findEvaluation() {
|
|
|
+ let requestData = {
|
|
|
+ code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
|
|
|
+ }
|
|
|
+ this.$api.learnActivity.FindExamInfo(requestData).then(
|
|
|
+ res => {
|
|
|
+ if (res.error == null) {
|
|
|
+ res.examInfo = res.examInfo.sort((a, b) => {
|
|
|
+ return a.createTime - b.createTime > 0 ? -1 : 1
|
|
|
+ })
|
|
|
+ this.evaluationList = res.examInfo
|
|
|
+ this.filterByPeriod()
|
|
|
+ //如果当前学段没有评测则自动切换下一个学段
|
|
|
+ if (!this.evaListShow.length) {
|
|
|
+ if (this.schoolBase.period && this.schoolBase.period.length > 1) {
|
|
|
+ this.filterPeriod = this.schoolBase.period[1].id
|
|
|
+ this.filterByPeriod()
|
|
|
}
|
|
|
- } else {
|
|
|
- this$Message.error('API ERROR!')
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this$Message.error('API ERROR!')
|
|
|
}
|
|
|
- )
|
|
|
- },
|
|
|
- //根据学段筛选评测
|
|
|
- filterByPeriod() {
|
|
|
- this.curEvaIndex = 0
|
|
|
- if (this.filterPeriod) {
|
|
|
- this.evaListShow = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
|
|
|
- } else {
|
|
|
- this.evaListShow = [...this.evaluationList]
|
|
|
}
|
|
|
+ )
|
|
|
+ },
|
|
|
+ //根据学段筛选评测
|
|
|
+ filterByPeriod() {
|
|
|
+ this.curEvaIndex = 0
|
|
|
+ if (this.filterPeriod) {
|
|
|
+ this.evaListShow = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
|
|
|
+ } else {
|
|
|
+ this.evaListShow = [...this.evaluationList]
|
|
|
+ }
|
|
|
+ if (this.evaListShow.length) {
|
|
|
this.selectEvaluation(0)
|
|
|
- },
|
|
|
- selectEvaluation(index) {
|
|
|
- this.curSubIndex = 0
|
|
|
- this.curEvaIndex = index
|
|
|
- if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].papers == 0) {
|
|
|
- this.findExamPaper()
|
|
|
- } else {
|
|
|
- this.examPaperList = this.evaListShow[this.curEvaIndex]
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- findExamPaper() {
|
|
|
- let requestData = {
|
|
|
- id: this.evaListShow[this.curEvaIndex].id,
|
|
|
- code: this.evaListShow[this.curEvaIndex].code
|
|
|
- }
|
|
|
- this.isLoading = true
|
|
|
- this.$api.learnActivity.FindExamInfos(requestData).then(
|
|
|
- async res => {
|
|
|
- if (!res.error) {
|
|
|
- let resData = res.examInfo[0]
|
|
|
- let dataInfo = this._.cloneDeep(res.examInfo[0])
|
|
|
- resData.papers.forEach(async (item, index) => {
|
|
|
- resData.papers[index] = await this.$evTools.getFullPaper(item)
|
|
|
- })
|
|
|
- this.evaListShow.splice(this.curEvaIndex, 1, resData)
|
|
|
+ }
|
|
|
|
|
|
- //方便查看数据结构,暂时使用
|
|
|
-
|
|
|
- //this.examPaperList = {}
|
|
|
- //for (let i = 0; i < dataInfo.papers.length; i++) {
|
|
|
- // let resData = {}
|
|
|
- // resData.period = dataInfo.period.name
|
|
|
- // resData.subjectName = dataInfo.subjects[i].name
|
|
|
- // resData.class = dataInfo.targetClassIds
|
|
|
- // resData.code = dataInfo.code
|
|
|
- // resData.id = dataInfo.id
|
|
|
- // resData.grade = dataInfo.grades
|
|
|
- // resData.papers = await this.$evTools.getFullPaper(dataInfo.papers[i])
|
|
|
- // this.examPaperList.push(resData)
|
|
|
- //}
|
|
|
- for (let i = 0; i < dataInfo.papers.length; i++) {
|
|
|
- dataInfo.papers[i] = await this.$evTools.getFullPaper(dataInfo.papers[i])
|
|
|
- }
|
|
|
- console.log('dataInfo',dataInfo)
|
|
|
- this.examPaperList = dataInfo
|
|
|
- } else {
|
|
|
- this.$Message.error('API ERROR!')
|
|
|
- }
|
|
|
- },
|
|
|
- err => {
|
|
|
- this.$Message.error('API ERROR!')
|
|
|
- }
|
|
|
- ).finally(() => {
|
|
|
- this.isLoading = false;
|
|
|
- })
|
|
|
+ },
|
|
|
+ selectEvaluation(index) {
|
|
|
+ this.curSubIndex = 0
|
|
|
+ this.curEvaIndex = index
|
|
|
+ if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].papers == 0) {
|
|
|
+ this.findExamPaper()
|
|
|
+ } else {
|
|
|
+ this.examDetaiInfo = this.evaListShow[this.curEvaIndex]
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
- if (this.$route.name == 'privateEvaluation') {
|
|
|
- this.scope = 'private'
|
|
|
- } else if (this.$route.name == 'schoolEvaluation') {
|
|
|
- this.scope = 'school'
|
|
|
+ //查询当前评测的试卷信息
|
|
|
+ findExamPaper() {
|
|
|
+ let requestData = {
|
|
|
+ id: this.evaListShow[this.curEvaIndex].id,
|
|
|
+ code: this.evaListShow[this.curEvaIndex].code
|
|
|
}
|
|
|
- this.$store.dispatch('user/getSchoolProfile').then(
|
|
|
- (res) => {
|
|
|
- if (res) {
|
|
|
- this.schoolBase = res.school_base
|
|
|
- // 預設搜尋給第一個
|
|
|
- if (res.school_base.period && res.school_base.period.length) {
|
|
|
- this.filterPeriod = res.school_base.period[0].id
|
|
|
+ this.isLoading = true
|
|
|
+ this.$api.learnActivity.FindExamInfos(requestData).then(
|
|
|
+ async res => {
|
|
|
+ if (!res.error) {
|
|
|
+ let resData = res.examInfo[0]
|
|
|
+ for (let index in resData.papers) {
|
|
|
+ resData.papers[index] = await this.$evTools.getFullPaper(resData.papers[index])
|
|
|
}
|
|
|
+ // let dataInfo = this._.cloneDeep(resData)
|
|
|
+ this.evaListShow.splice(this.curEvaIndex, 1, resData)
|
|
|
+ // for (let i = 0; i < dataInfo.papers.length; i++) {
|
|
|
+ // dataInfo.papers[i] = await this.$evTools.getFullPaper(dataInfo.papers[i])
|
|
|
+ // }
|
|
|
+ // this.examDetaiInfo = dataInfo
|
|
|
+ this.examDetaiInfo = resData
|
|
|
+ } else {
|
|
|
+ this.$Message.error('API ERROR!')
|
|
|
}
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ this.$Message.error('API ERROR!')
|
|
|
}
|
|
|
).finally(() => {
|
|
|
- this.findEvaluation()
|
|
|
+ this.isLoading = false;
|
|
|
})
|
|
|
- },
|
|
|
- watch: {
|
|
|
- $route: {
|
|
|
- handler: function (to, from) {
|
|
|
- if (this.$route.name == 'privateEvaluation') {
|
|
|
- this.scope = 'private'
|
|
|
- } else if (this.$route.name == 'schoolEvaluation'){
|
|
|
- this.scope = 'school'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ if (this.$route.name == 'privateEvaluation') {
|
|
|
+ this.scope = 'private'
|
|
|
+ } else if (this.$route.name == 'schoolEvaluation') {
|
|
|
+ this.scope = 'school'
|
|
|
+ }
|
|
|
+ this.$store.dispatch('user/getSchoolProfile').then(
|
|
|
+ (res) => {
|
|
|
+ if (res) {
|
|
|
+ this.schoolBase = res.school_base
|
|
|
+ // 預設搜尋給第一個
|
|
|
+ if (res.school_base.period && res.school_base.period.length) {
|
|
|
+ this.filterPeriod = res.school_base.period[0].id
|
|
|
}
|
|
|
- },
|
|
|
- immediate: true
|
|
|
+ }
|
|
|
}
|
|
|
- },
|
|
|
- computed: {
|
|
|
- filterPeriodName: function () {
|
|
|
- let pId = this.filterPeriod
|
|
|
- let name = ''
|
|
|
- if (pId) {
|
|
|
- let temp = this.$store.state.user.schoolProfile.school_base.period.filter(item => {
|
|
|
- return pId == item.id
|
|
|
- })
|
|
|
- if (temp.length > 0) name = temp[0].name
|
|
|
+ ).finally(() => {
|
|
|
+ this.findEvaluation()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ $route: {
|
|
|
+ handler: function (to, from) {
|
|
|
+ if (this.$route.name == 'privateEvaluation') {
|
|
|
+ this.scope = 'private'
|
|
|
+ } else if (this.$route.name == 'schoolEvaluation') {
|
|
|
+ this.scope = 'school'
|
|
|
}
|
|
|
- return name
|
|
|
},
|
|
|
+ immediate: true
|
|
|
}
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ filterPeriodName: function () {
|
|
|
+ let pId = this.filterPeriod
|
|
|
+ let name = ''
|
|
|
+ if (pId) {
|
|
|
+ let temp = this.$store.state.user.schoolProfile.school_base.period.filter(item => {
|
|
|
+ return pId == item.id
|
|
|
+ })
|
|
|
+ if (temp.length > 0) name = temp[0].name
|
|
|
+ }
|
|
|
+ return name
|
|
|
+ },
|
|
|
}
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
- @import "./ManageEvaluation.less";
|
|
|
+@import "./ManageEvaluation.less";
|
|
|
</style>
|
|
|
<style lang="less">
|
|
|
- .evalustion-base-attr .ivu-form .ivu-form-item-label {
|
|
|
- color: #a5a5a5;
|
|
|
- }
|
|
|
- .evaluation-attr-form .ivu-select-disabled .ivu-select-selection {
|
|
|
- background: none;
|
|
|
- }
|
|
|
- .sort-dropdown{
|
|
|
- .title{
|
|
|
+.evalustion-base-attr .ivu-form .ivu-form-item-label {
|
|
|
+ color: #a5a5a5;
|
|
|
+}
|
|
|
+.evaluation-attr-form .ivu-select-disabled .ivu-select-selection {
|
|
|
+ background: none;
|
|
|
+}
|
|
|
+.sort-dropdown {
|
|
|
+ .title {
|
|
|
color: white;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
- .ivu-select-dropdown{
|
|
|
+ .ivu-select-dropdown {
|
|
|
background-color: #2d2d2d;
|
|
|
border-radius: 2px;
|
|
|
border: 1px #464646 solid;
|
|
|
- .ivu-dropdown-menu{
|
|
|
+ .ivu-dropdown-menu {
|
|
|
li {
|
|
|
color: #ccc;
|
|
|
- font-size: 12px!important;
|
|
|
- &:hover{
|
|
|
+ font-size: 12px !important;
|
|
|
+ &:hover {
|
|
|
color: #2d2d2d;
|
|
|
}
|
|
|
}
|