[WIP] Добавил форму изменения состояния зубов

This commit is contained in:
DwCay
2023-05-31 17:47:29 +03:00
parent 89adf5489f
commit c7aedc53d6
8 changed files with 205 additions and 607 deletions

View File

@@ -1,583 +1,33 @@
const stateInit = {
lacticBite: false,
formula: {
18: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
formula: (() => {
let initObj = {};
let arrayTooth = [
18, 17, 16, 15, 14, 13, 12, 11, 21, 22, 23, 24, 25, 26, 27, 28, 48, 47,
46, 45, 44, 43, 42, 41, 31, 32, 33, 34, 35, 36, 37, 38,
];
arrayTooth.forEach((number) => {
initObj[number] = {
dental_condition: {
general: null,
crown: {
central: [],
upper: [],
lower: [],
left: [],
right: [],
},
root: {
central: [],
left: [],
right: [],
},
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
17: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
16: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
15: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
14: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
13: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
12: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
11: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
21: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
22: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
23: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
24: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
25: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
26: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
27: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
28: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
48: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
47: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
46: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
45: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
44: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
43: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
42: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
41: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
31: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
32: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
33: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
34: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
35: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
36: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
37: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
38: {
dental_condition: {
general: null,
crown: {
central: null,
upper: null,
lower: null,
left: null,
right: null,
},
root: {
central: null,
left: null,
right: null,
},
},
tooth_mobility: null,
},
},
tooth_mobility: null,
};
});
return initObj;
})(),
};
const state = {
@@ -605,7 +55,7 @@ const state = {
general: "ИЗ",
crown: {
...stateInit.formula["11"].dental_condition.crown,
central: "К",
central: ["К"],
},
root: { ...stateInit.formula["11"].dental_condition.root },
},
@@ -639,7 +89,7 @@ const state = {
dental_condition: {
general: "ИЗ",
crown: { ...stateInit.formula["41"].dental_condition.crown },
root: { ...stateInit.formula["41"].dental_condition.root, left: "П" },
root: { ...stateInit.formula["41"].dental_condition.root, left: ["П"] },
},
tooth_mobility: null,
},