From 165d3f28a320ece536fe93b8136081cda2be6ab2 Mon Sep 17 00:00:00 2001 From: QuAoLi Date: Thu, 17 Mar 2022 16:25:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=A1=A3=E6=A1=88-?= =?UTF-8?q?=E7=BB=88=E7=AB=AF=E5=9F=B9=E8=AE=AD=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/archives/user/Project.vue | 17 ++++++++++++++--- src/views/archives/user/ProjectAnswer.vue | 9 ++++++--- src/views/archives/user/ProjectDetail.vue | 10 +++++----- src/views/archives/user/SelfStudy.vue | 4 ++-- src/views/archives/user/TerminalTrainDetail.vue | 13 +++++++++---- 5 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/views/archives/user/Project.vue b/src/views/archives/user/Project.vue index b1e040f..564fc79 100644 --- a/src/views/archives/user/Project.vue +++ b/src/views/archives/user/Project.vue @@ -88,8 +88,17 @@ export default { queryParam: { projectName: this.$route.query.archivesUserProjectTable2projectName || '' }, 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: 'trainAddr', key: 'trainAddr' }, { title: '签到时间', width: 'auto', align: 'center', dataIndex: 'signInTime', key: 'signInTime' }, { @@ -100,7 +109,7 @@ export default { }, { title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } } ], - loadData: parameter => { return getArchivesUserTerminalTrainList(Object.assign(parameter, this.tabs2.queryParam)).then(res => { return res }) } + loadData: parameter => { return getArchivesUserTerminalTrainList(Object.assign(parameter, this.tabs2.queryParam, {personId : this.personId})).then(res => { return res }) } } } }, @@ -177,6 +186,8 @@ export default { path: '/archives/user/TerminalTrainDetail', query: { personId: this.personId, projectId: record.id, + signInTime: record.signInTime, + state: record.finishState, archivesUserName: this.$route.query.archivesUserName, archivesUserOrgId: this.$route.query.archivesUserOrgId, archivesUserPageNum: this.$route.query.archivesUserPageNum, diff --git a/src/views/archives/user/ProjectAnswer.vue b/src/views/archives/user/ProjectAnswer.vue index 88dca92..bd94d0d 100644 --- a/src/views/archives/user/ProjectAnswer.vue +++ b/src/views/archives/user/ProjectAnswer.vue @@ -19,9 +19,9 @@ export default { components: { STable, SearchCom }, data() { return { - userId: this.$route.query.userId, + personId: this.$route.query.personId, projectId: this.$route.query.projectId, - queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId }, + queryParam: { personId: this.$route.query.personId, projectId: this.$route.query.projectId }, columns: [ { title: '交卷时间', width: 'auto', align: 'center', dataIndex: 'handDate', key: 'handDate' }, { title: '考试时长', width: 'auto', align: 'center', dataIndex: 'testTime', key: 'testTime' }, @@ -47,7 +47,10 @@ export default { defaultActiveKey: this.$route.query.defaultActiveKey } }); + }, + trainDetail (record) { + this.$router.push({ path: '/myreport', query: { type: 'exam', reportId: record.reportId } }) } } } - \ No newline at end of file + diff --git a/src/views/archives/user/ProjectDetail.vue b/src/views/archives/user/ProjectDetail.vue index 7a287a2..077daea 100644 --- a/src/views/archives/user/ProjectDetail.vue +++ b/src/views/archives/user/ProjectDetail.vue @@ -18,7 +18,7 @@ export default { components: { STable, SearchCom }, data() { return { - queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId, courseName: '' }, + queryParam: { personId: this.$route.query.personId, projectId: this.$route.query.projectId, courseName: '' }, columns: [ { title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' }, { title: '应修学时', width: 'auto', align: 'center', dataIndex: 'mustClassHour', key: 'mustClassHour' }, @@ -26,7 +26,7 @@ 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: 'yesExercises', key: 'yesExercises' }, - { title: '答对正确率', width: 'auto', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' }, + { title: '答对正确率', width: 'auto', align: 'center', dataIndex: 'yesRate', key: 'yesRate' }, { title: '完成状态', width: 'auto', align: 'center', dataIndex: 'finishState', key: 'finishState', customRender: (text, record, index) => { // 完成状态 0-未完成 1-已完成 @@ -46,7 +46,7 @@ export default { }, methods: { handleRefresh() { - this.queryParam.userId = this.$route.query.userId; + this.queryParam.personId = this.$route.query.personId; this.queryParam.projectId = this.$route.query.projectId; this.$refs.table.refresh(true) }, @@ -54,7 +54,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, @@ -67,4 +67,4 @@ export default { } } } - \ No newline at end of file + diff --git a/src/views/archives/user/SelfStudy.vue b/src/views/archives/user/SelfStudy.vue index 600e3f3..589b48a 100644 --- a/src/views/archives/user/SelfStudy.vue +++ b/src/views/archives/user/SelfStudy.vue @@ -18,7 +18,7 @@ export default { components: { STable, SearchCom }, data() { return { - queryParam: { userId: this.$route.query.userId, courseName: '' }, + queryParam: { personId: this.$route.query.personId, courseName: '' }, columns: [ { title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' }, { title: '课时(分)', width: 'auto', align: 'center', dataIndex: 'classHour', key: 'classHour' }, @@ -36,7 +36,7 @@ export default { }, methods: { handleRefresh() { - this.queryParam.userId = this.$route.query.userId; + this.queryParam.personId = this.$route.query.personId; this.$refs.table.refresh(true) }, // 返回 按钮 diff --git a/src/views/archives/user/TerminalTrainDetail.vue b/src/views/archives/user/TerminalTrainDetail.vue index 380e000..1c349f0 100644 --- a/src/views/archives/user/TerminalTrainDetail.vue +++ b/src/views/archives/user/TerminalTrainDetail.vue @@ -29,19 +29,24 @@ import { getArchivesUserTerminalTrainDetail } from '@/api/archives/user' export default { data() { return { - queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId }, + queryParam: { personId: this.$route.query.personId, projectId: this.$route.query.projectId }, detailData: {} } }, created: function () { let parameter = {}; - getArchivesUserTerminalTrainDetail(Object.assign(parameter, this.queryParam)).then(res => { this.detailData = res.data }); + getArchivesUserTerminalTrainDetail(Object.assign(parameter, this.queryParam)).then(res => { + this.detailData = res.data + this.detailData.signInTime = this.$route.query.signInTime + this.detailData.state = this.$route.query.state == 1 ? '已完成' : '未完成' + }); + }, methods: { 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, @@ -60,4 +65,4 @@ export default { width: 100px; text-align: center; } - \ No newline at end of file + From 406cff8ef2380470bb9fb0b174ab1ed2c2fb96ef Mon Sep 17 00:00:00 2001 From: QuAoLi Date: Fri, 18 Mar 2022 12:00:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=BF=9D=E7=AB=A0=E6=A1=A3=E6=A1=88?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/archives/user/Violation.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/archives/user/Violation.vue b/src/views/archives/user/Violation.vue index 6073799..ae1cd93 100644 --- a/src/views/archives/user/Violation.vue +++ b/src/views/archives/user/Violation.vue @@ -19,14 +19,15 @@ export default { components: { STable, SearchCom }, data() { return { - queryParam: { userId: this.$route.query.userId, courseName: '' }, + personId: this.$route.query.id, + queryParam: { courseName: '' }, columns: [ - { title: '违章编号', width: 'auto', align: 'center', dataIndex: 'id', key: 'id' }, + { title: '违章编号', width: 'auto', align: 'center', dataIndex: 'violationCode', key: 'violationCode' }, { title: '违章时间', width: 'auto', align: 'center', dataIndex: 'time', key: 'time' }, { title: '违章内容', width: 'auto', align: 'center', dataIndex: 'content', key: 'content' }, { title: '违章课时', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' }, ], - loadData: parameter => { return getArchivesUserViolationList(Object.assign(parameter, this.queryParam)).then(res => { return res }) } + loadData: parameter => { return getArchivesUserViolationList(Object.assign(parameter, this.queryParam, {personId : this.personId})).then(res => { return res }) } } }, computed: { @@ -38,7 +39,6 @@ export default { }, methods: { handleRefresh() { - this.queryParam.userId = this.userId; this.$refs.table.refresh(true) }, // 返回 按钮 @@ -53,4 +53,4 @@ export default { } } } - \ No newline at end of file +