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

Merge branch 'dev-scaleHype-20190428' of...

Merge branch 'dev-scaleHype-20190428' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-scaleHype-20190428
<template>
<div>
</div>
</template>
<script>
export default {}
</script>
<style scoped lang="scss">
</style>
......@@ -5,8 +5,8 @@ export default ($this) => {
{
formType: 'input',
className: 'float-none',
prop: 'followUpUser',
model: 'followUpUser',
prop: 'name',
model: 'name',
label: '姓名:',
disabled: false,
placeholder: '请输入姓名',
......@@ -20,8 +20,8 @@ export default ($this) => {
{
formType: 'date-picker',
className: 'float-none',
prop: 'followUpDate',
model: 'followUpDate',
prop: 'followupDate',
model: 'followupDate',
placeholder: '请选择',
label: '随访日期:',
format: 'yyyy-MM-dd',
......@@ -35,8 +35,8 @@ export default ($this) => {
{
formType: 'radio',
className: 'obj-form-title',
prop: 'followUpWay',
model: 'followUpWay',
prop: 'followupType',
model: 'followupType',
spanNum: 24,
label: '随访方式:',
options: [
......@@ -52,8 +52,8 @@ export default ($this) => {
{
formType: 'input',
className: 'float-none',
prop: 'followUpNumber',
model: 'followUpNumber',
prop: 'no',
model: 'no',
label: '编号:',
disabled: false,
placeholder: '请输入编号',
......
......@@ -14,5 +14,19 @@ export default ($this) => {
rules: [{required: true, message: '请选择下次随访日期', trigger: ['submit','change']}],
spanNum: 12,
},
{
formType: 'input',
className: 'float-none',
prop: 'doctorSignature',
model: 'doctorSignature',
label: '随访医生签名:',
disabled: false,
placeholder: '请输入随访人员姓名',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访医生签名', trigger: ['submit','change']}],
},
]
}
......@@ -5,33 +5,47 @@ export default ($this) => {
{
formType: 'input',
className: 'float-none',
prop: 'aaa',
model: 'aaa',
prop: 'reason',
model: 'reason',
label: '原因:',
disabled: false,
placeholder: '请输入原因',
spanNum: 12,
maxlength: 30,
type: 'text',
rules: [{required: false, message: '请输入原因', trigger: ['submit','change']}],
rules: [{required: false, message: '请输入原因', trigger: ['submit','change','blur']}],
changeFun: (val)=>{
// console.log($this.formData)
// console.log(val)
let flag = val ? true : false;
$this.addComponents.forEach((item,index)=>{
if(item.name == 'hypeDataSourceReferral'){
$this.addComponents[index].dataSource.forEach((item,index2)=>{
$this.addComponents[index].dataSource[index2].rules[0].required = flag;
})
}
})
},
},
{
formType: 'input',
className: 'float-none',
prop: 'bbb',
model: 'bbb',
prop: 'mechanismDepartment',
model: 'mechanismDepartment',
label: '机构及科别:',
disabled: false,
placeholder: '请输入机构及科别',
spanNum: 12,
maxlength: 30,
type: 'text',
rules: [{required: false, message: '请输入机构及科别', trigger: ['submit','change']}],
rules: [{required: false, message: '请输入机构及科别', trigger: ['submit','change','blur']}],
changeFun: (val)=>{
let flag = val ? true : false;
$this.addComponents.forEach((item,index)=>{
if(item.name == 'hypeDataSourceReferral'){
$this.addComponents[index].dataSource.forEach((item,index2)=>{
$this.addComponents[index].dataSource[index2].rules[0].required = flag;
})
}
})
},
},
]
......
......@@ -50,7 +50,7 @@ export default ($this) => {
}
})
},
blurFunc: (val)=>{
blurFunc: ()=>{
$this.addComponents.forEach((item,index)=>{
if(item.name == 'hypeDataSourceSign'){
let bodyWeight = $this.addComponents[index].formObject.bodyWeight
......@@ -86,7 +86,7 @@ export default ($this) => {
}
})
},
blurFunc: (val)=>{
blurFunc: ()=>{
$this.addComponents.forEach((item,index)=>{
if(item.name == 'hypeDataSourceSign'){
let bodyWeight = $this.addComponents[index].formObject.bodyWeight
......@@ -140,7 +140,7 @@ export default ($this) => {
maxlength: 30,
type: 'text',
labmsg: '',
rules: [{ required: true, message: '请输入其他体征', trigger: ['submit','change'] }]
rules: [{ required: false, message: '请输入其他体征', trigger: ['submit','change'] }]
},
]
}
......
export default ($this) => {
return [
{
formType: 'input',
className: 'float-none',
prop: 'doctorSignature',
model: 'doctorSignature',
label: '随访医生签名:',
disabled: false,
placeholder: '请输入随访人员姓名',
spanNum: 12,
maxlength: 30,
type: 'text',
labmsg: '次',
rules: [{required: true, message: '请输入随访医生签名', trigger: ['submit','change']}],
},
]
}
......@@ -41,7 +41,6 @@
import hypeDataSourceMedicationUse from '../models/hypertension/hypeDataSourceMedicationUse'
import hypeDataSourceReferral from '../models/hypertension/hypeDataSourceReferral'
import hypeDataSourceNextFollowDay from '../models/hypertension/hypeDataSourceNextFollowDay'
import hypeDataSourceSignature from '../models/hypertension/hypeDataSourceSignature'
export default {
data(){
......@@ -176,25 +175,24 @@
{name: 'hypeDataSourceLifeMode',formObject: {},showModule: true,formName: 'hypertension_004',className: 'obj-form-title',dataSource: hypeDataSourceLifeMode(this), hideTitle: false, title: '生活方式指导'},
{name: 'hypeDataSourceHelpChecking',formObject: {},showModule: true,formName: 'hypertension_005',className: 'obj-form-title',dataSource: hypeDataSourceHelpChecking(this), hideTitle: false, title: '辅助检查'},
{name: 'hypeDataSourceMedicationUse',formObject: {},showModule: true,formName: 'hypertension_006',className: 'obj-form-title',dataSource: hypeDataSourceMedicationUse(this), hideTitle: false, title: '用药情况'},
{name: 'hypeDataSourceReferral',formObject: {aaa:'',bbb:''},showModule: true,formName: 'hypertension_007',className: 'obj-form-title',dataSource: hypeDataSourceReferral(this), hideTitle: false, title: '转诊'},
{name: 'hypeDataSourceReferral',formObject: {reason:'',mechanismDepartment:''},showModule: true,formName: 'hypertension_007',className: 'obj-form-title',dataSource: hypeDataSourceReferral(this), hideTitle: false, title: '转诊'},
{name: 'hypeDataSourceNextFollowDay',formObject: {nextFollowDay:''},showModule: true,formName: 'hypertension_008',className: 'obj-form-title',dataSource: hypeDataSourceNextFollowDay(this), hideTitle: true, title: '下次随访日期'},
{name: 'hypeDataSourceSignature',formObject: {doctorSignature:''},showModule: true,formName: 'hypertension_009',className: 'obj-form-title',dataSource: hypeDataSourceSignature(this), hideTitle: true, title: '随访医生签名'},
]
this.addComponents = this.addComponentsSourceList
},
// 获取白名单域名
getWhiteDomain(){
getDomain().then(res=>{
if(res.code=='000000'){
this.domain = res.data;
// 获取量表模块
// this.getFormModules();
// 目前模块先写死,记得后面和后台沟通改!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
this.setFormData()
if(this.showBtn!='0'){
// 获取量表详情
this.getFormDetail();
}
// 目前模块先写死!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// 获取量表模块
// this.getFormModules();
// if(this.showBtn!='0'){
// // 获取量表详情
// this.getFormDetail();
// }
}else{
this.$message({
message: res.message,
......@@ -203,6 +201,25 @@
}
})
},
// 目前先默认写死
setFormData(){
this.addComponents = this.addComponentsSourceList
for(let i=0;i<this.addComponents.length;i++){
let formName = this.addComponents[i].formName;
if(this.formData[formName]){
this.addComponents[i].formObject = this.formData[formName];
}
// 量表字段回显,会触发change校验,所以这里拿到数据渲染页面后,重置验证
// if(this.$refs['form' + i].length > 0){
// this.$refs['form' + i][0].resetFields();
// }
}
this.canRender = true;
this.$forceUpdate();
},
// 动态开启验证开关
// setRuleToTrue(index){
// this.addComponents[index].dataSource.forEach((item,k)=>{
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册