|
@ -1,103 +1,121 @@
|
|
|
|
|
|
// 慢阻肺患者档案-编辑
|
|
|
var template = ''
|
|
|
$.ajax('../../../component/statistics/CopdPatientRecordEdit/index.html',{
|
|
|
$.ajax('../../../component/statistics/CopdPatientRecordEdit/index.html', {
|
|
|
data: {},
|
|
|
dataType: 'html',
|
|
|
cache: false,
|
|
|
timeout: 60000,
|
|
|
async: false,
|
|
|
error: function(res) {
|
|
|
},
|
|
|
success: function(res) {
|
|
|
error: function (res) {},
|
|
|
success: function (res) {
|
|
|
template = res
|
|
|
}
|
|
|
})
|
|
|
let vm
|
|
|
let vm
|
|
|
Vue.component('copd-patient-record-edit', {
|
|
|
template: template,
|
|
|
props: ['editData'],
|
|
|
data() {
|
|
|
return {
|
|
|
formData:{},
|
|
|
nationDict:[],
|
|
|
dicName:['jkcopd_followup_status','jkcopd_isLive','jkcopd_first_area','jkcopd_first_org_level', 'jkcopd_marriage','jkcopd_occupation','jkcopd_smoke','jkcopd_drink','jkcopd_archivesStatus','jkcopd_disease_conversion','jkcopd_firstVisitType','jkcopd_educational','idCardType'],
|
|
|
marriageArr:[],
|
|
|
followupArr:[],
|
|
|
idCardTypeArr:[],
|
|
|
firstAreaArr:[],
|
|
|
isLiveArr:[],
|
|
|
orgLevelArr:[],
|
|
|
occupationArr:[],
|
|
|
smokeArr:[],
|
|
|
drinkArr:[],
|
|
|
archivesArr:[],
|
|
|
conversionArr:[],
|
|
|
firstVisitTypeArr:[],
|
|
|
educationalArr:[],
|
|
|
copdArr:[{value:'是',code:'1'},{value:'否',code:'0'}],
|
|
|
addressOptions:[],
|
|
|
formData: {},
|
|
|
nationDict: [],
|
|
|
dicName: [
|
|
|
'jkcopd_followup_status',
|
|
|
'jkcopd_isLive',
|
|
|
'jkcopd_first_area',
|
|
|
'jkcopd_first_org_level',
|
|
|
'jkcopd_marriage',
|
|
|
'jkcopd_occupation',
|
|
|
'jkcopd_smoke',
|
|
|
'jkcopd_drink',
|
|
|
'jkcopd_archivesStatus',
|
|
|
'jkcopd_disease_conversion',
|
|
|
'jkcopd_firstVisitType',
|
|
|
'jkcopd_educational',
|
|
|
'idCardType'
|
|
|
],
|
|
|
marriageArr: [],
|
|
|
followupArr: [],
|
|
|
idCardTypeArr: [],
|
|
|
firstAreaArr: [],
|
|
|
isLiveArr: [],
|
|
|
orgLevelArr: [],
|
|
|
occupationArr: [],
|
|
|
smokeArr: [],
|
|
|
drinkArr: [],
|
|
|
archivesArr: [],
|
|
|
conversionArr: [],
|
|
|
firstVisitTypeArr: [],
|
|
|
educationalArr: [],
|
|
|
copdArr: [
|
|
|
{ value: '是', code: '1' },
|
|
|
{ value: '否', code: '0' }
|
|
|
],
|
|
|
addressOptions: [],
|
|
|
props: {
|
|
|
label: 'name',
|
|
|
value: 'code',
|
|
|
children: 'children'
|
|
|
},
|
|
|
addressVal:[],
|
|
|
resiginAddressVal:[],
|
|
|
addressVal: [],
|
|
|
resiginAddressVal: [],
|
|
|
diagnosisAddressVal: [],
|
|
|
docInfo: JSON.parse(window.localStorage.getItem('docInfo')),
|
|
|
rules: {
|
|
|
mobile:[
|
|
|
mobile: [
|
|
|
{ required: true, message: '请输入联系方式', trigger: 'blur' },
|
|
|
{ min: 11, max: 11, message: '请输入正确的联系方式', trigger: 'blur' }
|
|
|
]
|
|
|
}
|
|
|
},
|
|
|
areaType: 1 // 用于区分是普通地址选择器还是首次诊断地区选择器,诊断地区选择器只到区,并且新增不详区,1:普通 2:特殊
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
vm=this
|
|
|
vm = this
|
|
|
},
|
|
|
watch:{
|
|
|
'formData.isLive':{
|
|
|
handler:function(o) {
|
|
|
if(o=='1'){
|
|
|
this.formData.deathTime=''
|
|
|
this.formData.deathReason=''
|
|
|
}
|
|
|
watch: {
|
|
|
'formData.isLive': {
|
|
|
handler: function (o) {
|
|
|
if (o == '1') {
|
|
|
this.formData.deathTime = ''
|
|
|
this.formData.deathReason = ''
|
|
|
}
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true
|
|
|
},
|
|
|
addressVal(value){
|
|
|
console.log(value,'0000000000000000000000')
|
|
|
}
|
|
|
},
|
|
|
addressVal(value) {
|
|
|
console.log(value, '0000000000000000000000')
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
var vm=this
|
|
|
this.formData= JSON.parse(window.localStorage.getItem('editDetail'))
|
|
|
console.log(this.formData,'00000000000000000000000000000')
|
|
|
if(this.formData.liveStreet){
|
|
|
this.addressVal=[this.formData.liveProvince,this.formData.liveCity,this.formData.liveTown,this.formData.liveStreet]
|
|
|
this.getDistrict(0)
|
|
|
}else{
|
|
|
this.addressVal=[this.formData.liveProvince,this.formData.liveCity,this.formData.liveTown]
|
|
|
var vm = this
|
|
|
this.formData = JSON.parse(window.localStorage.getItem('editDetail'))
|
|
|
console.log(this.formData, '00000000000000000000000000000')
|
|
|
if (this.formData.liveStreet) {
|
|
|
this.addressVal = [this.formData.liveProvince, this.formData.liveCity, this.formData.liveTown, this.formData.liveStreet]
|
|
|
this.getDistrict(0)
|
|
|
} else {
|
|
|
this.addressVal = [this.formData.liveProvince, this.formData.liveCity, this.formData.liveTown]
|
|
|
this.getDistrict(0)
|
|
|
}
|
|
|
this.getNation()
|
|
|
|
|
|
if(this.formData.liveStreet){
|
|
|
this.resiginAddressVal=[this.formData.registProvince,this.formData.registCity,this.formData.registTown,this.formData.registStreet]
|
|
|
|
|
|
if (this.formData.liveStreet) {
|
|
|
this.resiginAddressVal = [this.formData.registProvince, this.formData.registCity, this.formData.registTown, this.formData.registStreet]
|
|
|
this.getDistrict(1)
|
|
|
}else{
|
|
|
this.resiginAddressVal=[this.formData.registProvince,this.formData.registCity,this.formData.registTown]
|
|
|
this.getDistrict(1)
|
|
|
}
|
|
|
this.dicName.forEach(function(item) {
|
|
|
} else {
|
|
|
this.resiginAddressVal = [this.formData.registProvince, this.formData.registCity, this.formData.registTown]
|
|
|
this.getDistrict(1)
|
|
|
}
|
|
|
this.dicName.forEach(function (item) {
|
|
|
vm.getDictByDictName(item)
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
handleItemChange(val) {
|
|
|
this.areaType = 1
|
|
|
// 获取地址
|
|
|
if (val.length == 1) {
|
|
|
// 获取市
|
|
@ -106,117 +124,124 @@ Vue.component('copd-patient-record-edit', {
|
|
|
if (val.length == 2) {
|
|
|
// 获取区
|
|
|
this.baseTownList(val)
|
|
|
|
|
|
}
|
|
|
if (val.length == 3) {
|
|
|
// 获取区
|
|
|
this.stressList(val)
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//字典
|
|
|
getDictByDictName(value){
|
|
|
var vm=this
|
|
|
statisticAPI.getDictByDictName({name:value}).then(function(res){
|
|
|
if(value=='jkcopd_marriage'){
|
|
|
vm.marriageArr=res.list
|
|
|
}else if(value=='jkcopd_occupation'){
|
|
|
vm.occupationArr=res.list
|
|
|
}else if(value=='jkcopd_smoke'){
|
|
|
vm.smokeArr=res.list
|
|
|
}else if(value=='jkcopd_drink'){
|
|
|
vm.drinkArr=res.list
|
|
|
}else if(value=='jkcopd_archivesStatus'){
|
|
|
vm.archivesArr=res.list
|
|
|
}else if(value=='jkcopd_disease_conversion'){
|
|
|
vm.conversionArr=res.list
|
|
|
}else if(value=='jkcopd_firstVisitType'){
|
|
|
vm.firstVisitTypeArr=res.list
|
|
|
}else if(value=='jkcopd_educational'){
|
|
|
vm.educationalArr=res.list
|
|
|
}else if(value=='idCardType'){
|
|
|
vm.idCardTypeArr=res.list
|
|
|
}else if(value=='jkcopd_first_area'){
|
|
|
vm.firstAreaArr=res.list
|
|
|
}else if(value=='jkcopd_first_org_level'){
|
|
|
vm.orgLevelArr=res.list
|
|
|
}else if(value=='jkcopd_isLive'){
|
|
|
vm.isLiveArr=res.list
|
|
|
}else if(value=='jkcopd_followup_status'){
|
|
|
vm.followupArr=res.list
|
|
|
handleItemChange1(val) {
|
|
|
this.areaType = 2
|
|
|
// 获取地址
|
|
|
if (val.length == 1) {
|
|
|
// 获取市
|
|
|
this.baseCityList(val[0])
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
if (val.length == 2) {
|
|
|
// 获取区
|
|
|
this.baseTownList(val)
|
|
|
}
|
|
|
// if (val.length == 3) {
|
|
|
// // 获取区
|
|
|
// this.stressList(val)
|
|
|
// }
|
|
|
},
|
|
|
getNation(){
|
|
|
var vm=this
|
|
|
statisticAPI.getNationDict().then(function(res){
|
|
|
vm.nationDict= res.data
|
|
|
})
|
|
|
//字典
|
|
|
getDictByDictName(value) {
|
|
|
var vm = this
|
|
|
statisticAPI.getDictByDictName({ name: value }).then(function (res) {
|
|
|
if (value == 'jkcopd_marriage') {
|
|
|
vm.marriageArr = res.list
|
|
|
} else if (value == 'jkcopd_occupation') {
|
|
|
vm.occupationArr = res.list
|
|
|
} else if (value == 'jkcopd_smoke') {
|
|
|
vm.smokeArr = res.list
|
|
|
} else if (value == 'jkcopd_drink') {
|
|
|
vm.drinkArr = res.list
|
|
|
} else if (value == 'jkcopd_archivesStatus') {
|
|
|
vm.archivesArr = res.list
|
|
|
} else if (value == 'jkcopd_disease_conversion') {
|
|
|
vm.conversionArr = res.list
|
|
|
} else if (value == 'jkcopd_firstVisitType') {
|
|
|
vm.firstVisitTypeArr = res.list
|
|
|
} else if (value == 'jkcopd_educational') {
|
|
|
vm.educationalArr = res.list
|
|
|
} else if (value == 'idCardType') {
|
|
|
vm.idCardTypeArr = res.list
|
|
|
} else if (value == 'jkcopd_first_area') {
|
|
|
vm.firstAreaArr = res.list
|
|
|
} else if (value == 'jkcopd_first_org_level') {
|
|
|
vm.orgLevelArr = res.list
|
|
|
} else if (value == 'jkcopd_isLive') {
|
|
|
vm.isLiveArr = res.list
|
|
|
} else if (value == 'jkcopd_followup_status') {
|
|
|
vm.followupArr = res.list
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getNation() {
|
|
|
var vm = this
|
|
|
statisticAPI.getNationDict().then(function (res) {
|
|
|
vm.nationDict = res.data
|
|
|
})
|
|
|
},
|
|
|
getDistrict(id){
|
|
|
var vm =this
|
|
|
homeAPI.getDistrict({ type:1 ,code:'' }).then(function(res) {
|
|
|
var detailModelList=res.list
|
|
|
detailModelList.forEach(function(item){
|
|
|
getDistrict(id) {
|
|
|
var vm = this
|
|
|
homeAPI.getDistrict({ type: 1, code: '' }).then(function (res) {
|
|
|
var detailModelList = res.list
|
|
|
detailModelList.forEach(function (item) {
|
|
|
item.children = []
|
|
|
})
|
|
|
vm.addressOptions=detailModelList
|
|
|
if(vm.formData.liveProvince&&id==0){
|
|
|
|
|
|
vm.baseCityList(vm.formData.liveProvince,id)
|
|
|
}
|
|
|
if(vm.formData.registProvince&&id==1){
|
|
|
|
|
|
vm.baseCityList(vm.formData.registProvince,id)
|
|
|
vm.addressOptions = detailModelList
|
|
|
if (vm.formData.liveProvince && id == 0) {
|
|
|
vm.baseCityList(vm.formData.liveProvince, id)
|
|
|
}
|
|
|
if (vm.formData.registProvince && id == 1) {
|
|
|
vm.baseCityList(vm.formData.registProvince, id)
|
|
|
}
|
|
|
|
|
|
})
|
|
|
},
|
|
|
onClickNavLink(id) {
|
|
|
var element = document.getElementById(id);
|
|
|
var top = element.offsetTop;
|
|
|
window.scrollTo({ top: top, behavior: 'smooth' });
|
|
|
var element = document.getElementById(id)
|
|
|
var top = element.offsetTop
|
|
|
window.scrollTo({ top: top, behavior: 'smooth' })
|
|
|
},
|
|
|
//市
|
|
|
baseCityList:function(code,id){
|
|
|
baseCityList: function (code, id) {
|
|
|
var vm = this
|
|
|
var activeIndex = null
|
|
|
vm.addressOptions.forEach(function(item, index) {
|
|
|
vm.addressOptions.forEach(function (item, index) {
|
|
|
if (item.code == code) {
|
|
|
activeIndex = index
|
|
|
}
|
|
|
})
|
|
|
|
|
|
homeAPI.getDistrict({ type:2 ,code:code }).then(function(res) {
|
|
|
homeAPI.getDistrict({ type: 2, code: code }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
var detailModelList = res.list
|
|
|
detailModelList.forEach(item => {
|
|
|
item.children = []
|
|
|
})
|
|
|
vm.addressOptions[activeIndex].children = detailModelList
|
|
|
if(vm.addressVal.length&&id==0){
|
|
|
vm.baseTownList([vm.addressVal[0], vm.addressVal[1]],id)
|
|
|
if (vm.addressVal.length && id == 0) {
|
|
|
vm.baseTownList([vm.addressVal[0], vm.addressVal[1]], id)
|
|
|
}
|
|
|
if(vm.resiginAddressVal.length&&id==1){
|
|
|
vm.baseTownList([vm.resiginAddressVal[0], vm.resiginAddressVal[1]],id)
|
|
|
if (vm.resiginAddressVal.length && id == 1) {
|
|
|
vm.baseTownList([vm.resiginAddressVal[0], vm.resiginAddressVal[1]], id)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//县
|
|
|
baseTownList(val,id) {
|
|
|
baseTownList(val, id) {
|
|
|
var vm = this
|
|
|
var provinceIndex = null
|
|
|
var activeIndex = null
|
|
|
vm.addressOptions.forEach(function(item, index){
|
|
|
vm.addressOptions.forEach(function (item, index) {
|
|
|
if (item.code == val[0]) {
|
|
|
var children = item.children
|
|
|
provinceIndex = index
|
|
|
children.forEach(function(item, idx) {
|
|
|
children.forEach(function (item, idx) {
|
|
|
if (item.code == val[1]) {
|
|
|
activeIndex = idx
|
|
|
}
|
|
@ -224,25 +249,30 @@ Vue.component('copd-patient-record-edit', {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
homeAPI.getDistrict({ type:3,code:val[1] }).then( function(res){
|
|
|
homeAPI.getDistrict({ type: 3, code: val[1] }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
var detailModelList = res.list
|
|
|
if(val[1]=='350200'){
|
|
|
|
|
|
detailModelList.forEach(function(item){
|
|
|
item.children = []
|
|
|
if (vm.areaType == 1) {
|
|
|
var detailModelList = res.list
|
|
|
} else {
|
|
|
var detailModelList = res.list.concat({ code: '350299', name: '不详区', city: '350200', province: '350000', id: 99999 })
|
|
|
}
|
|
|
if (val[1] == '350200') {
|
|
|
detailModelList.forEach(function (item) {
|
|
|
if (vm.areaType == 1) {
|
|
|
item.children = []
|
|
|
} else {
|
|
|
item.children = null
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
if (vm.addressOptions[provinceIndex].children[activeIndex]) {
|
|
|
vm.addressOptions[provinceIndex].children[activeIndex].children = detailModelList
|
|
|
if(vm.addressVal.length&&id==0){
|
|
|
vm.stressList([vm.addressVal[0], vm.addressVal[1],vm.addressVal[2]])
|
|
|
|
|
|
if (vm.addressVal.length && id == 0) {
|
|
|
vm.stressList([vm.addressVal[0], vm.addressVal[1], vm.addressVal[2]])
|
|
|
}
|
|
|
if (vm.resiginAddressVal.length && id == 1) {
|
|
|
vm.stressList([vm.resiginAddressVal[0], vm.resiginAddressVal[1], vm.resiginAddressVal[2]])
|
|
|
}
|
|
|
if(vm.resiginAddressVal.length&&id==1){
|
|
|
vm.stressList([vm.resiginAddressVal[0], vm.resiginAddressVal[1],vm.resiginAddressVal[2]])
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@ -252,26 +282,26 @@ Vue.component('copd-patient-record-edit', {
|
|
|
var vm = this
|
|
|
var provinceIndex = null
|
|
|
var activeIndex = null
|
|
|
var xIndex=null
|
|
|
vm.addressOptions.forEach(function(item, index) {
|
|
|
var xIndex = null
|
|
|
vm.addressOptions.forEach(function (item, index) {
|
|
|
if (item.code == val[0]) {
|
|
|
var children = item.children
|
|
|
provinceIndex = index
|
|
|
children.forEach(function(item, idx) {
|
|
|
children.forEach(function (item, idx) {
|
|
|
if (item.code == val[1]) {
|
|
|
activeIndex = idx
|
|
|
var xItem=item.children
|
|
|
xItem.forEach(function(item,xianIndex){
|
|
|
if(item.code==val[2]){
|
|
|
xIndex=xianIndex
|
|
|
var xItem = item.children
|
|
|
xItem.forEach(function (item, xianIndex) {
|
|
|
if (item.code == val[2]) {
|
|
|
xIndex = xianIndex
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
|
|
|
homeAPI.getDistrict({ type:4,code:val[2] }).then( function(res){
|
|
|
homeAPI.getDistrict({ type: 4, code: val[2] }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
var detailModelList = res.list
|
|
|
if (vm.addressOptions[provinceIndex].children[activeIndex].children[xIndex]) {
|
|
@ -280,90 +310,85 @@ Vue.component('copd-patient-record-edit', {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
cancel:function(){
|
|
|
cancel: function () {
|
|
|
EventBus.$emit('copd-reset-select')
|
|
|
},
|
|
|
updJkCopdPatient(){
|
|
|
var vm =this
|
|
|
this.$refs.ruleForm.validate(function(valid){
|
|
|
if(valid){
|
|
|
if(!vm.formData.mobile){
|
|
|
updJkCopdPatient() {
|
|
|
var vm = this
|
|
|
this.$refs.ruleForm.validate(function (valid) {
|
|
|
if (valid) {
|
|
|
if (!vm.formData.mobile) {
|
|
|
this.$message.error('请填写联系方式!')
|
|
|
return false
|
|
|
}
|
|
|
if(vm.formData.sexName=='男'){
|
|
|
vm.formData.sex=1
|
|
|
}else{
|
|
|
vm.formData.sex=2
|
|
|
if (vm.formData.sexName == '男') {
|
|
|
vm.formData.sex = 1
|
|
|
} else {
|
|
|
vm.formData.sex = 2
|
|
|
}
|
|
|
if(vm.addressVal.length){
|
|
|
|
|
|
vm.addressVal.forEach(function(item,index){
|
|
|
if(index==0){
|
|
|
vm.formData.liveProvince=item
|
|
|
vm.formData.liveProvinceName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==1){
|
|
|
vm.formData.liveCity=item
|
|
|
vm.formData.liveCityName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==2){
|
|
|
vm.formData.liveTown=item
|
|
|
vm.formData.liveTownName=vm.$refs.cascader.currentLabels[index]
|
|
|
}else if(index==3){
|
|
|
vm.formData.liveStreet=item
|
|
|
vm.formData.liveStreetName=vm.$refs.cascader.currentLabels[index]
|
|
|
}
|
|
|
if (vm.addressVal.length) {
|
|
|
vm.addressVal.forEach(function (item, index) {
|
|
|
if (index == 0) {
|
|
|
vm.formData.liveProvince = item
|
|
|
vm.formData.liveProvinceName = vm.$refs.cascader.currentLabels[index]
|
|
|
} else if (index == 1) {
|
|
|
vm.formData.liveCity = item
|
|
|
vm.formData.liveCityName = vm.$refs.cascader.currentLabels[index]
|
|
|
} else if (index == 2) {
|
|
|
vm.formData.liveTown = item
|
|
|
vm.formData.liveTownName = vm.$refs.cascader.currentLabels[index]
|
|
|
} else if (index == 3) {
|
|
|
vm.formData.liveStreet = item
|
|
|
vm.formData.liveStreetName = vm.$refs.cascader.currentLabels[index]
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
vm.formData.liveProvince=''
|
|
|
vm.formData.liveProvinceName=''
|
|
|
vm.formData.liveCity=''
|
|
|
vm.formData.liveCityName=''
|
|
|
vm.formData.liveTown=''
|
|
|
vm.formData.liveTownName=''
|
|
|
vm.formData.liveStreet=''
|
|
|
vm.formData.liveStreetName=''
|
|
|
} else {
|
|
|
vm.formData.liveProvince = ''
|
|
|
vm.formData.liveProvinceName = ''
|
|
|
vm.formData.liveCity = ''
|
|
|
vm.formData.liveCityName = ''
|
|
|
vm.formData.liveTown = ''
|
|
|
vm.formData.liveTownName = ''
|
|
|
vm.formData.liveStreet = ''
|
|
|
vm.formData.liveStreetName = ''
|
|
|
}
|
|
|
if(vm.resiginAddressVal.length){
|
|
|
|
|
|
vm.resiginAddressVal.forEach(function(item,index){
|
|
|
if(index==0){
|
|
|
vm.formData.registProvince=item
|
|
|
vm.formData.registProvinceName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==1){
|
|
|
vm.formData.registCity=item
|
|
|
vm.formData.registCityName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==2){
|
|
|
vm.formData.registTown=item
|
|
|
vm.formData.registTownName=vm.$refs.cas.currentLabels[index]
|
|
|
}else if(index==3){
|
|
|
vm.formData.registStreet=item
|
|
|
vm.formData.registStreetName=vm.$refs.cas.currentLabels[index]
|
|
|
if (vm.resiginAddressVal.length) {
|
|
|
vm.resiginAddressVal.forEach(function (item, index) {
|
|
|
if (index == 0) {
|
|
|
vm.formData.registProvince = item
|
|
|
vm.formData.registProvinceName = vm.$refs.cas.currentLabels[index]
|
|
|
} else if (index == 1) {
|
|
|
vm.formData.registCity = item
|
|
|
vm.formData.registCityName = vm.$refs.cas.currentLabels[index]
|
|
|
} else if (index == 2) {
|
|
|
vm.formData.registTown = item
|
|
|
vm.formData.registTownName = vm.$refs.cas.currentLabels[index]
|
|
|
} else if (index == 3) {
|
|
|
vm.formData.registStreet = item
|
|
|
vm.formData.registStreetName = vm.$refs.cas.currentLabels[index]
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
vm.formData.registProvince=''
|
|
|
vm.formData.registProvinceName=''
|
|
|
vm.formData.registCity=''
|
|
|
vm.formData.registCityName=''
|
|
|
vm.formData.registTown=''
|
|
|
vm.formData.registTownName=''
|
|
|
vm.formData.registStreet=''
|
|
|
vm.formData.registStreetName=''
|
|
|
})
|
|
|
} else {
|
|
|
vm.formData.registProvince = ''
|
|
|
vm.formData.registProvinceName = ''
|
|
|
vm.formData.registCity = ''
|
|
|
vm.formData.registCityName = ''
|
|
|
vm.formData.registTown = ''
|
|
|
vm.formData.registTownName = ''
|
|
|
vm.formData.registStreet = ''
|
|
|
vm.formData.registStreetName = ''
|
|
|
}
|
|
|
statisticAPI.updJkCopdPatient({jsonData:JSON.stringify(vm.formData),doctor:vm.docInfo.code}).then(
|
|
|
function(res){
|
|
|
if(res.status==200){
|
|
|
EventBus.$emit('copd-reset-save')
|
|
|
}
|
|
|
statisticAPI.updJkCopdPatient({ jsonData: JSON.stringify(vm.formData), doctor: vm.docInfo.code }).then(function (res) {
|
|
|
if (res.status == 200) {
|
|
|
EventBus.$emit('copd-reset-save')
|
|
|
}
|
|
|
)
|
|
|
}else{
|
|
|
})
|
|
|
} else {
|
|
|
vm.$message.error('请填写联系方式!')
|
|
|
window.scrollTo({ top: top, behavior: 'smooth' });
|
|
|
window.scrollTo({ top: top, behavior: 'smooth' })
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
})
|