{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\organizationPermission\\UnderUserTable.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\views\\main\\organizationPermission\\UnderUserTable.vue","mtime":1667327530028},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 orgrequest from \"@/api/org.js\";\nimport uc from \"@/api/uc.js\";\nimport EipUserDialog from \"@/components/dialog/EipUserDialog.vue\";\n\nexport default {\n name:'under-user-table',\n props: {\n userId: String,\n orgId: {\n type: String,\n default: \"\"\n },\n demList: {\n type: Array,\n default: () => {\n return [];\n }\n },\n dimId: {\n type: String,\n default: \"\"\n }\n },\n components: {\n EipUserDialog\n },\n computed: {\n roleDeleteUrl: function() {\n return `${window.context.uc}/api/org/v1/userUnder/delUnderUserByIds`;\n }\n },\n data() {\n return {\n dialogVisible: false,\n isSubmit: true,\n data: [],\n pageResult: {\n page: 1,\n pageSize: 50,\n total: 0\n },\n roleCode:\"\",\n demId:\"\",\n orgUserId: \"\",\n superior:\"\"\n };\n },\n watch: {\n },\n methods: {\n handleClose() {\n this.dialogVisible = false;\n },\n showDialog(orgUserId) {\n this.orgUserId = orgUserId\n this.dialogVisible = true;\n this.demId = this.dimId;\n this.demList.forEach(item => {\n if (item.isDefault===1){\n this.demId = item.id;\n }\n });\n this.change(false);\n },\n dialogCancle() {\n this.dialogVisible = false;\n },\n loadData(param, cb) {\n if (this.demId){\n param.querys.push({\n property: \"DIMEN_ID_\",\n value: this.demId,\n group:\"defaultQueryGroup\",\n relation: \"AND\",\n operation: \"EQUAL\"\n })\n }\n orgrequest.getUserUndersPage(param)\n .then(response => {\n this.data = response.rows;\n this.pageResult = {\n page: response.page,\n pageSize: response.pageSize,\n total: response.total\n };\n })\n .finally(() => cb());\n },\n showUserDialog() {\n if (!this.demId){\n this.$message.error(\"请选择维度\");\n return;\n }\n this.$refs.eipUserDialog.showDialog();\n },\n addUnderUser(selection) {\n if (!selection || selection.length == 0) {\n this.$message.error(\"请至少选择一个用户\");\n return;\n }\n let accounts = [];\n for (let user of selection) {\n accounts.push(user.account);\n }\n let param = {\n dimenId: this.demId,\n account: this.userId,\n underAccounts: accounts.join(\",\")\n }\n uc.setUnderUser(param).then(data => {\n if (data.state) {\n this.$message({\n message: data.message,\n type: \"success\",\n showClose: true\n });\n }else{\n this.$message.error(data.message||\"分配用户失败\");\n }\n }).finally(() => {\n this.$refs.userRoleTable.load();\n });\n },\n change(isLoad){\n uc.getSuperior(this.orgUserId,this.demId).then(data => {\n this.superior = data?data.fullname:\"无\";\n });\n if (isLoad)\n this.$refs.userRoleTable.load();\n }\n }\n};\n",null]}