Browse Source

办事大厅联调

master
dai 2 years ago
parent
commit
20447cbb4f
  1. 4
      src/utils/cascader.js
  2. 21
      src/views/modules/lingshan/bmfw/bsdt/index.vue

4
src/utils/cascader.js

@ -31,8 +31,8 @@ export function collapse(arr, childName) {
} }
export function getItemBySingleIdInCascader(arr, id, idName, childName) { export function getItemBySingleIdInCascader(arr, id, idName, childName) {
let collapseArr = collapse(arr); let collapseArr = collapse(arr, childName);
return getItemByIdInCascader(collapseArr, [id], idName, childName); return getItemByIdInCascader(collapseArr, [id], idName, childName)[0];
} }
export default { export default {

21
src/views/modules/lingshan/bmfw/bsdt/index.vue

@ -74,9 +74,9 @@ export default {
field: "所属组织", field: "所属组织",
keyName: "orgId", keyName: "orgId",
type: "cascader", type: "cascader",
optionUrl: "/gov/org/customeragency/agencygridtree", optionUrl: "/gov/org/customeragency/agencygridtreeV2",
optionUrlParams: { optionUrlParams: {
agencyId: this.$store.state.user.agencyId, customerId: this.$store.state.user.customerId,
}, },
optionList: [], optionList: [],
optionProps: { optionProps: {
@ -230,9 +230,9 @@ export default {
field: "申请人所属组织", field: "申请人所属组织",
keyName: "applicantOrgId", keyName: "applicantOrgId",
type: "cascader", type: "cascader",
optionUrl: "/gov/org/customeragency/agencygridtree", optionUrl: "/gov/org/customeragency/agencygridtreeV2",
optionUrlParams: { optionUrlParams: {
agencyId: this.$store.state.user.agencyId, customerId: this.$store.state.user.customerId,
}, },
optionList: [], optionList: [],
optionProps: { optionProps: {
@ -248,21 +248,20 @@ export default {
}, },
supKeys: ["applicantOrgType"], supKeys: ["applicantOrgType"],
supValues: [""], supValues: [""],
handleChangeFn(val, item) { handleChangeFn(val, item, that) {
const { optionList } = item; const { optionList } = item;
if (val.length > 0) { if (val.length > 0) {
item["supValues"][0] = getItemBySingleIdInCascader( let type = getItemBySingleIdInCascader(
optionList, optionList,
val, val,
"agencyId", "agencyId",
"subAgencyList" "subAgencyList"
)["level"]; )["level"];
item["supValues"][0] = type = type == "grid" ? "grid" : "agency";
item["supValues"][0] == "grid"
? "grid" that.fmData[item["supKeys"][0]] = type;
: "agency";
} else { } else {
item["supValues"][0] = ""; that.fmData[item["supKeys"][0]] = "";
} }
}, },
rules: [ rules: [

Loading…
Cancel
Save