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

修复图片

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