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