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