From 557aa31fa9dc6fe3e1333d955584d9460cd362f9 Mon Sep 17 00:00:00 2001 From: QuAoLi Date: Mon, 14 Mar 2022 18:43:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A1=A3=E6=A1=88-=E8=87=AA?= =?UTF-8?q?=E4=B8=BB=E5=9F=B9=E8=AE=AD=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/archives/user/Project.vue | 31 +++++++++++++++-------- src/views/archives/user/ProjectAnswer.vue | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/views/archives/user/Project.vue b/src/views/archives/user/Project.vue index 9c6b42b..b1e040f 100644 --- a/src/views/archives/user/Project.vue +++ b/src/views/archives/user/Project.vue @@ -38,7 +38,7 @@ export default { components: { STable, SearchCom }, data() { return { - userid: this.$route.query.id, + personId: this.$route.query.id, tabs1: { queryParam: { projectName: this.$route.query.archivesUserProjectTable1ProjectName || '', @@ -46,8 +46,17 @@ export default { }, columns: [ { title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' }, - { title: '项目时间', width: 'auto', align: 'center', dataIndex: 'projectData', key: 'projectData' }, - { title: '受训角色', width: 'auto', align: 'center', dataIndex: 'roleName', key: 'roleName' }, + { + title: '项目时间', + width: 'auto', + align: 'center', + dataIndex: 'startDate', + key: 'startDate', + customRender: (text, record, index) => { + return record.startDate + ' - ' + record.endDate + }, + }, + // { title: '受训角色', width: 'auto', align: 'center', dataIndex: 'roleName', key: 'roleName' }, { title: '应修学时', width: 'auto', align: 'center', dataIndex: 'mustClassHour', key: 'mustClassHour' }, { title: '已修学时', width: 'auto', align: 'center', dataIndex: 'alreadyClassHour', key: 'alreadyClassHour' }, { @@ -59,9 +68,11 @@ export default { { title: '总练习题量', width: 'auto', align: 'center', dataIndex: 'addUpExercises', key: 'addUpExercises' }, { title: '已练习题量', width: 'auto', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' }, { title: '答对题量', width: 'auto', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' }, - { title: '正确率', width: 'auto', align: 'center', dataIndex: 'yesRate', key: 'yesRate' }, + { title: '正确率', width: 'auto', align: 'center', dataIndex: 'yesRate', key: 'yesRate', customRender: (text, record, index) => { + if (text) return text; else return '0%'; + } }, { title: '考试成绩', width: 'auto', align: 'center', dataIndex: 'testResult', key: 'testResult' }, - { title: '补考成绩', width: 'auto', align: 'center', dataIndex: 'mendTestResult', key: 'mendTestResult' }, + // { title: '补考成绩', width: 'auto', align: 'center', dataIndex: 'mendTestResult', key: 'mendTestResult' }, { title: '考试耗时', width: 'auto', align: 'center', dataIndex: 'testTime', key: 'testTime' }, { title: '考试状态', width: 'auto', align: 'center', dataIndex: 'testState', key: 'testState', customRender: (text, record, index) => { @@ -71,7 +82,7 @@ export default { }, { title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } } ], - loadData: parameter => { return getArchivesUserAutoTrainList(Object.assign(parameter, this.tabs1.queryParam)).then(res => { return res }) } + loadData: parameter => { return getArchivesUserAutoTrainList(Object.assign(parameter, this.tabs1.queryParam, {personId : this.personId})).then(res => { return res }) } }, tabs2: { queryParam: { projectName: this.$route.query.archivesUserProjectTable2projectName || '' }, @@ -132,7 +143,7 @@ export default { trainDetail(record) { this.$router.push({ path: '/archives/user/ProjectDetail', query: { - userId: this.userid, + personId: this.personId, projectId: record.id, archivesUserName: this.$route.query.archivesUserName, archivesUserOrgId: this.$route.query.archivesUserOrgId, @@ -148,7 +159,7 @@ export default { trainAnswer(record) { this.$router.push({ path: '/archives/user/ProjectAnswer', query: { - userId: this.userid, + personId: this.personId, projectId: record.id, archivesUserName: this.$route.query.archivesUserName, archivesUserOrgId: this.$route.query.archivesUserOrgId, @@ -164,7 +175,7 @@ export default { terminalTrainDetail(record) { this.$router.push({ path: '/archives/user/TerminalTrainDetail', query: { - userId: this.userid, + personId: this.personId, projectId: record.id, archivesUserName: this.$route.query.archivesUserName, archivesUserOrgId: this.$route.query.archivesUserOrgId, @@ -187,4 +198,4 @@ export default { } } } - \ No newline at end of file + diff --git a/src/views/archives/user/ProjectAnswer.vue b/src/views/archives/user/ProjectAnswer.vue index 7fb15d2..88dca92 100644 --- a/src/views/archives/user/ProjectAnswer.vue +++ b/src/views/archives/user/ProjectAnswer.vue @@ -37,7 +37,7 @@ export default { close() { this.$router.push({ path: '/archives/user/Project', query: { - id: this.$route.query.userId, + id: this.$route.query.personId, archivesUserName: this.$route.query.archivesUserName, archivesUserOrgId: this.$route.query.archivesUserOrgId, archivesUserPageNum: this.$route.query.archivesUserPageNum,