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
<template>
<el-dialog
center
:title="title"
:visible.sync="visible"
:width="width"
@close="close"
:append-to-body="appendToBody"
:close-on-click-modal="closeModal"
top="5vh"
>
<div class="main">
<ConfigForms
:key="patientId"
isDialogEdit
form-class="follow-form"
:form-type="formType"
:disabled="disabled"
:tab-disabled="tabDisabled"
:patient-id="patientId"
:isDraft="isDraft"
:operation="operation"
@changeShow="changeShow"
@addMethods="addMethods"
></ConfigForms>
</div>
</el-dialog>
</template>
<script>
import ConfigForms from "@/views/screening/components/ConfigForms.vue"
export default {
components: { ConfigForms },
name: "DialogConfigForms",
data() {
return {
loading: false,
visible: false,
disabled: false,
tabDisabled: true,
screenList: [],
}
},
props: {
formType: String,
operation: String,
isDraft: String,
patientId: String,
followId: String,
confirmText: {
type: String,
default: "确 认",
},
appendToBody: {
type: Boolean,
default: false,
},
closeModal: {
type: Boolean,
default: false,
},
title: {
type: String,
default: "修改",
},
width: {
type: String,
default: "80%",
},
},
provide() {
return {
tabFollowId: () => this.followId,
}
},
methods: {
// 处理部分逻辑
addMethods(v) {
console.log(v)
if (v.activeName == "index0") {
let data = {
birthday: v.form.birthday,
sex: v.form.sex,
survey_time: v.form.survey_time,
}
sessionStorage.setItem("index1Data", JSON.stringify(data))
}
},
open() {
this.visible = true
},
close() {
this.loading = false
this.visible = false
},
handleConfirm() {
this.loading = true
},
changeShow() {
this.close()
},
},
watch: {
visible() {
if (this.visible) {
} else {
this.$emit("update")
}
},
},
computed: {},
}
</script>
<style lang="scss" scoped>
.el-dialog__wrapper ::v-deep .el-dialog__header {
display: none;
}
</style>