档案管理界面调整

This commit is contained in:
qinjie 2021-09-11 00:30:41 +08:00
parent 8eba84f6a1
commit 5e81d39c86
5 changed files with 214 additions and 107 deletions

View File

@ -1,30 +1,25 @@
<template>
<page-header-wrapper :title="false">
<!-- 是否有边框 bordered -->
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" :orgTree="orgTreeOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
<a-button type="primary" :style="{float: 'right'}">导出</a-button>
</div>
<a-card :bordered="false" title="人员档案">
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" :orgTree="orgTreeOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
<a-button type="primary" :style="{float: 'right'}">导出</a-button>
</div>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="archivesProject(record)">项目档案</a>
<a-divider type="vertical" />
<a href="javascript:;" @click="archivesSelfStudy(record)">自学档案</a>
<br />
<a href="javascript:;">违章档案</a>
<a-divider type="vertical" />
<a-popconfirm title="确认导出?" cancelText="取消" okText="确认" @confirm="() => handleDelete(record)">
<a href="javascript:;"> 导出 </a>
</a-popconfirm>
</template>
</s-table>
</a-card>
</page-header-wrapper>
<!-- 搜索区 -->
<!-- -->
</div>
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.archivesUserPageNum) || 1">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="archivesProject(record)">项目档案</a>
<a-divider type="vertical" />
<a href="javascript:;" @click="archivesSelfStudy(record)">自学档案</a>
<br />
<a href="javascript:;" @click="archivesViolation(record)">违章档案</a>
<a-divider type="vertical" />
<a-popconfirm title="确认导出?" cancelText="取消" okText="确认" @confirm="() => handleDelete(record)">
<a href="javascript:;"> 导出 </a>
</a-popconfirm>
</template>
</s-table>
</a-card>
</template>
<script>
@ -35,7 +30,7 @@ export default {
components: { STable, SearchCom, orgTree },
data() {
return {
queryParam: { name: '', orgId: '' },
queryParam: { name: this.$route.query.archivesUserName || '', orgId: this.$route.query.archivesUserOrgId || '' },
columns: [
{ title: '姓名', width: '100px', align: 'center', dataIndex: 'name', key: 'name' },
{ title: '受训角色', width: 'auto', align: 'center', dataIndex: 'roleName', key: 'roleName' },
@ -57,7 +52,7 @@ export default {
]
},
orgTreeOptions: () => {
return { ifshow: true, formKey: 'orgId', startOrganizationId: '' };
return { ifshow: true, formKey: 'orgId', startOrganizationId: '', defaultOrganizationId: '' };
}
},
methods: {
@ -66,11 +61,22 @@ export default {
},
//
archivesProject(record) {
this.$router.push({ path: '/archives/user/Project', query: { id: record.id } });
this.$router.push({
path: '/archives/user/Project', query: {
id: record.id,
archivesUserName: this.queryParam.name,
archivesUserOrgId: this.queryParam.orgId,
archivesUserPageNum: this.$refs.table.localPagination.current
}
});
},
//
//
archivesSelfStudy(record) {
this.$router.push({ path: '/archives/user/SelfStudy', query: { id: record.id } });
},
//
archivesViolation(record) {
this.$router.push({ path: '/archives/user/Violation', query: { id: record.id } });
}
}
}
@ -78,7 +84,9 @@ export default {
<style scoped>
.table-page-search-wrapper-button-group {
width: 100%;
margin-bottom: 8px;
}
.ant-card-body {
padding: 15px;
}
</style>

View File

@ -1,34 +1,33 @@
<template>
<page-header-wrapper :title="false">
<a-tabs :animated="false" default-active-key="1" @change="callback" :style="{backgroundColor: '#fff'}">
<a-card :bordered="false" title="项目档案">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<a-tabs :animated="false" :default-active-key="this.$route.query.defaultActiveKey || '1'" @change="callback" :headStyle="{paddingTop: '0px'}">
<a-tab-pane key="1" tab="自主培训">
<a-card :bordered="false" :bodyStyle="{paddingTop: '0px'}">
<div class="table-page-search-wrapper">
<SearchCom :form="tabs1.queryParam" :list="tabs1QueryOptions" @search="tabs1HandleRefresh" @reset="() => {queryParam = {}, tabs1HandleRefresh()}"></SearchCom>
</div>
<s-table ref="table1" size="default" rowKey="id" :columns="tabs1.columns" :data="tabs1.loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="trainDetail(record)">培训详情</a>
<br />
<a href="javascript:;" @click="trainAnswer(record)">答题记录</a>
</template>
</s-table>
</a-card>
<div class="table-page-search-wrapper">
<SearchCom :form="tabs1.queryParam" :list="tabs1QueryOptions" @search="tabs1HandleRefresh" @reset="() => {queryParam = {}, tabs1HandleRefresh()}"></SearchCom>
</div>
<s-table ref="table1" size="small" rowKey="id" :columns="tabs1.columns" :data="tabs1.loadData" :pageNum="Number(this.$route.query.archivesUserProjectTable1PageNum) || 1">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="trainDetail(record)">培训详情</a>
<br />
<a href="javascript:;" @click="trainAnswer(record)">答题记录</a>
</template>
</s-table>
</a-tab-pane>
<a-tab-pane key="2" tab="终端培训" force-render>
<a-card :bordered="false" :bodyStyle="{paddingTop: '0px'}">
<div class="table-page-search-wrapper">
<SearchCom :form="tabs2.queryParam" :list="tabs2QueryOptions" @search="tabs2HandleRefresh" @reset="() => {queryParam = {}, tabs2HandleRefresh()}"></SearchCom>
</div>
<s-table ref="table2" size="default" rowKey="id" :columns="tabs2.columns" :data="tabs2.loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="terminalTrainDetail(record)">查看详情</a>
</template>
</s-table>
</a-card>
<div class="table-page-search-wrapper">
<SearchCom :form="tabs2.queryParam" :list="tabs2QueryOptions" @search="tabs2HandleRefresh" @reset="() => {queryParam = {}, tabs2HandleRefresh()}"></SearchCom>
</div>
<s-table ref="table2" size="small" rowKey="id" :columns="tabs2.columns" :data="tabs2.loadData" :pageNum="Number(this.$route.query.archivesUserProjectTable2PageNum) || 1">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="terminalTrainDetail(record)">查看详情</a>
</template>
</s-table>
</a-tab-pane>
</a-tabs>
</page-header-wrapper>
</a-card>
</template>
<script>
@ -41,7 +40,10 @@ export default {
return {
userid: this.$route.query.id,
tabs1: {
queryParam: { projectName: '', finishState: '' },
queryParam: {
projectName: this.$route.query.archivesUserProjectTable1ProjectName || '',
finishState: this.$route.query.archivesUserProjectTable1FinishState || ''
},
columns: [
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' },
{ title: '项目时间', width: 'auto', align: 'center', dataIndex: 'projectData', key: 'projectData' },
@ -69,10 +71,10 @@ export default {
},
{ title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: parameter => { return getArchivesUserAutoTrainList(Object.assign(parameter, this.queryParam)).then(res => { return res }) }
loadData: parameter => { return getArchivesUserAutoTrainList(Object.assign(parameter, this.tabs1.queryParam)).then(res => { return res }) }
},
tabs2: {
queryParam: { projectName: '' },
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' },
@ -87,7 +89,7 @@ export default {
},
{ title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: parameter => { return getArchivesUserTerminalTrainList(Object.assign(parameter, this.queryParam)).then(res => { return res }) }
loadData: parameter => { return getArchivesUserTerminalTrainList(Object.assign(parameter, this.tabs2.queryParam)).then(res => { return res }) }
}
}
},
@ -112,8 +114,13 @@ export default {
},
methods: {
callback(key) {
if (key === '1') this.tabs1HandleRefresh();
else this.tabs2HandleRefresh();
if (key === '1') {
this.tabs1.queryParam = {};
this.tabs1HandleRefresh();
} else {
this.tabs2.queryParam = {};
this.tabs2HandleRefresh();
}
},
tabs1HandleRefresh() {
this.$refs.table1.refresh(true)
@ -123,15 +130,60 @@ export default {
},
//
trainDetail(record) {
this.$router.push({ path: '/archives/user/ProjectDetail', query: { userId: this.userid, projectId: record.id } });
this.$router.push({
path: '/archives/user/ProjectDetail', query: {
userId: this.userid,
projectId: record.id,
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum,
archivesUserProjectTable1ProjectName: this.tabs1.queryParam.projectName,
archivesUserProjectTable1FinishState: this.tabs1.queryParam.finishState,
archivesUserProjectTable1PageNum: this.$refs.table1.localPagination.current,
defaultActiveKey: 1
}
});
},
//
trainAnswer(record) {
this.$router.push({ path: '/archives/user/ProjectAnswer', query: { userId: this.userid, projectId: record.id } });
this.$router.push({
path: '/archives/user/ProjectAnswer', query: {
userId: this.userid,
projectId: record.id,
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum,
archivesUserProjectTable1ProjectName: this.tabs1.queryParam.projectName,
archivesUserProjectTable1FinishState: this.tabs1.queryParam.finishState,
archivesUserProjectTable1PageNum: this.$refs.table1.localPagination.current,
defaultActiveKey: 1
}
});
},
//
terminalTrainDetail(record) {
this.$router.push({ path: '/archives/user/TerminalTrainDetail', query: { userId: this.userid, projectId: record.id } });
this.$router.push({
path: '/archives/user/TerminalTrainDetail', query: {
userId: this.userid,
projectId: record.id,
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum,
archivesUserProjectTable2projectName: this.tabs2.queryParam.projectName,
archivesUserProjectTable2PageNum: this.$refs.table2.localPagination.current,
defaultActiveKey: 2
}
});
},
//
close() {
this.$router.push({
path: '/archives/user/Index', query: {
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum
}
});
}
}
}

View File

@ -1,13 +1,14 @@
<template>
<page-header-wrapper :title="false">
<a-card :bordered="false">
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="trainDetail(record)">答题记录</a>
</template>
</s-table>
</a-card>
</page-header-wrapper>
<a-card :bordered="false" title="答题记录">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="trainDetail(record)">答题记录</a>
</template>
</s-table>
</a-card>
</template>
<script>
@ -31,6 +32,22 @@ export default {
}
},
computed: {},
methods: {}
methods: {
//
close() {
this.$router.push({
path: '/archives/user/Project', query: {
id: this.$route.query.userId,
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum,
archivesUserProjectTable1ProjectName: this.$route.query.archivesUserProjectTable1ProjectName,
archivesUserProjectTable1FinishState: this.$route.query.archivesUserProjectTable1FinishState,
archivesUserProjectTable1PageNum: this.$route.query.archivesUserProjectTable1PageNum,
defaultActiveKey: this.$route.query.defaultActiveKey
}
});
}
}
}
</script>

View File

@ -1,12 +1,13 @@
<template>
<page-header-wrapper :title="false">
<a-card :bordered="false">
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
</div>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData"></s-table>
</a-card>
</page-header-wrapper>
<a-card :bordered="false" title="培训详情">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
</div>
<s-table ref="table" size="default" rowKey="id" :columns="columns" :data="loadData"></s-table>
</a-card>
</template>
<script>
@ -17,8 +18,6 @@ export default {
components: { STable, SearchCom },
data() {
return {
userId: this.$route.query.userId,
projectId: this.$route.query.projectId,
queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId, courseName: '' },
columns: [
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
@ -47,9 +46,24 @@ export default {
},
methods: {
handleRefresh() {
this.queryParam.userId = this.userId;
this.queryParam.projectId = this.projectId;
this.queryParam.userId = this.$route.query.userId;
this.queryParam.projectId = this.$route.query.projectId;
this.$refs.table.refresh(true)
},
//
close() {
this.$router.push({
path: '/archives/user/Project', query: {
id: this.$route.query.userId,
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum,
archivesUserProjectTable1ProjectName: this.$route.query.archivesUserProjectTable1ProjectName,
archivesUserProjectTable1FinishState: this.$route.query.archivesUserProjectTable1FinishState,
archivesUserProjectTable1PageNum: this.$route.query.archivesUserProjectTable1PageNum,
defaultActiveKey: this.$route.query.defaultActiveKey
}
});
}
}
}

View File

@ -1,25 +1,26 @@
<template>
<page-header-wrapper :title="false">
<a-card :bordered="false">
<a-descriptions title="集中培训详情" layout="horizontal" bordered size="small" :column="1">
<a-descriptions-item label="培训名称">{{detailData.name}}</a-descriptions-item>
<a-descriptions-item label="培训时间">{{detailData.time}}</a-descriptions-item>
<a-descriptions-item label="主持人">{{detailData.host}}</a-descriptions-item>
<a-descriptions-item label="会议人数">{{detailData.personSize}}</a-descriptions-item>
<a-descriptions-item label="学习内容">{{detailData.studyContent}}</a-descriptions-item>
<a-descriptions-item label="联系人">{{detailData.contact}}</a-descriptions-item>
<a-descriptions-item label="备注">{{detailData.remark}}</a-descriptions-item>
</a-descriptions>
<br />
<a-descriptions title="签到时间" layout="horizontal" bordered size="small" :column="1">
<a-descriptions-item label="时间">{{detailData.signInTime}}</a-descriptions-item>
</a-descriptions>
<br />
<a-descriptions title="培训状态" layout="horizontal" bordered size="small" :column="1">
<a-descriptions-item label="状态">{{detailData.state}}</a-descriptions-item>
</a-descriptions>
</a-card>
</page-header-wrapper>
<a-card :bordered="false" title="终端培训详情">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<a-descriptions title="集中培训详情" layout="horizontal" bordered size="small" :column="1">
<a-descriptions-item label="培训名称">{{detailData.name}}</a-descriptions-item>
<a-descriptions-item label="培训时间">{{detailData.time}}</a-descriptions-item>
<a-descriptions-item label="主持人">{{detailData.host}}</a-descriptions-item>
<a-descriptions-item label="会议人数">{{detailData.personSize}}</a-descriptions-item>
<a-descriptions-item label="学习内容">{{detailData.studyContent}}</a-descriptions-item>
<a-descriptions-item label="联系人">{{detailData.contact}}</a-descriptions-item>
<a-descriptions-item label="备注">{{detailData.remark}}</a-descriptions-item>
</a-descriptions>
<br />
<a-descriptions title="签到时间" layout="horizontal" bordered size="small" :column="1">
<a-descriptions-item label="时间">{{detailData.signInTime}}</a-descriptions-item>
</a-descriptions>
<br />
<a-descriptions title="培训状态" layout="horizontal" bordered size="small" :column="1">
<a-descriptions-item label="状态">{{detailData.state}}</a-descriptions-item>
</a-descriptions>
</a-card>
</template>
<script>
@ -35,6 +36,21 @@ export default {
created: function () {
let parameter = {};
getArchivesUserTerminalTrainDetail(Object.assign(parameter, this.queryParam)).then(res => { this.detailData = res.data });
},
methods: {
close() {
this.$router.push({
path: '/archives/user/Project', query: {
id: this.$route.query.userId,
archivesUserName: this.$route.query.archivesUserName,
archivesUserOrgId: this.$route.query.archivesUserOrgId,
archivesUserPageNum: this.$route.query.archivesUserPageNum,
archivesUserProjectTable2projectName: this.$route.query.archivesUserProjectTable2projectName,
archivesUserProjectTable2PageNum: this.$route.query.archivesUserProjectTable2PageNum,
defaultActiveKey: this.$route.query.defaultActiveKey
}
});
}
}
}
</script>