[update] 修改bug87734
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
|
||||
<!-- 按钮操作区域 -->
|
||||
<a-row style="margin-left: 14px">
|
||||
<a-button v-if="isDev" icon="plus" @click="handleAdd(1)" type="primary">{{ $t('depart.addDepartment') }}</a-button>
|
||||
<a-button v-if="isDev" icon="plus" @click="handleAdd(2)" type="primary">{{ $t('depart.addSubordinate') }}</a-button>
|
||||
<a-button type="primary" ghost icon="upload" @click="handleExportXls($t('depart.departmentInformation'), '.xls')">{{ $t('export') }}</a-button>
|
||||
<a-button v-if="isDev" icon="plus" @click="handleAdd(1)" v-has="'sys:depart:add'" type="primary">{{ $t('depart.addDepartment') }}</a-button>
|
||||
<a-button v-if="isDev" icon="plus" @click="handleAdd(2)" v-has="'sys:depart:add'" type="primary">{{ $t('depart.addSubordinate') }}</a-button>
|
||||
<a-button type="primary" ghost icon="upload" v-has="'sys:depart:export'" @click="handleExportXls($t('depart.departmentInformation'), '.xls')">{{ $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 v-if="isDev" :title="$t('depart.deleteMultiplePiecesData')" @click="batchDel" type="default">{{ $t('batchDelete') }}</a-button>
|
||||
<a-button v-if="isDev" :title="$t('depart.deleteMultiplePiecesData')" v-has="'sys:depart:del'" @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">
|
||||
@@ -37,8 +37,8 @@
|
||||
</span>
|
||||
<!--新增右键点击事件,和增加添加和删除功能-->
|
||||
<a-menu slot="overlay" v-if="isDev">
|
||||
<a-menu-item @click="handleAdd(3)" key="1">{{ $t('add') }}</a-menu-item>
|
||||
<a-menu-item @click="handleDelete" key="2">{{ $t('delete') }}</a-menu-item>
|
||||
<a-menu-item @click="handleAdd(3)" v-has="'sys:depart:add'" key="1">{{ $t('add') }}</a-menu-item>
|
||||
<a-menu-item @click="handleDelete" v-has="'sys:depart:del'" key="2">{{ $t('delete') }}</a-menu-item>
|
||||
<a-menu-item @click="closeDrop" key="3">{{ $t('cancel') }}</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('roleManage.newRole') }}</a-button>
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'sys:role:add'">{{ $t('roleManage.newRole') }}</a-button>
|
||||
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
|
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||
<!-- <a-button type="primary" icon="import">导入</a-button>-->
|
||||
@@ -58,30 +58,9 @@
|
||||
:loading="loading"
|
||||
:scroll="{x: 500, y: yScrollHeight}"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys1, onChange: onSelectChange1, type:'radio'}"
|
||||
:operationList="operationList"
|
||||
@operationClick="operationClick"
|
||||
@change="handleTableChange">
|
||||
<span slot="action" slot-scope="{text, record}">
|
||||
<a @click="handleOpen(record)">{{ $t('roleManage.userBtn') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">
|
||||
<a-icon type="more" class="operate-icon-btn operate-icon-more" />
|
||||
</a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item>
|
||||
<a class="operate-btn" @click="handlePerssion(record.id)">{{ $t('roleManage.toGrantAuthorization') }}</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a class="operate-btn" @click="handleEdit(record)">{{ $t('edit') }}</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete1(record.id)">
|
||||
<a class="operate-del-btn">{{ $t('delete') }}</a>
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
</j-table>
|
||||
</div>
|
||||
<!-- 右侧的角色权限配置 -->
|
||||
@@ -292,7 +271,33 @@ export default {
|
||||
deleteBatch2: '/sys/user/deleteUserRoleBatch',
|
||||
exportXlsUrl: 'sys/role/exportXls',
|
||||
importExcelUrl: 'sys/role/importExcel'
|
||||
}
|
||||
},
|
||||
operationList: [
|
||||
// 用户
|
||||
{
|
||||
text: this.$t('roleManage.userBtn'),
|
||||
clickEvent: 'handleOpen',
|
||||
has: ''
|
||||
},
|
||||
// 授权
|
||||
{
|
||||
text: this.$t('roleManage.toGrantAuthorization'),
|
||||
clickEvent: 'handlePerssion',
|
||||
has: ''
|
||||
},
|
||||
// 编辑
|
||||
{
|
||||
text: this.$t('edit'),
|
||||
clickEvent: 'handleEdit',
|
||||
has: 'sys:role:edit'
|
||||
},
|
||||
// 删除
|
||||
{
|
||||
text: this.$t('delete'),
|
||||
clickEvent: 'handleDelete1',
|
||||
has: 'sys:role:del'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -307,6 +312,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
operationClick (operation, record) {
|
||||
if (operation.clickEvent === 'handleDelete1') {
|
||||
this.handleDelete1(record.id)
|
||||
} else if (operation.clickEvent === 'handlePerssion') {
|
||||
this.handlePerssion(record.id)
|
||||
} else {
|
||||
this[operation.clickEvent](record)
|
||||
}
|
||||
},
|
||||
onSelectChange2 (selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys2 = selectedRowKeys
|
||||
this.selectionRows2 = selectionRows
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">{{ $t('user.addUser') }}</a-button>
|
||||
<a-button type="primary" ghost icon="upload" @click="handleExportXls($t('user.userInformation'), '.xls')">{{ $t('export') }}</a-button>
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'user:add'">{{ $t('user.addUser') }}</a-button>
|
||||
<a-button type="primary" ghost icon="upload" v-has="'sys:user:export'" @click="handleExportXls($t('user.userInformation'), '.xls')">{{ $t('export') }}</a-button>
|
||||
<!--<a-button v-if="isDev" type="primary" ghost icon="hdd" @click="recycleBinVisible=true">{{ $t('recycleBin') }}</a-button>-->
|
||||
<!--<a-button v-if="isDev" type="primary" ghost icon="hdd" @click="roleAssignment">{{ $t('user.roleAllocation') }}</a-button>-->
|
||||
<!--<a-dropdown v-if="isDev && selectedRowKeys.length > 0">-->
|
||||
@@ -308,10 +308,7 @@ export default {
|
||||
{
|
||||
text: this.$t('details'),
|
||||
clickEvent: 'handleDetail',
|
||||
has: '',
|
||||
show: (record) => {
|
||||
return this.isDev
|
||||
}
|
||||
has: ''
|
||||
},
|
||||
// 密码
|
||||
{
|
||||
@@ -350,10 +347,7 @@ export default {
|
||||
{
|
||||
text: this.$t('user.uploadHandStamp'),
|
||||
clickEvent: 'handleUploadHandStamp',
|
||||
has: 'user:uploadHandStamp',
|
||||
show: (record) => {
|
||||
return false
|
||||
}
|
||||
has: 'user:uploadHandStamp'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user