Commit aecf279e authored by songrui's avatar songrui

Merge branch 'chronic-dev' into 'chronic-master'

Chronic dev

See merge request !4
parents 8cff9805 8f227861
......@@ -66,7 +66,7 @@ export default {
if (!token) {
token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') {
token = 'e91f5936-1adb-41bd-984b-b4e2ce5f33b2'
token = '1642c267-186f-4dd4-9e36-493d4fca1f14'
}
}
if (token) {
......
......@@ -121,7 +121,10 @@ export default {
getPressureData(this.deviceNo).then(res => {
const result = res.data || []
if (result.length) {
let val = result[result.length - 1]
result.sort((a, b) => {
return b.id - a.id
})
let val = result[0]
if (dayjs(val.created).isAfter(this.valueTime)) {
this.lastValue = val
this.loopMark = 0
......
......@@ -135,17 +135,13 @@ export default {
diseaseInfo: this.form
})
}).catch(e => {
console.warn('居民信息校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
// let baseInfo = {}
// try {
// baseInfo = await this.$refs.archive.onSubmit()
// } catch(e) {
// }
},
showDiseaseTypeChange() {
if (this.$route.query.id) return
......
......@@ -1343,7 +1343,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('慢性肾病表单', e)
console.warn('慢性肾病表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
......@@ -1712,7 +1712,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('慢阻肺表单', e)
console.warn('慢阻肺表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
......@@ -1345,7 +1345,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('冠心病表单', e)
console.warn('冠心病表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
......@@ -1638,7 +1638,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('糖尿病表单', e)
console.warn('糖尿病表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
......@@ -1343,7 +1343,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('血脂异常表单', e)
console.warn('血脂异常表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
......@@ -1400,6 +1400,8 @@ export default {
},
referralUnitChange(option = {}) {
this.form.referralUnitName = option.unitName
this.form.referralOfficeId = undefined
this.form.referralOfficeName = undefined
},
referralOfficeChange(option = {}) {
this.form.referralOfficeName = option.officeName
......@@ -1414,9 +1416,15 @@ export default {
},
visitUnitChange(option = {}) {
this.form.visitUnitName = option.unitName
this.form.visitOfficeId = undefined
this.form.visitOfficeName = undefined
this.form.visitDoctorId = undefined
this.form.visitDoctorName = undefined
},
visitOfficeChange(option = {}) {
this.form.visitOfficeName = option.officeName
this.form.visitDoctorId = undefined
this.form.visitDoctorName = undefined
},
submit() {
......@@ -1459,7 +1467,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('高血压表单', e)
console.warn('高血压表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
......@@ -1343,7 +1343,11 @@ export default {
...createdInfo
})
}).catch(e => {
console.warn('脑卒中表单', e)
console.warn('脑卒中表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
})
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment