Browse Source

cusorgocx

master
pengjun 2 years ago
parent
commit
1dc9b1c303
  1. 64
      src/components/report/CusOrgOCX.vue
  2. 17
      src/components/report/PatientRegisterQueryNobtn.vue
  3. 5
      src/store/index.js

64
src/components/report/CusOrgOCX.vue

@ -0,0 +1,64 @@
<template>
<el-tree
:data="patientRegister.customerOrgTreeAll"
:props="customerOrg.treeprops"
@node-click="treeclick"
></el-tree>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate } from "../../utlis/proFunc";
export default {
components: {},
data() {
return {};
},
//<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: {
...mapState(["dict", "customerOrg", "patientRegister"]),
},
//
created() {},
//
mounted() {
//
this.getCustomerOrgTree();
},
methods: {
//
getCustomerOrgTree() {
getapi("/api/app/customer-org/by-code-all").then((res) => {
//customerOrgTree = res.data;
console.log("res.data", res.data);
this.patientRegister.customerOrgTreeAll = res.data;
//tcdate(this.patientRegister.customerOrgTreeAll)
});
},
//ID api/app/customer-org/parent/[CustomerOrgld
getCustomerOrgParentId(customerOrgld) {
if (customerOrgld == this.dict.personOrgId) {
this.patientRegister.query.CustomerOrgParentId = this.dict.personOrgId;
return;
}
getapi(`/api/app/customer-org/parent/${customerOrgld}`).then((res) => {
console.log("res.data", res.data);
if (res.code == 1) {
this.patientRegister.query.CustomerOrgParentId = res.data;
}
});
},
//
treeclick(data) {
this.patientRegister.query.customerOrgId = data.id;
this.getCustomerOrgParentId(data.id);
this.patientRegister.query.times++; //
},
},
};
</script>
<style></style>

17
src/components/report/PatientRegisterQueryNobtn.vue

@ -2,7 +2,10 @@
<div style="display: flex">
<div style="display: flex; flex-wrap: wrap; height:100px;">
<div class="query">
<span>体检单位/次数</span>
<span>体检单位</span>
<el-input placeholder="请选择单位" v-model="patientRegister.query.cusOrgOCX" style="width:240px;" size="small" disabled>
<el-button slot="append" icon="el-icon-search" @click="report.dialogCusOrgOCX = true"></el-button>
</el-input>
<el-cascader v-model="patientRegister.query.customerOrgId" :options="patientRegister.customerOrgTreeAll"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" placeholder="请选择单位"
:show-all-levels="false" clearable size="small" @change="changeCustomerOrgId" style="width:180px;">
@ -60,14 +63,22 @@
</el-select>
</div>
</div>
<!--通用选单位体检次数分组的控件-->
<el-dialog title="体检单位选择" :visible.sync="report.dialogCusOrgOCX"
:close-on-click-modal="false" width="800px" height="600px">
<CusOrgOCX/>
</el-dialog>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import CusOrgOCX from "./CusOrgOCX.vue"
export default {
components: {},
components: {
CusOrgOCX,
},
props: ["orgEnable"],
data() {
return {
@ -113,7 +124,7 @@ export default {
mounted() { },
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg"]),
...mapState(["window", "dict", "patientRegister", "customerOrg","report"]),
},
methods: {

5
src/store/index.js

@ -156,6 +156,11 @@ export default new Vuex.Store({
suggestionList: [], //建议
},
report:{
dialogCusOrgOCX:false, //通用单位查询控件显示
dataCusOrgOCX:[], //通用单位查询的数据
},
//公共字典数据 add by pengjun
dict: {
personOrgId: "00000000-0000-0000-0000-000000000000", //个人体检单位ID

Loading…
Cancel
Save