| | |
| | | <template> |
| | | <div> |
| | | <div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}"> |
| | | <div style="height: 50px;"> |
| | | <div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;"> |
| | | <!-- <div class="body" style="background-color: #ffffff; padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}">--> |
| | | <div> |
| | | <el-form |
| | | ref="form" |
| | | :model="form" |
| | |
| | | :data="tableData" |
| | | border |
| | | highlight-current-row |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChange" |
| | | > |
| | | <!-- :style="{width: 100+'%',height:tableHeight+'px'}"--> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | |
| | | AddUpdateRole(data).then(res => { |
| | | if (res.code === '200') { |
| | | this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!') |
| | | this.dialogVisible = false |
| | | this.getRoleSearch() |
| | | } else { |
| | | this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!') |
| | | } |
| | | }) |
| | | |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(0).prop('checked', true)// 自定义单选框回显 |
| | | }) |
| | | }, 1) |
| | | }, 10) |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | // 3.第三种情况PC未选中,APP已选中 |
| | |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(1).prop('checked', true)// 自定义单选框回显 |
| | | }) |
| | | }, 1) |
| | | }, 10) |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightAPPArr[0].code |
| | | } |
| | | // 4.第四种情况PC已选中,APP已选中 |
| | |
| | | $('input:checkbox').eq(0).prop('checked', true)// 自定义单选框回显 |
| | | $('input:checkbox').eq(1).prop('checked', true)// 自定义单选框回显 |
| | | }) |
| | | }, 1) |
| | | }, 10) |
| | | this.dialogFormRight.rightCurrentCode = this.dialogFormRight.rightPCArr[0].code |
| | | } |
| | | this.dialogFormRight.rightOperationArr.push({ |
| | |
| | | } |
| | | }) |
| | | this.$nextTick(() => { |
| | | this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected) |
| | | this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected) |
| | | if (this.$refs.rightPCRef) { |
| | | this.$refs.rightPCRef.setCheckedKeys(this.dialogFormRight.rightPCArrSelected) |
| | | } |
| | | if (this.$refs.rightAPPRef) { |
| | | this.$refs.rightAPPRef.setCheckedKeys(this.dialogFormRight.rightAPPArrSelected) |
| | | } |
| | | }) |
| | | }, |
| | | // 分配权限关闭事件 |
| | |
| | | this.dialogFormRight.rightAPPArr = [] |
| | | this.dialogFormRight.rightAPPArrSelected = [] |
| | | this.dialogFormRight.rightOperationArr = [] |
| | | this.$refs.rightPCRef.setCheckedKeys([]) |
| | | this.$refs.rightAPPRef.setCheckedKeys([]) |
| | | if (this.$refs.rightPCRef) { |
| | | this.$refs.rightPCRef.setCheckedKeys([]) |
| | | } |
| | | if (this.$refs.rightAPPRef) { |
| | | this.$refs.rightAPPRef.setCheckedKeys([]) |
| | | } |
| | | }, |
| | | // 权限对话框取消事件 |
| | | rightDialogVisibleCancel() { |
| | |
| | | const children = [] |
| | | let flag = false // 表示children里有值push进去了 |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormRight.rightPCArrSelected.includes(it.code)) { |
| | | if (this.dialogFormRight.rightPCArrSelected.includes(it.code) || this.dialogFormRight.rightPCArrSelected.includes('PC')) { |
| | | flag = true |
| | | children.push( |
| | | { code: it.code, name: it.name, flag: 'Y' } |
| | |
| | | const children = [] |
| | | let flag = false // 表示children里有值push进去了 |
| | | item.children.forEach(it => { |
| | | if (this.dialogFormRight.rightAPPArrSelected.includes(it.code)) { |
| | | if (this.dialogFormRight.rightAPPArrSelected.includes(it.code) || this.dialogFormRight.rightAPPArrSelected.includes('APP')) { |
| | | flag = true |
| | | children.push( |
| | | { code: it.code, name: it.name, flag: 'Y' } |
| | |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | height: 30px |
| | | height: 30px; |
| | | line-height:30px; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |