diff --git a/package-lock.json b/package-lock.json
index 0d563cf..721e0b2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -3665,6 +3665,11 @@
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
},
+ "decimal.js": {
+ "version": "10.4.3",
+ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz",
+ "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
+ },
"decode-uri-component": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
@@ -12430,6 +12435,35 @@
}
}
},
+ "umy-table": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmjs.org/umy-table/-/umy-table-1.1.8.tgz",
+ "integrity": "sha512-yqPMFwZ6MUNqI73KamsNKBTbHRA7VuVZDEWobaySghtf4n/s7INuTNQoADB/ROVK57WOXr99Xpnol0aMqGlASA==",
+ "requires": {
+ "async-validator": "~1.8.1",
+ "deepmerge": "^1.2.0",
+ "normalize-wheel": "^1.0.1",
+ "resize-observer-polyfill": "^1.5.0",
+ "throttle-debounce": "^1.0.1",
+ "vuedraggable": "^2.23.2",
+ "xe-utils": "^3.0.0-beta.12"
+ }
+ },
+ "umy-ui": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/umy-ui/-/umy-ui-1.1.6.tgz",
+ "integrity": "sha512-wX0S29B5sFn8q0MvU9PEl8DGZeQmZXOJlLrwaCJ2UHiIQZCANWgXMBjjQgpaequ1gRZ8BekEu7Sn7hJccm9YMQ==",
+ "requires": {
+ "async-validator": "~1.8.1",
+ "deepmerge": "^1.2.0",
+ "normalize-wheel": "^1.0.1",
+ "resize-observer-polyfill": "^1.5.0",
+ "throttle-debounce": "^1.0.1",
+ "umy-table": "1.1.8",
+ "vuedraggable": "^2.23.2",
+ "xe-utils": "^3.0.0-beta.12"
+ }
+ },
"unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
@@ -13584,6 +13618,11 @@
"async-limiter": "~1.0.0"
}
},
+ "xe-utils": {
+ "version": "3.5.22",
+ "resolved": "https://registry.npmjs.org/xe-utils/-/xe-utils-3.5.22.tgz",
+ "integrity": "sha512-rhWuM2fVXsdrqUtyjRAsYTDLvVzYSSZqg/uCRyDqcw96AweB1AWsnTJZyl9g68ejnP0xhxfSoNBSrIcOeX1yxA=="
+ },
"xml2js": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz",
diff --git a/package.json b/package.json
index 183b80c..3f2e4f0 100644
--- a/package.json
+++ b/package.json
@@ -12,6 +12,7 @@
"ali-oss": "^6.18.1",
"axios": "^0.18.0",
"babel-polyfill": "^6.26.0",
+ "decimal.js": "^10.4.3",
"echarts": "^4.8.0",
"element-theme": "^2.0.1",
"element-ui": "^2.13.0",
@@ -22,6 +23,7 @@
"postcss-px2rem": "^0.3.0",
"px2rem-loader": "^0.1.9",
"sortablejs": "^1.14.0",
+ "umy-ui": "^1.1.6",
"vue": "^2.6.10",
"vue-codemirror": "^4.0.6",
"vue-cropperjs": "^3.0.0",
diff --git a/src/api/index.js b/src/api/index.js
index e811164..7e1541b 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -12,6 +12,7 @@ export default {
deleteProfile : `users/users/userInfo/deleteProfile`,
refreshPageNotification : `nakadai/message/refreshPageNotification`,
getCurrentTime : `competition/competition/management/getCurrentTime`,
+ heartbeatDetection : `nakadai/message/heartbeatDetection`,
getPlayAuth: `${uploadURL}oss/manage/getPlayAuth`, // 获取播放凭证
diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue
index 7e0e0e6..80da1b2 100644
--- a/src/layouts/header/index.vue
+++ b/src/layouts/header/index.vue
@@ -104,6 +104,7 @@ export default {
this.getSystemDetail();
this.getUserDetail();
this.getNotice()
+ this.heartbeatDetection()
},
methods: {
...mapMutations("user", [
@@ -169,6 +170,12 @@ export default {
// 监听socket消息
this.socket.onmessage = this.getMessage;
},
+ // 心跳检测
+ heartbeatDetection () {
+ setInterval(async () => {
+ await this.$get(this.api.heartbeatDetection)
+ }, 58 * 1000)
+ },
// 获取消息
getNotice () {
diff --git a/src/libs/util.js b/src/libs/util.js
index d2f4b33..3ddbe9b 100644
--- a/src/libs/util.js
+++ b/src/libs/util.js
@@ -208,7 +208,18 @@ const util = {
});
}
return result;
- }
+ },
+ // 获取当前时间
+ getNow () {
+ return new Promise(async (resolve, reject) => {
+ const { data } = await axios.get(Setting.apiBaseURL + api.getCurrentTime, {
+ headers: {
+ token: _local.get(Setting.tokenKey)
+ }
+ })
+ resolve(new Date(data.currentTime))
+ })
+ },
};
export default util;
\ No newline at end of file
diff --git a/src/pages/achievement/info/course.vue b/src/pages/achievement/info/course.vue
index 3cb7193..110b905 100644
--- a/src/pages/achievement/info/course.vue
+++ b/src/pages/achievement/info/course.vue
@@ -57,11 +57,11 @@
错误率最高:{{ max.projectName }}
- 参加考试{{ permissions ? peopleNum || 0 : max.quantityAfterWeightRemoval }}人 | {{ curTab == 1 ? `共${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%
+ 参加考试{{ permissions ? (max.numberOfParticipants || 0) : (max.quantityAfterWeightRemoval || 0) }}人 | {{ curTab == 1 ? `共${max.itemErrorCount || 0}人做错,` : '' }}错误率{{ max.errorRate || 0 }}%
错误率最低:{{ min.projectName }}
- 参加考试{{ permissions ? peopleNum || 0 : min.quantityAfterWeightRemoval }}人 | {{ curTab == 1 ? `共${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%
+ 参加考试{{ permissions ? (min.numberOfParticipants || 0) : (min.quantityAfterWeightRemoval || 0) }}人 | {{ curTab == 1 ? `共${min.itemErrorCount || 0}人做错,` : '' }}错误率{{ min.errorRate || 0 }}%
{
@@ -403,6 +403,7 @@ export default {
},
// 练习考核切换
tabChange () {
+ this.permissions = +this.curTab
this.$router.push({
path: 'course',
query: {
@@ -563,7 +564,6 @@ export default {
for (const i in this.stageNumber) {
data[+(i.replace('num', '')) - 1] = this.stageNumber[i]
}
- console.log("🚀 ~ getChart ~ data:", data)
let myChart = echarts.init(document.getElementById("chart"));
myChart.setOption({
title: { text: "实验分数分布图" },
@@ -592,7 +592,6 @@ export default {
// 错误率统计图
errorChart () {
const data = this.errorAnalysis
- console.log("🚀 ~ file: course.vue:585 ~ errorChart ~ data:", data)
const maxFontLength = data.length > 13 ? 6 : 10
const option = {
tooltip: {
diff --git a/src/pages/achievement/info/project.vue b/src/pages/achievement/info/project.vue
index ca9f7fc..e75e612 100644
--- a/src/pages/achievement/info/project.vue
+++ b/src/pages/achievement/info/project.vue
@@ -602,7 +602,8 @@ export default {
}
},
axisLabel: {
- interval: 0,
+ // rotate: 45,
+ interval: data.length > 40 ? 20 : 0,
textStyle: {
color: '#333',
},
@@ -642,7 +643,7 @@ export default {
series: [{
name: '错误率',
type: 'bar',
- barWidth: 25,
+ barWidth: data.length > 40 ? 15 : 25,
axisLabel: {
margin: 10,
textStyle: {
diff --git a/src/pages/assessment/add/index.vue b/src/pages/assessment/add/index.vue
index a4a4cd4..8408dbc 100644
--- a/src/pages/assessment/add/index.vue
+++ b/src/pages/assessment/add/index.vue
@@ -548,8 +548,10 @@ export default {
}
},
getData () { // 获取详情
- this.$get(`${this.api.getDetailById}?id=${this.form.id}`).then(res => {
- this.form = res.data;
+ this.$get(`${this.api.getDetailById}?id=${this.form.id}`).then(({ data }) => {
+ this.form = data;
+ this.startTime = data.startTime
+ this.stopTime = data.stopTime
this.formatDuration();
this.getschoolCourse();
}).catch(err => {
@@ -625,7 +627,7 @@ export default {
if (this.updateTime) {
this.$confirm(`编辑的内容未保存,是否保存?`, '提示', {
type: 'warning',
- closeOnClickModal: false
+ closeOnClickModal: false
}).then(() => {
this.save()
}).catch(() => {
diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue
index d4efe8b..e379b2e 100644
--- a/src/pages/assessment/list/index.vue
+++ b/src/pages/assessment/list/index.vue
@@ -223,7 +223,7 @@
+
+
\ No newline at end of file
diff --git a/src/pages/match/manage/matchRank.vue b/src/pages/match/manage/matchRank.vue
index a23658c..e8a0f96 100644
--- a/src/pages/match/manage/matchRank.vue
+++ b/src/pages/match/manage/matchRank.vue
@@ -35,7 +35,12 @@
class="ml20"
@click="batchImport">上传文件
-
+
+
发布排名
@@ -269,6 +274,8 @@ export default {
method: this.$route.query.method,
competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule,
+ searchTimer: null,
+ keyword: '',
teamCalculationMethods: [
{
id: 0,
@@ -330,6 +337,14 @@ export default {
isPointWeight: false
};
},
+ watch: {
+ keyword: function (val) {
+ clearTimeout(this.searchTimer);
+ this.searchTimer = setTimeout(() => {
+ this.getRank();
+ }, 500);
+ }
+ },
mounted () {
this.getStage()
},
@@ -351,7 +366,8 @@ export default {
pageSize: this.pageSize,
competitionId: this.id,
isOverallRanking: this.active ? 0 : 1,
- stageId: this.active || this.stageId
+ stageId: this.active || this.stageId,
+ keyword: this.keyword
}).then(({ message, publishStatus }) => {
// isRelease 0未发布,1已发布
this.published = publishStatus
@@ -370,7 +386,8 @@ export default {
competitionId: this.id,
publicationType: this.type,
locationStageId: this.stageId,
- stageIds: ids.splice(0, ids.length - 1)
+ stageIds: ids.splice(0, ids.length - 1),
+ keyword: this.keyword
}).then(({ page, publishStatus, total }) => {
this.published = publishStatus
this.list = page
@@ -378,7 +395,7 @@ export default {
this.getPublishTime()
}).catch(res => { })
} else { // 阶段排名
- this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}`).then(({ page, total, publishStatus }) => {
+ this.$post(`${this.api.stageRaceRanking}?competitionId=${this.id}&stageId=${this.active}&pageNum=${this.page}&pageSize=${this.pageSize}&publicationType=${this.type}&keyword=${this.keyword}`).then(({ page, total, publishStatus }) => {
this.published = publishStatus
this.list = page
this.total = total
@@ -605,7 +622,7 @@ export default {
whetherToPublish ?
this.$confirm('排名已经发布,是否直接覆盖?', '提示', {
type: 'success',
- closeOnClickModal: false
+ closeOnClickModal: false
}).then(() => {
this.publishSubmit()
}).catch(() => { }) :
diff --git a/src/pages/match/manage/matchReport.vue b/src/pages/match/manage/matchReport.vue
index 5c09899..3bafd97 100644
--- a/src/pages/match/manage/matchReport.vue
+++ b/src/pages/match/manage/matchReport.vue
@@ -173,6 +173,11 @@
+
保存为草稿
确定并发布
@@ -137,34 +139,38 @@
@click="batchDeleteProjectJudgment"
style="margin-bottom: 10px">批量删除
-
-
-
+
+
+
{{ scope.row.sort }}
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
删除
-
-
+
+
@@ -241,39 +247,42 @@
clearable>
-
-
-
+
+
+
{{ scope.$index + 1 }}
-
-
-
+
+
+
查看
-
-
+
+