yujialong 3 weeks ago
parent ac62a2270b
commit d832e159ca
  1. 2
      src/api/index.js
  2. 11
      src/pages/achievement/info/course.vue
  3. 29
      src/pages/achievement/info/project.vue
  4. 61
      src/pages/assessment/add/index.vue
  5. 2
      src/pages/project/add/index.vue
  6. 7
      src/pages/project/list/index.vue
  7. 2
      src/pages/station/list/index.vue

@ -184,7 +184,7 @@ export default {
queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`, queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`,
viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`, viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`,
getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`, getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`,
exportExamPaperReport: `exam/exam/paper/exportExamPaperReport`, exportExamPaperReport: `${host}exam/exam/paper/exportExamPaperReport`,
// 赛事内容 // 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`, addCompetitionContent: `competition/competition/content/addCompetitionContent`,

@ -43,13 +43,19 @@
<h6 style="font-size: 16px">错误率分析</h6> <h6 style="font-size: 16px">错误率分析</h6>
<div class="wrong"> <div class="wrong">
<div class="line"> <div class="line">
<span class="jud-name">错误率最高{{ max.projectName }}</span> <div class="jud-name">
错误率最高
<div v-html="max.projectName"></div>
</div>
<span>参加考试{{ permissions ? (max.numberOfParticipants || 0) : (max.quantityAfterWeightRemoval || 0) <span>参加考试{{ permissions ? (max.numberOfParticipants || 0) : (max.quantityAfterWeightRemoval || 0)
}}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0
}}%</span> }}%</span>
</div> </div>
<div class="line"> <div class="line">
<span class="jud-name">错误率最低{{ min.projectName }}</span> <div class="jud-name">
错误率最低
<div v-html="min.projectName"></div>
</div>
<span>参加考试{{ permissions ? (min.numberOfParticipants || 0) : (min.quantityAfterWeightRemoval || 0) <span>参加考试{{ permissions ? (min.numberOfParticipants || 0) : (min.quantityAfterWeightRemoval || 0)
}}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0
}}%</span> }}%</span>
@ -699,6 +705,7 @@ export default {
margin: 0 auto 10px; margin: 0 auto 10px;
.jud-name { .jud-name {
display: inline-flex;
width: 500px; width: 500px;
margin-right: 100px; margin-right: 100px;
} }

@ -48,12 +48,18 @@
<h6 style="font-size: 16px">错误率分析</h6> <h6 style="font-size: 16px">错误率分析</h6>
<div class="wrong"> <div class="wrong">
<div class="line"> <div class="line">
<span class="jud-name">错误率最高{{ max.judgmentName }}</span> <div class="jud-name">
错误率最高
<div v-html="max.judgmentName"></div>
</div>
<span>参加考试{{ peopleNum }}&emsp;&emsp;{{ permissions ? `${max.errorTotal || 0}人做错,` : '' }}错误率{{ <span>参加考试{{ peopleNum }}&emsp;&emsp;{{ permissions ? `${max.errorTotal || 0}人做错,` : '' }}错误率{{
max.errorRate }}%</span> max.errorRate }}%</span>
</div> </div>
<div class="line"> <div class="line">
<span class="jud-name">错误率最低{{ min.judgmentName }}</span> <div class="jud-name">
错误率最低
<div v-html="min.judgmentName"></div>
</div>
<span>参加考试{{ peopleNum }}&emsp;&emsp;{{ permissions ? `${min.errorTotal || 0}人做错,` : '' }}错误率{{ <span>参加考试{{ peopleNum }}&emsp;&emsp;{{ permissions ? `${min.errorTotal || 0}人做错,` : '' }}错误率{{
min.errorRate }}%</span> min.errorRate }}%</span>
</div> </div>
@ -167,8 +173,8 @@
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from '@/setting'
import util from "@/libs/util"; import Util from '@/libs/util'
import echarts from "echarts"; import echarts from "echarts";
import axios from 'axios'; import axios from 'axios';
import breadcrumb from '@/components/breadcrumb' import breadcrumb from '@/components/breadcrumb'
@ -199,7 +205,7 @@ export default {
errorAnalysis: {}, errorAnalysis: {},
max: {}, max: {},
min: {}, min: {},
token: util.local.get(Setting.tokenKey), token: Util.local.get(Setting.tokenKey),
curTab: this.$route.query.curTab || '0', curTab: this.$route.query.curTab || '0',
tabs: [ tabs: [
{ {
@ -328,7 +334,7 @@ export default {
}, },
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
util.downloadFileDirect(`学生${this.permissions ? '考核' : '练习'}成绩.xls`, new Blob([res.data])) Util.downloadFileDirect(`学生${this.permissions ? '考核' : '练习'}成绩.xls`, new Blob([res.data]))
}).catch(res => { }) }).catch(res => { })
}, },
// //
@ -355,7 +361,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}) })
const name = res.headers['content-disposition'] const name = res.headers['content-disposition']
util.downloadFileDirect(name ? decodeURI(name) : '成绩报告.zip', new Blob([res.data])) Util.downloadFileDirect(name ? decodeURI(name) : '成绩报告.zip', new Blob([res.data]))
this.exporting = false this.exporting = false
}, },
handleDelete (row) { // handleDelete (row) { //
@ -363,7 +369,7 @@ export default {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$post(this.api.deleteExperimentalReport, [row.reportId]).then(res => { this.$post(this.api.deleteExperimentalReport, [row.reportId]).then(res => {
util.successMsg("删除成功"); Util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
}); });
@ -381,14 +387,14 @@ export default {
this.$post(this.api.deleteExperimentalReport, ids).then(res => { this.$post(this.api.deleteExperimentalReport, ids).then(res => {
this.multipleSelection = []; this.multipleSelection = [];
this.$refs.table.clearSelection(); this.$refs.table.clearSelection();
util.successMsg("删除成功"); Util.successMsg("删除成功");
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
}); });
}).catch(() => { }).catch(() => {
}); });
} else { } else {
util.errorMsg("请先选择数据 !"); Util.errorMsg("请先选择数据 !");
} }
}, },
handleSelectionChange (val) { // handleSelectionChange (val) { //
@ -443,7 +449,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}) })
} }
util.downloadFileDirect(`活跃度.xls`, new Blob([res.data])) Util.downloadFileDirect(`活跃度.xls`, new Blob([res.data]))
}, },
getChart () { // 线 getChart () { // 线
const data = this.scores const data = this.scores
@ -686,6 +692,7 @@ export default {
margin: 0 auto 10px; margin: 0 auto 10px;
.jud-name { .jud-name {
display: inline-flex;
width: 500px; width: 500px;
margin-right: 100px; margin-right: 100px;
} }

@ -159,7 +159,8 @@
</div> </div>
</template> </template>
<script> <script>
import util from "@/libs/util"; import Setting from '@/setting'
import Util from '@/libs/util'
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import StudentTree from "@/components/student-tree/src/tree"; import StudentTree from "@/components/student-tree/src/tree";
import qs from 'qs' import qs from 'qs'
@ -167,6 +168,7 @@ export default {
components: { StudentTree }, components: { StudentTree },
data () { data () {
return { return {
token: Util.local.get(Setting.tokenKey),
founderKeys: { founderKeys: {
0: "系统", 0: "系统",
1: "老师" 1: "老师"
@ -251,7 +253,7 @@ export default {
if (!this.isToProject) this.setAss({}); if (!this.isToProject) this.setAss({});
}, },
mounted () { mounted () {
this.date = [util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))]; this.date = [Util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000)), Util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(new Date().getTime() + 300000))];
this.form.id && this.getData(); this.form.id && this.getData();
this.recoveryData(); this.recoveryData();
this.getschoolCourse(); this.getschoolCourse();
@ -266,8 +268,8 @@ export default {
}, },
date: function (val) { date: function (val) {
if (val[0] != "0000-00-00 00:00:00") { if (val[0] != "0000-00-00 00:00:00") {
this.startTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[0])); this.startTime = Util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[0]));
this.stopTime = util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[1])); this.stopTime = Util.formatDate("yyyy-MM-dd hh:mm:ss", new Date(val[1]));
this.updateTime++ this.updateTime++
} }
}, },
@ -408,33 +410,33 @@ export default {
save (cb) { // save (cb) { //
if (this.submiting) return false if (this.submiting) return false
const { form } = this const { form } = this
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称"); if (!this.form.experimentalName) return Util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入"); if (this.expNameRepeat) return Util.warningMsg("考核名称重复,请重新输入");
if (this.form.type !== 1) { if (this.form.type !== 1) {
if (new Date().getTime() > new Date(this.startTime).getTime()) return util.warningMsg("开始时间不能早于当前时间"); if (new Date().getTime() > new Date(this.startTime).getTime()) return Util.warningMsg("开始时间不能早于当前时间");
let timestamp = new Date(new Date(this.stopTime).getTime() - new Date(this.startTime).getTime()); let timestamp = new Date(new Date(this.stopTime).getTime() - new Date(this.startTime).getTime());
let minute = 1000 * 60; let minute = 1000 * 60;
let hour = minute * 60; let hour = minute * 60;
let day = hour * 24; let day = hour * 24;
this.form.experimentDuration = `${Math.floor(timestamp / day)}d${Math.floor(timestamp % day / hour)}h${Math.floor(timestamp % day % hour / minute)}m`; this.form.experimentDuration = `${Math.floor(timestamp / day)}d${Math.floor(timestamp % day / hour)}h${Math.floor(timestamp % day % hour / minute)}m`;
} }
if (this.form.type == 1 && this.form.experimentDuration == "0d0h0m") return util.warningMsg("请填写考核时长"); if (this.form.type == 1 && this.form.experimentDuration == "0d0h0m") return Util.warningMsg("请填写考核时长");
if (this.form.type == 2 && this.startTime == "0000-00-00 00:00:00") return util.warningMsg("请填写考核时间"); if (this.form.type == 2 && this.startTime == "0000-00-00 00:00:00") return Util.warningMsg("请填写考核时间");
if (this.form.type == 1) { if (this.form.type == 1) {
const { day, hour, minute } = this.duration const { day, hour, minute } = this.duration
if (String(day).includes('.')) return util.warningMsg('考核天数请填写整数') if (String(day).includes('.')) return Util.warningMsg('考核天数请填写整数')
if (day < 0) return util.warningMsg('考核天数请勿填写负数') if (day < 0) return Util.warningMsg('考核天数请勿填写负数')
if (String(hour).includes('.')) return util.warningMsg('考核小时请填写整数') if (String(hour).includes('.')) return Util.warningMsg('考核小时请填写整数')
if (hour < 0) return util.warningMsg('考核小时请勿填写负数') if (hour < 0) return Util.warningMsg('考核小时请勿填写负数')
if (String(minute).includes('.')) return util.warningMsg('考核分钟请填写整数') if (String(minute).includes('.')) return Util.warningMsg('考核分钟请填写整数')
if (minute < 0) return util.warningMsg('考核分钟请勿填写负数') if (minute < 0) return Util.warningMsg('考核分钟请勿填写负数')
} }
if (!form.uuid) return util.warningMsg("请选择考核项目"); if (!form.uuid) return Util.warningMsg("请选择考核项目");
const item = this.projectData.find(e => form.uuid === e.projectId || form.uuid === e.paperId) const item = this.projectData.find(e => form.uuid === e.projectId || form.uuid === e.paperId)
if (item) form[item.projectId ? 'projectId' : 'paperId'] = form.uuid if (item) form[item.projectId ? 'projectId' : 'paperId'] = form.uuid
if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) { if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) {
if (!this.form.invitationCode) return util.warningMsg("请设置邀请码"); if (!this.form.invitationCode) return Util.warningMsg("请设置邀请码");
if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码"); if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return Util.warningMsg("请输入6位纯数字邀请码");
} }
this.form.startTime = this.form.type == 2 ? this.startTime : '' this.form.startTime = this.form.type == 2 ? this.startTime : ''
this.form.stopTime = this.form.type == 2 ? this.stopTime : '' this.form.stopTime = this.form.type == 2 ? this.stopTime : ''
@ -448,7 +450,7 @@ export default {
} }
}); });
if (this.isSpecify == 1 && !stuInfo.length) { if (this.isSpecify == 1 && !stuInfo.length) {
util.warningMsg("请选择学生"); Util.warningMsg("请选择学生");
return; return;
} else { } else {
this.form.classId = classId.toString(); this.form.classId = classId.toString();
@ -461,7 +463,7 @@ export default {
if (this.form.id) { if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(async res => { this.$post(this.api.modifyAssessment, this.form).then(async res => {
this.updateTime = 0 this.updateTime = 0
util.successMsg("修改成功"); Util.successMsg("修改成功");
cb ? cb() : this.backPage() cb ? cb() : this.backPage()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
@ -469,7 +471,7 @@ export default {
} else { } else {
this.$post(this.api.saveAssessment, this.form).then(res => { this.$post(this.api.saveAssessment, this.form).then(res => {
this.updateTime = 0 this.updateTime = 0
util.successMsg("创建成功"); Util.successMsg("创建成功");
cb ? cb() : this.$router.push('list') cb ? cb() : this.$router.push('list')
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
@ -534,7 +536,22 @@ export default {
}, },
showProject (row) { showProject (row) {
this.handleCacheData() this.handleCacheData()
this.$router.push(`/project/add?projectId=${row.projectId}&show=1&ass=1`) if (row.paperId) {
//
let url = `${location.origin}/examination`
if (Setting.isDev) {
url = `http://192.168.31.125:8098/`
} else if (Setting.isPro) {
const { host } = location
url = `https://${host === 'dev.huorantech.cn' ? host : 'www.huorantech.cn'}/examination/`
}
url += `#/testPaper/preview?id=${row.paperId}&token=${this.token}`
localStorage.setItem('exam_token', this.token)
window.open(url)
} else {
//
this.$router.push(`/project/add?projectId=${row.projectId}&show=1&ass=1`)
}
}, },
createInv () { createInv () {
let result = ""; let result = "";

@ -362,7 +362,7 @@ export default {
res.data.map(e => { res.data.map(e => {
e.id = e.mallId e.id = e.mallId
e.label = e.curriculumName e.label = e.curriculumName
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) // e.children = data.filter(n => e.systemId.split(',').includes(n.id + '') && n.id !== 21) //
}) })
this.curs = res.data this.curs = res.data
} }

@ -334,10 +334,11 @@ export default {
// //
let url = `${location.origin}/examination/` let url = `${location.origin}/examination/`
if (Setting.isDev) url = `http://192.168.31.125:8098/` if (Setting.isDev) url = `http://192.168.31.125:8098/`
url += `#/testPaper/detail?token=${this.token}&v=${Date.now()}&paperId=${row.paperId}` url += `#/testPaperDetail?token=${this.token}&v=${Date.now()}&paperId=${row.paperId}&readonly=1`
localStorage.setItem('exam_token', this.token) localStorage.setItem('exam_token', this.token)
this.examUrl = url // this.examUrl = url
this.examVisible = true window.open(url)
// this.examVisible = true
} else { } else {
// //
this.setCache() this.setCache()

@ -134,7 +134,7 @@ export default {
this.links = item.nonAssociatedLinks this.links = item.nonAssociatedLinks
} }
} else { } else {
this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}${params}`) this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${encodeURIComponent(item.goodsName)}&mallId=${item.mallId || ''}${params}`)
} }
} }
}, },

Loading…
Cancel
Save