|
@@ -4,7 +4,7 @@
|
|
|
<div class="head-container">
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
|
|
<crudOperation :permission="permission" />
|
|
|
- <el-button class="filter-item" size="mini" type="success" icon="el-icon-edit" :disabled="crud.selections.length !== 1" @click="systemConfigClick(crud.selections[0])">配置子系统权限</el-button>
|
|
|
+ <!-- <el-button class="filter-item" size="mini" type="success" icon="el-icon-edit" :disabled="crud.selections.length !== 1" @click="systemConfigClick(crud.selections[0])">配置子系统权限</el-button>-->
|
|
|
<el-button class="filter-item" size="mini" type="success" icon="el-icon-edit" :disabled="crud.selections.length !== 1" @click="appMenuConfigClick(crud.selections[0])">配置APP菜单权限</el-button>
|
|
|
<div class="head-container">
|
|
|
<div v-if="crud.props.searchToggle">
|
|
@@ -21,25 +21,25 @@
|
|
|
<rrOperation />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!--配置子系统权限-->
|
|
|
- <el-dialog title="配置子系统权限" :visible.sync="systemConfig">
|
|
|
- <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
|
|
|
- <el-descriptions>
|
|
|
- <el-descriptions-item label="姓名">{{ form.name }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="员工工号">{{ form.userNumber }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="职务">{{ form.jobs && form.jobs.map(item => item.name).join(',') }}</el-descriptions-item>
|
|
|
- <el-descriptions-item label="所属部门">{{ form.dept.name }}</el-descriptions-item>
|
|
|
- </el-descriptions>
|
|
|
- <div>授权子系统权限:</div>
|
|
|
- <el-checkbox-group v-model="dmUserSystem">
|
|
|
- <el-checkbox v-for="dmSystem in dmSystemList" :key="dmSystem.id" :label="dmSystem.id" name="type" border>{{ dmSystem.systemName }}</el-checkbox>
|
|
|
- </el-checkbox-group>
|
|
|
- </el-form>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="text" @click="cancelSystemConfig">取消</el-button>
|
|
|
- <el-button :loading="crud.status.cu === 2" type="primary" @click="submitSystemConfig">确认</el-button>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <!-- <!–配置子系统权限–>-->
|
|
|
+ <!-- <el-dialog title="配置子系统权限" :visible.sync="systemConfig">-->
|
|
|
+ <!-- <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">-->
|
|
|
+ <!-- <el-descriptions>-->
|
|
|
+ <!-- <el-descriptions-item label="姓名">{{ form.name }}</el-descriptions-item>-->
|
|
|
+ <!-- <el-descriptions-item label="员工工号">{{ form.userNumber }}</el-descriptions-item>-->
|
|
|
+ <!-- <el-descriptions-item label="职务">{{ form.jobs && form.jobs.map(item => item.name).join(',') }}</el-descriptions-item>-->
|
|
|
+ <!-- <el-descriptions-item label="所属部门">{{ form.dept.name }}</el-descriptions-item>-->
|
|
|
+ <!-- </el-descriptions>-->
|
|
|
+ <!-- <div>授权子系统权限:</div>-->
|
|
|
+ <!-- <el-checkbox-group v-model="dmUserSystem">-->
|
|
|
+ <!-- <el-checkbox v-for="dmSystem in dmSystemList" :key="dmSystem.id" :label="dmSystem.id" name="type" border>{{ dmSystem.systemName }}</el-checkbox>-->
|
|
|
+ <!-- </el-checkbox-group>-->
|
|
|
+ <!-- </el-form>-->
|
|
|
+ <!-- <div slot="footer" class="dialog-footer">-->
|
|
|
+ <!-- <el-button type="text" @click="cancelSystemConfig">取消</el-button>-->
|
|
|
+ <!-- <el-button :loading="crud.status.cu === 2" type="primary" @click="submitSystemConfig">确认</el-button>-->
|
|
|
+ <!-- </div>-->
|
|
|
+ <!-- </el-dialog>-->
|
|
|
|
|
|
<!--配置app菜单权限-->
|
|
|
<el-dialog title="配置app菜单权限" :visible.sync="appMenuConfig">
|
|
@@ -107,7 +107,7 @@
|
|
|
|
|
|
<script>
|
|
|
import crudDmUser from '@/api/dm/user/dmUser'
|
|
|
-import { getDmSystem, queryByUserId } from '@/api/dm/system/dmSystem'
|
|
|
+// import { getDmSystem, queryByUserId } from '@/api/dm/system/dmSystem'
|
|
|
import { getDmAppMenu } from '@/api/dm/appMenu/dmAppMenu'
|
|
|
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
|
|
import rrOperation from '@crud/RR.operation'
|
|
@@ -153,43 +153,43 @@ export default {
|
|
|
[CRUD.HOOK.beforeRefresh]() {
|
|
|
return true
|
|
|
},
|
|
|
- systemConfigClick(data) {
|
|
|
- this.form = data
|
|
|
- let dmSystems = []
|
|
|
- queryByUserId(data.id, '').then(res => {
|
|
|
- console.log('res:', res)
|
|
|
- dmSystems = res
|
|
|
- for (let i = 0; i < dmSystems.length; i++) {
|
|
|
- this.dmUserSystem.push(dmSystems[i].id)
|
|
|
- }
|
|
|
- console.log('this.dmUserSystem', this.dmUserSystem)
|
|
|
- this.systemConfig = true
|
|
|
- this.getDmSystemList()
|
|
|
- })
|
|
|
- },
|
|
|
- // 获取所有子系统
|
|
|
- getDmSystemList() {
|
|
|
- getDmSystem().then(res => {
|
|
|
- this.dmSystemList = res.content
|
|
|
- })
|
|
|
- },
|
|
|
- cancelSystemConfig() {
|
|
|
- this.dmSystemList = []
|
|
|
- this.dmUserSystem = []
|
|
|
- this.systemConfig = false
|
|
|
- },
|
|
|
- submitSystemConfig() {
|
|
|
- console.log(this.dmUserSystem)
|
|
|
-
|
|
|
- const updateUserSystemData = {}
|
|
|
- updateUserSystemData.userId = this.form.id
|
|
|
- updateUserSystemData.systemIds = this.dmUserSystem
|
|
|
- crudDmUser.updateUserSystem(updateUserSystemData)
|
|
|
- this.dmSystemList = []
|
|
|
- this.dmUserSystem = []
|
|
|
- this.systemConfig = false
|
|
|
- this.crud.refresh()
|
|
|
- },
|
|
|
+ // systemConfigClick(data) {
|
|
|
+ // this.form = data
|
|
|
+ // let dmSystems = []
|
|
|
+ // queryByUserId(data.id, '').then(res => {
|
|
|
+ // console.log('res:', res)
|
|
|
+ // dmSystems = res
|
|
|
+ // for (let i = 0; i < dmSystems.length; i++) {
|
|
|
+ // this.dmUserSystem.push(dmSystems[i].id)
|
|
|
+ // }
|
|
|
+ // console.log('this.dmUserSystem', this.dmUserSystem)
|
|
|
+ // this.systemConfig = true
|
|
|
+ // this.getDmSystemList()
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // // 获取所有子系统
|
|
|
+ // getDmSystemList() {
|
|
|
+ // getDmSystem().then(res => {
|
|
|
+ // this.dmSystemList = res.content
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // cancelSystemConfig() {
|
|
|
+ // this.dmSystemList = []
|
|
|
+ // this.dmUserSystem = []
|
|
|
+ // this.systemConfig = false
|
|
|
+ // },
|
|
|
+ // submitSystemConfig() {
|
|
|
+ // console.log(this.dmUserSystem)
|
|
|
+ //
|
|
|
+ // const updateUserSystemData = {}
|
|
|
+ // updateUserSystemData.userId = this.form.id
|
|
|
+ // updateUserSystemData.systemIds = this.dmUserSystem
|
|
|
+ // crudDmUser.updateUserSystem(updateUserSystemData)
|
|
|
+ // this.dmSystemList = []
|
|
|
+ // this.dmUserSystem = []
|
|
|
+ // this.systemConfig = false
|
|
|
+ // this.crud.refresh()
|
|
|
+ // },
|
|
|
appMenuConfigClick(data) {
|
|
|
this.form = data
|
|
|
console.log('data.dmAppMenus.length:', data.dmAppMenus.length)
|