修改部门管理

This commit is contained in:
qq787203167
2022-03-04 11:09:21 +08:00
parent a0973af7ac
commit 61e3f1d6f6
4 changed files with 183 additions and 196 deletions
@@ -463,4 +463,7 @@
.ant-table-placeholder {
background: transparent !important;
}
.ant-input-number{
background: transparent !important;
}
</style>
+2 -1
View File
@@ -18,12 +18,13 @@ export const JeroListMixin = {
/* 数据源 */
dataSource:[],
/* 分页参数 */
//range[0] + "-" + range[1] +
ipagination:{
current: 1,
pageSize: 10,
pageSizeOptions: ['10', '20', '30'],
showTotal: (total, range) => {
return range[0] + "-" + range[1] + "" + total + ""
return this.$t('total') +' '+ total + ' '+this.$t('strip')
},
showQuickJumper: true,
showSizeChanger: true,
+133 -139
View File
@@ -1,84 +1,84 @@
<template xmlns:background-color="http://www.w3.org/1999/xhtml">
<a-row :gutter="10">
<a-col :md="10" :sm="24" >
<a-row :gutter="10" class="box-ant">
<a-col :md="10" :sm="24">
<a-card :bordered="false" style="padding: 12px 0;">
<!-- 按钮操作区域 -->
<a-row style="margin-left: 14px">
<a-button @click="handleAdd(1)" type="primary">{{$t('AddDepartment')}}</a-button>
<a-button @click="handleAdd(2)" type="primary">{{$t('AddSubordinate')}}</a-button>
<a-button type="primary" icon="download" @click="handleExportXls($t('DepartmentInformation'))">{{$t('export')}}</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">{{$t('import')}}</a-button>
</a-upload>
<a-button :title="$t('DeleteMultiplePiecesData')" @click="batchDel" type="default">{{$t('BatchDelete')}}</a-button>
<!-- <a-button @click="handleAdd(1)" type="primary">{{$t('AddDepartment')}}</a-button>-->
<!-- <a-button @click="handleAdd(2)" type="primary">{{$t('AddSubordinate')}}</a-button>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls($t('DepartmentInformation'))">{{$t('export')}}</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
<!-- </a-upload>-->
<!-- <a-button :title="$t('DeleteMultiplePiecesData')" @click="batchDel" type="default">{{$t('BatchDelete')}}</a-button>-->
<!--<a-button @click="refresh" type="default" icon="reload" :loading="loading">刷新</a-button>-->
</a-row>
<div style="background: #fff;padding-left:16px;height: 100%; margin-top: 5px">
<a-alert type="info" :showIcon="true">
<div slot="message">
{{$t('CurrentSelection')}}<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
<a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">{{$t('Deselect')}}</a>
</div>
</a-alert>
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" :placeholder="$t('enterDepartmentName')"/>
<div style="padding-left:16px;height: 100%;">
<!-- <a-alert type="info" :showIcon="true">-->
<!-- <div slot="message">-->
<!-- {{$t('CurrentSelection')}}<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>-->
<!-- <a v-if="this.currSelected.title" style="margin-left: 10px" @click="onClearSelected">{{$t('Deselect')}}</a>-->
<!-- </div>-->
<!-- </a-alert>-->
<a-input-search @search="onSearch" style="width:100%;margin-top: 6px"
:placeholder="$t('enterDepartmentName')"/>
<!-- 树-->
<a-col :md="10" :sm="24">
<template>
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
<span style="user-select: none">
<a-tree
checkable
multiple
@select="onSelect"
@check="onCheck"
@rightClick="rightHandle"
:selectedKeys="selectedKeys"
:checkedKeys="checkedKeys"
:treeData="departTree"
:checkStrictly="checkStrictly"
:expandedKeys="iExpandedKeys"
:autoExpandParent="autoExpandParent"
@expand="onExpand"/>
</span>
<!--新增右键点击事件,和增加添加和删除功能-->
<a-menu slot="overlay">
<a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>
<a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>
<a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>
</a-menu>
</a-dropdown>
<!-- <a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">-->
<!-- checkable-->
<a-tree
multiple
style="height:600px;overflow: auto;width: 100%"
@select="onSelect"
@check="onCheck"
@rightClick="rightHandle"
:selectedKeys="selectedKeys"
:checkedKeys="checkedKeys"
:treeData="departTree"
:checkStrictly="checkStrictly"
:autoExpandParent="false"
:expandedKeys="iExpandedKeys"
@expand="onExpand"/>
<!--新增右键点击事件,和增加添加和删除功能-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item @click="handleAdd(3)" key="1">{{$t('addTo')}}</a-menu-item>-->
<!-- <a-menu-item @click="handleDelete" key="2">{{$t('delete')}}</a-menu-item>-->
<!-- <a-menu-item @click="closeDrop" key="3">{{$t('cancel')}}</a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
</template>
</a-col>
</div>
</a-card>
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
<div class="drawer-bootom-button">
<a-dropdown :trigger="['click']" placement="topCenter">
<a-menu slot="overlay">
<!--<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>-->
<!--<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>-->
<a-menu-item key="3" @click="checkALL">{{$t('checkAll')}}</a-menu-item>
<a-menu-item key="4" @click="cancelCheckALL">{{$t('DeselectAll')}}</a-menu-item>
<a-menu-item key="5" @click="expandAll">{{$t('ExpandAll')}}</a-menu-item>
<a-menu-item key="6" @click="closeAll">{{$t('MergeAll')}}</a-menu-item>
</a-menu>
<a-button>
{{$t('TreeOperation')}} <a-icon type="up" />
</a-button>
</a-dropdown>
</div>
<!-- <div class="drawer-bootom-button">-->
<!-- <a-dropdown :trigger="['click']" placement="topCenter">-->
<!-- <a-menu slot="overlay">-->
<!-- &lt;!&ndash;<a-menu-item key="1" @click="switchCheckStrictly(1)">父子关联</a-menu-item>&ndash;&gt;-->
<!-- &lt;!&ndash;<a-menu-item key="2" @click="switchCheckStrictly(2)">取消关联</a-menu-item>&ndash;&gt;-->
<!-- <a-menu-item key="3" @click="checkALL">{{$t('checkAll')}}</a-menu-item>-->
<!-- <a-menu-item key="4" @click="cancelCheckALL">{{$t('DeselectAll')}}</a-menu-item>-->
<!-- <a-menu-item key="5" @click="expandAll">{{$t('ExpandAll')}}</a-menu-item>-->
<!-- <a-menu-item key="6" @click="closeAll">{{$t('MergeAll')}}</a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button>-->
<!-- {{$t('TreeOperation')}} <a-icon type="up" />-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
<!-- </div>-->
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
</a-col>
<a-col :md="14" :sm="24" style="background: #fff;padding: 24px;">
<a-col :md="14" :sm="24" style="padding: 24px;">
<a-tabs defaultActiveKey="1">
<a-tab-pane :tab="$t('essentialInformation')" key="1" >
<a-tab-pane :tab="$t('essentialInformation')" key="1">
<a-card :bordered="false" v-if="selectedKeys.length>0">
<a-form :form="form">
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('OrganizationName')">
<a-input :placeholder="$t('EnterOrganizationDepartment')" v-decorator="['departName', validatorRules.departName ]"/>
<a-input :placeholder="$t('EnterOrganizationDepartment')"
:disabled="disable"
v-decorator="['departName', validatorRules.departName ]"/>
</a-form-item>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('SuperiorDepartment')">
<a-tree-select
@@ -94,21 +94,27 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('OrganizationCode')">
<a-input disabled :placeholder="$t('enterOrganizationCode')" v-decorator="['orgCode', validatorRules.orgCode ]"/>
<a-input :disabled="disable"
:placeholder="$t('enterOrganizationCode')"
v-decorator="['orgCode', validatorRules.orgCode ]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('OrganizationType')">
<template v-if="orgCategoryDisabled">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" :placeholder="$t('PleaseSelectOrganizationType')">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]"
:disabled="disable"
:placeholder="$t('PleaseSelectOrganizationType')">
<a-radio value="1">
{{$t('company')}}
</a-radio>
</a-radio-group>
</template>
<template v-else>
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]" :placeholder="$t('PleaseSelectOrganizationType')">
<a-radio-group v-decorator="['orgCategory',validatorRules.orgCategory]"
:disabled="disable"
:placeholder="$t('PleaseSelectOrganizationType')">
<a-radio value="2">
{{$t('department')}}
</a-radio>
@@ -122,31 +128,32 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('sort')">
<a-input-number v-decorator="[ 'departOrder',{'initialValue':0}]"/>
<a-input-number :disabled="disable" v-decorator="[ 'departOrder',{'initialValue':0}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('phoneNumber')">
<a-input :placeholder="$t('enterMobileNumber')" v-decorator="['mobile', {'initialValue':''}]"/>
<a-input :disabled="disable" :placeholder="$t('enterMobileNumber')" v-decorator="['mobile', {'initialValue':''}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('address')">
<a-input :placeholder="$t('enterAddress')" v-decorator="['address', {'initialValue':''}]"/>
<a-input :disabled="disable" :placeholder="$t('enterAddress')" v-decorator="['address', {'initialValue':''}]"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('remarks')">
<a-textarea :placeholder="$t('enterComments')" v-decorator="['memo', {'initialValue':''}]"/>
<a-textarea :disabled="disable" :placeholder="$t('enterComments')" v-decorator="['memo', {'initialValue':''}]"/>
</a-form-item>
</a-form>
<div class="anty-form-btn">
<a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>
<a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}</a-button>
</div>
<!-- <div class="anty-form-btn">-->
<!-- <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">{{$t('reset')}}</a-button>-->
<!-- <a-button @click="submitCurrForm" type="primary" htmlType="button" icon="form">{{$t('preservation')}}-->
<!-- </a-button>-->
<!-- </div>-->
</a-card>
<a-card v-else :bordered="false" style="height:248px !important;">
<a-empty>
@@ -154,9 +161,9 @@
</a-empty>
</a-card>
</a-tab-pane>
<!-- <a-tab-pane tab="部门权限" key="2" forceRender>-->
<!-- <depart-auth-modal ref="departAuth"/>-->
<!-- </a-tab-pane>-->
<!-- <a-tab-pane tab="部门权限" key="2" forceRender>-->
<!-- <depart-auth-modal ref="departAuth"/>-->
<!-- </a-tab-pane>-->
<a-tab-pane :tab="$t('userInformation')" key="3">
<Dept-User-Info ref="DeptUserInfo"></Dept-User-Info>
</a-tab-pane>
@@ -169,9 +176,9 @@
import DepartModal from './modules/DepartModal'
import DeptUserInfo from './modules/DeptUserInfo'
import pick from 'lodash.pick'
import {queryDepartTreeList, searchByKeywords, deleteByDepartId} from '@/api/api'
import {httpAction, deleteAction} from '@/api/manage'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import { queryDepartTreeList, searchByKeywords, deleteByDepartId } from '@/api/api'
import { httpAction, deleteAction } from '@/api/manage'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import DepartAuthModal from './modules/DepartAuthModal'
// 表头
@@ -187,7 +194,6 @@
return {
iExpandedKeys: [],
loading: false,
autoExpandParent: true,
currFlowId: '',
currFlowName: '',
disable: true,
@@ -200,7 +206,7 @@
model: {},
dropTrigger: '',
depart: {},
columns:[
columns: [
{
title: this.$t('OrganizationName'),
dataIndex: 'departName'
@@ -212,7 +218,7 @@
},
{
title: this.$t('OrganizationCode'),
dataIndex: 'orgCode',
dataIndex: 'orgCode'
},
{
title: this.$t('phoneNumber'),
@@ -235,7 +241,7 @@
title: this.$t('operation'),
align: 'center',
dataIndex: 'action',
scopedSlots: {customRender: 'action'}
scopedSlots: { customRender: 'action' }
}
],
disableSubmit: false,
@@ -244,46 +250,46 @@
autoIncr: 1,
currSelected: {},
allTreeKeys:[],
allTreeKeys: [],
checkStrictly: true,
form: this.$form.createForm(this),
labelCol: {
xs: {span: 24},
sm: {span: 5}
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: {span: 24},
sm: {span: 16}
xs: { span: 24 },
sm: { span: 16 }
},
graphDatasource: {
nodes: [],
edges: []
},
validatorRules: {
departName: {rules: [{required: true, message: this.$t('EnterOrganizationDepartment')}]},
orgCode: {rules: [{required: true, message: this.$t('enterOrganizationCode')}]},
orgCategory: {rules: [{required: true, message: this.$t('enterOrganizationType')}]},
mobile: {rules: [{validator: this.validateMobile}]}
// departName: { rules: [{ required: true, message: this.$t('EnterOrganizationDepartment') }] },
// orgCode: { rules: [{ required: true, message: this.$t('enterOrganizationCode') }] },
// orgCategory: { rules: [{ required: true, message: this.$t('enterOrganizationType') }] },
// mobile: { rules: [{ validator: this.validateMobile }] }
},
url: {
delete: '/sys/sysDepart/delete',
edit: '/sys/sysDepart/edit',
deleteBatch: '/sys/sysDepart/deleteBatch',
exportXlsUrl: "sys/sysDepart/exportXls",
importExcelUrl: "sys/sysDepart/importExcel",
exportXlsUrl: 'sys/sysDepart/exportXls',
importExcelUrl: 'sys/sysDepart/importExcel'
},
orgCategoryDisabled:false,
orgCategoryDisabled: false
}
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
importExcelUrl: function() {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
}
},
methods: {
loadData() {
this.refresh();
this.refresh()
},
loadTree() {
var that = this
@@ -292,13 +298,13 @@
queryDepartTreeList().then((res) => {
if (res.success) {
//部门全选后,再添加部门,选中数量增多
this.allTreeKeys = [];
this.allTreeKeys = []
for (let i = 0; i < res.result.length; i++) {
let temp = res.result[i]
that.treeData.push(temp)
that.departTree.push(temp)
that.setThisExpandedKeys(temp)
that.getAllKeys(temp);
that.getAllKeys(temp)
// console.log(temp.id)
}
this.loading = false
@@ -326,10 +332,7 @@
},
onExpand(expandedKeys) {
console.log('onExpand', expandedKeys)
// if not set autoExpandParent to false, if children expanded, parent can not collapse.
// or, you can remove all expanded children keys.
this.iExpandedKeys = expandedKeys
this.autoExpandParent = false
},
backFlowList() {
this.$router.back(-1)
@@ -347,8 +350,7 @@
addRootNode() {
this.$refs.nodeModal.add(this.currFlowId, '')
},
batchDel: function () {
console.log(this.checkedKeys)
batchDel: function() {
if (this.checkedKeys.length <= 0) {
this.$message.warning(this.$t('selectARecored'))
} else {
@@ -360,8 +362,8 @@
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('sureDeleteSelected') + this.checkedKeys.length + this.$t('pieceData'),
onOk: function () {
deleteAction(that.url.deleteBatch, {ids: ids}).then((res) => {
onOk: function() {
deleteAction(that.url.deleteBatch, { ids: ids }).then((res) => {
if (res.success) {
that.$message.success(res.message)
that.loadTree()
@@ -377,7 +379,7 @@
onSearch(value) {
let that = this
if (value) {
searchByKeywords({keyWord: value}).then((res) => {
searchByKeywords({ keyWord: value }).then((res) => {
if (res.success) {
that.departTree = []
for (let i = 0; i < res.result.length; i++) {
@@ -403,16 +405,12 @@
this.visible = false
},
onCheck(checkedKeys, info) {
console.log('onCheck', checkedKeys, info)
this.hiding = false
//this.checkedKeys = checkedKeys.checked
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
if(this.checkStrictly){
this.checkedKeys = checkedKeys.checked;
}else{
if (this.checkStrictly) {
this.checkedKeys = checkedKeys.checked
} else {
this.checkedKeys = checkedKeys
}
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
},
onSelect(selectedKeys, e) {
console.log('selected', selectedKeys, e)
@@ -424,21 +422,21 @@
this.selectedKeys = [record.key]
this.model.parentId = record.parentId
this.setValuesToForm(record)
this.$refs.departAuth.show(record.id);
this.$refs.departAuth.show(record.id)
// 传用户信息参数
this.$refs.DeptUserInfo.open(record)
},
// 触发onSelect事件时,为部门树右侧的form表单赋值
setValuesToForm(record) {
if(record.orgCategory == '1'){
this.orgCategoryDisabled = true;
}else{
this.orgCategoryDisabled = false;
if (record.orgCategory == '1') {
this.orgCategoryDisabled = true
} else {
this.orgCategoryDisabled = false
}
this.$nextTick(() => {
this.form.getFieldDecorator('fax', {initialValue: ''})
this.form.setFieldsValue(pick(record, 'departName','orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
this.form.getFieldDecorator('fax', { initialValue: '' })
this.form.setFieldsValue(pick(record, 'departName', 'orgCategory', 'orgCode', 'departOrder', 'mobile', 'fax', 'address', 'memo'))
})
},
getCurrSelectedTitle() {
@@ -517,16 +515,16 @@
this.$confirm({
title: this.$t('confirmDeletion'),
content: this.$t('deleteDepartmentData'),
onOk: function () {
deleteByDepartId({id: that.rightClickSelectedKey}).then((resp) => {
onOk: function() {
deleteByDepartId({ id: that.rightClickSelectedKey }).then((resp) => {
if (resp.success) {
//删除成功后,去除已选中中的数据
that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1);
that.checkedKeys.splice(that.checkedKeys.findIndex(key => key === that.rightClickSelectedKey), 1)
that.$message.success(this.$t('DeleteSucceeded'))
that.loadTree()
//删除后同步清空右侧基本信息内容
let orgCode=that.form.getFieldValue("orgCode");
if(orgCode && orgCode === that.rightClickSelectedOrgCode){
let orgCode = that.form.getFieldValue('orgCode')
if (orgCode && orgCode === that.rightClickSelectedOrgCode) {
that.onClearSelected()
}
} else {
@@ -538,7 +536,7 @@
},
selectDirectiveOk(record) {
// console.log('选中指令数据', record)
this.nodeSettingForm.setFieldsValue({directiveCode: record.directiveCode})
this.nodeSettingForm.setFieldsValue({ directiveCode: record.directiveCode })
this.currSelected.sysCode = record.sysCode
},
getFlowGraphData(node) {
@@ -557,28 +555,21 @@
}
}
},
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
expandAll () {
// <!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
expandAll() {
this.iExpandedKeys = this.allTreeKeys
},
closeAll () {
closeAll() {
this.iExpandedKeys = []
},
checkALL () {
checkALL() {
this.checkStriccheckStrictlytly = false
this.checkedKeys = this.allTreeKeys
},
cancelCheckALL () {
cancelCheckALL() {
//this.checkedKeys = this.defaultCheckedKeys
this.checkedKeys = []
},
// switchCheckStrictly (v) {
// if(v==1){
// this.checkStrictly = false
// }else if(v==2){
// this.checkStrictly = true
// }
// },
getAllKeys(node) {
// console.log('node',node);
this.allTreeKeys.push(node.key)
@@ -595,7 +586,7 @@
this.currFlowId = this.$route.params.id
this.currFlowName = this.$route.params.name
// this.loadTree()
},
}
}
</script>
@@ -659,4 +650,7 @@
background: #fff;
border-radius: 0 0 2px 2px;
}
.box-ant{
margin-right: 0!important;
}
</style>
@@ -10,15 +10,10 @@
<a-input :placeholder="$t('enterAccountNumber')" v-model="queryParam.username"></a-input>
</a-form-item>
</a-col>
<!--<a-col :md="8" :sm="8">-->
<!--<a-form-item label="用户名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">-->
<!--<a-input placeholder="请输入名称查询" v-model="queryParam.realname"></a-input>-->
<!--</a-form-item>-->
<!--</a-col>-->
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<span style="float: left;overflow: hidden;margin-top: 1px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery" icon="search" style="margin-left: 18px">{{$t('query')}}</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">{{$t('reset')}}</a-button>
<a-button class="box-button" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="searchReset">{{$t('reset')}}</a-button>
</a-col>
</span>
</a-row>
@@ -27,72 +22,66 @@
<!-- 操作按钮区域 -->
<div class="table-operator" :md="24" :sm="24" style="margin-top: -15px">
<!--<a-button @click="handleEdit" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>
<a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>
<!-- <a-button @click="handleAddUserDepart" type="primary" icon="plus">{{$t('AddExistingUsers')}}</a-button>-->
<!-- <a-button @click="handleAdd" type="primary" icon="plus" style="margin-top: 16px">{{$t('newUser')}}</a-button>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/>
{{$t('disassociate')}}
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> {{$t('batchOperation')}}
<a-icon type="down"/>
</a-button>
</a-dropdown>
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item key="1" @click="batchDel">-->
<!-- <a-icon type="delete"/>-->
<!-- {{$t('disassociate')}}-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- <a-button style="margin-left: 8px"> {{$t('batchOperation')}}-->
<!-- <a-icon type="down"/>-->
<!-- </a-button>-->
<!-- </a-dropdown>-->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{
selectedRowKeys.length }}</a> {{$t('term')}}
<a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>
</div>
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> {{$t('selected')}} <a style="font-weight: 600">{{-->
<!-- selectedRowKeys.length }}</a> {{$t('term')}}-->
<!-- <a style="margin-left: 24px" @click="onClearSelected">{{$t('empty')}}</a>-->
<!-- </div>-->
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<!-- rowKey="id" bordered-->
<a-table
ref="table"
size="middle"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
<!-- <span slot="action" slot-scope="text, record">-->
<!-- <a @click="handleEdit(record)">{{$t('edit')}}</a>-->
<!-- <a-divider type="vertical"/>-->
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">{{$t('edit')}}</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">
{{$t('more')}} <a-icon type="down"/>
</a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">
<a>{{$t('disassociate')}}</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
<!-- <a-dropdown>-->
<!-- <a class="ant-dropdown-link">-->
<!-- {{$t('more')}} <a-icon type="down"/>-->
<!-- </a>-->
<!-- <a-menu slot="overlay">-->
<!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDeptRole(record)">{{$t('AssignDepartmentRoles')}}</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a href="javascript:;" @click="handleDetail(record)">{{$t('userDetail')}}</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a-popconfirm :title="$t('AreYouCancelAssociation')" @confirm="() => handleDelete(record.id)">-->
<!-- <a>{{$t('disassociate')}}</a>-->
<!-- </a-popconfirm>-->
<!-- </a-menu-item>-->
<!-- </a-menu>-->
<!-- </a-dropdown>-->
<!-- </span>-->
</a-table>
</div>
<!-- table区域-end -->