|
@@ -6,7 +6,7 @@
|
|
<topInfo :topTitle="pageTitle"></topInfo>
|
|
<topInfo :topTitle="pageTitle"></topInfo>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="add" style="text-align:right">
|
|
<el-col :span="24" class="add" style="text-align:right">
|
|
- <el-button size="mini" type="primary" @click="$router.push({ path: './detail' })" icon="el-icon-plus">添加权限</el-button>
|
|
|
|
|
|
+ <el-button size="mini" type="primary" @click="$router.push({ path: './detail' })" icon="el-icon-plus">添加菜单</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="info">
|
|
<el-col :span="24" class="info">
|
|
@@ -19,7 +19,6 @@
|
|
import topInfo from '@/layout/public/top.vue';
|
|
import topInfo from '@/layout/public/top.vue';
|
|
import dataTable from '@/components/data-table.vue';
|
|
import dataTable from '@/components/data-table.vue';
|
|
import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
|
|
-
|
|
|
|
const { mapActions: role } = createNamespacedHelpers('role');
|
|
const { mapActions: role } = createNamespacedHelpers('role');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -43,8 +42,8 @@ export default {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
fields: [
|
|
fields: [
|
|
- { label: '权限名称', prop: 'role_name' },
|
|
|
|
- { label: '权限code', prop: 'code' },
|
|
|
|
|
|
+ { label: '菜单名称', prop: 'role_name' },
|
|
|
|
+ // { label: '权限code', prop: 'code' },
|
|
{ label: 'url', prop: 'url' },
|
|
{ label: 'url', prop: 'url' },
|
|
],
|
|
],
|
|
list: [],
|
|
list: [],
|
|
@@ -55,19 +54,14 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...role(['query', 'delete', 'update', 'fetch']),
|
|
...role(['query', 'delete', 'update', 'fetch']),
|
|
-
|
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
- let res = await this.query();
|
|
|
|
- console.log(res.data);
|
|
|
|
|
|
+ let res = await this.query({ skip, limit, ...info });
|
|
this.$set(this, `list`, res.data);
|
|
this.$set(this, `list`, res.data);
|
|
this.$set(this, `total`, res.total);
|
|
this.$set(this, `total`, res.total);
|
|
},
|
|
},
|
|
toEdit({ data }) {
|
|
toEdit({ data }) {
|
|
- console.log('1');
|
|
|
|
-
|
|
|
|
- this.$router.push({ path: './detail', query: { id: data.id } });
|
|
|
|
|
|
+ this.$router.push({ path: '/role/detail', query: { id: data.id } });
|
|
},
|
|
},
|
|
-
|
|
|
|
async toDelete({ data }) {
|
|
async toDelete({ data }) {
|
|
const res = await this.delete(data.id);
|
|
const res = await this.delete(data.id);
|
|
this.$checkRes(res, '删除成功', '删除失败');
|
|
this.$checkRes(res, '删除成功', '删除失败');
|