提交 12276f01 编写于 作者: changdi.hao's avatar changdi.hao

修复图片

上级 9b247583
流水线 #35657 已取消 于阶段
...@@ -107,7 +107,12 @@ export default { ...@@ -107,7 +107,12 @@ export default {
let newArr = [] let newArr = []
if (this.imgArr && this.imgArr.length) { if (this.imgArr && this.imgArr.length) {
this.imgArr.forEach(item => { this.imgArr.forEach(item => {
newArr.push(item.response.data) if (item.url) {
newArr.push(item.url)
} else {
newArr.push(item.response.data)
}
}); });
} }
......
...@@ -114,13 +114,13 @@ ...@@ -114,13 +114,13 @@
<el-form-item label="证件号" prop="idCard" > <el-form-item label="证件号" prop="idCard" >
<el-input v-model="formData.idCard" placeholder="请输入证件号" class="set-width" :disabled="noable || editorType== 2" maxlength="18" @blur="blurFn"></el-input> <el-input v-model="formData.idCard" placeholder="请输入证件号" class="set-width" :disabled="noable || editorType== 2" maxlength="18" @blur="blurFn"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="出生日期" prop="birthday" > <el-form-item label="出生日期" prop="birthdayStr" >
<el-date-picker <el-date-picker
class="set-width" class="set-width"
:disabled="noable || birthDisable || editorType== 2" :disabled="noable || birthDisable || editorType== 2"
type="date" type="date"
placeholder="出生日期" placeholder="出生日期"
v-model="formData.birthday" v-model="formData.birthdayStr"
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
> >
...@@ -285,13 +285,6 @@ import uploadImg from '@/components/editor/upload-img' ...@@ -285,13 +285,6 @@ import uploadImg from '@/components/editor/upload-img'
import uploadMusic from '@/components/editor/upload-music' import uploadMusic from '@/components/editor/upload-music'
import { TYPE_LIST, PAY_LIST, SOURCE_LIST, STATUS_LIST, CAR_LIST, SEX_LIST, RELATION_LIST, D_S_LIST, FOLLW_LIST } from '@/utils/constants' import { TYPE_LIST, PAY_LIST, SOURCE_LIST, STATUS_LIST, CAR_LIST, SEX_LIST, RELATION_LIST, D_S_LIST, FOLLW_LIST } from '@/utils/constants'
import { getBirth } from '@/utils/index' import { getBirth } from '@/utils/index'
let getcarMatch = function(rule, value, callback, message) {
if(!/ [0-9A-Za-z]{6,24}$/.test(value)) {
callback(new Error(message))
}else{
callback()
}
}
export default { export default {
components: { components: {
uploadImg, uploadImg,
...@@ -322,7 +315,7 @@ export default { ...@@ -322,7 +315,7 @@ export default {
patientName: '', patientName: '',
idCardType: 1, idCardType: 1,
idCard: '', idCard: '',
birthday: '', birthdayStr: '',
sex: 1, sex: 1,
patientMobilePhone: '', patientMobilePhone: '',
//助诊信息 //助诊信息
...@@ -381,10 +374,9 @@ export default { ...@@ -381,10 +374,9 @@ export default {
idCard: [ idCard: [
{ required: true, message: '请输入证件号', trigger: 'blur' }, { required: true, message: '请输入证件号', trigger: 'blur' },
{ min: 18, message: '长度18个字符', trigger: 'blur' }, { min: 18, message: '长度18个字符', trigger: 'blur' },
{ validator: function(rule, value, callback) { getcarMatch(rule, value, callback, '只能是数字或字母')}, { pattern: /[0-9A-Za-z]{6,24}$/, message: '只能是数字或字母' }
trigger: 'change' }
], ],
birthday: [ birth: [
{ required: true, message: '请选择生日', trigger: 'change' } { required: true, message: '请选择生日', trigger: 'change' }
], ],
sex: [ sex: [
...@@ -486,10 +478,10 @@ export default { ...@@ -486,10 +478,10 @@ export default {
}, },
blurFn() { blurFn() {
if (this.formData.idCardType == 1 && this.formData.idCard && this.formData.idCard.length == 18) { if (this.formData.idCardType == 1 && this.formData.idCard && this.formData.idCard.length == 18) {
this.formData.birthday = getBirth(this.formData.idCard) this.formData.birthdayStr = getBirth(this.formData.idCard)
this.birthDisable = true this.birthDisable = true
} else { } else {
this.formData.birthday = '' this.formData.birthdayStr= ''
this.birthDisable = false this.birthDisable = false
} }
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册