Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
86bfc116
提交
86bfc116
编写于
5月 07, 2019
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
辅助检查校验
上级
7979afc8
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
53 行增加
和
61 行删除
+53
-61
diabetesSourseAuxiliary.js
.../record-manage/models/diabetes/diabetesSourseAuxiliary.js
+29
-25
diabetesSourseReferral.js
...p/record-manage/models/diabetes/diabetesSourseReferral.js
+24
-36
未找到文件。
src/views/followup/record-manage/models/diabetes/diabetesSourseAuxiliary.js
浏览文件 @
86bfc116
import
{
checkRange
,
checkIsInteger
,
checkNumberIsToFixed
,
checkNumberIsToFixedTwo
}
from
'@/utils/followup/followupUtils/checkField'
;
export
default
(
$this
)
=>
{
let
hanldeValueL
=
()
=>
{
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseAuxiliary'
){
const
fastingBloodSugar
=
item
.
formObject
.
fastingBloodSugar
const
glycosylatedHemoglobinPercent
=
item
.
formObject
.
glycosylatedHemoglobinPercent
const
glycosylatedHemoglobinDate
=
item
.
formObject
.
glycosylatedHemoglobinDate
item
.
dataSource
.
forEach
((
item2
,
index2
)
=>
{
if
((
glycosylatedHemoglobinPercent
||
glycosylatedHemoglobinDate
)){
if
(
item2
.
rules
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
true
;
}
}
else
{
console
.
log
(
'当选填项都没值时'
,
item2
)
if
(
item2
.
prop
==
'fastingBloodSugar'
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
true
;
}
else
{
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
false
;
}
}
})
}
$this
.
$refs
[
'form'
+
index
][
0
].
validate
((
valid
)
=>
{
});
})
}
return
[
{
formType
:
'input'
,
...
...
@@ -35,19 +60,9 @@ export default ($this) => {
type
:
'number'
,
labmsg
:
''
,
slots
:
[{
name
:
'%'
,
type
:
'append'
}],
rules
:
[{
required
:
false
,
message
:
'请输入糖化血红蛋白值'
,
trigger
:
[
'submit'
,
'change'
]
},{
validator
:
checkRange
,
trigger
:
[
'submit'
,
'change'
]
},{
validator
:
checkNumberIsToFixedTwo
,
trigger
:
[
'submit'
,
'change'
]
}],
changeFun
:
(
val
)
=>
{
let
flag
=
val
?
true
:
false
;
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseAuxiliary'
){
$this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
index2
)
=>
{
if
(
item
.
prop
==
'glycosylatedHemoglobinDate'
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
flag
;
}
})
}
})
}
rules
:
[{
required
:
false
,
message
:
'请输入糖化血红蛋白值'
,
trigger
:
[
'submit'
,
'change'
,
'blur'
]
},{
validator
:
checkRange
,
trigger
:
[
'submit'
,
'change'
,
'blur'
]
},{
validator
:
checkNumberIsToFixedTwo
,
trigger
:
[
'submit'
,
'change'
,
'blur'
]
}],
changeFun
:
hanldeValueL
,
blurFunc
:
hanldeValueL
},
{
formType
:
'date-picker'
,
...
...
@@ -62,18 +77,7 @@ export default ($this) => {
type
:
'date'
,
rules
:
[{
required
:
false
,
message
:
'请选择检查日期'
,
trigger
:
[
'submit'
,
'change'
]}],
spanNum
:
12
,
changeFun
:
(
val
)
=>
{
let
flag
=
val
?
true
:
false
;
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseAuxiliary'
){
$this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
index2
)
=>
{
if
(
item
.
prop
==
'glycosylatedHemoglobinPercent'
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
flag
;
}
})
}
})
}
changeFun
:
hanldeValueL
},
]
}
...
...
src/views/followup/record-manage/models/diabetes/diabetesSourseReferral.js
浏览文件 @
86bfc116
import
{
checkRange
,
checkIsInteger
,
checkNumberIsToFixed
}
from
'@/utils/followup/followupUtils/checkField'
;
export
default
(
$this
)
=>
{
let
hanldeValue
=
()
=>
{
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseReferral'
){
const
reason
=
item
.
formObject
.
reason
const
mechanism
=
item
.
formObject
.
mechanism
const
department
=
item
.
formObject
.
department
item
.
dataSource
.
forEach
((
item2
,
index2
)
=>
{
if
((
reason
||
mechanism
||
department
)
&&
item2
.
rules
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
true
;
}
else
{
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
false
;
}
})
}
$this
.
$refs
[
'form'
+
index
][
0
].
validate
((
valid
)
=>
{
});
})
}
return
[
{
formType
:
'input'
,
...
...
@@ -14,18 +32,8 @@ export default ($this) => {
maxlength
:
30
,
type
:
'text'
,
rules
:
[{
required
:
false
,
message
:
'请输入原因'
,
trigger
:
[
'submit'
,
'change'
,
'blur'
]}],
changeFun
:
(
val
)
=>
{
let
flag
=
val
?
true
:
false
;
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseReferral'
){
$this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
index2
)
=>
{
if
(
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
flag
;
}
})
}
})
},
changeFun
:
hanldeValue
,
blurFunc
:
hanldeValue
},
{
formType
:
'input'
,
...
...
@@ -39,18 +47,8 @@ export default ($this) => {
maxlength
:
30
,
type
:
'text'
,
rules
:
[{
required
:
false
,
message
:
'请输入机构'
,
trigger
:
[
'submit'
,
'change'
,
'blur'
]}],
changeFun
:
(
val
)
=>
{
let
flag
=
val
?
true
:
false
;
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseReferral'
){
$this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
index2
)
=>
{
if
(
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
flag
;
}
})
}
})
},
changeFun
:
hanldeValue
,
blurFunc
:
hanldeValue
},
{
formType
:
'input'
,
...
...
@@ -64,18 +62,8 @@ export default ($this) => {
maxlength
:
30
,
type
:
'text'
,
rules
:
[{
required
:
false
,
message
:
'请输入科室'
,
trigger
:
[
'submit'
,
'change'
,
'blur'
]}],
changeFun
:
(
val
)
=>
{
let
flag
=
val
?
true
:
false
;
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseReferral'
){
$this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
index2
)
=>
{
if
(
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
){
$this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
flag
;
}
})
}
})
},
changeFun
:
hanldeValue
,
blurFunc
:
hanldeValue
},
]
}
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录