[WIP] Доработал покраску и детализацию изображения зуба

This commit is contained in:
DwCay
2023-06-19 17:51:01 +03:00
parent 735abae887
commit 7ab1e2e129
7 changed files with 215 additions and 139 deletions

View File

@@ -81,8 +81,8 @@ export const getFilledConditions = (condition) => {
};
export function getToothImageConfig(data) {
let grey = "var(--border-light-grey-color grey)";
let yellow = "var(--bg-yellow-warning yellow)";
let grey = "var(--border-light-grey-color)";
let yellow = "var(--bg-yellow-warning)";
let red = "var(--border-red-color)";
let resulConfig = {};
Object.keys(data).forEach((key) => {
@@ -91,8 +91,8 @@ export function getToothImageConfig(data) {
} else if (key === "crown") {
let keyConfig = {
general: {
fill: grey,
injury: false,
fill: resulConfig.general === "П" ? red : grey,
injury: resulConfig.general === "П",
seal: false,
},
};
@@ -106,7 +106,7 @@ export function getToothImageConfig(data) {
keyConfig.general.seal = true;
} else {
if (data[key][part].includes("П") || data[key][part].includes("Пт")) {
partConfig.grey = red;
partConfig.fill = red;
partConfig.injury = true;
if (!keyConfig.general.seal) {
keyConfig.general.fill = red;
@@ -114,7 +114,9 @@ export function getToothImageConfig(data) {
}
}
if (data[key][part].includes("Д")) {
partConfig.fill = yellow;
if (partConfig.fill !== red) {
partConfig.fill = yellow;
}
if (!keyConfig.general.seal && !keyConfig.general.injury) {
keyConfig.general.fill = yellow;
}
@@ -134,7 +136,7 @@ export function getToothImageConfig(data) {
fill: grey,
injury: false,
};
if (data[key][part].includes("Пт")) {
if (data[key][part].includes(") || data[key][part].includes(т")) {
partConfig.fill = red;
partConfig.injury = true;
}

View File

@@ -1002,7 +1002,7 @@ export const protocolForms = [
},
root: {
options: (() => {
let arrayOptions = ["К", "П", "Д", "Пл"];
let arrayOptions = ["К", "П", "Д", "Пл", "КЗ", "Пт"];
return arrayOptions.map((item) => ({
value: item,
label: toothConditions[item],