项目档案-自主培训列表修改

This commit is contained in:
QuAoLi 2022-03-14 18:43:08 +08:00
parent ad7fde1681
commit 557aa31fa9
2 changed files with 22 additions and 11 deletions

View File

@ -38,7 +38,7 @@ export default {
components: { STable, SearchCom }, components: { STable, SearchCom },
data() { data() {
return { return {
userid: this.$route.query.id, personId: this.$route.query.id,
tabs1: { tabs1: {
queryParam: { queryParam: {
projectName: this.$route.query.archivesUserProjectTable1ProjectName || '', projectName: this.$route.query.archivesUserProjectTable1ProjectName || '',
@ -46,8 +46,17 @@ export default {
}, },
columns: [ columns: [
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' }, { 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: 'mustClassHour', key: 'mustClassHour' },
{ title: '已修学时', width: 'auto', align: 'center', dataIndex: 'alreadyClassHour', key: 'alreadyClassHour' }, { 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: 'addUpExercises', key: 'addUpExercises' },
{ title: '已练习题量', width: 'auto', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' }, { title: '已练习题量', width: 'auto', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' },
{ title: '答对题量', width: 'auto', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' }, { 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: '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: 'testTime', key: 'testTime' },
{ {
title: '考试状态', width: 'auto', align: 'center', dataIndex: 'testState', key: 'testState', customRender: (text, record, index) => { 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' } } { 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: { tabs2: {
queryParam: { projectName: this.$route.query.archivesUserProjectTable2projectName || '' }, queryParam: { projectName: this.$route.query.archivesUserProjectTable2projectName || '' },
@ -132,7 +143,7 @@ export default {
trainDetail(record) { trainDetail(record) {
this.$router.push({ this.$router.push({
path: '/archives/user/ProjectDetail', query: { path: '/archives/user/ProjectDetail', query: {
userId: this.userid, personId: this.personId,
projectId: record.id, projectId: record.id,
archivesUserName: this.$route.query.archivesUserName, archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId, archivesUserOrgId: this.$route.query.archivesUserOrgId,
@ -148,7 +159,7 @@ export default {
trainAnswer(record) { trainAnswer(record) {
this.$router.push({ this.$router.push({
path: '/archives/user/ProjectAnswer', query: { path: '/archives/user/ProjectAnswer', query: {
userId: this.userid, personId: this.personId,
projectId: record.id, projectId: record.id,
archivesUserName: this.$route.query.archivesUserName, archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId, archivesUserOrgId: this.$route.query.archivesUserOrgId,
@ -164,7 +175,7 @@ export default {
terminalTrainDetail(record) { terminalTrainDetail(record) {
this.$router.push({ this.$router.push({
path: '/archives/user/TerminalTrainDetail', query: { path: '/archives/user/TerminalTrainDetail', query: {
userId: this.userid, personId: this.personId,
projectId: record.id, projectId: record.id,
archivesUserName: this.$route.query.archivesUserName, archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId, archivesUserOrgId: this.$route.query.archivesUserOrgId,

View File

@ -37,7 +37,7 @@ export default {
close() { close() {
this.$router.push({ this.$router.push({
path: '/archives/user/Project', query: { path: '/archives/user/Project', query: {
id: this.$route.query.userId, id: this.$route.query.personId,
archivesUserName: this.$route.query.archivesUserName, archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId, archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum, archivesUserPageNum: this.$route.query.archivesUserPageNum,