Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
4c0a8947
提交
4c0a8947
编写于
10月 11, 2019
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
量表修改
上级
8d72bdb6
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
131 行增加
和
36 行删除
+131
-36
index.vue
src/components/followup/form/index.vue
+3
-0
followapis.js
src/utils/followup/followapis.js
+10
-2
diabetesSourseAuxiliary.js
.../record-manage/models/diabetes/diabetesSourseAuxiliary.js
+0
-1
diabetesSourseOther.js
...owup/record-manage/models/diabetes/diabetesSourseOther.js
+1
-0
diabetes.vue
src/views/followup/record-manage/patient-scale/diabetes.vue
+34
-10
hypertension.vue
...ews/followup/record-manage/patient-scale/hypertension.vue
+29
-4
stroke.vue
src/views/followup/record-manage/patient-scale/stroke.vue
+54
-19
未找到文件。
src/components/followup/form/index.vue
浏览文件 @
4c0a8947
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
<el-button
<el-button
v-if=
"item.formType === 'button'"
v-if=
"item.formType === 'button'"
type=
"primary"
type=
"primary"
:disabled=
"item.disabled"
@
click=
"item.clickFunc ? item.clickFunc($event) : defaultClick($event)"
@
click=
"item.clickFunc ? item.clickFunc($event) : defaultClick($event)"
:icon=
"item.icon"
>
{{
item
.
btnText
}}
:icon=
"item.icon"
>
{{
item
.
btnText
}}
</el-button>
</el-button>
...
@@ -65,6 +66,7 @@
...
@@ -65,6 +66,7 @@
<el-checkbox-group
<el-checkbox-group
v-else-if=
"item.formType === 'checkbox'"
v-else-if=
"item.formType === 'checkbox'"
v-model=
"form[item.model]"
v-model=
"form[item.model]"
:disabled=
"item.disabled"
@
change=
"item.changeFun ? item.changeFun($event) : defaultFun($event)"
@
change=
"item.changeFun ? item.changeFun($event) : defaultFun($event)"
>
>
<el-checkbox
<el-checkbox
...
@@ -79,6 +81,7 @@
...
@@ -79,6 +81,7 @@
<el-radio-group
<el-radio-group
v-else-if=
"item.formType === 'radio'"
v-else-if=
"item.formType === 'radio'"
v-model=
"form[item.model]"
v-model=
"form[item.model]"
:disabled=
"item.disabled"
@
change=
"item.changeFun ? item.changeFun($event) : defaultFun($event)"
@
change=
"item.changeFun ? item.changeFun($event) : defaultFun($event)"
>
>
<el-radio
<el-radio
...
...
src/utils/followup/followapis.js
浏览文件 @
4c0a8947
...
@@ -496,7 +496,7 @@ export const getFirstAccess = () => {
...
@@ -496,7 +496,7 @@ export const getFirstAccess = () => {
/**
/**
* Add by Anndy Yang
* Add by Anndy Yang
* 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
* 统一验证:量表内是否存在敏感字段、居民是否签署隐私协议、7天内是否发送过授权短信
* @param {[type]} data
* @param {[type]} data
{
{
"scaleNo":"String,量表编号",
"scaleNo":"String,量表编号",
// "patientIds":"List<Integer>,医生/居民id集合", // pc端只传这个字段
// "patientIds":"List<Integer>,医生/居民id集合", // pc端只传这个字段
...
@@ -505,7 +505,7 @@ export const getFirstAccess = () => {
...
@@ -505,7 +505,7 @@ export const getFirstAccess = () => {
"userType":"Integer,用户类型(1:居民,2:医生,3:其他)",
"userType":"Integer,用户类型(1:居民,2:医生,3:其他)",
"validateType":"1:3个条件依次校验,2:后面2个条件依次校验"
"validateType":"1:3个条件依次校验,2:后面2个条件依次校验"
}
}
* @return {[type]}
* @return {[type]}
{
{
"code": "000000",
"code": "000000",
"message": "成功",
"message": "成功",
...
@@ -538,3 +538,11 @@ export const getFirstAccess = () => {
...
@@ -538,3 +538,11 @@ export const getFirstAccess = () => {
})
})
};
};
// 关于权限获取展示的模块信息
export
const
getScaleModels2
=
(
domain
,
scaleNo
,
params
)
=>
{
return
fetch
({
url
:
`
${
domain
}
/followup/protocol/
${
scaleNo
}
/models`
,
method
:
'get'
,
params
:
params
,
})
}
src/views/followup/record-manage/models/diabetes/diabetesSourseAuxiliary.js
浏览文件 @
4c0a8947
...
@@ -3,7 +3,6 @@ import { checkRange, checkIsInteger, checkNumberIsToFixed, checkNumberIsToFixedT
...
@@ -3,7 +3,6 @@ import { checkRange, checkIsInteger, checkNumberIsToFixed, checkNumberIsToFixedT
export
default
(
$this
)
=>
{
export
default
(
$this
)
=>
{
let
hanldeValue
=
()
=>
{
let
hanldeValue
=
()
=>
{
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
$this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
name
==
'diabetesSourseAuxiliary'
){
if
(
item
.
name
==
'diabetesSourseAuxiliary'
){
const
glycosylatedHemoglobinPercent
=
item
.
formObject
.
glycosylatedHemoglobinPercent
const
glycosylatedHemoglobinPercent
=
item
.
formObject
.
glycosylatedHemoglobinPercent
const
glycosylatedHemoglobinDate
=
item
.
formObject
.
glycosylatedHemoglobinDate
const
glycosylatedHemoglobinDate
=
item
.
formObject
.
glycosylatedHemoglobinDate
...
...
src/views/followup/record-manage/models/diabetes/diabetesSourseOther.js
浏览文件 @
4c0a8947
...
@@ -65,6 +65,7 @@ export default ($this) => {
...
@@ -65,6 +65,7 @@ export default ($this) => {
className
:
'obj-form-title radio-block'
,
className
:
'obj-form-title radio-block'
,
prop
:
'followUpClassification'
,
prop
:
'followUpClassification'
,
model
:
'followUpClassification'
,
model
:
'followUpClassification'
,
disabled
:
false
,
spanNum
:
24
,
spanNum
:
24
,
label
:
'此次履约分类:'
,
label
:
'此次履约分类:'
,
options
:
[
options
:
[
...
...
src/views/followup/record-manage/patient-scale/diabetes.vue
浏览文件 @
4c0a8947
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<!--渲染不同的模块表单-->
<!--渲染不同的模块表单-->
<div
v-if=
"canRender"
v-for=
"(item, index) in addComponents"
>
<div
v-if=
"canRender"
v-for=
"(item, index) in addComponents"
>
<div
v-if=
"item.showModule"
class=
"content-box"
>
<div
v-if=
"item.showModule"
class=
"content-box"
>
<div
v-if=
"!item.hideTitle"
class=
"title"
>
{{
item
.
title
}}
</div>
<div
v-if=
"!item.hideTitle"
class=
"title"
>
{{
item
.
title
}}
<
span
class=
"gray-tip"
v-if=
"item.disabled"
><i
class=
"el-icon-warning-outline"
style=
"margin-right: 5px;"
></i>
获得居民授权才可进行此项填写
</span><
/div>
<el-form
<el-form
:ref=
"'form' + index"
:ref=
"'form' + index"
:id=
"'form' + index"
:id=
"'form' + index"
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDomain
,
getScaleModels
,
getScaleDetail
,
postScale
,
updateScalesStatus
,
submitScale
}
from
'@/utils/followup/followapis'
import
{
getDomain
,
getScaleModels
,
getScaleDetail
,
postScale
,
updateScalesStatus
,
submitScale
,
getScaleModels2
}
from
'@/utils/followup/followapis'
// 量表 template
// 量表 template
import
FormScale
from
'@/components/followup/form/index'
import
FormScale
from
'@/components/followup/form/index'
...
@@ -64,7 +64,7 @@
...
@@ -64,7 +64,7 @@
scaleNo
:
''
,
scaleNo
:
''
,
doctorId
:
''
,
doctorId
:
''
,
planTimesId
:
''
,
planTimesId
:
''
,
addComponents
:
[],
addComponents
:
[],
//所需要展示的模块
addComponentsSourceList
:
[],
addComponentsSourceList
:
[],
formData
:
{},
//整个表单对象
formData
:
{},
//整个表单对象
dialogFormVisible
:
false
,
//是否显示添加用药情况dialog
dialogFormVisible
:
false
,
//是否显示添加用药情况dialog
...
@@ -179,10 +179,6 @@
...
@@ -179,10 +179,6 @@
this
.
domain
=
res
.
data
;
this
.
domain
=
res
.
data
;
// 获取量表模块
// 获取量表模块
this
.
getFormModules
();
this
.
getFormModules
();
if
(
this
.
showBtn
!=
'0'
){
// 获取量表详情
this
.
getFormDetail
();
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -205,17 +201,39 @@
...
@@ -205,17 +201,39 @@
// },
// },
// 获取展示的模块
// 获取展示的模块
getFormModules
(){
getFormModules
(){
getScaleModels
(
this
.
domain
,
this
.
scaleNo
).
then
(
res
=>
{
// getScaleModels(this.domain,this.scaleNo).then(res=>{
getScaleModels2
(
this
.
domain
,
this
.
scaleNo
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
){
if
(
res
.
code
==
'000000'
){
this
.
moduleList
=
res
.
data
;
this
.
moduleList
=
res
.
data
;
for
(
let
i
=
0
;
i
<
this
.
moduleList
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
moduleList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
addComponentsSourceList
.
length
;
j
++
){
for
(
let
j
=
0
;
j
<
this
.
addComponentsSourceList
.
length
;
j
++
){
// if(this.moduleList[i]==this.addComponentsSourceList[j].formName){
// if(this.moduleList[i]==this.addComponentsSourceList[j].formName){
if
(
this
.
moduleList
[
i
].
modelCode
==
this
.
addComponentsSourceList
[
j
].
formName
){
if
(
this
.
moduleList
[
i
].
modelCode
==
this
.
addComponentsSourceList
[
j
].
formName
){
this
.
addComponents
.
push
(
this
.
addComponentsSourceList
[
j
])
// this.addComponents.push(this.addComponentsSourceList[j])
//把获取到每个模块的disabeld状态更新进将要渲染的数组
this
.
addComponents
.
push
({...
this
.
addComponentsSourceList
[
j
],
disabled
:
this
.
moduleList
[
i
].
disabled
})
}
}
}
}
}
}
/*start--根据当前模块是否获得居民权限,来判断是否可填写当前模块*/
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
disabled
===
true
)
{
item
.
dataSource
.
forEach
((
item2
,
index2
)
=>
{
// item2.disabled = true;
this
.
addComponents
[
index
].
dataSource
[
index2
].
disabled
=
true
;
if
(
this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
)
{
this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
false
;
}
})
}
})
console
.
log
(
'糖尿病数组'
,
this
.
addComponents
)
/*end--*/
if
(
this
.
showBtn
!=
'0'
){
// 获取量表详情
this
.
getFormDetail
();
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -244,6 +262,7 @@
...
@@ -244,6 +262,7 @@
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
let
formName
=
this
.
addComponents
[
i
].
formName
;
// let type2Obj = {};
// let type2Obj = {};
//对用药情况模块的数据做特殊处理
if
(
this
.
formData
[
formName
]
&&
formName
==
'h_s_002'
){
if
(
this
.
formData
[
formName
]
&&
formName
==
'h_s_002'
){
let
getDataHS002
=
this
.
formData
[
formName
];
let
getDataHS002
=
this
.
formData
[
formName
];
if
(
Array
.
isArray
(
getDataHS002
)){
if
(
Array
.
isArray
(
getDataHS002
)){
...
@@ -258,7 +277,7 @@
...
@@ -258,7 +277,7 @@
arrList
:
this
.
medication
,
arrList
:
this
.
medication
,
...
this
.
type2Obj
...
this
.
type2Obj
}
}
}
else
if
(
this
.
formData
[
formName
]
&&
formName
==
'diabetes_001'
){
}
else
if
(
this
.
formData
[
formName
]
&&
formName
==
'diabetes_001'
){
//对症状模块做处理
this
.
addComponents
[
i
].
formObject
=
this
.
formData
[
formName
];
this
.
addComponents
[
i
].
formObject
=
this
.
formData
[
formName
];
let
symptom
=
this
.
formData
[
formName
].
symptom
;
let
symptom
=
this
.
formData
[
formName
].
symptom
;
this
.
addComponents
[
i
].
formObject
.
symptom
=
JSON
.
parse
(
symptom
||
'[]'
);
this
.
addComponents
[
i
].
formObject
.
symptom
=
JSON
.
parse
(
symptom
||
'[]'
);
...
@@ -340,6 +359,11 @@
...
@@ -340,6 +359,11 @@
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
18px
;
font-size
:
18px
;
border-bottom
:
1px
dashed
#ccc
;
border-bottom
:
1px
dashed
#ccc
;
.gray-tip
{
color
:
#8C8C8C
;
margin-left
:
20px
;
font-size
:
16px
;
}
}
}
}
}
}
}
...
...
src/views/followup/record-manage/patient-scale/hypertension.vue
浏览文件 @
4c0a8947
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<!--渲染不同的模块表单-->
<!--渲染不同的模块表单-->
<div
v-if=
"canRender"
v-for=
"(item, index) in addComponents"
>
<div
v-if=
"canRender"
v-for=
"(item, index) in addComponents"
>
<div
v-if=
"item.showModule"
class=
"content-box"
>
<div
v-if=
"item.showModule"
class=
"content-box"
>
<div
v-if=
"!item.hideTitle"
class=
"title"
>
{{
item
.
title
}}
</div>
<div
v-if=
"!item.hideTitle"
class=
"title"
>
{{
item
.
title
}}
<
span
class=
"gray-tip"
v-if=
"item.disabled"
><i
class=
"el-icon-warning-outline"
style=
"margin-right: 5px;"
></i>
获得居民授权才可进行此项填写
</span><
/div>
<el-form
<el-form
:ref=
"'form' + index"
:ref=
"'form' + index"
:id=
"'form' + index"
:id=
"'form' + index"
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDomain
,
getScaleModels
,
getScaleDetail
,
postScale
,
updateScalesStatus
,
submitScale
}
from
'@/utils/followup/followapis'
import
{
getDomain
,
getScaleModels
,
getScaleDetail
,
postScale
,
updateScalesStatus
,
submitScale
,
getScaleModels2
}
from
'@/utils/followup/followapis'
// 量表 template
// 量表 template
import
FormScale
from
'@/components/followup/form/index'
import
FormScale
from
'@/components/followup/form/index'
...
@@ -196,17 +196,34 @@
...
@@ -196,17 +196,34 @@
// 获取展示的模块
// 获取展示的模块
getFormModules
(){
getFormModules
(){
getScaleModels
(
this
.
domain
,
this
.
scaleNo
).
then
(
res
=>
{
// getScaleModels(this.domain,this.scaleNo).then(res=>{
getScaleModels2
(
this
.
domain
,
this
.
scaleNo
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
){
if
(
res
.
code
==
'000000'
){
this
.
moduleList
=
res
.
data
;
this
.
moduleList
=
res
.
data
;
for
(
let
i
=
0
;
i
<
this
.
moduleList
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
moduleList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
addComponentsSourceList
.
length
;
j
++
){
for
(
let
j
=
0
;
j
<
this
.
addComponentsSourceList
.
length
;
j
++
){
// if(this.moduleList[i]==this.addComponentsSourceList[j].formName){
// if(this.moduleList[i]==this.addComponentsSourceList[j].formName){
if
(
this
.
moduleList
[
i
].
modelCode
==
this
.
addComponentsSourceList
[
j
].
formName
){
if
(
this
.
moduleList
[
i
].
modelCode
==
this
.
addComponentsSourceList
[
j
].
formName
){
this
.
addComponents
.
push
(
this
.
addComponentsSourceList
[
j
])
// this.addComponents.push(this.addComponentsSourceList[j])
//把获取到每个模块的disabeld状态更新进将要渲染的数组
this
.
addComponents
.
push
({...
this
.
addComponentsSourceList
[
j
],
disabled
:
this
.
moduleList
[
i
].
disabled
})
}
}
}
}
}
}
console
.
log
(
'高血压展示模块'
,
this
.
addComponents
)
/*start--根据当前模块是否获得居民权限,来判断是否可填写当前模块*/
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
disabled
===
true
)
{
item
.
dataSource
.
forEach
((
item2
,
index2
)
=>
{
// item2.disabled = true;
this
.
addComponents
[
index
].
dataSource
[
index2
].
disabled
=
true
;
if
(
this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
)
{
this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
false
;
}
})
}
})
/*end--*/
if
(
this
.
showBtn
!=
'0'
){
if
(
this
.
showBtn
!=
'0'
){
// 获取量表详情
// 获取量表详情
...
@@ -238,6 +255,9 @@
...
@@ -238,6 +255,9 @@
getScaleDetail
(
this
.
domain
,
this
.
planPatientsTimesId
,
this
.
scaleNo
).
then
(
res
=>
{
getScaleDetail
(
this
.
domain
,
this
.
planPatientsTimesId
,
this
.
scaleNo
).
then
(
res
=>
{
this
.
formData
=
res
.
data
this
.
formData
=
res
.
data
let
keysList
=
Object
.
keys
(
this
.
formData
);
let
keysList
=
Object
.
keys
(
this
.
formData
);
// console.log('获取模块',this.addComponents)
// console.log('获取详情',this.formData)
// console.log('获取详情key',keysList)
if
(
keysList
.
length
>
0
){
if
(
keysList
.
length
>
0
){
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
addComponents
.
length
;
i
++
){
let
formName
=
this
.
addComponents
[
i
].
formName
;
let
formName
=
this
.
addComponents
[
i
].
formName
;
...
@@ -361,6 +381,11 @@
...
@@ -361,6 +381,11 @@
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
22px
;
font-size
:
22px
;
border-bottom
:
1px
dashed
#ccc
;
border-bottom
:
1px
dashed
#ccc
;
.gray-tip
{
color
:
#8C8C8C
;
margin-left
:
20px
;
font-size
:
16px
;
}
}
}
}
}
}
}
...
...
src/views/followup/record-manage/patient-scale/stroke.vue
浏览文件 @
4c0a8947
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<!--渲染不同的模块表单-->
<!--渲染不同的模块表单-->
<div
v-for=
"(item, index) in addComponents"
:key=
"index"
>
<div
v-for=
"(item, index) in addComponents"
:key=
"index"
>
<div
v-if=
"item.showModule"
class=
"content-box"
>
<div
v-if=
"item.showModule"
class=
"content-box"
>
<div
v-if=
"!item.hideTitle"
class=
"title"
>
{{
item
.
title
}}
</div>
<div
v-if=
"!item.hideTitle"
class=
"title"
>
{{
item
.
title
}}
<
span
class=
"gray-tip"
v-if=
"item.disabled"
><i
class=
"el-icon-warning-outline"
style=
"margin-right: 5px;"
></i>
获得居民授权才可进行此项填写
</span><
/div>
<el-form
<el-form
:ref=
"'form' + index"
:ref=
"'form' + index"
:id=
"'form' + index"
:id=
"'form' + index"
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
getDomain
,
getScaleModels
,
getScaleDetail
,
postScale
,
updateScalesStatus
,
submitScale
}
from
'@/utils/followup/followapis'
import
{
getDomain
,
getScaleModels
,
getScaleDetail
,
postScale
,
updateScalesStatus
,
submitScale
,
getScaleModels2
}
from
'@/utils/followup/followapis'
// 量表 template
// 量表 template
import
FormScale
from
'@/components/followup/form/index'
import
FormScale
from
'@/components/followup/form/index'
...
@@ -153,9 +153,6 @@
...
@@ -153,9 +153,6 @@
if
(
formName
===
'stroke_006'
||
formName
===
'stroke_014'
||
formName
===
'stroke_015'
){
if
(
formName
===
'stroke_006'
||
formName
===
'stroke_014'
||
formName
===
'stroke_015'
){
this
.
addComponents
[
index
].
ruleNew
=
val
;
this
.
addComponents
[
index
].
ruleNew
=
val
;
this
.
setRuleToTrue
(
index
);
this
.
setRuleToTrue
(
index
);
// if(this.$refs['form' + index].length > 0){
// this.$refs['form' + index][0].resetFields();
// }
}
}
})
})
...
@@ -202,10 +199,10 @@
...
@@ -202,10 +199,10 @@
this
.
domain
=
res
.
data
;
this
.
domain
=
res
.
data
;
// 获取量表模块
// 获取量表模块
this
.
getFormModules
();
this
.
getFormModules
();
if
(
this
.
showBtn
!=
'0'
){
//
if(this.showBtn!='0'){
// 获取量表详情
//
// 获取量表详情
this
.
getFormDetail
();
//
this.getFormDetail();
}
//
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -216,29 +213,62 @@
...
@@ -216,29 +213,62 @@
},
},
// 动态开启验证开关
// 动态开启验证开关
setRuleToTrue
(
index
){
setRuleToTrue
(
index
){
this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
k
)
=>
{
if
(
this
.
addComponents
[
index
].
disabled
===
true
)
{
//对未授权的做处理,让置灰且非必填
if
(
item
.
rules
&&
item
.
rules
.
length
>
0
){
this
.
addComponents
[
index
].
dataSource
.
forEach
((
item
,
k
)
=>
{
if
(
!
this
.
needRule
){
this
.
addComponents
[
index
].
dataSource
[
k
].
disabled
=
true
;
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
[
0
].
required
=
true
;
if
(
item
.
rules
&&
item
.
rules
.
length
>
0
){
}
else
{
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
[
0
].
required
=
false
;
this
.
addComponents
[
index
].
dataSource
[
k
].
rules
[
0
].
required
=
false
;
}
}
}
if
(
this
.
$refs
[
'form'
+
index
].
length
>
0
){
})
this
.
$refs
[
'form'
+
index
][
0
].
resetFields
();
}
})
}
else
{
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
(){
getFormModules
(){
getScaleModels
(
this
.
domain
,
this
.
scaleNo
).
then
(
res
=>
{
// getScaleModels(this.domain,this.scaleNo).then(res=>{
getScaleModels2
(
this
.
domain
,
this
.
scaleNo
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
){
if
(
res
.
code
==
'000000'
){
this
.
moduleList
=
res
.
data
;
this
.
moduleList
=
res
.
data
;
for
(
let
i
=
0
;
i
<
this
.
moduleList
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
this
.
moduleList
.
length
;
i
++
){
for
(
let
j
=
0
;
j
<
this
.
addComponentsSourceList
.
length
;
j
++
){
for
(
let
j
=
0
;
j
<
this
.
addComponentsSourceList
.
length
;
j
++
){
// if(this.moduleList[i]==this.addComponentsSourceList[j].formName){
// if(this.moduleList[i]==this.addComponentsSourceList[j].formName){
if
(
this
.
moduleList
[
i
].
modelCode
==
this
.
addComponentsSourceList
[
j
].
formName
){
if
(
this
.
moduleList
[
i
].
modelCode
==
this
.
addComponentsSourceList
[
j
].
formName
){
this
.
addComponents
.
push
(
this
.
addComponentsSourceList
[
j
])
// this.addComponents.push(this.addComponentsSourceList[j])
//把获取到每个模块的disabeld状态更新进将要渲染的数组
this
.
addComponents
.
push
({...
this
.
addComponentsSourceList
[
j
],
disabled
:
this
.
moduleList
[
i
].
disabled
})
}
}
}
}
}
}
/*start--根据当前模块是否获得居民权限,来判断是否可填写当前模块*/
this
.
addComponents
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
disabled
===
true
)
{
item
.
dataSource
.
forEach
((
item2
,
index2
)
=>
{
// item2.disabled = true;
this
.
addComponents
[
index
].
dataSource
[
index2
].
disabled
=
true
;
if
(
this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
)
{
this
.
addComponents
[
index
].
dataSource
[
index2
].
rules
[
0
].
required
=
false
;
}
})
}
})
/*end--*/
console
.
log
(
'展示的数组信息'
,
this
.
addComponents
)
if
(
this
.
showBtn
!=
'0'
){
// 获取量表详情
this
.
getFormDetail
();
}
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
res
.
message
,
message
:
res
.
message
,
...
@@ -326,6 +356,11 @@
...
@@ -326,6 +356,11 @@
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
22px
;
font-size
:
22px
;
border-bottom
:
1px
dashed
#ccc
;
border-bottom
:
1px
dashed
#ccc
;
.gray-tip
{
color
:
#8C8C8C
;
margin-left
:
20px
;
font-size
:
16px
;
}
}
}
}
}
}
}
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录