| | |
| | | <div class="body" :style="{height:mainHeight+'px'}"> |
| | | |
| | | <div class="bodyTopButtonGroup" style="justify-content: space-between"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button> |
| | | |
| | | <div style="display: flex"> |
| | | <el-tooltip class="item" effect="dark" content="角色类型数据维护" placement="top"> |
| | | <el-button icon="el-icon-setting" @click="settingButton">设置</el-button> |
| | | <el-button v-waves icon="el-icon-setting" @click="settingButton">设置</el-button> |
| | | </el-tooltip> |
| | | <el-button icon="el-icon-download" @click="upload">导入</el-button> |
| | | <el-button v-waves icon="el-icon-download" @click="upload">导入</el-button> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | :model="form" |
| | | label-width="100px" |
| | | inline |
| | | style="display: flex;justify-content: space-between" |
| | | style="display: flex;" |
| | | > |
| | | <div class="elForm"> |
| | | <el-form-item label-width="70px" label="角色编码" style=" display: flex;"> |
| | | <el-form-item label="角色编码" style=" display: flex;"> |
| | | <el-input v-model="form.RoleCode" placeholder="请输入" style="width: 200px" /> |
| | | </el-form-item> |
| | | <el-form-item label="角色名称" style=" display: flex;"> |
| | |
| | | <el-input v-model="form.UserName" style="width: 200px" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}"> |
| | | <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 |
| | | class="bodySearchReset" |
| | | :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}" |
| | | > |
| | | <el-button v-waves type="primary" icon="el-icon-search" @click="search">查询</el-button> |
| | | <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">重置</el-button> |
| | | </div> |
| | | </el-form> |
| | | <div |
| | |
| | | |
| | | <!-- 新增修改对话框--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | :title="operation==='add'?'新增':'编辑'" |
| | | :visible.sync="dialogVisible" |
| | | width="800px" |
| | |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves @click="dialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | |
| | | </el-dialog> |
| | | <!-- 设置按钮对话框--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="设置" |
| | | :visible.sync="settingDialogVisible" |
| | | width="800px" |
| | |
| | | @close="handleCloseSetting" |
| | | > |
| | | <div style="margin-bottom: 20px;display: flex"> |
| | | <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addSetting">新增</el-button> |
| | | <!-- <el-button type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>--> |
| | | <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="addSetting">新增</el-button> |
| | | <!-- <el-button v-waves type="primary" icon="el-icon-delete" @click="delSetting">删除</el-button>--> |
| | | </div> |
| | | <el-table |
| | | ref="RoleTypeCodeArr" |
| | |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="{row}"> |
| | | <div class="operationClass"> |
| | | <el-button v-if="row.isVisible===0" type="text" @click="delSetting(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="formSettingSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" type="text" @click="formSettingCancel(row)">取消</el-button> |
| | | <el-button v-if="row.isVisible===0" v-waves type="text" @click="delSetting(row)">删除</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="formSettingSave(row)">保存</el-button> |
| | | <el-button v-if="row.isVisible===1" v-waves type="text" @click="formSettingCancel(row)">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | /> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="settingDialogVisibleCancel">返回</el-button> |
| | | <!-- <el-button type="primary" @click="settingDialogVisibleConfirm">确 定</el-button>--> |
| | | <el-button v-waves @click="settingDialogVisibleCancel">返回</el-button> |
| | | <!-- <el-button v-waves type="primary" @click="settingDialogVisibleConfirm">确 定</el-button>--> |
| | | </div> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 关联用户对话框--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="角色关联用户" |
| | | :visible.sync="userDialogVisible" |
| | | width="900px" |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | style="margin-top: 5px;margin-left: 30px" |
| | |
| | | >查询 |
| | | </el-button> |
| | | <el-button |
| | | v-waves |
| | | type="info" |
| | | icon="el-icon-refresh" |
| | | style="margin-top: 5px;margin-left: 10px" |
| | |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="userDialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves @click="userDialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | |
| | | </el-dialog> |
| | | <!-- 分配权限对话框--> |
| | | <el-dialog |
| | | v-el-drag-dialog |
| | | title="角色关联权限" |
| | | :visible.sync="dialogVisibleRight" |
| | | width="800px" |
| | |
| | | @click="myCheckboxClick(item)" |
| | | > |
| | | |
| | | <input |
| | | class="myCheckboxInput" |
| | | type="checkbox" |
| | | :disabled="rightFrom.usercode==='S001'" |
| | | :value="item.code" |
| | | :name="item.name" |
| | | :style="{color:item.isSelected2?'#42b983':'#fff'}" |
| | | @click="myCheckboxInputClick(item)" |
| | | >{{ item.name }} |
| | | <!-- <input--> |
| | | <!-- class="myCheckboxInput"--> |
| | | <!-- type="checkbox"--> |
| | | <!-- :disabled="rightFrom.usercode==='S001'"--> |
| | | <!-- :value="item.code"--> |
| | | <!-- :name="item.name"--> |
| | | <!-- :style="{color:item.isSelected2?'#42b983':'#fff'}"--> |
| | | <!-- @click="myCheckboxInputClick(item)"--> |
| | | <!-- >{{ item.name }}--> |
| | | |
| | | <!-- :style="{color:item.isSelected2?'#42b983':'#fff'}"--> |
| | | <!-- 父子点击事件不影响--> |
| | | <!-- onClick="event.cancelBubble = true"--> |
| | | <!--明天再看一下input和el-checkbox之间的区别--> |
| | | |
| | | <el-checkbox |
| | | :key="item.code" |
| | | v-model="item.isSelected2" |
| | | class="myCheckboxInput" |
| | | :value="item.code" |
| | | :name="item.name" |
| | | :disabled="rightFrom.usercode==='S001'" |
| | | >{{ item.name }} |
| | | </el-checkbox> |
| | | |
| | | :checked="item.isSelected2" |
| | | :label="item.name" |
| | | @change="myCheckboxInputClick(item)" |
| | | /> |
| | | <div class="myCheckboxInputLabel">{{ item.name }}</div> |
| | | </div> |
| | | </div> |
| | | <el-divider /> |
| | |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <div class="footerButton"> |
| | | <el-button @click="rightDialogVisibleCancel">取 消</el-button> |
| | | <el-button v-waves @click="rightDialogVisibleCancel">取 消</el-button> |
| | | <el-button |
| | | v-waves |
| | | type="primary" |
| | | :loading="$store.state.app.buttonIsDisabled" |
| | | :disabled="$store.state.app.buttonIsDisabled" |
| | |
| | | import { getCookie } from '@/utils/auth' |
| | | import $ from 'jquery' |
| | | import clearAllChildren, { validateCode } from '@/utils/global' |
| | | import elDragDialog from '@/directive/el-drag-dialog' |
| | | import waves from '@/directive/waves' |
| | | |
| | | export default { |
| | | name: 'JSQD', |
| | | components: { |
| | | Pagination, ImportPicker |
| | | }, |
| | | directives: { elDragDialog, waves }, |
| | | data() { |
| | | return { |
| | | isIpad: false, |
| | |
| | | }, |
| | | // 添加按钮 |
| | | addSetting() { |
| | | if (this.RoleTypeCodeArr.find(i => i.isVisible === 1)) { |
| | | return this.$message.info('请先保存上一行记录!') |
| | | } |
| | | |
| | | let number = Math.random() * Math.random()// 作为删除时的标识符 |
| | | number = number === 0 ? (10 + Math.random()) : number |
| | | const data = { roletype_code: '', roletype_name: '', isVisible: 1, number: number } |
| | |
| | | }, |
| | | // 小盒子点击事件 |
| | | myCheckboxInputClick(val) { |
| | | console.log(val, 777777) |
| | | val.isSelected2 = !val.isSelected2 |
| | | val.isSelected2 = !!val.isSelected2 |
| | | |
| | | this.dialogFormRight.rightCurrentCode = val.code |
| | | |
| | | // 1.第一种情况 小盒子从没选中到选中 |
| | |
| | | //border: 1px solid $main_color; |
| | | border: 1px solid #eee; |
| | | display: flex; |
| | | min-width: 110px; |
| | | min-width: 100px; |
| | | padding: 10px; |
| | | margin: 10px 30px 0 0; |
| | | border-radius: 5px; |
| | | cursor: default; |
| | | position: relative; |
| | | |
| | | .myCheckboxInput { |
| | | margin: 1px 5px 0 0; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .myCheckboxInputLabel { |
| | | position: absolute; |
| | | left: 29px; |
| | | padding: 5px; |
| | | top: 6px; |
| | | color: transparent; |
| | | } |
| | | |
| | | } |
| | | |
| | | input[type=checkbox] { |