src/views/jcsz/yhqd.vue
@@ -71,7 +71,7 @@
              </el-select>
            </el-form-item>
          </div>
          <div style="display: flex;align-items: flex-start;margin-top: 3px">
          <div class="bodySearchReset">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
@@ -80,7 +80,9 @@
      <div class="elTableDiv">
        <el-table
          ref="tableDataRef"
          :data="tableData"
          class="tableFixed"
          :height="tableHeight+'px'"
          highlight-current-row
          :style="{width: 100+'%',height:tableHeight+'px'}"
@@ -396,7 +398,7 @@
          show-checkbox
          node-key="code"
          default-expand-all
          style="height: 300px"
          style="height: 300px;overflow-y: scroll"
          :props="defaultPropsOfRoleTree"
          @check="checkBoxClick"
        />
@@ -879,6 +881,7 @@
          this.tableHeight = this.tableHeight - 40
        }
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
        this.$refs.tableDataRef.doLayout()
      })
    },
    // 关联角色点击事件
@@ -890,10 +893,10 @@
      this.dialogFormRoles.username = row.username
      this.dialogFormRoles.usercode = row.usercode
      const { data: res } = await UserAssociationRole({ usercode: row.usercode })
      this.rolesAll = res
      this.rolesAll = res.filter(item => item.children.length !== 0)
      const nodeKey = []// 树形回显key
      res.forEach((item, index) => {
      this.rolesAll.forEach((item, index) => {
        this.dialogFormRoles.rolesArr.push({
          code: item.code,
          name: item.name,
@@ -920,8 +923,6 @@
          }
        }
      })
      console.log(this.dialogFormRoles.roleTreeSelectedArr, 11)
      console.log(this.dialogFormRoles.rolesArr, 888)
      this.dialogFormRoles.rolesArr[0].isSelected1 = true// 默认选中第一个
      // this.dialogFormRoles.rolesArr[0].name = '全部'
@@ -1435,6 +1436,15 @@
  margin-bottom: 0;
}
.tableFixed{
  ::v-deep .el-table__fixed-right{
    height: 100% !important;
  }
  ::v-deep .el-table__fixed{
    height: 100% !important;
  }
}
</style>
<style>