loulijun2021
2023-05-06 20e20706af12877626724a24818a7b1f3eead15f
src/views/jcsz/jsqd.vue
@@ -1056,7 +1056,7 @@
    },
    /* 关联用户模块*/
    async userClick(row) {
    userClick(row) {
      if (row.role_code === 'S001') {
        return this.$message.info('此角色无法操作!')
      }
@@ -1070,29 +1070,31 @@
      this.userForm.roleName = row.role_name
      this.dialogFormUser.rolecode = row.role_code
      const res = await this.getRoleAssociationUser()
      if (res.code === '200') {
        setTimeout(() => {
          loading.close()
          this.userDialogVisible = true
          this.$nextTick(() => {
            this.$refs.multipleTable.doLayout()
      this.getRoleAssociationUser().then(res => {
        if (res.code === '200') {
          setTimeout(() => {
            loading.close()
            this.$nextTick(() => {
              this.$refs.multipleTableRef.doLayout()
            })
          })
        }, 1000)
      } else {
        loading.close()
      }
        } else {
          loading.close()
        }
      })
    },
    // 获取角色清单关联用户
    async getRoleAssociationUser() {
      const res = await RoleAssociationUser(this.dialogFormUser)
      this.dialogFormUserTable = res.data
      this.dialogFormUserTableLength = res.count
      this.userDialogVisible = true
      this.$nextTick(() => {
        this.dialogFormUserTable.forEach((item, index) => {
          if (item.flag === 'Y') {
            this.$refs.multipleTable.toggleRowSelection(this.dialogFormUserTable[index], true)
            this.$refs.multipleTableRef.toggleRowSelection(this.dialogFormUserTable[index], true)
          }
        })
      })