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
<template>
<div class="app-content" style="height: 76vh;overflow: auto;">
<a-spin :spinning="loading" style="width: 100%;height: 100%;">
<div>
<a-steps size="small" @change="stepsChange" :initial="0">
<a-step :status="item" v-for="(item,index) in completeStatus" :key="index+'completeStatus'" :disabled="false" />
</a-steps>
</div>
<div class="page-content">
<project-edit v-model="value" @close="closeWindow" @load="onLoad" ref="projCreate" v-if="projType"></project-edit>
<project-edit-key v-model="value" @close="closeWindow" @load="onLoad" ref="projCreate" v-else></project-edit-key>
</div>
<div class="page-footer">
<a-button @click="save">保存</a-button>
<a-button style="margin-left: 10px" type="primary" @click="submit">完成填写</a-button>
</div>
</a-spin>
</div>
</template>
<script>
import { getType } from '@/views/utils/auth'
import projectEdit from "@/views/report/project/components/edit/projectEdit"
import projectEditKey from "@/views/report/project/components/keyProject/projectEdit"
export default {
name: "projectCreate",
components: {
projectEdit, projectEditKey,
},
data () {
return {
loading: false,
projType: getType() == "1",
current: 0,
completeStatus: ["process", "finish", "process", "process", "", "", "", "", "", ""],
stepStyle: {
marginBottom: '60px',
boxShadow: '0px -1px 0 0 #e8e8e8 inset',
},
}
},
props: {
value: {
type: String,
default: () => {
return null
}
}
},
created () {
},
methods: {
stepsChange (e) {
var clone = [].concat(this.completeStatus)
clone[e] = "process"
this.completeStatus = clone
console.log(this.completeStatus)
},
save () {
this.$refs.projCreate.save()
},
submit () {
this.$refs.projCreate.submit()
},
closeWindow (value) {
this.$emit('close', value)
},
onLoad (value) {
this.loading = value
},
},
}
</script>
<style scoped lang="less">
::v-deep .ant-spin-container {
width: 100%;
height: 100%;
}
::-webkit-scrollbar {
width: 8px;
height: 6px;
}
.page-content {
width: 100%;
height: calc(100% - 40px);
overflow: auto;
}
.page-footer {
width: 100%;
height: 40px;
line-height: 40px;
background: rgb(248, 248, 248);
text-align: center;
}
</style>