hayun-vite 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/styles-test.css +90 -90
- package/assets/styles.css +90 -90
- package/data/formData1.js +42 -42
- package/data/officesObjStore.js +56 -56
- package/data/patientsObjStore.js +73 -73
- package/data/sampleData.js +94 -94
- package/index.js +11 -11
- package/package.json +1 -1
- package/src/Audiogram/Audiogram.js +194 -197
- package/src/Audiogram/dims.js +83 -83
- package/src/Form/Form.js +268 -276
- package/src/Form/Form_N.js +158 -158
- package/src/Form/Forms-Test.html +124 -124
- package/src/Form/Forms.js +121 -134
- package/src/Form/Header.js +91 -91
- package/src/Form/Reflex.js +141 -141
- package/src/Form/Sections.js +71 -71
- package/src/Form/Speech.js +132 -132
- package/src/Form/TextBox.js +66 -82
- package/src/Form/Tympanogram.js +355 -355
- package/src/Form/formStyles.css +122 -122
- package/src/Form/globalinfo.js +68 -68
- package/src/Form/grid/drawGrid.js +84 -84
- package/src/Form/grid/hideGrid.js +8 -8
- package/src/Form/printForm.js +122 -75
- package/src/Form/templates/combo.js +248 -248
- package/src/Form/templates/dims.js +204 -204
- package/src/Form/templates/rasaAud.js +287 -287
- package/src/Symbol/Symbols.js +29 -29
- package/src/Symbol/createSymbolSVG.js +240 -240
- package/src/Symbol/getAllSymbolsSVG.js +21 -21
- package/src/Symbol/insertSymbol.js +10 -10
- package/src/Symbol/symbolChart.js +47 -47
- package/src/common/putLine.js +16 -16
- package/src/common/putPoint.js +12 -12
- package/src/common/putRect.js +13 -13
- package/src/common/putText.js +17 -16
- package/src/common/putTopLayer.js +17 -17
- package/src/main.js +88 -87
- package/src/note.css +62 -0
- package/src/style.css +189 -156
- package/src/note.html +0 -1
@@ -1,248 +1,248 @@
|
|
1
|
-
import audDims from "../../Audiogram/dims.js";
|
2
|
-
|
3
|
-
const combo = {
|
4
|
-
name: 'combo',
|
5
|
-
label: '
|
6
|
-
// backgroundImage: 'backgroundImage',
|
7
|
-
margin: { left: 5, top: 5, right: 5, bottom: 5 },
|
8
|
-
paper: { type: 'A4', case: 'portrait', width: 210, height: 297 },
|
9
|
-
|
10
|
-
// Printable Dimention
|
11
|
-
calc1: function () {
|
12
|
-
this.width = this.paper.width - (this.margin.left + this.margin.right);
|
13
|
-
this.height = this.paper.height - (this.margin.top + this.margin.bottom);
|
14
|
-
let width = this.width;
|
15
|
-
// ابعاد و پدینگ المنت ها
|
16
|
-
// فضای خالی
|
17
|
-
this.blank = {
|
18
|
-
name: 'blank',
|
19
|
-
w: width, h: 10,
|
20
|
-
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
21
|
-
display: 'block',
|
22
|
-
}
|
23
|
-
this.header = {
|
24
|
-
// hideContext: true,
|
25
|
-
name: 'header',
|
26
|
-
w: width, h: 20,
|
27
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
28
|
-
display: 'block',
|
29
|
-
}
|
30
|
-
this.patient = {
|
31
|
-
name: 'patient',
|
32
|
-
w: width, h: 10,
|
33
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
34
|
-
display: 'block',
|
35
|
-
}
|
36
|
-
this.history = {
|
37
|
-
name: 'history',
|
38
|
-
w: width, h: 10,
|
39
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
40
|
-
display: 'block',
|
41
|
-
}
|
42
|
-
|
43
|
-
this.RAudiogram = {}
|
44
|
-
Object.assign(this.RAudiogram,
|
45
|
-
audDims[this.name],
|
46
|
-
{
|
47
|
-
name: 'RAudiogram',
|
48
|
-
w: width / 2, h: 100,
|
49
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
50
|
-
display: 'inline',
|
51
|
-
});
|
52
|
-
|
53
|
-
this.LAudiogram = {}
|
54
|
-
Object.assign(this.LAudiogram,
|
55
|
-
audDims[this.name],
|
56
|
-
{
|
57
|
-
name: 'LAudiogram',
|
58
|
-
w: width / 2, h: 100, // پهنای سکشن هست
|
59
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
60
|
-
display: 'block',
|
61
|
-
});
|
62
|
-
|
63
|
-
this.RSpeech = {
|
64
|
-
name: 'RSpeech',
|
65
|
-
w: width / 2, h: 15,
|
66
|
-
margin: { left: 5, top: 1, right: 5, bottom: 1 },
|
67
|
-
display: 'inline',
|
68
|
-
stroke: true,
|
69
|
-
}
|
70
|
-
|
71
|
-
this.LSpeech = {
|
72
|
-
name: 'LSpeech',
|
73
|
-
w: width / 2, h: 15,
|
74
|
-
margin: { left: 5, top: 1, right: 5, bottom: 1 },
|
75
|
-
display: 'block',
|
76
|
-
stroke: true
|
77
|
-
}
|
78
|
-
|
79
|
-
this.RTympanogram = {
|
80
|
-
name: 'RTympanogram',
|
81
|
-
w: width / 2, h: 60,
|
82
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
83
|
-
display: 'inline',
|
84
|
-
}
|
85
|
-
|
86
|
-
this.LTympanogram = {
|
87
|
-
name: 'LTympanogram',
|
88
|
-
w: width / 2, h: 60,
|
89
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
90
|
-
display: 'block',
|
91
|
-
}
|
92
|
-
this.RReflex = {
|
93
|
-
name: 'RReflex',
|
94
|
-
w: width / 2, h: 30,
|
95
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
96
|
-
display: 'inline'
|
97
|
-
}
|
98
|
-
|
99
|
-
this.LReflex = {
|
100
|
-
name: 'LReflex',
|
101
|
-
w: width / 2, h: 30,
|
102
|
-
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
103
|
-
display: 'block'
|
104
|
-
}
|
105
|
-
|
106
|
-
this.report = {
|
107
|
-
name: 'report',
|
108
|
-
w: width, h: 20,
|
109
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
110
|
-
display: 'block'
|
111
|
-
}
|
112
|
-
|
113
|
-
this.footer = {
|
114
|
-
name: 'footer',
|
115
|
-
w: width, h: 10,
|
116
|
-
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
117
|
-
display: 'block'
|
118
|
-
}
|
119
|
-
},
|
120
|
-
|
121
|
-
calc2: function () {
|
122
|
-
// let dims = this.dims;
|
123
|
-
let width, height;
|
124
|
-
|
125
|
-
width = this.header.width = this.getWidth(this.header)
|
126
|
-
height = this.header.height = this.getHeight(this.header)
|
127
|
-
|
128
|
-
this.header.elements = [
|
129
|
-
{ type: 'line', x1: 0, y1: height, x2: width, y2: height },
|
130
|
-
{ type: 'text', x: 30, y: 5, value: 'تاریخ :' },
|
131
|
-
]
|
132
|
-
this.header.inputs = [
|
133
|
-
{ name: 'officeName', x: width - 20, y: height - 10 },
|
134
|
-
{ name: 'date', x: 20, y: 5 },
|
135
|
-
]
|
136
|
-
|
137
|
-
width = this.patient.width = this.getWidth(this.patient)
|
138
|
-
this.patient.height = this.getHeight(this.patient)
|
139
|
-
this.patient.elements = [
|
140
|
-
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
141
|
-
{ type: 'text', x: width, y: 5, value: 'نام:' },
|
142
|
-
{ type: 'text', x: width - 30, y: 5, value: 'نام خانوادگی:' },
|
143
|
-
{ type: 'text', x: width - 90, y: 5, value: 'سن:' },
|
144
|
-
{ type: 'text', x: width - 130, y: 5, value: 'ارجاع از:' }
|
145
|
-
]
|
146
|
-
this.patient.inputs = [
|
147
|
-
{ name: 'name', x: width - 5, y: 5 },
|
148
|
-
{ name: 'lastName', x: width - 47, y: 5 },
|
149
|
-
{ name: 'age', x: width - 97, y: 5 },
|
150
|
-
{ name: 'referrer', x: width - 142, y: 5 }
|
151
|
-
]
|
152
|
-
this.patient.forceInputs = [
|
153
|
-
{ name: 'name', x: width - 10, y: 4 },
|
154
|
-
{ name: 'lastName', x: width - 47, y: 5 },
|
155
|
-
{ name: 'age', x: width - 97, y: 5 },
|
156
|
-
{ name: 'referrer', x: width - 142, y: 5 }
|
157
|
-
]
|
158
|
-
|
159
|
-
width = this.history.width = this.getWidth(this.history)
|
160
|
-
this.history.height = this.getHeight(this.history)
|
161
|
-
this.history.elements = [
|
162
|
-
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
163
|
-
{ type: 'text', x: width, y: 5, value: 'شرح حال:' },
|
164
|
-
]
|
165
|
-
this.history.inputs = [
|
166
|
-
{ name: 'description', x: width - 13, y: 5 },
|
167
|
-
]
|
168
|
-
|
169
|
-
width = this.RAudiogram.width = this.getWidth(this.RAudiogram)
|
170
|
-
this.RAudiogram.height = this.getHeight(this.RAudiogram)
|
171
|
-
|
172
|
-
width = this.LAudiogram.width = this.getWidth(this.LAudiogram)
|
173
|
-
this.LAudiogram.height = this.getHeight(this.LAudiogram)
|
174
|
-
|
175
|
-
width = this.RSpeech.width = this.getWidth(this.RSpeech)
|
176
|
-
this.RSpeech.height = this.getHeight(this.RSpeech)
|
177
|
-
this.RSpeech.labels = ["SAT", "SRT", "MCL", "UCL", "SDS"]
|
178
|
-
|
179
|
-
width = this.LSpeech.width = this.getWidth(this.LSpeech)
|
180
|
-
this.LSpeech.height = this.getHeight(this.LSpeech)
|
181
|
-
this.LSpeech.labels = ["SAT", "SRT", "MCL", "UCL", "SDS"]
|
182
|
-
|
183
|
-
width = this.RTympanogram.width = this.getWidth(this.RTympanogram)
|
184
|
-
this.RTympanogram.height = this.getHeight(this.RTympanogram)
|
185
|
-
width = this.LTympanogram.width = this.getWidth(this.LTympanogram)
|
186
|
-
this.LTympanogram.height = this.getHeight(this.LTympanogram)
|
187
|
-
|
188
|
-
width = this.RReflex.width = this.getWidth(this.RReflex)
|
189
|
-
this.RReflex.height = this.getHeight(this.RReflex)
|
190
|
-
width = this.LReflex.width = this.getWidth(this.LReflex)
|
191
|
-
this.LReflex.height = this.getHeight(this.LReflex)
|
192
|
-
|
193
|
-
width = this.report.width = this.getWidth(this.report)
|
194
|
-
this.report.height = this.getHeight(this.report)
|
195
|
-
this.report.elements = [
|
196
|
-
{ type: 'text', x: width, y: 5, value: 'گزارش:' },
|
197
|
-
]
|
198
|
-
this.report.inputs = [
|
199
|
-
{ name: 'description', x: width - 10, y: 5 },
|
200
|
-
]
|
201
|
-
|
202
|
-
width = this.footer.width = this.getWidth(this.footer)
|
203
|
-
this.footer.height = this.getHeight(this.footer)
|
204
|
-
this.footer.elements = [
|
205
|
-
{ type: 'line', x1: 0, y1: 0, x2: width, y2: 0 },
|
206
|
-
{ type: 'text', x: width, y: 5, value: 'آدرس:' },
|
207
|
-
{ type: 'text', x: width - 120, y: 5, value: 'تلفن:' },
|
208
|
-
]
|
209
|
-
this.footer.inputs = [
|
210
|
-
{ name: 'address', x: width - 10, y: 5 },
|
211
|
-
{ name: 'tel', x: width - 128, y: 5 },
|
212
|
-
]
|
213
|
-
},
|
214
|
-
|
215
|
-
getWidth: function (element) {
|
216
|
-
return (element.w - (element.margin.left + element.margin.right))
|
217
|
-
},
|
218
|
-
getHeight: function (element) {
|
219
|
-
return (element.h - (element.margin.top + element.margin.bottom))
|
220
|
-
},
|
221
|
-
|
222
|
-
calcSectionsArray: function () {
|
223
|
-
// این آرایه دقیقا ترتیب قرارگیری سکشن ها را بدون اون اوردر قبلی تعیین میکند
|
224
|
-
this.sections = [
|
225
|
-
this.header,
|
226
|
-
this.patient,
|
227
|
-
this.history,
|
228
|
-
this.RAudiogram,
|
229
|
-
this.LAudiogram,
|
230
|
-
this.RSpeech,
|
231
|
-
this.LSpeech,
|
232
|
-
this.RTympanogram, this.LTympanogram,
|
233
|
-
this.RReflex, this.LReflex,
|
234
|
-
this.report,
|
235
|
-
this.footer
|
236
|
-
|
237
|
-
]
|
238
|
-
},
|
239
|
-
|
240
|
-
}
|
241
|
-
|
242
|
-
combo.calc1()
|
243
|
-
combo.calc2()
|
244
|
-
combo.calcSectionsArray()
|
245
|
-
// پهنا و ارتفاع قابل استفاده منهای پد ها میشه پهنا و ارتفاع اصلی
|
246
|
-
|
247
|
-
export default combo;
|
248
|
-
|
1
|
+
import audDims from "../../Audiogram/dims.js";
|
2
|
+
|
3
|
+
const combo = {
|
4
|
+
name: 'combo',
|
5
|
+
label: 'ادیومتری و تمپانوتری',
|
6
|
+
// backgroundImage: 'backgroundImage',
|
7
|
+
margin: { left: 5, top: 5, right: 5, bottom: 5 },
|
8
|
+
paper: { type: 'A4', case: 'portrait', width: 210, height: 297 },
|
9
|
+
|
10
|
+
// Printable Dimention
|
11
|
+
calc1: function () {
|
12
|
+
this.width = this.paper.width - (this.margin.left + this.margin.right);
|
13
|
+
this.height = this.paper.height - (this.margin.top + this.margin.bottom);
|
14
|
+
let width = this.width;
|
15
|
+
// ابعاد و پدینگ المنت ها
|
16
|
+
// فضای خالی
|
17
|
+
this.blank = {
|
18
|
+
name: 'blank',
|
19
|
+
w: width, h: 10,
|
20
|
+
margin: { left: 0, top: 0, right: 0, bottom: 0 },
|
21
|
+
display: 'block',
|
22
|
+
}
|
23
|
+
this.header = {
|
24
|
+
// hideContext: true,
|
25
|
+
name: 'header',
|
26
|
+
w: width, h: 20,
|
27
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
28
|
+
display: 'block',
|
29
|
+
}
|
30
|
+
this.patient = {
|
31
|
+
name: 'patient',
|
32
|
+
w: width, h: 10,
|
33
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
34
|
+
display: 'block',
|
35
|
+
}
|
36
|
+
this.history = {
|
37
|
+
name: 'history',
|
38
|
+
w: width, h: 10,
|
39
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
40
|
+
display: 'block',
|
41
|
+
}
|
42
|
+
|
43
|
+
this.RAudiogram = {}
|
44
|
+
Object.assign(this.RAudiogram,
|
45
|
+
audDims[this.name],
|
46
|
+
{
|
47
|
+
name: 'RAudiogram',
|
48
|
+
w: width / 2, h: 100,
|
49
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
50
|
+
display: 'inline',
|
51
|
+
});
|
52
|
+
|
53
|
+
this.LAudiogram = {}
|
54
|
+
Object.assign(this.LAudiogram,
|
55
|
+
audDims[this.name],
|
56
|
+
{
|
57
|
+
name: 'LAudiogram',
|
58
|
+
w: width / 2, h: 100, // پهنای سکشن هست
|
59
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
60
|
+
display: 'block',
|
61
|
+
});
|
62
|
+
|
63
|
+
this.RSpeech = {
|
64
|
+
name: 'RSpeech',
|
65
|
+
w: width / 2, h: 15,
|
66
|
+
margin: { left: 5, top: 1, right: 5, bottom: 1 },
|
67
|
+
display: 'inline',
|
68
|
+
stroke: true,
|
69
|
+
}
|
70
|
+
|
71
|
+
this.LSpeech = {
|
72
|
+
name: 'LSpeech',
|
73
|
+
w: width / 2, h: 15,
|
74
|
+
margin: { left: 5, top: 1, right: 5, bottom: 1 },
|
75
|
+
display: 'block',
|
76
|
+
stroke: true
|
77
|
+
}
|
78
|
+
|
79
|
+
this.RTympanogram = {
|
80
|
+
name: 'RTympanogram',
|
81
|
+
w: width / 2, h: 60,
|
82
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
83
|
+
display: 'inline',
|
84
|
+
}
|
85
|
+
|
86
|
+
this.LTympanogram = {
|
87
|
+
name: 'LTympanogram',
|
88
|
+
w: width / 2, h: 60,
|
89
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
90
|
+
display: 'block',
|
91
|
+
}
|
92
|
+
this.RReflex = {
|
93
|
+
name: 'RReflex',
|
94
|
+
w: width / 2, h: 30,
|
95
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
96
|
+
display: 'inline'
|
97
|
+
}
|
98
|
+
|
99
|
+
this.LReflex = {
|
100
|
+
name: 'LReflex',
|
101
|
+
w: width / 2, h: 30,
|
102
|
+
margin: { left: 2, top: 2, right: 2, bottom: 2 },
|
103
|
+
display: 'block'
|
104
|
+
}
|
105
|
+
|
106
|
+
this.report = {
|
107
|
+
name: 'report',
|
108
|
+
w: width, h: 20,
|
109
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
110
|
+
display: 'block'
|
111
|
+
}
|
112
|
+
|
113
|
+
this.footer = {
|
114
|
+
name: 'footer',
|
115
|
+
w: width, h: 10,
|
116
|
+
margin: { left: 1, top: 1, right: 1, bottom: 1 },
|
117
|
+
display: 'block'
|
118
|
+
}
|
119
|
+
},
|
120
|
+
|
121
|
+
calc2: function () {
|
122
|
+
// let dims = this.dims;
|
123
|
+
let width, height;
|
124
|
+
|
125
|
+
width = this.header.width = this.getWidth(this.header)
|
126
|
+
height = this.header.height = this.getHeight(this.header)
|
127
|
+
|
128
|
+
this.header.elements = [
|
129
|
+
{ type: 'line', x1: 0, y1: height, x2: width, y2: height },
|
130
|
+
{ type: 'text', x: 30, y: 5, value: 'تاریخ :' },
|
131
|
+
]
|
132
|
+
this.header.inputs = [
|
133
|
+
{ name: 'officeName', x: width - 20, y: height - 10 },
|
134
|
+
{ name: 'date', x: 20, y: 5 },
|
135
|
+
]
|
136
|
+
|
137
|
+
width = this.patient.width = this.getWidth(this.patient)
|
138
|
+
this.patient.height = this.getHeight(this.patient)
|
139
|
+
this.patient.elements = [
|
140
|
+
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
141
|
+
{ type: 'text', x: width, y: 5, value: 'نام:' },
|
142
|
+
{ type: 'text', x: width - 30, y: 5, value: 'نام خانوادگی:' },
|
143
|
+
{ type: 'text', x: width - 90, y: 5, value: 'سن:' },
|
144
|
+
{ type: 'text', x: width - 130, y: 5, value: 'ارجاع از:' }
|
145
|
+
]
|
146
|
+
this.patient.inputs = [
|
147
|
+
{ name: 'name', x: width - 5, y: 5 },
|
148
|
+
{ name: 'lastName', x: width - 47, y: 5 },
|
149
|
+
{ name: 'age', x: width - 97, y: 5 },
|
150
|
+
{ name: 'referrer', x: width - 142, y: 5 }
|
151
|
+
]
|
152
|
+
this.patient.forceInputs = [
|
153
|
+
{ name: 'name', x: width - 10, y: 4 },
|
154
|
+
{ name: 'lastName', x: width - 47, y: 5 },
|
155
|
+
{ name: 'age', x: width - 97, y: 5 },
|
156
|
+
{ name: 'referrer', x: width - 142, y: 5 }
|
157
|
+
]
|
158
|
+
|
159
|
+
width = this.history.width = this.getWidth(this.history)
|
160
|
+
this.history.height = this.getHeight(this.history)
|
161
|
+
this.history.elements = [
|
162
|
+
{ type: 'line', x1: 0, y1: 20, x2: width, y2: 20 },
|
163
|
+
{ type: 'text', x: width, y: 5, value: 'شرح حال:' },
|
164
|
+
]
|
165
|
+
this.history.inputs = [
|
166
|
+
{ name: 'description', x: width - 13, y: 5 },
|
167
|
+
]
|
168
|
+
|
169
|
+
width = this.RAudiogram.width = this.getWidth(this.RAudiogram)
|
170
|
+
this.RAudiogram.height = this.getHeight(this.RAudiogram)
|
171
|
+
|
172
|
+
width = this.LAudiogram.width = this.getWidth(this.LAudiogram)
|
173
|
+
this.LAudiogram.height = this.getHeight(this.LAudiogram)
|
174
|
+
|
175
|
+
width = this.RSpeech.width = this.getWidth(this.RSpeech)
|
176
|
+
this.RSpeech.height = this.getHeight(this.RSpeech)
|
177
|
+
this.RSpeech.labels = ["SAT", "SRT", "MCL", "UCL", "SDS"]
|
178
|
+
|
179
|
+
width = this.LSpeech.width = this.getWidth(this.LSpeech)
|
180
|
+
this.LSpeech.height = this.getHeight(this.LSpeech)
|
181
|
+
this.LSpeech.labels = ["SAT", "SRT", "MCL", "UCL", "SDS"]
|
182
|
+
|
183
|
+
width = this.RTympanogram.width = this.getWidth(this.RTympanogram)
|
184
|
+
this.RTympanogram.height = this.getHeight(this.RTympanogram)
|
185
|
+
width = this.LTympanogram.width = this.getWidth(this.LTympanogram)
|
186
|
+
this.LTympanogram.height = this.getHeight(this.LTympanogram)
|
187
|
+
|
188
|
+
width = this.RReflex.width = this.getWidth(this.RReflex)
|
189
|
+
this.RReflex.height = this.getHeight(this.RReflex)
|
190
|
+
width = this.LReflex.width = this.getWidth(this.LReflex)
|
191
|
+
this.LReflex.height = this.getHeight(this.LReflex)
|
192
|
+
|
193
|
+
width = this.report.width = this.getWidth(this.report)
|
194
|
+
this.report.height = this.getHeight(this.report)
|
195
|
+
this.report.elements = [
|
196
|
+
{ type: 'text', x: width, y: 5, value: 'گزارش:' },
|
197
|
+
]
|
198
|
+
this.report.inputs = [
|
199
|
+
{ name: 'description', x: width - 10, y: 5 },
|
200
|
+
]
|
201
|
+
|
202
|
+
width = this.footer.width = this.getWidth(this.footer)
|
203
|
+
this.footer.height = this.getHeight(this.footer)
|
204
|
+
this.footer.elements = [
|
205
|
+
{ type: 'line', x1: 0, y1: 0, x2: width, y2: 0 },
|
206
|
+
{ type: 'text', x: width, y: 5, value: 'آدرس:' },
|
207
|
+
{ type: 'text', x: width - 120, y: 5, value: 'تلفن:' },
|
208
|
+
]
|
209
|
+
this.footer.inputs = [
|
210
|
+
{ name: 'address', x: width - 10, y: 5 },
|
211
|
+
{ name: 'tel', x: width - 128, y: 5 },
|
212
|
+
]
|
213
|
+
},
|
214
|
+
|
215
|
+
getWidth: function (element) {
|
216
|
+
return (element.w - (element.margin.left + element.margin.right))
|
217
|
+
},
|
218
|
+
getHeight: function (element) {
|
219
|
+
return (element.h - (element.margin.top + element.margin.bottom))
|
220
|
+
},
|
221
|
+
|
222
|
+
calcSectionsArray: function () {
|
223
|
+
// این آرایه دقیقا ترتیب قرارگیری سکشن ها را بدون اون اوردر قبلی تعیین میکند
|
224
|
+
this.sections = [
|
225
|
+
this.header,
|
226
|
+
this.patient,
|
227
|
+
this.history,
|
228
|
+
this.RAudiogram,
|
229
|
+
this.LAudiogram,
|
230
|
+
this.RSpeech,
|
231
|
+
this.LSpeech,
|
232
|
+
this.RTympanogram, this.LTympanogram,
|
233
|
+
this.RReflex, this.LReflex,
|
234
|
+
this.report,
|
235
|
+
this.footer
|
236
|
+
|
237
|
+
]
|
238
|
+
},
|
239
|
+
|
240
|
+
}
|
241
|
+
|
242
|
+
combo.calc1()
|
243
|
+
combo.calc2()
|
244
|
+
combo.calcSectionsArray()
|
245
|
+
// پهنا و ارتفاع قابل استفاده منهای پد ها میشه پهنا و ارتفاع اصلی
|
246
|
+
|
247
|
+
export default combo;
|
248
|
+
|