【更新】bug修改
This commit is contained in:
parent
6fe7fc311a
commit
9419800806
@ -113,6 +113,9 @@ export default {
|
|||||||
Object.assign(this.localPagination, {
|
Object.assign(this.localPagination, {
|
||||||
showSizeChanger: val
|
showSizeChanger: val
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
columns(v) {
|
||||||
|
this.columnsSetting = v
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@ -252,6 +255,13 @@ export default {
|
|||||||
this.updateSelect([], [])
|
this.updateSelect([], [])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 刷新并清空已选
|
||||||
|
*/
|
||||||
|
clearRefreshSelected (bool = false) {
|
||||||
|
this.refresh(bool)
|
||||||
|
this.clearSelected()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 处理交给 table 使用者去处理 clear 事件时,内部选中统计同时调用
|
* 处理交给 table 使用者去处理 clear 事件时,内部选中统计同时调用
|
||||||
* @param callback
|
* @param callback
|
||||||
@ -285,8 +295,7 @@ export default {
|
|||||||
|
|
||||||
// 绘制 alert 组件
|
// 绘制 alert 组件
|
||||||
// 统一先去除alert组件
|
// 统一先去除alert组件
|
||||||
return ''
|
return (
|
||||||
/* return (
|
|
||||||
<a-alert showIcon={true} style="margin-bottom: 16px">
|
<a-alert showIcon={true} style="margin-bottom: 16px">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
<span style="margin-right: 12px">已选择: <a style="font-weight: 600">{this.selectedRows.length}</a></span>
|
<span style="margin-right: 12px">已选择: <a style="font-weight: 600">{this.selectedRows.length}</a></span>
|
||||||
@ -294,7 +303,7 @@ export default {
|
|||||||
{clearItem}
|
{clearItem}
|
||||||
</template>
|
</template>
|
||||||
</a-alert>
|
</a-alert>
|
||||||
) */
|
)
|
||||||
},
|
},
|
||||||
columnChange(val) {
|
columnChange(val) {
|
||||||
this.columnsSetting = val
|
this.columnsSetting = val
|
||||||
@ -370,7 +379,8 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
/* return (
|
/*
|
||||||
|
return (
|
||||||
<a-alert showIcon={true} style="margin-bottom: 16px">
|
<a-alert showIcon={true} style="margin-bottom: 16px">
|
||||||
<template slot="message">
|
<template slot="message">
|
||||||
<span style="margin-right: 12px">已选择: <a style="font-weight: 600">{this.selectedRows.length}</a></span>
|
<span style="margin-right: 12px">已选择: <a style="font-weight: 600">{this.selectedRows.length}</a></span>
|
||||||
@ -378,7 +388,8 @@ export default {
|
|||||||
{clearItem}
|
{clearItem}
|
||||||
</template>
|
</template>
|
||||||
</a-alert>
|
</a-alert>
|
||||||
) */
|
)
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -435,4 +446,4 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { STable, XCard } from '@/components'
|
import { STable, XCard } from '@/components'
|
||||||
import { getMenuList } from '@/api/modular/system/menuManage'
|
import { getMenuList, sysMenuDelete } from '@/api/modular/system/menuManage'
|
||||||
import addForm from './addForm'
|
import addForm from './addForm'
|
||||||
import editForm from './editForm'
|
import editForm from './editForm'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
@ -160,6 +160,16 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleDel (record) {
|
||||||
|
sysMenuDelete(record).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success('删除成功')
|
||||||
|
this.$refs.table.refresh()
|
||||||
|
} else {
|
||||||
|
this.$message.error('删除失败:' + res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.refresh()
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,9 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="loadData"
|
:data="loadData"
|
||||||
:alert="true"
|
:alert="options.alert"
|
||||||
:rowKey="(record) => record.id"
|
:rowKey="(record) => record.id"
|
||||||
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:rowSelection="options.rowSelection"
|
||||||
>
|
>
|
||||||
<template slot="operator">
|
<template slot="operator">
|
||||||
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysOrg:add')">新增机构</a-button>
|
<a-button @click="$refs.addForm.add()" icon="plus" type="primary" v-if="hasPerm('sysOrg:add')">新增机构</a-button>
|
||||||
@ -122,6 +122,13 @@
|
|||||||
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
|
||||||
replaceFields: {
|
replaceFields: {
|
||||||
key: 'id'
|
key: 'id'
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
||||||
|
rowSelection: {
|
||||||
|
selectedRowKeys: this.selectedRowKeys,
|
||||||
|
onChange: this.onSelectChange
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -41,6 +41,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import vip.xiaonuo.sys.modular.user.param.SysUserParam;
|
import vip.xiaonuo.sys.modular.user.param.SysUserParam;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统组织机构控制器
|
* 系统组织机构控制器
|
||||||
@ -107,8 +108,8 @@ public class SysOrgController {
|
|||||||
@DataScope
|
@DataScope
|
||||||
@PostMapping("/sysOrg/delete")
|
@PostMapping("/sysOrg/delete")
|
||||||
@BusinessLog(title = "系统组织机构_删除", opType = LogAnnotionOpTypeEnum.DELETE)
|
@BusinessLog(title = "系统组织机构_删除", opType = LogAnnotionOpTypeEnum.DELETE)
|
||||||
public ResponseData delete(@RequestBody @Validated(BaseParam.delete.class) SysOrgParam sysOrgParam) {
|
public ResponseData delete(@RequestBody @Validated(BaseParam.delete.class) List<SysOrgParam> sysOrgParamList) {
|
||||||
sysOrgService.delete(sysOrgParam);
|
sysOrgService.delete(sysOrgParamList);
|
||||||
return new SuccessResponseData();
|
return new SuccessResponseData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,11 +72,11 @@ public interface SysOrgService extends IService<SysOrg> {
|
|||||||
/**
|
/**
|
||||||
* 删除系统组织机构
|
* 删除系统组织机构
|
||||||
*
|
*
|
||||||
* @param sysOrgParam 删除参数
|
* @param sysOrgParamList 删除参数集合
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2020/3/25 14:57
|
* @date 2020/3/25 14:57
|
||||||
*/
|
*/
|
||||||
void delete(SysOrgParam sysOrgParam);
|
void delete(List<SysOrgParam> sysOrgParamList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑系统组织机构
|
* 编辑系统组织机构
|
||||||
|
@ -195,7 +195,8 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void delete(SysOrgParam sysOrgParam) {
|
public void delete(List<SysOrgParam> sysOrgParamList) {
|
||||||
|
sysOrgParamList.forEach(sysOrgParam -> {
|
||||||
SysOrg sysOrg = this.querySysOrg(sysOrgParam);
|
SysOrg sysOrg = this.querySysOrg(sysOrgParam);
|
||||||
Long id = sysOrg.getId();
|
Long id = sysOrg.getId();
|
||||||
boolean superAdmin = LoginContextHolder.me().isSuperAdmin();
|
boolean superAdmin = LoginContextHolder.me().isSuperAdmin();
|
||||||
@ -234,7 +235,7 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|||||||
|
|
||||||
// 级联删除该机构子机构对应的用户-数据范围关联信息
|
// 级联删除该机构子机构对应的用户-数据范围关联信息
|
||||||
sysUserDataScopeService.deleteUserDataScopeListByOrgIdList(childIdList);
|
sysUserDataScopeService.deleteUserDataScopeListByOrgIdList(childIdList);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
@ -38,6 +38,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统职位控制器
|
* 系统职位控制器
|
||||||
@ -100,8 +101,8 @@ public class SysPosController {
|
|||||||
@Permission
|
@Permission
|
||||||
@PostMapping("/sysPos/delete")
|
@PostMapping("/sysPos/delete")
|
||||||
@BusinessLog(title = "系统职位_删除", opType = LogAnnotionOpTypeEnum.DELETE)
|
@BusinessLog(title = "系统职位_删除", opType = LogAnnotionOpTypeEnum.DELETE)
|
||||||
public ResponseData delete(@RequestBody @Validated(SysPosParam.delete.class) SysPosParam sysPosParam) {
|
public ResponseData delete(@RequestBody @Validated(SysPosParam.delete.class) List<SysPosParam> sysPosParamList) {
|
||||||
sysPosService.delete(sysPosParam);
|
sysPosService.delete(sysPosParamList);
|
||||||
return new SuccessResponseData();
|
return new SuccessResponseData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,11 +71,11 @@ public interface SysPosService extends IService<SysPos> {
|
|||||||
/**
|
/**
|
||||||
* 删除系统职位
|
* 删除系统职位
|
||||||
*
|
*
|
||||||
* @param sysPosParam 删除参数
|
* @param sysPosParamList 删除参数集合
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2020/3/25 14:57
|
* @date 2020/3/25 14:57
|
||||||
*/
|
*/
|
||||||
void delete(SysPosParam sysPosParam);
|
void delete(List<SysPosParam> sysPosParamList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑系统职位
|
* 编辑系统职位
|
||||||
|
@ -107,7 +107,8 @@ public class SysPosServiceImpl extends ServiceImpl<SysPosMapper, SysPos> impleme
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public void delete(SysPosParam sysPosParam) {
|
public void delete(List<SysPosParam> sysPosParamList) {
|
||||||
|
sysPosParamList.forEach(sysPosParam -> {
|
||||||
SysPos sysPos = this.querySysPos(sysPosParam);
|
SysPos sysPos = this.querySysPos(sysPosParam);
|
||||||
Long id = sysPos.getId();
|
Long id = sysPos.getId();
|
||||||
//该职位下是否有员工
|
//该职位下是否有员工
|
||||||
@ -124,6 +125,7 @@ public class SysPosServiceImpl extends ServiceImpl<SysPosMapper, SysPos> impleme
|
|||||||
}
|
}
|
||||||
sysPos.setStatus(CommonStatusEnum.DELETED.getCode());
|
sysPos.setStatus(CommonStatusEnum.DELETED.getCode());
|
||||||
this.updateById(sysPos);
|
this.updateById(sysPos);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user