档案管理
This commit is contained in:
parent
ccc21b9820
commit
63c6364262
|
@ -8,26 +8,38 @@
|
|||
</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>
|
||||
<a-dropdown v-if="hasPerm('archives:user:autotrain:list') || hasPerm('archives:user:terminaltrain:list') || hasPerm('archives:user:selfStudy:list') || hasPerm('archives:user:violation:list')">
|
||||
<a class="ant-dropdown-link">操作
|
||||
<a-icon type="down" />
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item v-if="hasPerm('archives:user:autotrain:list') || hasPerm('archives:user:terminaltrain:list')">
|
||||
<a href="javascript:;" @click="archivesProject(record)">项目档案</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="hasPerm('archives:user:selfStudy:list')">
|
||||
<a href="javascript:;" @click="archivesSelfStudy(record)">自学档案</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item v-if="hasPerm('archives:user:violation:list')">
|
||||
<a href="javascript:;" @click="archivesViolation(record)">违章档案</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="确认导出?" cancelText="取消" okText="确认" @confirm="() => handleDelete(record)">
|
||||
<a href="javascript:;"> 导出 </a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</s-table>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { STable, SearchCom, orgTree } from '@/components'
|
||||
import { STable, SearchCom } from '@/components'
|
||||
import { getArchivesUserList } from '@/api/archives/user'
|
||||
|
||||
export default {
|
||||
components: { STable, SearchCom, orgTree },
|
||||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
queryParam: { name: this.$route.query.archivesUserName || '', orgId: this.$route.query.archivesUserOrgId || '' },
|
||||
|
@ -40,7 +52,7 @@ export default {
|
|||
{ title: '年度学时', width: 'auto', align: 'center', dataIndex: 'yearClassHour', key: 'yearClassHour' },
|
||||
{ title: '累计学时', width: 'auto', align: 'center', dataIndex: 'addUpClassHour', key: 'addUpClassHour' },
|
||||
{ title: '项目学时', width: 'auto', align: 'center', dataIndex: 'projectClassHour', key: 'projectClassHour' },
|
||||
{ title: '操作', width: '170px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
|
||||
{ title: '操作', width: '70px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
|
||||
],
|
||||
loadData: parameter => { return getArchivesUserList(Object.assign(parameter, this.queryParam)).then(res => { return res }) }
|
||||
}
|
||||
|
@ -72,11 +84,25 @@ export default {
|
|||
},
|
||||
// 自学档案 按钮
|
||||
archivesSelfStudy(record) {
|
||||
this.$router.push({ path: '/archives/user/SelfStudy', query: { id: record.id } });
|
||||
this.$router.push({
|
||||
path: '/archives/user/SelfStudy', query: {
|
||||
id: record.id,
|
||||
archivesUserName: this.queryParam.name,
|
||||
archivesUserOrgId: this.queryParam.orgId,
|
||||
archivesUserPageNum: this.$refs.table.localPagination.current
|
||||
}
|
||||
});
|
||||
},
|
||||
// 违章档案 按钮
|
||||
archivesViolation(record) {
|
||||
this.$router.push({ path: '/archives/user/Violation', query: { id: record.id } });
|
||||
this.$router.push({
|
||||
path: '/archives/user/Violation', query: {
|
||||
id: record.id,
|
||||
archivesUserName: this.queryParam.name,
|
||||
archivesUserOrgId: this.queryParam.orgId,
|
||||
archivesUserPageNum: this.$refs.table.localPagination.current
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
</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>
|
||||
<a href="javascript:;" @click="trainDetail(record)" v-if="hasPerm('archives:user:autotrain:detail:list')">培训详情</a>
|
||||
<br v-if="hasPerm('archives:user:autotrain:detail:list') && hasPerm('archives:user:autotrain:answer:list')" />
|
||||
<a href="javascript:;" @click="trainAnswer(record)" v-if="hasPerm('archives:user:autotrain:answer:list')">答题记录</a>
|
||||
</template>
|
||||
</s-table>
|
||||
</a-tab-pane>
|
||||
|
@ -22,7 +22,7 @@
|
|||
</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>
|
||||
<a href="javascript:;" @click="terminalTrainDetail(record)" v-if="hasPerm('archives:user:terminaltrain:detail')">查看详情</a>
|
||||
</template>
|
||||
</s-table>
|
||||
</a-tab-pane>
|
||||
|
|
|
@ -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="small" rowKey="id" :columns="columns" :data="loadData"></s-table>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -17,7 +18,6 @@ export default {
|
|||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
userId: this.$route.query.userId,
|
||||
queryParam: { userId: this.$route.query.userId, courseName: '' },
|
||||
columns: [
|
||||
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
||||
|
@ -36,8 +36,18 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleRefresh() {
|
||||
this.queryParam.userId = this.userId;
|
||||
this.queryParam.userId = this.$route.query.userId;
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
// 返回 按钮
|
||||
close() {
|
||||
this.$router.push({
|
||||
path: '/archives/user/Index', query: {
|
||||
archivesUserName: this.$route.query.archivesUserName,
|
||||
archivesUserOrgId: this.$route.query.archivesUserOrgId,
|
||||
archivesUserPageNum: this.$route.query.archivesUserPageNum
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<template>
|
||||
<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="small" rowKey="id" :columns="columns" :data="loadData"></s-table>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { STable, SearchCom } from '@/components'
|
||||
import { getArchivesUserViolationList } from '@/api/archives/user'
|
||||
|
||||
export default {
|
||||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
queryParam: { userId: this.$route.query.userId, courseName: '' },
|
||||
columns: [
|
||||
{ title: '违章编号', width: 'auto', align: 'center', dataIndex: 'id', key: 'id' },
|
||||
{ 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 }) }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
queryOptions: function () {
|
||||
return [
|
||||
{ type: 'input', placeholder: '课程名称', key: 'courseName' },
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleRefresh() {
|
||||
this.queryParam.userId = this.userId;
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
// 返回 按钮
|
||||
close() {
|
||||
this.$router.push({
|
||||
path: '/archives/user/Index', query: {
|
||||
archivesUserName: this.$route.query.archivesUserName,
|
||||
archivesUserOrgId: this.$route.query.archivesUserOrgId,
|
||||
archivesUserPageNum: this.$route.query.archivesUserPageNum
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue