提交 d2dc7da2 编写于 作者: guangjun.yang's avatar guangjun.yang

我所在机构

上级 0f4c9b10
<!-- 选择地区组件 -->
<template>
<div class="select-wrapper" @touchmove.prevent.stop>
<div class="mask" @click="cancelSelect" @touchmove.prevent.stop>
<div class="address-wrap" @click.stop @touchmove.prevent.stop>
<div class="tip-header">
<span class="cancel-btn" @click="cancelSelect">取消</span>
<h3>选择地区</h3>
<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)">
{{
value.provinceName
? value.provinceName
: '请选择'
}}
</li>
<li
v-show="value.provinceName && value.provinceName != '全部' && rank > 1 && areaList.cityList.length"
:class="{ active: isShowCity }"
class="item"
@click="tabAddressClick(2)"
>{{ value.cityName ? value.cityName : '请选择' }}</li>
<li
v-show="value.cityName && rank > 2 && areaList.countyList.length"
:class="{ active: isShowCounty }"
class="item"
@click="tabAddressClick(3)"
>
{{
value.countyName ? value.countyName : '请选择'
}}
</li>
<li
v-show="value.countyName && rank > 3 && areaList.townList.length"
:class="{ active: isShowTown }"
class="item"
@click="tabAddressClick(4)"
>{{ value.townName ? value.townName : '请选择' }}</li>
</ul>
<div class="address-content" @touchmove.stop>
<ul v-show="isShowProvince" id="province">
<li
v-for="(provinceItem, index) in areaList.provinceList"
:key="index"
:class="{ active: provinceItem.selected }"
@click="provinceSelect(provinceItem, index)"
>
<span>{{ provinceItem.label }}</span>
<span v-show="provinceItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowCity" id="city">
<li
v-for="(cityItem, index) in areaList.cityList"
:key="index"
:class="{ active: cityItem.selected }"
@click="citySelect(cityItem, index)"
>
<span>{{ cityItem.label }}</span>
<span v-show="cityItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowCounty" id="county">
<li
v-for="(countyItem, index) in areaList.countyList"
:key="index"
:class="{ active: countyItem.selected }"
@click="countySelect(countyItem, index)"
>
<span>{{ countyItem.label }}</span>
<span v-show="countyItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowTown" id="town">
<li
v-for="(townItem, index) in areaList.townList"
:key="index"
:class="{ active: townItem.selected }"
@click="townSelect(townItem, index)"
>
<span>{{ townItem.label }}</span>
<span v-show="townItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import {
getProvinceList,
getCityList,
getCountyList,
getTownList,
// getHospitalsByRegionId
} from "../../service";
export default {
name: "PicaArea",
data() {
return {
areaList: {
currentOrgList: [],
provinceList: [],
cityList: [],
countyList: [],
townList: []
},
value: {
cityId: "",
cityName: "",
countyId: "",
countyName: "",
patientAddress: "",
provinceId: "",
provinceName: "",
townId: "",
townName: "",
regionId: "",
areaDegree: 0
},
isDisabled: true,
isShowProvince: true,
isShowCity: false,
isShowCounty: false,
isShowTown: false,
// 区域选择通用接口参数
queryParams: {
projectId: 374,
regionId: ""
},
currentOrgList: []
};
},
props: {
baseUrl: {
type: String,
default: ""
},
rank: {
type: Number | String,
default: 4
}
},
created() {
if (process.client) {
if (this.$route && this.$route.query) {
let cQuery = this.$route.query;
let hospitalIdList = cQuery.hospitalIdList || "";
this.queryParams.projectId = cQuery.projectId || "";
}
}
},
computed: {
...mapGetters({
projectId: "projectId",
provinceList: "provinceList"
})
},
watch: {
projectId(newVal) {
this.queryParams.projectId = newVal;
},
provinceList(newVal) {
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 = "全部";
}
},
methods: {
// 映射Store中的Actions
...mapActions({
setOrgList: "setOrgList",
setAreaDegree: "setAreaDegree"
}),
// // 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
// async getHospitalsByRegionId(params) {
// await getHospitalsByRegionId(params).then(res => {
// if (res.code === "000000") {
// this.setOrgList(res.data.list || []);
// }
// });
// },
// 获取省列表
async getProvinceData(params) {
await getProvinceList(params).then(res => {
if (res.code === "000000") {
this.areaList.provinceList = (res.data && res.data.list) || [];
this.areaList.provinceList.map(a => {
if (a.id == this.value.provinceId) {
a.selected = true;
}
});
}
});
},
// 获取城市列表
async getCityData(params) {
await getCityList(params).then(res => {
if (res.code === "000000") {
this.areaList.cityList = (res.data && res.data.list) || [];
if (this.areaList.cityList.length === 0) {
this.isShowProvince = true;
this.isShowCity = false;
this.isDisabled = false;
}
this.areaList.cityList.map(a => {
if (a.id == this.value.cityId) {
a.selected = true;
}
});
}
});
},
// 获取区/县列表
async getCountyData(params) {
await getCountyList(params).then(res => {
if (res.code === "000000") {
this.areaList.countyList = (res.data && res.data.list) || [];
if (this.areaList.countyList.length === 0) {
this.isShowProvince = false;
this.isShowCity = true;
this.isShowCounty = false;
this.isDisabled = false;
}
this.areaList.countyList.map(a => {
if (a.id == this.value.countyId) {
a.selected = true;
}
});
}
});
},
// 获取乡/镇列表
async getTownData(params) {
await getTownList(params).then(res => {
if (res.code === "000000") {
this.areaList.townList = (res.data && res.data.list) || [];
if (this.areaList.townList.length === 0) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = true;
this.isShowTown = false;
this.isDisabled = false;
}
this.areaList.townList.map(a => {
if (a.id == this.value.townId) {
a.selected = true;
}
});
}
});
},
// 选择省份的操作
provinceSelect(item, idx, isCurrent) {
this.value.regionId = item.id;
this.value.provinceId = item.id;
this.queryParams.regionId = item.id;
this.value.provinceName = item.label;
this.value.patientAddress = "";
this.value.cityId = null;
this.value.cityName = "";
this.value.countyId = null;
this.value.countyName = "";
this.value.townId = null;
this.value.townName = "";
// 当前选中的样式
this.areaList.provinceList.map(a => (a.selected = false));
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;
}
// // 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 && item.degree != 5) {
this.isShowCity = true;
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 = [];
}
},
// 选择市的操作
citySelect(item, idx) {
this.value.regionId = item.id;
this.value.cityId = item.id;
this.queryParams.regionId = item.id;
this.value.cityName = item.label;
this.value.patientAddress = "";
this.value.countyId = null;
this.value.countyName = "";
this.value.townId = null;
this.value.townName = "";
// 当前选中的样式
this.areaList.cityList.map(a => (a.selected = false));
this.areaList.cityList[idx].selected = true;
// this.setAreaDegree(item.degree)
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// // 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 && item.degree != 5) {
this.isShowCounty = true;
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 = [];
}
},
// 选择区/县的操作
countySelect(item, idx) {
this.value.regionId = item.id;
this.value.countyId = item.id;
this.queryParams.regionId = item.id;
this.value.countyName = item.label;
this.value.townId = null;
this.value.townName = "";
this.value.patientAddress = "";
// 当前选中的样式
this.areaList.countyList.map(a => (a.selected = false));
this.areaList.countyList[idx].selected = true;
// this.setAreaDegree(item.degree)
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// // 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 && item.degree != 5) {
this.isShowTown = true;
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 = [];
}
},
// 选择乡镇的操作
townSelect(item, idx) {
this.value.regionId = item.id;
this.value.townId = item.id;
this.queryParams.regionId = item.id;
this.value.townName = item.label;
this.value.patientAddress = `${this.value.provinceName}${this.value.cityName}${this.value.countyName}${this.value.townName}`;
// this.setAreaDegree(item.degree)
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// // 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;
this.isDisabled = false;
},
tabAddressClick(tab) {
if (tab === 1) {
this.isShowProvince = true;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = false;
} else if (tab === 2) {
this.isShowProvince = false;
this.isShowCity = true;
this.isShowCounty = false;
this.isShowTown = false;
} else if (tab === 3) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = true;
this.isShowTown = false;
} else if (tab === 4) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = true;
}
},
confirm() {
console.log(this.areaList);
this.$emit("confirm", this.value);
},
cancelSelect() {
this.$emit("cancel", false);
}
}
};
</script>
<style lang="less" scoped>
.select-wrapper {
font-family: PingFangSC-Regular;
.mask {
position: fixed;
z-index: 1000000015;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(55, 56, 57, 0.6);
}
.address-wrap {
position: absolute;
width: 100%;
height: 353px;
// height: 293px;
background-color: #ffffff;
box-sizing: border-box;
bottom: 0;
left: 0;
right: 0;
z-index: 1000000016;
.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;
}
}
}
}
}
}
.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
<!-- 选择地区组件 -->
<template>
<div class="select-wrapper" @touchmove.prevent.stop>
<div class="mask" @click="cancelSelect" @touchmove.prevent.stop>
<div class="address-wrap" :style="{'height': areaList.currentOrgList.length ? '353px' : '293px'}" @click.stop @touchmove.prevent.stop>
<div class="tip-header">
<span class="cancel-btn" @click="cancelSelect">取消</span>
<h3>选择地区</h3>
<button class="submit-btn" @click="confirm">确定</button>
<!-- <button :disabled="isDisabled" class="submit-btn" @click="confirm">确定</button> -->
</div>
<div class="my-org" v-show="areaList.currentOrgList.length">
<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)">
{{
value.provinceName
? value.provinceName
: '请选择'
}}
</li>
<li
v-show="value.provinceName && value.provinceName != '全部' && rank > 1 && areaList.cityList.length"
:class="{ active: isShowCity }"
class="item"
@click="tabAddressClick(2)"
>{{ value.cityName ? value.cityName : '请选择' }}</li>
<li
v-show="value.cityName && rank > 2 && areaList.countyList.length"
:class="{ active: isShowCounty }"
class="item"
@click="tabAddressClick(3)"
>
{{
value.countyName ? value.countyName : '请选择'
}}
</li>
<li
v-show="value.countyName && rank > 3 && areaList.townList.length"
:class="{ active: isShowTown }"
class="item"
@click="tabAddressClick(4)"
>{{ value.townName ? value.townName : '请选择' }}</li>
<li
v-show="value.townName && rank > 4 && areaList.newOrgList.length"
:class="{ active: isShowOrg }"
class="item"
@click="tabAddressClick(5)"
>{{ value.newOrgName ? value.newOrgName : '请选择' }}</li>
</ul>
<div class="address-content" @touchmove.stop>
<ul v-show="isShowProvince" id="province">
<li
v-for="(provinceItem, index) in areaList.provinceList"
:key="index"
:class="{ active: provinceItem.selected }"
@click="provinceSelect(provinceItem, index)"
>
<span>{{ provinceItem.label }}</span>
<span v-show="provinceItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowCity" id="city">
<li
v-for="(cityItem, index) in areaList.cityList"
:key="index"
:class="{ active: cityItem.selected }"
@click="citySelect(cityItem, index)"
>
<span>{{ cityItem.label }}</span>
<span v-show="cityItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowCounty" id="county">
<li
v-for="(countyItem, index) in areaList.countyList"
:key="index"
:class="{ active: countyItem.selected }"
@click="countySelect(countyItem, index)"
>
<span>{{ countyItem.label }}</span>
<span v-show="countyItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowTown" id="town">
<li
v-for="(townItem, index) in areaList.townList"
:key="index"
:class="{ active: townItem.selected }"
@click="townSelect(townItem, index)"
>
<span>{{ townItem.label }}</span>
<span v-show="townItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
<ul v-show="isShowOrg" id="org">
<li
v-for="(orgItem, index) in areaList.newOrgList"
:key="index"
:class="{ active: orgItem.selected }"
@click="orgSelect(orgItem, index)"
>
<span>{{ orgItem.label }}</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, mapActions } from "vuex";
import {
getProvinceList,
getCityList,
getCountyList,
getTownList,
// getHospitalsByRegionId
} from "../../service";
export default {
name: "PicaArea",
data() {
return {
areaList: {
currentOrgList: [],
provinceList: [],
cityList: [],
countyList: [],
townList: [],
newOrgList: []
},
value: {
cityId: "",
cityName: "",
countyId: "",
countyName: "",
patientAddress: "",
provinceId: "",
provinceName: "",
townId: "",
townName: "",
newOrgId: "",
newOrgName: "",
regionId: "",
areaDegree: 0,
},
isDisabled: true,
isShowProvince: true,
isShowCity: false,
isShowCounty: false,
isShowTown: false,
isShowOrg: false,
// 区域选择通用接口参数
queryParams: {
projectId: 374,
regionId: ""
},
currentOrgList: []
};
},
props: {
baseUrl: {
type: String,
default: ""
},
rank: {
type: Number | String,
default: 5
}
},
created() {
if (process.client) {
if (this.$route && this.$route.query) {
let cQuery = this.$route.query;
let hospitalIdList = cQuery.hospitalIdList || "";
this.queryParams.projectId = cQuery.projectId || "";
}
}
},
computed: {
...mapGetters({
projectId: "projectId",
provinceList: "provinceList"
})
},
watch: {
projectId(newVal) {
this.queryParams.projectId = newVal;
},
provinceList(newVal) {
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 = "全部";
}
},
methods: {
// 映射Store中的Actions
...mapActions({
setOrgList: "setOrgList",
}),
// // 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
// async getHospitalsByRegionId(params) {
// await getHospitalsByRegionId(params).then(res => {
// if (res.code === "000000") {
// this.setOrgList(res.data.list || []);
// }
// });
// },
// 获取省列表
async getProvinceData(params) {
await getProvinceList(params).then(res => {
if (res.code === "000000") {
this.areaList.provinceList = (res.data && res.data.list) || [];
this.areaList.provinceList.map(a => {
if (a.id == this.value.provinceId) {
a.selected = true;
}
});
}
});
},
// 获取城市列表
async getCityData(params) {
await getCityList(params).then(res => {
if (res.code === "000000") {
this.areaList.cityList = (res.data && res.data.list) || [];
if (this.areaList.cityList.length === 0) {
this.isShowProvince = true;
this.isShowCity = false;
this.isDisabled = false;
}
this.areaList.cityList.map(a => {
if (a.id == this.value.cityId) {
a.selected = true;
}
});
}
});
},
// 获取区/县列表
async getCountyData(params) {
await getCountyList(params).then(res => {
if (res.code === "000000") {
this.areaList.countyList = (res.data && res.data.list) || [];
if (this.areaList.countyList.length === 0) {
this.isShowProvince = false;
this.isShowCity = true;
this.isShowCounty = false;
this.isDisabled = false;
}
this.areaList.countyList.map(a => {
if (a.id == this.value.countyId) {
a.selected = true;
}
});
}
});
},
// 获取乡/镇列表
async getTownData(params) {
await getTownList(params).then(res => {
if (res.code === "000000") {
this.areaList.townList = (res.data && res.data.list) || [];
if (this.areaList.townList.length === 0) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = true;
this.isShowTown = false;
this.isDisabled = false;
}
this.areaList.townList.map(a => {
if (a.id == this.value.townId) {
a.selected = true;
}
});
}
});
},
// 获取最后一级的机构列表
async getOrgData(params) {
await getTownList(params).then(res => {
if (res.code === "000000") {
this.areaList.newOrgList = (res.data && res.data.list) || [];
if (this.areaList.newOrgList.length === 0) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = true;
this.isDisabled = false;
}
this.areaList.newOrgList.map(a => {
if (a.id == this.value.townId) {
a.selected = true;
}
});
}
});
},
// 选择省份的操作
provinceSelect(item, idx, isCurrent) {
this.value.regionId = item.id;
this.value.provinceId = item.id;
this.queryParams.regionId = item.id;
this.value.provinceName = item.label;
// this.value.patientAddress = "";
this.value.cityId = null;
this.value.cityName = "";
this.value.countyId = null;
this.value.countyName = "";
this.value.townId = null;
this.value.townName = "";
// 当前选中的样式
this.areaList.provinceList.map(a => (a.selected = false));
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.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
//控制省市县乡数据展示与隐藏
this.isShowProvince = false;
this.isShowCounty = false;
this.isShowTown = false;
if (this.rank > 1 && item.degree != 5) {
this.isShowCity = true;
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 = [];
this.areaList.newOrgList = [];
}
},
// 选择市的操作
citySelect(item, idx) {
this.value.regionId = item.id;
this.value.cityId = item.id;
this.queryParams.regionId = item.id;
this.value.cityName = item.label;
// this.value.patientAddress = "";
this.value.countyId = null;
this.value.countyName = "";
this.value.townId = null;
this.value.townName = "";
// 当前选中的样式
this.areaList.cityList.map(a => (a.selected = false));
this.areaList.cityList[idx].selected = true;
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// 控制省市县乡数据展示与隐藏
this.isShowProvince = false;
this.isShowCity = false;
this.isShowTown = false;
if (this.rank > 2 && item.degree != 5) {
this.isShowCounty = true;
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 = [];
this.areaList.newOrgList = [];
}
},
// 选择区/县的操作
countySelect(item, idx) {
this.value.regionId = item.id;
this.value.countyId = item.id;
this.queryParams.regionId = item.id;
this.value.countyName = item.label;
this.value.townId = null;
this.value.townName = "";
// this.value.patientAddress = "";
// 当前选中的样式
this.areaList.countyList.map(a => (a.selected = false));
this.areaList.countyList[idx].selected = true;
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// 控制省市县乡数据展示与隐藏
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
if (this.rank > 3 && item.degree != 5) {
this.isShowTown = true;
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 = [];
this.areaList.newOrgList = [];
}
},
// 选择乡镇的操作
townSelect(item, idx) {
this.value.regionId = item.id;
this.value.townId = item.id;
this.queryParams.regionId = item.id;
this.value.townName = item.label;
// this.value.patientAddress = `${this.value.provinceName}${this.value.cityName}${this.value.countyName}${this.value.townName}`;
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// 当前选中的样式
this.areaList.townList.map(a => (a.selected = false));
this.areaList.townList[idx].selected = true;
this.isDisabled = false;
if (this.rank > 4 && item.degree != 5) {
this.isShowTown = false;
this.isShowOrg = true;
this.isDisabled = true;
this.getOrgData(this.queryParams);
} else {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = true;
this.isDisabled = false;
this.areaList.newOrgList = [];
}
},
// 选择最后一级机构
orgSelect(item, idx) {
this.value.regionId = item.id;
this.value.newOrgId = item.id;
// this.queryParams.regionId = item.id;
this.value.newOrgName = item.label;
// this.value.patientAddress = `${this.value.provinceName}${this.value.cityName}${this.value.countyName}${this.value.townName}`;
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// 当前选中的样式
this.areaList.newOrgList.map(a => (a.selected = false));
this.areaList.newOrgList[idx].selected = true;
this.isDisabled = false;
},
tabAddressClick(tab) {
if (tab === 1) {
this.isShowProvince = true;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = false;
} else if (tab === 2) {
this.isShowProvince = false;
this.isShowCity = true;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = false;
} else if (tab === 3) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = true;
this.isShowTown = false;
this.isShowOrg = false;
} else if (tab === 4) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = true;
this.isShowOrg = false;
} else if (tab === 5) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = true;
}
},
confirm() {
console.log(this.areaList);
this.$emit("confirm", this.value);
},
cancelSelect() {
this.$emit("cancel", false);
}
}
};
</script>
<style lang="less" scoped>
.select-wrapper {
font-family: PingFangSC-Regular;
.mask {
position: fixed;
z-index: 1000000015;
top: 0;
right: 0;
left: 0;
bottom: 0;
background: rgba(55, 56, 57, 0.6);
}
.address-wrap {
position: absolute;
width: 100%;
height: 353px;
// height: 293px;
background-color: #ffffff;
box-sizing: border-box;
bottom: 0;
left: 0;
right: 0;
z-index: 1000000016;
.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;
}
}
}
}
}
}
.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
......@@ -9,7 +9,7 @@
<button class="submit-btn" @click="confirm">确定</button>
<!-- <button :disabled="isDisabled" class="submit-btn" @click="confirm">确定</button> -->
</div>
<div class="my-org" >
<div class="my-org" v-show="areaList.currentOrgList.length">
<span>我所在机构</span>
<ul>
<li
......@@ -57,6 +57,12 @@
class="item"
@click="tabAddressClick(4)"
>{{ value.townName ? value.townName : '请选择' }}</li>
<li
v-show="value.townName && rank > 4 && areaList.newOrgList.length"
:class="{ active: isShowOrg }"
class="item"
@click="tabAddressClick(5)"
>{{ value.newOrgName ? value.newOrgName : '请选择' }}</li>
</ul>
<div class="address-content" @touchmove.stop>
<ul v-show="isShowProvince" id="province">
......@@ -111,6 +117,19 @@
</span>
</li>
</ul>
<ul v-show="isShowOrg" id="org">
<li
v-for="(orgItem, index) in areaList.newOrgList"
:key="index"
:class="{ active: orgItem.selected }"
@click="orgSelect(orgItem, index)"
>
<span>{{ orgItem.label }}</span>
<span v-show="orgItem.selected">
<img src="../../assets/images/sort-select-icon.png" />
</span>
</li>
</ul>
</div>
</div>
</div>
......@@ -119,13 +138,7 @@
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import {
getProvinceList,
getCityList,
getCountyList,
getTownList,
// getHospitalsByRegionId
} from "../../service";
import { getAreaOrOrgList } from "../../service";
export default {
name: "PicaArea",
......@@ -136,7 +149,8 @@ export default {
provinceList: [],
cityList: [],
countyList: [],
townList: []
townList: [],
newOrgList: []
},
value: {
cityId: "",
......@@ -148,14 +162,17 @@ export default {
provinceName: "",
townId: "",
townName: "",
newOrgId: "",
newOrgName: "",
regionId: "",
areaDegree: 0
areaDegree: 0,
},
isDisabled: true,
isShowProvince: true,
isShowCity: false,
isShowCounty: false,
isShowTown: false,
isShowOrg: false,
// 区域选择通用接口参数
queryParams: {
projectId: 374,
......@@ -171,7 +188,7 @@ export default {
},
rank: {
type: Number | String,
default: 4
default: 5
}
},
created() {
......@@ -226,21 +243,11 @@ export default {
// 映射Store中的Actions
...mapActions({
setOrgList: "setOrgList",
setAreaDegree: "setAreaDegree"
}),
// // 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
// async getHospitalsByRegionId(params) {
// await getHospitalsByRegionId(params).then(res => {
// if (res.code === "000000") {
// this.setOrgList(res.data.list || []);
// }
// });
// },
// 获取省列表
async getProvinceData(params) {
await getProvinceList(params).then(res => {
await getAreaOrOrgList(params).then(res => {
if (res.code === "000000") {
this.areaList.provinceList = (res.data && res.data.list) || [];
this.areaList.provinceList.map(a => {
......@@ -254,7 +261,7 @@ export default {
// 获取城市列表
async getCityData(params) {
await getCityList(params).then(res => {
await getAreaOrOrgList(params).then(res => {
if (res.code === "000000") {
this.areaList.cityList = (res.data && res.data.list) || [];
if (this.areaList.cityList.length === 0) {
......@@ -273,7 +280,7 @@ export default {
// 获取区/县列表
async getCountyData(params) {
await getCountyList(params).then(res => {
await getAreaOrOrgList(params).then(res => {
if (res.code === "000000") {
this.areaList.countyList = (res.data && res.data.list) || [];
if (this.areaList.countyList.length === 0) {
......@@ -293,7 +300,7 @@ export default {
// 获取乡/镇列表
async getTownData(params) {
await getTownList(params).then(res => {
await getAreaOrOrgList(params).then(res => {
if (res.code === "000000") {
this.areaList.townList = (res.data && res.data.list) || [];
if (this.areaList.townList.length === 0) {
......@@ -312,19 +319,43 @@ export default {
});
},
// 获取最后一级的机构列表
async getOrgData(params) {
await getAreaOrOrgList(params).then(res => {
if (res.code === "000000") {
this.areaList.newOrgList = (res.data && res.data.list) || [];
if (this.areaList.newOrgList.length === 0) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = true;
this.isShowOrg = false;
this.isDisabled = false;
}
this.areaList.newOrgList.map(a => {
if (a.id == this.value.townId) {
a.selected = true;
}
});
}
});
},
// 选择省份的操作
provinceSelect(item, idx, isCurrent) {
this.value.regionId = item.id;
this.value.provinceId = item.id;
this.queryParams.regionId = item.id;
this.value.provinceName = item.label;
this.value.patientAddress = "";
// this.value.patientAddress = "";
this.value.cityId = null;
this.value.cityName = "";
this.value.countyId = null;
this.value.countyName = "";
this.value.townId = null;
this.value.townName = "";
this.value.newOrgId = null;
this.value.newOrgName = ""
// 当前选中的样式
this.areaList.provinceList.map(a => (a.selected = false));
......@@ -336,17 +367,11 @@ export default {
}
// 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;
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
//控制省市县乡数据展示与隐藏
this.isShowProvince = false;
this.isShowCounty = false;
......@@ -362,6 +387,7 @@ export default {
this.areaList.cityList = [];
this.areaList.countyList = [];
this.areaList.townList = [];
this.areaList.newOrgList = [];
}
},
......@@ -371,25 +397,21 @@ export default {
this.value.cityId = item.id;
this.queryParams.regionId = item.id;
this.value.cityName = item.label;
this.value.patientAddress = "";
// this.value.patientAddress = "";
this.value.countyId = null;
this.value.countyName = "";
this.value.townId = null;
this.value.townName = "";
this.value.newOrgId = null;
this.value.newOrgName = ""
// 当前选中的样式
this.areaList.cityList.map(a => (a.selected = false));
this.areaList.cityList[idx].selected = true;
// this.setAreaDegree(item.degree)
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
// 控制省市县乡数据展示与隐藏
this.isShowProvince = false;
this.isShowCity = false;
......@@ -405,6 +427,7 @@ export default {
this.isDisabled = false;
this.areaList.countyList = [];
this.areaList.townList = [];
this.areaList.newOrgList = [];
}
},
......@@ -416,21 +439,17 @@ export default {
this.value.countyName = item.label;
this.value.townId = null;
this.value.townName = "";
this.value.patientAddress = "";
this.value.newOrgId = null;
this.value.newOrgName = ""
// this.value.patientAddress = "";
// 当前选中的样式
this.areaList.countyList.map(a => (a.selected = false));
this.areaList.countyList[idx].selected = true;
// this.setAreaDegree(item.degree)
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// // Modified By Anndy Yang
// if (item.degree == 3 || item.degree == 4) {
// this.getHospitalsByRegionId(this.queryParams);
// }
// 控制省市县乡数据展示与隐藏
this.isShowProvince = false;
this.isShowCity = false;
......@@ -446,6 +465,7 @@ export default {
this.isShowTown = false;
this.isDisabled = false;
this.areaList.townList = [];
this.areaList.newOrgList = [];
}
},
......@@ -455,44 +475,83 @@ export default {
this.value.townId = item.id;
this.queryParams.regionId = item.id;
this.value.townName = item.label;
this.value.patientAddress = `${this.value.provinceName}${this.value.cityName}${this.value.countyName}${this.value.townName}`;
// this.setAreaDegree(item.degree)
this.value.newOrgId = null;
this.value.newOrgName = ""
// this.value.patientAddress = `${this.value.provinceName}${this.value.cityName}${this.value.countyName}${this.value.townName}`;
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// // 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;
this.isDisabled = false;
if (this.rank > 4 && item.degree != 5) {
this.isShowTown = false;
this.isShowOrg = true;
this.isDisabled = true;
this.getOrgData(this.queryParams);
} else {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = true;
this.isDisabled = false;
this.areaList.newOrgList = [];
}
},
// 选择最后一级机构
orgSelect(item, idx) {
this.value.regionId = item.id;
this.value.newOrgId = item.id;
// this.queryParams.regionId = item.id;
this.value.newOrgName = item.label;
// this.value.patientAddress = `${this.value.provinceName}${this.value.cityName}${this.value.countyName}${this.value.townName}`;
this.value.areaDegree = item.degree;
if (item.degree == 0) {
return;
}
// 当前选中的样式
this.areaList.newOrgList.map(a => (a.selected = false));
this.areaList.newOrgList[idx].selected = true;
this.isDisabled = false;
},
tabAddressClick(tab) {
if (tab === 1) {
this.isShowProvince = true;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = false;
} else if (tab === 2) {
this.isShowProvince = false;
this.isShowCity = true;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = false;
} else if (tab === 3) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = true;
this.isShowTown = false;
this.isShowOrg = false;
} else if (tab === 4) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = true;
this.isShowOrg = false;
} else if (tab === 5) {
this.isShowProvince = false;
this.isShowCity = false;
this.isShowCounty = false;
this.isShowTown = false;
this.isShowOrg = true;
}
},
confirm() {
......@@ -521,7 +580,7 @@ export default {
.address-wrap {
position: absolute;
width: 100%;
height: 353px;
// height: 353px;
// height: 293px;
background-color: #ffffff;
box-sizing: border-box;
......@@ -637,8 +696,8 @@ export default {
.address-content {
position: relative;
width: 100%;
height: 100%;
/*height: 196px;*/
// height: 100%;
height: 196px;
overflow: hidden;
box-sizing: border-box;
......
......@@ -97,12 +97,9 @@ const cookies = require("cookie-universal")();
import {
goPageByNative
} from "@/utils";
import { mapGetters, mapActions } from "vuex";
import {
mapGetters,
mapActions
} from "vuex";
import {
getProvinceList,
getAreaOrOrgList,
getUserAnalysis,
getHospitalsCNT,
getGeneralPersonal,
......@@ -111,7 +108,6 @@ import {
getProjectInfo,
getGeneralExamList,
getStudyEffect,
// getHospitalsByRegionId
} from "@/service";
import CommonHeader from "@/components/common/common-header";
......@@ -378,7 +374,7 @@ export default {
}).then(res => {
if (res.code === "000000") {
this.projectInfo = res.data;
getProvinceList(params).then(res => {
getAreaOrOrgList(params).then(res => {
if (res.code === "000000") {
// 如果直接是5级,则将其进行拆分(区域ID与机构ID)
let regionId = '', orgId = '', firstData = res.data.list[0];
......@@ -396,23 +392,11 @@ export default {
this.areaName = (proviceList.length && proviceList[0].label) || '全部';
this.queryParams.projectId = this.projectId;
this.queryParams.regionId = regionId;
// 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;
// }
if(firstData.degree == 5) {
this.isSingleOrg = true;
this.queryGDParams.hospitalIdList = [];
......@@ -427,15 +411,6 @@ export default {
});
},
// // 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
// async getHospitalsByRegionId(params) {
// await getHospitalsByRegionId(params).then(res => {
// if (res.code === "000000") {
// this.setOrgList(res.data.list || []);
// }
// });
// },
// 异步延迟调用其它Tabs接口(除了数据概述)
otherInterface() {
setTimeout(() => {
......@@ -588,8 +563,8 @@ 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.newOrgName || selData.townName || selData.countyName || selData.cityName || selData.provinceName) {
this.areaName = this.shortName(selData.newOrgName || selData.townName || selData.countyName || selData.cityName || selData.provinceName, 18)
}
if(selData.areaDegree == 5) {
this.orgConfirmNew(selData);
......@@ -616,6 +591,8 @@ export default {
let regionId = regionIdAndOrgId.slice(0, lindex), orgId = regionIdAndOrgId.slice(lindex + 1);
let hospitalIds = [orgId];
this.isShowArea = false;
this.queryGDParams.regionId = regionId;
this.CNTParams.regionId = regionId;
// let hospitalNames = [];
// let orgName = '';
// selData.forEach(org => {
......
......@@ -9,46 +9,9 @@ export const getHospital = async (params) => {
};
/**
* 获取省列表
* 通用获取区域或机构列表
*/
export const getProvinceList = async params => {
return request({
// baseURL: 'http://10.177.11.156:10443/',
method: 'get',
params: params,
withCredentials: true,
url: 'stats/region'
});
};
/**
* 获取市列表
*/
export const getCityList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: 'stats/region'
});
};
/**
* 获取县/区列表
*/
export const getCountyList = async params => {
return request({
method: 'get',
params: params,
withCredentials: true,
url: 'stats/region'
});
};
/**
* 获取乡镇列表
*/
export const getTownList = async params => {
export const getAreaOrOrgList = async params => {
return request({
method: 'get',
params: params,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册