+
+
-
+
@@ -139,6 +91,7 @@ import {
import { exportToExcel } from "../../utlis/Export2Excel";
import html2canvas from "html2canvas";
import printJs from "print-js";
+import { setDBCom, getDBCom } from "../../utlis/indexedDB";
export default {
data() {
@@ -147,7 +100,8 @@ export default {
startDate: "",
endDate: "",
customerOrgIds: [],
- flag: true
+ flag: true,
+ customerOrgTreeAll: [],
};
},
@@ -161,22 +115,41 @@ export default {
},
computed: {
- ...mapState(["window", "dict", "patientRegister", "report"]),
+ ...mapState(["window", "dict", "report"]),
},
methods: {
moment,
dddw,
+
+ //获取体检单位列表树信息
+ getCustomerOrgTree() {
+ getDBCom('orgDatasQuery')
+ .then(localData => {
+ let now = Date.now()
+ // 24小时 = 86400000 毫秒
+ if (localData?.createdat && now - 43200000 < localData.createdat) {
+ this.customerOrgTreeAll = localData.data;
+ tcdate(this.customerOrgTreeAll);
+ } else {
+ //体检单位树
+ getapi("/api/app/customerorg/getbycodeall").then((res) => {
+ if (res.code == 1) {
+ this.customerOrgTreeAll = res.data;
+ tcdate(this.customerOrgTreeAll);
+ //this.customerOrgTreeAll = reMadeOrgTree(deepCopy(res.data));
+ setDBCom('orgDatasQuery', res.data)
+ }
+ });
+ }
+ })
+ },
+
//数据初始化
dictInit() {
//体检单位树
- getapi("/api/app/customerorg/getbycodeall").then((res) => {
- if (res.code == 1) {
- this.patientRegister.customerOrgTreeAll = res.data;
- tcdate(this.patientRegister.customerOrgTreeAll);
- }
- });
- console.log("patientRegister", this.patientRegister);
+ this.getCustomerOrgTree()
+
},
onchange(v) {
console.log(v)
@@ -218,7 +191,7 @@ export default {
},
//查询
btnQuery() {
- let that = this;
+ let that = this;
if (this.startDate == "") {
return this.$message({
message: "请先选择开始日期",
@@ -232,11 +205,11 @@ export default {
});
}
postapi(
- "/api/app/CustomerReport/GetSummaryOfUnitCostsReport",{
- customerOrgIds:that.customerOrgIds,
- startDate:that.startDate,
- endDate:that.endDate
- }).then((res) => {
+ "/api/app/CustomerReport/GetSummaryOfUnitCostsReport", {
+ customerOrgIds: that.customerOrgIds,
+ startDate: that.startDate,
+ endDate: that.endDate
+ }).then((res) => {
if (res.code != -1) {
that.dataList = res.data;
that.$nextTick(() => {
@@ -295,6 +268,7 @@ export default {
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
+
.query {
margin-right: 10px;
display: flex;
@@ -305,10 +279,12 @@ export default {
font-size: 400;
font-family: "NotoSansSC-Regular";
}
+
.box {
display: flex;
flex-direction: column;
}
+
::v-deep .el-input__inner {
/*text-align: center;*/
padding-left: 5px;
@@ -328,10 +304,12 @@ export default {
::v-deep .el-icon-search:before {
color: #00f;
}
+
.query:last-child {
margin-right: 0;
}
-::v-deep .el-cascader__search-input{
- margin: 0 0 0 5px;
+
+::v-deep .el-cascader__search-input {
+ margin: 0 0 0 5px;
}