提交 2c7a906b 编写于 作者: bo.dang's avatar bo.dang

Merge remote-tracking branch 'origin/dev-liveSix-20200817' into dev-liveSix-20200817

......@@ -52,7 +52,7 @@
/>
<!-- 设定行政范围与设定机构 -->
<div class="three-step" v-if="active === 2">
<!-- <div class="three-step" v-if="active === 2">
<el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tab-pane label="设定行政范围" name="first">
<select-region ref="selectRegion" :projectId="projectId" :status4Flag="status4Flag"></select-region>
......@@ -65,7 +65,38 @@
></set-organization>
</el-tab-pane>
</el-tabs>
</div> -->
<!-- 改为关联小圈 -->
<div class="three-step" v-if="active === 2">
<el-form :model="formCircle" label-width="130px" class="demo-form-inline">
<el-form-item label="关联小圈:" required>
<el-select
size="small"
v-model="formCircle.microecologyId"
placeholder="请选择关联小圈"
:disabled="status4Flag == 1"
>
<el-option
v-for="item in circleList"
:key="item.id"
:label="`${item.id}-${item.name}`"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-show="formCircle.microecologyId" label="圈内可见范围:" required>
<el-select
size="small"
v-model="formCircle.groupType"
placeholder="请选择圈内可见范围"
>
<el-option label="全体成员" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
</div>
<dialog-componet :dialogObj="dialogObj" @hide="hide"></dialog-componet>
......@@ -178,6 +209,13 @@ export default {
protocolId: 22,
protocolContent: '',
isFirst: true, // 是否是第一次(不做更新)
// 小圈
formCircle: {
microecologyId: '', // 小圈id
groupType: 1, // 关联类型:1 全部 2:分组
groupIds: [], // 分组id,全部为[]
},
circleList: [],
};
},
computed: {
......@@ -436,13 +474,15 @@ export default {
next(id) {
vm.projectId = id;
vm.active = 2;
this.getCircleList();
this.getCircleData();
},
// 暂存
save() {
if (vm.active == 1) {
vm.$refs.CustomBaseinfo.save(false);
} else if (vm.active == 2) {
vm.regionComplete();
vm.sendCircleData();
}
},
confirmFn() {
......@@ -468,7 +508,7 @@ export default {
},
// 完成触发的接口
hidefn() {
vm.regionComplete(vm.changeStatus);
vm.sendCircleData(vm.changeStatus);
},
// 选择学元范围暂存
......@@ -572,6 +612,53 @@ export default {
});
},
// 获取圈子列表
getCircleList() {
vm
.GET("circle/portal/circle/list", {})
.then(res => {
// console.log("查询小圈列表", res);
this.circleList = res.data;
});
},
// 获取圈子数据
getCircleData() {
vm
.GET("portal/portalMicroEcology/relation/query", { projectId: this.projectId })
.then(res => {
// console.log("获取圈子数据", res);
if (res.code == "000000" && res.data) {
this.formCircle.microecologyId = res.data.microecologyId;
this.formCircle.groupType = res.data.groupType;
this.formCircle.groupIds = res.data.groupIds;
}
});
},
// 提交、修改圈子数据
sendCircleData(fishFn) {
const { microecologyId, groupType, groupIds } = this.formCircle;
if (!microecologyId) {
vm.$message({
type: "info",
message: "请选择关联小圈"
});
return;
}
const postData = {
projectId: this.projectId,
microecologyId,
groupType,
groupIds: groupType === 1 ? [0] : groupIds,
}
openLoading(vm);
vm.POST("portal/portalMicroEcology/relation/saveOrUpdate", postData).then(res => {
closeLoading(vm);
if (res.code == "000000" && fishFn) {
fishFn();
}
});
},
// 隐藏弹框
hide() {
vm.dialogObj.visible = false;
......
......@@ -569,7 +569,7 @@
</el-tab-pane>
</el-tabs>
</div>
<div v-else>
<!-- <div v-else>
<el-form :inline="true" :model="formOrganization" class="demo-form-inline">
<el-form-item label>
<el-select
......@@ -627,6 +627,34 @@
:total="totalEcology"
></el-pagination>
</div>
</div> -->
<div v-else>
<el-form :model="formCircle" label-width="130px" class="demo-form-inline">
<el-form-item label="关联小圈:" required>
<el-select
size="small"
v-model="formCircle.microecologyId"
placeholder="请选择关联小圈"
:disabled="status4Flag == 1"
>
<el-option
v-for="item in circleList"
:key="item.id"
:label="`${item.id}-${item.name}`"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item v-show="formCircle.microecologyId" label="圈内可见范围:" required>
<el-select
size="small"
v-model="formCircle.groupType"
placeholder="请选择圈内可见范围"
>
<el-option label="全体成员" :value="1"></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<el-dialog title :visible.sync="dialogShow" width="40%" center>
<p class="dialog-p">设定范围数据已经被其他管理员修改,是否强制提交进行覆盖</p>
......@@ -1204,6 +1232,13 @@ export default {
lookedEcology: [],
changedEcology: [],
changedEcology2: [],
// 小圈
formCircle: {
microecologyId: '', // 小圈id
groupType: 1, // 关联类型:1 全部 2:分组
groupIds: [], // 分组id,全部为[]
},
circleList: [],
//选择项目组件 数据
optionsComponent: [],
optionsCertificate: [],
......@@ -1729,8 +1764,10 @@ export default {
this.active++;
this.stepData = [false, true, false];
if (this.formData.scopeType == 1) {
this.getEcologySelect();
//this.getEcology();
this.getCircleList();
this.getCircleData();
// this.getEcologySelect();
// this.getEcology();
return;
}
// this.projectId = res.data.id;
......@@ -2066,26 +2103,28 @@ export default {
//进入第三步
if (this.formData.scopeType == 1) {
//设定小生态范围
if (this.formEcology.ecology == "") {
vm.$message({
type: "info",
message: "请选择小生态范围"
});
return;
}
let req = {};
req.ecology = [];
req.ecology[0] = this.formEcology.ecology;
vm
.POST("portal/scope/v1/" + this.projectId + "/organization", req)
.then(res => {
console.log("设定小生态范围", res);
if (res.code == "000000") {
this.active++;
this.stepData = [false, false, true];
this.tagDrop();
}
});
// if (this.formEcology.ecology == "") {
// vm.$message({
// type: "info",
// message: "请选择小生态范围"
// });
// return;
// }
// let req = {};
// req.ecology = [];
// req.ecology[0] = this.formEcology.ecology;
// vm
// .POST("portal/scope/v1/" + this.projectId + "/organization", req)
// .then(res => {
// console.log("设定小生态范围", res);
// if (res.code == "000000") {
// this.active++;
// this.stepData = [false, false, true];
// this.tagDrop();
// }
// });
// 设定小圈范围
this.sendCircleData();
return;
}
if (this.idType == 1) {
......@@ -3283,7 +3322,54 @@ export default {
});
});
},
//
// 获取圈子列表
getCircleList() {
vm
.GET("circle/portal/circle/list", {})
.then(res => {
// console.log("查询小圈列表", res);
this.circleList = res.data;
});
},
// 获取圈子数据
getCircleData() {
vm
.GET("portal/portalMicroEcology/relation/query", { projectId: this.projectId })
.then(res => {
// console.log("获取圈子数据", res);
if (res.code == "000000" && res.data) {
this.formCircle.microecologyId = res.data.microecologyId;
this.formCircle.groupType = res.data.groupType;
this.formCircle.groupIds = res.data.groupIds;
}
});
},
// 提交、修改圈子数据
sendCircleData() {
const { microecologyId, groupType, groupIds } = this.formCircle;
if (!microecologyId) {
vm.$message({
type: "info",
message: "请选择关联小圈"
});
return;
}
const postData = {
projectId: this.projectId,
microecologyId,
groupType,
groupIds: groupType === 1 ? [0] : groupIds,
}
openLoading(vm);
vm.POST("portal/portalMicroEcology/relation/saveOrUpdate", postData).then(res => {
closeLoading(vm);
if (res.code == "000000") {
this.active++;
this.stepData = [false, false, true];
this.tagDrop();
}
});
},
//机构table修改
handleSizeOrganization(val) {
console.log(`每页 ${val} 条`);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册