Browse Source

rydj

master
pengjun 2 years ago
parent
commit
f92f6afeb3
  1. 27
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 207
      src/components/patientRegister/PatientRegisterItem.vue
  3. 35
      src/components/patientRegister/PatientRegisterList.vue
  4. 25
      src/components/patientRegister/customerOrgTreeAll.vue
  5. 80
      src/store/index.js
  6. 79
      src/utlis/proFunc.js
  7. 99
      src/views/customerOrg/patientRegister.vue

27
src/components/patientRegister/PatientRegisterEdit.vue

@ -199,7 +199,8 @@
<el-col :span="6">
<el-form-item label="分组" prop="customerOrgGroupId">
<el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable
:disabled="form.customerOrgId === dict.personOrgId ? true : false">
:disabled="form.customerOrgId === dict.personOrgId ? true : false"
@change="getCustomerOrgGroupAsb">
<el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName"
:value="item.id">
</el-option>
@ -592,6 +593,30 @@ export default {
this.patientRegister.cameraVisble = true
},
//
getCustomerOrgGroupAsb(v){
console.log('getCustomerOrgGroupAsb',v);
getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${v}`)
.then((res) => {
console.log('getCustomerOrgGroupAsb',res);
if(res.code == 1){
this.patientRegister.customerOrgGroupAsb = res.data
}
})
},
//
getMedicalPackageAsb(v){
console.log('getMedicalPackageAsb')
getapi(`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${v}`)
.then((res) => {
console.log('medicalPackageAsb',res);
if(res.code == 1){
this.patientRegister.medicalPackageAsb = res.data
}
})
},
},

207
src/components/patientRegister/PatientRegisterItem.vue

@ -1,28 +1,20 @@
<template>
<div style="margin-left: 10px;">
<div>
<span>项目类别</span>
<el-select
v-model="value"
placeholder="请选择"
style="margin-left: 20px"
@change="getAsbItemByItemType"
clearable
>
<el-option
v-for="item in itemType"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
<span>项目类别</span>
<el-cascader
:options="dict.itemTypeTree"
:props="{ checkStrictly: true ,expandTrigger: 'hover',...customerOrg.treeprops}"
:show-all-levels="false"
clearable filterable
@change="getAsbItemByItemType">
</el-cascader>
</div>
<div class="mainareaBox">
<el-table
:header-cell-style="{ background: '#eef1f6' }"
:data="asbItem" height="350"
:data="dict.asbItem" height="350"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection"></el-table-column>
@ -51,12 +43,11 @@
</el-button>
</div>
</div>
<div class="mainareaBox">
<el-table
:header-cell-style="{ background: '#eef1f6' }"
:data="patientRegisterAbs" height="350"
:data="patientRegister.patientRegisterAbs" height="350"
@selection-change="selecteditems"
>
<!-- temporaryselection personnelUnit.nogroupselected-->
@ -82,11 +73,10 @@ export default {
return {
itemType: [], //
asbItemAll: [], //
asbItem: [], //
asbItemChoosed: [], //
patientRegisterAbs:[], //
//patientRegisterAbs:[], // vuex
patientRegisterAbsChoosed:[], //
patientRegisterAbsRd:{
@ -96,94 +86,30 @@ export default {
};
},
computed: {
...mapState(['dict', 'patientRegister','personnelUnit']),
},
created() {
this.getItemType();
this.getAbsItemAll();
...mapState(['dict','customerOrg','patientRegister','personnelUnit']),
},
mounted(){
mounted(){
},
methods: {
//
Onsubmit() {
if (!this.personnelUnit.customerOrgGroupId) {
alert("请先选择单位分组");
return;
} else {
postapi("/api/app/customer-org-group-detail/many", this.addrulst).then(
(res) => {
this.$message.success("操作成功");
console.log(this.addrulst);
}
);
}
},
//
addselecteditems() {
//personnelUnit.nogroupselected
if (this.rightselctedata.length == 0) {
this.$message.warning("已选数据为空无法移动");
} else {
let count = this.rightselctedata.length - 1;
for (var i = count; i >= 0; i--) {
// this.personnelUnit.nogroupselected.splice(i, 1);
if (
// !this.rightselctedata.includes(this.rightselctedata[i].displayName)
[...new Set(this.rightselctedata)]
) {
this.asbItem.push(this.rightselctedata[i]);
this.personnelUnit.nogroupselected.splice(i, 1);
}
// this.asbItem.push(this.rightselctedata[i]);
}
// this.
this.rightselctedata.forEach((item) => {
this.addrulst.push({
asbitemId: item.id,
price: item.price,
customerOrgGroupId: this.personnelUnit.customerOrgGroupId,
});
});
}
},
//
selecteditems(val) {
this.rightselctedata = val;
// this.personnelUnit.nogroupselected = val;
console.log(this.rightselctedata);
},
//
removedata() {
if (this.asbItemChoosed.length == 0) {
this.$message.warning("未选数据为空无法移动");
} else {
this.saveornot = false;
let count = this.asbItemChoosed.length - 1;
for (var i = count; i >= 0; i--) {
// this.asbItem.splice(i, 1);
// this.personnelUnit.nogroupselected.push(this.asbItemChoosed[i]);
if ([...new Set(this.asbItemChoosed)]) {
this.asbItem.splice(i, 1);
this.personnelUnit.nogroupselected.push(this.asbItemChoosed[i]);
}
}
this.asbItemChoosed.forEach((item) => {
this.addrulst.push({
asbitemId: item.id,
price: item.price,
customerOrgGroupId: this.personnelUnit.customerOrgGroupId,
});
});
}
},
//
@ -192,87 +118,40 @@ export default {
this.asbItemChoosed = val;
console.log(this.asbItemChoosed);
},
//
getAbsItemAll() {
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
this.asbItemAll = res.data.items;
});
},
//
getAsbItemByItemType(v) {
if(v){
this.asbItem = [...this.asbItemAll]
}else{
this.asbItem = arrayFilter(this.asbItemAll,'itemTypeId',v)
//console.log('getAsbItemByItemType',typeof v)
let lv = ''
if(typeof v === "object"){
lv = v[v.length - 1]
}
//
arrayReduce(this.asbItem,[...this.patientRegisterAbs],'id=asbitemId')
},
//
getItemType() {
getapi("/api/app/item-type/by-code-all").then((res) => {
this.itemType = res.data;
});
},
//
listeninglist() {
getapi(
`/api/app/customer-org-group/${this.personnelUnit.customerOrgGroupId}`
).then((res) => {
this.personnelUnit.form = res.data;
console.log(res);
});
},
//
getCustomerOrgGroupAsb(){
console.log('getCustomerOrgGroupAsb');
if(!this.patientRegisterForm.customerOrgGroupId || this.patientRegisterForm.customerOrgGroupId == this.dict.personOrgId ){
return
if(lv){
this.dict.asbItem = arrayFilter(this.dict.asbItemAll,'itemTypeId',lv)
}else{
this.dict.asbItem = [...this.dict.asbItemAll]
}
getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${this.patientRegisterForm.customerOrgGroupId}`)
.then((res) => {
console.log('getCustomerOrgGroupAsb',res);
if(res.code == 1){
this.patientRegister.customerOrgGroupAsb = res.data
}
})
},
//
getMedicalPackageAsb(){
if(!this.patientRegisterForm.medicalPackageId || this.patientRegisterForm.medicalPackageId == this.dict.personOrgId ){
return
}
getapi(`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${this.patientRegisterForm.medicalPackageId}`)
.then((res) => {
console.log('medicalPackageAsb',res);
if(res.code == 1){
this.patientRegister.medicalPackageAsb = res.data
}
})
//
arrayReduce(this.dict.asbItem,[...this.patientRegister.patientRegisterAbs],'id=asbitemId')
},
// api/app/register-asbitem/in-patient-register-id/3a0c3094-6f37-f5cc-9811-2bc249c081ce
getPatientRegisterAbs(patientRegisterId){
getPatientRegisterAbs(patientRegisterId){
//console.log('getPatientRegisterAbs',patientRegisterId)
getapi(`/api/app/register-asbitem/in-patient-register-id/${patientRegisterId}`)
.then((res) => {
console.log('patientRegisterAbs',res);
console.log('getPatientRegisterAbs',res.data);
if(res.code == 1){
this.patientRegisterAbs = res.data
this.patientRegister.patientRegisterAbs = res.data
}
})
},
//
registerAsbitem(body){
console.log('registerAsbitem')
postapi(`api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`,body)
.then((res) => {
console.log('medicalPackageAsb',res);
@ -289,20 +168,12 @@ export default {
//
'patientRegister.addTimes'(newVal, oldVal) {
//console.log('patientRegister.addTimes newVal',newVal,' oldVal',oldVal)
console.log('watch patientRegister.addTimes newVal:',newVal,' oldVal:',oldVal)
if (newVal != oldVal) {
this.patientRegisterAbs = []
this.patientRegister.patientRegisterAbs = []
}
},
//
'patientRegister.patientRegisterRd.id'(newVal, oldVal) {
console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal)
if (newVal != oldVal) {
this.getPatientRegisterAbs(newVal);
}
},
},
};
</script>

35
src/components/patientRegister/PatientRegisterList.vue

@ -171,9 +171,9 @@
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { mapState,mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, objCopy } from "@/utlis/proFunc";
import { dddw, objCopy,arrayReduce } from "@/utlis/proFunc";
import PatientRegisterEdit from '../../components/patientRegister/PatientRegisterEdit.vue'
import Camera from '../../components/patientRegister/Camera.vue'
@ -202,18 +202,35 @@ export default {
...mapState(['dict', 'patientRegister', 'customerOrg']),
},
methods: {
...mapActions(['getPatientRegisterAbs']),
handleSelectionChange(val){
this.multipleSelection = val;
//console.log('this.multipleSelection',this.multipleSelection)
},
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgld){
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`).then(
(res) => {
console.log('getCustomerOrgGroup',res.data)
if(res.code == 1){
this.patientRegister.customerOrgGroup = res.data
}
}
)
},
//
rowick(row) {
async rowick(row){
this.patientRegister.photo = '' //
this.patientRegister.patientRegisterId = row.id
this.patientRegister.patientRegisterRd = row
this.patientRegister.query.customerOrgParentId = row.customerOrgParentId
console.log('row',row)
this.patientRegister.patientRegisterRd = row
this.patientRegister.query.customerOrgParentId = row.customerOrgParentId
this.dict.asbItem = [...this.dict.asbItemAll]
await this.getPatientRegisterAbs(row.id)
},
//
@ -229,6 +246,8 @@ export default {
this.patientRegister.patientRegisterRdInit.id = ''
this.patientRegister.patientRegisterRdInit.customerOrgId = this.patientRegister.query.customerOrgId
this.patientRegister.addTimes++
this.patientRegister.patientRegisterTimes++
this.patientRegister.patientRegisterAbs = []
this.dialogVisible = true
},
@ -237,6 +256,7 @@ export default {
alert("请选择要操作的记录")
return
}
this.patientRegister.patientRegisterTimes++
this.dialogVisible = true
},
@ -337,12 +357,15 @@ export default {
this.query()
}
},
//
'patientRegister.patientRegisterRd.id'(newVal, oldVal) {
if (newVal != oldVal) {
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
objCopy(this.patientRegister.patientRegisterRd, this.form)
}
},
},
};

25
src/components/patientRegister/customerOrgTreeAll.vue

@ -54,21 +54,8 @@ export default {
)
},
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgld){
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`).then(
(res) => {
console.log('res.data',res.data)
if(res.code == 1){
this.patientRegister.customerOrgGroup = res.data
}
}
)
},
//
treeclick(data) {
treeclick(data) {
this.patientRegister.query.customerOrgId = data.id
this.getCustomerOrgParentld(data.id)
this.patientRegister.query.times++ //
@ -76,16 +63,6 @@ export default {
},
//
watch: {
//
'patientRegister.query.CustomerOrgParentld'(newVal, oldVal) {
console.log('patientRegister.query.CustomerOrgParentld newVal:',newVal,' oldVal:',oldVal)
if (newVal != oldVal && newVal !== this.dict.personOrgId) {
this.getCustomerOrgGroup(newVal)
}
},
},
};
</script>
<style>

80
src/store/index.js

@ -1,5 +1,7 @@
import Vue from "vue";
import Vuex from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayReduce } from "@/utlis/proFunc";
Vue.use(Vuex);
@ -14,7 +16,7 @@ export default new Vuex.Store({
children: "treeChildren",
}, //树形组件的数据结构
customerOrgId: '',//当前单位ID(可根据此值是否为空,判断是新增还是编辑)
customerOrgRd: { displayName: '单位名称' }, //单个体检单位记录值
customerOrgRd: { id: '', displayName: '单位名称' }, //单个体检单位记录值
customerOrgRegisterList: [], //单位体检次数登记列表
contactPersonList: [], //联系人列表
contactMethodList: [], //联系方式列表
@ -33,7 +35,8 @@ export default new Vuex.Store({
patientRegister: {
customerOrgTreeAll: [], //体检单位列表(含个人)
patientRegisterId: '', //当前单位ID(可根据此值是否为空,判断是新增还是编辑)
patientRegisterRd: {}, //体检人员记录
patientRegisterRd: { id: '' }, //体检人员记录
patientRegisterTimes: 0, //体检人员登记窗口显示次数
addTimes: 0, //用于触发新增时初始化赋值
photo: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg', //单独抽出,拍照时会更新
cameraVisble: false, //拍照控件显示
@ -68,26 +71,27 @@ export default new Vuex.Store({
patientRegisterNo: '', //条码号 【创建编辑时不操作】
medicalTimes: 1, //条码号 【创建编辑时不操作】
organizationUnitId: null, //体检中心
address:'', //地址
email:'', //email
idNo:'', //身份证号
telephone:'', //电话
mobileTelephone:'', //手机号
nationId:null, //民族编号
postalCode:'', //邮编
creatorId:null,
creationTime:'',
lastModificationTime:'',
lastModifierId:null,
address: '', //地址
email: '', //email
idNo: '', //身份证号
telephone: '', //电话
mobileTelephone: '', //手机号
nationId: null, //民族编号
postalCode: '', //邮编
creatorId: null,
creationTime: '',
lastModificationTime: '',
lastModifierId: null,
}, //体检人员记录(初始值)一般创建用
customerOrgGroupAsb:[], //选中分组所包含的组合项目
medicalPackageAsb:[], //选中套餐所包含的组合项目
query:{
times:0, //触发查询次数
customerOrgId:'', //体检单位ID
CustomerOrgParentld:'', //单位父级ID
customerOrgGroupAsb: [], //选中分组所包含的组合项目
medicalPackageAsb: [], //选中套餐所包含的组合项目
query: {
times: 0, //触发查询次数
customerOrgId: '', //体检单位ID
CustomerOrgParentld: '', //单位父级ID
},//查询条件
customerOrgGroup:[], //分组(针对单位)
customerOrgGroup: [], //分组(针对单位)
patientRegisterAbs: [] //人员已选组合项目
},
//公共字典数据 add by pengjun
@ -104,10 +108,13 @@ export default new Vuex.Store({
completeFlag: [ //体检完成标志
{ id: '0', displayName: '预登记' }, { id: '1', displayName: '正式登记' }, { id: '2', displayName: '部份已检' }, { id: '3', displayName: '已总检' },
],
medicalPackage:[], //所有套餐
customerOrgGroupAll:[], //所有分组,不限单位,不限次数
customerOrg:[], //所有单位,非树结构
payMode:[], //支付方式
medicalPackage: [], //所有套餐
customerOrgGroupAll: [], //所有分组,不限单位,不限次数
customerOrg: [], //所有单位,非树结构
payMode: [], //支付方式
itemTypeTree: [], //体检类别 树结构
asbItemAll: [], //所有组合项目
asbItem: [], //显示的 未选组合项目
},
@ -115,9 +122,9 @@ export default new Vuex.Store({
getters: {},
mutations: {//同步更改状态
//通用设置 state 值 option {key-value} add by pengjun
//通用设置 state 值 option {key:,value:} add by pengjun
setData(state, option) {
let array = option.key.split('.')
let array = (option.key).split('.')
switch (array.length) {
case 1:
state[array[0]] = option.value; break;
@ -128,9 +135,24 @@ export default new Vuex.Store({
case 4:
state[array[0]][array[1]][array[2]][array[3]] = option.value; break;
}
}
},
},
actions: {},
modules: {},
actions: {
//获取体检人员所选组合项目
getPatientRegisterAbs(context, id) {
console.log('vuex getPatientRegisterAbs', context.state.dict.asbItemAll)
getapi(`/api/app/register-asbitem/in-patient-register-id/${id}`)
.then((res) => {
if (res.code == 1) {
context.commit('setData', { key: 'patientRegister.patientRegisterAbs', value: res.data })
context.commit('setData', { key: 'dict.asbItem', value: arrayReduce([...context.state.dict.asbItem], [...context.state.patientRegister.patientRegisterAbs], 'id=asbitemId') })
}
})
},
},
modules: {
},
});

79
src/utlis/proFunc.js

@ -1,56 +1,56 @@
//多级联动选择数据处理 add by pengjun
exports.tcdate = (date) => {
for (var i = 0; i < date.length; i++) {
if (date[i].treeChildren.length == 0) {
date[i].treeChildren = undefined;
} else {
this.tcdate(date[i].treeChildren);
}
}
for (var i = 0; i < date.length; i++) {
if (date[i].treeChildren.length == 0) {
date[i].treeChildren = undefined;
} else {
this.tcdate(date[i].treeChildren);
}
}
}
//json 对像赋值 只从 from 对象 赋值 to 中有的 key 项 add by pengjun
exports.objCopy = (from,to) => {
if(from && to){
exports.objCopy = (from, to) => {
if (from && to) {
let keys = Object.keys(to)
for(let key in keys){
if(from[keys[key]] !== undefined){
for (let key in keys) {
if (from[keys[key]] !== undefined) {
to[keys[key]] = from[keys[key]]
}
}
}
}
}
}
//类似PB中的dddw的功能 add by pengjun
exports.dddw = (arrayData,key,value,display) => {
exports.dddw = (arrayData, key, value, display) => {
//console.log(arrayData,key,value,display)
let ret = value
if(arrayData){
for(let i=0;i<arrayData.length;i++){
if(arrayData[i][key] == value){
if (arrayData) {
for (let i = 0; i < arrayData.length; i++) {
if (arrayData[i][key] == value) {
ret = arrayData[i][display]
break
}
}
}
}
return ret
}
//一般uuid字段为空时,需设置为null值
exports.setNull = (obj,arrayKeys) => {
if(arrayKeys){
for(let i=0;i<arrayKeys.length;i++){
if(!obj[arrayKeys[i]] || obj[arrayKeys[i]].length < 1){
exports.setNull = (obj, arrayKeys) => {
if (arrayKeys) {
for (let i = 0; i < arrayKeys.length; i++) {
if (!obj[arrayKeys[i]] || obj[arrayKeys[i]].length < 1) {
obj[arrayKeys[i]] = null
}
}
}
}
}
//将字符串转换成二进制形式,中间用空格隔开
exports.strToBinary=function(str) {
exports.strToBinary = function (str) {
let result = [];
let list = str.split("");
for (var i = 0; i < list.length; i++) {
@ -65,7 +65,7 @@ exports.strToBinary=function(str) {
}
//将二进制字符串转换成Unicode字符串
exports.binaryToStr=function(str) {
exports.binaryToStr = function (str) {
var result = [];
var list = str.split(" ");
for (var i = 0; i < list.length; i++) {
@ -78,10 +78,10 @@ exports.binaryToStr=function(str) {
}
//数组过滤出符合条件的
exports.arrayFilter = function(arr,key,value) {
exports.arrayFilter = function (arr, key, value) {
let result = []
for(let i = 0;i<arr.length; i++){
if(arr[i][key] == value){
for (let i = 0; i < arr.length; i++) {
if (arr[i][key] == value) {
result.push(arr[i])
}
}
@ -89,18 +89,23 @@ exports.arrayFilter = function(arr,key,value) {
}
//数组相减 arrFront = arrFront - reduceArr ;
exports.arrayReduce = function(arrFront,reduceArr,key) {
exports.arrayReduce = function (arrFront, reduceArr, key) {
let keys = key.split('=')
let keyF = keys[0]
let keyR = keys.length > 1 ? keys[1]:keys[0]
for(let i = arrFront.length - 1;i < 0;i--){
for(let j = 0; j<reduceArr.length;j++){
if(arrFront[i][keyF] == reduceArr[j][keyR]){
arrFront.splice(i, 1)
reduceArr.splice(j,1)
break;
let keyR = keys.length > 1 ? keys[1] : keys[0]
//console.log(arrFront, reduceArr)
if (!arrFront || arrFront.length < 1 || !reduceArr || reduceArr.length < 1) {
return arrFront
}
//console.log(arrFront.length, reduceArr.length)
for (let i = 0; i < reduceArr.length; i++) {
//console.log('i', i)
for (let j = 0; j < arrFront.length; j++) {
//console.log('j', j)
if (reduceArr[i][keyR] == arrFront[j][keyF]) {
arrFront.splice(j, 1)
}
}
}
return arrFront
}

99
src/views/customerOrg/patientRegister.vue

@ -31,6 +31,7 @@
import { mapState } from 'vuex'
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate} from '../../utlis/proFunc'
import CustomerOrgTreeAll from '../../components/patientRegister/customerOrgTreeAll.vue'
import PatientRegisterQuery from '../../components/patientRegister/patientRegisterQuery.vue'
@ -68,35 +69,46 @@ export default {
dictInit(){
//
getapi("/api/app/sex").then((res) => {
this.dict.sex = res.data;
getapi("/api/app/sex").then(
(res) => {
if(res.code == 1){
this.dict.sex = res.data
}
});
//
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
(res) => {
this.dict.organization = res.data;
if(res.code == 1){
this.dict.organization = res.data
}
}
);
//
getapi("/api/app/customer-org/in-filter").then(
(res) => {
this.dict.customerOrg = res.data.items;
if(res.code == 1){
this.dict.customerOrg = res.data.items
}
}
);
//
getapi("/api/app/medical-type/in-filter").then(
(res) => {
this.dict.medicalType = res.data.items;
if(res.code == 1){
this.dict.medicalType = res.data.items
}
}
);
//
getapi("/api/app/personnel-type/in-filter").then(
(res) => {
this.dict.personnelType = res.data.items;
if(res.code == 1){
this.dict.personnelType = res.data.items
}
}
);
@ -104,56 +116,115 @@ export default {
//
getapi("/api/app/marital-statuses").then(
(res) => {
this.dict.maritalStatus = res.data.items;
if(res.code == 1){
this.dict.maritalStatus = res.data.items
}
}
);
//
getapi("/api/app/sex-hormone-term/in-filter").then(
(res) => {
this.dict.sexHormoneTerm = res.data.items;
if(res.code == 1){
this.dict.sexHormoneTerm = res.data.items
}
}
);
//
getapi("/api/app/nation/in-filter").then(
(res) => {
this.dict.nation = res.data.items;
if(res.code == 1){
this.dict.nation = res.data.items
}
}
);
//
getapi("/api/app/birth-place/in-filter").then(
(res) => {
this.dict.birthPlace = res.data.items;
if(res.code == 1){
this.dict.birthPlace = res.data.items
}
}
);
//
getapi("/api/app/medical-package/in-filter").then(
(res) => {
this.dict.medicalPackage = res.data.items;
if(res.code == 1){
this.dict.medicalPackage = res.data.items
}
}
);
//
getapi("/api/app/customer-org-group").then(
(res) => {
this.dict.customerOrgGroupAll = res.data.items;
if(res.code == 1){
this.dict.customerOrgGroupAll = res.data.items
}
}
);
//
getapi("/api/app/pay-mode").then(
(res) => {
this.dict.payMode = res.data;
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)
}
}
)
getapi("/api/app/asbitem/in-filter?Filter")
.then((res) => {
if(res.code == 1){
this.dict.asbItemAll = res.data.items;
}
})
console.log('dict',this.dict)
}
},
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgld){
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`).then(
(res) => {
console.log('getCustomerOrgGroup',res.data)
if(res.code == 1){
this.patientRegister.customerOrgGroup = res.data
}
}
)
},
},
//()
watch: {
//1
'patientRegister.query.CustomerOrgParentld'(newVal, oldVal) {
console.log('watch patientRegister.query.CustomerOrgParentld newVal:',newVal,' oldVal:',oldVal)
if (newVal != oldVal && newVal !== this.dict.personOrgId) {
this.getCustomerOrgGroup(newVal)
}
},
},
};
</script>
<style scoped>

Loading…
Cancel
Save