Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
2640171b
提交
2640171b
编写于
4月 10, 2019
作者:
tao.wu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
no message
上级
798f8715
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
43 行增加
和
67 行删除
+43
-67
set-time-node.vue
src/views/followup/plan-manage/dialog/set-time-node.vue
+43
-67
未找到文件。
src/views/followup/plan-manage/dialog/set-time-node.vue
浏览文件 @
2640171b
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<el-button
<el-button
size=
"small"
size=
"small"
@
click=
"addNewNode"
@
click=
"addNewNode"
>
新增时间节点
<i
class=
"el-icon-circle-close-outline"
@
click=
"deleteAddNode"
v-if=
"setTimeNodeList.length>0"
></i>
>
新增时间节点
</el-button>
</el-button>
</div>
</div>
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
<div
class=
"time-line-scroll"
>
<div
class=
"time-line-scroll"
>
<div
<div
v-if=
"showSetBtn && !isStandedTemplate"
>
设置随访时间
v-if=
"showSetBtn && !isStandedTemplate"
style=
"margin:10px 5px;background:orange;padding:10px;display: inline-block;"
>
设置随访时间
<i
class=
"el-icon-circle-close-outline"
@
click=
"deleteAddNode"
v-if=
"setTimeNodeList.length>0"
></i>
<i
class=
"el-icon-circle-close-outline"
@
click=
"deleteAddNode"
v-if=
"setTimeNodeList.length>0"
></i>
</div>
</div>
<div
v-model=
"activeTab"
type=
"card"
closable
>
<div
v-model=
"activeTab"
type=
"card"
closable
>
...
@@ -23,10 +23,10 @@
...
@@ -23,10 +23,10 @@
v-for=
"(item, index) in setTimeNodeList"
v-for=
"(item, index) in setTimeNodeList"
:key=
"index"
:key=
"index"
@
click=
"changeTabNew(index)"
@
click=
"changeTabNew(index)"
v-text=
"isStandedTemplate ? item.timeStr : '开始后'+String(item.timeNo) + timeUnitStr"
:style=
"(index == activeTab)?'background:#3190e8;':''"
:style=
"(index == activeTab)?'background:#3190e8;':''"
style=
"float:left;border:1px solid orange;padding:5px 10px;margin:0 5px;"
style=
"float:left;border:1px solid orange;padding:5px 10px;margin:0 5px;position: relative;"
></div>
>
{{
isStandedTemplate
?
item
.
timeStr
:
'开始后'
+
String
(
item
.
timeNo
)
+
timeUnitStr
}}
<i
class=
"deletelist el-icon-circle-close-outline"
@
click=
"deleteTimeNode"
v-if=
"setTimeNodeList.length>0"
></i></div>
</div>
</div>
</div>
</div>
<!--查看时间节点-->
<!--查看时间节点-->
...
@@ -59,14 +59,6 @@
...
@@ -59,14 +59,6 @@
:value=
"item.no"
>
:value=
"item.no"
>
</el-option>
</el-option>
</el-select>
</el-select>
<!--
<el-select
v-if=
"isStandedTemplate || planId"
v-model=
"item.timeUnit"
placeholder=
"请选择"
:disabled=
"isStandedTemplate"
>
-->
<!--
<el-option-->
<!--v-for="(item,index) in markOptions"-->
<!--:key="index"-->
<!--:label="item.value"-->
<!--:value="item.no">-->
<!--
</el-option>
-->
<!--
</el-select>
-->
</el-form-item>
</el-form-item>
</div>
</div>
</el-form-item>
</el-form-item>
...
@@ -91,21 +83,6 @@
...
@@ -91,21 +83,6 @@
</el-option>
</el-option>
</el-select>
</el-select>
<!--固定模板需要填充-->
<!--
<el-select-->
<!--v-if="isStandedTemplate"-->
<!--v-model="timeForm.remindDay"-->
<!--multiple-->
<!--:multiple-limit=3-->
<!--:disabled="isStandedTemplate"-->
<!--placeholder="请选择">-->
<!--
<el-option-->
<!--v-for="(item,index) in remindOptionsCopy"-->
<!--:key="index"-->
<!--:label="item.startDaysStr"-->
<!--:value="item.startDays">-->
<!--
</el-option>
-->
<!--
</el-select>
-->
</el-form-item>
</el-form-item>
<el-form-item
label=
"推送患教"
>
<el-form-item
label=
"推送患教"
>
<div
style=
"display: flex"
>
<div
style=
"display: flex"
>
...
@@ -124,19 +101,6 @@
...
@@ -124,19 +101,6 @@
</el-option>
</el-option>
</el-select>
</el-select>
<!--固定模板需要填充-->
<!--
<el-select-->
<!--v-if="isStandedTemplate"-->
<!--v-model="timeForm.pushDay"-->
<!--placeholder="选择推送时间"-->
<!--clearable-->
<!--:disabled="isStandedTemplate"-->
<!-->-->
<!--
<el-option-->
<!--:label="timeForm.startDaysStr"-->
<!--:value="timeForm.pushDay">-->
<!--
</el-option>
-->
<!--
</el-select>
-->
<el-button
plain
class=
"ml20"
@
click=
"goSelectCartoon"
v-if=
"!item.hasSelected && !isStandedTemplate && !planId"
>
选择健康漫画
</el-button>
<el-button
plain
class=
"ml20"
@
click=
"goSelectCartoon"
v-if=
"!item.hasSelected && !isStandedTemplate && !planId"
>
选择健康漫画
</el-button>
<div
class=
"selected-div ml20"
v-if=
"item.hasSelected"
>
<div
class=
"selected-div ml20"
v-if=
"item.hasSelected"
>
<span>
《
{{
item
.
comentMsg
.
header_name
}}
》
</span>
<span>
《
{{
item
.
comentMsg
.
header_name
}}
》
</span>
...
@@ -165,22 +129,6 @@
...
@@ -165,22 +129,6 @@
</el-option>
</el-option>
</el-select>
</el-select>
<!--固定模板需要填充-->
<!--
<el-select-->
<!--v-if="isStandedTemplate"-->
<!--v-model="item.followResourceId"-->
<!--multiple-->
<!--:multiple-limit=3-->
<!--@change="changeFollowId"-->
<!--:disabled="isStandedTemplate"-->
<!--placeholder="请选择">-->
<!--
<el-option-->
<!--v-for="(item,index) in formOptionsCopy"-->
<!--:key="index"-->
<!--:label="item.sendContent"-->
<!--:value="item.resourceId">-->
<!--
</el-option>
-->
<!--
</el-select>
-->
</el-form-item>
</el-form-item>
<select-cartoon
<select-cartoon
:isSelectCartoon=
"isSelectCartoon"
:isSelectCartoon=
"isSelectCartoon"
...
@@ -194,7 +142,7 @@
...
@@ -194,7 +142,7 @@
<!--新增时间节点-->
<!--新增时间节点-->
<div
class=
"form-div"
v-
if
=
"activeTab == 'setNewRef'"
>
<div
class=
"form-div"
v-
show
=
"activeTab == 'setNewRef'"
>
<el-form
:ref=
"timeForm.formRef"
:model=
"timeForm"
:rules=
"timeFormRules"
label-suffix=
":"
label-width=
"140px"
:inline-message=
"true"
size=
"small"
>
<el-form
:ref=
"timeForm.formRef"
:model=
"timeForm"
:rules=
"timeFormRules"
label-suffix=
":"
label-width=
"140px"
:inline-message=
"true"
size=
"small"
>
<el-form-item
label=
"本次随访时间"
required
>
<el-form-item
label=
"本次随访时间"
required
>
<div
style=
"display: flex;"
>
<div
style=
"display: flex;"
>
...
@@ -443,6 +391,8 @@
...
@@ -443,6 +391,8 @@
console
.
log
(
'是否修改计划'
,
this
.
planId
)
console
.
log
(
'是否修改计划'
,
this
.
planId
)
console
.
log
(
'是否显示设置时间按钮'
,
this
.
showSetBtn
)
console
.
log
(
'是否显示设置时间按钮'
,
this
.
showSetBtn
)
console
.
log
(
'当前的检验是否通过了'
,
this
.
isValied
)
console
.
log
(
'当前的检验是否通过了'
,
this
.
isValied
)
console
.
log
(
'表单数据'
,
this
.
timeForm
)
console
.
log
(
'activeTab'
,
this
.
activeTab
)
if
(
this
.
planId
){
//修改计划
if
(
this
.
planId
){
//修改计划
...
@@ -469,10 +419,27 @@
...
@@ -469,10 +419,27 @@
setTimeNodeList
:
this
.
setTimeNodeList
setTimeNodeList
:
this
.
setTimeNodeList
})
})
}
else
{
}
else
{
// this.addNewNode('isSave')
// 如果直接点击保存,需要进行对当前填写的表单进行校验
const
isValied
=
this
.
checkCurrentForm
(
this
.
timeForm
.
formRef
);
this
.
isValied
=
isValied
if
(
isValied
){
if
(
this
.
timeForm
.
timeNo
==
this
.
setTimeNodeList
[
0
].
timeNo
){
}
else
{
this
.
checkTimeIsRepeat
(()
=>
{
this
.
activeTab
=
this
.
setTimeNodeList
.
length
;
this
.
timeForm
.
formRef
=
'form'
+
this
.
activeTab
;
this
.
setTimeNodeList
.
push
(
this
.
timeForm
)
})
}
// 新增成功之后
this
.
setTimeNodeList
=
this
.
sortKey
(
this
.
setTimeNodeList
,
'timeNo'
)
}
if
(
this
.
isValied
&&
!
this
.
showSetBtn
){
console
.
log
(
this
.
setTimeNodeList
)
if
(
this
.
isValied
){
// console.log(this.setTimeNodeList)
this
.
$emit
(
'addListenSave'
,{
this
.
$emit
(
'addListenSave'
,{
status
:
true
,
status
:
true
,
setTimeNodeList
:
this
.
setTimeNodeList
setTimeNodeList
:
this
.
setTimeNodeList
...
@@ -495,7 +462,7 @@
...
@@ -495,7 +462,7 @@
this
.
timeForm
.
isDisabled
=
true
;
this
.
timeForm
.
isDisabled
=
true
;
this
.
timeForm
.
timeUnit
=
this
.
setTimeNodeList
[
0
].
timeUnit
;
this
.
timeForm
.
timeUnit
=
this
.
setTimeNodeList
[
0
].
timeUnit
;
}
}
this
.
timeForm
=
val
//
this.timeForm = val
console
.
log
(
'表单父组件的数据'
,
this
.
timeForm
)
console
.
log
(
'表单父组件的数据'
,
this
.
timeForm
)
},
},
setTimeNodeList1
(
val
)
{
setTimeNodeList1
(
val
)
{
...
@@ -569,6 +536,9 @@
...
@@ -569,6 +536,9 @@
if
(
item
.
timeNo
==
this
.
timeForm
.
timeNo
){
if
(
item
.
timeNo
==
this
.
timeForm
.
timeNo
){
this
.
timeIsRepeat
=
true
;
this
.
timeIsRepeat
=
true
;
}
}
if
(
this
.
setTimeNodeList
[
0
].
timeNo
==
this
.
timeForm
.
timeNo
){
this
.
timeIsRepeat
=
true
;
}
})
})
}
else
{
}
else
{
this
.
timeIsRepeat
=
false
;
this
.
timeIsRepeat
=
false
;
...
@@ -594,10 +564,7 @@
...
@@ -594,10 +564,7 @@
}
}
const
isValied
=
this
.
checkCurrentForm
(
this
.
timeForm
.
formRef
);
const
isValied
=
this
.
checkCurrentForm
(
this
.
timeForm
.
formRef
);
// this.isValied = isValied
this
.
isValied
=
isValied
// console.log('isVlie=98989898',isValied)
// console.log(this.activeTab)
// console.log(this.timeForm)
if
(
isValied
){
if
(
isValied
){
this
.
checkTimeIsRepeat
(()
=>
{
this
.
checkTimeIsRepeat
(()
=>
{
if
(
this
.
showSetBtn
){
if
(
this
.
showSetBtn
){
...
@@ -641,6 +608,7 @@
...
@@ -641,6 +608,7 @@
wechatPatientNum
:
0
,
wechatPatientNum
:
0
,
messagePatientNum
:
0
messagePatientNum
:
0
};
};
this
.
timeForm
=
timeFormInit
;
this
.
timeForm
=
timeFormInit
;
},
},
goSelectCartoon
()
{
goSelectCartoon
()
{
...
@@ -655,13 +623,16 @@
...
@@ -655,13 +623,16 @@
},
},
deleteTimeNode
(
item
,
index
)
{
deleteTimeNode
(
item
,
index
)
{
this
.
setTimeNodeList
.
splice
(
index
,
1
)
this
.
setTimeNodeList
.
splice
(
index
,
1
)
this
.
activeTab
=
0
;
// this.activeTab = 0;
// this.timeForm = this.setTimeNodeList[0];
if
(
this
.
setTimeNodeList
.
length
==
0
)
{
if
(
this
.
setTimeNodeList
.
length
==
0
)
{
//新增一个form
//新增一个form
this
.
activeTab
=
'setNewRef'
;
this
.
activeTab
=
'setNewRef'
;
this
.
showSetBtn
=
true
;
this
.
showSetBtn
=
true
;
this
.
initNewForm
();
this
.
initNewForm
();
}
else
{
}
}
this
.
$forceUpdate
();
//强制刷新,解决页面不会重新渲染的问题
},
},
deleteAddNode
()
{
deleteAddNode
()
{
this
.
showSetBtn
=
false
;
this
.
showSetBtn
=
false
;
...
@@ -761,6 +732,11 @@
...
@@ -761,6 +732,11 @@
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.add-time-content
{
.add-time-content
{
padding-top
:
20px
;
padding-top
:
20px
;
.deletelist
{
position
:
absolute
;
right
:
-3px
;
top
:
-3px
;
}
.time-line-scroll
{
.time-line-scroll
{
width
:
100%
;
width
:
100%
;
/*height: 60px;*/
/*height: 60px;*/
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录