{"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\\views\\uc\\org\\OrgAuthPage.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\org\\OrgAuthPage.vue","mtime":1675071993444},{"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/es7.symbol.async-iterator\";\nimport \"core-js/modules/es6.symbol\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.array.from\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/xq-web-bpm/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\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//\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//\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//\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//\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//分级组织管理\nimport org from \"@/api/org.js\";\nimport EipUserDialog from \"@/components/dialog/EipUserDialog.vue\";\nimport EipUserSelector from \"@/components/selector/EipUserSelector.vue\";\nexport default {\n  name: \"org-auth-page\",\n  props: [\"orgCode\", \"demCode\"],\n  components: {\n    EipUserDialog: EipUserDialog,\n    EipUserSelector: EipUserSelector\n  },\n  computed: {\n    demDeleteUrl: function demDeleteUrl() {\n      return window.context.uc + \"/api/org/v1/orgAuth/deleteOrgAuth\";\n    },\n    saveRoleUrl: function saveRoleUrl() {\n      var preUrl = window.context.uc + \"/api/org/v1/orgAuth\";\n      preUrl += \"/saveOrgAuth\";\n\n      if (this.orgAuth.id) {\n        this.orgAuth.account = this.orgAuth.userAccount;\n        this.orgAuth.orgCode = this.orgCode;\n        this.orgAuth.demCode = this.demCode;\n      }\n\n      return preUrl;\n    },\n    requestMethod: function requestMethod() {\n      return \"POST\";\n    }\n  },\n  created: function created() {\n    this.$root.$emit(\"resize\");\n  },\n  data: function data() {\n    return {\n      dialogVisible: false,\n      dialogVisibleMenuPerm: false,\n      isSubmit: true,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      loadDataUrl: \"\",\n      menuPerm: {},\n      allowRoles: [],\n      readOnly: false,\n      orgAuth: {\n        account: \"\",\n        //登录账号\n        demCode: \"\",\n        layoutPerms: \"show\",\n        orgCode: \"\",\n        orgPerms: \"\",\n        orgauthPerms: \"\",\n        posPerms: \"\",\n        userId: \"\",\n        userName: \"\",\n        userPerms: \"\"\n      },\n      checkValue: [{\n        key: \"add\",\n        value: \"增加\"\n      }, {\n        key: \"delete\",\n        value: \"删除\"\n      }, {\n        key: \"edit\",\n        value: \"修改\"\n      }],\n      userCheckValue: [{\n        key: \"add\",\n        value: \"增加\"\n      }, {\n        key: \"delete\",\n        value: \"删除\"\n      }, {\n        key: \"edit\",\n        value: \"修改\"\n      }, {\n        key: \"setMaster\",\n        value: \"设置主组织\"\n      }, {\n        key: \"setPos\",\n        value: \"设置岗位\"\n      }],\n      isSelectAll: \"全选\",\n      dialogTitle: \"\"\n    };\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\n  },\n  methods: {\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    checkClick: function checkClick() {\n      this.isSelectAll = \"全选\";\n    },\n    setDemDefault: function setDemDefault(row) {\n      var _this = this;\n\n      org.setDemDefault(row.code).then(function () {\n        _this.$refs.htTable.load();\n      });\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false; // this.$refs[\"orgAuthForm\"].resetField();\n\n      this.orgAuth = {\n        account: \"\",\n        demCode: \"\",\n        layoutPerms: \"show\",\n        orgCode: \"\",\n        orgPerms: \"\",\n        orgauthPerms: \"\",\n        posPerms: \"\",\n        userId: \"\",\n        userName: \"\",\n        userPerms: \"\"\n      };\n      this.loadDataUrl = \"\";\n    },\n    handleCloseMenuPerm: function handleCloseMenuPerm() {\n      this.dialogVisibleMenuPerm = false;\n    },\n    showDialog: function showDialog(row) {\n      this.isSelectAll = \"全选\";\n      this.dialogVisible = true;\n\n      if (row) {\n        this.dialogTitle = \"编辑管理员权限\";\n        this.loadDataUrl = \"/api/org/v1/orgAuth/getOrgAuth?id=\".concat(row.id);\n      } else {\n        this.dialogTitle = \"添加管理员权限\";\n        this.orgAuth = {\n          name: \"\",\n          code: \"\"\n        };\n      }\n    },\n    dialogCancle: function dialogCancle(dialogVisible) {\n      this[dialogVisible] = false;\n      this.orgAuth = {\n        account: \"\",\n        demCode: \"\",\n        layoutPerms: \"show\",\n        orgCode: \"\",\n        orgPerms: \"\",\n        orgauthPerms: \"\",\n        posPerms: \"\",\n        userId: \"\",\n        userName: \"\",\n        userPerms: \"\"\n      };\n      this.loadDataUrl = \"\";\n    },\n    loadData: function loadData(param, cb) {\n      var _this2 = this;\n\n      console.info(param);\n      org.getOrgAuthPage(param, {\n        orgCode: this.orgCode\n      }).then(function (response) {\n        _this2.data = response.rows;\n\n        _this2.$emit(\"orgAuthData\", _this2.data);\n\n        _this2.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    handleCommand: function handleCommand(params) {\n      this.readOnly = false;\n\n      switch (params.command) {\n        case \"editOrgAuthPage\":\n          this.isSelectAll = \"全选\";\n          this.showDialog(params.row);\n          break;\n\n        default:\n          break;\n      }\n    },\n    beforeSaveData: function () {\n      var _beforeSaveData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n        return regeneratorRuntime.wrap(function _callee$(_context) {\n          while (1) {\n            switch (_context.prev = _context.next) {\n              case 0:\n                this.isSubmit = true;\n\n              case 1:\n              case \"end\":\n                return _context.stop();\n            }\n          }\n        }, _callee, this);\n      }));\n\n      function beforeSaveData() {\n        return _beforeSaveData.apply(this, arguments);\n      }\n\n      return beforeSaveData;\n    }(),\n    afterSaveData: function afterSaveData() {\n      this.dialogVisible = false;\n      this.isSelectAll = \"全选\";\n      this.$refs.htTable.load();\n    },\n    afterDelete: function afterDelete() {\n      this.$refs.htTable.load();\n    },\n    afterLoadData: function afterLoadData(data) {\n      var _this3 = this;\n\n      if (this.dialogVisible) {\n        this.orgAuth = data;\n        this.isSelectAllFun();\n        setTimeout(function () {\n          return _this3.$validator.validateAll(\"editDemForm\");\n        }, 500);\n      }\n    },\n    isSelectAllFun: function isSelectAllFun() {\n      if (this.orgAuth[\"orgPerms\"] !== \"add,edit,delete\" || this.orgAuth[\"userPerms\"] !== \"add,edit,delete,setMaster,setPos\" || this.orgAuth[\"posPerms\"] !== \"add,edit,delete\" || this.orgAuth[\"orgauthPerms\"] !== \"add,edit,delete\" || this.orgAuth[\"layoutPerms\"] !== \"add,edit,delete\") {\n        this.isSelectAll = \"全选\";\n      } else {\n        this.isSelectAll = \"取消全选\";\n      }\n    },\n    selectUser: function selectUser() {\n      this.$refs.eipUserDialog.showDialog();\n    },\n    addUnderUser: function addUnderUser(selection) {\n      if (!selection || selection.length != 1) {\n        this.$message.error(\"有且只能有一个用户\");\n        return;\n      }\n\n      var _iterator = _createForOfIteratorHelper(selection),\n          _step;\n\n      try {\n        for (_iterator.s(); !(_step = _iterator.n()).done;) {\n          var user = _step.value;\n          this.orgAuth.account = user.account; // this.orgAuth.userName = user.fullname\n\n          this.$set(this.orgAuth, \"userName\", user.fullname);\n          this.orgAuth.orgCode = this.orgCode;\n          this.orgAuth.demCode = this.demCode;\n        }\n      } catch (err) {\n        _iterator.e(err);\n      } finally {\n        _iterator.f();\n      }\n    },\n    selectAll: function selectAll() {\n      //全选操作\n      if (this.isSelectAll === \"全选\") {\n        this.isSelectAll = \"取消全选\";\n        this.$set(this.orgAuth, \"orgPerms\", \"add,edit,delete\");\n        this.$set(this.orgAuth, \"userPerms\", \"add,edit,delete,setMaster,setPos\");\n        this.$set(this.orgAuth, \"posPerms\", \"add,edit,delete\");\n        this.$set(this.orgAuth, \"orgauthPerms\", \"add,edit,delete\");\n        this.$set(this.orgAuth, \"layoutPerms\", \"add,edit,delete\");\n      } else {\n        this.isSelectAll = \"全选\";\n        this.$set(this.orgAuth, \"orgPerms\", \"\");\n        this.$set(this.orgAuth, \"userPerms\", \"\");\n        this.$set(this.orgAuth, \"posPerms\", \"\");\n        this.$set(this.orgAuth, \"orgauthPerms\", \"\");\n        this.$set(this.orgAuth, \"layoutPerms\", \"\");\n      }\n    },\n    valueChange: function valueChange() {\n      this.orgAuth.orgCode = this.orgCode;\n      this.orgAuth.demCode = this.demCode;\n    }\n  }\n};",null]}