Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-insurance
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.frontend
pica-insurance
提交
88008fe8
提交
88008fe8
编写于
2月 17, 2023
作者:
张敬贤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
根据geolocation信息获取距离最近的机构详情
上级
bfca45d6
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
101 行增加
和
17 行删除
+101
-17
appoint.js
src/api/appoint.js
+8
-0
index.vue
src/components/pickArea/index.vue
+17
-9
index.js
src/router/index.js
+1
-1
index.vue
src/views/appoint/index.vue
+28
-7
insuranceQuestionResult.vue
...ews/insurance-question-result/insuranceQuestionResult.vue
+47
-0
未找到文件。
src/api/appoint.js
浏览文件 @
88008fe8
...
...
@@ -38,3 +38,11 @@ export const getDetailByYunOrderNo = (yunOrderNo) => {
withCredentials
:
true
,
});
};
export
const
getHospitalList
=
(
params
)
=>
{
return
request
({
method
:
'GET'
,
params
,
url
:
'/tis/insurance/hospitalList'
,
withCredentials
:
true
,
});
};
src/components/pickArea/index.vue
浏览文件 @
88008fe8
...
...
@@ -70,14 +70,20 @@ export default {
locationAreaCode
:{
async
handler
(
nv
,
ov
)
{
console
.
log
(
'locationAreaCode'
,
nv
,
ov
);
this
.
provinceList
=
await
this
.
getProvinceList
();
this
.
cityList
=
await
this
.
getCityList
(
nv
[
0
]);
this
.
countyList
=
await
this
.
getCountyList
(
nv
[
1
]);
const
provinceIndex
=
this
.
provinceList
.
findIndex
(
ele
=>
ele
.
id
===
nv
[
0
]);
const
cityIndex
=
this
.
cityList
.
findIndex
(
ele
=>
ele
.
id
===
nv
[
1
]);
const
countyIndex
=
this
.
countyList
.
findIndex
(
ele
=>
ele
.
id
===
nv
[
2
]);
this
.
columns
=
[{
values
:
this
.
provinceList
,
defaultIndex
:
provinceIndex
},
{
values
:
this
.
cityList
,
defaultIndex
:
cityIndex
},
{
values
:
this
.
countyList
,
defaultIndex
:
countyIndex
}];
console
.
log
(
'locationAreaCode'
,
this
.
$refs
.
picker
);
if
(
nv
)
{
this
.
provinceList
=
await
this
.
getProvinceList
();
this
.
cityList
=
await
this
.
getCityList
(
nv
[
0
]);
this
.
countyList
=
await
this
.
getCountyList
(
nv
[
1
]);
const
provinceIndex
=
this
.
provinceList
.
findIndex
(
ele
=>
ele
.
id
===
nv
[
0
]);
const
cityIndex
=
this
.
cityList
.
findIndex
(
ele
=>
ele
.
id
===
nv
[
1
]);
const
countyIndex
=
this
.
countyList
.
findIndex
(
ele
=>
ele
.
id
===
nv
[
2
]);
this
.
columns
=
[{
values
:
this
.
provinceList
,
defaultIndex
:
provinceIndex
},
{
values
:
this
.
cityList
,
defaultIndex
:
cityIndex
},
{
values
:
this
.
countyList
,
defaultIndex
:
countyIndex
}];
console
.
log
(
'locationAreaCode'
,
this
.
provinceList
,
provinceIndex
);
const
data
=
[
this
.
provinceList
[
provinceIndex
],
this
.
cityList
[
cityIndex
],
this
.
countyList
[
countyIndex
]];
this
.
$emit
(
'confirm'
,
data
);
}
else
{
this
.
initData
();
}
},
immediate
:
true
...
...
@@ -85,7 +91,7 @@ export default {
},
created
()
{
this
.
initData
();
},
methods
:
{
// 初始化 省市县信息
...
...
@@ -94,6 +100,8 @@ export default {
this
.
cityList
=
await
this
.
getCityList
(
this
.
provinceList
[
0
].
id
);
this
.
countyList
=
await
this
.
getCountyList
(
this
.
cityList
[
0
].
id
);
this
.
columns
=
[{
values
:
this
.
provinceList
},
{
values
:
this
.
cityList
},
{
values
:
this
.
countyList
}];
const
data
=
[
this
.
provinceList
[
0
],
this
.
cityList
[
0
],
this
.
countyList
[
0
]];
this
.
$emit
(
'confirm'
,
data
);
},
// 获取省列表
getProvinceList
()
{
...
...
src/router/index.js
浏览文件 @
88008fe8
...
...
@@ -23,7 +23,7 @@ const routerConfig = [
{
path
:
'/insuranceQuestionResult'
,
name
:
'insuranceQuestionResult'
,
component
:
()
=>
import
(
'@/views/insurance-question-result/in
dex
.vue'
),
component
:
()
=>
import
(
'@/views/insurance-question-result/in
suranceQuestionResult
.vue'
),
},
{
path
:
'/insuranceQuestionBack'
,
...
...
src/views/appoint/index.vue
浏览文件 @
88008fe8
...
...
@@ -62,6 +62,7 @@
<van-field
label=
"检测地点"
required
disabled
class=
"appoint-form-title"
/>
<van-field
...
...
@@ -179,7 +180,7 @@
</template>
<
script
>
import
{
getDetectionName
,
getOrderInfo
,
appointment
}
from
'@/api/appoint'
;
import
{
getDetectionName
,
getOrderInfo
,
appointment
,
getHospitalList
}
from
'@/api/appoint'
;
import
SelectHospital
from
'@/components/selectHospital/index.vue'
;
import
SelectTime
from
'@/components/selectTime/index.vue'
;
import
PickArea
from
'@/components/pickArea/index.vue'
;
...
...
@@ -227,10 +228,13 @@ export default {
showSelectTime
:
false
,
isSelf
:
false
,
spEquityCode
:
''
,
locationAreaCode
:
[
330
,
330400000000
,
330424000000
],
position
:
{
latitude
:
''
,
longitude
:
''
},
locationAreaCode
:
[],
hospitalId
:
'12746'
,
projectEquityNo
:
'
CX202302091000154321
'
,
projectEquityNo
:
''
,
yunOrderNo
:
''
};
},
...
...
@@ -241,10 +245,11 @@ export default {
},
mounted
()
{
setTimeout
(()
=>
{
this
.
locationAreaCode
=
[
330
,
330400000000
,
330424
000000
];
this
.
locationAreaCode
=
[
120
,
120100000000
,
120102
000000
];
},
3000
);
const
{
yunOrderNo
}
=
this
.
$route
.
query
;
const
{
yunOrderNo
,
projectEquityNo
}
=
this
.
$route
.
query
;
this
.
yunOrderNo
=
yunOrderNo
;
this
.
projectEquityNo
=
projectEquityNo
;
console
.
log
(
'yunOrderNo'
,
yunOrderNo
);
this
.
getDetectionName
(
yunOrderNo
);
this
.
getOrderInfo
(
yunOrderNo
);
...
...
@@ -252,8 +257,10 @@ export default {
},
methods
:
{
choose
()
{},
submit
()
{},
submit
()
{
},
// 高德地图导航只有在线上环境才能使用
initMap
()
{
var
that
=
this
;
AMapLoader
.
load
({
key
:
'd22c1f112c97cb93b8d343b18420b98d'
,
// 申请好的Web端开发者Key,首次调用 load 时必填
version
:
'2.0'
,
// 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
...
...
@@ -274,11 +281,25 @@ export default {
});
geolocation
.
getCurrentPosition
((
status
,
result
)
=>
{
console
.
log
(
'geolocation,'
,
status
,
result
);
that
.
position
.
latitude
=
result
.
position
.
lat
;
that
.
position
.
longitude
=
result
.
position
.
lng
;
const
data
=
{
projectEquityNo
:
that
.
projectEquityNo
,
latitude
:
that
.
position
.
latitude
,
longitude
:
that
.
position
.
longitude
,
};
that
.
getHospitalList
(
data
);
});
});
});
},
// 根据坐标获取最近的机构id
getHospitalList
(
data
)
{
getHospitalList
(
data
).
then
(
res
=>
{
console
.
log
(
res
);
});
},
// 目前是配置一个检测信息,可能会拓展,所以返回的是一个list
getDetectionName
(
yunOrderNo
)
{
getDetectionName
(
yunOrderNo
).
then
(
res
=>
{
...
...
src/views/insurance-question-result/insuranceQuestionResult.vue
浏览文件 @
88008fe8
...
...
@@ -44,6 +44,7 @@
<div
v-if=
"!needDetect"
class=
"custom-style"
@
click=
"toAppoint"
>
{{
statusMap
(
detailInfo
.
status
)
||
'免费预约检测'
}}
...
...
@@ -55,6 +56,7 @@
</
template
>
<
script
>
import
{
getButtonStatus
,
getJumpPageStatus
}
from
'@/api/question'
;
export
default
{
data
()
{
return
{
...
...
@@ -62,11 +64,30 @@ export default {
result
:
{},
detailInfo
:
{},
isLoading
:
true
,
projectEquityNo
:
'CX202302091000154321'
,
orderNo
:
'12746'
,
yunOrderNo
:
''
,
// 无问卷-0001 有问卷未填写-0101 已填写问卷未出结果-0102 已出结果无需领用-0401 已出结果未预约-0201 已预约未采样-0301 已预约已采样-0302
routerMap
:
{
'0001'
:
null
,
'0101'
:
null
,
'0102'
:
null
,
'0401'
:
null
,
'0201'
:
'/appoint'
,
'0301'
:
null
,
'0302'
:
null
,
},
status
:
null
,
query
:
{},
buttonStatus
:
false
};
},
mounted
()
{
console
.
log
(
11223
);
const
{
query
}
=
this
.
$route
;
this
.
query
=
query
;
this
.
getJumpPageStatus
();
},
methods
:
{
statusMap
(
status
)
{
...
...
@@ -80,6 +101,32 @@ export default {
};
return
m
[
status
];
},
getJumpPageStatus
()
{
getJumpPageStatus
(
this
.
orderNo
,
this
.
projectEquityNo
).
then
(
res
=>
{
// console.log('res', getJumpPageStatus);
if
(
res
.
code
==
'000000'
)
{
this
.
yunOrderNo
=
res
.
data
.
yunOrderNo
;
this
.
query
.
yunOrderNo
=
res
.
data
.
yunOrderNo
;
this
.
status
=
res
.
data
.
status
;
this
.
getButtonStatus
(
res
.
data
.
yunOrderNo
);
}
});
},
toAppoint
()
{
if
(
this
.
buttonStatus
)
{
const
{
projectEquityNo
,
orderNo
,
yunOrderNo
}
=
this
;
this
.
$router
.
push
({
path
:
this
.
routerMap
[
this
.
status
],
query
:
{
projectEquityNo
,
orderNo
,
yunOrderNo
},
});
}
},
getButtonStatus
(
yunOrderNo
)
{
getButtonStatus
(
yunOrderNo
).
then
(
res
=>
{
console
.
log
(
res
);
this
.
buttonStatus
=
res
.
data
.
buttonStatus
;
});
}
},
};
</
script
>
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录