1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<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>