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
<template>
<div class="layoutEmbedded">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<!-- 申报项目详情 -->
<!-- <a-button type="primary">导出申请书</a-button> -->
<project-info v-model="projectInfo" v-if="projType"/>
<project-info-Key v-model="projectInfo" v-else/>
</a-spin>
</div>
</template>
<script>
import { budgetList } from '@/views/report/project/config'
import { getType } from '@/views/utils/auth'
import projectInfo from '@/views/evaluation/components/projectInfo'
import projectInfoKey from '@/views/evaluation/components/keyProject/projectInfo'
export default {
name: "projectView",
components: {
projectInfo, projectInfoKey
},
data () {
return {
projectInfo: {
projName: '',
startDate: '',
endDate: '',
applyMoney: '',
projClassName: '',
appPersonName: '',
sex: '',
titleName: '',
degreeName: '',
specName: '',
jobUnit: '',
mobile: '',
address: '',
appUnitName: '',
linkName: '',
linkEmail: '',
linkTel: '',
knowledgeName: '',
projContent: '',
projTarget: '',
projKeywords: '',
// 合作单位
together: [{ unitName: '', unitAddress: '', projectWork: '' }, { unitName: '', unitAddress: '', projectWork: '' }],
// 项目组成员
members: [],
// 经费
budget: budgetList(),
projDoc: null,
fileList: [{ fileName: '', url: '', remarks: '', id: '' }],
auditList: [{ result: '', unit: '', time: '' }],
},
loading: false,
projType: getType() == "1"
};
},
props: {
value: {
type: String,
default: () => {
return null
}
}
},
created () {
this.getProjectInfoById()
},
methods: {
getProjectInfoById () {
if (this.value != null) {
this.loading = true
let fileArr = []
this.$api.project.getProjectInfoById({ id: this.value }).then(({ data = {} }) => {
if (data) {
this.projectInfo = data
console.log(this.projType)
for (let i = 0; i < this.projectInfo.fileList.length; i++) {
if (this.projectInfo.fileList[i].fileExplain.indexOf("项目申报简要信息首页") == -1 && this.projectInfo.fileList[i].fileExplain.indexOf("项目组成员签字") == -1)
fileArr.push(this.projectInfo.fileList[i])
}
this.projectInfo.fileList = fileArr
this.loading = false
} else
this.$emit('close', 'close')
}).catch(() => { this.$emit('close', 'close') })
}
}
},
}
</script>