Browse Source

doctor

master
pengjun 2 years ago
parent
commit
27aa8e9dc1
  1. 173
      src/components/doctorCheck/CheckItemList.vue
  2. 72
      src/components/doctorCheck/PatientRegisterBase.vue
  3. 117
      src/components/doctorCheck/RegisterCheckList.vue
  4. 34
      src/store/index.js

173
src/components/doctorCheck/CheckItemList.vue

@ -1,69 +1,134 @@
<template>
<div>
<el-table :data="doctorCheck.checkItemList" style="width: 100%" height="350" border
@row-click="rowClick">
<el-table-column prop="itemName" label="项目" width="180" />
<el-table-column prop="itemName" label="结果" width="500" />
<el-table-column prop="itemName" label="单位" width="80" />
<el-table-column prop="itemName" label="参考范围" width="120" />
</el-table>
</div>
</template>
<script>
import { mapState } from 'vuex';
export default {
components: {},
data() {
return {
<div>
<el-table :data="doctorCheck.checkItemList" style="width: 100%" height="350" border @row-click="rowClick">
<el-table-column prop="itemName" label="项目" width="180" />
<el-table-column prop="result" label="结果" width="500">
<template slot-scope="scope">
<el-autocomplete style="width: 480px" class="inline-input" type="textarea"
v-model="doctorCheck.checkItemList[scope.$index].result" :fetch-suggestions="querySearch"
placeholder="请输入结果值" @select="handleSelect" />
</template>
};
},
created() {},
//
mounted() {},
computed:{
...mapState(['dict','doctorCheck']),
</el-table-column>
<el-table-column prop="unit" label="单位" width="80" />
<el-table-column prop="referenceRangeValue" label="参考范围" width="120" />
</el-table>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default {
components: {},
data() {
return {
restaurants:[], //
currentRow: -1, //
};
},
created() { },
//
mounted() { },
computed: {
...mapState(['dict', 'doctorCheck']),
},
methods: {
//
rowClick(row) {
//registerCheckId
// "itemResultTemplates": [
// {
// "itemId": "3a0c6555-0dad-55b4-b59f-b11e8074cfdd",
// "result": "",
// "diagnosisId": "db34f48c-8c2f-9311-076d-302dc31930e7",
// "isNameIntoSummary": "Y",
// "isResultIntoSummary": "Y",
// "resultStatusId": "08",
// "simpleCode": null
// },
// {
// "itemId": "3a0c6555-0dad-55b4-b59f-b11e8074cfdd",
// "result": "",
// "diagnosisId": "db34f48c-8c2f-9311-076d-302dc31930e7",
// "isNameIntoSummary": "Y",
// "isResultIntoSummary": "Y",
// "resultStatusId": "08",
// "simpleCode": null
// }
// ],
this.restaurants = row.itemResultTemplates
},
methods: {
tableRowClassName({row, rowIndex}) {
if (row.completeFlag === '0') {
return 'warning-row'; //
} else if (row.completeFlag === '2') {
return 'refuse-row'; //
}
return '';
},
//
rowClick(row){
//registerCheckId
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
//
checkItemList(RegisterCheckId) {
console.log(`/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}`)
getapi(`/api/app/registercheckitem/getlistinregistercheckid?RegisterCheckId=${RegisterCheckId}`)
.then((res) => {
console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) {
this.doctorCheck.checkItemList = res.data;
}
console.log("checkItemList", res.data);
if (res.code == 1) {
this.doctorCheck.checkItemList = res.data;
}
})
.catch((err) => {
this.$message({type: "error",message: `操作失败,原因:${err}`});
this.$message({ type: "error", message: `操作失败,原因:${err}` });
});
},
querySearch(queryString, cb) {
var restaurants = [...this.restaurants] //[{ value: '' },{ value: '' }]
restaurants.forEach((item) =>{
return item.value = item.result
})
console.log('restaurants',restaurants)
var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
// callback
cb(results);
},
createFilter(queryString) {
return (restaurant) => {
return (restaurant['value'].toLowerCase().indexOf(queryString.toLowerCase()) === 0);
};
},
handleSelect(item) {
console.log(item);
},
},
},
//
watch: {
//
"doctorCheck.RegisterCheckId"(newVal, oldVal) {
console.log("watch doctorCheck.RegisterCheckId newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal && newVal != '') {
this.checkItemList(newVal)
}
},
};
},
};
</script>
<style scoped>
.el-table .warning-row {
background: rgb(240, 125, 125);
}
.el-table .refuse-row {
background: rgb(192, 192, 192);
}
.el-table .warning-row {
background: rgb(240, 125, 125);
}
.el-table .refuse-row {
background: rgb(192, 192, 192);
}
</style>

72
src/components/doctorCheck/PatientRegisterBase.vue

@ -1,30 +1,30 @@
<template>
<div style="display: flex">
<div style="display: flex; flex-wrap: wrap; width: 100%;">
<div style="display: flex; flex-wrap: wrap; width: 100%;">
<div class="query">
<span>条码号</span>
<el-input placeholder="条码号" v-model="doctorCheck.prBase.patientRegisterNo" size="small" style="width: 140px"
clearable @blur="onQueryByPatientRegisterNo(doctorCheck.prBase.patientRegisterNo)"/>
<el-input placeholder="条码号" v-model="doctorCheck.prBase.patientRegisterNo" size="small" style="width: 140px"
clearable @input="onQueryByPatientRegisterNo" />
</div>
<div class="query">
<span>档案号</span>
<el-input placeholder="档案号" v-model="doctorCheck.prBase.patientNo" size="small" style="width: 130px"
clearable @blur="onQueryByPatientNo(doctorCheck.prBase.patientNo)"/>
</div>
<el-input placeholder="档案号" v-model="doctorCheck.prBase.patientNo" size="small" style="width: 130px" clearable
@input="onQueryByPatientNo" />
</div>
<div class="query">
<span>姓名</span>
<el-input placeholder="姓名" v-model="doctorCheck.prBase.patientName" size="small" style="width: 100px"
clearable @blur="onQuery()"/>
<el-input placeholder="姓名" v-model="doctorCheck.prBase.patientName" size="small" style="width: 100px" clearable
@blur="onQuery()" />
</div>
<div class="query">
<span>性别</span>
<el-select v-model="doctorCheck.prBase.sex" style="width: 80px" size="small" disabled>
<el-select v-model="doctorCheck.prBase.sexId" style="width: 80px" size="small" disabled>
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div class="query">
<span>体检次数</span>
<el-input v-model="doctorCheck.prBase.medicalTimes" size="small" style="width: 40px" disabled/>
<el-input v-model="doctorCheck.prBase.medicalTimes" size="small" style="width: 40px" disabled />
</div>
<div class="query">
<span>婚姻</span>
@ -34,8 +34,9 @@
</div>
<div class="query">
<span>体检日期</span>
<el-input :value="doctorCheck.prBase.creationTime ? lmoment(doctorCheck.prBase.creationTime, 'yyyy-MM-DD') :''" style="width: 100px" size="small" disabled></el-input>
</div>
<el-input :value="doctorCheck.prBase.creationTime ? lmoment(doctorCheck.prBase.creationTime, 'yyyy-MM-DD') : ''"
style="width: 100px" size="small" disabled></el-input>
</div>
<div class="query">
<span>单位</span>
<el-input :value="doctorCheck.prBase.customerOrgParentName" style="width: 120px" size="small" disabled />
@ -65,14 +66,15 @@
<div class="query">
<span>手机</span>
<el-input :value="doctorCheck.prBase.mobileTelephone" style="width: 120px" size="small" disabled />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { mapState, mapMutations} from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { objCopy, opjCopy } from '../../utlis/proFunc'
export default {
components: {},
@ -114,18 +116,48 @@ export default {
};
},
created() {},
created() { },
//
mounted() {},
mounted() { },
computed: {
...mapState(["dict", "doctorCheck","patientRegister", "customerOrg"]),
...mapState(["dict", "doctorCheck", "patientRegister", "customerOrg"]),
},
methods: {
...mapMutations(['doctorCheckPrBaseInit']),
//
onQueryByPatientRegisterNo() {
let val = this.doctorCheck.prBase.patientRegisterNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=1&PatientRegisterNo=${val}`)
.then((res) => {
if (res.code != -1) {
this.doctorCheckPrBaseInit()
this.doctorCheck.prBase.patientRegisterNo = val
objCopy(res.data,this.doctorCheck.prBase)
}
});
},
//
onQueryByPatientNo() {
let val = this.doctorCheck.prBase.patientNo
console.log(`/api/app/patient-register/patient-register-or-patient?SType=2&PatientNo=${val}`)
getapi(`/api/app/patient-register/patient-register-or-patient?SType=2&PatientNo=${val}`)
.then((res) => {
if (res.code != -1) {
this.doctorCheckPrBaseInit()
this.doctorCheck.prBase.patientNo = val
objCopy(res.data,this.doctorCheck.prBase)
}
});
},
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
},
},
methods: {
//
btnQuery() {
this.doctorCheck.prBase.times++;

117
src/components/doctorCheck/RegisterCheckList.vue

@ -1,57 +1,82 @@
<template>
<div>
<el-table :data="doctorCheck.RegisterCheckList" style="width: 100%" height="750" border
:row-class-name="tableRowClassName" @row-click="rowClick">
<el-table-column prop="asbitemName" label="组合项目" width="180" />
</el-table>
</div>
</template>
<script>
import { mapState } from 'vuex';
export default {
components: {},
data() {
return {
<div>
<el-table :data="doctorCheck.RegisterCheckList" style="width: 100%" height="750" border
:row-class-name="tableRowClassName" @row-click="rowClick">
<el-table-column prop="asbitemName" label="组合项目" width="180" />
</el-table>
</div>
</template>
<script>
import { mapState } from 'vuex';
import { getapi, postapi, putapi, deletapi } from "@/api/api";
};
export default {
components: {},
data() {
return {
};
},
created() {},
//
mounted() {},
computed:{
...mapState(['dict','doctorCheck']),
},
methods: {
tableRowClassName({row, rowIndex}) {
if (row.completeFlag === '0') {
return 'warning-row'; //
} else if (row.completeFlag === '2') {
return 'refuse-row'; //
}
return '';
},
//
rowClick(row){
//registerCheckId
this.doctorCheck.RegisterCheckId = row.id
this.doctorCheck.RegisterCheckEdit = row
},
created() {},
//
mounted() {},
computed:{
...mapState(['dict','doctorCheck']),
//
registerCheckList(patientRegisterId){
console.log(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
getapi(`/api/app/register-check/register-check-or-asbitem/${patientRegisterId}`)
.then((res) => {
console.log("registerCheckList", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckList = res.data;
// 1
if(res.data.length > 0) this.doctorCheck.RegisterCheckId = res.data[0].id
}
})
.catch((err) => {
this.$message({type: "error",message: `操作失败,原因:${err}`});
});
},
methods: {
tableRowClassName({row, rowIndex}) {
if (row.completeFlag === '0') {
return 'warning-row'; //
} else if (row.completeFlag === '2') {
return 'refuse-row'; //
}
return '';
},
//
rowClick(row){
//registerCheckId
getapi(`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`)
.then((res) => {
console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) {
this.doctorCheck.checkItemList = res.data;
}
})
.catch((err) => {
this.$message({type: "error",message: `操作失败,原因:${err}`});
});
},
},
//
watch: {
//
"doctorCheck.prBase.id"(newVal, oldVal) {
console.log("watch doctorCheck.prBase.id newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal && newVal != '') {
this.registerCheckList(newVal)
}
},
};
}
};
</script>
<style scoped>
.el-table .warning-row {

34
src/store/index.js

@ -103,19 +103,6 @@ export default new Vuex.Store({
doctorCheck:{
prBase:{
id:'', //体检登记ID
patientRegisterNo:'', //条码号
patientNo:'', //档案号
patientName:'', //姓名
sex:'', //性别
medicalTimes:'', //体检次数
maritalStatusId:'', //婚姻
creationTime:'', //体检日期
customerOrgParentName:'', //单位
customerOrgName:'', //部门
medicalTypeId:'', //体检类别
personnelTypeId:'', //人员类别
nationId:'', //民族
mobileTelephone:'', //手机
}, //人员体检登记显示基本信息
RegisterCheckEdit:{
@ -130,6 +117,8 @@ export default new Vuex.Store({
auditTime:'',
}, //组合项目详情
RegisterCheckList:[], //人员体检 组合项目列表
RegisterCheck:{}, //单检查记录
RegisterCheckId:'', //
checkItemList:[], //组合项目包含的明细项目
checkSummaryList:[], //小结
checkSuggestionList:[], //建议
@ -197,6 +186,25 @@ export default new Vuex.Store({
break;
}
},
doctorCheckPrBaseInit(state){
state.doctorCheck.prBase = {
id:'', //体检登记ID
patientRegisterNo:'', //条码号
patientNo:'', //档案号
patientName:'', //姓名
sexId:'', //性别
medicalTimes:'', //体检次数
maritalStatusId:'', //婚姻
creationTime:'', //体检日期
customerOrgParentName:'', //单位
customerOrgName:'', //部门
medicalTypeId:'', //体检类别
personnelTypeId:'', //人员类别
nationId:'', //民族
mobileTelephone:'', //手机
} //人员体检登记显示基本信息
},
},
actions: {

Loading…
Cancel
Save