|
|
@@ -635,6 +635,12 @@
|
|
|
}
|
|
|
// 回调
|
|
|
async function callEditChange({ record }) {
|
|
|
+ console.log('🚀 ~ file: FormModal.vue:638 ~ callEditChange ~ record:', record);
|
|
|
+ console.log(
|
|
|
+ '🚀 ~ file: FormModal.vue:648 ~ callEditChange ~ tableRecordType.value:',
|
|
|
+ tableRecordType.value,
|
|
|
+ );
|
|
|
+
|
|
|
if (
|
|
|
record.type == DiagnosisEnum.complications_field ||
|
|
|
record.type == DiagnosisEnum.clinic_field ||
|
|
|
@@ -642,27 +648,26 @@
|
|
|
record.type == DiagnosisEnum.ckd_field ||
|
|
|
record.type == DiagnosisEnum.allergic_field
|
|
|
) {
|
|
|
- if (tableRecordType.value != record.contentType) {
|
|
|
+ if (tableRecordType.value != record.contentType || !record.nameOptions.length) {
|
|
|
tableRecordType.value = record.contentType;
|
|
|
let res = [];
|
|
|
res = await listDictModel({ dictCode: record.contentType });
|
|
|
record.nameOptions = res;
|
|
|
record.name = [];
|
|
|
+ }
|
|
|
+ if (record.name.length > 3) {
|
|
|
+ // createMessage.error('每次最多选择4个');
|
|
|
+ record.nameOptions = record.nameOptions.map(ele => {
|
|
|
+ if (!record.name.includes(ele.value)) {
|
|
|
+ ele.disabled = true;
|
|
|
+ }
|
|
|
+ return ele;
|
|
|
+ });
|
|
|
} else {
|
|
|
- if (record.name.length > 3) {
|
|
|
- // createMessage.error('每次最多选择4个');
|
|
|
- record.nameOptions = record.nameOptions.map(ele => {
|
|
|
- if (!record.name.includes(ele.value)) {
|
|
|
- ele.disabled = true;
|
|
|
- }
|
|
|
- return ele;
|
|
|
- });
|
|
|
- } else {
|
|
|
- record.nameOptions = record.nameOptions.map(ele => {
|
|
|
- ele.disabled = false;
|
|
|
- return ele;
|
|
|
- });
|
|
|
- }
|
|
|
+ record.nameOptions = record.nameOptions.map(ele => {
|
|
|
+ ele.disabled = false;
|
|
|
+ return ele;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|