{"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\\EipUserSelector.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\components\\bizComponents\\eipControl\\selector\\EipUserSelector.vue","mtime":1675071991569},{"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-user-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: \"fullname\",\n        label: \"名称\",\n        width: \"120\"\n      }, {\n        prop: \"account\",\n        label: \"账号\",\n        width: \"120\"\n      }, {\n        prop: \"mobile\",\n        label: \"手机\",\n        width: \"120\"\n      }, {\n        prop: \"email\",\n        label: \"邮件\"\n      }],\n      pagination: {\n        page: 1,\n        pageSize: 50,\n        total: 0,\n        showTotal: true\n      }\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    // 没有值而且需要显示当前用户\n    if (!this.value && this.selectCurrent) {\n      var user = null;\n\n      if (this.$store.state.user.currentUserDetail == null) {\n        this.$store.dispatch(\"user/loadCurrentUserDetail\").then(function (currentUserDetail) {\n          user = currentUserDetail.user;\n        }).then(function () {\n          _this2.initCurrentValue(user);\n        });\n      } else {\n        user = this.$store.state.user.currentUserDetail.user;\n        this.initCurrentValue(user);\n      }\n    }\n  },\n  methods: {\n    initCurrentValue: function initCurrentValue(user) {\n      this.$emit(\"input\", user.fullname); // 同时更新绑定的字段\n\n      if (this.config) {\n        // 配置了id的绑定关系，则回填到指定属性上\n        if (this.config.hasOwnProperty(\"id\")) {\n          utils.setValueByConfigKey(this, this.config, \"id\", user.id);\n        } // 配置了fullname的绑定关系，则回填到指定的属性上\n\n\n        if (this.config.hasOwnProperty(\"fullname\")) {\n          utils.setValueByConfigKey(this, this.config, \"fullname\", user.fullname);\n        } // 配置了account的绑定关系，则回填到指定的属性上\n\n\n        if (this.config.hasOwnProperty(\"account\")) {\n          utils.setValueByConfigKey(this, this.config, \"account\", user.account);\n        }\n\n        if (this.config.hasOwnProperty(\"mobile\")) {\n          utils.setValueByConfigKey(this, this.config, \"mobile\", user.mobile);\n        }\n\n        if (this.config.hasOwnProperty(\"email\")) {\n          utils.setValueByConfigKey(this, this.config, \"email\", user.email);\n        }\n      }\n    },\n    handleLoad: function handleLoad(param, cb) {\n      var queryFilter = param;\n\n      if (param.path) {\n        queryFilter.pageBean = {\n          page: 1,\n          pageSize: 50,\n          total: 0,\n          showTotal: true\n        };\n        var query = {\n          property: \"path_\",\n          value: param.path,\n          group: \"main\",\n          operation: \"RIGHT_LIKE\",\n          relation: \"AND\"\n        };\n\n        if (!queryFilter.querys) {\n          queryFilter.querys = [];\n        }\n\n        queryFilter.querys.push(query);\n      }\n\n      var _this = this;\n\n      this.$http.post(\"${uc}/api/user/v1/users/queryByType\", queryFilter).then(function (rep) {\n        var data = rep.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 () {\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    loadOrgUser: function loadOrgUser(org) {\n      // 根据组织获取用户\n      this.handleLoad({\n        path: org.path\n      }, 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]}