提交 8b43fe7e 编写于 作者: zhentian.jia's avatar zhentian.jia

小生接口联调

上级 dd41f7a3
...@@ -455,7 +455,7 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) => ...@@ -455,7 +455,7 @@ export const doUpload = (self,file, filePath, previewId,progressId, fileType) =>
// obj.css('max-width', '100%'); // obj.css('max-width', '100%');
// } // }
},2000); },500);
}; };
......
...@@ -173,11 +173,11 @@ ...@@ -173,11 +173,11 @@
<el-form-item label=""> <el-form-item label="">
<el-radio-group <el-radio-group
size="small" size="small"
v-model="formData.range" v-model="formData.scopeType"
:disabled="peopleLevel == 'L3'" :disabled="peopleLevel == 'L3' || projectStatus != 1"
> >
<el-radio :label="1">使用地区范围</el-radio> <el-radio :label="0">使用地区范围</el-radio>
<el-radio :label="2">使用小生态范围</el-radio> <el-radio :label="1">使用小生态范围</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="添加下载文件:"> <el-form-item label="添加下载文件:">
...@@ -204,7 +204,7 @@ ...@@ -204,7 +204,7 @@
</el-form> </el-form>
</div> </div>
<div class="second-step" v-else-if="active === 1"> <div class="second-step" v-else-if="active === 1">
<div v-if='formData.range !=2'> <div v-if='formData.scopeType != 1'>
<el-tabs v-model="activeName" @tab-click="handleClickTabs"> <el-tabs v-model="activeName" @tab-click="handleClickTabs">
<el-tab-pane v-if="idType != 2" label="设定行政范围" name="first"> <el-tab-pane v-if="idType != 2" label="设定行政范围" name="first">
<el-row :gutter="20"> <el-row :gutter="20">
...@@ -474,7 +474,7 @@ ...@@ -474,7 +474,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<span class="span_ecology">{{ checkedEcology }}</span> <span class="span_ecology">{{ checkedEcology }}</span>
<el-form-item style="float:right;"> <!-- <el-form-item style="float:right;">
<el-button-group> <el-button-group>
<el-button <el-button
size="small" size="small"
...@@ -487,21 +487,23 @@ ...@@ -487,21 +487,23 @@
@click="checkAllEcology(false)" @click="checkAllEcology(false)"
>全部不选</el-button> >全部不选</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item> -->
</el-form> </el-form>
<!--
@selection-change="selectionChangeEcology"
:row-key="getRowKeysEcology"
-->
<el-table <el-table
class="rim" class="rim"
ref="multipleEcology" ref="multipleEcology"
:data="tableEcology" :data="tableEcology"
tooltip-effect="dark" tooltip-effect="dark"
style="width: 100%" style="width: 100%"
@selection-change="selectionChangeEcology"
:row-key="getRowKeysEcology"
> >
<el-table-column <el-table-column
type="selection" type="selection"
width="55" width="55"
:selectable="selectableTableList" :selectable="selectableTableEcology"
:reserve-selection="true" :reserve-selection="true"
></el-table-column> ></el-table-column>
<el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column> <el-table-column prop="name" label="医院名称" min-width="100" align="center"></el-table-column>
...@@ -666,7 +668,7 @@ export default { ...@@ -666,7 +668,7 @@ export default {
attachmentUrl3: "", attachmentUrl3: "",
attachmentMore1: {}, attachmentMore1: {},
attachmentMore2: {}, attachmentMore2: {},
range: 1, scopeType: 0,
}, },
pickerOptions0: { pickerOptions0: {
disabledDate: time => { disabledDate: time => {
...@@ -946,7 +948,7 @@ export default { ...@@ -946,7 +948,7 @@ export default {
attachmentExt: editData.attachmentData[1].attachmentExt, attachmentExt: editData.attachmentData[1].attachmentExt,
attachmentSize: editData.attachmentData[1].attachmentSize attachmentSize: editData.attachmentData[1].attachmentSize
}, },
range: 2 scopeType: editData.projectData.scopeType,
}; };
if (editData.attachmentData.length > 2) { if (editData.attachmentData.length > 2) {
for (let i = 2; i < editData.attachmentData.length; i++) { for (let i = 2; i < editData.attachmentData.length; i++) {
...@@ -1008,7 +1010,8 @@ export default { ...@@ -1008,7 +1010,8 @@ export default {
projectName: this.formData.projectName, projectName: this.formData.projectName,
projectBegintime: this.formData.projectBegintime, projectBegintime: this.formData.projectBegintime,
projectEndtime: this.formData.projectEndtime, projectEndtime: this.formData.projectEndtime,
projectIntro: this.formData.projectIntro projectIntro: this.formData.projectIntro,
scopeType: this.formData.scopeType,
}; };
let attachmentModel = [ let attachmentModel = [
{ {
...@@ -1078,9 +1081,9 @@ export default { ...@@ -1078,9 +1081,9 @@ export default {
if (option != "storage" && option != "storageEdit") { if (option != "storage" && option != "storageEdit") {
this.active++; this.active++;
this.stepData = [false, true, false]; this.stepData = [false, true, false];
if(this.formData.range == 2) { if(this.formData.scopeType == 1) {
this.getEcologySelect(); this.getEcologySelect();
this.getEcology(); //this.getEcology();
return; return;
} }
// this.projectId = res.data.id; // this.projectId = res.data.id;
...@@ -1322,6 +1325,29 @@ export default { ...@@ -1322,6 +1325,29 @@ export default {
} }
} else if (this.active == 1) { } else if (this.active == 1) {
//进入第三步 //进入第三步
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];
}
}
);
return;
}
if (this.idType == 1) { if (this.idType == 1) {
//内部管理员 //内部管理员
if (this.tagsRegion.length > 0 || this.idTypeProject == 2) { if (this.tagsRegion.length > 0 || this.idTypeProject == 2) {
...@@ -1884,6 +1910,9 @@ export default { ...@@ -1884,6 +1910,9 @@ export default {
} }
return true; return true;
}, },
selectableTableEcology(row, index) {
return false;
},
//改变 设定机构选项 //改变 设定机构选项
selectionChangeOrganization(rows) { selectionChangeOrganization(rows) {
this.changedOrganization = []; this.changedOrganization = [];
...@@ -1961,14 +1990,6 @@ export default { ...@@ -1961,14 +1990,6 @@ export default {
this.changedEcology2 this.changedEcology2
); );
}, },
selectChangeEcology(value) {
// console.log('select',value);
for(let i=0;i<this.ecologySelect.length;i++) {
if(this.ecologySelect[i].value == value) {
this.checkedEcology = this.ecologySelect[i].label;
}
}
},
//设定机构table全选 //设定机构table全选
checkAll(flag, name) { checkAll(flag, name) {
if (name == "multipleOrganization") { if (name == "multipleOrganization") {
...@@ -2665,25 +2686,95 @@ export default { ...@@ -2665,25 +2686,95 @@ export default {
} }
return list; return list;
}, },
//选择小生态
selectChangeEcology(value) {
//console.log('select',value);
for(let i=0;i<this.ecologySelect.length;i++) {
if(this.ecologySelect[i].value == value) {
this.checkedEcology = this.ecologySelect[i].label;
}
}
this.formEcology.ecology = value;
this.getEcology();
},
getEcologySelect() { getEcologySelect() {
let req = {}; let req = {};
vm.GET("portal/scope/v1/"+this.projectId+"/ecology", req).then( vm.GET("portal/scope/v1/"+this.projectId+"/ecology", req).then(
res => { res => {
console.log('查询小生态列表',res); console.log('查询小生态列表',res);
this.ecologySelect = operationData.getEcologySelect(res.data.list); this.ecologySelect = operationData.getEcologySelect(res.data.list);
this.formEcology.ecology = res.data.chooseIdList[0];
this.getEcology();
} }
); );
}, },
initEcology() {
let tableStatus = this.tableEcology;
if(typeof tableStatus === 'undefined') {
return;
}
tableStatus.forEach(row => {
let idList = [];
idList[0] = row.id;
let intersect = operationData.getIntersect(idList,this.changedEcology);
let intersect2 = operationData.getIntersect(idList,this.changedEcology2);
// debugger;
if(intersect.length > 0) {
//选中
} else if (intersect2.length > 0) {
//不选
} else {
if (row.status == 1) {
this.$nextTick(function() {
this.$refs.multipleEcology.toggleRowSelection(row);
});
}
}
});
},
//获取小生态数据 //获取小生态数据
getEcology() { getEcology() {
let req = {}; let req = {};
req = this.formEcology; req = this.formEcology;
openLoading(vm);
vm.GET("portal/scope/v1/"+this.projectId+"/organization", req).then( vm.GET("portal/scope/v1/"+this.projectId+"/organization", req).then(
res => { res => {
closeLoading(vm);
console.log('根基小生态查询机构列表信息',res); console.log('根基小生态查询机构列表信息',res);
this.tableEcology = res.data.organizationList;
this.totalEcology = res.data.total;
let tableStatus = this.tableEcology;
tableStatus.forEach(row => {
this.$refs.multipleEcology.toggleRowSelection(row);
});
// let idList = operationData.getIdList(this.tableEcology);
// let intersect = operationData.getIntersect(
// idList,
// this.changedEcology
// );
// this.lookedEcology = operationData.getUnion(
// this.lookedEcology,
// idList
// );
// let difference = operationData.getDifference(
// idList,
// this.changedEcology2
// );
// if (vm.checkTableEcology === "") {
// this.initEcology();
// } else if (vm.checkTableEcology === true) {
// let intersect2 = operationData.getIntersect(
// idList,
// this.changedEcology
// );
// if (intersect2.length == 0) {
// this.$refs.multipleEcology.toggleAllSelection();
// }
// }
} }
); );
this.tableEcology = operationData.getEcologyList();
}, },
// //
//机构table修改 //机构table修改
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册