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
<template>
<div class="report-detail">
<div style="margin-top: 16px;">
<test-info v-model="testInfo" />
<a-form-model ref="form" :model="auditObj" :rules="rules">
<audit-edit :auditObj.sync="auditObj" />
<a-row>
<a-col :span="24" class="bg-gray">
<a-button @click="cancel">取消</a-button>
<a-button type="primary" @click="submit">提交</a-button>
</a-col>
</a-row>
</a-form-model>
</div>
</div>
</template>
<script>
import { isEmptyParams } from "@/views/utils/common";
import TestInfo from '@/views/report/task/components/taskInfo'
import AuditList from '@/views/audit/components/auditInfo'
import AuditEdit from '@/views/audit/components/auditEdit'
const cont1 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'd37abeb6-14e0-4486-924d-e1e4baf67098', showIndex: 1 } }
const cont2 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b1fe4003-16ed-482f-8fd5-e34b1482c3d4', showIndex: 1 } }
const cont3 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'b19cf66b-c1bb-4974-a524-114c1895dbd8', showIndex: 1 } }
const cont4 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'cf3abeff-9f1a-420e-b375-6aad33f12080', showIndex: 1 } }
const cont5 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'f1cea24c-d13d-48af-8abb-58eed9367c27', showIndex: 1 } }
const cont6 = () => { return { id: null, testId: null, contentInfo: '', startTime: null, endTime: null, contentType: 'ebcdf2b0-011c-4d40-a064-f22d6f7ec646', showIndex: 1 } }
export default {
name: "Audit",
components: {
TestInfo, AuditList, AuditEdit
},
data () {
return {
testInfo: {
id: '',
projId: '',
projName: '',
startDate: null,
endDate: null,
appUnitName: '',
linkTel: '',
linkAddress: '',
linkEmail: '',
// 实施目标和主要内容
testContent: '',
// 总经费
budgetCount: 0,
// 市卫计委资助
budgetGovCount: 0,
// 起止日期
startDate: null,
endDate: null,
// 申报人
appPersonName: null,
sex: null,
birthYear: null,
mobile: null,
degreeName: null,
titleName: null,
// 依托单位
appUnitName: null,
linkEmail: null,
linkTel: null,
linkAddress: null,
postcode: null,
authority: null,
// 项目内容
cont1: [cont1()],
cont2: [cont2()],
cont3: [cont3()],
cont4: [cont4()],
cont5: [cont5()],
cont6: [cont6()],
// 成员
members: [],
// 预期成果形式
target: [],
// 经费
budget: [],
//审核记录
auditList: [{ result: '', unit: '', time: '' }],
},
auditObj: { id: this.value, auditObjectId: this.objId, auditResult: null, auditType: 2, auditContent: '' },
rules: {
auditContent: { required: true, message: '请填写审核意见', trigger: 'blur' },
auditResult: { required: true, message: '请选择审核结果', trigger: 'change' },
},
};
},
props: {
value: {
type: String,
default: () => {
return null
}
},
objId: {
type: String,
default () {
return null
}
},
projId: {
type: String,
default () {
return null
}
}
},
created () {
this.getTestInfoByProjId();
},
methods: {
getTestInfoByProjId () {
let pars = { projId: this.projId }
this.$api.taskReport.getTestInfoByProjId(pars).then(({ data = {} }) => {
if (data) {
this.testInfo = data
}
}).catch(() => {
})
},
cancel () {
this.$emit('closeWindow', 'auditcel')
},
submit () {
this.$refs.form.validate(valid => {
if (valid) {
let pars = isEmptyParams(this.auditObj)
let par = { ...pars }
this.$api.auditManager.testAudit(par).then(({ data = {} }) => {
if (data) {
this.$message.success('审核成功!')
this.$emit('closeWindow', 'audit')
}
}).catch(() => {
f
this.loading = false
})
} else {
return false
}
})
},
},
}
</script>
<style lang="less" scoped>
.report-detail {
height: 70vh;
overflow: auto;
border-left: 1px solid #f0f0f0;
border-top: 1px solid #f0f0f0;
}
</style>