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

我所在机构

上级 0f4c9b10
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册