提交 f334fc4b 编写于 作者: yi.li's avatar yi.li

添加用药弹层

上级 87a4f62b
...@@ -2,6 +2,22 @@ import { checkRange, checkIsInteger, checkNumberIsToFixed } from '@/utils/follow ...@@ -2,6 +2,22 @@ import { checkRange, checkIsInteger, checkNumberIsToFixed } from '@/utils/follow
export default ($this) => { export default ($this) => {
return [ return [
{
formType: 'button',
className: 'float-none',
prop: 'followUpOrgName',
model: 'followUpOrgName',
icon: 'el-icon-circle-plus',
btnText: '点击添加',
disabled: false,
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
clickFunc: () => {
$this.dialogFormVisible = true;
}
},
{ {
formType: 'div', formType: 'div',
name: '胰岛素', name: '胰岛素',
......
...@@ -115,6 +115,54 @@ export default ($this) => { ...@@ -115,6 +115,54 @@ export default ($this) => {
labmsg: '次', labmsg: '次',
slots: [{name: 'kg/m^2', type: 'append'}], slots: [{name: 'kg/m^2', type: 'append'}],
}, },
{
formType: 'input',
className: 'float-none',
prop: 'nextBodyWeight',
model: 'nextBodyWeight',
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.name == 'diabetesSourseSign'){
$this.addComponents[index].formObject.nextBodyWeight = val;
}
})
},
blurFunc: ()=>{
$this.addComponents.forEach((item,index)=>{
if(item.name == 'diabetesSourseSign'){
let nextBodyWeight = $this.addComponents[index].formObject.nextBodyWeight
let bodyHeight = $this.addComponents[index].formObject.bodyHeight
if(nextBodyWeight && bodyHeight){
nextBodyWeight = parseFloat(nextBodyWeight);
bodyHeight = parseFloat(bodyHeight);
let nextBmi = (nextBodyWeight / Math.pow((bodyHeight/100),2)).toFixed(1);
$this.addComponents[index].formObject.nextBmi = nextBmi;
}
}
})
}
},
{
formType: 'input',
className: 'float-none',
prop: 'nextBmi',
model: 'nextBmi',
label: '下次随访目标BMI(系统自动生成):',
disabled: true,
placeholder: '(这里是自动计算所得)',
spanNum: 6,
type: 'number',
labmsg: '次',
slots: [{name: 'kg/m^2', type: 'append'}],
},
{ {
formType: 'radio', formType: 'radio',
className: 'obj-form-title', className: 'obj-form-title',
......
...@@ -7,7 +7,7 @@ export default ($this) => { ...@@ -7,7 +7,7 @@ export default ($this) => {
className: 'obj-form-title', className: 'obj-form-title',
prop: 'hasSymptom', prop: 'hasSymptom',
model: 'hasSymptom', model: 'hasSymptom',
label: '有无症状:', label: '是否有症状:',
disabled: false, disabled: false,
spanNum: 24, spanNum: 24,
options: [ options: [
......
...@@ -19,6 +19,11 @@ ...@@ -19,6 +19,11 @@
:class="item.className" :class="item.className"
/> />
</el-form> </el-form>
<ChoseMedication
v-if="dialogFormVisible"
@closeDialog="closeDialog"
@setMedication="setMedication"
/>
</div> </div>
</div> </div>
</div> </div>
...@@ -29,7 +34,7 @@ ...@@ -29,7 +34,7 @@
// 量表 template // 量表 template
import FormScale from '@/components/followup/form/index' import FormScale from '@/components/followup/form/index'
import ChoseMedication from '@/views/followup/record-manage/dialog/chose-medication'
// 量表模块数据模型 // 量表模块数据模型
// 糖尿病 // 糖尿病
...@@ -62,10 +67,13 @@ ...@@ -62,10 +67,13 @@
addComponents: [], addComponents: [],
addComponentsSourceList: [], addComponentsSourceList: [],
formData: {},//整个表单对象 formData: {},//整个表单对象
dialogFormVisible: false,//是否显示添加用药情况dialog
medication: [],// 用药情况
} }
}, },
components: { components: {
FormScale, FormScale,
ChoseMedication,
}, },
props: { props: {
scaleType: String,//病种类型 scaleType: String,//病种类型
...@@ -167,7 +175,7 @@ ...@@ -167,7 +175,7 @@
this.addComponentsSourceList = [ this.addComponentsSourceList = [
{name: 'diabetesSourseBaseInfo',formObject: {},showModule: true,formName: 'diabetes_001',className: 'obj-form-title',dataSource: diabetesSourseBaseInfo(this), hideTitle: true, title: '基本信息'}, {name: 'diabetesSourseBaseInfo',formObject: {},showModule: true,formName: 'diabetes_001',className: 'obj-form-title',dataSource: diabetesSourseBaseInfo(this), hideTitle: true, title: '基本信息'},
{name: 'diabetesSourseSymptom',formObject: {},showModule: true,formName: 'diabetes_002',className: 'obj-form-title',dataSource: diabetesSourseSymptom(this), hideTitle: false, title: '症状'}, {name: 'diabetesSourseSymptom',formObject: {},showModule: true,formName: 'diabetes_002',className: 'obj-form-title',dataSource: diabetesSourseSymptom(this), hideTitle: false, title: '症状'},
{name: 'diabetesSourseSign',formObject: {bmi: 0,},showModule: true,formName: 'diabetes_003',className: 'obj-form-title',dataSource: diabetesSourseSign(this), hideTitle: false, title: '体征'}, {name: 'diabetesSourseSign',formObject: {bmi: 0,nextBmi: 0,},showModule: true,formName: 'diabetes_003',className: 'obj-form-title',dataSource: diabetesSourseSign(this), hideTitle: false, title: '体征'},
{name: 'diabetesSourseLifeMode',formObject: {},showModule: true,formName: 'diabetes_004',className: 'obj-form-title',dataSource: diabetesSourseLifeMode(this), hideTitle: false, title: '生活方式指导'}, {name: 'diabetesSourseLifeMode',formObject: {},showModule: true,formName: 'diabetes_004',className: 'obj-form-title',dataSource: diabetesSourseLifeMode(this), hideTitle: false, title: '生活方式指导'},
{name: 'diabetesSourseAuxiliary',formObject: {},showModule: true,formName: 'diabetes_005',className: 'obj-form-title',dataSource: diabetesSourseAuxiliary(this), hideTitle: false, title: '辅助检查'}, {name: 'diabetesSourseAuxiliary',formObject: {},showModule: true,formName: 'diabetes_005',className: 'obj-form-title',dataSource: diabetesSourseAuxiliary(this), hideTitle: false, title: '辅助检查'},
{name: 'diabetesSourseOther',formObject: {},showModule: true,formName: 'diabetes_005',className: 'obj-form-title',dataSource: diabetesSourseOther(this), hideTitle: true, title: '其他'}, {name: 'diabetesSourseOther',formObject: {},showModule: true,formName: 'diabetes_005',className: 'obj-form-title',dataSource: diabetesSourseOther(this), hideTitle: true, title: '其他'},
...@@ -293,6 +301,13 @@ ...@@ -293,6 +301,13 @@
// } // }
// this.$emit('checkEnd',false); // this.$emit('checkEnd',false);
}, },
closeDialog(val){
this.dialogFormVisible = val;
},
setMedication(val){
this.medication.push(val);
console.log('medication=>',this.medication)
}
}, },
} }
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册