Commit 460480fd by zhangzhijie

内蒙立案单位省队显示所有单位,市局可显示所有分局

parent 9dd84695
......@@ -541,7 +541,6 @@ export default {
getCurrentUnit(unitcode, unitList, arr) {
for (let i = 0; i < unitList.length; i++) {
if (unitcode == unitList[i].id) {
//console.log(unitList[i]);
arr.push(unitList[i]);
}
}
......@@ -551,6 +550,19 @@ export default {
}
}
},
getCurrentUnitNM(unitcode, unitList, arr) {
for (let i = 0; i < unitList.length; i++) {
if (unitList[i].id.indexOf(unitcode) == 0) {
arr.push(unitList[i]);
break;
}
}
if (arr.length == 0) {
for (let i = 0; i < unitList.length; i++) {
this.getCurrentUnitNM(unitcode, unitList[i].children, arr);
}
}
},
setAjbzHtms(row) {
this.ajbzHtDialog = true;
this.ajbzHtParam.asjbh = row.asjbh;
......@@ -947,14 +959,23 @@ export default {
}
});
let unitcode = JSON.parse(sessionStorage.getItem("userInfo")).unitcode;
if (unitcode.indexOf("00") == "4" && this.pageBs == "queryAjNM") {
unitcode = unitcode.substring(0, 4) + "00000000";
if (this.pageBs == "queryAjNM" || this.pageBs == "checkAjbzInfo") {
if (unitcode.substring(2) == '0000000000') {
unitcode = unitcode.substring(0, 2);
} else if (unitcode.substring(4, 6) == "00") {
unitcode = unitcode.substring(0, 4)
} else if (unitcode.substring(6) == "000000") {
unitcode = unitcode.substring(0, 6)
} else if (unitcode.substring(8) == "0000") {
unitcode = unitcode.substring(0, 8)
} else if (unitcode.substring(10) == "00") {
unitcode = unitcode.substring(0, 10)
}
}
if (this.pageBs == "queryAjNM" || this.pageBs == "checkAjbzInfo") {
axios.get(`JsonData/CODE_UNITNM.json`).then((res) => {
let arr = [];
this.getCurrentUnit(unitcode, res.data.rows, arr);
console.log(arr);
this.getCurrentUnitNM(unitcode, res.data.rows, arr);
self.$set(self.propQueryField[1], "codeOptions", arr);
});
} else if (this.pageBs == "queryAjHN" || this.pageBs == "checkAjbzInfoHN") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment