chengdu
yujialong 4 years ago
parent 579b233d44
commit 9c2b67bd37
  1. 85
      src/components/page/Assessment.vue
  2. 5
      src/components/page/Project.vue

@ -90,13 +90,6 @@
</el-card>
</el-col>
</el-row>
<el-dialog title="请输入邀请码" :visible.sync="icVisible" width="30%" @close="closeIc" center :close-on-click-modal="false">
<el-input v-model="invitationCode" placeholder="邀请码" maxlength="6"></el-input>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveIc"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -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()
},

@ -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

Loading…
Cancel
Save