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`,
viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`,
getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`,
exportExamPaperReport: `exam/exam/paper/exportExamPaperReport`,
exportExamPaperReport: `${host}exam/exam/paper/exportExamPaperReport`,
// 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`,

@ -43,13 +43,19 @@
<h6 style="font-size: 16px">错误率分析</h6>
<div class="wrong">
<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)
}}&emsp;&emsp;{{ curTab == 1 ? `${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0
}}%</span>
</div>
<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)
}}&emsp;&emsp;{{ curTab == 1 ? `${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0
}}%</span>
@ -699,6 +705,7 @@ export default {
margin: 0 auto 10px;
.jud-name {
display: inline-flex;
width: 500px;
margin-right: 100px;
}

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

@ -159,7 +159,8 @@
</div>
</template>
<script>
import util from "@/libs/util";
import Setting from '@/setting'
import Util from '@/libs/util'
import { mapState, mapActions } from "vuex";
import StudentTree from "@/components/student-tree/src/tree";
import qs from 'qs'
@ -167,6 +168,7 @@ export default {
components: { StudentTree },
data () {
return {
token: Util.local.get(Setting.tokenKey),
founderKeys: {
0: "系统",
1: "老师"
@ -251,7 +253,7 @@ export default {
if (!this.isToProject) this.setAss({});
},
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.recoveryData();
this.getschoolCourse();
@ -266,8 +268,8 @@ export default {
},
date: function (val) {
if (val[0] != "0000-00-00 00:00:00") {
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.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.updateTime++
}
},
@ -408,33 +410,33 @@ export default {
save (cb) { //
if (this.submiting) return false
const { form } = this
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入");
if (!this.form.experimentalName) return Util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return Util.warningMsg("考核名称重复,请重新输入");
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 minute = 1000 * 60;
let hour = minute * 60;
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`;
}
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 == 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 == 1) {
const { day, hour, minute } = this.duration
if (String(day).includes('.')) return util.warningMsg('考核天数请填写整数')
if (day < 0) return util.warningMsg('考核天数请勿填写负数')
if (String(hour).includes('.')) return util.warningMsg('考核小时请填写整数')
if (hour < 0) return util.warningMsg('考核小时请勿填写负数')
if (String(minute).includes('.')) return util.warningMsg('考核分钟请填写整数')
if (minute < 0) return util.warningMsg('考核分钟请勿填写负数')
}
if (!form.uuid) return util.warningMsg("请选择考核项目");
if (String(day).includes('.')) return Util.warningMsg('考核天数请填写整数')
if (day < 0) return Util.warningMsg('考核天数请勿填写负数')
if (String(hour).includes('.')) return Util.warningMsg('考核小时请填写整数')
if (hour < 0) return Util.warningMsg('考核小时请勿填写负数')
if (String(minute).includes('.')) return Util.warningMsg('考核分钟请填写整数')
if (minute < 0) return Util.warningMsg('考核分钟请勿填写负数')
}
if (!form.uuid) return Util.warningMsg("请选择考核项目");
const item = this.projectData.find(e => form.uuid === e.projectId || form.uuid === e.paperId)
if (item) form[item.projectId ? 'projectId' : 'paperId'] = form.uuid
if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) {
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) return Util.warningMsg("请设置邀请码");
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.stopTime = this.form.type == 2 ? this.stopTime : ''
@ -448,7 +450,7 @@ export default {
}
});
if (this.isSpecify == 1 && !stuInfo.length) {
util.warningMsg("请选择学生");
Util.warningMsg("请选择学生");
return;
} else {
this.form.classId = classId.toString();
@ -461,7 +463,7 @@ export default {
if (this.form.id) {
this.$post(this.api.modifyAssessment, this.form).then(async res => {
this.updateTime = 0
util.successMsg("修改成功");
Util.successMsg("修改成功");
cb ? cb() : this.backPage()
}).catch(err => {
this.submiting = false
@ -469,7 +471,7 @@ export default {
} else {
this.$post(this.api.saveAssessment, this.form).then(res => {
this.updateTime = 0
util.successMsg("创建成功");
Util.successMsg("创建成功");
cb ? cb() : this.$router.push('list')
}).catch(err => {
this.submiting = false
@ -534,7 +536,22 @@ export default {
},
showProject (row) {
this.handleCacheData()
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 () {
let result = "";

@ -362,7 +362,7 @@ export default {
res.data.map(e => {
e.id = e.mallId
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
}

@ -334,10 +334,11 @@ export default {
//
let url = `${location.origin}/examination/`
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)
this.examUrl = url
this.examVisible = true
// this.examUrl = url
window.open(url)
// this.examVisible = true
} else {
//
this.setCache()

@ -134,7 +134,7 @@ export default {
this.links = item.nonAssociatedLinks
}
} 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