hayun-vite 0.0.2 → 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 -80
- 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,204 +1,204 @@
|
|
1
|
-
const dims = {
|
2
|
-
padding: { left: 6, top: 5, right: 6, bottom: 5 },
|
3
|
-
paper: { type: 'A4', case: 'portraite', width: 210, height: 295.5, },
|
4
|
-
// sections: ['header', 'patient', 'history', ['RAudiogram', 'LAudiogram'], ['RSpeech', 'LSpeech'],],
|
5
|
-
|
6
|
-
// Printable Dimention
|
7
|
-
calc1: function () {
|
8
|
-
|
9
|
-
this.width = this.paper.width - (this.padding.left + this.padding.right);
|
10
|
-
this.height = this.paper.height - (this.padding.top + this.padding.bottom);
|
11
|
-
|
12
|
-
let width = this.width;
|
13
|
-
// ابعاد و پدینگ المنت ها
|
14
|
-
this.header = {
|
15
|
-
name: 'header',
|
16
|
-
w: width, h: 20,
|
17
|
-
pad: { left: 1, top: 1, right: 1, bottom: 2 },
|
18
|
-
display: 'block',
|
19
|
-
}
|
20
|
-
this.patient = {
|
21
|
-
name: 'patient',
|
22
|
-
w: width, h: 10,
|
23
|
-
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
24
|
-
display: 'block',
|
25
|
-
}
|
26
|
-
this.history = {
|
27
|
-
name: 'history',
|
28
|
-
w: width, h: 10,
|
29
|
-
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
30
|
-
display: 'block',
|
31
|
-
}
|
32
|
-
this.RAudiogram = {
|
33
|
-
name: 'RAudiogram',
|
34
|
-
w: width / 2, h: 105,
|
35
|
-
pad: { left: 1, top: 1, right: 1, bottom: 0 },
|
36
|
-
display: 'inline'
|
37
|
-
}
|
38
|
-
this.LAudiogram = {
|
39
|
-
name: 'LAudiogram',
|
40
|
-
w: width / 2, h: 105,
|
41
|
-
pad: { left: 1, top: 1, right: 1, bottom: 0 },
|
42
|
-
display: 'block'
|
43
|
-
}
|
44
|
-
this.RSpeech = {
|
45
|
-
name: 'RSpeech',
|
46
|
-
w: width / 2, h: 20,
|
47
|
-
pad: { left: 2, top: 1, right: 16, bottom: 1 },
|
48
|
-
display: 'inline',
|
49
|
-
}
|
50
|
-
this.LSpeech = {
|
51
|
-
name: 'LSpeech',
|
52
|
-
w: width / 2, h: 20,
|
53
|
-
pad: { left: 16, top: 1, right: 2, bottom: 1 },
|
54
|
-
display: 'block',
|
55
|
-
}
|
56
|
-
this.RTympanogram = {
|
57
|
-
name: 'RTympanogram',
|
58
|
-
w: width / 2, h: 60,
|
59
|
-
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
60
|
-
display: 'inline',
|
61
|
-
}
|
62
|
-
this.LTympanogram = {
|
63
|
-
name: 'LTympanogram',
|
64
|
-
w: width / 2, h: 60,
|
65
|
-
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
66
|
-
display: 'block',
|
67
|
-
}
|
68
|
-
this.RReflex = {
|
69
|
-
name: 'RReflex',
|
70
|
-
w: width / 2, h: 30,
|
71
|
-
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
72
|
-
display: 'inline'
|
73
|
-
}
|
74
|
-
this.LReflex = {
|
75
|
-
name: 'LReflex',
|
76
|
-
w: width / 2, h: 30,
|
77
|
-
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
78
|
-
display: 'block'
|
79
|
-
}
|
80
|
-
this.report = {
|
81
|
-
name: 'report',
|
82
|
-
w: width, h: 20,
|
83
|
-
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
84
|
-
display: 'block'
|
85
|
-
}
|
86
|
-
this.footer = {
|
87
|
-
name: 'footer',
|
88
|
-
w: width, h: 10,
|
89
|
-
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
90
|
-
display: 'block'
|
91
|
-
}
|
92
|
-
},
|
93
|
-
|
94
|
-
calc2: function () {
|
95
|
-
// let dims = this.dims;
|
96
|
-
let width, height;
|
97
|
-
//آیتم های روی این تمپلت
|
98
|
-
// روش جدید محاسبه ابعاد منطقی تر و تمیز تر
|
99
|
-
Object.assign(this.header, {
|
100
|
-
width: this.getWidth(this.patient),
|
101
|
-
height: this.getHeight(this.header)
|
102
|
-
})
|
103
|
-
|
104
|
-
width = this.patient.width = this.getWidth(this.patient)
|
105
|
-
this.patient.height = this.getHeight(this.patient)
|
106
|
-
this.patient.labels = {
|
107
|
-
line: { x1: 0, y1: 20, x2: width, y2: 20 },
|
108
|
-
name: { x: width, y: 5 },
|
109
|
-
lastName: { x: width - 30, y: 5 },
|
110
|
-
age: { x: width - 90, y: 5 },
|
111
|
-
referrer: { x: width - 130, y: 5 }
|
112
|
-
}
|
113
|
-
this.patient.inputs = {
|
114
|
-
name: { x: width - 5, y: 5 },
|
115
|
-
lastName: { x: width - 47, y: 5 },
|
116
|
-
age: { x: width - 97, y: 5 },
|
117
|
-
referrer: { x: width - 142, y: 5 }
|
118
|
-
}
|
119
|
-
|
120
|
-
width = this.history.width = this.getWidth(this.history)
|
121
|
-
this.history.height = this.getHeight(this.history)
|
122
|
-
this.history.labels = {
|
123
|
-
line: { x1: 0, y1: 20, x2: width, y2: 20 },
|
124
|
-
text: { x: width, y: 5 },
|
125
|
-
}
|
126
|
-
this.history.inputs = {
|
127
|
-
text: { x: width - 13, y: 5 },
|
128
|
-
}
|
129
|
-
|
130
|
-
width = this.RAudiogram.width = this.getWidth(this.RAudiogram)
|
131
|
-
this.RAudiogram.height = this.getHeight(this.RAudiogram)
|
132
|
-
width = this.LAudiogram.width = this.getWidth(this.LAudiogram)
|
133
|
-
this.LAudiogram.height = this.getHeight(this.RAudiogram)
|
134
|
-
|
135
|
-
width = this.RSpeech.width = this.getWidth(this.RSpeech)
|
136
|
-
this.RSpeech.height = this.getHeight(this.RSpeech)
|
137
|
-
this.RSpeech.labels = ["SDS", "SRT", "MCL", "UCL"]
|
138
|
-
|
139
|
-
width = this.LSpeech.width = this.getWidth(this.LSpeech)
|
140
|
-
this.LSpeech.height = this.getHeight(this.LSpeech)
|
141
|
-
this.LSpeech.labels = ["SDS", "SRT", "MCL", "UCL", "SAT"]
|
142
|
-
|
143
|
-
width = this.RTympanogram.width = this.getWidth(this.RTympanogram)
|
144
|
-
this.RTympanogram.height = this.getHeight(this.RTympanogram)
|
145
|
-
width = this.LTympanogram.width = this.getWidth(this.LTympanogram)
|
146
|
-
this.LTympanogram.height = this.getHeight(this.LTympanogram)
|
147
|
-
|
148
|
-
width = this.RReflex.width = this.getWidth(this.RReflex)
|
149
|
-
this.RReflex.height = this.getHeight(this.RReflex)
|
150
|
-
width = this.LReflex.width = this.getWidth(this.LReflex)
|
151
|
-
this.LReflex.height = this.getHeight(this.LReflex)
|
152
|
-
|
153
|
-
width = this.report.width = this.getWidth(this.report)
|
154
|
-
this.report.height = this.getHeight(this.report)
|
155
|
-
this.report.labels = {
|
156
|
-
name: { x: width, y: 5 },
|
157
|
-
}
|
158
|
-
this.report.inputs = {
|
159
|
-
name: { x: width - 5, y: 5 },
|
160
|
-
}
|
161
|
-
|
162
|
-
width = this.footer.width = this.getWidth(this.footer)
|
163
|
-
this.footer.height = this.getHeight(this.footer)
|
164
|
-
this.footer.labels = {
|
165
|
-
name: { x: width, y: 5 },
|
166
|
-
}
|
167
|
-
this.footer.inputs = {
|
168
|
-
name: { x: width - 5, y: 5 },
|
169
|
-
}
|
170
|
-
},
|
171
|
-
|
172
|
-
getWidth: function (element) {
|
173
|
-
return (element.w - (element.pad.left + element.pad.right))
|
174
|
-
},
|
175
|
-
getHeight: function (element) {
|
176
|
-
return (element.h - (element.pad.top + element.pad.bottom))
|
177
|
-
},
|
178
|
-
|
179
|
-
calcSectionsArray: function () {
|
180
|
-
// این آرایه دقیقا ترتیب قرارگیری سکشن ها را بدون اون اوردر قبلی تعیین میکند
|
181
|
-
this.sections = [
|
182
|
-
this.header,
|
183
|
-
this.patient,
|
184
|
-
this.history,
|
185
|
-
this.RAudiogram, this.LAudiogram,
|
186
|
-
this.RSpeech, this.LSpeech,
|
187
|
-
this.RTympanogram, this.LTympanogram,
|
188
|
-
this.RReflex, this.LReflex,
|
189
|
-
this.report,
|
190
|
-
this.footer
|
191
|
-
|
192
|
-
]
|
193
|
-
},
|
194
|
-
|
195
|
-
|
196
|
-
}
|
197
|
-
|
198
|
-
dims.calc1()
|
199
|
-
dims.calc2()
|
200
|
-
dims.calcSectionsArray()
|
201
|
-
// پهنا و ارتفاع قابل استفاده منهای پد ها میشه پهنا و ارتفاع اصلی
|
202
|
-
|
203
|
-
export default dims;
|
204
|
-
|
1
|
+
const dims = {
|
2
|
+
padding: { left: 6, top: 5, right: 6, bottom: 5 },
|
3
|
+
paper: { type: 'A4', case: 'portraite', width: 210, height: 295.5, },
|
4
|
+
// sections: ['header', 'patient', 'history', ['RAudiogram', 'LAudiogram'], ['RSpeech', 'LSpeech'],],
|
5
|
+
|
6
|
+
// Printable Dimention
|
7
|
+
calc1: function () {
|
8
|
+
|
9
|
+
this.width = this.paper.width - (this.padding.left + this.padding.right);
|
10
|
+
this.height = this.paper.height - (this.padding.top + this.padding.bottom);
|
11
|
+
|
12
|
+
let width = this.width;
|
13
|
+
// ابعاد و پدینگ المنت ها
|
14
|
+
this.header = {
|
15
|
+
name: 'header',
|
16
|
+
w: width, h: 20,
|
17
|
+
pad: { left: 1, top: 1, right: 1, bottom: 2 },
|
18
|
+
display: 'block',
|
19
|
+
}
|
20
|
+
this.patient = {
|
21
|
+
name: 'patient',
|
22
|
+
w: width, h: 10,
|
23
|
+
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
24
|
+
display: 'block',
|
25
|
+
}
|
26
|
+
this.history = {
|
27
|
+
name: 'history',
|
28
|
+
w: width, h: 10,
|
29
|
+
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
30
|
+
display: 'block',
|
31
|
+
}
|
32
|
+
this.RAudiogram = {
|
33
|
+
name: 'RAudiogram',
|
34
|
+
w: width / 2, h: 105,
|
35
|
+
pad: { left: 1, top: 1, right: 1, bottom: 0 },
|
36
|
+
display: 'inline'
|
37
|
+
}
|
38
|
+
this.LAudiogram = {
|
39
|
+
name: 'LAudiogram',
|
40
|
+
w: width / 2, h: 105,
|
41
|
+
pad: { left: 1, top: 1, right: 1, bottom: 0 },
|
42
|
+
display: 'block'
|
43
|
+
}
|
44
|
+
this.RSpeech = {
|
45
|
+
name: 'RSpeech',
|
46
|
+
w: width / 2, h: 20,
|
47
|
+
pad: { left: 2, top: 1, right: 16, bottom: 1 },
|
48
|
+
display: 'inline',
|
49
|
+
}
|
50
|
+
this.LSpeech = {
|
51
|
+
name: 'LSpeech',
|
52
|
+
w: width / 2, h: 20,
|
53
|
+
pad: { left: 16, top: 1, right: 2, bottom: 1 },
|
54
|
+
display: 'block',
|
55
|
+
}
|
56
|
+
this.RTympanogram = {
|
57
|
+
name: 'RTympanogram',
|
58
|
+
w: width / 2, h: 60,
|
59
|
+
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
60
|
+
display: 'inline',
|
61
|
+
}
|
62
|
+
this.LTympanogram = {
|
63
|
+
name: 'LTympanogram',
|
64
|
+
w: width / 2, h: 60,
|
65
|
+
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
66
|
+
display: 'block',
|
67
|
+
}
|
68
|
+
this.RReflex = {
|
69
|
+
name: 'RReflex',
|
70
|
+
w: width / 2, h: 30,
|
71
|
+
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
72
|
+
display: 'inline'
|
73
|
+
}
|
74
|
+
this.LReflex = {
|
75
|
+
name: 'LReflex',
|
76
|
+
w: width / 2, h: 30,
|
77
|
+
pad: { left: 2, top: 2, right: 2, bottom: 2 },
|
78
|
+
display: 'block'
|
79
|
+
}
|
80
|
+
this.report = {
|
81
|
+
name: 'report',
|
82
|
+
w: width, h: 20,
|
83
|
+
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
84
|
+
display: 'block'
|
85
|
+
}
|
86
|
+
this.footer = {
|
87
|
+
name: 'footer',
|
88
|
+
w: width, h: 10,
|
89
|
+
pad: { left: 1, top: 1, right: 1, bottom: 1 },
|
90
|
+
display: 'block'
|
91
|
+
}
|
92
|
+
},
|
93
|
+
|
94
|
+
calc2: function () {
|
95
|
+
// let dims = this.dims;
|
96
|
+
let width, height;
|
97
|
+
//آیتم های روی این تمپلت
|
98
|
+
// روش جدید محاسبه ابعاد منطقی تر و تمیز تر
|
99
|
+
Object.assign(this.header, {
|
100
|
+
width: this.getWidth(this.patient),
|
101
|
+
height: this.getHeight(this.header)
|
102
|
+
})
|
103
|
+
|
104
|
+
width = this.patient.width = this.getWidth(this.patient)
|
105
|
+
this.patient.height = this.getHeight(this.patient)
|
106
|
+
this.patient.labels = {
|
107
|
+
line: { x1: 0, y1: 20, x2: width, y2: 20 },
|
108
|
+
name: { x: width, y: 5 },
|
109
|
+
lastName: { x: width - 30, y: 5 },
|
110
|
+
age: { x: width - 90, y: 5 },
|
111
|
+
referrer: { x: width - 130, y: 5 }
|
112
|
+
}
|
113
|
+
this.patient.inputs = {
|
114
|
+
name: { x: width - 5, y: 5 },
|
115
|
+
lastName: { x: width - 47, y: 5 },
|
116
|
+
age: { x: width - 97, y: 5 },
|
117
|
+
referrer: { x: width - 142, y: 5 }
|
118
|
+
}
|
119
|
+
|
120
|
+
width = this.history.width = this.getWidth(this.history)
|
121
|
+
this.history.height = this.getHeight(this.history)
|
122
|
+
this.history.labels = {
|
123
|
+
line: { x1: 0, y1: 20, x2: width, y2: 20 },
|
124
|
+
text: { x: width, y: 5 },
|
125
|
+
}
|
126
|
+
this.history.inputs = {
|
127
|
+
text: { x: width - 13, y: 5 },
|
128
|
+
}
|
129
|
+
|
130
|
+
width = this.RAudiogram.width = this.getWidth(this.RAudiogram)
|
131
|
+
this.RAudiogram.height = this.getHeight(this.RAudiogram)
|
132
|
+
width = this.LAudiogram.width = this.getWidth(this.LAudiogram)
|
133
|
+
this.LAudiogram.height = this.getHeight(this.RAudiogram)
|
134
|
+
|
135
|
+
width = this.RSpeech.width = this.getWidth(this.RSpeech)
|
136
|
+
this.RSpeech.height = this.getHeight(this.RSpeech)
|
137
|
+
this.RSpeech.labels = ["SDS", "SRT", "MCL", "UCL"]
|
138
|
+
|
139
|
+
width = this.LSpeech.width = this.getWidth(this.LSpeech)
|
140
|
+
this.LSpeech.height = this.getHeight(this.LSpeech)
|
141
|
+
this.LSpeech.labels = ["SDS", "SRT", "MCL", "UCL", "SAT"]
|
142
|
+
|
143
|
+
width = this.RTympanogram.width = this.getWidth(this.RTympanogram)
|
144
|
+
this.RTympanogram.height = this.getHeight(this.RTympanogram)
|
145
|
+
width = this.LTympanogram.width = this.getWidth(this.LTympanogram)
|
146
|
+
this.LTympanogram.height = this.getHeight(this.LTympanogram)
|
147
|
+
|
148
|
+
width = this.RReflex.width = this.getWidth(this.RReflex)
|
149
|
+
this.RReflex.height = this.getHeight(this.RReflex)
|
150
|
+
width = this.LReflex.width = this.getWidth(this.LReflex)
|
151
|
+
this.LReflex.height = this.getHeight(this.LReflex)
|
152
|
+
|
153
|
+
width = this.report.width = this.getWidth(this.report)
|
154
|
+
this.report.height = this.getHeight(this.report)
|
155
|
+
this.report.labels = {
|
156
|
+
name: { x: width, y: 5 },
|
157
|
+
}
|
158
|
+
this.report.inputs = {
|
159
|
+
name: { x: width - 5, y: 5 },
|
160
|
+
}
|
161
|
+
|
162
|
+
width = this.footer.width = this.getWidth(this.footer)
|
163
|
+
this.footer.height = this.getHeight(this.footer)
|
164
|
+
this.footer.labels = {
|
165
|
+
name: { x: width, y: 5 },
|
166
|
+
}
|
167
|
+
this.footer.inputs = {
|
168
|
+
name: { x: width - 5, y: 5 },
|
169
|
+
}
|
170
|
+
},
|
171
|
+
|
172
|
+
getWidth: function (element) {
|
173
|
+
return (element.w - (element.pad.left + element.pad.right))
|
174
|
+
},
|
175
|
+
getHeight: function (element) {
|
176
|
+
return (element.h - (element.pad.top + element.pad.bottom))
|
177
|
+
},
|
178
|
+
|
179
|
+
calcSectionsArray: function () {
|
180
|
+
// این آرایه دقیقا ترتیب قرارگیری سکشن ها را بدون اون اوردر قبلی تعیین میکند
|
181
|
+
this.sections = [
|
182
|
+
this.header,
|
183
|
+
this.patient,
|
184
|
+
this.history,
|
185
|
+
this.RAudiogram, this.LAudiogram,
|
186
|
+
this.RSpeech, this.LSpeech,
|
187
|
+
this.RTympanogram, this.LTympanogram,
|
188
|
+
this.RReflex, this.LReflex,
|
189
|
+
this.report,
|
190
|
+
this.footer
|
191
|
+
|
192
|
+
]
|
193
|
+
},
|
194
|
+
|
195
|
+
|
196
|
+
}
|
197
|
+
|
198
|
+
dims.calc1()
|
199
|
+
dims.calc2()
|
200
|
+
dims.calcSectionsArray()
|
201
|
+
// پهنا و ارتفاع قابل استفاده منهای پد ها میشه پهنا و ارتفاع اصلی
|
202
|
+
|
203
|
+
export default dims;
|
204
|
+
|