pengjun 1 year ago
parent
commit
0c56292b36
  1. 69
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 2
      src/components/patientRegister/PatientRegisterList.vue
  3. 15
      src/components/patientRegister/customerOrgTreeAll.vue
  4. 3
      src/store/index.js

69
src/components/patientRegister/PatientRegisterEdit.vue

@ -25,6 +25,10 @@
<el-button type="primary" class="commonbutton" @click="btnDownOrg"
:disabled="(form.customerOrgId == dict.personOrgId) || !form.id">同步团检预约</el-button>
</div>
<div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '分诊排队')">
<el-button type="primary" class="commonbutton" @click="fnQueue(form)"
:disabled="!form.id">分诊排队</el-button>
</div>
</div>
</div>
<div>
@ -587,12 +591,14 @@
<WebBooking />
</el-dialog>
<!-- checkStrictly: true, expandTrigger: 'hover', -->
<el-dialog title="选择单位" :visible.sync="dialogOrg" width="800px" :close-on-click-modal="false"
:append-to-body="true">
<div style="height: 320px;">
<el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" style="width:400px;"
filterable popper-class="example" :show-all-levels="false"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" size="small">
:props="{ ...customerOrg.treeprops, lazyLoad: lazyLoad, lazy: true, leaf: 'isLeaf' }"
size="small">
</el-cascader>
</div>
<span slot="footer" class="dialog-footer">
@ -646,6 +652,12 @@
:close-on-click-modal="false" :append-to-body="true" @close="closeDialogCharge">
<AsbChargeRequest :patientRegister="form" />
</el-dialog>
<!-- 分诊排队 -->
<el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
:close-on-click-modal="false">
<Queue :refParams="queueParams" />
</el-dialog>
</div>
</div>
</template>
@ -658,9 +670,9 @@ import { getTreeNode } from "../../utlis/tree"
import {
getPagePriv, checkPagePriv, objCopy, setNull, dddw, checkIDCode, parseID,
birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
arrayExistObj, isValidMobileNumber
reMadeOrgTree, arrayExistObj, isValidMobileNumber
} from "../../utlis/proFunc";
import { getTreePids } from "../../utlis/tree";
import { getTreePids,madeTree } from "../../utlis/tree";
import { photoParse, savePeoplePhoto, } from "../../utlis/proApi";
import Camera from "./Camera.vue";
import PatientRegisterItem from "./PatientRegisterItem.vue";
@ -674,6 +686,7 @@ import WebBooking from "../../components/webBooking/WebBooking.vue"
import PatientLisRequest from "../../components/patientRegister/PatientLisRequest.vue";
import PatientPacsRequest from "../../components/patientRegister/PatientPacsRequest.vue";
import Queue from "../../components/queue/Queue.vue";
export default {
components: {
@ -688,6 +701,7 @@ export default {
PatientLisRequest,
PatientPacsRequest,
WebBooking,
Queue
},
// isDoctor: '0:/1:()'
props: ['isDoctor', 'patientRegisterId', 'editTimes', 'refreshRegister', 'refFuncSetData'],
@ -716,6 +730,7 @@ export default {
immediateToHisCharge: true, //
findPatientByName: true, //
printGuideLabel: ["guide", "pacs", "lis"], //
dispCustomerOrgCode: 'N', // -- customerOrgCode
},
},
brushTimes: 0,
@ -861,6 +876,7 @@ export default {
poisonList: [],
thirdInterfaceId: '', //
queueParams: {}, //
};
},
@ -886,6 +902,7 @@ export default {
this.LocalConfig.patientRegister.findPatientByName = false
}
if (LocalConfig.patientRegister.printGuideLabel) this.LocalConfig.patientRegister.printGuideLabel = deepCopy(LocalConfig.patientRegister.printGuideLabel)
if (LocalConfig.patientRegister.dispCustomerOrgCode) this.LocalConfig.patientRegister.dispCustomerOrgCode = LocalConfig.patientRegister.dispCustomerOrgCode
}
} catch (error) {
console.log("window.localStorage.getItem('LocalConfig')", error)
@ -1100,6 +1117,43 @@ export default {
}
},
getCustomerOrgChild(parentId) {
return new Promise((resolve, reject) => {
postapi('/api/app/CustomerOrg/GetCustomerOrgByParentId', { parentId })
.then(res => {
if (res.code > -1) {
res.data.forEach(e => {
e.isLeaf = e.isChild == 'Y' ? false : true
});
// console.log('this.patientRegister.customerOrgs', this.patientRegister.customerOrgs)
let treeData = reMadeOrgTree(deepCopy(res.data), this.LocalConfig.patientRegister.dispCustomerOrgCode);
treeData.forEach(e => {
if (arrayExistObj(this.patientRegister.customerOrgs, 'id', e.id) == -1) {
this.patientRegister.customerOrgs.push(e)
}
});
this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs,'treeChildren','parentId','id',null)
// console.log('this.patientRegister.customerOrgTreeAll', this.patientRegister.customerOrgTreeAll)
resolve(treeData)
}
})
.catch(err => {
reject(err)
})
})
},
lazyLoad(node, resolve) {
if (node && node.data && node.data.id) {
this.getCustomerOrgChild(node.data.id).then(res => {
resolve(res)
}).catch(err => {
resolve([])
})
}
},
//
btnOkOrg() {
let customerOrgId = ''
@ -1318,7 +1372,14 @@ export default {
})
},
//
fnQueue(row) {
this.queueParams = {
patientRegisterId: row.id
}
this.dataTransOpts.plus.queue++
this.dialogWin.queue = true
},
//
changeMedicalTimes() {

2
src/components/patientRegister/PatientRegisterList.vue

@ -233,7 +233,7 @@
</div>
</el-dialog>
<!-- 修改信息 -->
<!-- 分诊排队 -->
<el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true"
:close-on-click-modal="false">
<Queue :refParams="queueParams" />

15
src/components/patientRegister/customerOrgTreeAll.vue

@ -29,7 +29,8 @@
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, deepCopy, reMadeOrgTree } from "../../utlis/proFunc";
import { tcdate, deepCopy, reMadeOrgTree, arrayExistObj } from "../../utlis/proFunc";
import { madeTree } from "@/utlis/tree";
export default {
components: {},
data() {
@ -47,7 +48,7 @@ export default {
dispCustomerOrgCode: 'N', // -- customerOrgCode
}
},
customerOrgTreeAll: []
customerOrgTreeAll: [],
};
},
//<el-tree :data="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
@ -56,6 +57,7 @@ export default {
},
//
created() {
this.patientRegister.customerOrgs = []
try {
let LocalConfig = JSON.parse(window.localStorage.getItem('LocalConfig'))
if (LocalConfig && LocalConfig.patientRegister) {
@ -88,6 +90,13 @@ export default {
e.isLeaf = e.isChild == 'Y' ? false : true
});
let treeData = reMadeOrgTree(deepCopy(res.data), this.LocalConfig.patientRegister.dispCustomerOrgCode);
treeData.forEach(e => {
if (arrayExistObj(this.patientRegister.customerOrgs, 'id', e.id) == -1) {
this.patientRegister.customerOrgs.push(e)
}
});
this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs,'treeChildren','parentId','id',null)
// console.log('this.patientRegister.customerOrgTreeAll', this.patientRegister.customerOrgTreeAll)
resolve(treeData)
}
})
@ -154,7 +163,7 @@ export default {
if (res.code > -1) {
this.getCustomerOrgChild(data.parentId).then(res => {
data.treeChildren = res
if(data.parentId == null){
if (data.parentId == null) {
this.customerOrgTreeAll = res
this.patientRegister.customerOrgTreeAll = res
}

3
src/store/index.js

@ -66,7 +66,8 @@ export default new Vuex.Store({
//体检人员登记 add by pengjun
patientRegister: {
customerOrgTreeAll: [], //体检单位列表(含个人)
customerOrgs:[], // 体检单位列表(含个人)列表
customerOrgTreeAll: [], //体检单位列表(含个人)树
patientRegisterId: "", //当前人员ID(可根据此值是否为空,判断是新增还是编辑)
patientRegisterTimes: 0, //体检人员登记窗口显示次数(弃用)
addTimes: 0, //用于触发新增时初始化赋值

Loading…
Cancel
Save