Commit dbefc0b3 authored by 芮自成's avatar 芮自成

表单校验跳转未通过处

parent d6075159
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
if (!token) { if (!token) {
token = sessionStorage.getItem('token') token = sessionStorage.getItem('token')
if (process.env.NODE_ENV !== 'production') { if (process.env.NODE_ENV !== 'production') {
token = 'e91f5936-1adb-41bd-984b-b4e2ce5f33b2' token = '955e7a80-744b-481f-8970-890e32ecc31c'
} }
} }
if (token) { if (token) {
......
...@@ -135,17 +135,13 @@ export default { ...@@ -135,17 +135,13 @@ export default {
diseaseInfo: this.form diseaseInfo: this.form
}) })
}).catch(e => { }).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() { showDiseaseTypeChange() {
if (this.$route.query.id) return if (this.$route.query.id) return
......
...@@ -1343,7 +1343,11 @@ export default { ...@@ -1343,7 +1343,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).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 { ...@@ -1712,7 +1712,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).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 { ...@@ -1345,7 +1345,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).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 { ...@@ -1638,7 +1638,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).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 { ...@@ -1343,7 +1343,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).catch(e => {
console.warn('血脂异常表单', e) console.warn('血脂异常表单校验失败', e)
const array = e || []
if (array.length) {
this.$refs.form.scrollToField(array[0].name)
}
}) })
}) })
}, },
......
...@@ -1459,7 +1459,11 @@ export default { ...@@ -1459,7 +1459,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).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 { ...@@ -1343,7 +1343,11 @@ export default {
...createdInfo ...createdInfo
}) })
}).catch(e => { }).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