Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
1cdca983
提交
1cdca983
编写于
5月 23, 2019
作者:
yi.li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
地区回显问题
上级
a44787b2
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
307 行增加
和
276 行删除
+307
-276
edit-information.vue
...atients/mypatients-manage/components/edit-information.vue
+307
-276
未找到文件。
src/views/patients/mypatients-manage/components/edit-information.vue
浏览文件 @
1cdca983
...
@@ -32,7 +32,9 @@
...
@@ -32,7 +32,9 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"24"
style=
"text-align: center;margin-top:15px;"
v-if=
"!patientId"
>
<el-button
plain
size=
"small"
@
click=
"toggleClick"
>
{{
tipsText
}}
</el-button></el-col>
</el-row>
</el-row>
<div
v-show=
"isShowAll || patientId"
>
<div
class=
"has-header"
>
数据记录
</div>
<div
class=
"has-header"
>
数据记录
</div>
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
...
@@ -226,6 +228,7 @@
...
@@ -226,6 +228,7 @@
<
/el-form-item
>
<
/el-form-item
>
<
/el-col
>
<
/el-col
>
<
/el-row
>
<
/el-row
>
<
/div
>
<
/el-form
>
<
/el-form
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
...
@@ -304,22 +307,23 @@
...
@@ -304,22 +307,23 @@
}
,
}
,
hasIdNo
:
false
,
hasIdNo
:
false
,
validStatus
:
false
,
validStatus
:
false
,
rules
:
{
nickname
:
[{
required
:
true
,
message
:
'请输入居民姓名'
,
trigger
:
[
'change'
,
'blur'
]
}
],
mobilePhone
:
[{
required
:
true
,
message
:
'请输入手机号'
,
trigger
:
[
'change'
,
'blur'
]
}
,{
validator
:
checkMobile
,
trigger
:
[
'blur'
,
'change'
]
}
],
idNo
:
[{
required
:
false
,
validator
:
checkCardNum
,
trigger
:
[
'change'
]
}
],
}
,
optionProps
:
{
value
:
"id"
,
label
:
"name"
,
children
:
"children"
}
,
provinceList
:
[],
provinceList
:
[],
provinceLists
:
[],
//省列表
provinceLists
:
[],
//省列表
cityLists
:
[],
//市列表
cityLists
:
[],
//市列表
countyLists
:
[],
//县列表
countyLists
:
[],
//县列表
townLists
:
[],
//乡镇列表
townLists
:
[],
//乡镇列表
optionProps
:
{
value
:
"id"
,
label
:
"name"
,
children
:
"children"
}
,
tipsText
:
'展开录入完整信息'
,
isShowAll
:
false
,
rules
:
{
nickname
:
[{
required
:
true
,
message
:
'请输入居民姓名'
,
trigger
:
[
'change'
,
'blur'
]
}
],
mobilePhone
:
[{
required
:
true
,
message
:
'请输入手机号'
,
trigger
:
[
'change'
,
'blur'
]
}
,{
validator
:
checkMobile
,
trigger
:
[
'blur'
,
'change'
]
}
],
idNo
:
[{
required
:
false
,
validator
:
checkCardNum
,
trigger
:
[
'change'
]
}
],
}
,
}
}
}
,
}
,
props
:
{
props
:
{
...
@@ -328,7 +332,9 @@
...
@@ -328,7 +332,9 @@
patientId
:
String
,
patientId
:
String
,
}
,
}
,
watch
:
{
watch
:
{
patientInfoObj
(
val
){
// const obj = await searchObj(id).then(res => res);
patientInfoObj
:
{
async
handler
(
val
)
{
if
(
this
.
patientId
){
if
(
this
.
patientId
){
this
.
patientInfoForm
=
val
;
this
.
patientInfoForm
=
val
;
this
.
baseInfoEdit
=
this
.
patientInfoForm
.
baseInfoEdit
;
this
.
baseInfoEdit
=
this
.
patientInfoForm
.
baseInfoEdit
;
...
@@ -355,16 +361,26 @@
...
@@ -355,16 +361,26 @@
}
}
//对地区数据做处理
//对地区数据做处理
if
(
this
.
patientInfoForm
.
patientAddress
)
{
if
(
this
.
patientInfoForm
.
patientAddress
)
{
this
.
addressList
[
0
]
=
parseInt
(
this
.
patientInfoForm
.
provinceId
);
let
provinceId
=
this
.
patientInfoForm
.
provinceId
;
this
.
addressList
[
1
]
=
parseInt
(
this
.
patientInfoForm
.
cityId
);
let
cityId
=
this
.
patientInfoForm
.
cityId
;
this
.
addressList
[
2
]
=
parseInt
(
this
.
patientInfoForm
.
countyId
);
let
countyId
=
this
.
patientInfoForm
.
countyId
;
this
.
addressList
[
3
]
=
parseInt
(
this
.
patientInfoForm
.
townId
);
let
townId
=
this
.
patientInfoForm
.
townId
;
// this.addressList = JSON.parse(this.addressList);
await
this
.
getCity
(
provinceId
);
await
this
.
getCounty
(
provinceId
,
cityId
);
await
this
.
getTown
(
provinceId
,
cityId
,
countyId
);
await
setTimeout
(()
=>
{
this
.
addressList
[
0
]
=
parseInt
(
provinceId
);
this
.
addressList
[
1
]
=
parseInt
(
cityId
);
this
.
addressList
[
2
]
=
parseInt
(
countyId
);
this
.
addressList
[
3
]
=
parseInt
(
townId
);
}
,
10
);
this
.
$forceUpdate
();
}
else
{
}
else
{
this
.
addressList
=
[];
this
.
addressList
=
[];
}
}
this
.
$refs
[
'patientInfoForm'
].
clearValidate
();
// this.$refs['patientInfoForm'].clearValidate();
this
.
$forceUpdate
();
}
else
{
}
else
{
// 新增
// 新增
this
.
patientInfoForm
=
{
this
.
patientInfoForm
=
{
...
@@ -395,6 +411,8 @@
...
@@ -395,6 +411,8 @@
}
}
}
}
}
,
}
,
deep
:
true
,
}
,
checkForm
(
val
){
checkForm
(
val
){
if
(
val
){
// 触发校验
if
(
val
){
// 触发校验
this
.
saveInfoData
();
this
.
saveInfoData
();
...
@@ -597,8 +615,8 @@
...
@@ -597,8 +615,8 @@
}
}
this
.
$forceUpdate
();
this
.
$forceUpdate
();
}
,
}
,
getProvinceLists
()
{
async
getProvinceLists
()
{
getProvinceList
({
}
).
then
((
data
)
=>
{
await
getProvinceList
({
}
).
then
((
data
)
=>
{
if
(
data
.
code
==
'000000'
)
{
if
(
data
.
code
==
'000000'
)
{
this
.
provinceLists
=
data
.
data
.
provinceList
;
this
.
provinceLists
=
data
.
data
.
provinceList
;
this
.
provinceLists
.
map
(
item
=>
{
this
.
provinceLists
.
map
(
item
=>
{
...
@@ -607,11 +625,12 @@
...
@@ -607,11 +625,12 @@
this
.
$set
(
item
,
"children"
,
[]);
this
.
$set
(
item
,
"children"
,
[]);
}
);
}
);
this
.
provinceList
=
this
.
provinceLists
;
this
.
provinceList
=
this
.
provinceLists
;
// this.$forceUpdate();
}
}
}
)
}
)
}
,
}
,
getCity
(
provinceId
)
{
async
getCity
(
provinceId
)
{
getCityList
({
provinceId
:
provinceId
}
).
then
((
data
)
=>
{
await
getCityList
({
provinceId
:
provinceId
}
).
then
((
data
)
=>
{
if
(
data
.
code
==
'000000'
)
{
if
(
data
.
code
==
'000000'
)
{
this
.
cityLists
=
data
.
data
.
cityList
;
this
.
cityLists
=
data
.
data
.
cityList
;
this
.
cityLists
.
map
(
item
=>
{
this
.
cityLists
.
map
(
item
=>
{
...
@@ -624,11 +643,12 @@
...
@@ -624,11 +643,12 @@
item
.
children
=
this
.
cityLists
;
item
.
children
=
this
.
cityLists
;
}
}
}
)
}
)
// this.$forceUpdate();
}
}
}
)
}
)
}
,
}
,
getCounty
(
provinceId
,
cityId
)
{
async
getCounty
(
provinceId
,
cityId
)
{
getCountyList
({
cityId
:
cityId
}
).
then
((
data
)
=>
{
await
getCountyList
({
cityId
:
cityId
}
).
then
((
data
)
=>
{
if
(
data
.
code
==
'000000'
)
{
if
(
data
.
code
==
'000000'
)
{
this
.
countyLists
=
data
.
data
.
countyList
;
this
.
countyLists
=
data
.
data
.
countyList
;
this
.
countyLists
.
map
(
item
=>
{
this
.
countyLists
.
map
(
item
=>
{
...
@@ -643,11 +663,12 @@
...
@@ -643,11 +663,12 @@
}
)
}
)
}
}
}
)
}
)
// this.$forceUpdate();
}
}
}
)
}
)
}
,
}
,
getTown
(
provinceId
,
cityId
,
countyId
)
{
async
getTown
(
provinceId
,
cityId
,
countyId
)
{
getTownList
({
countyId
:
countyId
}
).
then
((
data
)
=>
{
await
getTownList
({
countyId
:
countyId
}
).
then
((
data
)
=>
{
if
(
data
.
code
==
'000000'
)
{
if
(
data
.
code
==
'000000'
)
{
this
.
townLists
=
data
.
data
.
townList
;
this
.
townLists
=
data
.
data
.
townList
;
this
.
townLists
.
map
(
item
=>
{
this
.
townLists
.
map
(
item
=>
{
...
@@ -667,8 +688,18 @@
...
@@ -667,8 +688,18 @@
}
}
}
)
}
)
}
}
// this.$forceUpdate();
}
)
}
)
}
,
}
,
toggleClick
()
{
if
(
this
.
isShowAll
)
{
this
.
tipsText
=
'展开录入完整信息'
;
this
.
isShowAll
=
false
;
}
else
{
this
.
tipsText
=
'收起录入完整信息'
;
this
.
isShowAll
=
true
;
}
}
}
,
}
,
filters
:
{
filters
:
{
emptyFilter
:
function
(
value
)
{
emptyFilter
:
function
(
value
)
{
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录