Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
d3912f65
提交
d3912f65
编写于
4月 08, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no message
上级
b2a60e52
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
79 行增加
和
35 行删除
+79
-35
set-time-node.vue
src/views/followup/plan-manage/dialog/set-time-node.vue
+19
-22
new-plan.vue
src/views/followup/plan-manage/new-plan.vue
+7
-3
plan-modify.vue
src/views/followup/plan-manage/plan-modify.vue
+53
-10
未找到文件。
src/views/followup/plan-manage/dialog/set-time-node.vue
浏览文件 @
d3912f65
...
@@ -93,7 +93,7 @@
...
@@ -93,7 +93,7 @@
setTimeNodeList
:
Array
,
setTimeNodeList
:
Array
,
patientIdList
:
Array
,
patientIdList
:
Array
,
checkForm
:
Boolean
,
checkForm
:
Boolean
,
saveStatus
:
Boolean
,
//
saveStatus: Boolean,
},
},
computed
:
{
computed
:
{
...
mapState
(
'planManage'
,{
...
mapState
(
'planManage'
,{
...
@@ -120,21 +120,26 @@
...
@@ -120,21 +120,26 @@
//初始化一个随访时间节点
//初始化一个随访时间节点
this
.
activeTab
=
'setNewRef'
;
this
.
activeTab
=
'setNewRef'
;
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
if
(
this
.
setTimeNodeList
.
length
>
0
)
{
this
.
timeForm
.
isDisabled
=
true
;
this
.
timeForm
.
timeUnit
=
this
.
setTimeNodeList
[
0
].
timeUnit
;
}
},
},
watch
:
{
watch
:
{
saveStatus
(
val
){
// saveStatus(val){
if
(
val
){
// if(val){
// 校验通过并且保存一个时间节点,通知外层
// // 校验通过并且保存一个时间节点,通知外层
// this.setTimeNodeList.push(this.timeForm);
//// this.setTimeNodeList.push(this.timeForm);
}
else
{
// }else{
//
// }
// },
setTimeNodeList
(
val
){
this
.
setTimeNodeList
=
val
if
(
this
.
setTimeNodeList
.
length
>
0
)
{
this
.
timeForm
.
isDisabled
=
true
;
this
.
timeForm
.
timeUnit
=
this
.
setTimeNodeList
[
0
].
timeUnit
;
}
}
},
},
checkForm
(
val
){
checkForm
(
val
){
console
.
log
(
'触发 保存 校验'
,
val
)
// 触发 保存 校验
// 触发 保存 校验
this
.
saveValiedBegin
=
val
this
.
saveValiedBegin
=
val
},
},
...
@@ -188,7 +193,6 @@
...
@@ -188,7 +193,6 @@
},
},
// 校验通过之后,需要新增一个新的初始化的表单
// 校验通过之后,需要新增一个新的初始化的表单
checkValid
(
obj
){
checkValid
(
obj
){
this
.
valBegin
=
false
console
.
log
(
'校验结果'
,
obj
.
valid
)
console
.
log
(
'校验结果'
,
obj
.
valid
)
if
(
obj
.
valid
)
{
if
(
obj
.
valid
)
{
if
(
this
.
timeForm
.
remindDay
.
length
>
0
){
if
(
this
.
timeForm
.
remindDay
.
length
>
0
){
...
@@ -201,7 +205,6 @@
...
@@ -201,7 +205,6 @@
if
(
this
.
timeForm
.
pushDay
){
if
(
this
.
timeForm
.
pushDay
){
this
.
timeForm
.
pushContentList
.
push
({
this
.
timeForm
.
pushContentList
.
push
({
startDays
:
this
.
timeForm
.
pushDay
,
startDays
:
this
.
timeForm
.
pushDay
,
// resourceId: '',
resourceId
:
this
.
timeForm
.
comentMsg
.
id
resourceId
:
this
.
timeForm
.
comentMsg
.
id
})
})
...
@@ -215,7 +218,7 @@
...
@@ -215,7 +218,7 @@
}
}
this
.
setTimeNodeList
.
push
(
this
.
timeForm
);
this
.
setTimeNodeList
.
push
(
this
.
timeForm
);
this
.
$emit
(
'setTimeNodeListOnCom'
,
this
.
setTimeNodeList
)
if
(
obj
.
type
==
'save'
){
if
(
obj
.
type
==
'save'
){
console
.
log
(
'是点击保存时候的校验,因此告诉最外层的 new-plan 组件,校验结果'
)
console
.
log
(
'是点击保存时候的校验,因此告诉最外层的 new-plan 组件,校验结果'
)
this
.
$emit
(
'addListenSave'
,
true
)
this
.
$emit
(
'addListenSave'
,
true
)
...
@@ -228,8 +231,6 @@
...
@@ -228,8 +231,6 @@
}
}
this
.
$emit
(
'setTimeNodeListOnCom'
,
this
.
setTimeNodeList
)
}
else
{
}
else
{
// 告诉 保存 按钮, 校验没通过
// 告诉 保存 按钮, 校验没通过
if
(
obj
.
type
==
'save'
){
if
(
obj
.
type
==
'save'
){
...
@@ -237,7 +238,7 @@
...
@@ -237,7 +238,7 @@
this
.
$emit
(
'addListenSave'
,
false
)
this
.
$emit
(
'addListenSave'
,
false
)
}
}
return
this
.
valBegin
=
false
}
}
},
},
// 点击 新增时间节点
// 点击 新增时间节点
...
@@ -246,17 +247,13 @@
...
@@ -246,17 +247,13 @@
// 新增,则进行校验表单字段 触发校验
// 新增,则进行校验表单字段 触发校验
if
(
this
.
activeTab
==
'setNewRef'
)
{
if
(
this
.
activeTab
==
'setNewRef'
)
{
this
.
valBegin
=
true
this
.
valBegin
=
true
}
else
{
}
else
{
// 否则切换 已经新增的表单至新增节点表单
// 否则切换 已经新增的表单至新增节点表单
this
.
activeTab
=
'setNewRef'
;
this
.
activeTab
=
'setNewRef'
;
this
.
showSetBtn
=
true
;
this
.
showSetBtn
=
true
;
this
.
initNewForm
()
this
.
initNewForm
()
}
}
console
.
log
(
this
.
timeForm
)
},
},
// 初始化新的表单
// 初始化新的表单
initNewForm
(){
initNewForm
(){
...
@@ -294,7 +291,7 @@
...
@@ -294,7 +291,7 @@
changeTab
(
val
){
changeTab
(
val
){
this
.
activeTab
=
val
;
this
.
activeTab
=
val
;
console
.
log
(
'当前的activeTab '
,
val
)
console
.
log
(
'当前的
activeTab '
,
val
)
if
(
val
==
'setNewRef'
)
{
if
(
val
==
'setNewRef'
)
{
this
.
initNewForm
();
this
.
initNewForm
();
...
...
src/views/followup/plan-manage/new-plan.vue
浏览文件 @
d3912f65
...
@@ -84,7 +84,6 @@
...
@@ -84,7 +84,6 @@
@
setTimeNodeListOnCom=
"setTimeNodeListOnCom"
@
setTimeNodeListOnCom=
"setTimeNodeListOnCom"
:patientIdList=
"baseInfo.patientIdList"
:patientIdList=
"baseInfo.patientIdList"
:checkForm=
"checkForm"
:checkForm=
"checkForm"
:saveStatus=
"saveStatus"
@
addListenSave=
"addListenSave"
@
addListenSave=
"addListenSave"
/>
/>
</div>
</div>
...
@@ -124,7 +123,7 @@
...
@@ -124,7 +123,7 @@
data
()
{
data
()
{
return
{
return
{
checkForm
:
false
,
checkForm
:
false
,
saveStatus
:
false
,
//
saveStatus: false,
/*面包屑配置*/
/*面包屑配置*/
curmbFirst
:
'随访管理'
,
curmbFirst
:
'随访管理'
,
curmbSecond
:
'计划管理'
,
curmbSecond
:
'计划管理'
,
...
@@ -165,6 +164,11 @@
...
@@ -165,6 +164,11 @@
//清理store中存的数据setTimeNodeList
//清理store中存的数据setTimeNodeList
},
},
// watch: {
// checkForm(val){
// this.checkForm = val
// }
// },
computed
:
{
computed
:
{
...
mapState
(
'planManage'
,{
...
mapState
(
'planManage'
,{
setTimeNodeList
:
state
=>
state
.
setTimeNodeList
,
setTimeNodeList
:
state
=>
state
.
setTimeNodeList
,
...
@@ -208,7 +212,7 @@
...
@@ -208,7 +212,7 @@
message
:
res
.
message
,
message
:
res
.
message
,
showClose
:
false
showClose
:
false
});
});
this
.
saveStatus
=
false
//
this.saveStatus = false
}
}
})
})
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
...
...
src/views/followup/plan-manage/plan-modify.vue
浏览文件 @
d3912f65
...
@@ -48,7 +48,12 @@
...
@@ -48,7 +48,12 @@
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"edit-plan-content"
>
<div
class=
"edit-plan-content"
>
<set-time-node
:setTimeNodeList=
"setTimeNodeList"
@
setTimeNodeListOnCom=
"setTimeNodeListOnCom"
></set-time-node>
<set-time-node
:setTimeNodeList=
"setTimeNodeList"
@
setTimeNodeListOnCom=
"setTimeNodeListOnCom"
:checkForm=
"checkForm"
@
addListenSave=
"addListenSave"
/>
</div>
</div>
</div>
</div>
<select-patient
<select-patient
...
@@ -68,6 +73,7 @@
...
@@ -68,6 +73,7 @@
import
SetTimeNode
from
'@/views/followup/plan-manage/dialog/set-time-node'
;
import
SetTimeNode
from
'@/views/followup/plan-manage/dialog/set-time-node'
;
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
{
mapState
,
mapActions
}
from
'vuex'
import
{
mapState
,
mapActions
}
from
'vuex'
export
default
{
export
default
{
...
@@ -81,6 +87,8 @@
...
@@ -81,6 +87,8 @@
},
},
data
()
{
data
()
{
return
{
return
{
checkForm
:
false
,
// saveStatus: false,
/*面包屑配置*/
/*面包屑配置*/
curmbFirst
:
'随访管理'
,
curmbFirst
:
'随访管理'
,
curmbSecond
:
'计划管理'
,
curmbSecond
:
'计划管理'
,
...
@@ -110,7 +118,7 @@
...
@@ -110,7 +118,7 @@
showFollowTime
:
false
,
//是否展示全部时间
showFollowTime
:
false
,
//是否展示全部时间
}
}
},
},
moun
ted
()
{
crea
ted
()
{
this
.
getPlanDetail
(
this
.
$route
.
query
.
planId
);
//获取计划详情
this
.
getPlanDetail
(
this
.
$route
.
query
.
planId
);
//获取计划详情
this
.
getRemarkOption
()
this
.
getRemarkOption
()
this
.
getNodeTimeList
(
this
.
$route
.
query
.
planId
);
// 获取随访时间列表
this
.
getNodeTimeList
(
this
.
$route
.
query
.
planId
);
// 获取随访时间列表
...
@@ -177,19 +185,54 @@
...
@@ -177,19 +185,54 @@
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
// 关闭弹层,继续创建
console
.
log
(
this
.
checkForm
)
this
.
planDetail
.
joinTime
=
'2019-04-09T16:00:00.000+0000'
// 点击保存,先进行校验,表单字段是否通过验证
this
.
setFollowPlan
(
this
.
planDetail
)
this
.
checkForm
=
true
/*this.$message({
message: '修改成功!',
// // 关闭弹层,继续创建
type: 'success'
// this.planDetail.joinTime = '2019-04-09T16:00:00.000+0000'
});*/
// this.setFollowPlan(this.planDetail)
this
.
$router
.
back
(
-
1
)
// /*this.$message({
// message: '修改成功!',
// type: 'success'
// });*/
// this.$router.back(-1)
}).
catch
(()
=>
{
}).
catch
(()
=>
{
// 确定放弃,跳出当前编辑页面
// 确定放弃,跳出当前编辑页面
});
});
},
},
// 监听保存校验结果
addListenSave
(
val
){
console
.
log
(
'监听保存校验结果'
,
val
)
this
.
checkForm
=
false
if
(
val
){
// 关闭弹层,继续创建
this
.
planDetail
.
joinTime
=
'2019-04-09T16:00:00.000+0000'
// this.setFollowPlan(this.planDetail)
createFollowPlan
(
this
.
planDetail
).
then
(
res
=>
{
if
(
res
.
code
==
'000000'
){
this
.
getTimeNodeList
([]);
// 各种校验通过后,提交编辑内容,toast提示
this
.
$notify
.
success
({
title
:
''
,
message
:
'修改成功'
,
showClose
:
false
});
setTimeout
(()
=>
{
this
.
$router
.
back
(
-
1
)
},
2000
)
}
else
{
this
.
$notify
.
success
({
title
:
'修改失败'
,
message
:
res
.
message
,
showClose
:
false
});
// this.saveStatus = false
}
})
}
},
goToFollowTime
()
{
goToFollowTime
()
{
this
.
showFollowTime
=
true
this
.
showFollowTime
=
true
},
},
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录