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-card>
</el-col> </el-col>
</el-row> </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> </div>
</template> </template>
@ -194,25 +187,26 @@ export default {
result.push(n) result.push(n)
} }
}) })
this.listDataAll = result this.$post(this.api.fictitiousRecord, {
this.totals = result.length classId: '',
this.handlePage() userId: this.userId,
// this.$get(this.api.fictitiousRecord, { page: 1,
// userId: this.userId, size: 1000,
// page: 1, searchContent: '',
// size: 1000, source: 2,
// projectPermissions: 1, systemId: 3
// systemId: 3 }).then(res => {
// }).then(res => { let recordList = res.data.list
// let recordList = res.data.list result.map(n => {
// list.map(n => { let same = recordList.find(e => e.className == n.className)
// let same = recordList.find(e => e.experimentalName == n.experimentalName) if(same){
// if(same){ n.reportId = same.reportId
// n.reportId = same.reportId }
// } })
// }) this.listDataAll = result
// this.listData = list this.totals = result.length
// }).catch(err => {}) this.handlePage()
}).catch(err => {})
}).catch(res => {}); }).catch(res => {});
}, },
handlePage(){ handlePage(){
@ -237,49 +231,12 @@ export default {
}else if(row.status == 3){ }else if(row.status == 3){
return this.$message.warning('该实验已经结束') return this.$message.warning('该实验已经结束')
}else{ }else{
this.curClassName = row.experimentalClassName this.core.toSubSystem(row.className,row.id)
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 => {});
}
} }
}, },
show(row) { show(row) {
this.$router.push(`/showExperiment?id=${row.reportId}`) 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() { goback() {
this.$router.back() this.$router.back()
}, },

@ -212,14 +212,15 @@ export default {
rowId: '', rowId: '',
projectId: '' projectId: ''
} }
this.$get(this.api.userRecord,data).then(res => { this.$get(this.api.userRecord,data).then(res => {
let list = res.page.list let list = res.page.list
this.totals = res.page.totalCount this.totals = res.page.totalCount
this.$get(this.api.fictitiousRecord, { this.$post(this.api.fictitiousRecord, {
userId: this.userId, userId: this.userId,
page: 1, page: 1,
size: 1000, size: 1000,
projectPermissions: 1, source: 1,
systemId: 3 systemId: 3
}).then(res => { }).then(res => {
let recordList = res.data.list let recordList = res.data.list

Loading…
Cancel
Save