From 5ae4356cabbefe98cbe39c1944569048f968d0f8 Mon Sep 17 00:00:00 2001 From: e <2432808546@qq.com> Date: Tue, 16 Nov 2021 17:16:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/achievement/list/index.vue | 3 +- src/pages/assessment/list/index.vue | 125 ++++++++++++--------------- src/pages/student/list/index.vue | 2 + src/pages/system/list/staff.vue | 7 +- src/setting.js | 4 +- 5 files changed, 67 insertions(+), 74 deletions(-) diff --git a/src/pages/achievement/list/index.vue b/src/pages/achievement/list/index.vue index 5bbec49..9a29b8c 100644 --- a/src/pages/achievement/list/index.vue +++ b/src/pages/achievement/list/index.vue @@ -87,7 +87,8 @@ diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue index 828eacd..80ed00a 100644 --- a/src/pages/assessment/list/index.vue +++ b/src/pages/assessment/list/index.vue @@ -91,7 +91,9 @@ @@ -126,12 +128,10 @@ export default { { value: "", name: "不限" - }, - { + }, { value: 1, name: "手动发布" - }, - { + }, { value: 2, name: "定时发布" } @@ -141,17 +141,14 @@ export default { { value: "", name: "不限" - }, - { - value: 1, + }, { + value: 0, name: "待开始" - }, - { - value: 2, + }, { + value: 1, name: "进行中" - }, - { - value: 3, + }, { + value: 2, name: "已结束" } ], @@ -160,16 +157,13 @@ export default { { id: "", name: "不限" - }, - { + }, { id: 1, name: "近一个月" - }, - { + }, { id: 3, name: "近三个月" - }, - { + }, { id: 6, name: "近六个月" } @@ -250,11 +244,12 @@ export default { if (item.countDown > 0) { item.countDown--; } else { - if (item.status === 0 && item.type === 2) { // 待开始-定时发布 + if (item.status == 0 && item.type == 2) { // 待开始-定时发布 item.status = 1; item.countDown = (new Date(item.stopTime).getTime() - new Date().getTime()) / 1000; - } else if (item.status === 1) { - item.status = 2; + // } + } else if (item.status == 1) { + // item.status = 2; } } item.show = true; @@ -277,25 +272,26 @@ export default { }; this.$post(this.api.pageByCondition, data).then(res => { this.listData = res.list; + console.log(this.listData) this.total = res.total; this.listData.forEach(i => { i.show = false; - if (i.status === 2) { // 已结束 + if (i.status == 2) { // 已结束 i.countDown = 0; } else { - if (i.type === 2) { // 定时发布 - if (i.status === 0) { + if (i.type == 2) { // 定时发布 + if (i.status == 0) { // 待开始 i.countDown = (new Date(i.startTime).getTime() - new Date().getTime()) / 1000; // 获得两个日期时间的秒数差 - } else if (i.status === 1) { + } else if (i.status == 1) { // 进行中 i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; } - } else if (i.type === 1) { // 手动发布 - if (i.status === 0) { + } else if (i.type == 1) { // 手动发布 + if (i.status == 0) { // 待开始 i.countDown = 0; - } else if (i.status === 1) { + } else if (i.status == 1) { // 进行中 i.countDown = (new Date(i.stopTime).getTime() - new Date().getTime()) / 1000; } @@ -331,10 +327,7 @@ export default { this.$router.push(`/achievement/ass?id=${row.id}&classId=${row.classId}&projectId=${row.projectId}&classInfo=${JSON.stringify(row.classInfo)}&experimentalName=${row.experimentalName}&class=${row.experimentalClassName}`); }, start(row) { - let data = { - id: row.id, - }; - this.$post(this.api.enableAssessment, data).then(res => { + this.$post(`${this.api.enableAssessment}?id=${row.id}`).then(res => { util.successMsg("启动成功!"); this.getData(); }).catch(err => { @@ -344,36 +337,32 @@ export default { finish(row) { this.$confirm("确定要提前结束吗?", "提示", { type: "warning" - }) - .then(() => { - let data = { - id: row.id, - endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()), - status: 2 - }; - this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => { - util.successMsg("提前结束成功!"); - this.getData(); - }).catch(err => { - console.log(err); - }); - }) - .catch(() => { + }).then(() => { + let data = { + id: row.id, + endTime: util.formatDate("yyyy-MM-dd hh:mm:ss", new Date()), + status: 2 + }; + this.$post(`${this.api.collectPaper}?id=${row.id}`).then(res => { + util.successMsg("提前结束成功!"); + this.getData(); + }).catch(err => { + console.log(err); }); + }).catch(() => { + }); }, delData(row) { this.$confirm("确定要删除吗?", "提示", { type: "warning" - }) - .then(() => { - this.$post(this.api.deleteAssessment, [row.id]).then(res => { - util.successMsg("删除成功"); - this.getData(); - }).catch(res => { - }); - }) - .catch(() => { + }).then(() => { + this.$post(this.api.deleteAssessment, [row.id]).then(res => { + util.successMsg("删除成功"); + this.getData(); + }).catch(res => { }); + }).catch(() => { + }); }, delAllData() { if (this.multipleSelection.length) { @@ -382,18 +371,16 @@ export default { }); this.$confirm("确定要删除吗?", "提示", { type: "warning" - }) - .then(() => { - this.$post(this.api.deleteAssessment, ids).then(res => { - this.multipleSelection = []; - this.$refs.table.clearSelection(); - util.successMsg("删除成功"); - this.getData(); - }).catch(res => { - }); - }) - .catch(() => { + }).then(() => { + this.$post(this.api.deleteAssessment, ids).then(res => { + this.multipleSelection = []; + this.$refs.table.clearSelection(); + util.successMsg("删除成功"); + this.getData(); + }).catch(res => { }); + }).catch(() => { + }); } else { util.errorMsg("请先选择数据 !"); } diff --git a/src/pages/student/list/index.vue b/src/pages/student/list/index.vue index 1e03afd..09a11cf 100644 --- a/src/pages/student/list/index.vue +++ b/src/pages/student/list/index.vue @@ -1018,6 +1018,8 @@ export default { this.importVisible = false; this.studentType = 1; this.keyWord = ""; + this.handleClose(); + this.handleRefresh(); this.initData(); } } diff --git a/src/pages/system/list/staff.vue b/src/pages/system/list/staff.vue index bb27480..b4b33f7 100644 --- a/src/pages/system/list/staff.vue +++ b/src/pages/system/list/staff.vue @@ -45,7 +45,7 @@ - + @@ -53,7 +53,7 @@ - + \ No newline at end of file diff --git a/src/setting.js b/src/setting.js index 9bea5ca..e990dc3 100644 --- a/src/setting.js +++ b/src/setting.js @@ -4,7 +4,7 @@ const url = location.host; const isDev = process.env.NODE_ENV === "development"; // 开发环境 const isHh = url.includes("10.196.131.73"); //是否河海版本 -const isCH = url.includes("120.78.127.12"); //是否巢湖版本 +const isCH = url.includes("124.71.12.62"); //是否巢湖版本 const isBeta = url.includes("120.78.198.231"); //是否职站测试 const isPro = url.includes("occupationlab.com"); //是否职站生产 const isTest = url.includes('39.108.250.202'); //是否中台测试服 @@ -19,7 +19,7 @@ if (isHh) { title = "教师管理端"; } else if (isCH) { // 巢湖 - host = "http://120.78.127.12/"; + host = "http://124.71.12.62/"; title = "教师管理端"; } else if (isBeta) { // 职站测试