| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="60%" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <GlobalWindow :title="title" width="80%" :visible.sync="visible" :confirm-working="isWorking" @confirm="confirm"> |
| | | <p class="tip">正在为角色【 <em>{{role.name || '-'}}</em>】 配置数据权限</p> |
| | | <p class="tip-warn"><i class="el-icon-warning"></i>提醒:权限配置后需重新登录后生效</p> |
| | | <el-form :model="form" ref="form" style="margin-top:15px"> |
| | | <el-form-item label="权限类型:" prop="type"> |
| | | <el-select v-model="form.type" clearable filterable placeholder="请选择权限类型"> |
| | | <el-option |
| | | v-for="(item, index) in options" |
| | | :key="index" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | > |
| | | <el-option v-for="(item, index) in options" :key="index" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="form.type == 4" label="自定义部门:" prop="customData"> |
| | | <el-cascader |
| | | :options="departments" |
| | | v-model="form.customData" |
| | | :props=defaultProps |
| | | clearable |
| | | ></el-cascader> |
| | | <el-cascader :options="departments" v-model="form.customData" :props=defaultProps clearable></el-cascader> |
| | | </el-form-item> |
| | | |
| | | </el-form> |
| | |
| | | for (const key in this.form) { |
| | | this.form[key] = target[key] |
| | | } |
| | | console.log(target); |
| | | console.log(target) |
| | | if (target.customData === undefined ||target.customData === null || target.customData === '') { |
| | | this.form.customData = [] |
| | | } else { |
| | |
| | | newItem.children = this.newTree(newItem.children) |
| | | } |
| | | return newItem |
| | | }); |
| | | }) |
| | | }, |
| | | __confirmCreate () { |
| | | // console.log(JSON.stringify(this.form.customData)); |
| | |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .transfer { |
| | | height: 600px; |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | ::v-deep .el-transfer-panel { |
| | | flex: 1; |
| | | height: 100%; |
| | | } |
| | | |
| | | ::v-deep .el-transfer-panel__body { |
| | | height: 500px; |
| | | } |
| | | |
| | | ::v-deep .el-transfer-panel__list.is-filterable { |
| | | height: 480px; |
| | | } |
| | | } |
| | | </style> |