pengjun 2 weeks ago
parent
commit
6f9db8ed03
  1. 59
      src/components/report/NationHealthReport.vue
  2. 14
      src/views/customerOrg/customerOrgGroup.vue
  3. 40
      src/views/customerOrg/patientRegisterSign.vue
  4. 79
      src/views/report/report.vue

59
src/components/report/NationHealthReport.vue

@ -95,6 +95,7 @@ import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { deepCopy } from "../../utlis/proFunc"
import CusOrgOCX from "./CusOrgOCX.vue"
import moment from "moment";
import { setDBCom, getDBCom } from "../../utlis/indexedDB";
export default {
components: {
@ -110,6 +111,7 @@ export default {
customerOrg: [],
customerOrgAll: [],
query: {
dateType: '1',
startDate: '',
@ -170,20 +172,44 @@ export default {
...mapState(["window", "dict", "patientRegister", "report"]),
},
methods: {
//
dictInit() {
let today = moment(new Date()).format("YYYY-MM-DD")
this.query.startDate = today
this.query.endDate = today
//
getOrg1() {
getDBCom('orgDatas1')
.then(localData => {
let now = Date.now()
// 24 = 86400000
if (localData?.createdat && localData.data.length > 0 && now - 43200000 < localData.createdat) {
this.customerOrgAll = localData.data
this.customerOrg = this.customerOrgAll.slice(0,20)
} else {
this.getOrg1Api()
}
})
.catch(err => {
console.error(err)
this.getOrg1Api()
})
},
//
getapi("/api/app/customer-org/parent-all").then((res) => {
getOrg1Api() {
postapi("/api/app/CustomerOrg/GetParentCustomerOrgSimple", { isPerson: 'N' }).then((res) => {
if (res.code != -1) {
this.customerOrgAll = res.data;
this.customerOrg = deepCopy(this.customerOrgAll);
// let lfind = arrayExistObj(this.customerOrgAll, "id", this.dict.personOrgId);
// if (lfind > -1) this.customerOrgAll.splice(lfind, 1);
this.customerOrg = this.customerOrgAll.slice(0, 20)
setDBCom('orgDatas1', this.customerOrgAll) //
}
});
},
//
dictInit() {
let today = moment(new Date()).format("YYYY-MM-DD")
this.query.startDate = today
this.query.endDate = today
this.getOrg1()
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code > -1) {
@ -195,18 +221,12 @@ export default {
//
filterMethod(keyWords) {
if (keyWords) {
this.customerOrg = [];
this.customerOrgAll.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
) {
this.customerOrg.push(item);
}
});
let org = this.customerOrgAll.filter(e => {
return e.displayName.indexOf(keyWords) > -1 || e.displayName.indexOf(keyWords.toUpperCase()) > -1
})
this.customerOrg = org.slice(0,20);
} else {
this.customerOrg = deepCopy(this.customerOrgAll);
this.customerOrg = this.customerOrgAll.slice(0,20);
}
},
@ -221,7 +241,6 @@ export default {
})
},
},
};
</script>

14
src/views/customerOrg/customerOrgGroup.vue

@ -452,22 +452,12 @@ export default {
filterMethod(keyWords) {
if (keyWords) {
let org = this.customerOrgAll.filter(e => {
return e.displayName.indexOf(keyWords) > -1 || e.displayName.indexOf(keyWords.toUpperCase()) > -1
})
this.customerOrg = [];
this.customerOrgAll.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
) {
this.customerOrg.push(item);
}
});
this.customerOrg = org.slice(0,20);
} else {
this.customerOrg = this.customerOrgAll.slice(0,20);
}
},
//

40
src/views/customerOrg/patientRegisterSign.vue

@ -82,18 +82,16 @@ export default {
});
//
getapi("/api/app/for-sex").then((res) => {
if (res.code == 1) {
this.dict.forSex = res.data;
}
});
// getapi("/api/app/for-sex").then((res) => {
// if (res.code == 1) {
// this.dict.forSex = res.data;
// }
// });
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalType = res.data.items;
if (res.code > -1) {
this.dict.medicalType = res.data;
}
});
@ -105,18 +103,18 @@ export default {
});
//
getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
if (res.code == 1) {
this.dict.maritalStatus = res.data;
}
});
postapi("/api/app/asbitem/GetBasicList", { isFilterActive: 'Y' }).then((res) => {
if (res.code == 1) {
this.dict.asbItemAll = res.data;
}
});
// getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
// if (res.code == 1) {
// this.dict.maritalStatus = res.data;
// }
// });
// postapi("/api/app/asbitem/GetBasicList", { isFilterActive: 'Y' }).then((res) => {
// if (res.code == 1) {
// this.dict.asbItemAll = res.data;
// }
// });
console.log("dict", this.dict);
},

79
src/views/report/report.vue

@ -84,21 +84,13 @@ export default {
});
//
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
(res) => {
if (res.code != -1) {
this.dict.organization = res.data;
}
}
);
//
// getapi("/api/app/customerorg/getbycodeall").then((res) => {
// getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
// (res) => {
// if (res.code != -1) {
// this.patientRegister.customerOrgTreeAll = res.data;
// tcdate(this.patientRegister.customerOrgTreeAll);
// this.dict.organization = res.data;
// }
// }
// });
// );
//
getapi("/api/app/medical-type/in-filter").then((res) => {
@ -114,68 +106,7 @@ export default {
}
});
//
getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
if (res.code != -1) {
this.dict.maritalStatus = res.data;
}
});
//
getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
if (res.code != -1) {
this.dict.sexHormoneTerm = res.data;
}
});
//
getapi("/api/app/nation/in-filter").then((res) => {
if (res.code != -1) {
this.dict.nation = res.data;
}
});
//
getapi("/api/app/birth-place/in-filter").then((res) => {
if (res.code != -1) {
this.dict.birthPlace = res.data;
}
});
//
postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
if (res.code != -1) {
this.dict.medicalPackage = res.data;
}
});
//
// getapi("/api/app/customer-org-group").then((res) => {
// if (res.code != -1) {
// this.dict.customerOrgGroupAll = res.data.items;
// }
// });
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code != -1) {
this.dict.payMode = res.data;
}
});
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code != -1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
postapi("/api/app/asbitem/GetBasicList", {}).then((res) => {
if (res.code != -1) {
this.dict.asbItemAll = res.data;
}
});
},
},

Loading…
Cancel
Save