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

no message

上级 108e1d40
......@@ -113,7 +113,7 @@
export default {
props: {
ruleNew: Boolean,
ruleNew: Boolean,//用于关联跨模块交互
dataSource: {
type: Array,
default: () => []
......@@ -188,6 +188,8 @@
float: none;
font-weight: bold;
margin-left: 0;
overflow: hidden;
height: auto;
}
.color-gray{
color: #a7a7a7;
......
import rangeJson from '@/utils/followup/followupUtils/range';
import rangeJson from './rangConfig';
// 这个方法,是用户在选择随访轮次(6个月,12个月)后续操作
let checkNeedRule = (val) => {
......
import range from './range';
import rangeHype from './rangeHype';
export default [
...range,
...rangeHype
]
// 各个字段校验的配置文件
// 脑卒中字段校验的配置文件
export default [
{
field: 'fastingBloodGlucose',
......
// 高血压字段校验的配置文件
export default [
{
field: 'systolicBloodPressure',
name: '收缩压SBP',
min: 70,
max: 240
},
{
field: 'diastolicBloodPressure',
name: '舒张压DBP',
min: 50,
max: 130
},
{
field: 'bodyHeight',
name: '身高',
min: 100,
max: 200
},
{
field: 'bodyWeight',
name: '体重',
min: 35,
max: 200
},
{
field: 'heartRate',
name: '心率',
min: 30,
max: 200
},
]
import { checkRange, checkIsInteger, checkNumberIsToFixed } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
{
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']}],
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
import { checkRange, checkIsInteger, checkNumberIsToFixed } 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,
// },
{
formType: 'input',
className: 'float-none obj-form-title',
prop: 'helpCheck',
model: 'helpCheck',
disabled: false,
label: '辅助检查:',
placeholder: '请输入辅助检查',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '',
rules: [{ required: false, message: '请输入辅助检查', trigger: ['submit','change'] }]
},
{
formType: 'radio',
className: 'obj-form-title',
prop: 'medicationObedience',
model: 'medicationObedience',
spanNum: 24,
label: '服药依从性:',
options: [
{ label: '规律', value: '规律' },
{ label: '间断', value: '间断' },
{ label: '不服药', value: '不服药' },
],
rules: [{ required: true, message: '请选择服药依从性', trigger: ['submit','change'] }],
changeFun: (e)=>{
}
},
{
formType: 'radio',
className: 'obj-form-title',
prop: 'medicalSideSffects',
model: 'medicalSideSffects',
spanNum: 24,
label: '药物不良反应:',
options: [
{ label: '无', value: '无' },
{ label: '有', value: '有' },
],
rules: [{ required: true, message: '请选择有无药物不良反应', trigger: ['submit','change'] }],
changeFun: (e)=>{
}
},
{
formType: 'input',
className: 'float-none obj-form-title2',
linkageRule: [{name: 'medicalSideSffects',value: ['有']}],
prop: 'remark',
model: 'remark',
disabled: false,
placeholder: '请输入药物不良反应',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '',
rules: [{ required: true, message: '请输入药物不良反应', trigger: ['submit','change'] }]
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
import { checkRange, checkIsInteger, checkNumberIsToFixed } 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,
// },
{
formType: 'input',
className: 'float-none',
prop: 'smokingAmount',
model: 'smokingAmount',
disabled: false,
label: '本次日吸烟量:',
placeholder: '请输入本次日吸烟量',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '支/日', type: 'append'}],
rules: [{ required: true, message: '请输入日吸烟量', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'nextSmokingAmount',
model: 'nextSmokingAmount',
disabled: false,
label: '下次日吸烟量:',
placeholder: '请输入下次随访日吸烟量',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '支/日', type: 'append'}],
rules: [{ required: true, message: '请输入下次随访日吸烟量', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'alcoholConsumption',
model: 'alcoholConsumption',
disabled: false,
label: '本次日饮酒量:',
placeholder: '请输入本次日饮酒量',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '两/日', type: 'append'}],
rules: [{ required: true, message: '请输入本次日饮酒量', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'nextAlcoholConsumption',
model: 'nextAlcoholConsumption',
disabled: false,
label: '下次随访日饮酒量:',
placeholder: '请输入下次随访日饮酒量',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '两/日', type: 'append'}],
rules: [{ required: true, message: '请输入下次随访日饮酒量', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'workoutOfWeek',
model: 'workoutOfWeek',
disabled: false,
label: '本次运动情况:',
placeholder: '请输入本次运动情况',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '次/周', type: 'append'}],
rules: [{ required: true, message: '请输入本次运动情况', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'workoutDuration',
model: 'workoutDuration',
disabled: false,
placeholder: '请输入本次运动情况',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '分钟/次', type: 'append'}],
rules: [{ required: true, message: '请输入本次运动情况', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'nextWorkoutOfWeek',
model: 'nextWorkoutOfWeek',
disabled: false,
label: '下次随访运动情况:',
placeholder: '请输入下次随访运动情况',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '次/周', type: 'append'}],
rules: [{ required: true, message: '请输入下次随访运动情况', trigger: ['submit','change'] }]
},
{
formType: 'input',
className: 'float-none',
prop: 'nextWorkoutDuration',
model: 'nextWorkoutDuration',
disabled: false,
placeholder: '请输入下次随访运动情况',
spanNum: 6,
maxlength: 30,
type: 'text',
labmsg: '',
slots: [{name: '分钟/次', type: 'append'}],
rules: [{ required: true, message: '请输入下次随访运动情况', trigger: ['submit','change'] }]
},
{
formType: 'radio',
className: 'obj-form-title',
prop: 'saltIntake',
model: 'saltIntake',
spanNum: 24,
label: '目前摄盐情况:',
options: [
{ label: '轻', value: '轻' },
{ label: '中', value: '中' },
{ label: '重', value: '重' },
],
rules: [{ required: true, message: '请选择目前摄盐情况', trigger: ['submit','change'] }],
changeFun: (e)=>{
}
},
{
formType: 'radio',
className: 'obj-form-title',
prop: 'nextSaltIntake',
model: 'nextSaltIntake',
spanNum: 24,
label: '下次随访摄盐情况:',
options: [
{ label: '轻', value: '轻' },
{ label: '中', value: '中' },
{ label: '重', value: '重' },
],
rules: [{ required: true, message: '请选择下次随访摄盐情况', trigger: ['submit','change'] }],
changeFun: (e)=>{
}
},
{
formType: 'radio',
className: 'obj-form-title',
prop: 'psychologicalAdjustment',
model: 'psychologicalAdjustment',
spanNum: 24,
label: '心理调整:',
options: [
{ label: '良好', value: '良好' },
{ label: '一般', value: '一般' },
{ label: '差', value: '差' },
],
rules: [{ required: true, message: '请选择心理调整', trigger: ['submit','change'] }],
changeFun: (e)=>{
}
},
{
formType: 'radio',
className: 'obj-form-title',
prop: 'followMedicalPractive',
model: 'followMedicalPractive',
spanNum: 24,
label: '遵医行为:',
options: [
{ label: '良好', value: '良好' },
{ label: '一般', value: '一般' },
{ label: '差', value: '差' },
],
rules: [{ required: true, message: '请选择心里调整', trigger: ['submit','change'] }],
changeFun: (e)=>{
}
},
]
}
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
import { checkRange, checkIsInteger, checkNumberIsToFixed } from '@/utils/followup/followupUtils/checkField';
export default ($this) => {
return [
......
import { checkMobile } from '@/utils/followup/followupUtils/checkField';
import { checkRange, checkIsInteger, checkNumberIsToFixed } 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,
// },
{
formType: 'input',
className: 'float-none',
prop: 'systolicBloodPressure',
model: 'systolicBloodPressure',
label: '收缩压SBP:',
disabled: false,
placeholder: '请输入',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: 'mmHg', type: 'append'}],
rules: [{required: true, message: '请输入收缩压SBP', trigger: ['submit','change']},{ validator: checkRange , trigger: ['submit','change'] },{ validator: checkIsInteger , trigger: ['submit','change'] }],
},
{
formType: 'input',
className: 'float-none',
prop: 'diastolicBloodPressure',
model: 'diastolicBloodPressure',
label: '舒张压DBP:',
disabled: false,
placeholder: '请输入',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: 'mmHg', type: 'append'}],
rules: [{required: true, message: '请输入舒张压DBP', trigger: ['submit','change']},{ validator: checkRange , trigger: ['submit','change'] },{ validator: checkIsInteger , trigger: ['submit','change'] }],
},
{
formType: 'input',
className: 'float-none',
prop: 'bodyHeight',
model: 'bodyHeight',
label: '身高:',
disabled: false,
placeholder: '请输入',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: 'cm', type: 'append'}],
rules: [{required: true, message: '请输入身高', trigger: ['submit','change']},{ validator: checkRange , trigger: ['submit','change'] }, {validator: checkNumberIsToFixed , trigger: ['submit','change']}],
changeFun: (val)=>{
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'hypertension_002'){
$this.addComponents[index].formObject.bodyHeight = val;
}
})
},
blurFunc: (val)=>{
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'hypertension_002'){
let bodyWeight = $this.addComponents[index].formObject.bodyWeight
let bodyHeight = $this.addComponents[index].formObject.bodyHeight
if(bodyWeight && bodyHeight){
bodyWeight = parseFloat(bodyWeight);
bodyHeight = parseFloat(bodyHeight);
let bmi = (bodyWeight / Math.pow((bodyHeight/100),2)).toFixed(1);
$this.addComponents[index].formObject.bmi = bmi;
}
}
})
}
},
// 体质指数(BMI)=体重(kg)÷ 身高²(m)
{
formType: 'input',
className: 'float-none',
prop: 'bodyWeight',
model: 'bodyWeight',
label: '体重:',
disabled: false,
placeholder: '请输入(体重可以带1位小数点)',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: 'kg', type: 'append'}],
rules: [{required: true, message: '请输入体重', trigger: ['submit','change']},{ validator: checkRange , trigger: ['submit','change'] }, {validator: checkNumberIsToFixed , trigger: ['submit','change']}],
changeFun: (val)=>{
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'hypertension_002'){
$this.addComponents[index].formObject.bodyWeight = val;
}
})
},
blurFunc: (val)=>{
$this.addComponents.forEach((item,index)=>{
if(item.formName == 'hypertension_002'){
let bodyWeight = $this.addComponents[index].formObject.bodyWeight
let bodyHeight = $this.addComponents[index].formObject.bodyHeight
if(bodyWeight && bodyHeight){
bodyWeight = parseFloat(bodyWeight);
bodyHeight = parseFloat(bodyHeight);
let bmi = (bodyWeight / Math.pow((bodyHeight/100),2)).toFixed(1);
$this.addComponents[index].formObject.bmi = bmi;
}
}
})
}
},
{
formType: 'input',
className: 'float-none',
prop: 'bmi',
model: 'bmi',
label: 'BMI(系统自动生成):',
disabled: true,
placeholder: '(这里是自动计算所得)',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: 'kg/m^2', type: 'append'}],
},
{
formType: 'input',
className: 'float-none',
prop: 'heartRate',
model: 'heartRate',
label: '心率:',
disabled: false,
placeholder: '请输入',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: '次/分', type: 'append'}],
rules: [{required: true, message: '请输入心率', trigger: ['submit','change']},{ validator: checkRange , trigger: ['submit','change'] },{ validator: checkIsInteger , trigger: ['submit','change'] }],
},
{
formType: 'input',
className: 'obj-form-title',
linkageRule: [{name: 'symptom',value: ['其他']}],
prop: 'remark',
model: 'remark',
disabled: false,
placeholder: '请输入其他体征',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '',
rules: [{ required: true, message: '请输入其他体征', trigger: ['submit','change'] }]
},
]
}
......@@ -4,14 +4,12 @@ export default ($this) => {
return [
{
formType: 'checkbox',
className: 'obj-form-title',
className: 'float-none obj-form-title',
prop: 'symptom',
model: 'symptom',
label: '选择的症状:',
// linkageRule: [{name: 'takeHypoglycemicDrugs', value: ['是']}],
disabled: false,
changeFun: (val) => {
// console.log(val)
},
spanNum: 24,
options: [
......@@ -30,7 +28,7 @@ export default ($this) => {
},
{
formType: 'input',
className: 'obj-form-title4',
className: 'float-none obj-form-title2',
linkageRule: [{name: 'symptom',value: ['其他']}],
prop: 'remark',
model: 'remark',
......@@ -42,6 +40,7 @@ export default ($this) => {
labmsg: '',
rules: [{ required: true, message: '请输入其他症状', trigger: ['submit','change'] }]
},
]
}
......@@ -16,7 +16,6 @@
:dataSource="item.dataSource"
:form="item.formObject"
:ruleNew="item.ruleNew"
:needRule="needRule"
:class="item.className"
/>
</el-form>
......@@ -40,8 +39,6 @@
import hypeDataSourceHelpChecking from '../models/hypertension/hypeDataSourceHelpChecking'
import hypeDataSourceMedicationUse from '../models/hypertension/hypeDataSourceMedicationUse'
export default {
data(){
return {
......@@ -79,9 +76,9 @@
// 将每个模块的fornName对应后台的表名放到表单对象
this.formData[formName] = this.addComponents[i].formObject;
if(formName==='stroke_006'||formName==='stroke_014'||formName==='stroke_015'){
this.setRuleToTrue(i)
}
// if(formName==='stroke_006'||formName==='stroke_014'||formName==='stroke_015'){
// this.setRuleToTrue(i)
// }
this.$nextTick(()=>{
// saveWay=1是提交,进行校验,2是暂存,不需要校验,直接发送请求
if(this.saveWay==1){
......@@ -136,20 +133,20 @@
}
})
},
needRule(val){
this.addComponents.forEach((item,index)=>{
let formName = item.formName;
if(formName==='stroke_006'||formName==='stroke_014'||formName==='stroke_015'){
this.addComponents[index].ruleNew = val;
this.setRuleToTrue(index);
// if(this.$refs['form' + index].length > 0){
// this.$refs['form' + index][0].resetFields();
// }
}
})
}
// needRule(val){
// this.addComponents.forEach((item,index)=>{
// let formName = item.formName;
//// if(formName==='stroke_006'||formName==='stroke_014'||formName==='stroke_015'){
//// this.addComponents[index].ruleNew = val;
//// this.setRuleToTrue(index);
////// if(this.$refs['form' + index].length > 0){
////// this.$refs['form' + index][0].resetFields();
////// }
////
//// }
// })
//
// }
},
created(){
this.planPatientsTimesId = this.$route.query.planPatientsTimesId
......@@ -161,47 +158,18 @@
// 获取白名单域名
this.getWhiteDomain();
localStorage.setItem('needRule',this.needRule);
// localStorage.setItem('needRule',this.needRule);
},
methods: {
// 获取量表类型
initScaleType(){
this.addComponentsSourceList = [
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_001',className: 'obj-form-title',dataSource: hypeDataSourceSymptom(this), hideTitle: true, title: '一、症状'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_002',className: 'obj-form-title',dataSource: hypeDataSourceSign(this), hideTitle: true, title: '二、体征'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_003',className: 'obj-form-title',dataSource: hypeDataSourceLifeMode(this), hideTitle: true, title: '三、生活方式指导'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_004',className: 'obj-form-title',dataSource: hypeDataSourceHelpChecking(this), hideTitle: true, title: '四、辅助检查'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_005',className: 'obj-form-title',dataSource: hypeDataSourceMedicationUse(this), hideTitle: true, title: '五、用药情况'},
{name: 'BaseInfo0',formObject: {symptom: []},showModule: true,formName: 'hypertension_001',className: 'obj-form-title',dataSource: hypeDataSourceSymptom(this), hideTitle: false, title: '症状'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_002',className: 'obj-form-title',dataSource: hypeDataSourceSign(this), hideTitle: false, title: '体征'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_003',className: 'obj-form-title',dataSource: hypeDataSourceLifeMode(this), hideTitle: false, title: '生活方式指导'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_004',className: 'obj-form-title',dataSource: hypeDataSourceHelpChecking(this), hideTitle: false, title: '辅助检查'},
{name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_005',className: 'obj-form-title',dataSource: hypeDataSourceMedicationUse(this), hideTitle: false, title: '用药情况'},
]
// if(this.scaleType=='SCALE0003'){ //脑卒中
// this.addComponentsSourceList = [
// {name: 'BaseInfo0',formObject: {},showModule: true,formName: 'stroke_001',className: 'obj-form-title',dataSource: dataSourceBaseInfo0(this), hideTitle: true, title: '一、量表脑卒中随访人员信息表'},
// {name: 'BaseInfo',formObject: {},showModule: true,formName: 'stroke_002',className: 'obj-form-title',dataSource: dataSourceBaseInfo(this), title: '一、基本信息'},
// {name: 'BaseInfo2',formObject: {},showModule: true,formName: 'stroke_003',className: 'obj-form-title',dataSource: dataSourceBaseInfo2(this), hideTitle: true, title: '一、基本信息'},
// {name: 'LifeStyleGuide',formObject: {},showModule: true,formName: 'stroke_004',className: 'obj-form-title',dataSource: dataSourceLifeStyleGuide(this), title: '二、随访期间生活方式'},
// {name: 'MainSickControl',formObject: {},showModule: true,formName: 'stroke_005',className: 'obj-form-title',dataSource: dataSourceMainSickControl(this), title: '三、随访期间主要病史及控制情况-脑血管病'},
// {name: 'MainSickControl2',formObject: {},showModule: true,formName: 'stroke_006',className: 'obj-form-title',dataSource: dataSourceMainSickControl2(this), hideTitle: true,ruleNew:true, title: '三、随访期间主要病史及控制情况-MRS评分(卒中患者12个月随访必填)'},
// {name: 'MainSickControl3',formObject: {},showModule: true,formName: 'stroke_007',className: 'obj-form-title',dataSource: dataSourceMainSickControl3(this), hideTitle: true, title: '三、随访期间主要病史及控制情况-心脏病'},
// {name: 'MainSickControl4',formObject: {},showModule: true,formName: 'stroke_008',className: 'obj-form-title',dataSource: dataSourceMainSickControl4(this), hideTitle: true, title: '三、随访期间主要病史及控制情况-高血压'},
// {name: 'MainSickControl5',formObject: {},showModule: true,formName: 'stroke_009',className: 'obj-form-title',dataSource: dataSourceMainSickControl5(this), hideTitle: true, title: '三、随访期间主要病史及控制情况-血脂异常'},
// {name: 'MainSickControl6',formObject: {},showModule: true,formName: 'stroke_010',className: 'obj-form-title',dataSource: dataSourceMainSickControl6(this), hideTitle: true, title: '三、随访期间主要病史及控制情况-糖尿病'},
// {name: 'TreatmentSituation',formObject: {},showModule: true,formName: 'stroke_011',className: 'obj-form-title',dataSource: dataSourceTreatmentSituation(this), title: '四、本次随访期间血管病变的外科手术或介入治疗情况'},
// {name: 'TreatmentSituation2',formObject: {},showModule: true,formName: 'stroke_012',className: 'obj-form-title',dataSource: dataSourceTreatmentSituation2(this), hideTitle: true, title: '四、本次随访期间血管病变的外科手术或介入治疗情况-冠状动脉'},
// {name: 'TreatmentSituation3',formObject: {},showModule: true,formName: 'stroke_013',className: 'obj-form-title',dataSource: dataSourceTreatmentSituation3(this), hideTitle: true, title: '四、本次随访期间血管病变的外科手术或介入治疗情况-出血性卒中外科治疗'},
// {name: 'CheckBody',formObject: {bmi: 0,},showModule: true,formName: 'stroke_014',className: 'obj-form-title',dataSource: dataSourceCheckBody(this), ruleNew:true,title: '五、体格检查(高危人群12个月随访必做)'},
// {name: 'CheckLab',formObject: {},showModule: true,formName: 'stroke_015',className: 'obj-form-title',dataSource: dataSourceCheckLab(this),ruleNew:true, title: '六、实验室检查(高危人群12个月随访必填)'},
// ]
// }else if(this.scaleType=='SCALE0001'){ //高血压
// this.addComponentsSourceList = [
// {name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_001',className: 'obj-form-title',dataSource: hypeDataSourceSymptom(this), hideTitle: true, title: '一、症状'},
// {name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_002',className: 'obj-form-title',dataSource: hypeDataSourceSign(this), hideTitle: true, title: '二、体征'},
// {name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_003',className: 'obj-form-title',dataSource: hypeDataSourceLifeMode(this), hideTitle: true, title: '三、生活方式指导'},
// {name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_004',className: 'obj-form-title',dataSource: hypeDataSourceHelpChecking(this), hideTitle: true, title: '四、辅助检查'},
// {name: 'BaseInfo0',formObject: {},showModule: true,formName: 'hypertension_005',className: 'obj-form-title',dataSource: hypeDataSourceMedicationUse(this), hideTitle: true, title: '五、用药情况'},
// ]
// }else if(this.scaleType=='SCALE0002'){//糖尿病
//
// }
},
// 获取白名单域名
getWhiteDomain(){
......@@ -223,17 +191,17 @@
})
},
// 动态开启验证开关
setRuleToTrue(index){
this.addComponents[index].dataSource.forEach((item,k)=>{
if(item.rules && item.rules.length > 0){
if(!this.needRule){
this.addComponents[index].dataSource[k].rules[0].required = true;
}else{
this.addComponents[index].dataSource[k].rules[0].required = false;
}
}
})
},
// setRuleToTrue(index){
// this.addComponents[index].dataSource.forEach((item,k)=>{
// if(item.rules && item.rules.length > 0){
// if(!this.needRule){
// this.addComponents[index].dataSource[k].rules[0].required = true;
// }else{
// this.addComponents[index].dataSource[k].rules[0].required = false;
// }
// }
// })
// },
// 获取展示的模块
getFormModules(){
getScaleModels(this.domain,this.scaleNo).then(res=>{
......@@ -269,10 +237,14 @@
if( ( investigationState === '失访' || investigationState === '死亡' ) ){
this.showModule = false;
}
if(inTurn == '12个月'){
this.needRule = false;
}
// if(inTurn == '12个月'){
// this.needRule = false;
// }
this.addComponents[i].formObject = this.formData[formName];
// if(formName=='hypertension_001'){
// this.addComponents[i].formObject.dyslipidemia = []
// }
}
// 量表字段回显,会触发change校验,所以这里拿到数据渲染页面后,重置验证
if(this.$refs['form' + i].length > 0){
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册