{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\bizComponents\\eipControl\\selector\\EipOrgSelector.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\bizComponents\\eipControl\\selector\\EipOrgSelector.vue","mtime":1675071991522},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.function.name\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport utils from \"@/hotent-ui-util.js\";\nimport sub_pio_mixin from \"@/components/bizComponents/sub-permission-mixin.js\";\nexport default {\n  name: \"eip-org-selector\",\n  props: {\n    validate: [String, Object],\n    value: String,\n    name: String,\n    placeholder: String,\n    permission: String,\n    single: Boolean,\n    config: Object,\n    appendToBody: {\n      type: Boolean,\n      default: false\n    },\n    selectCurrent: Boolean\n  },\n  mixins: [sub_pio_mixin],\n  //混入方式引入表单组件中公共属性，处理子表、孙表行内联动（切面修改permission）\n  data: function data() {\n    return {\n      data: [],\n      demensions: [],\n      defaultDemension: \"\",\n      orgs: [],\n      tableColumns: [{\n        prop: \"name\",\n        label: \"名称\"\n      }, {\n        prop: \"code\",\n        label: \"编码\"\n      }, {\n        prop: \"pathName\",\n        label: \"路径\"\n      }],\n      pagination: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      orgLength: 0\n    };\n  },\n  computed: {\n    inputName: function inputName() {\n      var labeldesc = \"\";\n\n      if (this.$slots && this.$slots.labeldesc && this.$slots.labeldesc[0].children && this.$slots.labeldesc[0].children[0].text) {\n        labeldesc = this.$slots.labeldesc[0].children[0].text;\n        return this.name ? this.name : utils.getName() + \"-\" + labeldesc;\n      } else {\n        return this.name ? this.name : utils.getName();\n      }\n    }\n  },\n  mounted: function mounted() {\n    var _this2 = this;\n\n    this.$nextTick(function () {\n      // 没有值而且需要显示当前组织\n      if (!_this2.value && _this2.selectCurrent) {\n        var org = null;\n\n        if (_this2.$store.state.user.currentOrgDetail == null) {\n          _this2.$store.dispatch(\"user/loadCurrentUserDetail\").then(function (currentOrgDetail) {\n            org = currentOrgDetail.org[0];\n          }).then(function () {\n            _this2.initCurrentOrg(org);\n          });\n        } else {\n          org = _this2.$store.state.user.currentUserDetail.org[0];\n\n          _this2.initCurrentOrg(org);\n        }\n      }\n    });\n  },\n  methods: {\n    initCurrentOrg: function initCurrentOrg(org) {\n      var _this3 = this;\n\n      if (org && this.config) {\n        // 配置了id的绑定关系，则回填到指定属性上\n        if (this.config.hasOwnProperty(\"id\")) {\n          utils.setValueByConfigKey(this, this.config, \"id\", org.orgId);\n        } // 配置了code的绑定关系，则回填到指定的属性上\n\n\n        if (this.config.hasOwnProperty(\"code\")) {\n          utils.setValueByConfigKey(this, this.config, \"code\", org.orgCode);\n        } // 配置了name的绑定关系，则回填到指定的属性上\n\n\n        if (this.config.hasOwnProperty(\"name\")) {\n          utils.setValueByConfigKey(this, this.config, \"name\", org.orgName);\n        } // 配置了pathName的绑定关系，则回填到指定的属性上\n\n\n        if (this.config.hasOwnProperty(\"pathName\")) {\n          utils.setValueByConfigKey(this, this.config, \"pathName\", org.pathName);\n        }\n      }\n\n      org && setTimeout(function () {\n        _this3.$emit(\"input\", org.orgName);\n      });\n    },\n    handleLoad: function handleLoad(param, cb) {\n      var _this = this;\n\n      this.$http.post(\"${uc}/api/org/v1/orgs/getOrgPage\", param).then(function (response) {\n        var data = response.data;\n        _this.data = data.rows;\n        _this.pagination.page = data.page;\n        _this.pagination.pageSize = data.pageSize;\n        _this.pagination.total = data.total;\n      }).finally(function (err) {\n        cb();\n      });\n    },\n    valueChange: function valueChange(value) {\n      this.$emit(\"input\", value);\n    },\n    loadOrgTree: function loadOrgTree(node, resolve) {\n      if (node && node.data && node.data.isParent) {\n        if (node.data.children) {\n          resolve(node.data.children);\n        } else {\n          this.$http.post(\"${uc}/api/org/v1/orgs/getByParentAndDem\", {\n            demId: node.data.demId,\n            parentId: node.data.id\n          }).then(function (rep) {\n            resolve(rep.data);\n          }).catch(function (error) {});\n        }\n      } else {\n        resolve([]);\n      }\n    },\n    changeDemension: function changeDemension(currentDemensionId) {\n      // 维度改变 重新获取组织\n      var _this = this;\n\n      this.$http.post(\"${uc}/api/org/v1/orgs/getByParentAndDem\", {\n        demId: currentDemensionId\n      }).then(function (rep) {\n        _this.orgs = utils.tile2nest(rep.data);\n      }).catch(function (error) {});\n    },\n    loadOrgs: function loadOrgs(org) {\n      // 获取当前组织及下级组织\n      var queryFilter = {\n        pageBean: this.pagination,\n        querys: []\n      };\n      var query = {\n        property: \"path\",\n        value: org.path,\n        group: \"main\",\n        operation: \"RIGHT_LIKE\",\n        relation: \"AND\"\n      };\n      queryFilter.querys.push(query);\n      this.handleLoad(queryFilter, function () {});\n    },\n    loadDemensions: function loadDemensions() {\n      if (this.demensions.length == 0) {\n        var _this = this;\n\n        this.$http.get(\"${uc}/api/demension/v1/dems/getAll\").then(function (rep) {\n          var data = rep.data;\n          _this.demensions = data;\n          data.forEach(function (element) {\n            if (element.isDefault == 1) {\n              _this.defaultDemension = element.id;\n            }\n          });\n\n          if (!_this.defaultDemension) {\n            _this.defaultDemension = data[0].id;\n          }\n        }).catch(function (error) {});\n      }\n    }\n  }\n};",null]}