|
@@ -164,7 +164,7 @@
|
|
|
archivesDiagnosisHistoryMultiAddOrEdit,
|
|
archivesDiagnosisHistoryMultiAddOrEdit,
|
|
|
} from '/@/api/biz/archives/diagnosisHistoryApi';
|
|
} from '/@/api/biz/archives/diagnosisHistoryApi';
|
|
|
import { nanoid } from 'nanoid';
|
|
import { nanoid } from 'nanoid';
|
|
|
- import { listDictModelBatch } from '@/api/common';
|
|
|
|
|
|
|
+ import { listDictModel, listDictModelBatch } from '@/api/common';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
|
|
|
|
|
const emit = defineEmits(['success', 'register']);
|
|
const emit = defineEmits(['success', 'register']);
|
|
@@ -179,6 +179,7 @@
|
|
|
// 表格数据
|
|
// 表格数据
|
|
|
// 过敏史
|
|
// 过敏史
|
|
|
const tableDataAllergic = ref([]);
|
|
const tableDataAllergic = ref([]);
|
|
|
|
|
+ const tableRecordType = ref('');
|
|
|
// 传染病史
|
|
// 传染病史
|
|
|
const tableDataContagious = ref([]);
|
|
const tableDataContagious = ref([]);
|
|
|
const tableDataOperation = ref([]);
|
|
const tableDataOperation = ref([]);
|
|
@@ -189,28 +190,28 @@
|
|
|
const { createMessage } = useMessage();
|
|
const { createMessage } = useMessage();
|
|
|
const bizDictOptions = reactive<any>({});
|
|
const bizDictOptions = reactive<any>({});
|
|
|
const bizDictData = ref([
|
|
const bizDictData = ref([
|
|
|
- { key: 'dh_allergic', dictCode: 'dh_allergic' },
|
|
|
|
|
|
|
+ { key: 'allergic', dictCode: 'allergic' },
|
|
|
{ key: 'allergic_food', dictCode: 'allergic_food' },
|
|
{ key: 'allergic_food', dictCode: 'allergic_food' },
|
|
|
{ key: 'allergic_touch', dictCode: 'allergic_touch' },
|
|
{ key: 'allergic_touch', dictCode: 'allergic_touch' },
|
|
|
{ key: 'allergic_air', dictCode: 'allergic_air' },
|
|
{ key: 'allergic_air', dictCode: 'allergic_air' },
|
|
|
{ key: 'allergic_inject', dictCode: 'allergic_inject' },
|
|
{ key: 'allergic_inject', dictCode: 'allergic_inject' },
|
|
|
- { key: 'dh_contagious_status', dictCode: 'dh_contagious_status' },
|
|
|
|
|
|
|
+ { key: 'contagious', dictCode: 'contagious' },
|
|
|
{ key: 'pb_epidemic', dictCode: 'pb_epidemic' },
|
|
{ key: 'pb_epidemic', dictCode: 'pb_epidemic' },
|
|
|
- { key: 'dh_complications', dictCode: 'dh_complications' },
|
|
|
|
|
|
|
+ { key: 'complications', dictCode: 'complications' },
|
|
|
{ key: 'complications_breath', dictCode: 'complications_breath' },
|
|
{ key: 'complications_breath', dictCode: 'complications_breath' },
|
|
|
{ key: 'complications_blood', dictCode: 'complications_blood' },
|
|
{ key: 'complications_blood', dictCode: 'complications_blood' },
|
|
|
{ key: 'complications_incretion', dictCode: 'complications_incretion' },
|
|
{ key: 'complications_incretion', dictCode: 'complications_incretion' },
|
|
|
- { key: 'dh_clinic', dictCode: 'dh_clinic' },
|
|
|
|
|
|
|
+ { key: 'clinic', dictCode: 'clinic' },
|
|
|
{ key: 'clinic_breath', dictCode: 'clinic_breath' },
|
|
{ key: 'clinic_breath', dictCode: 'clinic_breath' },
|
|
|
{ key: 'clinic_heart', dictCode: 'clinic_heart' },
|
|
{ key: 'clinic_heart', dictCode: 'clinic_heart' },
|
|
|
{ key: 'clinic_blood', dictCode: 'clinic_blood' },
|
|
{ key: 'clinic_blood', dictCode: 'clinic_blood' },
|
|
|
{ key: 'clinic_hbgr', dictCode: 'clinic_hbgr' },
|
|
{ key: 'clinic_hbgr', dictCode: 'clinic_hbgr' },
|
|
|
- { key: 'dh_pathological', dictCode: 'dh_pathological' },
|
|
|
|
|
|
|
+ { key: 'pathological', dictCode: 'pathological' },
|
|
|
{ key: 'pathological_breath', dictCode: 'pathological_breath' },
|
|
{ key: 'pathological_breath', dictCode: 'pathological_breath' },
|
|
|
{ key: 'pathological_heart', dictCode: 'pathological_heart' },
|
|
{ key: 'pathological_heart', dictCode: 'pathological_heart' },
|
|
|
{ key: 'pathological_blood', dictCode: 'pathological_blood' },
|
|
{ key: 'pathological_blood', dictCode: 'pathological_blood' },
|
|
|
{ key: 'pathological_hbgr', dictCode: 'pathological_hbgr' },
|
|
{ key: 'pathological_hbgr', dictCode: 'pathological_hbgr' },
|
|
|
- { key: 'dh_ckd', dictCode: 'dh_ckd' },
|
|
|
|
|
|
|
+ { key: 'ckd', dictCode: 'ckd' },
|
|
|
{ key: 'ckd_breath', dictCode: 'ckd_breath' },
|
|
{ key: 'ckd_breath', dictCode: 'ckd_breath' },
|
|
|
{ key: 'ckd_heart', dictCode: 'ckd_heart' },
|
|
{ key: 'ckd_heart', dictCode: 'ckd_heart' },
|
|
|
{ key: 'ckd_blood', dictCode: 'ckd_blood' },
|
|
{ key: 'ckd_blood', dictCode: 'ckd_blood' },
|
|
@@ -254,6 +255,7 @@
|
|
|
data.content.map(ele => {
|
|
data.content.map(ele => {
|
|
|
const nameOptions = bizDictOptions[ele.contentType];
|
|
const nameOptions = bizDictOptions[ele.contentType];
|
|
|
return {
|
|
return {
|
|
|
|
|
+ type: type.value,
|
|
|
contentType: ele.contentType,
|
|
contentType: ele.contentType,
|
|
|
typeOptions: typeOptions.value,
|
|
typeOptions: typeOptions.value,
|
|
|
name: ele.multiName,
|
|
name: ele.multiName,
|
|
@@ -271,6 +273,7 @@
|
|
|
(data.content.length &&
|
|
(data.content.length &&
|
|
|
data.content.map(ele => {
|
|
data.content.map(ele => {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ type: type.value,
|
|
|
singleName: ele.singleName,
|
|
singleName: ele.singleName,
|
|
|
recordTime: dayjs(ele.recordTime).format('YYYY-MM-DD'),
|
|
recordTime: dayjs(ele.recordTime).format('YYYY-MM-DD'),
|
|
|
remark: ele.remark,
|
|
remark: ele.remark,
|
|
@@ -288,6 +291,7 @@
|
|
|
(data.content.length &&
|
|
(data.content.length &&
|
|
|
data.content.map(ele => {
|
|
data.content.map(ele => {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ type: type.value,
|
|
|
contentType: ele.contentType,
|
|
contentType: ele.contentType,
|
|
|
typeOptions: typeOptions.value,
|
|
typeOptions: typeOptions.value,
|
|
|
startTime: ele.startTime ? dayjs(ele.startTime).format('YYYY-MM-DD') : '',
|
|
startTime: ele.startTime ? dayjs(ele.startTime).format('YYYY-MM-DD') : '',
|
|
@@ -314,6 +318,7 @@
|
|
|
data.multiContent.map(ele => {
|
|
data.multiContent.map(ele => {
|
|
|
const nameOptions = bizDictOptions[ele.type];
|
|
const nameOptions = bizDictOptions[ele.type];
|
|
|
return {
|
|
return {
|
|
|
|
|
+ type: type.value,
|
|
|
contentType: ele.type,
|
|
contentType: ele.type,
|
|
|
typeOptions: typeOptions.value,
|
|
typeOptions: typeOptions.value,
|
|
|
name: ele.multiName || [],
|
|
name: ele.multiName || [],
|
|
@@ -332,15 +337,17 @@
|
|
|
// type: type.value,
|
|
// type: type.value,
|
|
|
// };
|
|
// };
|
|
|
resData = {
|
|
resData = {
|
|
|
- recordTime: dayjs(data.updateTime).format('YYYY-MM-DD'),
|
|
|
|
|
|
|
+ recordTime: data.updateTime
|
|
|
|
|
+ ? dayjs(data.updateTime).format('YYYY-MM-DD')
|
|
|
|
|
+ : dayjs().format('YYYY-MM-DD'),
|
|
|
name: data.updatorName,
|
|
name: data.updatorName,
|
|
|
type: type.value,
|
|
type: type.value,
|
|
|
};
|
|
};
|
|
|
// 首次透析方式
|
|
// 首次透析方式
|
|
|
if (type.value == DiagnosisEnum.firstDialysis_field) {
|
|
if (type.value == DiagnosisEnum.firstDialysis_field) {
|
|
|
- resData.firstDialysisType = data.content[0].contentType;
|
|
|
|
|
|
|
+ resData.firstDialysisType = data.content[0]?.contentType;
|
|
|
resData.firstDialysisDate = dayjs().format('YYYY-MM-DD');
|
|
resData.firstDialysisDate = dayjs().format('YYYY-MM-DD');
|
|
|
- resData.recordTime = dayjs(data.content[0].recordTime).format('YYYY-MM-DD');
|
|
|
|
|
|
|
+ resData.recordTime = dayjs(data.content[0]?.recordTime).format('YYYY-MM-DD');
|
|
|
}
|
|
}
|
|
|
await setFieldsValue({
|
|
await setFieldsValue({
|
|
|
...resData,
|
|
...resData,
|
|
@@ -421,6 +428,7 @@
|
|
|
async function handleAdd() {
|
|
async function handleAdd() {
|
|
|
if (type.value == DiagnosisEnum.allergic_field) {
|
|
if (type.value == DiagnosisEnum.allergic_field) {
|
|
|
tableDataAllergic.value.push({
|
|
tableDataAllergic.value.push({
|
|
|
|
|
+ type: type.value,
|
|
|
contentType: '',
|
|
contentType: '',
|
|
|
typeOptions: typeOptions.value,
|
|
typeOptions: typeOptions.value,
|
|
|
name: [],
|
|
name: [],
|
|
@@ -436,6 +444,7 @@
|
|
|
}
|
|
}
|
|
|
if (type.value == DiagnosisEnum.operation_field) {
|
|
if (type.value == DiagnosisEnum.operation_field) {
|
|
|
tableDataOperation.value.push({
|
|
tableDataOperation.value.push({
|
|
|
|
|
+ type: type.value,
|
|
|
singleName: '',
|
|
singleName: '',
|
|
|
recordTime: dayjs().format('YYYY-MM-DD'),
|
|
recordTime: dayjs().format('YYYY-MM-DD'),
|
|
|
remark: '',
|
|
remark: '',
|
|
@@ -450,6 +459,7 @@
|
|
|
}
|
|
}
|
|
|
if (type.value == DiagnosisEnum.contagious_field) {
|
|
if (type.value == DiagnosisEnum.contagious_field) {
|
|
|
tableDataContagious.value.push({
|
|
tableDataContagious.value.push({
|
|
|
|
|
+ type: type.value,
|
|
|
contentType: '',
|
|
contentType: '',
|
|
|
startTime: '',
|
|
startTime: '',
|
|
|
endTime: '',
|
|
endTime: '',
|
|
@@ -471,6 +481,7 @@
|
|
|
type.value == DiagnosisEnum.ckd_field
|
|
type.value == DiagnosisEnum.ckd_field
|
|
|
) {
|
|
) {
|
|
|
tableDataMulti.value.push({
|
|
tableDataMulti.value.push({
|
|
|
|
|
+ type: type.value,
|
|
|
contentType: '',
|
|
contentType: '',
|
|
|
typeOptions: typeOptions.value,
|
|
typeOptions: typeOptions.value,
|
|
|
name: [],
|
|
name: [],
|
|
@@ -486,6 +497,7 @@
|
|
|
}
|
|
}
|
|
|
if (type.value == DiagnosisEnum.elseRemark_field) {
|
|
if (type.value == DiagnosisEnum.elseRemark_field) {
|
|
|
tableDataOther.value.push({
|
|
tableDataOther.value.push({
|
|
|
|
|
+ type: type.value,
|
|
|
remark: '',
|
|
remark: '',
|
|
|
id: nanoid(5),
|
|
id: nanoid(5),
|
|
|
});
|
|
});
|
|
@@ -614,7 +626,7 @@
|
|
|
unref(isSingle)
|
|
unref(isSingle)
|
|
|
? await archivesDiagnosisHistorySingleAddOrEdit(sendData)
|
|
? await archivesDiagnosisHistorySingleAddOrEdit(sendData)
|
|
|
: await archivesDiagnosisHistoryMultiAddOrEdit(sendData);
|
|
: await archivesDiagnosisHistoryMultiAddOrEdit(sendData);
|
|
|
- createMessage.success(`${rowId.value || isSingle.value ? '编辑' : '新增'}成功!`);
|
|
|
|
|
|
|
+ createMessage.success(`${rowId.value ? '编辑' : '新增'}成功!`);
|
|
|
closeModal();
|
|
closeModal();
|
|
|
emit('success');
|
|
emit('success');
|
|
|
} finally {
|
|
} finally {
|
|
@@ -623,7 +635,36 @@
|
|
|
}
|
|
}
|
|
|
// 回调
|
|
// 回调
|
|
|
async function callEditChange({ record }) {
|
|
async function callEditChange({ record }) {
|
|
|
- console.log('🚀 ~ file: FormModal.vue:164 ~ callAllergicChange ~ data:', record);
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ record.type == DiagnosisEnum.complications_field ||
|
|
|
|
|
+ record.type == DiagnosisEnum.clinic_field ||
|
|
|
|
|
+ record.type == DiagnosisEnum.pathological_field ||
|
|
|
|
|
+ record.type == DiagnosisEnum.ckd_field ||
|
|
|
|
|
+ record.type == DiagnosisEnum.allergic_field
|
|
|
|
|
+ ) {
|
|
|
|
|
+ if (tableRecordType.value != record.contentType) {
|
|
|
|
|
+ tableRecordType.value = record.contentType;
|
|
|
|
|
+ let res = [];
|
|
|
|
|
+ res = await listDictModel({ dictCode: record.contentType });
|
|
|
|
|
+ record.nameOptions = res;
|
|
|
|
|
+ record.name = [];
|
|
|
|
|
+ } 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;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|