{"remainingRequest":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/thread-loader/dist/cjs.js!/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/babel-loader/lib/index.js!/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/cache-loader/dist/cjs.js??ref--0-0!/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/vue-loader/lib/index.js??vue-loader-options!/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/src/components/admin/DeptAdmin/DeptRoleAuthenticate.vue?vue&type=script&lang=js&","dependencies":[{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/src/components/admin/DeptAdmin/DeptRoleAuthenticate.vue","mtime":1742796810165},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/babel.config.js","mtime":1742796810089},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/thread-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/babel-loader/lib/index.js","mtime":315532800000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/vue-loader/lib/index.js","mtime":1655715099000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/@babel/runtime-corejs2/helpers/esm/defineProperty.js\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"/data/jenkins/workspace/badp-bcxin-web-5.x-kms/src/badp-bcxin-5.x/obpm-kms-web/kmspc/node_modules/@babel/runtime-corejs2/helpers/esm/asyncToGenerator.js\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nimport API from \"@/api.js\"; // const ROLE={\n// ROLE_SUPERADMIN : \"KMSUPERADMINROLEID\", //企业知识管理员\n// ROLE_DEPTADMIN : \"KMDEPTADMINROLEID\", //部门知识管理员\n// ROLE_COMMITTEEADMIN : \"KMCOMMITTEEADMINROLEID\", //专委会知识管理员\n// ROLE_MEMBER : \"KMNORMALROLEID\" //普通员工\n// }\n\nexport default {\n name: 'deptroleauthenticate',\n data: function data() {\n return {\n user: {},\n usersData: {},\n multipleSelectionArray: [],\n selectedUserIds: [],\n //选择用户的集合\n selectedRoleIds: [],\n //选择角色的集合\n defaultRoleValue: [],\n //编辑角色\n params: {\n \"departmentId\": \"\",\n //选中部门的id\n \"departmentName\": \"\",\n \"nameOrAccount\": \"\",\n \"roleId\": \"\",\n \"linesPerPage\": 15,\n \"pageNo\": 1\n },\n isKmRealm: false,\n roleVisible: false,\n //批量授权\n editSingleRole: false,\n subVisible: false,\n defaultDepartment: \"\"\n };\n },\n mounted: function () {\n var _mounted = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n var params;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (this.$store.state.user.defaultDepartment) {\n this.defaultDepartment = this.$store.state.user.defaultDepartment;\n }\n\n _context.next = 3;\n return this.getMyProfile();\n\n case 3:\n params = _objectSpread({}, this.params);\n params.departmentId = this.defaultDepartment;\n this.params = params;\n this.getInitData();\n this.getUsersData(params);\n\n case 8:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function mounted() {\n return _mounted.apply(this, arguments);\n }\n\n return mounted;\n }(),\n methods: {\n /**\n * 获取当前用户信息\n */\n getMyProfile: function () {\n var _getMyProfile = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {\n var user;\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _context2.next = 2;\n return API.getMyProfileAwait();\n\n case 2:\n user = _context2.sent.data;\n this.defaultDepartment = user.data.defaultDepartment;\n\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function getMyProfile() {\n return _getMyProfile.apply(this, arguments);\n }\n\n return getMyProfile;\n }(),\n getInitData: function () {\n var _getInitData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {\n var kmTeamAndRealm, isKmRealm;\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n _context3.next = 2;\n return API.getKmTeamAndRealm();\n\n case 2:\n kmTeamAndRealm = _context3.sent.data;\n isKmRealm = kmTeamAndRealm[\"kmRealm\"];\n this.isKmRealm = isKmRealm;\n\n case 5:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function getInitData() {\n return _getInitData.apply(this, arguments);\n }\n\n return getInitData;\n }(),\n //初始化时获取用户列表\n getUsersData: function () {\n var _getUsersData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(params) {\n var result, data;\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _context4.next = 2;\n return API.getUsers(params);\n\n case 2:\n result = _context4.sent.data;\n\n if (result.errcode == 0) {\n data = result.data;\n\n if (data.datas.length > 0) {\n data.datas.map(function (e) {\n e.key = e.id;\n });\n }\n\n this.usersData = data;\n } else {\n this.$message({\n type: 'warning',\n message: result.errmsg\n });\n }\n\n case 4:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function getUsersData(_x) {\n return _getUsersData.apply(this, arguments);\n }\n\n return getUsersData;\n }(),\n\n /**\n * 选择角色查询\n */\n onChangeRole: function onChangeRole() {\n var params = _objectSpread({}, this.params);\n\n this.getUsersData(params);\n },\n\n /**\n * 清除选中角色\n */\n onClearRole: function onClearRole() {\n var params = _objectSpread({}, this.params);\n\n params.roleId = \"\";\n this.params = params;\n this.getUsersData(params);\n },\n\n /**\n * 清除名称或账号\n */\n clearNameOrAccount: function clearNameOrAccount() {\n var params = _objectSpread({}, this.params);\n\n params.nameOrAccount = \"\";\n this.params = params;\n this.getUsersData(params);\n },\n\n /**\n * 显示角色授权对话框\n */\n showRoleAuthorizationDialog: function showRoleAuthorizationDialog() {\n this.roleVisible = true;\n },\n\n /**\n * 修改页码\n */\n handleCurrentChange: function handleCurrentChange(val) {\n var params = _objectSpread(_objectSpread({}, this.params), {}, {\n pageNo: val ? val : this.params.pageNo\n });\n\n this.getUsersData(params);\n },\n\n /**\n * 编辑角色-授权\n */\n editUserRole: function editUserRole(record) {\n var defaultRoleValue = [];\n var selectedUserIds = [];\n selectedUserIds.push(record.id);\n record.roles.map(function (e) {\n defaultRoleValue.push(e.id);\n });\n this.editSingleRole = true;\n this.selectedUserIds = selectedUserIds;\n this.selectedRoleIds = defaultRoleValue;\n this.subVisible = true;\n },\n\n /**\n * 确定授权\n */\n handleImpowerOk: function () {\n var _handleImpowerOk = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {\n var params, result, listParams;\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n params = {\n \"userIds\": this.selectedUserIds,\n \"roleIds\": this.selectedRoleIds\n };\n _context5.next = 3;\n return API.bindRole(params);\n\n case 3:\n result = _context5.sent.data;\n\n if (result.data) {\n this.editSingleRole = false;\n this.selectedUserIds = [];\n this.selectedRoleIds = [];\n this.subVisible = false;\n this.$message({\n type: 'success',\n message: this.$t('msg.authorization_ss')\n });\n listParams = _objectSpread({}, this.params);\n this.getUsersData(listParams);\n }\n\n case 5:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function handleImpowerOk() {\n return _handleImpowerOk.apply(this, arguments);\n }\n\n return handleImpowerOk;\n }(),\n\n /**\n * 取消授权对话框\n */\n handleCancel: function handleCancel() {\n this.selectedRoleIds = [];\n this.subVisible = false;\n },\n\n /**\n * 全选-批量授权\n */\n handleSelectionChange: function handleSelectionChange(val) {\n this.multipleSelectionArray = val;\n },\n\n /**\n * 对话框取消\n */\n Cancel: function Cancel() {\n this.roleVisible = false;\n },\n\n /**\n * 对话框授权\n */\n hanleConfirm: function hanleConfirm() {\n if (this.multipleSelectionArray.length > 0) {\n var defaultRoleValue = [];\n var selectedUserIds = [];\n\n for (var i = 0; i < this.multipleSelectionArray.length; i++) {\n selectedUserIds.push(this.multipleSelectionArray[i].id);\n }\n\n this.editSingleRole = true;\n this.selectedUserIds = selectedUserIds;\n this.selectedRoleIds = defaultRoleValue;\n this.subVisible = true;\n } else {\n this.$message.error(this.$t('msg.authorized_personnel_sl'));\n }\n }\n }\n};",null]}