权限
This commit is contained in:
parent
7ae1b7da4b
commit
7122d4ebdd
@ -13,7 +13,7 @@
|
||||
@selection-change="onSelectionChange"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:adSort:add']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<PlusOutlined />
|
||||
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
添加广告位
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:adSort:batchDelete']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<Delete />
|
||||
@ -78,21 +78,13 @@ const selectionData = ref([])
|
||||
label: '编辑',
|
||||
type: 'warning',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// auth: ['sys:user:list'],
|
||||
auth: ['sys:adSort:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:adSort:delete'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -16,7 +16,7 @@
|
||||
<a class="down-a" target="_blank" :href="scope.row.cover">{{scope.row.title}}</a>
|
||||
</template>
|
||||
<template #tableTitle>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:article:add']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<PlusOutlined />
|
||||
@ -24,7 +24,7 @@
|
||||
</template>
|
||||
添加文章
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:article:batchDelete']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<Delete />
|
||||
@ -80,21 +80,14 @@ const selectionData = ref([])
|
||||
label: '编辑',
|
||||
type: 'warning',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:article:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:article:delete'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="menu-index">
|
||||
<el-card :bordered="false" class="pt-3 mb-3 proCard">
|
||||
<div>
|
||||
<el-button type="primary" @click="handleAdd()">
|
||||
<el-button type="primary" @click="handleAdd()" v-perm="['sys:category:add']">
|
||||
<template #icon>
|
||||
<el-icon>
|
||||
<plus />
|
||||
@ -23,14 +23,13 @@
|
||||
<el-table-column align="center" label="创建时间" prop="createTime" min-width="180"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="160" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" link
|
||||
@click="handleAdd(row.id)">
|
||||
<el-button type="primary" link @click="handleAdd(row.id)" v-perm="['sys:category:add']">
|
||||
新增
|
||||
</el-button>
|
||||
<el-button type="primary" link @click="handleEdit(row)">
|
||||
<el-button type="primary" link @click="handleEdit(row)" v-perm="['sys:category:update']">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button type="danger" link @click="handleDelete(row.id)">
|
||||
<el-button type="danger" link @click="handleDelete(row.id)" v-perm="['sys:category:delete']">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -13,7 +13,7 @@
|
||||
@selection-change="onSelectionChange"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:layout:add']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<PlusOutlined />
|
||||
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
添加页面布局
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:layout:batchDelete']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<Delete />
|
||||
@ -76,21 +76,13 @@ const selectionData = ref([])
|
||||
label: '编辑',
|
||||
type: 'warning',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// auth: ['sys:user:list'],
|
||||
auth: ['sys:layout:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:layout:delete'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -13,7 +13,7 @@
|
||||
@selection-change="onSelectionChange"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:layoutItem:add']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<PlusOutlined />
|
||||
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
添加页面推荐
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:layoutItem:batchDelete']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<Delete />
|
||||
@ -78,21 +78,13 @@ const selectionData = ref([])
|
||||
label: '编辑',
|
||||
type: 'warning',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// auth: ['sys:user:list'],
|
||||
auth: ['sys:layoutItem:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:layoutItem:delete'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -13,7 +13,7 @@
|
||||
@selection-change="onSelectionChange"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:link:add']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<PlusOutlined />
|
||||
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
添加友情链接
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:link:batchDelete']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<Delete />
|
||||
@ -76,21 +76,13 @@ const selectionData = ref([])
|
||||
label: '编辑',
|
||||
type: 'warning',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// auth: ['sys:user:list'],
|
||||
auth: ['sys:link:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:link:delete'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -13,7 +13,7 @@
|
||||
@selection-change="onSelectionChange"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<el-button type="primary" @click="handleAdd">
|
||||
<el-button type="primary" @click="handleAdd" v-perm="['sys:tag:add']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<PlusOutlined />
|
||||
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
添加标签
|
||||
</el-button>
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length">
|
||||
<el-button type="danger" @click="handleDelete()" :disabled="!selectionData.length" v-perm="['sys:tag:batchDelete']">
|
||||
<template #icon>
|
||||
<el-icon class="el-input__icon">
|
||||
<Delete />
|
||||
@ -76,21 +76,13 @@ const selectionData = ref([])
|
||||
label: '编辑',
|
||||
type: 'warning',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// auth: ['sys:user:list'],
|
||||
auth: ['sys:tag:update'],
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
type: 'danger',
|
||||
onClick: handleDelete.bind(null, record),
|
||||
// 根据业务控制是否显示 isShow 和 auth 是并且关系
|
||||
ifShow: () => {
|
||||
return true;
|
||||
},
|
||||
// 根据权限控制是否显示: 有权限,会显示,支持多个
|
||||
// auth: ['basic_list'],
|
||||
auth: ['sys:tag:delete'],
|
||||
},
|
||||
],
|
||||
});
|
||||
|
@ -66,7 +66,6 @@ import type { FormInstance } from "element-plus";
|
||||
import { cityAdd, cityUpdate, getCityList, getCityDetail } from '@/api/data/city';
|
||||
import { onMounted, reactive, ref, shallowRef,nextTick } from "vue";
|
||||
import { getCityByList } from "@/api/system/user";
|
||||
import { getModulesKey } from "@/router";
|
||||
import { message } from "@/utils/auth";
|
||||
import { useLockFn } from "@/utils/useLockFn";
|
||||
const props = defineProps({
|
||||
|
@ -16,7 +16,7 @@
|
||||
<el-table-column show-overflow-tooltip align="center" label="浏览器" prop="browser"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip align="center" label="操作系统" prop="os"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip align="center" label="登录时间" prop="loginTime"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100" fixed="right">
|
||||
<el-table-column align="center" label="操作" width="100" fixed="right" v-perm="['sys:online:logout']">
|
||||
<template #default="{ row, $index }">
|
||||
<el-button @click="handleDelete(row)" type="danger">强退</el-button>
|
||||
</template>
|
||||
|
@ -91,7 +91,6 @@
|
||||
v-if="formData.type == 0 && (formData.target ==0 || formData.target ==1)"
|
||||
label="组件路径"
|
||||
prop="component"
|
||||
:rules="{ required: true, message: '请输入组件路径', trigger: 'blur' }"
|
||||
>
|
||||
<div class="flex-1">
|
||||
<el-autocomplete
|
||||
|
@ -12,7 +12,7 @@
|
||||
:columns="columns"
|
||||
:request="loadDataTable"
|
||||
:row-key="(row) => row.id"
|
||||
ref="basicTableRef"
|
||||
ref="tableRef"
|
||||
:actionColumn="actionColumn"
|
||||
@selection-change="onSelectionChange"
|
||||
scroll-x="1200"
|
||||
@ -91,6 +91,7 @@
|
||||
import { useUserStore } from '@/store/modules/user';
|
||||
import {downloadByData} from '@/utils/file/download';
|
||||
const userId = ref(0);
|
||||
const tableRef = ref();
|
||||
const basicTableRef = ref();
|
||||
const editVisible = ref(false)
|
||||
const selectionData = ref([])
|
||||
|
Loading…
Reference in New Issue
Block a user