pengjun 2 months ago
parent
commit
65b51780f2
  1. 61
      src/components/doctorCheck/PatientRegisterBase2.vue
  2. 98
      src/components/doctorCheck/Question.vue
  3. 1
      src/store/index.js

61
src/components/doctorCheck/PatientRegisterBase2.vue

@ -7,7 +7,10 @@
clearable />
</div>
<div>
<span class="query">档案号</span>
<el-tooltip content="点击显示该人员调查问卷信息" placement="top">
<el-button type="primary" style="margin-left: 5px;margin-top: 3px; height: 22px;padding: 2px 2px;"
@click="btnQuestion">档案号</el-button>
</el-tooltip>
<el-input placeholder="档案号" v-model="prBase.patientNo" size="small" style="width: 90px;" clearable />
</div>
<div>
@ -23,10 +26,8 @@
<el-input placeholder="检验条码" v-model="prBase.lisNo" size="small" style="width: 120px;" clearable />
</div>
<div>
<el-button type="primary" style="margin-left: 5px;margin-top: 3px; height: 22px;padding: 2px 2px;"
@click="readIdCard">读身份证</el-button>
<el-input placeholder="身份证号" v-model="prBase.idNo" size="small" style="width: 150px;" clearable />
</div>
<div>
@ -104,9 +105,13 @@
<!-- 体检人员记录列表 -->
<el-dialog title="体检人员列表" :visible.sync="dialogWin.PatientRegisterForChoose" width="800px" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<PatientRegisterForChoose :params="PatientRegisterList" @chooseBak="chooseBak"/>
<PatientRegisterForChoose :params="PatientRegisterList" @chooseBak="chooseBak" />
</el-dialog>
<el-dialog title="调查问卷" :visible.sync="dialogWin.question" width="800px"
:close-on-click-modal="false" :append-to-body="true">
<Question :refParams="questionParams" />
</el-dialog>
</div>
</template>
<script>
@ -115,10 +120,11 @@ import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, deepCopy, objCopy, opjCopy, parsIcCardtoLocal } from '../../utlis/proFunc'
import PatientRegisterForChoose from "../../components/patientRegister/PatientRegisterForChoose.vue";
import Question from "../../components/doctorCheck/Question.vue";
export default {
components: {
PatientRegisterForChoose,
PatientRegisterForChoose,Question
},
props: ["refParams"],
data() {
@ -152,6 +158,11 @@ export default {
prBaseInit: {},
PatientRegisterList: [], //
userId: '',
//
questionParams:{
idNo: '', //
refresh:0, //
}
};
},
@ -193,15 +204,25 @@ export default {
dddw, moment,
//
chooseBak(chooseData){
console.log('chooseBak',chooseData)
chooseBak(chooseData) {
console.log('chooseBak', chooseData)
this.prBase.patientRegisterNo = chooseData.patientRegisterNo
this.onQueryByOnlyNo('patientRegisterNo')
},
//
afterFind(rd) {
this.$emit("triggerQuery",rd)
afterFind(rd) {
this.$emit("triggerQuery", rd)
},
btnQuestion(){
if(!this.prBase.idNo){
this.$message.warning({showClose:true,message:'该人员无身份证号,无调查问卷!'})
return
}
this.dialogWin.question = true
this.questionParams.idNo = this.prBase.idNo
this.questionParams.refresh++
},
//
@ -255,7 +276,7 @@ export default {
let noVal = this.prBase[noType] //
if (!noVal) return
let body = {}
if(noType == 'idNo') noVal = noVal.toUpperCase()
if (noType == 'idNo') noVal = noVal.toUpperCase()
body[noType] = noVal
let patientRegister = { id: '' }
@ -278,7 +299,7 @@ export default {
},
//
onQueryByNotOnlyNo(valType) {
let noVal = this.prBase[valType] //
@ -328,7 +349,7 @@ export default {
},
//patientRegisterNo
getPatientRegister(patientRegisterNo) {
@ -338,7 +359,7 @@ export default {
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', body)
.then((res) => {
if (res.code > -1) {
this.prBase = res.data
this.prBase = res.data
if (this.prBase.completeFlag != '3') this.prBase.summaryDoctorId = this.userId
if (this.prBase.completeFlag == '3' && this.prBase.isAudit == 'N') {
this.prBase.auditDoctorId = this.userId
@ -483,10 +504,10 @@ export default {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patientRegisterId: ${this.refParams.id}`);
if(newVal && newVal != oldVal){
// this.getPatientRegister(this.prBase.patientRegisterNo)
// this.dataTransOpts.refresh.register_check.M++
this.prBase = Object.assign({},this.prBase,this.refParams)
if (newVal && newVal != oldVal) {
// this.getPatientRegister(this.prBase.patientRegisterNo)
// this.dataTransOpts.refresh.register_check.M++
this.prBase = Object.assign({}, this.prBase, this.refParams)
}
}
},
@ -496,9 +517,9 @@ export default {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch.refParams.resetTimes newVal: ${newVal} oldVal: ${oldVal}`);
if(newVal && newVal != oldVal){
this.prBase = Object.assign({},this.prBase,this.prBaseInit)
}
if (newVal && newVal != oldVal) {
this.prBase = Object.assign({}, this.prBase, this.prBaseInit)
}
}
},
},

98
src/components/doctorCheck/Question.vue

@ -0,0 +1,98 @@
<template>
<div>
<div style="margin-top: -10px;overflow-y: auto;font-size: 16px;width:100%;height:500px;">
<div v-for="(item,index) in questionDatas" key="index" style="margin: 0 0 10px 10px;">
<div>{{ (index + 1).toString() + '、' + item.questionName }}</div>
<div style="color:black;font-weight: 700;margin-left: 40px;">{{ item.answersNew }}</div>
</div>
<div v-if="questionDatas.length == 0" style="text-align: center;">
无调查问卷
</div>
</div>
<div style="display: flex;justify-content: space-between;">
<div></div>
<div style=" margin-top: 5px">
<el-button type="primary" @click="btnRefresh" class="commonbutton">刷新</el-button>
<el-button type="danger" @click="dialogWin.question = false" class="commonbutton">关闭</el-button>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj } from "@/utlis/proFunc";
export default {
components: {},
props: ["refParams"],
data() {
return {
questionDatas: []
};
},
//<el-tree :data="$store.state.customerOrg.ref_tree" :props="$store.state.customerOrg.treeprops" @node-click="treeclick"></el-tree>
computed: {
...mapState(["dialogWin"]),
},
//
created() { },
//
mounted() {
console.log('this.refParams',this.refParams)
},
methods: {
//
btnRefresh() {
this.questionDatas = []
if (!this.refParams.idNo) return
postapi('/api/app/QuestionRegister/GetQuestionRegisterListByPatientRegisterNo', { idNo: this.refParams.idNo })
.then(res => {
if (res.code > -1) {
this.questionDatas = res.data
let answersNew = ''
this.questionDatas.forEach(e => {
answersNew = ''
e.answers.forEach(c => {
if(answersNew){
answersNew += ';' + c.answer
}else{
answersNew = c.answer
}
});
e.answersNew = answersNew
});
}else{
this.dialogWin.question = false
}
})
.catch(error => {
this.dialogWin.question = false
})
},
},
watch: {
"refParams.refresh":{
immediate:true,
handler(newVal, oldVal) {
console.log(`watch:调查问卷refParams.refresh newVal: ${newVal}, oldVal: ${oldVal}`,this.refParams);
if(newVal != oldVal) this.btnRefresh();
}
},
},
};
</script>
<style lang="scss" scoped>
@import "../../assets/css/global_dialog.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
@import "../../assets/css/global_tree.css";
</style>

1
src/store/index.js

@ -595,6 +595,7 @@ export default new Vuex.Store({
BigtextResultTemplateEdit: false,
sumPrList:false, // 总检台 人员列表
doctorPrList:false, // 医生诊台 人员列表
question:false, //调查问卷
}
},

Loading…
Cancel
Save