| | |
| | | </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> |
| | |
| | | |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | ref="tableDataRef" |
| | | :data="tableData" |
| | | class="tableFixed" |
| | | :height="tableHeight+'px'" |
| | | highlight-current-row |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | |
| | | show-checkbox |
| | | node-key="code" |
| | | default-expand-all |
| | | style="height: 300px" |
| | | style="height: 300px;overflow-y: scroll" |
| | | :props="defaultPropsOfRoleTree" |
| | | @check="checkBoxClick" |
| | | /> |
| | |
| | | this.tableHeight = this.tableHeight - 40 |
| | | } |
| | | this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367 |
| | | this.$refs.tableDataRef.doLayout() |
| | | }) |
| | | }, |
| | | // 关联角色点击事件 |
| | |
| | | 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, |
| | |
| | | } |
| | | } |
| | | }) |
| | | console.log(this.dialogFormRoles.roleTreeSelectedArr, 11) |
| | | console.log(this.dialogFormRoles.rolesArr, 888) |
| | | |
| | | this.dialogFormRoles.rolesArr[0].isSelected1 = true// 默认选中第一个 |
| | | // this.dialogFormRoles.rolesArr[0].name = '全部' |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | .tableFixed{ |
| | | ::v-deep .el-table__fixed-right{ |
| | | height: 100% !important; |
| | | } |
| | | ::v-deep .el-table__fixed{ |
| | | height: 100% !important; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | | <style> |
| | | |