Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
提交
打开侧边栏
com.pica.cloud.education.frontend
pica.cloud.web-education-admin
提交
efef4073
提交
efef4073
编写于
4月 02, 2019
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新建计划修改
上级
989a7988
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
88 行增加
和
54 行删除
+88
-54
has-selected-patient.vue
...iews/followup/plan-manage/dialog/has-selected-patient.vue
+1
-1
select-patient.vue
src/views/followup/plan-manage/dialog/select-patient.vue
+3
-3
set-time-node.vue
src/views/followup/plan-manage/dialog/set-time-node.vue
+53
-22
new-plan.vue
src/views/followup/plan-manage/new-plan.vue
+31
-28
未找到文件。
src/views/followup/plan-manage/dialog/has-selected-patient.vue
浏览文件 @
efef4073
...
...
@@ -10,7 +10,7 @@
center
:lock-scroll=
"false"
>
<div
class=
"selected-dialog-content"
>
<div
class=
"title-div"
>
<el-button
type=
"primary"
@
click=
"continueAdd"
>
继续添加
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"continueAdd"
>
继续添加
</el-button>
</div>
<el-table
:data=
"hasSelectedList"
...
...
src/views/followup/plan-manage/dialog/select-patient.vue
浏览文件 @
efef4073
...
...
@@ -9,7 +9,7 @@
:close-on-press-escape=
"false"
center
>
<div
class=
"finish-content"
>
<el-form
ref=
"searchData"
:model=
"searchData"
:inline=
"true"
class=
"select-width"
>
<el-form
ref=
"searchData"
:model=
"searchData"
:inline=
"true"
class=
"select-width"
size=
"small"
>
<el-form-item>
<el-select
v-model=
"searchData.sex"
>
<el-option
...
...
@@ -113,8 +113,8 @@
</el-row>
</div>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"clickClose"
plain
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sureClick"
>
确 定
</el-button>
<el-button
@
click=
"clickClose"
size=
"small"
plain
>
取 消
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"sureClick"
>
确 定
</el-button>
</div>
</el-dialog>
</div>
...
...
src/views/followup/plan-manage/dialog/set-time-node.vue
浏览文件 @
efef4073
...
...
@@ -26,7 +26,7 @@
</el-select>
</el-form-item>
<el-form-item
prop=
"followupMark"
class=
"ml20"
>
<el-select
v-model=
"timeFormHas.followupMark"
placeholder=
"请选择"
>
<el-select
v-model=
"timeFormHas.followupMark"
placeholder=
"请选择"
:disabled=
"timeFormHas.isDisabled"
>
<el-option
v-for=
"item in markOptions"
:key=
"item.value"
...
...
@@ -113,7 +113,7 @@
</el-select>
</el-form-item>
<el-form-item
prop=
"followupMark"
class=
"ml20"
>
<el-select
v-model=
"timeForm.followupMark"
placeholder=
"请选择"
>
<el-select
v-model=
"timeForm.followupMark"
placeholder=
"请选择"
:disabled=
"timeForm.isDisabled"
>
<el-option
v-for=
"item in markOptions"
:key=
"item.value"
...
...
@@ -192,7 +192,7 @@
<
script
>
import
_
from
'lodash'
;
import
SelectCartoon
from
'@/views/followup/plan-manage/dialog/select-cartoon'
;
import
{
mapState
}
from
'vuex'
const
timeFormInit
=
{
formRef
:
''
,
followupTime
:
''
,
...
...
@@ -202,6 +202,7 @@
remindTime
:
[],
followupForm
:
[],
hasSelected
:
''
,
isDisabled
:
false
,
};
export
default
{
...
...
@@ -212,7 +213,6 @@
return
{
isSelectCartoon
:
false
,
activeTab
:
null
,
setTimeNodeList
:
[],
currentFormRef
:
1
,
showSetBtn
:
true
,
timeForm
:
_
.
cloneDeep
(
timeFormInit
),
...
...
@@ -293,31 +293,50 @@
},
}
},
props
:
{},
computed
:
{
...
mapState
(
'planManage'
,{
setTimeNodeList
:
state
=>
state
.
setTimeNodeList
,
}),
setTimeNodeList1
:
function
(){
return
this
.
sortKey
(
this
.
setTimeNodeList
,
'followupTime'
)
}
},
followupMarkOne
()
{
return
this
.
setTimeNodeList1
[
0
].
followupMark
;
},
},
created
()
{
//初始化一个随访时间节点
if
(
this
.
setTimeNodeList
.
length
===
0
){
this
.
activeTab
=
'setNewRef'
;
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
this
.
activeTab
=
'setNewRef'
;
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
if
(
this
.
setTimeNodeList
.
length
>
0
)
{
this
.
timeForm
.
isDisabled
=
true
;
this
.
timeForm
.
followupMark
=
this
.
setTimeNodeList
[
0
].
followupMark
;
}
},
watch
:
{},
methods
:
{
getNowTime
()
{
const
date
=
new
Date
();
const
year
=
date
.
getFullYear
();
const
month
=
date
.
getMonth
()
+
1
;
const
day
=
date
.
getDate
();
const
hour
=
date
.
getHours
();
const
minute
=
date
.
getMinutes
();
const
second
=
date
.
getSeconds
();
let
formName
=
`form
${
year
}${
month
}${
day
}${
hour
}${
minute
}${
second
}
`
;
return
formName
;
watch
:
{
timeForm
(
newVal
,
oldVal
)
{
if
(
this
.
setTimeNodeList
.
length
>
0
)
{
this
.
timeForm
.
isDisabled
=
true
;
this
.
timeForm
.
followupMark
=
this
.
setTimeNodeList
[
0
].
followupMark
;
}
},
setTimeNodeList1
(
newVal
,
oldVal
)
{
this
.
setTimeNodeList1
.
map
(
item
=>
{
item
.
isDisabled
=
true
;
item
.
followupMark
=
this
.
setTimeNodeList1
[
0
].
followupMark
});
this
.
setTimeNodeList1
[
0
].
isDisabled
=
false
;
},
followupMarkOne
(
newVal
,
oldVal
){
if
(
newVal
!=
oldVal
){
this
.
setTimeNodeList1
.
map
(
item
=>
{
item
.
followupMark
=
this
.
setTimeNodeList1
[
0
].
followupMark
});
}
}
},
methods
:
{
addNewNode
(
formName
)
{
if
(
this
.
activeTab
!==
'setNewRef'
)
{
this
.
activeTab
=
'setNewRef'
;
...
...
@@ -328,9 +347,9 @@
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
setTimeNodeList
.
push
(
this
.
timeForm
);
// this.store.commit('SET_TIME_NODE_LIST',this.setTimeNodeList)
this
.
timeForm
=
_
.
cloneDeep
(
timeFormInit
);
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
//新增一个form
this
.
timeForm
.
isDisabled
=
true
;
//新增一个form
}
else
{
return
;
}
...
...
@@ -358,16 +377,28 @@
this
.
setTimeNodeList
.
splice
(
index
,
1
)
this
.
activeTab
=
0
;
if
(
this
.
setTimeNodeList
.
length
==
0
)
{
//新增一个form
this
.
activeTab
=
'setNewRef'
;
this
.
showSetBtn
=
true
;
this
.
timeForm
=
_
.
cloneDeep
(
timeFormInit
);
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
//新增一个form
this
.
timeForm
.
formRef
=
this
.
getNowTime
();
}
},
deleteAddNode
()
{
this
.
showSetBtn
=
false
;
this
.
activeTab
=
0
;
},
getNowTime
()
{
const
date
=
new
Date
();
const
year
=
date
.
getFullYear
();
const
month
=
date
.
getMonth
()
+
1
;
const
day
=
date
.
getDate
();
const
hour
=
date
.
getHours
();
const
minute
=
date
.
getMinutes
();
const
second
=
date
.
getSeconds
();
let
formName
=
`form
${
year
}${
month
}${
day
}${
hour
}${
minute
}${
second
}
`
;
return
formName
;
},
sortKey
(
array
,
key
)
{
return
array
.
sort
(
function
(
a
,
b
){
var
x
=
a
[
key
];
...
...
src/views/followup/plan-manage/new-plan.vue
浏览文件 @
efef4073
...
...
@@ -22,6 +22,7 @@
<el-button
type=
"primary"
size=
"small"
@
click=
"saveEdit"
>
保 存
</el-button>
</div>
</div>
<div
class=
"edit-plan-content"
v-if=
"activeTab === 'first'"
>
<el-form
ref=
"baseInfo"
:model=
"baseInfo"
:rules=
"rules"
label-suffix=
":"
label-width=
"140px"
:inline-message=
"true"
size=
"small"
>
<el-form-item
label=
"随访计划名称"
prop=
"name"
>
...
...
@@ -76,9 +77,8 @@
</div>
<div
class=
"edit-plan-content"
v-if=
"activeTab === 'second'"
>
<set-time-node></set-time-node>
<set-time-node
ref=
"getTimeNodeList"
></set-time-node>
</div>
</div>
<select-patient
:isShowSelectPatient=
"isShowSelectPatient"
@
closeSelectPatient=
"closeSelectPatient"
@
sureSelectPatient=
"sureSelectPatient(arguments)"
></select-patient>
...
...
@@ -92,7 +92,7 @@
import
HasSelectedPatient
from
'@/views/followup/plan-manage/dialog/has-selected-patient'
;
import
SetTimeNode
from
'@/views/followup/plan-manage/dialog/set-time-node'
;
//
import { mapState, mapActions } from 'vuex'
import
{
mapState
,
mapActions
}
from
'vuex'
export
default
{
name
:
"addNewPlan"
,
components
:
{
...
...
@@ -152,19 +152,15 @@
}
},
created
()
{
},
mounted
()
{
// this.getResidentList({
// planId: this.$route.query.planId
// });
// this.getGroupList(); //获取分组列表
//清理store中存的数据setTimeNodeList
},
computed
:
{
// ...mapState('planManage',{
// residentList: state => state.residentList,
// groupList: state => state.groupList
// })
...
mapState
(
'planManage'
,{
setTimeNodeList
:
state
=>
state
.
setTimeNodeList
,
})
},
methods
:
{
// ...mapActions('planManage', ['getResidentList', 'getGroupList']),
...
...
@@ -204,28 +200,35 @@
},
nextClick
(
formName
)
{
//为方便调试,不做校验
this
.
activeTab
=
'second'
;
//
this.activeTab = 'second';
//用作校验
//
if(!this.baseInfo.hasSelectedNum) {
//
this.noChoice = true
//
return;
//
}else {
//
this.noChoice = false
//
}
//
this.$refs[formName].validate((valid) => {
//
if (valid) {
//
// this.$refs['statusForm'].resetFields();
//
this.activeTab = 'second';
//
} else {
//
return false;
//
}
//
});
if
(
!
this
.
baseInfo
.
hasSelectedNum
)
{
this
.
noChoice
=
true
return
;
}
else
{
this
.
noChoice
=
false
}
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
// this.$refs['statusForm'].resetFields();
this
.
activeTab
=
'second'
;
}
else
{
return
false
;
}
});
},
preClick
()
{
this
.
activeTab
=
'first'
;
},
saveEdit
()
{
console
.
log
(
'保存'
)
console
.
log
(
'保存setTimeNodeList1'
,
this
.
$refs
.
getTimeNodeList
.
setTimeNodeList1
)
console
.
log
(
'保存timeForm'
,
this
.
$refs
.
getTimeNodeList
.
timeForm
)
// 各种校验通过后,提交编辑内容,toast提示
this
.
$notify
.
success
({
title
:
''
,
message
:
'创建成功'
,
showClose
:
false
});
},
},
watch
:
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录