mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 06:20:50 +00:00
improve: 权限管理优化
This commit is contained in:
parent
93e6872739
commit
53fefd601f
@ -39,36 +39,6 @@
|
||||
<Cascader :data="menuList" change-on-select v-model="formValidate.path" filterable></Cascader>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<!-- <Col v-bind="grid" v-if="!authType">
|
||||
<FormItem label="请求方式:" prop="methods">
|
||||
<Select v-model="formValidate.methods">
|
||||
<Option value="">请求</Option>
|
||||
<Option value="GET">GET</Option>
|
||||
<Option value="POST">POST</Option>
|
||||
<Option value="PUT">PUT</Option>
|
||||
<Option value="DELETE">DELETE</Option>
|
||||
</Select>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
<!-- <Col v-bind="grid" v-if="!authType">
|
||||
<FormItem label="接口地址:">
|
||||
<Input v-model="formValidate.api_url" placeholder="请输入接口地址" prop="api_url"></Input>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
<Col v-bind="grid" v-show="authType">
|
||||
<FormItem label="路由地址:" prop="menu_path">
|
||||
<Input v-model="formValidate.menu_path" placeholder="请输入路由地址" @on-change="changeUnique">
|
||||
<template #prepend>
|
||||
<span>{{ $routeProStr }}</span>
|
||||
</template>
|
||||
</Input>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col v-bind="grid">
|
||||
<FormItem label="权限标识:" prop="unique_auth">
|
||||
<Input v-model="formValidate.unique_auth" placeholder="请输入权限标识"></Input>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col v-bind="grid" v-if="authType">
|
||||
<FormItem label="图标:">
|
||||
<Input
|
||||
@ -85,8 +55,8 @@
|
||||
<Input type="number" v-model="formValidate.sort" placeholder="请输入排序" number></Input>
|
||||
</FormItem>
|
||||
</Col>
|
||||
<!-- <Col v-bind="grid" v-show="authType">
|
||||
<FormItem label="隐藏菜单:">
|
||||
<Col v-bind="grid">
|
||||
<FormItem label="是否显示:">
|
||||
<RadioGroup v-model="formValidate.is_show_path">
|
||||
<Radio :label="item.value" v-for="(item, i) in isShowPathRadio" :key="i">
|
||||
<Icon type="social-apple"></Icon>
|
||||
@ -94,16 +64,6 @@
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Col> -->
|
||||
<Col v-bind="grid">
|
||||
<FormItem label="状态:">
|
||||
<RadioGroup v-model="formValidate.is_show">
|
||||
<Radio :label="item.value" v-for="(item, i) in isShowRadio" :key="i">
|
||||
<Icon type="social-apple"></Icon>
|
||||
<span>{{ item.label }}</span>
|
||||
</Radio>
|
||||
</RadioGroup>
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
|
||||
@ -42,14 +42,14 @@
|
||||
row-id="id"
|
||||
>
|
||||
<vxe-table-column field="menu_name" tree-node title="按钮名称" min-width="100"></vxe-table-column>
|
||||
<vxe-table-column field="unique_auth" title="前端权限" min-width="200"></vxe-table-column>
|
||||
<vxe-table-column field="menu_path" title="路由" min-width="240" tooltip="true">
|
||||
<vxe-table-column field="menu_path" title="路径" min-width="240" tooltip="true">
|
||||
<template v-slot="{ row }">
|
||||
<span v-if="row.auth_type == 1">页面:{{ row.menu_path }}</span>
|
||||
<span v-if="row.auth_type == 2">按钮:[{{ row.methods }}]{{ row.api_url }}</span>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
<vxe-table-column field="flag" title="是否显示" min-width="120">
|
||||
<vxe-table-column field="sort" title="排序" width="150"></vxe-table-column>
|
||||
<vxe-table-column field="flag" title="是否显示" width="150">
|
||||
<template v-slot="{ row }">
|
||||
<i-switch
|
||||
v-model="row.is_show_path"
|
||||
@ -64,6 +64,11 @@
|
||||
</i-switch>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
<vxe-table-column field="date" title="操作" align="center" width="150" fixed="right">
|
||||
<template v-slot="{ row }">
|
||||
<a @click="edit(row, '编辑')">编辑</a>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
</vxe-table>
|
||||
</Card>
|
||||
<menus-from
|
||||
@ -171,6 +176,7 @@ export default {
|
||||
roleData: {
|
||||
is_show: 1,
|
||||
keyword: '',
|
||||
auth_type: 1,
|
||||
},
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
@ -423,7 +429,6 @@ export default {
|
||||
// 列表
|
||||
getData() {
|
||||
this.loading = true;
|
||||
this.roleData.is_show = this.roleData.is_show || '';
|
||||
getTable(this.roleData)
|
||||
.then(async (res) => {
|
||||
this.tableData = res.data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user