From 9c2b67bd37c39cde53ee3c156e1229d5c3426f67 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 17 May 2021 18:14:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E6=A0=B8=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/page/Assessment.vue | 85 ++++++++---------------------- src/components/page/Project.vue | 5 +- 2 files changed, 24 insertions(+), 66 deletions(-) diff --git a/src/components/page/Assessment.vue b/src/components/page/Assessment.vue index 51bd3c3..d0709c7 100644 --- a/src/components/page/Assessment.vue +++ b/src/components/page/Assessment.vue @@ -90,13 +90,6 @@ - - - - - @@ -194,25 +187,26 @@ export default { result.push(n) } }) - this.listDataAll = result - this.totals = result.length - this.handlePage() - // this.$get(this.api.fictitiousRecord, { - // userId: this.userId, - // page: 1, - // size: 1000, - // projectPermissions: 1, - // systemId: 3 - // }).then(res => { - // let recordList = res.data.list - // list.map(n => { - // let same = recordList.find(e => e.experimentalName == n.experimentalName) - // if(same){ - // n.reportId = same.reportId - // } - // }) - // this.listData = list - // }).catch(err => {}) + this.$post(this.api.fictitiousRecord, { + classId: '', + userId: this.userId, + page: 1, + size: 1000, + searchContent: '', + source: 2, + systemId: 3 + }).then(res => { + let recordList = res.data.list + result.map(n => { + let same = recordList.find(e => e.className == n.className) + if(same){ + n.reportId = same.reportId + } + }) + this.listDataAll = result + this.totals = result.length + this.handlePage() + }).catch(err => {}) }).catch(res => {}); }, handlePage(){ @@ -237,49 +231,12 @@ export default { }else if(row.status == 3){ return this.$message.warning('该实验已经结束') }else{ - this.curClassName = row.experimentalClassName - this.rowId = row.id - this.projectId = row.projectId - if(row.isCode == 1){ - this.core.toSubSystem(this.curClassName,this.rowId) - }else{ - this.$get(this.api.checkInvitationCode,{ - userId: this.userId, - id: row.id - }).then(res => { - if(res.errmessage == 'false'){ - this.icVisible = true - }else{ - this.core.toSubSystem(this.curClassName,this.rowId) - } - }).catch(res => {}); - } + this.core.toSubSystem(row.className,row.id) } }, show(row) { this.$router.push(`/showExperiment?id=${row.reportId}`) }, - saveIc() { - if(!this.invitationCode) return this.$message.warning('请输入邀请码') - if(!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return this.$message.warning('请输入6位纯数字邀请码') - let data = { - id: this.rowId, - userId: this.userId, - invitationCode: Number(this.invitationCode) - } - this.$post(this.api.joinPractice,data).then(res => { - if(res.errmessage == 'success') { - this.$message.success('验证成功!'); - this.icVisible = false - setTimeout(() => { - this.core.toSubSystem(this.curClassName,this.rowId) - },1000) - } - }).catch(res => {}); - }, - closeIc() { - this.invitationCode = '' - }, goback() { this.$router.back() }, diff --git a/src/components/page/Project.vue b/src/components/page/Project.vue index 5c16b4c..61e69ed 100644 --- a/src/components/page/Project.vue +++ b/src/components/page/Project.vue @@ -212,14 +212,15 @@ export default { rowId: '', projectId: '' } + this.$get(this.api.userRecord,data).then(res => { let list = res.page.list this.totals = res.page.totalCount - this.$get(this.api.fictitiousRecord, { + this.$post(this.api.fictitiousRecord, { userId: this.userId, page: 1, size: 1000, - projectPermissions: 1, + source: 1, systemId: 3 }).then(res => { let recordList = res.data.list