代码更新

This commit is contained in:
2022-12-08 10:29:29 +08:00
parent c0c50900db
commit d4dfe5c07d
16 changed files with 133 additions and 92 deletions

View File

@@ -26,8 +26,10 @@ public interface UserRelateService {
void inserDeptRelate(Long user,Set<Long> deptIds); void inserDeptRelate(Long user,Set<Long> deptIds);
void inserRoleRelate(Long user,Set<Long> RoleIds); void inserRoleRelate(Long user,Set<Long> RoleIds);
void deleteDeptRelate(Set<Long> deptIds); void deleteDeptRelate(Long user,Set<Long> deptIds);
void deleteRoleRelate(Set<Long> RoleIds); void deleteRoleRelate(Long user,Set<Long> RoleIds);
void deleteDeptRelate(Set<Long> userIds);
void deleteRoleRelate(Set<Long> userIds);
void updateDeptRelate(Long user,Set<Long> deptIds); void updateDeptRelate(Long user,Set<Long> deptIds);
void updateRoleRelate(Long user,Set<Long> RoleIds); void updateRoleRelate(Long user,Set<Long> RoleIds);
} }

View File

@@ -39,28 +39,50 @@ public class UserRelateServiceImpl implements UserRelateService {
} }
@Override @Override
public void deleteDeptRelate(Set<Long> deptIds) { public void deleteDeptRelate(Long user,Set<Long> deptIds) {
if (!CollectionUtils.isEmpty(deptIds)){ if (!CollectionUtils.isEmpty(deptIds)){
String collect = deptIds.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','")); String collect = deptIds.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','"));
String sql="dept_id in ('"+collect+"')"; String sql="user_id = '"+user+"'"+" and dept_id in ('"+collect+"')";
WQLObject.getWQLObject("sys_user_dept").delete(sql); WQLObject.getWQLObject("sys_user_dept").delete(sql);
} }
} }
@Override
public void deleteDeptRelate(Set<Long> userIds) {
if (!CollectionUtils.isEmpty(userIds)){
String collect = userIds.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','"));
String sql="user_id in ('"+collect+"')";
WQLObject.getWQLObject("sys_users_roles").delete(sql);
}
}
@Override @Override
public void deleteRoleRelate(Set<Long> RoleIds) { public void deleteRoleRelate(Long user,Set<Long> RoleIds) {
if (!CollectionUtils.isEmpty(RoleIds)){ if (!CollectionUtils.isEmpty(RoleIds)){
String collect = RoleIds.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','")); String collect = RoleIds.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','"));
String sql="dept_id in ('"+collect+"')"; String sql="user_id = '"+user+"'"+" and role_id in ('"+collect+"')";
WQLObject.getWQLObject("sys_user_dept").delete(sql); WQLObject.getWQLObject("sys_users_roles").delete(sql);
} }
} }
@Override
public void deleteRoleRelate(Set<Long> userIds) {
if (!CollectionUtils.isEmpty(userIds)){
String collect = userIds.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','"));
String sql="user_id in ('"+collect+"')";
WQLObject.getWQLObject("sys_users_roles").delete(sql);
}
}
@Override @Override
@Transactional @Transactional
public void updateDeptRelate(Long user, Set<Long> deptIds) { public void updateDeptRelate(Long user, Set<Long> deptIds) {
if (user !=null){ if (user !=null){
this.deleteDeptRelate(deptIds); this.deleteDeptRelate(user,deptIds);
this.inserDeptRelate(user,deptIds); this.inserDeptRelate(user,deptIds);
} }
} }
@@ -69,7 +91,7 @@ public class UserRelateServiceImpl implements UserRelateService {
@Transactional @Transactional
public void updateRoleRelate(Long user, Set<Long> RoleIds) { public void updateRoleRelate(Long user, Set<Long> RoleIds) {
if (user !=null){ if (user !=null){
this.deleteRoleRelate(RoleIds); this.deleteRoleRelate(user,RoleIds);
this.inserRoleRelate(user,RoleIds); this.inserRoleRelate(user,RoleIds);
} }
} }

View File

@@ -213,12 +213,14 @@ public class UserServiceImpl implements UserService {
// 清理缓存 // 清理缓存
User user = findById(id); User user = findById(id);
delCaches(user.getUser_id(), user.getUsername()); delCaches(user.getUser_id(), user.getUsername());
//删除用户部门,角色关系表
} }
String collectSql = ids.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','")); String collectSql = ids.stream().map(a -> String.valueOf(a)).collect(Collectors.joining("','"));
WQLObject.getWQLObject("sys_user").delete("user_id in ('"+collectSql+"')"); WQLObject.getWQLObject("sys_user").delete("user_id in ('"+collectSql+"')");
//删除用户部门,角色关系表
userRelateService.deleteDeptRelate(ids); userRelateService.deleteDeptRelate(ids);
userRelateService.deleteRoleRelate(ids); userRelateService.deleteRoleRelate(ids);
} }
@Override @Override

View File

@@ -65,7 +65,7 @@
FROM FROM
md_pb_storagevehicleinfo info md_pb_storagevehicleinfo info
LEFT JOIN md_pb_storagevehicleext ext ON info.storagevehicle_id = ext.storagevehicle_id LEFT JOIN md_pb_storagevehicleext ext ON info.storagevehicle_id = ext.storagevehicle_id
LEFT JOIN sys_dict_detail d ON info.storagevehicle_type = d.value and d.name = 'storagevehicle_type' LEFT JOIN sys_dict d ON info.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
LEFT JOIN MD_ME_MaterialBase mdb ON ext.material_id = mdb.material_id LEFT JOIN MD_ME_MaterialBase mdb ON ext.material_id = mdb.material_id
LEFT JOIN MD_ME_ProducMaterialExt mdp ON mdb.material_id = mdp.material_id LEFT JOIN MD_ME_ProducMaterialExt mdp ON mdb.material_id = mdp.material_id
LEFT JOIN sch_base_point point ON info.storagevehicle_code = point.vehicle_code LEFT JOIN sch_base_point point ON info.storagevehicle_code = point.vehicle_code
@@ -102,9 +102,9 @@
dict.label, dict.label,
dict.value dict.value
FROM FROM
sys_dict_detail dict sys_dict dict
WHERE WHERE
dict.name = 'storagevehicle_type' dict.code = 'storagevehicle_type'
AND dict.value in (30,31,32,33) AND dict.value in (30,31,32,33)
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY

View File

@@ -52,7 +52,7 @@
point.point_name point.point_name
FROM FROM
md_pb_storagevehicleinfo s md_pb_storagevehicleinfo s
LEFT JOIN sys_dict_detail d ON s.storagevehicle_type = d.value and d.dict_id = '32' LEFT JOIN sys_dict d ON s.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code
LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id

View File

@@ -52,7 +52,7 @@
FROM FROM
sch_base_point point sch_base_point point
LEFT JOIN md_pb_storagevehiclepoint svp ON point.point_id = svp.point_id and svp.set_type <>'02' LEFT JOIN md_pb_storagevehiclepoint svp ON point.point_id = svp.point_id and svp.set_type <>'02'
LEFT JOIN sys_dict_detail d ON svp.set_type = d.value and d.name = 'set_type' LEFT JOIN sys_dict d ON svp.set_type = d.value and d.code = 'set_type'
WHERE WHERE
point.is_delete = '0' point.is_delete = '0'
AND point.is_used = '1' AND point.is_used = '1'
@@ -77,9 +77,9 @@
dict.label, dict.label,
dict.value dict.value
FROM FROM
sys_dict_detail dict sys_dict dict
WHERE WHERE
dict.name = 'storagevehicle_type' dict.code = 'storagevehicle_type'
AND dict.value in (30,31,32,33) AND dict.value in (30,31,32,33)
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY
@@ -91,9 +91,9 @@
dict.label, dict.label,
dict.value dict.value
FROM FROM
sys_dict_detail dict sys_dict dict
WHERE WHERE
dict.name = 'sch_area_type' dict.code = 'sch_area_type'
AND dict.value in (25,26,32,28) AND dict.value in (25,26,32,28)
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY

View File

@@ -55,7 +55,7 @@
md_pb_storagevehicleinfo info md_pb_storagevehicleinfo info
LEFT JOIN md_pb_storagevehiclepoint svp ON info.storagevehicle_id = svp.storagevehicle_id and svp.set_type <>'01' LEFT JOIN md_pb_storagevehiclepoint svp ON info.storagevehicle_id = svp.storagevehicle_id and svp.set_type <>'01'
LEFT JOIN sch_base_point point ON point.point_id = svp.point_id LEFT JOIN sch_base_point point ON point.point_id = svp.point_id
LEFT JOIN sys_dict_detail d ON info.storagevehicle_type = d.value and d.name = 'storagevehicle_type' LEFT JOIN sys_dict d ON info.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
WHERE WHERE
info.is_delete = '0' info.is_delete = '0'
AND info.is_used = '1' AND info.is_used = '1'
@@ -99,9 +99,9 @@
dict.label, dict.label,
dict.value dict.value
FROM FROM
sys_dict_detail dict sys_dict dict
WHERE WHERE
dict.name = 'storagevehicle_type' dict.code = 'storagevehicle_type'
AND dict.value in (30,31,32,33) AND dict.value in (30,31,32,33)
ENDSELECT ENDSELECT
ENDPAGEQUERY ENDPAGEQUERY

View File

@@ -1,10 +1,10 @@
[交易说明] [交易说明]
交易名: 产品参数分页查询 交易名: 产品参数分页查询
所属模块: 所属模块:
功能简述: 功能简述:
版权所有: 版权所有:
表引用: 表引用:
版本经历: 版本经历:
[数据库] [数据库]
--指定数据库为空采用默认值默认为db.properties中列出的第一个库 --指定数据库为空采用默认值默认为db.properties中列出的第一个库
@@ -21,26 +21,26 @@
[临时表] [临时表]
--这边列出来的临时表就会在运行期动态创建 --这边列出来的临时表就会在运行期动态创建
[临时变量] [临时变量]
--所有中间过程变量均可在此处定义 --所有中间过程变量均可在此处定义
[业务过程] [业务过程]
########################################## ##########################################
# 1、输入输出检查 # # 1、输入输出检查 #
########################################## ##########################################
########################################## ##########################################
# 2、主过程前处理 # # 2、主过程前处理 #
########################################## ##########################################
########################################## ##########################################
# 3、业务主过程 # # 3、业务主过程 #
########################################## ##########################################
IF 输入.flag = "1" IF 输入.flag = "1"
PAGEQUERY PAGEQUERY
SELECT SELECT
@@ -94,13 +94,13 @@
LEFT JOIN md_me_stockmaterialext s ON m.material_id = s.material_id LEFT JOIN md_me_stockmaterialext s ON m.material_id = s.material_id
LEFT JOIN md_me_producmaterialext p ON m.material_id = p.material_id LEFT JOIN md_me_producmaterialext p ON m.material_id = p.material_id
LEFT JOIN md_pb_classstandard b ON m.material_type_id = b.class_id LEFT JOIN md_pb_classstandard b ON m.material_type_id = b.class_id
LEFT JOIN sys_dict_detail d1 ON d1.value = p.product_mode and d1.name = 'product_mode' LEFT JOIN sys_dict d1 ON d1.value = p.product_mode and d1.code = 'product_mode'
LEFT JOIN sys_dict_detail d2 ON d2.value = s.is_need_plan and d2.name = 'IS_OR_NOT' LEFT JOIN sys_dict d2 ON d2.value = s.is_need_plan and d2.code = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d3 ON d3.value = s.is_report and d3.name = 'IS_OR_NOT' LEFT JOIN sys_dict d3 ON d3.value = s.is_report and d3.code = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d7 ON d7.value = p.is_report and d7.name = 'IS_OR_NOT' LEFT JOIN sys_dict d7 ON d7.value = p.is_report and d7.code = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d4 ON d4.value = p.is_auto_open and d4.name = 'IS_OR_NOT' LEFT JOIN sys_dict d4 ON d4.value = p.is_auto_open and d4.code = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d5 ON d5.value = p.is_again_put and d5.name = 'IS_OR_NOT' LEFT JOIN sys_dict d5 ON d5.value = p.is_again_put and d5.code = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d6 ON d6.value = p.product_series and d6.name = 'product_series' LEFT JOIN sys_dict d6 ON d6.value = p.product_series and d6.code = 'product_series'
LEFT JOIN md_pb_measureunit u ON u.measure_unit_id = m.base_unit_id LEFT JOIN md_pb_measureunit u ON u.measure_unit_id = m.base_unit_id
WHERE WHERE
m.is_delete = '0' m.is_delete = '0'

View File

@@ -55,7 +55,7 @@
detail.label detail.label
FROM FROM
st_ivt_bsrealstorattr stor st_ivt_bsrealstorattr stor
LEFT JOIN sys_dict_detail detail ON detail.value = stor.stor_type_scode AND detail.dict_id = '30' LEFT JOIN sys_dict detail ON detail.value = stor.stor_type_scode AND detail.dict_id = '30'
WHERE WHERE
stor.is_delete = '0' stor.is_delete = '0'
OPTION 输入.search <> "" OPTION 输入.search <> ""

View File

@@ -117,9 +117,9 @@
label AS text, label AS text,
value value
FROM FROM
sys_dict_detail sys_dict
WHERE WHERE
name = 'product_area' code = 'product_area'
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY

View File

@@ -87,9 +87,9 @@
value, value,
label label
FROM FROM
sys_dict_detail sys_dict
WHERE WHERE
name = 'product_area' code = 'product_area'
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY

View File

@@ -148,10 +148,10 @@
label AS text, label AS text,
value value
FROM FROM
sys_dict_detail sys_dict
WHERE WHERE
name = 'ST_INV_OUT_TYPE' code = 'ST_INV_OUT_TYPE'
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY
ENDIF ENDIF

View File

@@ -53,7 +53,7 @@
FROM FROM
sch_base_point point sch_base_point point
LEFT JOIN SCH_BASE_Region region ON point.region_id = region.region_id LEFT JOIN SCH_BASE_Region region ON point.region_id = region.region_id
LEFT JOIN sys_dict_detail d3 ON point.lock_type = d3.value and d3.name='d_lock_type' LEFT JOIN sys_dict d3 ON point.lock_type = d3.value and d3.code='d_lock_type'
WHERE WHERE
point.is_delete = '0' point.is_delete = '0'
OPTION 输入.region_id <> "" OPTION 输入.region_id <> ""

View File

@@ -56,7 +56,7 @@
FROM FROM
sch_base_task task sch_base_task task
LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code
LEFT JOIN sys_dict_detail dict ON dict.`value` = task.task_status AND dict.`name` = 'task_status' LEFT JOIN sys_dict dict ON dict.`value` = task.task_status AND dict.`code` = 'task_status'
WHERE WHERE
task.is_delete = '0' task.is_delete = '0'
OPTION 输入.task_type <> "" OPTION 输入.task_type <> ""

View File

@@ -115,11 +115,10 @@
max(detail.VALUE) AS CODE, max(detail.VALUE) AS CODE,
max(detail.label) AS NAME max(detail.label) AS NAME
FROM FROM
sys_dict_detail detail sys_dict detail
LEFT JOIN sys_dict dict ON dict.dict_id = detail.dict_id
WHERE WHERE
1 = 1 1 = 1
AND dict. NAME LIKE '%INV_TYPE%' AND detail.code LIKE '%INV_TYPE%'
group by detail.VALUE group by detail.VALUE
ENDSELECT ENDSELECT
ENDQUERY ENDQUERY

View File

@@ -173,11 +173,11 @@
<el-dropdown v-hasPermi="['system:user:resetPwd', 'system:user:edit']" size="mini"> <el-dropdown v-hasPermi="['system:user:resetPwd', 'system:user:edit']" size="mini">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button> <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-key"><span @click="resetPassword(scope.row)">重置密码</span></el-dropdown-item>
<el-dropdown-item icon="el-icon-key"> <el-dropdown-item icon="el-icon-key">
<span @click="openDeptDrawer(scope.row)">部门权限</span> <span @click="openDeptDrawer(scope.row)">部门权限</span>
</el-dropdown-item> </el-dropdown-item>
<el-dropdown-item icon="el-icon-key">数据权限</el-dropdown-item> <el-dropdown-item icon="el-icon-key">数据权限</el-dropdown-item>
<el-dropdown-item icon="el-icon-key"><span @click="resetPassword(scope.row)">重置密码</span></el-dropdown-item>
<el-dropdown-item icon="el-icon-key"><span @click="changeEnabled(scope.row)">{{ enabledTypeOptions.find(item => {return item.key !== scope.row.is_used}).display_name }}账号</span></el-dropdown-item> <el-dropdown-item icon="el-icon-key"><span @click="changeEnabled(scope.row)">{{ enabledTypeOptions.find(item => {return item.key !== scope.row.is_used}).display_name }}账号</span></el-dropdown-item>
<el-dropdown-item icon="el-icon-circle-check"> <el-dropdown-item icon="el-icon-circle-check">
<span @click="openRoleDrawer(scope.row)">分配角色</span> <span @click="openRoleDrawer(scope.row)">分配角色</span>
@@ -193,7 +193,7 @@
</el-row> </el-row>
<el-drawer <el-drawer
:title="drawerTitle" :title="drawerTitle"
:visible.sync="deptDrawer" :visible.sync="syncDrawer"
direction="rtl" direction="rtl"
:before-close="handleClose" :before-close="handleClose"
:wrapper-closable="false" :wrapper-closable="false"
@@ -202,22 +202,12 @@
> >
<div style="margin: 0 20px 0 20px; height: 100%"> <div style="margin: 0 20px 0 20px; height: 100%">
<div style="height: 90%"> <div style="height: 90%">
<!-- <div class="head-container">-->
<!-- <el-input-->
<!-- v-model="deptName"-->
<!-- clearable-->
<!-- size="mini"-->
<!-- placeholder="请输入部门名称"-->
<!-- prefix-icon="el-icon-search"-->
<!-- class="filter-item"-->
<!-- @input="getDeptDatas"-->
<!-- />-->
<!-- </div>-->
<el-tree <el-tree
v-if="flag"
ref="deptUser" ref="deptUser"
show-checkbox show-checkbox
default-expand-all default-expand-all
:data="drawerDatas" :data="deptsDatas"
:default-checked-keys="depChecked" :default-checked-keys="depChecked"
:props="deptProps" :props="deptProps"
:node-key="nodeKey" :node-key="nodeKey"
@@ -225,11 +215,23 @@
check-strictly check-strictly
@check="handCheck" @check="handCheck"
@check-change="checkChange" @check-change="checkChange"
@close="clearCheck"
/> />
<el-table
v-if="!flag"
highlight-current-row
ref="roleTable"
style="width: 100%;"
:data="rolesDatas"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55"/>
<el-table-column prop="name" label="角色名称" min-width="100" show-overflow-tooltip/>
</el-table>
</div> </div>
<div style="height: 10%"> <div style="height: 10%">
<el-button @click="cancelForm">取 消</el-button> <el-button @click="cancelForm">取 消</el-button>
<el-button type="primary" @click="saveChecked">保存</el-button> <el-button type="primary" @click="saveChecked">保 存</el-button>
</div> </div>
</div> </div>
</el-drawer> </el-drawer>
@@ -297,13 +299,13 @@ export default {
{ min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' } { min: 2, max: 20, message: '长度在 2 到 20 个字符', trigger: 'blur' }
] ]
}, },
deptDrawer: false, syncDrawer: false,
depChecked: [], depChecked: [],
depCheckedId: '', depCheckedId: '',
drawerDatas: [], // ? deptsDatas: [],
rolesDatas: [],
drawerTitle: '', drawerTitle: '',
drawerHint: '', nodeKey: 'dept_id',
nodeKey: '',
flag: true flag: true
} }
}, },
@@ -535,32 +537,44 @@ export default {
}, },
openDeptDrawer(row) { openDeptDrawer(row) {
crudDept.getDeptTree().then(res => { crudDept.getDeptTree().then(res => {
this.drawerDatas = res.content this.deptsDatas = res.content
}) })
this.drawerTitle = '分配部门权限'
this.drawerHint = '请选择部门'
this.nodeKey = 'dept_id' this.nodeKey = 'dept_id'
this.openDrawer()
this.drawerTitle = '分配部门权限'
this.flag = true this.flag = true
this.deptDrawer = true // 默认选中
this.depChecked = []
this.depCheckedId = ''
console.log(row)
this.depChecked = row.depts this.depChecked = row.depts
this.depCheckedId = row.user_id this.giveValue(row)
}, },
openRoleDrawer(row) { openRoleDrawer(row) {
this.rolesDatas = []
getAll().then(res => { getAll().then(res => {
this.drawerDatas = res this.rolesDatas = res
// 回显默认选中
console.log(res)
console.log(row.roles)
this.$nextTick(function() {
for (let i = 0; i < this.rolesDatas.length; i++) {
for (let j = 0; j < row.roles.length; j++) {
if (this.rolesDatas[i].role_id == row.roles[j]) {
this.$refs.roleTable.toggleRowSelection(this.rolesDatas[i], true)
}
}
}
})
}) })
this.deptDrawer = true this.openDrawer()
this.drawerTitle = '分配角色权限' this.drawerTitle = '分配角色权限'
this.drawerHint = '请选择角色'
this.nodeKey = 'role_id'
this.flag = false this.flag = false
this.depChecked = [] this.giveValue(row)
},
openDrawer() {
this.syncDrawer = true
this.depCheckedId = '' this.depCheckedId = ''
console.log(row) this.depChecked = []
this.depChecked = row.roles },
giveValue(row) {
this.depCheckedId = row.user_id this.depCheckedId = row.user_id
}, },
clearCheck() { clearCheck() {
@@ -574,19 +588,21 @@ export default {
.catch(_ => {}) .catch(_ => {})
}, },
cancelForm() { // 关闭 cancelForm() { // 关闭
this.deptDrawer = false this.syncDrawer = false
if (this.flag) this.clearCheck()
}, },
saveChecked() { saveChecked() {
console.log(this.depCheckedId)
console.log(this.$refs.deptUser.getCheckedKeys())
const user = { const user = {
user_id: this.depCheckedId, user_id: this.depCheckedId
} }
if (this.flag) { if (this.flag) {
user.depts = this.$refs.deptUser.getCheckedKeys() user.depts = this.$refs.deptUser.getCheckedKeys()
} else { } else {
user.roles = this.$refs.deptUser.getCheckedKeys() user.roles = this.crud.selections.map(item => (item.role_id))
} }
console.log('user', user)
console.log(this.flag)
console.log(this.crud.selections)
crudUser.edit(user).then(res => { crudUser.edit(user).then(res => {
this.cancelForm() this.cancelForm()
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)