update 角色管理-用户去掉编辑

This commit is contained in:
赵霄
2023-12-12 15:12:52 +08:00
parent 7f9791c67c
commit 37be1397b8
+65 -73
View File
@@ -32,10 +32,10 @@
<div class="table-operator" style="margin: 5px 0 10px 2px">
<a-button @click="handleAdd" type="primary" icon="plus">{{ $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>-->
<!-- </a-upload>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>-->
<!-- <a-button type="primary" icon="download" @click="handleExportXls('角色管理')">导出</a-button>-->
</div>
<div style="margin-top: 15px">
@@ -55,7 +55,7 @@
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handleOpen(record)">{{ $t('roleManage.userBtn') }}</a>
<a-divider type="vertical"/>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
@@ -109,17 +109,20 @@
<div class="table-operator">
<!--<a-button @click="handleAdd2" type="primary" icon="plus" style="margin-top: 16px">{{ $t('roleManage.newUser') }}</a-button>-->
<!--<a-button @click="handleEdit2" type="primary" icon="edit" style="margin-top: 16px">用户编辑</a-button>-->
<a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">{{ $t('roleManage.existingUsers') }}</a-button>
<a-button @click="handleAddUserRole" type="primary" icon="plus" style="margin-top: 16px">{{
$t('roleManage.existingUsers')
}}
</a-button>
<a-dropdown v-if="selectedRowKeys2.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel2">
<a-icon type="delete"/>
<a-icon type="delete" />
{{ $t('delete') }}
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> {{ $t('batchOperation') }}
<a-icon type="down"/>
<a-icon type="down" />
</a-button>
</a-dropdown>
</div>
@@ -139,22 +142,11 @@
:scroll="{x: '100%', y: yScrollHeight}"
:rowSelection="{selectedRowKeys: selectedRowKeys2, onChange: onSelectChange2}"
@change="handleTableChange2">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit2(record)">{{ $t('edit') }}</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-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete2(record.id)">
<a>{{ $t('delete') }}</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
<template slot="action" slot-scope="text, record">
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete2(record.id)">
<a>{{ $t('delete') }}</a>
</a-popconfirm>
</template>
</a-table>
</div>
<!-- 表单区域 -->
@@ -236,59 +228,59 @@ export default {
test: {},
rightcolval: 0,
columns:
[
{
title: this.$t('roleManage.roleCode'),
align: 'center',
dataIndex: 'roleCode'
},
{
title: this.$t('roleManage.roleName'),
align: 'center',
dataIndex: 'roleName'
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
sorter: true,
customRender: (text) => {
return moment(text).format('YYYY-MM-DD')
}
},
{
title: this.$t('operation'),
dataIndex: 'action',
align: 'center',
scopedSlots: { customRender: 'action' }
[
{
title: this.$t('roleManage.roleCode'),
align: 'center',
dataIndex: 'roleCode'
},
{
title: this.$t('roleManage.roleName'),
align: 'center',
dataIndex: 'roleName'
},
{
title: this.$t('createTime'),
dataIndex: 'createTime',
align: 'center',
sorter: true,
customRender: (text) => {
return moment(text).format('YYYY-MM-DD')
}
],
},
{
title: this.$t('operation'),
dataIndex: 'action',
align: 'center',
scopedSlots: { customRender: 'action' }
}
],
columns2: [{
title: this.$t('user.userAccount'),
align: 'center',
dataIndex: 'username',
width: 120
},
{
title: this.$t('user.userName'),
align: 'center',
width: 100,
dataIndex: 'realname'
},
{
title: this.$t('status'),
align: 'center',
width: 80,
dataIndex: 'status_dictText'
},
{
title: this.$t('user.userName'),
align: 'center',
width: 100,
dataIndex: 'realname'
},
{
title: this.$t('status'),
align: 'center',
width: 80,
dataIndex: 'status_dictText'
},
{
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 120
}],
{
title: this.$t('operation'),
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
align: 'center',
width: 120
}],
// 高级查询参数
superQueryParams2: '',
@@ -524,10 +516,10 @@ export default {
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
/** Button按钮间距 */
.ant-btn {
margin-left: 8px
}
/** Button按钮间距 */
.ant-btn {
margin-left: 8px
}
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
min-width: 60px;