diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 2fa1213..6b92607 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -231,28 +231,27 @@ - + - + - + - + - - + 加载中... @@ -294,7 +293,11 @@ class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="patientList"> - + + + {{ lmoment(scope.row.lastTime, 'yyyy-MM-DD') }} + + @@ -337,6 +340,7 @@ import moment from 'moment'; import { mapState } from 'vuex' import { getapi, postapi, putapi, deletapi } from "@/api/api"; +import { apiurl } from '../../utlis/mm' import { objCopy,setNull,dddw } from '../../utlis/proFunc' import Camera from './Camera.vue' import PatientRegisterItem from './PatientRegisterItem.vue' @@ -347,7 +351,7 @@ export default { }, data() { return { - + apiurl, form: { id: '', //id patientId: '00000000-0000-0000-0000-000000000000', //档案号ID 选择了档案就传档案号,未选就传00000-0000... @@ -386,6 +390,10 @@ export default { mobileTelephone:'', //手机号 nationId:null, //民族编号 postalCode:'', //邮编 + creatorId:null, + creationTime:'', + lastModificationTime:'', + lastModifierId:null, }, //单位 记录 目前新增与更新是一致 defaultNull:[ @@ -442,14 +450,17 @@ export default { query(param){ //编辑的时候不查重 if(this.form.id || !param) return - this.dialogVisible = true - console.log(param) + + //console.log(param) getapi(`/api/app/patient/in-filter?Filter=${param}`) .then( (res) => { if(res.code == 1){ - //console.log('res',res) - this.patientList = res.data.items + console.log('查重 ',res) //有数据才显示 + if(res.data.items && res.data.items.length > 0){ + this.patientList = res.data.items + this.dialogVisible = true + } } } ) @@ -503,8 +514,11 @@ export default { delete body.completeFlag delete body.isMedicalStart delete body.patientNo + delete body.creatorId + delete body.creationTime + delete body.lastModificationTime + delete body.lastModifierId - setNull(body,this.defaultNull) //日期转换 @@ -526,22 +540,11 @@ export default { objCopy(res.data,this.form) this.patientRegister.patientRegisterId = res.data.id this.patientRegister.patientRegisterId = res.data.id - this.patientRegister.patientRegisterRd = res.data this.patientRegister.query.times++ - - return getapi(`/api/app/patient/${this.form.patientId}`) } } - ) - .then( - (res) => { - if(res.code == 1){ - //返写档案号 - this.form.patientNo = res.data.patientNo - } - } - ); + ) } else { //id不为空则编辑 diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index bd61728..3dcb74f 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -209,8 +209,9 @@ export default { }, //点击体检次数行 rowick(row) { + this.patientRegister.photo = '' //清除照片缓存 this.patientRegister.patientRegisterId = row.id - this.patientRegister.patientRegisterRd = row + this.patientRegister.patientRegisterRd = row //console.log('row',row) }, diff --git a/src/store/index.js b/src/store/index.js index 10e750e..ca1f638 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -74,6 +74,10 @@ export default new Vuex.Store({ mobileTelephone:'', //手机号 nationId:null, //民族编号 postalCode:'', //邮编 + creatorId:null, + creationTime:'', + lastModificationTime:'', + lastModifierId:null, }, //体检人员记录(初始值)一般创建用 query:{ diff --git a/src/utlis/mm.js b/src/utlis/mm.js index bb3fdb4..5843f57 100644 --- a/src/utlis/mm.js +++ b/src/utlis/mm.js @@ -1,5 +1,3 @@ -const apiurl='http://81.70.217.145:9529' - export default{ - apiurl + apiurl:'http://81.70.217.145:9529', } \ No newline at end of file diff --git a/src/utlis/proFunc.js b/src/utlis/proFunc.js index 8f400c1..3456bf4 100644 --- a/src/utlis/proFunc.js +++ b/src/utlis/proFunc.js @@ -38,16 +38,17 @@ exports.dddw = (arrayData,key,value,display) => { } //一般uuid字段为空时,需设置为null值 -exports.setNull = (obj,arrayCols) => { - if(arrayCols){ - for(let i=0;i { + if(arrayKeys){ + for(let i=0;i