{"remainingRequest":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xypm-web\\src\\components\\dialog\\EipUserDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xypm-web\\src\\components\\dialog\\EipUserDialog.vue","mtime":1675214576792},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xypm-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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\r\nimport utils from '@/hotent-ui-util.js'\r\n\r\nexport default {\r\n  name: 'eip-user-dialog',\r\n  props: {\r\n    value: Array,\r\n    name: String,\r\n    single: Boolean,\r\n    appendToBody: {\r\n      type: Boolean,\r\n      default: false,\r\n    },\r\n    destroyOnClose: {\r\n      type: Boolean,\r\n      default: false,\r\n    },\r\n  },\r\n  data() {\r\n    return {\r\n      data: [],\r\n      demensions: [],\r\n      userData: [],\r\n      defaultShow: [],\r\n      defaultCheckedKeys: [],\r\n      defaultDemension: null,\r\n      orgs: [],\r\n      tableColumns: [\r\n        {prop: 'fullname', label: '名称', width: '120'},\r\n        {prop: 'account', label: '账号', width: '120'},\r\n        {prop: 'email', label: '邮件', width: '260'},\r\n      ],\r\n      pagination: {\r\n        page: 1,\r\n        pageSize: 50,\r\n        total: 0,\r\n        showTotal: true,\r\n      },\r\n      curCheckedOrgId: '1450049651863588864',\r\n    }\r\n  },\r\n  created() {},\r\n  mounted() {},\r\n  methods: {\r\n    showDialog(selectors) {\r\n      this.$http\r\n        .get('${uc}/api/demension/v1/dems/getAll')\r\n        .then((rep) => {\r\n          let data = rep.data\r\n          this.demensions = data\r\n          data.forEach((element) => {\r\n            if (element.isDefault == 1) {\r\n              this.defaultDemension = element.id\r\n            }\r\n          })\r\n          if (!this.defaultDemension) {\r\n            this.defaultDemension = data[0].id\r\n          }\r\n          this.$refs.htUserDialog.showDialog(selectors)\r\n        })\r\n        .catch(function (error) {})\r\n    },\r\n    reset(org) {\r\n      // 根据组织获取用户\r\n      this.curCheckedOrgId = '1450049651863588864'\r\n    },\r\n    handleLoad(param, cb) {\r\n      let queryFilter = param\r\n      queryFilter.querys = queryFilter.querys || []\r\n      // if (queryFilter.querys.length > 0 && queryFilter.pageBean) {\r\n      //   queryFilter.pageBean.page = 1;\r\n      // }\r\n      queryFilter.pageBean = {\r\n        page: 1,\r\n        pageSize: 50,\r\n        total: 0,\r\n        showTotal: true,\r\n      }\r\n      let query = {\r\n        property: 'org_id_',\r\n        value: this.curCheckedOrgId,\r\n        group: 'orgQuery',\r\n        operation: 'EQUAL',\r\n        relation: 'AND',\r\n      }\r\n      queryFilter.querys.push(query)\r\n\r\n      this.$http\r\n        .post('${uc}/api/user/v1/users/queryByType', queryFilter)\r\n        .then((rep) => {\r\n          let data = rep.data\r\n          this.data = data.rows\r\n          this.pagination.page = data.page\r\n          this.pagination.pageSize = data.pageSize\r\n          this.pagination.total = data.total\r\n        })\r\n        .finally(() => {\r\n          cb()\r\n        })\r\n    },\r\n    loadOrgTree(node, resolve) {\r\n      if (node && node.data && node.data.isParent) {\r\n        if (node.data.children) {\r\n          resolve(node.data.children)\r\n        } else {\r\n          this.$http\r\n            .post('${uc}/api/org/v1/orgs/getByParentAndDem', {\r\n              demId: node.data.demId,\r\n              parentId: node.data.id,\r\n            })\r\n            .then((rep) => {\r\n              this.userData = rep.data\r\n              resolve(rep.data)\r\n            })\r\n            .catch(function (error) {})\r\n        }\r\n      } else {\r\n        resolve([])\r\n      }\r\n    },\r\n    changeDemension(currentDemensionId) {\r\n      this.$http\r\n        .post('${uc}/api/org/v1/orgs/getByParentAndDem', {\r\n          demId: currentDemensionId,\r\n        })\r\n        .then((rep) => {\r\n          this.orgs = utils.tile2nest(rep.data)\r\n          this.defaultShow = this.orgs[0].children[0].id\r\n          this.defaultCheckedKeys = '1450049651863588864'\r\n        })\r\n        .catch(function (error) {})\r\n    },\r\n    loadOrgUser(org) {\r\n      // 根据组织获取用户\r\n      this.curCheckedOrgId = org.id\r\n      if (this.$refs.htUserDialog && this.$refs.htUserDialog.$refs.selector) {\r\n        this.$refs.htUserDialog.$refs.selector.load()\r\n      }\r\n    },\r\n    onConfirm(selection) {\r\n      this.$emit('onConfirm', selection, this.name)\r\n      this.$emit('input', selection)\r\n    },\r\n  },\r\n}\r\n",null]}