| | |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <!-- @focus="getRoleTypeSearch2"--> |
| | | <el-option |
| | | v-for="item in RoleTypeCodeArr2" |
| | | :key="item.roletype_code" |
| | |
| | | <div style="margin-left: 10px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button type="primary" icon="el-icon-setting" @click="settingButton">设置</el-button> |
| | | <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>--> |
| | | </div> |
| | | <el-divider /> |
| | | <div class="elTableDiv"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | |
| | | stripe |
| | | :height="tableHeight" |
| | | :height="tableHeight+'px'" |
| | | :style="{width: 100+'%',height:tableHeight+'px'}" |
| | | highlight-current-row |
| | | :header-cell-style="this.$headerCellStyle" |
| | |
| | | <el-table-column |
| | | prop="description" |
| | | label="角色描述" |
| | | show-overflow-tooltip |
| | | sortable="custom" |
| | | /> |
| | | <el-table-column |
| | |
| | | prop="lm_date" |
| | | label="创建时间" |
| | | sortable="custom" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column |
| | | prop="lm_date" |
| | |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button type="text" @click="edit('edit',row)">修改</el-button> |
| | | <el-button type="text" @click="edit('edit',row)">编辑</el-button> |
| | | <el-button type="text" @click="del(row)">删除</el-button> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | <!-- 新增修改对话框--> |
| | | <el-dialog |
| | | :title="operation==='add'?'新增':'修改'" |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :visible.sync="dialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | @closed="handleClose" |
| | | @close="handleClose" |
| | | > |
| | | <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px"> |
| | | <el-form-item label="角色编码" prop="RoleCode"> |
| | | <el-input v-model="dialogForm.RoleCode" :disabled="operation!=='add'" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.RoleCode" :disabled="operation!=='add'" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="角色名称" prop="RoleName"> |
| | | <el-input v-model="dialogForm.RoleName" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.RoleName" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item prop="RoleTypeCode" label="角色类型"> |
| | | <el-select |
| | | v-model="dialogForm.RoleTypeCode" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="角色描述" prop="description"> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 220px" /> |
| | | <el-input v-model="dialogForm.description" type="textarea" style="width: 200px" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | |
| | | </el-dialog> |
| | | <!-- 设置按钮对话框--> |
| | | <el-dialog |
| | | title="角色类型" |
| | | title="设置" |
| | | :visible.sync="settingDialogVisible" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :close-on-click-modal="false" |
| | | class="settingDialogVisible" |
| | | @close="handleCloseSetting" |
| | | > |
| | |
| | | <el-table |
| | | :data="RoleTypeCodeArr" |
| | | border |
| | | height="300" |
| | | 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"--> |
| | |
| | | <el-dialog |
| | | title="角色关联用户" |
| | | :visible.sync="userDialogVisible" |
| | | width="80%" |
| | | width="1500px" |
| | | :close-on-click-modal="false" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | class="userDialogVisible" |
| | | @closed="handleCloseUser" |
| | | @close="handleCloseUser" |
| | |
| | | <div style="display: flex;min-height: 50px"> |
| | | <el-form ref="dialogFormUser" inline :model="dialogFormUser" label-width="80px"> |
| | | <el-form-item label="用户编码"> |
| | | <el-input v-model="dialogFormUser.usercode" class="userDialogVisibleInput" style="width: 220px" /> |
| | | <el-input v-model="dialogFormUser.usercode" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="用户名称"> |
| | | <el-input v-model="dialogFormUser.username" class="userDialogVisibleInput" style="width: 220px" /> |
| | | <el-input v-model="dialogFormUser.username" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="所属组织"> |
| | | <el-cascader |
| | |
| | | :append-to-body="false" |
| | | :options="StuOrgArr" |
| | | :props="defaultProps" |
| | | class="userDialogVisibleInput" |
| | | style="width: 220px;" |
| | | style="width: 200px;" |
| | | |
| | | @change="dialogCascaderChange" |
| | | /> |
| | | |
| | | <!-- @focus="getUserOrganization"--> |
| | | </el-form-item> |
| | | <el-form-item label="关联角色"> |
| | | <el-select |
| | | v-model="dialogFormUser.isrole" |
| | | filterable |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | | style="width: 200px" |
| | | placeholder="请选择" |
| | | class="userDialogVisibleInput" |
| | | > |
| | | <el-option |
| | | v-for="item in roleArr" |
| | |
| | | :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" |
| | |
| | | <el-dialog |
| | | title="角色关联权限" |
| | | :visible.sync="dialogVisibleRight" |
| | | width="50%" |
| | | width="800px" |
| | | top="15vh" |
| | | :fullscreen="isFullscreen" |
| | | :close-on-click-modal="false" |
| | | class="dialogVisibleRight" |
| | | @closed="handleCloseRight" |
| | | @close="handleCloseRight" |
| | |
| | | } from '@/api/jcsz' |
| | | import { getCookie } from '@/utils/auth' |
| | | import $ from 'jquery' |
| | | import clearAllChildren from '@/utils/global' |
| | | |
| | | const SER_HZ = /^[\u4e00-\u9fa5]+$/ |
| | | export default { |
| | | name: 'Zzjg', |
| | | name: 'JSQD', |
| | | components: { |
| | | Pagination |
| | | }, |
| | |
| | | // } |
| | | // } |
| | | return { |
| | | isFullscreen: false, |
| | | mainHeight: 0, |
| | | tableHeight: 0, |
| | | form: { |
| | |
| | | // 获取所属组织 |
| | | async getUserOrganization() { |
| | | const { data: res } = await UserOrganization() |
| | | this.StuOrgArr = res |
| | | this.StuOrgArr = clearAllChildren(res) |
| | | }, |
| | | // 排序改变时 |
| | | sortChange({ column, prop, order }) { |
| | |
| | | // 获取页面高度 |
| | | getHeight() { |
| | | this.$nextTick(() => { |
| | | console.log(window.innerHeight) |
| | | console.log(window.innerHeight) |
| | | this.mainHeight = window.innerHeight - 250 |
| | | this.tableHeight = this.mainHeight - 100 |
| | | // this.isFullscreen = window.innerHeight < 800 |
| | | }) |
| | | }, |
| | | /* 设置模块*/ |
| | |
| | | }, |
| | | // 添加按钮 |
| | | addSetting() { |
| | | const data = { roletype_code: '', roletype_name: '', isVisible: 1 } |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + 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) |
| | | } |
| | | }) |
| | |
| | | this.dialogFormUser.orgcode = '' |
| | | this.dialogFormUser.isrole = '' |
| | | this.$refs.dialogCascaderUser.checkedValue = '' |
| | | this.getRoleAssociationUser() |
| | | }, |
| | | |
| | | /* 角色关联权限对话框部分*/ |
| | |
| | | pcIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($('input:checkbox').length > 0) { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($('input:checkbox').length > 0) { |
| | | if ($("input[name='APP']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | |
| | | appIsSelected2 = true |
| | | |
| | | const interval = setInterval(() => { |
| | | if ($('input:checkbox').length > 0) { |
| | | if ($("input[name='PC']").length > 0) { |
| | | waitFlag = true |
| | | } |
| | | if (waitFlag) { |
| | |
| | | const currentCode = this.dialogFormRight.rightCurrentCode// 权限操作端code |
| | | // 1.第一种情况 半叶为零 全叶为零 |
| | | if (checkedKeys.length === 0 && halfCheckedKeys.length === 0) { |
| | | console.log('1.第一种情况 半叶为零 全叶为零') |
| | | console.log('1.第一种情况 半叶为零 全叶为零1111') |
| | | this.dialogFormRight.rightOperationArr.forEach((item, index) => { |
| | | if (item.code === currentCode) { |
| | | item.isSelected2 = false |
| | | |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', false)// 自定义单选框回显 |
| | | if (item.name === 'PC') { |
| | | $("input[name='PC']").eq(0).prop('checked', false)// 自定义单选框回显 |
| | | } |
| | | if (item.name === 'APP') { |
| | | $("input[name='APP']").eq(0).prop('checked', false)// 自定义单选框回显 |
| | | } |
| | | // $("input[name='APP']").eq(0).prop('checked', false)// 自定义单选框回显 |
| | | // $('input:checkbox').eq(index).prop('checked', false)// 自定义单选框回显 |
| | | }) |
| | | } |
| | | }) |
| | |
| | | if (item.code === currentCode) { |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显 |
| | | if (item.name === 'PC') { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显 |
| | | } |
| | | if (item.name === 'APP') { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显 |
| | | } |
| | | // $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显 |
| | | }) |
| | | } |
| | | }) |
| | |
| | | if (item.code === currentCode) { |
| | | item.isSelected2 = true |
| | | this.$nextTick(() => { |
| | | $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显 |
| | | if (item.name === 'PC') { |
| | | $("input[name='PC']").eq(0).prop('checked', true)// 自定义单选框回显 |
| | | } |
| | | if (item.name === 'APP') { |
| | | $("input[name='APP']").eq(0).prop('checked', true)// 自定义单选框回显 |
| | | } |
| | | // $('input:checkbox').eq(index).prop('checked', true)// 自定义单选框回显 |
| | | }) |
| | | } |
| | | }) |
| | |
| | | background-color: $main_color; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .userDialogVisible { |
| | | ::v-deep .userDialogVisibleInput { |
| | | //width:calc(100% - 30px) !important; |
| | | } |
| | | |
| | | //::v-deep .el-form-item { |
| | | // width:calc(100% - 30px) !important; |
| | | //} |
| | | } |
| | | |
| | | ::v-deep .el-radio__input.is-checked .el-radio__inner { |