{"remainingRequest":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\dialog\\auth.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\src\\views\\configureInfo\\dialog\\auth.vue","mtime":1682499219961},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cqlt-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport \"core-js/modules/es6.string.iterator\";\nimport \"core-js/modules/es6.map\";\nimport \"core-js/modules/es6.function.name\";\nimport _defineProperty from \"D:/jenkins/workspace/cqlt-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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 tree from '@/components/tree';\nimport pagination from '@/components/pagination';\nimport req from '@/request.js';\nimport org from '@/api/org.js';\nimport uc from '@/api/uc.js';\nimport utils from '@/utils.js';\nvar portal = window.context.portal;\nexport default {\n name: 'authDailog',\n components: {\n pagination: pagination,\n tree: tree\n },\n data: function data() {\n return {\n reportId: '',\n treeData: [],\n title: '',\n visible: false,\n searchForm: {},\n tableData: [],\n tableDataUser: [],\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n params: {\n pageBean: {\n page: 1,\n pageSize: 20\n }\n },\n treeParams: {\n demId: '1258608622670319616'\n },\n activeName: '',\n tabKey: 'org',\n checkAuthorityList: [],\n checkedHeaders: [],\n multipleSelection: [],\n // 已选中的列表\n tabPaneList: [],\n tip: false,\n // 未选择授权类型给出提示\n selectUser: []\n };\n },\n created: function created() {\n this.loadDataTree(this.treeParams);\n\n if (this.$i18n.locale === 'zh-CN') {\n this.checkedHeaders = utils.getDictItemsFromCache('bbqx');\n this.tabPaneList = utils.getDictItemsFromCache('sqdxlx');\n } else {\n this.checkedHeaders = utils.getDictItemsFromCache('bbqx_en');\n this.tabPaneList = utils.getDictItemsFromCache('sqdxlx_en');\n }\n\n this.activeName = this.tabPaneList[0].value;\n this.getOrgData();\n },\n methods: {\n open: function open(reportId, list) {\n this.selectUser = [];\n this.checkAuthorityList = [];\n this.reportId = reportId;\n this.title = this.$t('reportManagement.auth');\n this.getselectUser();\n this.visible = true;\n },\n getselectUser: function getselectUser() {\n var _this = this;\n\n req.get(portal + \"/qfReportAuthority/v1/getList?pageNum=1&pageSize=-1&reportId=\".concat(this.reportId)).then(function (res) {\n console.log(res.data.value.rows);\n\n if (res) {\n _this.selectUser = res.data.value.rows;\n _this.checkAuthorityList = _this.selectUser.length > 0 ? [\"qurey\", \"edited\", \"del\"] : [];\n }\n });\n },\n getDictName: function getDictName(code, value) {\n return utils.getDictName(code, value);\n },\n getOrgData: function getOrgData() {\n var _this2 = this;\n\n org.getByParentAndDemToTree().then(function (res) {\n _this2.tableData = res || [];\n\n _this2.$nextTick(function () {\n _this2.selectUser.forEach(function (s) {\n _this2.tableData.forEach(function (u) {\n if (s.objectId == u.id) {\n console.log(u);\n\n _this2.$refs.multipleTable[0].toggleRowSelection(u, true);\n }\n });\n });\n });\n });\n },\n getUserData: function getUserData(params) {\n var _this3 = this;\n\n uc.getOrgUserQuery(params).then(function (res) {\n var data = res && res.rows || [];\n _this3.tableData = data.map(function (item) {\n return _objectSpread({\n name: item.fullname\n }, item);\n });\n _this3.pageResult = {\n page: res.page,\n pageSize: res.pageSize,\n total: res.total\n };\n });\n },\n getRolerData: function getRolerData(params) {\n var _this4 = this;\n\n req.post(portal + '/api/role/v1/roles/getRolePage', params).then(function (res) {\n var resp = res.data;\n _this4.tableData = resp && resp.rows || [];\n _this4.pageResult = {\n page: resp.page,\n pageSize: resp.pageSize,\n total: resp.total\n };\n });\n },\n handleClose: function handleClose() {\n this.visible = false;\n },\n handleTabClick: function handleTabClick(tab) {\n this.tabKey = tab.name;\n this.params = {\n pageBean: {\n page: 1,\n pageSize: 20\n }\n };\n\n if (tab.name == 'org') {\n this.getOrgData();\n } else if (tab.name == 'user') {\n this.getUserData(this.params);\n } else {\n this.getRolerData(this.params);\n }\n },\n loadDataTree: function loadDataTree(params) {\n var _this5 = this;\n\n org.getByParentAndDemToTree(params).then(function (res) {\n var data = res || [];\n _this5.treeData = utils.tile2nest(data);\n });\n },\n handleNodeClick: function handleNodeClick(item) {\n if (item.id == '0') {\n this.getOrgData();\n } else {\n this.tableData = [];\n this.tableData.push(item);\n }\n },\n handleNodeClickUser: function handleNodeClickUser(item) {\n if (item.id == '0') {\n this.params.querys = [{\n property: 'DEM_ID_',\n value: item.demId,\n group: 'orgTree',\n relation: 'AND',\n operation: 'EQUAL'\n }];\n } else {\n this.params.querys = [{\n property: 'ORG_ID_',\n value: item.id,\n group: 'orgTree',\n relation: 'AND',\n operation: 'IN'\n }];\n }\n\n this.getUserData(this.params);\n },\n handleSearch: function handleSearch() {\n var obj = this.searchForm;\n var querys = [];\n\n for (var i in obj) {\n if (obj[i]) {\n querys.push({\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: i,\n relation: 'AND',\n value: obj[i]\n });\n }\n }\n\n this.params.querys = querys;\n\n if (this.tabKey == 'user') {\n this.getUserData(this.params);\n } else {\n this.getRolerData(this.params);\n }\n },\n handleSelectionChange: function handleSelectionChange(selection, row) {\n var _this6 = this;\n\n var flag = selection.some(function (item) {\n if (row.id == item.id) return true;\n });\n var userFlag = true;\n this.selectUser.forEach(function (s, si) {\n if (s.objectId == row.id) {\n userFlag = false;\n }\n });\n\n if (flag && userFlag) {\n var params = {\n key: this.tabKey,\n authority: this.checkAuthorityList.join(','),\n name: row.name,\n objectId: row.id,\n objectType: this.tabKey,\n reportId: this.reportId\n }; // this.selectUser.push(params)\n\n req.post(portal + '/qfReportAuthority/v1/insertInfo', [params]).then(function (res) {\n _this6.getselectUser();\n });\n } else if (flag && !userFlag) {} else {// this.selectUser.forEach((s, si) => {\n // \tif (s.objectId == row.id) {\n // \t\tthis.handleRightDelete(row)\n // \t}\n // })\n }\n },\n // 去重\n uniqueFunc: function uniqueFunc(arr, uniId) {\n var res = new Map();\n return arr.filter(function (item) {\n return !res.has(item[uniId]) && res.set(item[uniId], 1);\n });\n },\n handleSizeChange: function handleSizeChange(pageSize) {\n this.params.pageBean.pageSize = pageSize;\n\n if (this.tabKey == 'user') {\n this.getUserData(this.params);\n } else {\n this.getRolerData(this.params);\n }\n },\n handleCurrentChange: function handleCurrentChange(page) {\n this.params.pageBean.page = page;\n\n if (this.tabKey == 'user') {\n this.getUserData(this.params);\n } else {\n this.getRolerData(this.params);\n }\n },\n handleRightDelete: function handleRightDelete(val) {\n var _this7 = this;\n\n req.remove(portal + '/qfReportAuthority/v1/deleteByIds' + '?ids=' + val.id).then(function (res) {\n _this7.getselectUser();\n });\n },\n submit: function submit() {\n var _this8 = this;\n\n var data = this.selectUser; // console.log(data);\n // let params = []\n\n if (this.checkAuthorityList.length === 0) return this.$confirm(this.$t('common.selectAuthType'), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'warning'\n }).then(function () {\n _this8.tip = true;\n }); // data.forEach(item => {\n // \tparams.push({\n // \t\tauthority: this.checkAuthorityList.join(','),\n // \t\tname: item.name,\n // \t\tobjectId: item.id,\n // \t\tobjectType: item.key,\n // \t\treportId: this.reportId\n // \t})\n // })\n\n req.post(portal + '/qfReportAuthority/v1/insertInfo', data).then(function (res) {\n _this8.visible = false;\n\n _this8.$emit('upDataAuth');\n });\n },\n handleCheck: function handleCheck(rows) {\n if (rows.length !== 0) {\n this.tip = false;\n } else {\n this.tip = true;\n }\n }\n }\n};",null]}