提交 00dbb42f 编写于 作者: haochangdi's avatar haochangdi

修改 设定机构的设定行政范围

上级 9610cdc9
......@@ -239,7 +239,8 @@ export default {
});
}
}
}
},
regio: '' //设定行政范围选择的范围
}
},
created() {
......@@ -252,7 +253,8 @@ export default {
methods: {
//查询机构列表
getOrganization(r) {
console.log('=========================getOrganization')
this.regio = r;
this.formOrganization.administrativeIdList = ["0"];
let req = {
projectId: this.projectId,
administrativeId: "",
......@@ -279,12 +281,11 @@ export default {
},
//设定的行政范围内容
getScope(type) {
console.log('=========================getScope')
console.log('=========================getScope')
if (vm.idType == 2) {
return null;
}
let scope = "";
let noChangeTree = this.getTreeCheck();
if (type == "administrative") {
for (let i = 0; i < this.tagsRegion.length; i++) {
scope += this.tagsRegion[i].key;
......@@ -292,56 +293,12 @@ export default {
scope += "|";
}
}
} else if (type == "administrativeUpdate") {
console.log("this.allSelectedKeys", this.allSelectedKeys);
if (this.allSelectedKeys.length > 0) {
for (let i = 0; i < this.allSelectedKeys.length; i++) {
scope +=
this.allSelectedKeys[i].key + ":" + this.allSelectedKeys[i].type;
if (i < this.allSelectedKeys.length - 1) {
scope += "|";
}
}
} else {
// let noChangeTree = this.getTreeCheck();
console.log("noChangeTree值", noChangeTree);
if (noChangeTree.length > 0) {
for (let i = 0; i < noChangeTree.length; i++) {
scope += noChangeTree[i].key + ":" + noChangeTree[i].type;
if (i < noChangeTree.length - 1) {
scope += "|";
}
}
} else {
//选全国项目
if (this.tagsRegion.length > 0 && this.tagsRegion[0].key == "000") {
scope = "000:1";
console.log(this.tagsRegion, "scope", scope);
}
}
}
}
//console.log(scope);
if (scope == "") {
return null;
}
return scope;
},
// 获取行政范围树
getTreeCheck() {
console.log('=========================getTreeCheck')
//重构归并树
// let checkedTree = operationData.getSimpleCheckedNodes(
// this.$refs.tree.store
// );
let halfCheckedTree = this.$refs.tree.getHalfCheckedKeys();
let allSelectedKeys = operationData.setSelectedKeys(
checkedTree,
halfCheckedTree
);
vm.allSelectedKeys = allSelectedKeys;
//重构内容
return allSelectedKeys;
},
//获取地区select
getRegionOption() {
......@@ -515,7 +472,8 @@ export default {
];
let req = {
fileArray: fileArray,
scopeOfAdministrative: vm.getScope("administrative")
// scopeOfAdministrative: vm.getScope("administrative")
scopeOfAdministrative: this.regio
};
let projectId = vm.projectId;
console.log("req", req);
......@@ -602,7 +560,8 @@ export default {
pageNum: this.formOrganization.pageNum,
pageSize: this.formOrganization.pageSize,
// scope: this.getScope("administrative")
scope: '000'
scope: this.regio
// scope: '000'
};
openLoading(vm);
// vm.POST("portal/scope/v1/organization/choose", req).then(res => {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册