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

联调成员范围接口

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