| | |
| | | </el-dialog> |
| | | <!-- 设置按钮对话框--> |
| | | <el-dialog |
| | | title="角色类型" |
| | | title="设置" |
| | | :visible.sync="settingDialogVisible" |
| | | width="50%" |
| | | top="15vh" |
| | |
| | | <el-table |
| | | :data="RoleTypeCodeArr" |
| | | border |
| | | height="400" |
| | | highlight-current-row |
| | | :style="{width: 100+'%',height:tableHeight-300+'px'}" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | @sort-change="sortChangeOfSetting" |
| | | > |
| | | <!-- :style="{width: 100+'%',height:tableHeight-300+'px'}"--> |
| | | |
| | | <!-- <el-table-column--> |
| | | <!-- type="selection"--> |
| | | <!-- width="50"--> |
| | |
| | | :data="dialogFormUserTable" |
| | | border |
| | | highlight-current-row |
| | | :style="{width: 100+'%',height:tableHeight-300+'px'}" |
| | | height="300" |
| | | :header-cell-style="this.$headerCellStyle" |
| | | :cell-style="this.$cellStyle" |
| | | :row-key="getRowKey" |
| | |
| | | }, |
| | | // 添加按钮 |
| | | addSetting() { |
| | | const data = { roletype_code: '', roletype_name: '', isVisible: 1 } |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? Math.random() * Math.random() : number |
| | | const data = { roletype_code: '', roletype_name: '', isVisible: 1, number: number } |
| | | this.RoleTypeCodeArr.unshift(data) |
| | | }, |
| | | // 删除按钮 |
| | |
| | | // 设置表单取消事件 |
| | | formSettingCancel(row) { |
| | | this.RoleTypeCodeArr.forEach((item, index) => { |
| | | if (item.isVisible === 1 && item.roletype_code === row.roletype_code) { |
| | | if (item.isVisible === 1 && item.number === row.number) { |
| | | this.RoleTypeCodeArr.splice(index, 1) |
| | | } |
| | | }) |