Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-learning-report
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-learning-report
提交
0f4c9b10
提交
0f4c9b10
编写于
3月 18, 2020
作者:
guangjun.yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
解决前面四层
上级
9e1a8512
变更
10
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
2649 行增加
和
85 行删除
+2649
-85
map-icon.png
assets/images/map-icon.png
+0
-0
common-area-select copy.vue
components/common/common-area-select copy.vue
+94
-0
common-area-select.vue
components/common/common-area-select.vue
+24
-9
pica-area copy 2.vue
components/common/pica-area copy 2.vue
+635
-0
pica-area copy.vue
components/common/pica-area copy.vue
+614
-0
pica-area.vue
components/common/pica-area.vue
+130
-35
pica-org copy.vue
components/common/pica-org copy.vue
+273
-0
index copy.vue
pages/index copy.vue
+754
-0
index.vue
pages/index.vue
+114
-40
index.js
store/index.js
+11
-1
未找到文件。
assets/images/map-icon.png
0 → 100755
浏览文件 @
0f4c9b10
305 字节
components/common/common-area-select copy.vue
0 → 100644
浏览文件 @
0f4c9b10
<!-- 区域与机构选择(表头)组件 -->
<
template
>
<ul
class=
"common-area-select"
>
<li
class=
"center"
@
click=
"areaClick"
>
{{
areaName
}}
<img
v-show=
"!showArea"
src=
"../../assets/images/arr-down.png"
/><img
v-show=
"showArea"
src=
"../../assets/images/arr-up.png"
/>
</li>
<li
class=
"center"
:class=
"
{'gray': isNotVisible}" @click="orgClick">
{{
orgName
}}
<img
v-show=
"isNotVisible"
src=
"../../assets/images/arr-down-white.png"
/><img
v-show=
"!showOrg && !isNotVisible"
src=
"../../assets/images/arr-down.png"
/><img
v-show=
"showOrg && !isNotVisible"
src=
"../../assets/images/arr-up.png"
/>
</li>
</ul>
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
export
default
{
props
:
{
areaName
:
{
type
:
String
,
default
:
"全部"
},
orgName
:
{
type
:
String
,
default
:
"全部机构"
},
showArea
:
{
type
:
Boolean
,
default
:
false
,
},
showOrg
:
{
type
:
Boolean
,
default
:
false
}
},
computed
:
{
...
mapGetters
({
orgList
:
'orgList'
,
areaDegree
:
'areaDegree'
}),
isNotVisible
()
{
if
((
this
.
orgList
&&
this
.
orgList
.
length
==
0
)
||
this
.
areaDegree
==
0
||
this
.
areaDegree
==
1
||
this
.
areaDegree
==
2
)
{
return
true
;
}
else
{
return
false
;
}
}
},
methods
:
{
areaClick
()
{
this
.
$emit
(
"areaClick"
);
},
orgClick
()
{
this
.
$emit
(
"orgClick"
);
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.common-area-select {
&.fixed {
position: fixed;
top: 69px;
z-index: 10000000;
}
// padding-top: 50px;
display: flex;
width: 100%;
height: 35px;
line-height: 35px;
margin: 2px 0 0px;
flex-direction: row nowrap;
align-content: center;
align-items: center;
text-align: center;
justify-content: center; /* 水平居中 */
.center {
flex: 1;
font-size: 15px;
font-weight: 400;
color: #676869;
&.gray {
color: #C7C8C9;
}
}
img {
// padding-top: 10px;
position: relative;
left: 3px;
top: 1px;
width: 12px;
height: 12px;
}
}
</
style
>
components/common/common-area-select.vue
浏览文件 @
0f4c9b10
...
...
@@ -2,11 +2,11 @@
<
template
>
<ul
class=
"common-area-select"
>
<li
class=
"center"
@
click=
"areaClick"
>
{{
areaName
}}
<img
v-show=
"!showArea"
src=
"../../assets/images/arr-down.png"
/><img
v-show=
"showArea"
src=
"../../assets/images/arr-up.png"
/>
<span><img
class=
"map"
src=
"../../assets/images/map-icon.png"
/>
{{
areaName
}}
</span>
<img
v-show=
"!showArea"
src=
"../../assets/images/arr-down.png"
/><img
v-show=
"showArea"
src=
"../../assets/images/arr-up.png"
/>
</li>
<li
class=
"center"
:class=
"
{'gray': isNotVisible}" @click="orgClick">
<
!--
<
li
class=
"center"
:class=
"
{'gray': isNotVisible}" @click="orgClick">
{{
orgName
}}
<img
v-show=
"isNotVisible"
src=
"../../assets/images/arr-down-white.png"
/><img
v-show=
"!showOrg && !isNotVisible"
src=
"../../assets/images/arr-down.png"
/><img
v-show=
"showOrg && !isNotVisible"
src=
"../../assets/images/arr-up.png"
/>
</li>
</li>
-->
</ul>
</
template
>
<
script
>
...
...
@@ -48,9 +48,9 @@ export default {
areaClick
()
{
this
.
$emit
(
"areaClick"
);
},
orgClick
()
{
this
.
$emit
(
"orgClick"
);
}
//
orgClick() {
//
this.$emit("orgClick");
//
}
}
};
</
script
>
...
...
@@ -65,8 +65,8 @@ export default {
// padding-top: 50px;
display: flex;
width: 100%;
height:
35
px;
line-height:
35
px;
height:
44
px;
line-height:
44
px;
margin: 2px 0 0px;
flex-direction: row nowrap;
align-content: center;
...
...
@@ -74,13 +74,28 @@ export default {
text-align: center;
justify-content: center; /* 水平居中 */
.center {
flex: 1;
display: flex;
flex-direction: row;
justify-content: space-between;
align-content: center;
align-items: center;
padding: 0 15px;
width: 100%;
// flex: 1;
font-size: 15px;
font-weight: 400;
color: #676869;
background: #F8F9FA;
&.gray {
color: #C7C8C9;
}
.map {
position: relative;
top: 2.5px;
margin-right: 7px;
width: 16px;
height: 16px;
}
}
img {
// padding-top: 10px;
...
...
components/common/pica-area copy 2.vue
0 → 100644
浏览文件 @
0f4c9b10
此差异已折叠。
点击以展开。
components/common/pica-area copy.vue
0 → 100644
浏览文件 @
0f4c9b10
此差异已折叠。
点击以展开。
components/common/pica-area.vue
浏览文件 @
0f4c9b10
...
...
@@ -9,6 +9,23 @@
<button
class=
"submit-btn"
@
click=
"confirm"
>
确定
</button>
<!--
<button
:disabled=
"isDisabled"
class=
"submit-btn"
@
click=
"confirm"
>
确定
</button>
-->
</div>
<div
class=
"my-org"
>
<span>
我所在机构
</span>
<ul>
<li
class=
"list"
v-for=
"(provinceItem, index) in areaList.currentOrgList"
:key=
"index"
:class=
"
{ active: provinceItem.selected }"
@click="provinceSelect(provinceItem, index, true)"
>
<span>
{{
provinceItem
.
label
}}
</span>
<span
v-show=
"provinceItem.selected"
>
<img
src=
"../../assets/images/sort-select-icon.png"
/>
</span>
</li>
</ul>
</div>
<div
class=
"address-select"
>
<ul
class=
"show-address-header"
>
<li
:class=
"
{ active: isShowProvince }" class="item" @click="tabAddressClick(1)">
...
...
@@ -107,7 +124,7 @@ import {
getCityList
,
getCountyList
,
getTownList
,
getHospitalsByRegionId
//
getHospitalsByRegionId
}
from
"../../service"
;
export
default
{
...
...
@@ -115,6 +132,7 @@ export default {
data
()
{
return
{
areaList
:
{
currentOrgList
:
[],
provinceList
:
[],
cityList
:
[],
countyList
:
[],
...
...
@@ -142,7 +160,8 @@ export default {
queryParams
:
{
projectId
:
374
,
regionId
:
""
}
},
currentOrgList
:
[]
};
},
props
:
{
...
...
@@ -175,10 +194,30 @@ export default {
this
.
queryParams
.
projectId
=
newVal
;
},
provinceList
(
newVal
)
{
this
.
areaList
.
provinceList
=
newVal
;
this
.
areaList
.
provinceList
[
0
].
selected
=
true
;
this
.
value
.
provinceName
=
this
.
areaList
.
provinceList
[
0
].
label
;
this
.
value
.
areaDegree
=
this
.
areaList
.
provinceList
[
0
].
degree
;
newVal
[
0
].
selected
=
true
;
this
.
value
.
provinceName
=
newVal
[
0
].
label
;
this
.
value
.
areaDegree
=
newVal
[
0
].
degree
;
this
.
value
.
regionId
=
newVal
[
0
].
id
;
this
.
value
.
provinceId
=
newVal
[
0
].
id
;
this
.
queryParams
.
regionId
=
newVal
[
0
].
id
;
this
.
value
.
provinceName
=
newVal
[
0
].
label
;
// this.areaList.provinceList = newVal;
// this.areaList.provinceList[0].selected = true;
// this.value.provinceName = this.areaList.provinceList[0].label;
// this.value.areaDegree = this.areaList.provinceList[0].degree;
if
(
newVal
[
0
].
containHospitalFlag
==
1
)
{
// this.value.provinceName = newVal[1].label;
// this.value.provinceName = '请选择';
this
.
areaList
.
currentOrgList
=
newVal
.
slice
(
0
,
1
);
this
.
areaList
.
provinceList
=
newVal
.
slice
(
1
);
}
else
{
this
.
areaList
.
currentOrgList
=
[];
this
.
areaList
.
provinceList
=
newVal
;
}
// this.value.provinceName = "全部";
}
},
...
...
@@ -190,14 +229,14 @@ export default {
setAreaDegree
:
"setAreaDegree"
}),
// 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
async
getHospitalsByRegionId
(
params
)
{
await
getHospitalsByRegionId
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
setOrgList
(
res
.
data
.
list
||
[]);
}
});
},
//
//
根据区域获取机构列表(一般在是三、四级区域才调用此方法)
//
async getHospitalsByRegionId(params) {
//
await getHospitalsByRegionId(params).then(res => {
//
if (res.code === "000000") {
//
this.setOrgList(res.data.list || []);
//
}
//
});
//
},
// 获取省列表
async
getProvinceData
(
params
)
{
...
...
@@ -274,7 +313,7 @@ export default {
},
// 选择省份的操作
provinceSelect
(
item
,
idx
)
{
provinceSelect
(
item
,
idx
,
isCurrent
)
{
this
.
value
.
regionId
=
item
.
id
;
this
.
value
.
provinceId
=
item
.
id
;
this
.
queryParams
.
regionId
=
item
.
id
;
...
...
@@ -289,25 +328,40 @@ export default {
// 当前选中的样式
this
.
areaList
.
provinceList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
provinceList
[
idx
].
selected
=
true
;
if
(
isCurrent
)
{
this
.
areaList
.
currentOrgList
.
map
(
a
=>
(
a
.
selected
=
true
));
}
else
{
this
.
areaList
.
currentOrgList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
provinceList
[
idx
].
selected
=
true
;
}
// this.areaList.provinceList.map(a => (a.selected = false));
// this.areaList.provinceList[idx].selected = true;
// this.setAreaDegree(item.degree)
this
.
value
.
areaDegree
=
item
.
degree
;
if
(
item
.
degree
==
0
)
{
return
;
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
)
{
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
//控制省市县乡数据展示与隐藏
this
.
isShowProvince
=
false
;
this
.
isShowCounty
=
false
;
this
.
isShowTown
=
false
;
if
(
this
.
rank
>
1
)
{
if
(
this
.
rank
>
1
&&
item
.
degree
!=
5
)
{
this
.
isShowCity
=
true
;
this
.
getCityData
(
this
.
queryParams
);
this
.
isDisabled
=
true
;
this
.
getCityData
(
this
.
queryParams
);
}
else
{
this
.
isShowProvince
=
true
;
this
.
isShowCity
=
false
;
this
.
isDisabled
=
false
;
this
.
areaList
.
cityList
=
[];
this
.
areaList
.
countyList
=
[];
this
.
areaList
.
townList
=
[];
}
},
...
...
@@ -330,19 +384,27 @@ export default {
if
(
item
.
degree
==
0
)
{
return
;
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
)
{
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
// 控制省市县乡数据展示与隐藏
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowTown
=
false
;
if
(
this
.
rank
>
2
)
{
if
(
this
.
rank
>
2
&&
item
.
degree
!=
5
)
{
this
.
isShowCounty
=
true
;
this
.
getCountyData
(
this
.
queryParams
);
this
.
isDisabled
=
true
;
this
.
getCountyData
(
this
.
queryParams
);
}
else
{
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
true
;
this
.
isShowCounty
=
false
;
this
.
isDisabled
=
false
;
this
.
areaList
.
countyList
=
[];
this
.
areaList
.
townList
=
[];
}
},
...
...
@@ -363,19 +425,27 @@ export default {
if
(
item
.
degree
==
0
)
{
return
;
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
)
{
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
// 控制省市县乡数据展示与隐藏
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowCounty
=
false
;
if
(
this
.
rank
>
3
)
{
if
(
this
.
rank
>
3
&&
item
.
degree
!=
5
)
{
this
.
isShowTown
=
true
;
this
.
getTownData
(
this
.
queryParams
);
this
.
isDisabled
=
true
;
this
.
getTownData
(
this
.
queryParams
);
}
else
{
this
.
isShowProvince
=
false
;
this
.
isShowCity
=
false
;
this
.
isShowCounty
=
true
;
this
.
isShowTown
=
false
;
this
.
isDisabled
=
false
;
this
.
areaList
.
townList
=
[];
}
},
...
...
@@ -391,9 +461,12 @@ export default {
if
(
item
.
degree
==
0
)
{
return
;
}
if
(
item
.
degree
==
3
||
item
.
degree
==
4
)
{
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
// 当前选中的样式
this
.
areaList
.
townList
.
map
(
a
=>
(
a
.
selected
=
false
));
this
.
areaList
.
townList
[
idx
].
selected
=
true
;
...
...
@@ -423,6 +496,7 @@ export default {
}
},
confirm
()
{
console
.
log
(
this
.
areaList
);
this
.
$emit
(
"confirm"
,
this
.
value
);
},
cancelSelect
()
{
...
...
@@ -447,7 +521,8 @@ export default {
.address-wrap {
position: absolute;
width: 100%;
height: 293px;
height: 353px;
// height: 293px;
background-color: #ffffff;
box-sizing: border-box;
bottom: 0;
...
...
@@ -610,5 +685,25 @@ export default {
}
}
}
.my-org {
margin: 0 15px 15px;
& > span {
font-size: 12px;
color: #979899;
}
.list {
display: flex;
flex-direction: row;
justify-content: space-between;
margin-top: 4px;
span {
font-size: 15px;
color: #676869;
}
img {
width: 10px;
}
}
}
}
</
style
>
\ No newline at end of file
components/common/pica-org copy.vue
0 → 100644
浏览文件 @
0f4c9b10
<!-- 选择机构组件 -->
<
template
>
<div
class=
"select-wrapper"
@
touchmove
.
prevent
.
stop
>
<div
class=
"mask"
@
click=
"cancel"
@
touchmove
.
prevent
.
stop
>
<div
class=
"address-wrap"
@
click
.
stop
@
touchmove
.
prevent
.
stop
>
<div
class=
"tip-header"
>
<span
class=
"cancel-btn"
@
click=
"cancel"
>
取消
</span>
<h3>
选择机构
</h3>
<span
class=
"submit-btn"
@
click=
"confirm"
>
确定
</span>
</div>
<div
class=
"address-select"
>
<ul
class=
"show-address-header"
>
<li
class=
"item active"
>
请选择
</li>
</ul>
<div
class=
"address-content"
@
touchmove
.
stop
>
<ul
id=
"province"
>
<li
v-for=
"(orgItem, index) in dataList"
:key=
"index"
:class=
"
{ active: orgItem.selected }"
@click="orgSelect(orgItem, index)"
>
<span>
{{
orgItem
.
hospitalName
}}
</span>
<span
v-show=
"orgItem.selected"
>
<img
src=
"../../assets/images/sort-select-icon.png"
/>
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
mapGetters
}
from
"vuex"
;
export
default
{
name
:
"PicaOrg"
,
data
()
{
return
{
dataList
:
[],
};
},
props
:
{
baseUrl
:
{
type
:
String
,
default
:
""
},
rank
:
{
type
:
Number
|
String
,
default
:
4
}
},
computed
:
{
...
mapGetters
({
orgList
:
"orgList"
})
},
watch
:
{
orgList
:
{
handler
(
newList
)
{
this
.
dataList
=
newList
||
[];
this
.
dataList
.
map
(
a
=>
{
a
.
selected
=
false
;
});
},
deep
:
true
}
},
created
()
{
},
methods
:
{
orgSelect
(
item
,
idx
)
{
this
.
dataList
[
idx
].
selected
=
!
this
.
dataList
[
idx
].
selected
;
this
.
$forceUpdate
()
},
confirm
()
{
this
.
$emit
(
"confirm"
,
this
.
dataList
);
},
cancel
()
{
this
.
$emit
(
"cancel"
,
false
);
}
}
};
</
script
>
<
style
lang=
"less"
scoped
>
.select-wrapper {
font-family: PingFangSC-Regular;
.mask {
position: fixed;
z-index: 1000000005;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(55, 56, 57, 0.6);
}
.address-wrap {
position: absolute;
width: 100%;
height: 293px;
background-color: #ffffff;
box-sizing: border-box;
bottom: 0;
left: 0;
right: 0;
z-index: 1000000006;
.tip-header {
position: relative;
height: 58px;
line-height: 58px;
width: 100%;
font-size: 17px;
display: flex;
justify-content: space-between;
padding: 0 15px;
box-sizing: border-box;
.cancel-btn {
color: #999;
}
h3 {
font-size: 18px;
color: #373839;
font-weight: 400;
}
.submit-btn {
font-size: 17px;
outline: none;
border: 1px solid transparent;
background-color: transparent;
color: #449284 !important;
&:disabled {
color: #c7c8c9;
}
}
}
.address-select {
width: 100%;
height: auto;
/*height: 196px;*/
box-sizing: border-box;
.show-address-header {
width: 100%;
display: -webkit-box;
display: -webkit-flex;
display: flex;
position: relative;
padding-bottom: 4px;
&:after {
content: " ";
position: absolute;
left: 0;
bottom: 0;
right: 0;
height: 1px;
border-bottom: 1px solid #f0f1f2;
color: #f0f1f2;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
transform: scaleY(0.5);
}
.item {
display: inline-block;
font-size: 15px;
line-height: 35px;
height: 35px;
padding: 0 15px;
box-sizing: border-box;
max-width: 25%;
text-align: left;
color: #676869;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
position: relative;
&:last-of-type {
padding-right: 15px;
}
&.active {
color: #373839;
font-family: PingFangSC-Medium;
/*font-weight:500;*/
}
&.active:after {
content: " ";
position: absolute;
left: 50%;
bottom: 0;
right: 0;
width: 10px;
height: 3px;
/*border-radius: 2px;*/
border-radius: 30%;
text-align: center;
background-color: #449284;
transform: translateX(-50%);
}
}
}
.address-content {
position: relative;
width: 100%;
height: 100%;
/*height: 196px;*/
overflow: hidden;
box-sizing: border-box;
ul {
width: 100%;
height: 196px;
overflow-y: auto;
box-sizing: border-box;
padding: 10px 13px;
-webkit-overflow-scrolling: touch;
position: static;
-webkit-transform: translateZ(0px);
li {
height: 35px;
line-height: 35px;
font-size: 15px;
width: 100%;
overflow-x: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #676869;
cursor: pointer;
box-sizing: border-box;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
justify-content: space-between;
-webkit-justify-content: space-between;
&.active {
color: #449284;
}
img {
width: 10px;
height: 10px;
}
}
}
}
}
}
}
</
style
>
\ No newline at end of file
pages/index copy.vue
0 → 100644
浏览文件 @
0f4c9b10
此差异已折叠。
点击以展开。
pages/index.vue
浏览文件 @
0f4c9b10
<
template
>
<section
class=
"container"
>
<CommonHeader
:title=
"projectInfo.projectName | shortName"
></CommonHeader>
<CommonAreaSelect
v-show=
"!isScroll"
@
areaClick=
"areaTabClick"
@
orgClick=
"orgTabClick"
:areaName=
"areaName"
:orgName=
"orgName"
:showArea=
"isShowArea"
:showOrg=
"isShowOrg"
>
<CommonAreaSelect
v-show=
"!isScroll"
@
areaClick=
"areaTabClick"
:areaName=
"areaName"
:orgName=
"orgName"
:showArea=
"isShowArea"
:showOrg=
"isShowOrg"
>
</CommonAreaSelect>
<!--
<CommonAreaSelect
v-show=
"!isScroll"
@
areaClick=
"areaTabClick"
@
orgClick=
"orgTabClick"
:areaName=
"areaName"
:orgName=
"orgName"
:showArea=
"isShowArea"
:showOrg=
"isShowOrg"
>
</CommonAreaSelect>
-->
<CommonTaps
:needFixed=
"isScroll"
:projectInfo=
"projectInfo"
@
tabClicked=
"tabClicked"
></CommonTaps>
<!-- 总体概况 -->
<div
v-show=
"isScroll"
class=
"pd-top-60"
></div>
...
...
@@ -83,7 +85,7 @@
</article>
<PicaArea
v-show=
"isShowArea"
@
confirm=
"areaConfirm"
@
cancel=
"areaCancel"
:projectId=
"projectId"
:token=
"token"
></PicaArea>
<
PicaOrg
v-show=
"isShowOrg"
@
confirm=
"orgConfirm"
@
cancel=
"orgCancel"
></PicaOrg
>
<
!--
<PicaOrg
v-show=
"isShowOrg"
@
confirm=
"orgConfirm"
@
cancel=
"orgCancel"
></PicaOrg>
--
>
<CommonLoading
v-show=
"false"
></CommonLoading>
<PopTips
:tipsContent=
"tipsContent"
@
clickTips=
"clickTips"
v-show=
"isShowTips"
></PopTips>
<Loading
v-show=
"isShowLoading"
></Loading>
...
...
@@ -109,7 +111,7 @@ import {
getProjectInfo
,
getGeneralExamList
,
getStudyEffect
,
getHospitalsByRegionId
//
getHospitalsByRegionId
}
from
"@/service"
;
import
CommonHeader
from
"@/components/common/common-header"
;
...
...
@@ -185,7 +187,7 @@ export default {
},
data
()
{
return
{
isShowLoading
:
tru
e
,
isShowLoading
:
fals
e
,
isScroll
:
false
,
isShowArea
:
false
,
isShowOrg
:
false
,
...
...
@@ -344,7 +346,7 @@ export default {
methods
:
{
handleScroll
()
{
var
scrollTop
=
window
.
scrollY
;
if
(
scrollTop
>
4
0
)
{
if
(
scrollTop
>
4
9
)
{
this
.
isScroll
=
true
;
}
else
{
this
.
isScroll
=
false
;
...
...
@@ -378,7 +380,15 @@ export default {
this
.
projectInfo
=
res
.
data
;
getProvinceList
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
let
regionId
=
(
res
.
data
&&
res
.
data
.
list
[
0
]
&&
res
.
data
.
list
[
0
].
id
)
||
''
;
// 如果直接是5级,则将其进行拆分(区域ID与机构ID)
let
regionId
=
''
,
orgId
=
''
,
firstData
=
res
.
data
.
list
[
0
];
if
(
firstData
.
degree
==
5
)
{
let
regionIdAndOrgId
=
firstData
.
id
,
lindex
=
regionIdAndOrgId
.
lastIndexOf
(
'_'
);
regionId
=
regionIdAndOrgId
.
slice
(
0
,
lindex
);
orgId
=
regionIdAndOrgId
.
slice
(
lindex
+
1
);
}
else
{
regionId
=
firstData
.
id
||
''
;
}
this
.
queryGDParams
.
regionId
=
regionId
;
this
.
CNTParams
.
regionId
=
regionId
;
let
proviceList
=
(
res
.
data
&&
res
.
data
.
list
)
||
[];
...
...
@@ -386,27 +396,45 @@ export default {
this
.
areaName
=
(
proviceList
.
length
&&
proviceList
[
0
].
label
)
||
'全部'
;
this
.
queryParams
.
projectId
=
this
.
projectId
;
this
.
queryParams
.
regionId
=
regionId
;
this
.
getHospitalsByRegionId
(
this
.
queryParams
);
// this.getHospitalsByRegionId(this.queryParams);
// 数据包含本人所在机构,则将数据进行拆分
// if(res.data.containHospitalFlag == 1) {
// this.setCurrentOrgList(proviceList.slice(0, 1));
// this.setProvinceList(proviceList.slice(1));
// } else {
// this.setCurrentOrgList([]);
// this.setProvinceList(proviceList);
// }
if
(
proviceList
.
length
&&
res
.
data
.
containHospitalFlag
==
1
)
{
proviceList
[
0
].
containHospitalFlag
=
1
;
}
this
.
setProvinceList
(
proviceList
);
this
.
setAreaDegree
(
degree
);
// if( degree == 3 || degree == 4) {
// this.isShowOrg = true;
// }
this
.
getHospitalsCNT
(
this
.
CNTParams
);
if
(
firstData
.
degree
==
5
)
{
this
.
isSingleOrg
=
true
;
this
.
queryGDParams
.
hospitalIdList
=
[];
this
.
queryGDParams
.
hospitalIdList
.
push
(
orgId
);
this
.
getGeneralPersonal
(
this
.
queryGDParams
);
}
else
{
this
.
getHospitalsCNT
(
this
.
CNTParams
);
}
}
});
}
});
},
// 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
async
getHospitalsByRegionId
(
params
)
{
await
getHospitalsByRegionId
(
params
).
then
(
res
=>
{
if
(
res
.
code
===
"000000"
)
{
this
.
setOrgList
(
res
.
data
.
list
||
[]);
}
});
},
//
//
根据区域获取机构列表(一般在是三、四级区域才调用此方法)
//
async getHospitalsByRegionId(params) {
//
await getHospitalsByRegionId(params).then(res => {
//
if (res.code === "000000") {
//
this.setOrgList(res.data.list || []);
//
}
//
});
//
},
// 异步延迟调用其它Tabs接口(除了数据概述)
otherInterface
()
{
...
...
@@ -559,15 +587,21 @@ export default {
// 确认选择区域
areaConfirm
(
selData
)
{
console
.
log
(
selData
);
if
(
selData
.
townName
||
selData
.
countyName
||
selData
.
cityName
||
selData
.
provinceName
)
{
this
.
areaName
=
this
.
shortName
(
selData
.
townName
||
selData
.
countyName
||
selData
.
cityName
||
selData
.
provinceName
,
18
)
}
if
(
selData
.
areaDegree
==
5
)
{
this
.
orgConfirmNew
(
selData
);
return
;
}
this
.
clearParams
();
this
.
queryGDParams
.
regionId
=
selData
.
regionId
;
this
.
CNTParams
.
regionId
=
selData
.
regionId
;
this
.
getHospitalsCNT
(
this
.
CNTParams
);
this
.
isShowArea
=
false
;
this
.
setAreaDegree
(
selData
.
areaDegree
);
if
(
selData
.
townName
||
selData
.
countyName
||
selData
.
cityName
||
selData
.
provinceName
)
{
this
.
areaName
=
this
.
shortName
(
selData
.
townName
||
selData
.
countyName
||
selData
.
cityName
||
selData
.
provinceName
,
6
)
}
},
// 取消选择区域
...
...
@@ -575,8 +609,47 @@ export default {
this
.
isShowArea
=
false
;
},
// 确认选择机构
orgConfirmNew
(
selData
)
{
console
.
log
(
selData
);
let
regionIdAndOrgId
=
selData
.
regionId
,
lindex
=
regionIdAndOrgId
.
lastIndexOf
(
'_'
);
let
regionId
=
regionIdAndOrgId
.
slice
(
0
,
lindex
),
orgId
=
regionIdAndOrgId
.
slice
(
lindex
+
1
);
let
hospitalIds
=
[
orgId
];
this
.
isShowArea
=
false
;
// let hospitalNames = [];
// let orgName = '';
// selData.forEach(org => {
// if (org.selected) {
// hospitalIds.push(org.hospitalId);
// hospitalNames.push(org.hospitalName);
// }
// });
// 如果没有选择机构,则重新获取所有数据
// this.isShowOrg = false;
// this.orgName = this.shortName(hospitalNames[0] || '全部机构', 6);
this
.
queryGDParams
.
hospitalIdList
=
hospitalIds
;
if
(
hospitalIds
.
length
==
0
)
{
this
.
getHospitalsCNT
(
this
.
CNTParams
);
return
;
}
if
(
hospitalIds
.
length
===
1
)
{
// this.hospitalCnt = 1
this
.
orgDoctorTabData
.
certUserList
=
[];
this
.
orgDoctorTabData
.
noCertUserList
=
[];
this
.
orgDoctorTabData
.
noJoinList
=
[];
this
.
isSingleOrg
=
true
;
this
.
getGeneralPersonal
(
this
.
queryGDParams
);
}
else
{
this
.
isSingleOrg
=
false
;
this
.
getGeneralData
(
this
.
queryGDParams
);
}
this
.
otherInterface
();
},
// 确认选择机构
orgConfirm
(
selData
)
{
console
.
log
(
selData
);
let
hospitalIds
=
[];
let
hospitalNames
=
[];
let
orgName
=
''
;
...
...
@@ -609,32 +682,32 @@ export default {
this
.
otherInterface
();
},
// 取消选择机构
orgCancel
()
{
this
.
isShowOrg
=
false
;
},
//
//
取消选择机构
//
orgCancel() {
//
this.isShowOrg = false;
//
},
// 弹出选择区域控件
areaTabClick
()
{
if
(
this
.
isShowOrg
)
{
this
.
isShowOrg
=
false
;
}
//
if (this.isShowOrg) {
//
this.isShowOrg = false;
//
}
this
.
isShowArea
=
!
this
.
isShowArea
;
},
// 弹出选择机构控件
orgTabClick
()
{
if
(
this
.
areaDegree
!==
3
&&
this
.
areaDegree
!==
4
)
{
this
.
$toast
(
'选择区/县后才可选择机构'
);
return
;
}
if
(
this
.
orgList
.
length
===
0
)
{
this
.
$toast
(
'此区域下无机构'
);
return
;
}
//
//
弹出选择机构控件
//
orgTabClick() {
//
if (this.areaDegree !== 3 && this.areaDegree !== 4) {
//
this.$toast('选择区/县后才可选择机构');
//
return;
//
}
//
if (this.orgList.length === 0) {
//
this.$toast('此区域下无机构');
//
return;
//
}
this
.
isShowOrg
=
!
this
.
isShowOrg
;
},
//
this.isShowOrg = !this.isShowOrg;
//
},
// 通用跳转页面
gotoPage
(
subUrl
,
hasCert
)
{
...
...
@@ -713,7 +786,8 @@ export default {
setProvinceList
:
"setProvinceList"
,
setExamTimesList
:
"setExamTimesList"
,
setExamScoreList
:
"setExamScoreList"
,
setAreaDegree
:
"setAreaDegree"
setAreaDegree
:
"setAreaDegree"
,
setCurrentOrgList
:
'setCurrentOrgList'
})
}
};
...
...
@@ -748,7 +822,7 @@ export default {
}
.pd-top-60 {
padding-top:
85
px;
padding-top:
94
px;
}
}
</
style
>
store/index.js
浏览文件 @
0f4c9b10
...
...
@@ -8,7 +8,8 @@ export const state = () => ({
orgList
:
[],
examTimesList
:
[],
examScoreList
:
[],
areaDegree
:
0
areaDegree
:
0
,
currentOrgList
:
[]
})
export
const
getters
=
{
projectId
(
state
)
{
...
...
@@ -41,6 +42,9 @@ export const getters = {
areaDegree
(
state
)
{
return
state
.
areaDegree
;
},
currentOrgList
(
state
)
{
return
state
.
currentOrgList
;
}
}
export
const
mutations
=
{
SET_PROJECT_ID
(
state
,
projectId
)
{
...
...
@@ -72,6 +76,9 @@ export const mutations = {
},
SET_AREA_DEGREE
(
state
,
areaDegree
)
{
state
.
areaDegree
=
areaDegree
;
},
SET_CURRENT_ORG_LIST
(
state
,
currentOrgList
)
{
state
.
currentOrgList
=
currentOrgList
;
},
}
export
const
actions
=
{
...
...
@@ -105,4 +112,7 @@ export const actions = {
setAreaDegree
({
commit
},
areaDegree
)
{
commit
(
'SET_AREA_DEGREE'
,
areaDegree
);
},
setCurrentOrgList
({
commit
},
currentOrgList
)
{
commit
(
'SET_CURRENT_ORG_LIST'
,
currentOrgList
);
},
}
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录