3
0
Fork 0

feat(router): 找回权限新增路由配置

This commit is contained in:
woody 2025-06-18 13:32:46 +08:00
parent 213a3e7235
commit 9e21e76d16
5 changed files with 30 additions and 24 deletions

View File

@ -3256,7 +3256,13 @@ export const constantRoutes = [
meta: { title: '前台权限配置' }, meta: { title: '前台权限配置' },
hidden: true hidden: true
}, },
{
path: 'AddMenuRole',
name: 'addMenuRole',
component: () => import('@/views/system/addMenuRole/index'),
meta: { title: i18n.t('新增权限') },
hidden: true
},
{ {
path: 'fieldRole', path: 'fieldRole',
name: 'FieldRole', name: 'FieldRole',

View File

@ -546,7 +546,7 @@ export default {
}, },
cancel() { cancel() {
this.$router.push({ this.$router.push({
name: 'superStudioGift' name: 'addMenuRole'
}) })
}, },
addNewGoods() { addNewGoods() {

View File

@ -207,11 +207,11 @@ export default {
roleAllList: [], roleAllList: [],
menuAllList: [] menuAllList: []
}, },
moren: 'superStudioGift', moren: 'addMenuRole',
topList: [ topList: [
{ {
name: '后台菜单权限', name: '后台菜单权限',
path: 'superStudioGift' path: 'addMenuRole'
} }
] ]
} }

View File

@ -2,7 +2,7 @@
<template> <template>
<div class="page"> <div class="page">
<div class="contain"> <div class="contain">
<topBar v-if="topList.length > 0" :top-list="topList" :moren="moren"/> <topBar v-if="topList.length > 0" :top-list="topList" :moren="moren" />
<div class="thetopbox"> <div class="thetopbox">
<el-form ref="form" :model="queryParams" label-width="80px"> <el-form ref="form" :model="queryParams" label-width="80px">
<el-row> <el-row>
@ -20,7 +20,7 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="'管理名称'"> <el-form-item :label="'管理名称'">
<el-input v-model="queryParams.nickName" clearable/> <el-input v-model="queryParams.nickName" clearable />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" style="margin-left: 0px"> <el-col :span="4" style="margin-left: 0px">
@ -93,7 +93,7 @@
:span-method="objectSpanMethod" :span-method="objectSpanMethod"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="55"/> <el-table-column type="selection" width="55" />
<el-table-column <el-table-column
align="center" align="center"
prop="roleIdVal" prop="roleIdVal"
@ -127,12 +127,12 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-show="user.userName == 'admin'"
type="text" type="text"
size="small" size="small"
class="button-s" class="button-s"
style="color: #c73030" style="color: #c73030"
@click="toLogin(scope.row)" @click="toLogin(scope.row)"
v-show="user.userName == 'admin'"
>登录 >登录
</el-button> </el-button>
@ -184,12 +184,12 @@
<script> <script>
import topBar from '@/components/topBarRole' import topBar from '@/components/topBarRole'
import * as api from '@/api/notice' import * as api from '@/api/notice'
import {Message} from 'element-ui' import { Message } from 'element-ui'
import {getRouters} from '@/api/settle' import { getRouters } from '@/api/settle'
import {freeLogin} from "@/api/manage"; import { freeLogin } from '@/api/manage'
import {setToken} from "@/utils/auth"; import { setToken } from '@/utils/auth'
import {login} from "@/api/user"; import { login } from '@/api/user'
import {mapGetters} from "vuex"; import { mapGetters } from 'vuex'
export default { export default {
name: 'Qxpz', name: 'Qxpz',
@ -202,12 +202,12 @@ export default {
forms: '', forms: '',
rules: { rules: {
nickName: [ nickName: [
{required: true, message: '请输入管理姓名', trigger: 'blur'} { required: true, message: '请输入管理姓名', trigger: 'blur' }
], ]
}, },
table: { table: {
nickName: '', nickName: '',
status: '', status: ''
}, },
moren: 'limitsList', moren: 'limitsList',
topList: [ topList: [
@ -248,7 +248,7 @@ export default {
this.getUserRoute() this.getUserRoute()
}, },
computed: { computed: {
...mapGetters(["user"]), ...mapGetters(['user'])
}, },
methods: { methods: {
getUserRoute() { getUserRoute() {
@ -282,17 +282,17 @@ export default {
}, },
addRules() { addRules() {
this.$router.push({ this.$router.push({
path: '/system/limits/superStudioGift' path: '/system/limits/addMenuRole'
}) })
}, },
updateShow(item) { updateShow(item) {
this.$router.push({ this.$router.push({
path: '/system/limits/superStudioGift?id=' + item.userId path: '/system/limits/addMenuRole?id=' + item.userId
}) })
}, },
updateShows(item) { updateShows(item) {
this.$router.push({ this.$router.push({
path: '/system/limits/superStudioGift?id=' + item.userId + '&check=1' path: '/system/limits/addMenuRole?id=' + item.userId + '&check=1'
}) })
}, },
delRole(item) { delRole(item) {
@ -375,7 +375,7 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val this.multipleSelection = val
}, },
objectSpanMethod({row, column, rowIndex, columnIndex}) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
// if (columnIndex === 0) { // if (columnIndex === 0) {
// if (rowIndex % 2 === 0) { // if (rowIndex % 2 === 0) {
// return { // return {
@ -390,7 +390,7 @@ export default {
// } // }
// } // }
}, },
tableRowClassName({row, rowIndex}) { tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 === 1) { if (rowIndex % 2 === 1) {
return 'warning-row' return 'warning-row'
} else if (rowIndex % 2 === 0) { } else if (rowIndex % 2 === 0) {

View File

@ -268,7 +268,7 @@ export default {
methods: { methods: {
checkShow(item) { checkShow(item) {
this.$router.push({ this.$router.push({
path: '/system/limits/superStudioGift?id=' + item.roleId path: '/system/limits/addMenuRole?id=' + item.roleId
}) })
}, },
checkShow1(item) { checkShow1(item) {