Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
f270d91a
提交
f270d91a
编写于
4月 10, 2019
作者:
Yuanzhao.dai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add time
上级
798f8715
变更
3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
130 行增加
和
45 行删除
+130
-45
add-patient-time.vue
src/views/followup/plan-manage/dialog/add-patient-time.vue
+43
-35
select-patient.vue
src/views/followup/plan-manage/dialog/select-patient.vue
+26
-2
plan-modify.vue
src/views/followup/plan-manage/plan-modify.vue
+61
-8
未找到文件。
src/views/followup/plan-manage/dialog/add-patient-time.vue
浏览文件 @
f270d91a
...
@@ -17,14 +17,14 @@
...
@@ -17,14 +17,14 @@
{{
addPatientData
.
patientNames
}}
{{
addPatientData
.
patientNames
}}
</el-form-item>
</el-form-item>
<el-form-item
label=
"随访开始时间:"
prop=
"joinTime"
>
<el-form-item
label=
"随访开始时间:"
prop=
"joinTime"
>
<el-
select
v-model=
"addPatientData.joinTime"
size=
"small"
clearable
>
<el-
date-picker
<el-option
v-model=
"addPatientData.joinTime"
v-for=
"(item, index) in followStartTimeList
"
type=
"date
"
:key=
"item+index
"
placeholder=
"请选择随访开始时间
"
:label=
"item
"
format=
"yyyy-MM-dd
"
:value=
"item"
>
value-format=
"yyyy-MM-dd"
</el-option
>
clearable
>
</el-
select
>
</el-
date-picker
>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -67,21 +67,27 @@
...
@@ -67,21 +67,27 @@
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getFollowStartTimeList
(
this
.
$route
.
query
.
planId
);
// 获取随访时间列表
//
this.getFollowStartTimeList(this.$route.query.planId);// 获取随访时间列表
},
},
computed
:
{
computed
:
{
...
mapState
(
'planManage'
,
{
...
mapState
(
'planManage'
,
{
followStartTimeList
:
state
=>
state
.
followStartTimeList
,
//
followStartTimeList: state => state.followStartTimeList,
})
})
},
},
methods
:
{
methods
:
{
...
mapActions
(
'planManage'
,
[
'getFollowStartTimeList'
,
'getResidentList'
]),
...
mapActions
(
'planManage'
,
[
'getFollowStartTimeList'
,
'getResidentList'
]),
clickClose
()
{
clickClose
()
{
this
.
$emit
(
'sendJoinTime'
,
null
)
this
.
$emit
(
'closeAddPatientTime'
,
false
)
this
.
$emit
(
'closeAddPatientTime'
,
false
)
},
},
addPatient
()
{
addPatient
()
{
this
.
$refs
[
'addPatientData'
].
validate
(
valid
=>
{
this
.
$refs
[
'addPatientData'
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
if
(
this
.
$route
.
name
==
'planModify'
)
{
this
.
$emit
(
'sendJoinTime'
,
this
.
addPatientData
.
joinTime
)
this
.
$emit
(
'closeAddPatientTime'
,
false
)
}
else
{
const
{
id
,
patientIdList
,
joinTime
}
=
this
.
addPatientData
;
const
{
id
,
patientIdList
,
joinTime
}
=
this
.
addPatientData
;
createFollowPlan
({
createFollowPlan
({
id
,
id
,
...
@@ -98,7 +104,7 @@
...
@@ -98,7 +104,7 @@
planId
:
this
.
addPatientData
.
id
,
planId
:
this
.
addPatientData
.
id
,
status
:
this
.
addPatientData
.
status
status
:
this
.
addPatientData
.
status
})
})
this
.
clickClose
(
)
this
.
$emit
(
'closeAddPatientTime'
,
false
)
}
else
{
}
else
{
this
.
$message
({
this
.
$message
({
message
:
`
${
data
.
message
}
`
,
message
:
`
${
data
.
message
}
`
,
...
@@ -111,6 +117,8 @@
...
@@ -111,6 +117,8 @@
type
:
'error'
type
:
'error'
});
});
});
});
}
}
else
{
}
else
{
return
false
;
return
false
;
}
}
...
...
src/views/followup/plan-manage/dialog/select-patient.vue
浏览文件 @
f270d91a
...
@@ -175,6 +175,7 @@
...
@@ -175,6 +175,7 @@
labelId
:
''
,
labelId
:
''
,
labelName
:
'分组'
labelName
:
'分组'
}],
}],
trueAdd
:[],
//真正新加
}
}
},
},
props
:
{
props
:
{
...
@@ -219,6 +220,29 @@
...
@@ -219,6 +220,29 @@
this
.
labelOptions
=
this
.
labelOptions
.
concat
(
res
.
data
.
labelNameList
);
this
.
labelOptions
=
this
.
labelOptions
.
concat
(
res
.
data
.
labelNameList
);
})
})
}
}
},
eachSelects
(
val
,
oldVal
){
if
(
val
.
length
&&
oldVal
.
length
)
{
console
.
log
(
'新'
,
val
);
console
.
log
(
'新'
,
oldVal
);
if
(
val
.
length
>
oldVal
.
length
)
{
let
add
=
val
.
filter
(
function
(
n
)
{
return
oldVal
.
indexOf
(
n
)
==
-
1
});
this
.
trueAdd
.
push
(
add
)
console
.
log
(
'加人'
,
this
.
trueAdd
)
}
else
if
(
val
.
length
<=
oldVal
.
length
)
{
let
reduce
=
oldVal
.
filter
(
function
(
n
)
{
return
val
.
indexOf
(
n
)
==
-
1
});
/*this.trueAdd = this.trueAdd.filter(function(n) {
return reduce.indexOf(n) == -1
});*/
console
.
log
(
'减人'
,
reduce
)
}
else
{
}
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -272,7 +296,7 @@
...
@@ -272,7 +296,7 @@
},
},
// 选择居民
// 选择居民
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
//
console.log('每次选中居民',val)
console
.
log
(
'每次选中居民'
,
val
)
this
.
eachSelects
=
val
this
.
eachSelects
=
val
},
},
// 切换分页
// 切换分页
...
@@ -339,7 +363,7 @@
...
@@ -339,7 +363,7 @@
}
}
return
ageObj
;
return
ageObj
;
}
}
}
}
,
}
}
</
script
>
</
script
>
...
...
src/views/followup/plan-manage/plan-modify.vue
浏览文件 @
f270d91a
...
@@ -73,6 +73,11 @@
...
@@ -73,6 +73,11 @@
@
closeSelectedDialog=
"closeSelectedDialog"
@
closeSelectedDialog=
"closeSelectedDialog"
@
continueAdd=
"continueAdd"
/>
@
continueAdd=
"continueAdd"
/>
<follow-time
:showThisPage=
"showFollowTime"
:nodeTimeList=
"nodeTimeList"
@
closeFollowTime=
"closeFollowTime"
></follow-time>
<follow-time
:showThisPage=
"showFollowTime"
:nodeTimeList=
"nodeTimeList"
@
closeFollowTime=
"closeFollowTime"
></follow-time>
<add-patient-time
:showThisPage=
"showAddPatientTime"
:addPatientData=
"addPatientData"
@
sendJoinTime=
"sendJoinTime"
@
closeAddPatientTime=
"closeAddPatientTime"
></add-patient-time>
</div>
</div>
</
template
>
</
template
>
...
@@ -83,6 +88,8 @@
...
@@ -83,6 +88,8 @@
import
FollowTime
from
'@/views/followup/plan-manage/dialog/follow-time'
;
import
FollowTime
from
'@/views/followup/plan-manage/dialog/follow-time'
;
import
{
createFollowPlan
}
from
'@/utils/followup/followapis'
import
{
createFollowPlan
}
from
'@/utils/followup/followapis'
//添加居民选择随访时间
import
addPatientTime
from
'@/views/followup/plan-manage/dialog/add-patient-time'
;
import
{
mapState
,
mapActions
}
from
'vuex'
import
{
mapState
,
mapActions
}
from
'vuex'
export
default
{
export
default
{
...
@@ -91,7 +98,8 @@
...
@@ -91,7 +98,8 @@
SelectPatient
,
SelectPatient
,
HasSelectedPatient
,
HasSelectedPatient
,
SetTimeNode
,
SetTimeNode
,
FollowTime
FollowTime
,
addPatientTime
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -125,6 +133,12 @@
...
@@ -125,6 +133,12 @@
isShowSelectedDialog
:
false
,
//显示已选居民
isShowSelectedDialog
:
false
,
//显示已选居民
nodeListModify
:
[],
//修改node列表
nodeListModify
:
[],
//修改node列表
showFollowTime
:
false
,
//是否展示全部时间
showFollowTime
:
false
,
//是否展示全部时间
showAddPatientTime
:
false
,
//是否展示添加居民选择时间
addPatientData
:
{},
//选择时间数据
/*joinSelectedList: [], //新添加居民
joinPatientIdList: [], //新添加居民id
joinSelectedNames: [], //新添加居民名字*/
selectPatients
:
[],
//选择居民列表已选人
}
}
},
},
created
()
{
created
()
{
...
@@ -171,16 +185,37 @@
...
@@ -171,16 +185,37 @@
this
.
isShowSelectedDialog
=
val
;
this
.
isShowSelectedDialog
=
val
;
},
},
sureSelectPatient
()
{
sureSelectPatient
()
{
console
.
log
(
'getArguments'
,
arguments
[
0
])
let
getArguments
=
arguments
[
0
];
let
getArguments
=
arguments
[
0
];
// alert(this.selectResidentList.length+'-'+getArguments[1].length)
this
.
isShowSelectPatient
=
getArguments
[
0
];
this
.
isShowSelectPatient
=
getArguments
[
0
];
const
selectPatients
=
getArguments
[
1
];
// 每次选中获取的人
this
.
selectPatients
=
getArguments
[
1
];
// 每次选中获取的人
selectPatients
.
forEach
((
item
)
=>
{
let
selectPeople
=
[];
if
(
!
this
.
planDetailData
.
patientIdList
.
includes
(
item
.
patientId
)){
let
selectPeopleIds
=
[];
this
.
hasSelectedList
.
push
(
item
)
let
selectNames
=
[]
this
.
planDetailData
.
patientIdList
.
push
(
item
.
patientId
);
// 页面中数据存储所有选择的人,没有去重
this
.
hasSelectedList
.
forEach
(
function
(
item
)
{
selectPeople
.
push
(
item
)
});
this
.
patientIdList
.
forEach
(
function
(
item
)
{
selectPeopleIds
.
push
(
item
)
})
this
.
selectPatients
.
forEach
((
item
)
=>
{
if
(
!
this
.
planDetailData
.
patientIdList
.
includes
(
item
.
patientId
)){
// 页面中数据存储所有选择的人,没有去重
selectPeople
.
push
(
item
);
selectPeopleIds
.
push
(
item
.
id
)
selectNames
.
push
(
item
.
nickname
)
}
}
})
})
this
.
planDetailData
.
hasSelectedNum
=
this
.
patientIdList
.
length
;
this
.
addPatientData
=
{
id
:
this
.
$route
.
query
.
planId
,
addPatients
:
true
,
patientIdList
:
selectPeopleIds
,
patientNames
:
selectNames
.
join
(
'、'
),
}
this
.
showAddPatientTime
=
true
},
},
continueAdd
(
val
)
{
continueAdd
(
val
)
{
this
.
isShowSelectedDialog
=
val
;
this
.
isShowSelectedDialog
=
val
;
...
@@ -227,7 +262,6 @@
...
@@ -227,7 +262,6 @@
this
.
checkForm
=
false
this
.
checkForm
=
false
if
(
val
.
status
){
if
(
val
.
status
){
// 关闭弹层,继续创建
// 关闭弹层,继续创建
this
.
planDetail
.
joinTime
=
'2019-04-09T16:00:00.000+0000'
this
.
planDetailData
.
fPlanTimeReqList
=
val
.
setTimeNodeList
this
.
planDetailData
.
fPlanTimeReqList
=
val
.
setTimeNodeList
console
.
log
(
'修改计划前的数据===>>>'
,
this
.
planDetailData
)
console
.
log
(
'修改计划前的数据===>>>'
,
this
.
planDetailData
)
createFollowPlan
(
this
.
planDetailData
).
then
(
res
=>
{
createFollowPlan
(
this
.
planDetailData
).
then
(
res
=>
{
...
@@ -263,6 +297,25 @@
...
@@ -263,6 +297,25 @@
setTimeNodeListOnCom
(
val
){
setTimeNodeListOnCom
(
val
){
this
.
getTimeNodeList
(
val
)
this
.
getTimeNodeList
(
val
)
},
},
closeAddPatientTime
(
isShow
)
{
this
.
showAddPatientTime
=
isShow
},
sendJoinTime
(
joinData
)
{
console
.
log
(
'this.hasSelectedList new'
,
this
.
hasSelectedList
)
if
(
joinData
)
{
// alert(joinData)
this
.
planDetailData
.
joinTime
=
joinData
;
console
.
log
(
'新添加时间'
,
this
.
planDetailData
.
joinTime
)
this
.
selectPatients
.
forEach
((
item
)
=>
{
if
(
!
this
.
planDetailData
.
patientIdList
.
includes
(
item
.
patientId
)){
// 页面中数据存储所有选择的人,没有去重
this
.
hasSelectedList
.
push
(
item
)
this
.
planDetailData
.
patientIdList
.
push
(
item
.
patientId
);
}
})
this
.
planDetailData
.
hasSelectedNum
=
this
.
patientIdList
.
length
;
}
},
},
},
watch
:
{
watch
:
{
planDetail
(
val
)
{
planDetail
(
val
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录