提交 c4ded963 编写于 作者: tao.wu's avatar tao.wu

no message

上级 755d5da0
...@@ -28,7 +28,7 @@ export const checkRange = (rule, value, callback) => { ...@@ -28,7 +28,7 @@ export const checkRange = (rule, value, callback) => {
// 校验手机号 // 校验手机号
export const checkMobile = (rule, value, callback) => { export const checkMobile = (rule, value, callback) => {
var reg = /^1[3|4|5|7|8][0-9]{9}$/; //验证规则 var reg = /^1[3|4|5|7|8|9][0-9]{9}$/; //验证规则
const flag = reg.test(value); const flag = reg.test(value);
if(flag){ if(flag){
callback() callback()
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</div> </div>
<div class="plan-btns-group"> <div class="plan-btns-group">
<el-button class="button-white" plain @click="cancelEdit" size="small">取 消</el-button> <el-button class="button-white" plain @click="cancelEdit" size="small">取 消</el-button>
<el-button class="button-green" type="primary" @click="saveModify" size="small">保 存</el-button> <el-button class="button-green" type="primary" @click="saveModify('baseInfo')" size="small">保 存</el-button>
</div> </div>
</div> </div>
<el-form ref="baseInfo" :model="planDetailData" :rules="rules" label-suffix=":" label-width="140px"> <el-form ref="baseInfo" :model="planDetailData" :rules="rules" label-suffix=":" label-width="140px">
...@@ -241,9 +241,18 @@ ...@@ -241,9 +241,18 @@
this.$router.back(-1) this.$router.back(-1)
}); });
}, },
saveModify() { saveModify(formName) {
this.$refs[formName].validate((valid) => {
if(valid){
// 点击保存,先进行校验,表单字段是否通过验证 // 点击保存,先进行校验,表单字段是否通过验证
this.checkForm = true this.checkForm = true
}else{
this.$message({
message: '请填写完整表单',
type: 'error'
});
}
});
}, },
// 监听保存校验结果 // 监听保存校验结果
addListenSave(val){ addListenSave(val){
......
...@@ -27,8 +27,7 @@ ...@@ -27,8 +27,7 @@
<!--模板页面除了显示居民基本信息,将病种展示作为组件引入--> <!--模板页面除了显示居民基本信息,将病种展示作为组件引入-->
<div class="form-container"> <div class="form-container">
<!--脑卒中--> <scale :showBtn="showBtn" :scaleType="scaleNo" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" />
<stroke v-if="resourceId=='SCALE0003'" :showBtn="showBtn" :checkStart="checkStart" @checkEnd="checkEnd" :saveWay="saveWay" />
</div> </div>
...@@ -42,7 +41,7 @@ ...@@ -42,7 +41,7 @@
// 糖尿病 // 糖尿病
import stroke from './patient-scale/stroke' import scale from './patient-scale/scale'
export default { export default {
data(){ data(){
return { return {
...@@ -50,12 +49,13 @@ ...@@ -50,12 +49,13 @@
jumPathThird: '/followup/record-manage/record-list', jumPathThird: '/followup/record-manage/record-list',
checkStart: false, checkStart: false,
showBtn: '1', showBtn: '1',
resourceId: '', // resourceId: '',
saveWay: 1, saveWay: 1,
scaleNo: ''
} }
}, },
components: { components: {
stroke, scale,
BreadCrumb, BreadCrumb,
}, },
methods: { methods: {
...@@ -68,8 +68,9 @@ ...@@ -68,8 +68,9 @@
} }
}, },
created(){ created(){
this.resourceId = this.$route.query.resourceId; this.scaleNo = this.$route.query.scaleNo;
this.resourceId = 'SCALE0003' console.log(this.scaleNo)
// this.resourceId = 'SCALE0003'
if(this.$route.query.showBtn=='0'){ if(this.$route.query.showBtn=='0'){
this.showBtn = String(this.$route.query.showBtn); this.showBtn = String(this.$route.query.showBtn);
} }
......
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
formType: 'input',
className: 'float-none',
prop: 'followUpOrgName',
model: 'followUpOrgName',
label: '随访单位名称:',
disabled: false,
placeholder: '请输入随访单位名称',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访单位名称', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpUser',
model: 'followUpUser',
label: '随访人员姓名:',
disabled: false,
placeholder: '请输入随访人员姓名',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员姓名', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpMobile',
model: 'followUpMobile',
label: '随访人员联系电话:',
disabled: false,
placeholder: '请输入随访人员联系电话',
spanNum: 12,
maxlength: 11,
type: 'tel',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员联系电话', trigger: ['submit','change']},{ validator: checkMobile , trigger: ['submit','change'] }],
},
{
formType: 'date-picker',
className: 'float-none',
prop: 'surveyTime',
model: 'surveyTime',
placeholder: '请选择',
label: '本次调查时间:',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dateType: 'date',
type: 'date',
rules: [{required: true, message: '请选择本次调查时间', trigger: ['submit','change']}],
spanNum: 12,
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
formType: 'input',
className: 'float-none',
prop: 'followUpOrgName',
model: 'followUpOrgName',
label: '随访单位名称:',
disabled: false,
placeholder: '请输入随访单位名称',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访单位名称', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpUser',
model: 'followUpUser',
label: '随访人员姓名:',
disabled: false,
placeholder: '请输入随访人员姓名',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员姓名', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpMobile',
model: 'followUpMobile',
label: '随访人员联系电话:',
disabled: false,
placeholder: '请输入随访人员联系电话',
spanNum: 12,
maxlength: 11,
type: 'tel',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员联系电话', trigger: ['submit','change']},{ validator: checkMobile , trigger: ['submit','change'] }],
},
{
formType: 'date-picker',
className: 'float-none',
prop: 'surveyTime',
model: 'surveyTime',
placeholder: '请选择',
label: '本次调查时间:',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dateType: 'date',
type: 'date',
rules: [{required: true, message: '请选择本次调查时间', trigger: ['submit','change']}],
spanNum: 12,
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
formType: 'input',
className: 'float-none',
prop: 'followUpOrgName',
model: 'followUpOrgName',
label: '随访单位名称:',
disabled: false,
placeholder: '请输入随访单位名称',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访单位名称', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpUser',
model: 'followUpUser',
label: '随访人员姓名:',
disabled: false,
placeholder: '请输入随访人员姓名',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员姓名', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpMobile',
model: 'followUpMobile',
label: '随访人员联系电话:',
disabled: false,
placeholder: '请输入随访人员联系电话',
spanNum: 12,
maxlength: 11,
type: 'tel',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员联系电话', trigger: ['submit','change']},{ validator: checkMobile , trigger: ['submit','change'] }],
},
{
formType: 'date-picker',
className: 'float-none',
prop: 'surveyTime',
model: 'surveyTime',
placeholder: '请选择',
label: '本次调查时间:',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dateType: 'date',
type: 'date',
rules: [{required: true, message: '请选择本次调查时间', trigger: ['submit','change']}],
spanNum: 12,
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
formType: 'input',
className: 'float-none',
prop: 'followUpOrgName',
model: 'followUpOrgName',
label: '随访单位名称:',
disabled: false,
placeholder: '请输入随访单位名称',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访单位名称', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpUser',
model: 'followUpUser',
label: '随访人员姓名:',
disabled: false,
placeholder: '请输入随访人员姓名',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员姓名', trigger: ['submit','change']}],
},
{
formType: 'input',
className: 'float-none',
prop: 'followUpMobile',
model: 'followUpMobile',
label: '随访人员联系电话:',
disabled: false,
placeholder: '请输入随访人员联系电话',
spanNum: 12,
maxlength: 11,
type: 'tel',
labmsg: '次',
rules: [{required: true, message: '请输入随访人员联系电话', trigger: ['submit','change']},{ validator: checkMobile , trigger: ['submit','change'] }],
},
{
formType: 'date-picker',
className: 'float-none',
prop: 'surveyTime',
model: 'surveyTime',
placeholder: '请选择',
label: '本次调查时间:',
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd',
dateType: 'date',
type: 'date',
rules: [{required: true, message: '请选择本次调查时间', trigger: ['submit','change']}],
spanNum: 12,
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
formType: 'checkbox',
className: 'obj-form-title3',
prop: 'symptom',
model: 'symptom',
label: '选择的症状:',
linkageRule: [{name: 'takeHypoglycemicDrugs', value: ['是']}],
disabled: false,
changeFun: (val) => {
// console.log(val)
},
spanNum: 24,
options: [
{label: '无症状', value: '无症状', disabled: false},
{label: '头痛头晕', value: '头痛头晕', disabled: false},
{label: '恶心呕吐', value: '恶心呕吐', disabled: false},
{label: '眼花耳鸣', value: '眼花耳鸣', disabled: false},
{label: '呼吸困难', value: '呼吸困难', disabled: false},
{label: '心悸胸闷', value: '心悸胸闷', disabled: false},
{label: '鼻衄出血不止', value: '鼻衄出血不止', disabled: false},
{label: '四肢发麻', value: '四肢发麻', disabled: false},
{label: '下肢水肿', value: '下肢水肿', disabled: false},
{label: '其他', value: '其他', disabled: false},
],
rules: [{required: true, message: '选择的症状', trigger: ['submit']}]
},
]
}
<template>
<div>
</div>
</template>
<script>
export default {}
</script>
<style scoped lang="scss">
</style>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册