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

我所在机构

上级 0f4c9b10
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -97,12 +97,9 @@ const cookies = require("cookie-universal")(); ...@@ -97,12 +97,9 @@ const cookies = require("cookie-universal")();
import { import {
goPageByNative goPageByNative
} from "@/utils"; } from "@/utils";
import { mapGetters, mapActions } from "vuex";
import { import {
mapGetters, getAreaOrOrgList,
mapActions
} from "vuex";
import {
getProvinceList,
getUserAnalysis, getUserAnalysis,
getHospitalsCNT, getHospitalsCNT,
getGeneralPersonal, getGeneralPersonal,
...@@ -111,7 +108,6 @@ import { ...@@ -111,7 +108,6 @@ import {
getProjectInfo, getProjectInfo,
getGeneralExamList, getGeneralExamList,
getStudyEffect, getStudyEffect,
// getHospitalsByRegionId
} from "@/service"; } from "@/service";
import CommonHeader from "@/components/common/common-header"; import CommonHeader from "@/components/common/common-header";
...@@ -378,7 +374,7 @@ export default { ...@@ -378,7 +374,7 @@ export default {
}).then(res => { }).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
this.projectInfo = res.data; this.projectInfo = res.data;
getProvinceList(params).then(res => { getAreaOrOrgList(params).then(res => {
if (res.code === "000000") { if (res.code === "000000") {
// 如果直接是5级,则将其进行拆分(区域ID与机构ID) // 如果直接是5级,则将其进行拆分(区域ID与机构ID)
let regionId = '', orgId = '', firstData = res.data.list[0]; let regionId = '', orgId = '', firstData = res.data.list[0];
...@@ -396,23 +392,11 @@ export default { ...@@ -396,23 +392,11 @@ export default {
this.areaName = (proviceList.length && proviceList[0].label) || '全部'; this.areaName = (proviceList.length && proviceList[0].label) || '全部';
this.queryParams.projectId = this.projectId; this.queryParams.projectId = this.projectId;
this.queryParams.regionId = regionId; 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) { if(proviceList.length && res.data.containHospitalFlag == 1) {
proviceList[0].containHospitalFlag = 1; proviceList[0].containHospitalFlag = 1;
} }
this.setProvinceList(proviceList); this.setProvinceList(proviceList);
this.setAreaDegree(degree); this.setAreaDegree(degree);
// if( degree == 3 || degree == 4) {
// this.isShowOrg = true;
// }
if(firstData.degree == 5) { if(firstData.degree == 5) {
this.isSingleOrg = true; this.isSingleOrg = true;
this.queryGDParams.hospitalIdList = []; this.queryGDParams.hospitalIdList = [];
...@@ -427,15 +411,6 @@ export default { ...@@ -427,15 +411,6 @@ export default {
}); });
}, },
// // 根据区域获取机构列表(一般在是三、四级区域才调用此方法)
// async getHospitalsByRegionId(params) {
// await getHospitalsByRegionId(params).then(res => {
// if (res.code === "000000") {
// this.setOrgList(res.data.list || []);
// }
// });
// },
// 异步延迟调用其它Tabs接口(除了数据概述) // 异步延迟调用其它Tabs接口(除了数据概述)
otherInterface() { otherInterface() {
setTimeout(() => { setTimeout(() => {
...@@ -588,8 +563,8 @@ export default { ...@@ -588,8 +563,8 @@ export default {
// 确认选择区域 // 确认选择区域
areaConfirm(selData) { areaConfirm(selData) {
console.log(selData); console.log(selData);
if (selData.townName || selData.countyName || selData.cityName || selData.provinceName) { if (selData.newOrgName || selData.townName || selData.countyName || selData.cityName || selData.provinceName) {
this.areaName = this.shortName(selData.townName || selData.countyName || selData.cityName || selData.provinceName, 18) this.areaName = this.shortName(selData.newOrgName || selData.townName || selData.countyName || selData.cityName || selData.provinceName, 18)
} }
if(selData.areaDegree == 5) { if(selData.areaDegree == 5) {
this.orgConfirmNew(selData); this.orgConfirmNew(selData);
...@@ -616,6 +591,8 @@ export default { ...@@ -616,6 +591,8 @@ export default {
let regionId = regionIdAndOrgId.slice(0, lindex), orgId = regionIdAndOrgId.slice(lindex + 1); let regionId = regionIdAndOrgId.slice(0, lindex), orgId = regionIdAndOrgId.slice(lindex + 1);
let hospitalIds = [orgId]; let hospitalIds = [orgId];
this.isShowArea = false; this.isShowArea = false;
this.queryGDParams.regionId = regionId;
this.CNTParams.regionId = regionId;
// let hospitalNames = []; // let hospitalNames = [];
// let orgName = ''; // let orgName = '';
// selData.forEach(org => { // selData.forEach(org => {
......
...@@ -9,46 +9,9 @@ export const getHospital = async (params) => { ...@@ -9,46 +9,9 @@ export const getHospital = async (params) => {
}; };
/** /**
* 获取省列表 * 通用获取区域或机构列表
*/ */
export const getProvinceList = async params => { export const getAreaOrOrgList = 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 => {
return request({ return request({
method: 'get', method: 'get',
params: params, params: params,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册