Commit 15fb8039 authored by wangxl's avatar wangxl
parents 7c0d4514 77e7193b
......@@ -591,6 +591,12 @@ export default {
projectAudit (params) {
return fetch(`/v1/science-admin/com-project/audit`, params, 'post', 'json')
},
talentBatchAudit (params) {
return fetch(`/v1/science-admin/com-talent-apply/batchAudit`, params, 'post', 'json')
},
talentAudit (params) {
return fetch(`/v1/science-admin/com-talent-apply/audit`, params, 'post', 'json')
},
testAudit (params) {
return fetch(`/v1/science-admin/com-project-task/audit`, params, 'post', 'json')
},
......
......@@ -143,6 +143,16 @@ export const routes = [
{ path: '/audit/conclusion', name: '项目结题审核', component: () => import('@/views/audit/conclusion/index.vue'), meta: { title: '项目结题审核', icon: '', noCache: true } },
]
},
{
path: '/talent',
name: 'talent',
component: Layout,
meta: { title: '人才管理', icon: 'component' },
hidden: false,
children: [
{ path: '/audit/talent', name: '人才申报审核', component: () => import('@/views/audit/talent/Index.vue'), meta: { title: '人才申报审核', icon: '', noCache: true } },
]
},
{
path: '/thesis',
name: 'thesis',
......
<template>
<div class="app-content">
<a-form :form="form" :model="searchForm" layout="inline" class="search_form">
<a-form-item>
<a-input placeholder="身份证号" v-model="searchForm.certId" :maxLength="100" style="width: 180px" />
</a-form-item>
<a-form-item>
<a-input placeholder="姓名" v-model="searchForm.personName" :maxLength="100" style="width: 180px" />
</a-form-item>
<a-form-item>
<a-button type="primary" icon="search" @click="search">搜索</a-button>
<a-button icon="reload" style="margin-left: 10px" @click="reset" class="bt-normal">重置</a-button>
</a-form-item>
</a-form>
<div style="width:100%">
<div style="display: inline-block;;width:50%">
<btn-group :data="tabDate" :itemCount="itemCount" v-model="activekey" @change="callback" />
</div>
<div style="display: inline-block;width:50%;text-align: right;">
<a-button type="primary" @click="batchAudit" style="margin-right: 8px;" v-if="isBatchButten">批量审核</a-button>
<a-button type="primary" @click="exportData" icon="download">Excel</a-button>
</div>
</div>
<a-divider style="height: 1px; background-color: #e8e8e8;" />
<span class="form-description" v-if="description"> ※ 审核时间:{{ description }}</span>
<a-table :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :dataSource="tableData" :columns="columns" :scroll="{ x: 'max-content' }" rowKey="id" :pagination="false" :loading="loading">
<template slot="talentInfo" slot-scope="record">
<a @click="recordClick(record, 'view')">{{record.personName}}</a>
</template>
<template slot="option" slot-scope="record">
<a-button type="link" size="small" @click="recordClick(record, 'view')">查看</a-button>
<a-button type="link" size="small" v-if="record.auditResult == 1" @click="recordClick(record, 'audit')">审核</a-button>
</template>
</a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
<a-modal v-model="visibleAudit" v-if="visibleAudit" title="审核" :footer="null" width="94%" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<audit v-model="id" :objId="objectId" @close="closeWindow" @changeScroll="() => {this.$refs.s_modal.changeScroll()}"></audit>
</a-modal>
<a-modal v-model="visibleBatch" v-if="visibleBatch" title="批量审核" :footer="null" width="700px" :dialog-style="{ top: '15%' }" destroyOnClose :maskClosable="false">
<batch-audit :idList="selectedRowKeys" @close="closeWindow" />
</a-modal>
<a-modal v-model="visibleView" title="查看" width="94%" :footer="null" :dialog-style="{ top: '8%' }" destroyOnClose :maskClosable="false">
<talent-view v-model="id" @close="closeWindow" />
</a-modal>
</div>
</template>
<script>
import { isEmptyParams, filterExportExcelData, tableColumnsName } from "@/views/utils/common"
import talentView from "@/views/report/talent/components/talentView"
import batchAudit from '@/views/audit/talent/batchAudit'
import audit from '@/views/audit/talent/audit'
export default {
name: "talentAudit",
components: {
talentView, audit, batchAudit
},
data() {
return {
selectedRowKeys: [],
// 选项卡
//panes: { count1: 0, count2: 0, count3: 0, count4: 0, count5: 0, },
form: this.$form.createForm(this, { name: 'advanced_search' }),
searchForm: {
auditType: 6,
auditResult: 1,
certId: null,
personName: null,
reportYear: null,
auditType: 6,
},
activekey: '1',
tabDate: [
{ key: "1", tab: "待审核" },
{ key: "10", tab: "已通过" },
{ key: "30", tab: "返回修改" },
{ key: "20", tab: "未通过" },
{ key: "", tab: "所有" },
],
itemCount: [0, 0, 0, 0, 0],
tableData: [],
columns: [
{ title: '申报年度', dataIndex: 'reportYear', align: 'center' },
{ title: '申报单位', dataIndex: 'appUnitName', align: 'center' },
{ title: "身份证号", dataIndex: 'certId', align: 'center' },
{ title: '姓名', scopedSlots: { customRender: 'talentInfo' }, align: 'center' },
{ title: '性别', dataIndex: 'sex', align: 'center' },
{ title: '专业', dataIndex: 'specName', align: 'center' },
{ title: '职称', dataIndex: 'titleName', align: 'center' },
{ title: '审核状态', dataIndex: 'auditResultName', align: 'center' },
{ title: '操作', scopedSlots: { customRender: 'option' }, align: 'center', fixed: 'right', width: 180, },
],
pagination: {
pageIndex: 1,
pageSize: this.$defaultPageSize,
total: 0,
pageSizeOptions: this.$defaultPageSizeOptions,
},
loading: false,
// 弹窗标志
visibleAudit: false,
visibleView: false,
visibleBatch: false,
isBatchButten: true,
isButten: false,
description: '',
id: null,
objectId: null,
};
},
created () {
this.getYear()
},
methods: {
onSelectChange (selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
},
search () {
this.id = null
this.objectId = null
this.selectedRowKeys = []
this.pagination.pageIndex = 1
this.getListByPage();
},
reset () {
this.id = null
this.objectId = null
this.selectedRowKeys = []
this.searchForm.certId = null
this.searchForm.personName = null
this.searchForm.knowledgeId = null
this.pagination.pageIndex = 1
this.getListByPage()
},
getYear () {
this.$api.batch.getCurrentYearTalentBatch({ type: 2 }).then(({ data = {} }) => {
if (data) {
this.isButten = data.disabled
this.description = data.description
this.searchForm.reportYear = data.year
this.getListByPage()
}
}).catch(() => { })
},
getListByPage () {
this.getCount()
this.loading = true;
let pars = isEmptyParams(this.searchForm);
let par = { ...pars, pageIndex: this.pagination.pageIndex, pageSize: this.pagination.pageSize, }
this.$api.audit.getAuditListByPage(par).then(({ data = {} }) => {
if (data) {
const { dataList = [], total = 0 } = data
this.pagination.total = total
this.tableData = dataList
this.loading = false
}
}).catch(() => { this.loading = false })
},
getCount () {
let pars = isEmptyParams({ auditType: 6, reportYear: this.searchForm.reportYear });
this.$api.audit.getCount(pars).then(({ data = {} }) => {
if (data) {
this.panes = data
this.itemCount = [data.count1, data.count2, data.count3, data.count4, data.count5]
}
}).catch(() => { })
},
change () {
this.getListByPage();
},
showSizeChange (current, pageSize) {
this.pagination.pageSize = pageSize
this.getListByPage()
},
closeWindow (value) {
if (value === 'audit') {
this.getListByPage()
this.id = null
this.objectId = null
this.selectedRowKeys = []
this.visibleView = false
this.visibleAudit = false
this.visibleBatch = false
} else if (value === 'error') {
this.id = null
this.objectId = null
this.selectedRowKeys = []
this.visibleView = false
this.visibleAudit = false
this.visibleBatch = false
}
},
recordClick (record, type) {
if (type === 'view') {
this.id = record.auditObjectId
this.visibleView = true
} else if (type === 'audit') {
this.id = record.id
this.objectId = record.auditObjectId
this.visibleAudit = true
} else if (type === 'taskView') {
this.selectProjId = record.projId
}
},
batchAudit () {
if (!!this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.visibleBatch = true
}
else
this.$message.error('请选择项目!')
},
callback (key) {
if (key == '1') {
this.isBatchButten = true
} else
this.isBatchButten = false
this.searchForm.auditResult = key;
this.getListByPage()
},
exportData () {
},
}
};
</script>
<template>
<div class="app-content" style="height: 76vh;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div class="page-content">
<div style=" width: 100%;height: 50px;">
<a-tabs type="card" hideAdd size="small" @change="callback">
<a-tab-pane :key="item.key" :tab="item.title" v-for="(item) in tabsData">
</a-tab-pane>
</a-tabs>
</div>
<div style="width: 100%;height: calc(100% - 50px);overflow: auto;" ref="main">
<div class="x_modal_content">
<talent-info v-model="formData" :tabsData.sync="tabsData" />
<a-form-model ref="form" :model="auditObj" :rules="rules" class="from-table font-line-space">
<audit-edit :auditObj.sync="auditObj" />
</a-form-model>
</div>
</div>
</div>
<div class="page-footer">
<a-button type="primary" @click="submit" style="margin-left:16px;">提交</a-button>
</div>
</a-spin>
</div>
</template>
<script>
import { isEmptyParams } from "@/views/utils/common"
import talentInfo from '@/views/report/talent/components/talentInfo'
import AuditList from '@/views/audit/components/auditInfo'
import AuditEdit from '@/views/audit/components/auditEdit'
export default {
name: "Audit",
components: {
talentInfo, AuditList, AuditEdit
},
data () {
return {
tabsData: [
{ title: '全部', key: '0', isShow: true },
{ title: '申报人基本情况', key: '1', isShow: true },
{ title: '申报人简历', key: '2', isShow: true },
{ title: '申报人科研成绩', key: '3', isShow: true },
{ title: '科学研究规划及团队人员名单', key: '4', isShow: true },
{ title: '经费预算及培养计划和目标', key: '5', isShow: true },
{ title: '附件', key: '6', isShow: true },
{ title: '项目审核记录', key: '7', isShow: true },
],
formData: {
id: null,
talentCategory: null,
reportYear: null,
certId: null,
personId: null,
personName: null,
nation: null,
sex: null,
birthday: null,
degree: null,
degreeTime: null,
degreeUnit: null,
spec: null,
graduateTeacher: null,
title: null,
politicalParty: null,
duty: null,
talentType: null,
honoraryTitle: null,
holdPost1: null,
holdPost2: null,
holdPost3: null,
mobile: null,
fax: null,
technicalSkill: null,
qualityTarget: null,
researchCondition: null,
researchProgress: null,
email: null,
applyFund: null,
otherFund: null,
totalFund: null,
planTarget: null,
unitAdvice: null,
talentState: null,
resumeList: [],
membersList: [],
budgetList: [],
scientificList: [],
fileList: [],
auditList: [],
},
auditObj: { id: this.value, auditObjectId: this.objId, auditResult: null, auditType: 6, auditContent: '' },
rules: {
auditContent: { required: true, message: '请填写审核意见', trigger: 'blur' },
auditResult: { required: true, message: '请选择审核结果', trigger: 'change' },
},
loading: false,
};
},
props: {
value: {
type: String,
default: () => {
return null
}
},
objId: {
type: String,
default () {
return null
}
},
},
created () {
this.getTalentApplyById()
},
methods: {
getTalentApplyById () {
let pars = { id: this.objId }
if (this.objId != null) {
this.loading = true
this.$api.talent.getTalentApplyById(pars).then(({ data = {} }) => {
if (data) {
// 处理字符串转数组
let talentType = null
if (typeof data.talentType === 'string' && data.talentType) {
data.talentType = data.talentType.split(',')
talentType = [...data.talentType]
}
if (typeof data.graduateTeacher === 'string' && data.graduateTeacher) {
data.graduateTeacher = data.graduateTeacher.split(',')
}
this.formData = data
this.loading = false
} else
this.$emit('close', 'error')
}).catch(() => { this.$emit('close', 'error') })
}
},
submit () {
this.$refs.form.validate(valid => {
if (valid) {
this.loading = true
let pars = isEmptyParams(this.auditObj)
let par = { ...pars }
this.$api.audit.talentAudit(par).then(({ data = {} }) => {
if (data) {
this.$message.success('审核成功!')
this.$emit('close', 'audit')
}
this.loading = false
}).catch(() => { this.loading = false })
} else {
this.changeScroll()
this.$message.error('请选择审核结果或填写审核意见!')
return false
}
})
},
changeScroll () {
this.$refs.main.scrollTop = document.getElementsByClassName('x_modal_content')[0].offsetHeight
},
callback (key) {
var index = parseInt(key)
this.tabsData.forEach(e => {
if (key == '0')
e.isShow = true
else
e.isShow = false
})
this.tabsData[0].isShow = true;
this.tabsData[index].isShow = true;
},
},
}
</script>
<style scoped lang="less">
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
::v-deep .page-content {
width: 100%;
height: calc(100% - 40px);
overflow: auto;
}
::v-deep .page-footer {
width: 100%;
height: 40px;
line-height: 40px;
background: rgb(248, 248, 248);
text-align: center;
}
textarea {
height: 115px;
}
</style>
<template>
<div class="app-content" style="height:260px;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div>
<a-form-model ref="form" :model="auditObj" :rules="rules" class="from-table font-line-space">
<audit-edit :auditObj.sync="auditObj" />
</a-form-model>
</div>
<div style="text-align: center;margin-top: 12px;">
<a-button type="primary" @click="submit" style="margin-left:16px;">提交</a-button>
</div>
</a-spin>
</div>
</template>
<script>
import { isEmptyParams } from "@/views/utils/common"
import AuditEdit from '@/views/audit/components/auditEdit'
export default {
name: "Audit",
components: {
AuditEdit
},
data () {
return {
auditObj: { id: null, auditObjectId: null, auditResult: null, auditType: 6, auditContent: '', idList: this.idList },
rules: {
auditContent: { required: true, message: '请填写审核意见', trigger: 'blur' },
auditResult: { required: true, message: '请选择审核结果', trigger: 'change' },
},
loading: false,
};
},
props: {
idList: {
type: Array,
default () {
return []
}
},
},
created () {
},
methods: {
submit () {
this.$refs.form.validate(valid => {
if (valid) {
this.loading = true
let pars = isEmptyParams(this.auditObj)
let par = { ...pars }
this.$api.audit.talentBatchAudit(par).then(({ data = {} }) => {
if (data) {
this.$message.success('审核成功!')
this.$emit('close', 'audit')
}
this.loading = false
}).catch(() => { this.loading = false })
} else {
this.$message.error('请选择审核结果或填写审核意见!')
return false
}
})
},
},
}
</script>
<style scoped lang="less">
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
textarea {
height: 115px;
}
</style>
......@@ -29,7 +29,7 @@
</template>
<template slot="option" slot-scope="record">
<a-button type="link" size="small" @click="recordClick(record,'view')">查看</a-button>
<a-button type="link" size="small" @click="recordClick(record,'edit')">修改</a-button>
<a-button type="link" size="small" v-if="((record.talentState == -10 || record.talentState == 10 || record.talentState == 30))" @click="recordClick(record,'edit')">修改</a-button>
<a-popconfirm title="确定要上报吗?" v-if="((record.talentState == 10 || record.talentState == 30))" ok-text="确定" cancel-text="取消" @confirm="recordClick(record,'report')">
<a-button type="link" size="small">上报</a-button>
</a-popconfirm>
......@@ -152,7 +152,7 @@ export default {
this.display = true
else
this.display = false
this.searchForm.projState = key
this.searchForm.talentState = key
this.getListByPage()
},
ApplyTalent () {
......
......@@ -441,6 +441,18 @@
<file-info :fileList.sync="value.fileList" />
</div>
<div v-if="tabsData[7].isShow">
<a-row>
<a-col :span="24">
<div class="main-title">
<span>审核记录</span>
</div>
</a-col>
</a-row>
<a-row>
<a-col :span="24">
<audit-info v-model="value.auditList" />
</a-col>
</a-row>
</div>
</div>
</template>
......@@ -454,11 +466,12 @@ import scientificGainInfo from '@/views/report/talent/components/scientificGainI
import membersInfo from '@/views/report/talent/components/membersInfo'
import budgetInfo from '@/views/report/talent/components/budgetInfo'
import fileInfo from '@/views/report/talent/components/fileInfo'
import auditInfo from '@/views/audit/components/auditInfo'
export default {
name: "talentInfo",
components: {
paraCheck, resumeInfo, scientificGainInfo, membersInfo, budgetInfo, fileInfo,
paraCheck, resumeInfo, scientificGainInfo, membersInfo, budgetInfo, fileInfo, auditInfo
},
props: {
value: {
......
......@@ -84,6 +84,7 @@ export default {
budgetList: [],
scientificList: [],
fileList: [],
auditList: [],
},
loading: false,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment