提交 962364a1 编写于 作者: kai.wang's avatar kai.wang

联调成员范围接口

上级 216b0249
......@@ -25,8 +25,8 @@
<el-table class="rim" ref="multipleOrganization" :data="tableOrganization" tooltip-effect="dark" style="width: 100%"
@select-all="selectAllOrganization" @select="selectOrganization">
<el-table-column type="selection" width="55" :selectable="selectableTableList"></el-table-column>
<el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="hospitalLevelName" label="医院级别" align="center"></el-table-column>
<el-table-column prop="orgName" label="医院名称" min-width="100" align="center"></el-table-column>
<el-table-column prop="orgLevelName" label="医院级别" align="center"></el-table-column>
<el-table-column prop="provinceName" label="所属省份" align="center"></el-table-column>
<el-table-column prop="cityName" label="所属城市" align="center"></el-table-column>
<el-table-column prop="countyName" label="所属区县" align="center"></el-table-column>
......@@ -49,6 +49,7 @@
import { openLoading, closeLoading } from "../../utils/utils";
import { doUpload, getFilePath } from "../../utils/qiniu-util";
import * as operationData from "../../utils/operation";
import { getCircleProvincesReq, getMemberSelectOrgReq,getMemberSelectOrgOptionReq } from '@/utils/yqrange/rangeApi';
let vm = null;
export default {
name: "organzation",
......@@ -105,7 +106,7 @@
name: "",
administrativeId: "0",
administrativeIdList: ["0"],
level: "-1",
level: "",
chechAll: true,
pageNum: 1,
pageSize: 10
......@@ -114,7 +115,9 @@
},
created() {
vm = this;
(this.projectId = 775);
// debugger
const { enterType, id } = this.$route.query;
this.circleId = id;
this.initRange();
//Idtype:1,内部 2.外部
vm.idType = localStorage.getItem("storageIdType");
......@@ -122,7 +125,7 @@
},
methods: {
initRange() {
let projectId = this.projectId;
let circleId = this.circleId;
this.getRegionOption();
this.listLevels();
this.getOrganization();
......@@ -130,7 +133,7 @@
this.formOrganization.pageNum = 1;
this.formOrganization.name = "";
this.formOrganization.administrativeIdList = ["0"];
this.formOrganization.level = "-1";
this.formOrganization.level = "";
},
setMoreOption(data, type) {
let option = [];
......@@ -154,15 +157,19 @@
},
//获取地区
getRegionOption() {
let req = {};
openLoading(vm);
vm.GET("basic-data/position/provinces", req).then(res => {
closeLoading(vm);
let idType = localStorage.getItem("storageIdType");
getCircleProvincesReq(idType).then(res => {
closeLoading(this);
if (res.code == "000000") {
vm.optionsRegion = operationData.setRegionOption2(
res.data.provinceList
);
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
//机构table中勾选一个
......@@ -176,16 +183,24 @@
}
let req = {
ids: [row.id],
projectId: this.projectId,
circleId: this.circleId,
type: flag === false ? 0 : 1
};
openLoading(vm);
vm.PUT("portal/new/scope/org/v1/organization/option", req).then(res => {
getMemberSelectOrgOptionReq(req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
//机构table中勾选一排
selectAllOrganization(selection) {
debugger
let setList = [];
let selectList = [];
for (let i = 0; i < vm.tableOrganization.length; i++) {
......@@ -198,6 +213,7 @@
}
let intersect = operationData.getIntersect(setList, selectList);
let typeStatus = 0;
debugger
if (intersect.length > 0) {
typeStatus = 1;
}
......@@ -206,13 +222,19 @@
if (setList.length > 0) {
let req = {
ids: setList,
projectId: this.projectId,
projectId: this.circleId,
type: typeStatus
};
openLoading(vm);
vm.PUT("portal/new/scope/org/v1/organization/option", req).then(res => {
closeLoading(vm);
});
getMemberSelectOrgOptionReq(req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
} else {
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
}
},
selectableTableList(row, index) {
......@@ -230,55 +252,56 @@
let administrativeIdItem = operationData.setAdministrativeId(
this.formOrganization.administrativeIdList
);
let idType = localStorage.getItem("storageIdType");
console.log('administrativeIdItem', administrativeIdItem);
let req = {
projectId: 775,
administrativeId: administrativeIdItem,
hospitalLevel: this.formOrganization.level,
hospitalName: this.formOrganization.name,
pageNum: this.formOrganization.pageNum,
circleId: this.circleId,
districtIds: administrativeIdItem,
orgLevel: this.formOrganization.level,
orgName: this.formOrganization.name,
pageNo: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize,
scope: ""
idType: idType
};
openLoading(vm);
// vm.POST("portal/scope/v1/organization/choose", req).then(res => {
vm.POST("portal/new/scope/org/v1/organization/search", req).then(res => {
getMemberSelectOrgReq(req).then(res => {
closeLoading(vm);
console.log(res);
if (res.code == "000000") {
this.tableOrganization = res.data.organizationList;
this.tableOrganization = res.data.orgList;
this.totalOrganization = res.data.total;
vm.initOrganizationStatus();
} else {
vm.$message(res.message);
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
//查询机构列表
getOrganization() {
let idType = localStorage.getItem("storageIdType");
let req = {
projectId: 775,
administrativeId: "",
hospitalLevel: "",
hospitalLevel: "",
scope: "000_110",
pageNum: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize
circleId: this.circleId,
districtIds: "",
orgLevel:"",
orgName: this.formOrganization.name,
pageNo: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize,
idType: idType
};
openLoading(vm);
// vm.POST("portal/scope/v1/organization", req).then(res => {
vm.POST("portal/new/scope/org/v1/organization", req).then(res => {
closeLoading(vm);
getMemberSelectOrgReq(req).then(res => {
closeLoading(this);
if (res.code == "000000") {
this.tableOrganization = res.data.organizationList;
this.tableOrganization = res.data.orgList;
this.totalOrganization = res.data.total;
vm.initOrganizationStatus();
} else {
vm.$message(res.message);
this.$message(res.message);
}
}).catch(err => {
this.$message.error('请求失败');
});
},
//获取医院等级
......@@ -302,12 +325,13 @@
searchOrganization() {
this.formOrganization.pageNum = 1;
let searchForm = this.formOrganization;
if (
searchForm.administrativeId == "0" &&
searchForm.administrativeIdList[
searchForm.administrativeIdList.length - 1
] == "0" &&
searchForm.level == "-1" &&
searchForm.level == "" &&
searchForm.name == ""
) {
console.log("wei")
......@@ -334,7 +358,7 @@
vm.formOrganization.name = "";
vm.formOrganization.administrativeId = "0";
vm.formOrganization.administrativeIdList = ["0"];
vm.formOrganization.level = "-1";
vm.formOrganization.level = "";
vm.formOrganization.pageNum = 1;
vm.searchOrganization();
......
......@@ -54,7 +54,7 @@ service.interceptors.request.use(config => {
}
if( process.env.BUILD_ENV == "development" ){ // 本地开发环境qgit
// console.log('环境变量>>>> ', process.env.BUILD_ENV);
config.headers['token'] = '1C7A1CC89FD24B8A8EAA0A54A06F7C9A';
config.headers['token'] = 'A73290A265634DA9B0CF2A09C5F2B7F8';
// config.headers['token'] = '4559D8D1D615430991878A1264830A04';
// config.headers['token'] = 'B6A38C32790E4462BC451C335F65848E';
// config.headers['token'] = localStorage.getItem('storageToken')
......
import fetch from '../fetch';
import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
let headers = {
'Content-Type': 'application/json;charset=UTF-8',
token: localStorage.getItem('storageToken'),
'Content-Type': 'application/json;charset=UTF-8',
token: localStorage.getItem('storageToken'),
};
export const getCircleInfoReq = (id) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/${id}/info`),
method: 'get',
description: '获取圈子详情',
})
};
export const getCircleProvincesReq = (idType) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/provinces/idType/${idType}`),
method: 'get',
description: '根据用户ID 获取选人时省市',
})
};
export const getMemberSelectOrgReq = (data) => {
return fetch({
headers,
url: getBaseUrl(`circle/memberSelect/org/search`),
method: 'post',
data: data,
description: '圈子设置查询机构列表',
})
};
export const getMemberSelectOrgOptionReq = (data) => {
return fetch({
headers,
url: getBaseUrl(`circle/circle/${id}/info`),
method: 'get',
description: '获取圈子详情',
headers,
url: getBaseUrl(`circle/memberSelect/org/option`),
method: 'post',
data: data,
description: '圈子设置勾选操作',
})
};
\ No newline at end of file
};
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册