This commit is contained in:
陈红丽 2024-07-29 15:32:54 +08:00
parent 7ae1b7da4b
commit 7122d4ebdd
11 changed files with 31 additions and 80 deletions

View File

@ -13,7 +13,7 @@
@selection-change="onSelectionChange" @selection-change="onSelectionChange"
> >
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleAdd"> <el-button type="primary" @click="handleAdd" v-perm="['sys:adSort:add']">
<template #icon> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<PlusOutlined /> <PlusOutlined />
@ -21,7 +21,7 @@
</template> </template>
添加广告位 添加广告位
</el-button> </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> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<Delete /> <Delete />
@ -78,21 +78,13 @@ const selectionData = ref([])
label: '编辑', label: '编辑',
type: 'warning', type: 'warning',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
ifShow: () => { auth: ['sys:adSort:update'],
return true;
},
// auth: ['sys:user:list'],
}, },
{ {
label: '删除', label: '删除',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth auth: ['sys:adSort:delete'],
ifShow: () => {
return true;
},
// :
// auth: ['basic_list'],
}, },
], ],
}); });

View File

@ -16,7 +16,7 @@
<a class="down-a" target="_blank" :href="scope.row.cover">{{scope.row.title}}</a> <a class="down-a" target="_blank" :href="scope.row.cover">{{scope.row.title}}</a>
</template> </template>
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleAdd"> <el-button type="primary" @click="handleAdd" v-perm="['sys:article:add']">
<template #icon> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<PlusOutlined /> <PlusOutlined />
@ -24,7 +24,7 @@
</template> </template>
添加文章 添加文章
</el-button> </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> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<Delete /> <Delete />
@ -80,21 +80,14 @@ const selectionData = ref([])
label: '编辑', label: '编辑',
type: 'warning', type: 'warning',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
ifShow: () => { auth: ['sys:article:update'],
return true;
},
// auth: ['basic_list'],
}, },
{ {
label: '删除', label: '删除',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth
ifShow: () => {
return true;
},
// : // :
// auth: ['basic_list'], auth: ['sys:article:delete'],
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@
<div class="menu-index"> <div class="menu-index">
<el-card :bordered="false" class="pt-3 mb-3 proCard"> <el-card :bordered="false" class="pt-3 mb-3 proCard">
<div> <div>
<el-button type="primary" @click="handleAdd()"> <el-button type="primary" @click="handleAdd()" v-perm="['sys:category:add']">
<template #icon> <template #icon>
<el-icon> <el-icon>
<plus /> <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="创建时间" prop="createTime" min-width="180"></el-table-column>
<el-table-column align="center" label="操作" width="160" fixed="right"> <el-table-column align="center" label="操作" width="160" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="primary" link <el-button type="primary" link @click="handleAdd(row.id)" v-perm="['sys:category:add']">
@click="handleAdd(row.id)">
新增 新增
</el-button> </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>
<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> </el-button>
</template> </template>

View File

@ -13,7 +13,7 @@
@selection-change="onSelectionChange" @selection-change="onSelectionChange"
> >
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleAdd"> <el-button type="primary" @click="handleAdd" v-perm="['sys:layout:add']">
<template #icon> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<PlusOutlined /> <PlusOutlined />
@ -21,7 +21,7 @@
</template> </template>
添加页面布局 添加页面布局
</el-button> </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> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<Delete /> <Delete />
@ -76,21 +76,13 @@ const selectionData = ref([])
label: '编辑', label: '编辑',
type: 'warning', type: 'warning',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
ifShow: () => { auth: ['sys:layout:update'],
return true;
},
// auth: ['sys:user:list'],
}, },
{ {
label: '删除', label: '删除',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth auth: ['sys:layout:delete'],
ifShow: () => {
return true;
},
// :
// auth: ['basic_list'],
}, },
], ],
}); });

View File

@ -13,7 +13,7 @@
@selection-change="onSelectionChange" @selection-change="onSelectionChange"
> >
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleAdd"> <el-button type="primary" @click="handleAdd" v-perm="['sys:layoutItem:add']">
<template #icon> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<PlusOutlined /> <PlusOutlined />
@ -21,7 +21,7 @@
</template> </template>
添加页面推荐 添加页面推荐
</el-button> </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> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<Delete /> <Delete />
@ -78,21 +78,13 @@ const selectionData = ref([])
label: '编辑', label: '编辑',
type: 'warning', type: 'warning',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
ifShow: () => { auth: ['sys:layoutItem:update'],
return true;
},
// auth: ['sys:user:list'],
}, },
{ {
label: '删除', label: '删除',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth auth: ['sys:layoutItem:delete'],
ifShow: () => {
return true;
},
// :
// auth: ['basic_list'],
}, },
], ],
}); });

View File

@ -13,7 +13,7 @@
@selection-change="onSelectionChange" @selection-change="onSelectionChange"
> >
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleAdd"> <el-button type="primary" @click="handleAdd" v-perm="['sys:link:add']">
<template #icon> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<PlusOutlined /> <PlusOutlined />
@ -21,7 +21,7 @@
</template> </template>
添加友情链接 添加友情链接
</el-button> </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> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<Delete /> <Delete />
@ -76,21 +76,13 @@ const selectionData = ref([])
label: '编辑', label: '编辑',
type: 'warning', type: 'warning',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
ifShow: () => { auth: ['sys:link:update'],
return true;
},
// auth: ['sys:user:list'],
}, },
{ {
label: '删除', label: '删除',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth auth: ['sys:link:delete'],
ifShow: () => {
return true;
},
// :
// auth: ['basic_list'],
}, },
], ],
}); });

View File

@ -13,7 +13,7 @@
@selection-change="onSelectionChange" @selection-change="onSelectionChange"
> >
<template #tableTitle> <template #tableTitle>
<el-button type="primary" @click="handleAdd"> <el-button type="primary" @click="handleAdd" v-perm="['sys:tag:add']">
<template #icon> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<PlusOutlined /> <PlusOutlined />
@ -21,7 +21,7 @@
</template> </template>
添加标签 添加标签
</el-button> </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> <template #icon>
<el-icon class="el-input__icon"> <el-icon class="el-input__icon">
<Delete /> <Delete />
@ -76,21 +76,13 @@ const selectionData = ref([])
label: '编辑', label: '编辑',
type: 'warning', type: 'warning',
onClick: handleEdit.bind(null, record), onClick: handleEdit.bind(null, record),
ifShow: () => { auth: ['sys:tag:update'],
return true;
},
// auth: ['sys:user:list'],
}, },
{ {
label: '删除', label: '删除',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth auth: ['sys:tag:delete'],
ifShow: () => {
return true;
},
// :
// auth: ['basic_list'],
}, },
], ],
}); });

View File

@ -66,7 +66,6 @@ import type { FormInstance } from "element-plus";
import { cityAdd, cityUpdate, getCityList, getCityDetail } from '@/api/data/city'; import { cityAdd, cityUpdate, getCityList, getCityDetail } from '@/api/data/city';
import { onMounted, reactive, ref, shallowRef,nextTick } from "vue"; import { onMounted, reactive, ref, shallowRef,nextTick } from "vue";
import { getCityByList } from "@/api/system/user"; import { getCityByList } from "@/api/system/user";
import { getModulesKey } from "@/router";
import { message } from "@/utils/auth"; import { message } from "@/utils/auth";
import { useLockFn } from "@/utils/useLockFn"; import { useLockFn } from "@/utils/useLockFn";
const props = defineProps({ const props = defineProps({

View File

@ -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="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="os"></el-table-column>
<el-table-column show-overflow-tooltip align="center" label="登录时间" prop="loginTime"></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 }"> <template #default="{ row, $index }">
<el-button @click="handleDelete(row)" type="danger">强退</el-button> <el-button @click="handleDelete(row)" type="danger">强退</el-button>
</template> </template>

View File

@ -91,7 +91,6 @@
v-if="formData.type == 0 && (formData.target ==0 || formData.target ==1)" v-if="formData.type == 0 && (formData.target ==0 || formData.target ==1)"
label="组件路径" label="组件路径"
prop="component" prop="component"
:rules="{ required: true, message: '请输入组件路径', trigger: 'blur' }"
> >
<div class="flex-1"> <div class="flex-1">
<el-autocomplete <el-autocomplete

View File

@ -12,7 +12,7 @@
:columns="columns" :columns="columns"
:request="loadDataTable" :request="loadDataTable"
:row-key="(row) => row.id" :row-key="(row) => row.id"
ref="basicTableRef" ref="tableRef"
:actionColumn="actionColumn" :actionColumn="actionColumn"
@selection-change="onSelectionChange" @selection-change="onSelectionChange"
scroll-x="1200" scroll-x="1200"
@ -91,6 +91,7 @@
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import {downloadByData} from '@/utils/file/download'; import {downloadByData} from '@/utils/file/download';
const userId = ref(0); const userId = ref(0);
const tableRef = ref();
const basicTableRef = ref(); const basicTableRef = ref();
const editVisible = ref(false) const editVisible = ref(false)
const selectionData = ref([]) const selectionData = ref([])