This commit is contained in:
陈红丽 2024-08-22 14:42:51 +08:00
parent 4879017e1a
commit 0c9cb50548
78 changed files with 311 additions and 57 deletions

View File

@ -49,11 +49,11 @@
};
onMounted(() => {
document.addEventListener('mousedown', timekeeping);
// document.addEventListener('mousedown', timekeeping);
});
onUnmounted(() => {
document.removeEventListener('mousedown', timekeeping);
// document.removeEventListener('mousedown', timekeeping);
});
</script>

View File

@ -58,4 +58,14 @@ export function tenantBatchDelete(data:any) {
method: 'DELETE',
data
});
}
/**
* @description:
*/
export function tenantAccount(data:any) {
return http.request({
url: '/tenant/account',
method: 'POST',
data,
});
}

View File

@ -53,16 +53,13 @@ export function getInfoCaptcha() {
/**
* @description:
*/
export function changePassword(params, uid) {
export function changePassword(data) {
return http.request(
{
url: `/user/u${uid}/changepw`,
method: 'POST',
params,
},
{
isTransformResponse: false,
},
url: `/index/updatePassword`,
method: 'PUT',
data
}
);
}

View File

@ -105,6 +105,7 @@
v-bind="getComponentProps(schema)"
:is="`el-${schema.component}`"
v-model="formModel[schema.field]"
:type="schema.type"
/>
<!--组件后面的内容-->
<template v-if="schema.suffix">

View File

@ -22,6 +22,7 @@ export interface componentProps {
export interface FormSchema {
field: string;
label?: string;
type?:string;
labelMessage?: string;
labelMessageStyle?: CSSProperties;
defaultValue?: any;

View File

@ -89,6 +89,7 @@
v-if="item.type === 'index' || item.type === 'selection'"
:type="item.type"
:width="item.width"
fixed="left"
/>
<el-table-column align="center" v-else-if="item.isSlot" v-bind="item">
<template #default="scope">

View File

@ -13,11 +13,13 @@
import { basicModal, useModal } from '@/components/Modal';
import { ElMessage } from 'element-plus';
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
import { changePassword } from '@/api/system/user';
const schemas: FormSchema[] = [
{
field: 'formerPwd',
field: 'password',
component: 'Input',
type:'password',
label: '旧密码',
componentProps: {
placeholder: '请输入旧密码',
@ -25,8 +27,9 @@
rules: [{ required: true, message: '请输入旧密码', trigger: ['blur'] }],
},
{
field: 'password',
field: 'newPassword',
component: 'Input',
type:'password',
label: '新密码',
componentProps: {
placeholder: '请输入新密码',
@ -34,8 +37,9 @@
rules: [{ required: true, message: '请输入新密码', trigger: ['blur'] }],
},
{
field: 'rePassword',
field: 'confirmPassword',
component: 'Input',
type:'password',
label: '确认密码',
componentProps: {
placeholder: '请再次输入新密码',
@ -46,7 +50,7 @@
const modalRef: any = ref(null);
const [register, { submit, resetFields }] = useForm({
const [register, { submit, getFieldsValue }] = useForm({
collapsedRows: 3,
labelWidth: 80,
layout: 'horizontal',
@ -62,9 +66,14 @@
async function formSubmit() {
const formRes = await submit();
if (formRes) {
await resetFields();
try{
await changePassword(getFieldsValue())
closeModal();
ElMessage.success('修改成功');
} catch(e){
setSubLoading(false);
}
} else {
ElMessage.error('验证失败,请填写完整信息');
setSubLoading(false);

View File

@ -377,13 +377,13 @@
// click: () => window.open('https://github.com/jekip/naive-ui-admin'),
// },
// },
{
icon: LockOutlined,
tips: '锁屏',
eventObject: {
click: () => useLockscreen.setLock(true),
},
},
// {
// icon: LockOutlined,
// tips: '',
// eventObject: {
// click: () => useLockscreen.setLock(true),
// },
// },
];
//

View File

@ -4,6 +4,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '广告标题',
prop: 'title',

View File

@ -79,12 +79,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:ad:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:ad:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '广告位名称',
prop: 'name',

View File

@ -76,12 +76,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:adSort:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:adSort:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '文章标题',
prop: 'title',

View File

@ -78,12 +78,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:article:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
// :

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '位置编号',
prop: 'location',

View File

@ -74,12 +74,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:layout:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:layout:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '位置编号',
prop: 'location',

View File

@ -76,12 +76,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:layoutItem:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:layoutItem:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '名称',
prop: 'name',

View File

@ -74,12 +74,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:link:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:link:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '标签名称',
prop: 'name',

View File

@ -74,12 +74,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:tag:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:tag:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '消息标题',
prop: 'title',

View File

@ -95,11 +95,13 @@ const editVisible=ref(false)
},
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleInfo.bind(null, record),
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
},

View File

@ -29,15 +29,15 @@
<el-table-column align="center" label="城市区号" prop="cityCode" min-width="100"/>
<el-table-column align="center" label="行政编码" prop="areaCode" min-width="100"/>
<el-table-column align="center" label="城市邮编" prop="zipCode" min-width="100"/>
<el-table-column align="center" label="操作" width="160" fixed="right">
<el-table-column align="center" label="操作" width="300" fixed="right">
<template #default="{ row }">
<el-button type="primary" link @click="handleAdd(row)" v-perm="['sys:city:addz']">
<el-button type="primary" icon="Plus" @click="handleAdd(row)" v-perm="['sys:city:addz']">
新增
</el-button>
<el-button type="primary" link @click="handleEdit(row)" v-perm="['sys:city:update']">
<el-button type="warning" icon="Edit" @click="handleEdit(row)" v-perm="['sys:city:update']">
编辑
</el-button>
<el-button type="danger" link @click="handleDelete(row)" v-perm="['sys:city:delete']">
<el-button type="danger" icon="Delete" @click="handleDelete(row)" v-perm="['sys:city:delete']">
删除
</el-button>
</template>

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '配置名称',
prop: 'name',

View File

@ -4,6 +4,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '配置项名称',
prop: 'name',

View File

@ -66,11 +66,13 @@ const actionColumn = reactive({
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
}

View File

@ -70,11 +70,13 @@ const actionColumn = reactive({
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
}

View File

@ -2,6 +2,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '字典名称',
prop: 'name',

View File

@ -2,6 +2,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '字典名称',
prop: 'name',

View File

@ -66,11 +66,13 @@ const actionColumn = reactive({
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
}

View File

@ -74,11 +74,13 @@ const actionColumn = reactive({
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
}

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '消息标题',
prop: 'title',

View File

@ -68,12 +68,14 @@ const editVisible=ref(false)
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleInfo.bind(null, record),
auth: ['sys:message:detail'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:message:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '标题',
prop: 'title',

View File

@ -78,12 +78,14 @@
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:notice:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:notice:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '参数名称',
prop: 'name',

View File

@ -76,12 +76,14 @@ const editVisible=ref(false)
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:param:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:param:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '模板名称',
prop: 'title',

View File

@ -78,12 +78,14 @@ const editVisible=ref(false)
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:emailTemplate:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:emailTemplate:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '模板名称',
prop: 'name',

View File

@ -77,12 +77,14 @@ const editVisible=ref(false)
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:fileTemplate:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:fileTemplate:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '模板名称',
prop: 'title',

View File

@ -78,12 +78,14 @@ const editVisible=ref(false)
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:messageTemplate:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:messageTemplate:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '模板名称',
prop: 'title',

View File

@ -78,12 +78,14 @@ const editVisible=ref(false)
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:smsTemplate:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:smsTemplate:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '日志标题',
prop: 'title',

View File

@ -72,12 +72,14 @@ const editVisible=ref(false)
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleDetail.bind(null, record),
auth: ['sys:emailLog:detail'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:emailLog:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '文件名称',
prop: 'originalName',

View File

@ -68,12 +68,14 @@ const editVisible=ref(false)
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleDetail.bind(null, record),
auth: ['sys:fileLog:detail'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:fileLog:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '日志标题',
prop: 'title',

View File

@ -72,12 +72,14 @@ const editVisible=ref(false)
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleDetail.bind(null, record),
auth: ['sys:smsLog:detail'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:smsLog:delete'],

View File

@ -147,6 +147,7 @@
router.replace('/');
} else router.replace(toPath);
} else {
getCaptcha()
ElMessage.error(msg || '登录失败');
}
} finally {

View File

@ -1,6 +1,14 @@
<template>
<PageWrapper>
<el-card :bordered="false" header="基本信息" style="margin-bottom:20px;">
<el-card :bordered="false" style="margin-bottom:20px;">
<template #header>
<div class="flex item-center">
<el-icon class="el-input__icon" size="16px" style="margin-right:6px;">
<Monitor />
</el-icon>
基本信息
</div>
</template>
<el-table :data="tabledata" :show-header="false">
<el-table-column width="150" align="center">Redis版本</el-table-column>
<el-table-column>{{ baseInfo.redis_version }}</el-table-column>
@ -36,10 +44,26 @@
</el-table>
</el-card>
<div class="cache-box">
<el-card :bordered="false" header="命令统计">
<el-card :bordered="false">
<template #header>
<div class="flex item-center">
<el-icon class="el-input__icon" size="16px" style="margin-right:6px;">
<PieChart />
</el-icon>
命令统计
</div>
</template>
<pie-box :pieData="commandStats" v-if="commandStats.length > 0" />
</el-card>
<el-card :bordered="false" header="内存信息">
<el-card :bordered="false">
<template #header>
<div class="flex item-center">
<el-icon class="el-input__icon" size="16px" style="margin-right:6px;">
<Odometer />
</el-icon>
内存信息
</div>
</template>
<gauge-box :data="gaugeValue" v-if="gaugeValue"/>
</el-card>
</div>

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '数据源名称',
prop: 'name',

View File

@ -75,12 +75,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:dataSource:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:dataSource:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '任务名称',
prop: 'jobName',

View File

@ -107,6 +107,7 @@ const selectionData = ref([])
},
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
disabled:record.row.status==1,
@ -114,6 +115,7 @@ const selectionData = ref([])
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
// :

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '任务名称',
prop: 'jobName',

View File

@ -85,6 +85,7 @@ const selectionData = ref([])
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleDetail.bind(null, record),
ifShow: () => {
@ -94,6 +95,7 @@ const selectionData = ref([])
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
// isShow auth

View File

@ -29,16 +29,16 @@
<el-table-column align="center" label="部门备注" prop="note" min-width="100"/>
<el-table-column align="center" label="创建人" prop="createUser" 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="300" fixed="right">
<template #default="{ row }">
<el-button type="primary" link
<el-button type="primary" icon="Plus"
@click="handleAdd(row.id)" v-perm="['sys:dept:addz']">
新增
</el-button>
<el-button type="primary" link @click="handleEdit(row)" v-perm="['sys:dept:update']">
<el-button type="warning" icon="Edit" @click="handleEdit(row)" v-perm="['sys:dept:update']">
编辑
</el-button>
<el-button type="danger" link @click="handleDelete(row.id)" v-perm="['sys:dept:delete']">
<el-button type="danger" icon="Delete" @click="handleDelete(row.id)" v-perm="['sys:dept:delete']">
删除
</el-button>
</template>

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '职级名称',
prop: 'name',

View File

@ -41,7 +41,7 @@
:limit="1"
v-perm="['sys:level:import']"
>
<el-button type="danger">
<el-button type="primary">
<template #icon>
<el-icon class="el-input__icon">
<Upload />
@ -50,7 +50,7 @@
导入
</el-button>
</el-upload>
<el-button type="danger" @click="handleExport" :loading="exportLoading" :disabled="exportLoading" v-perm="['sys:level:export']">
<el-button type="primary" @click="handleExport" :loading="exportLoading" :disabled="exportLoading" v-perm="['sys:level:export']">
<template #icon>
<el-icon class="el-input__icon">
<Download />
@ -111,12 +111,14 @@
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:level:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
// :

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '操作用户',
prop: 'username',

View File

@ -66,12 +66,14 @@ const editVisible=ref(false)
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleInfo.bind(null, record),
auth: ['sys:loginlog:detail'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:loginlog:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '日志标题',
prop: 'title',

View File

@ -66,12 +66,14 @@ const editVisible=ref(false)
actions: [
{
label: '详情',
icon:'View',
type: 'warning',
onClick: handleInfo.bind(null, record),
auth: ['sys:operlog:detail'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:operlog:delete'],

View File

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

View File

@ -19,8 +19,14 @@
<el-table-column label="菜单名称" prop="name" min-width="150" show-overflow-tooltip/>
<el-table-column align="center" label="类型" prop="type" min-width="80">
<template #default="{ row }">
<div v-if="row.type ==0">菜单</div>
<div v-else-if="row.type == 1">按钮</div>
<el-tag v-if="row.type ==0">菜单</el-tag>
<el-tag v-else-if="row.type == 1" type="warning">按钮</el-tag>
</template>
</el-table-column>
<el-table-column align="center" label="是否显示" prop="type" min-width="80">
<template #default="{ row }">
<span v-if="row.hide ==0"></span>
<span v-else></span>
</template>
</el-table-column>
<el-table-column align="center" label="图标" prop="icon" min-width="80">
@ -37,16 +43,16 @@
</el-table-column>
<el-table-column align="center" label="排序" prop="sort" min-width="100"/>
<el-table-column align="center" label="更新时间" prop="updateTime" min-width="180"></el-table-column>
<el-table-column align="center" label="操作" width="160" fixed="right">
<el-table-column align="center" label="操作" width="300" fixed="right">
<template #default="{ row }">
<el-button v-if="row.type !== 1" type="primary" link
<el-button v-if="row.type !== 1" type="primary" icon="Plus"
@click="handleAdd(row.id)" v-perm="['sys:menu:addz']">
新增
</el-button>
<el-button type="primary" link @click="handleEdit(row)" v-perm="['sys:menu:update']">
<el-button type="warning" @click="handleEdit(row)" icon="Edit" v-perm="['sys:menu:update']">
编辑
</el-button>
<el-button type="danger" link @click="handleDelete(row.id)" v-perm="['sys:menu:delete']">
<el-button type="danger" @click="handleDelete(row.id)" icon="Delete" v-perm="['sys:menu:delete']">
删除
</el-button>
</template>

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '岗位名称',
prop: 'name',

View File

@ -75,12 +75,14 @@ const selectionData = ref([])
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:position:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth: ['sys:position:delete'],

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '角色名称',
prop: 'name',

View File

@ -93,12 +93,14 @@ const authVisible=ref(false)
},
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth: ['sys:role:update'],
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
// :

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '租户名称',
prop: 'name',

View File

@ -56,7 +56,7 @@
import { ColProps } from 'element-plus';
import { TableAction } from '@/components/Table';
import { useForm } from '@/components/Form/index';
import { getTenantList,tenantDelete,tenantBatchDelete } from '@/api/system/tenant';
import { getTenantList,tenantDelete,tenantBatchDelete,tenantAccount } from '@/api/system/tenant';
import {message,confirm} from "@/utils/auth";
import { columns } from './columns';
import { schemas } from './querySchemas';
@ -73,7 +73,7 @@
const actionColumn = reactive({
width: 250,
width: 320,
label: '操作',
prop: 'action',
fixed: 'right',
@ -82,17 +82,26 @@
return h(TableAction as any, {
style: 'text',
actions: [
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth:['sys:tenant:update']
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth:['sys:tenant:delete']
},
{
label: '编辑',
label: '创建账号',
icon:'Plus',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth:['sys:tenant:update']
onClick: handleAddAccount.bind(null, record),
auth:['sys:tenant:account']
},
],
});
@ -113,6 +122,10 @@
await nextTick();
editVisible.value=true
}
const handleAddAccount=async (recored: Recordable)=>{
await tenantAccount({tenantId:recored.row.id})
message("创建成功");
}
async function handleDelete(record: Recordable) {
let ids = []

View File

@ -5,6 +5,10 @@ export const columns = [
{
type: 'selection',
},
{
label: 'ID',
prop: 'id'
},
{
label: '登录账号',
prop: 'username',

View File

@ -48,7 +48,7 @@
:limit="1"
v-perm="['sys:user:import']"
>
<el-button type="danger">
<el-button type="primary">
<template #icon>
<el-icon class="el-input__icon">
<Upload />
@ -57,7 +57,7 @@
导入
</el-button>
</el-upload>
<el-button type="danger" @click="handleExport" :loading="exportLoading" :disabled="exportLoading" v-perm="['sys:user:export']">
<el-button type="primary" @click="handleExport" :loading="exportLoading" :disabled="exportLoading" v-perm="['sys:user:export']">
<template #icon>
<el-icon class="el-input__icon">
<Download />
@ -109,7 +109,7 @@
const actionColumn = reactive({
width: 250,
width:300,
label: '操作',
prop: 'action',
fixed: 'right',
@ -118,18 +118,20 @@
return h(TableAction as any, {
style: 'text',
actions: [
{
label: '删除',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth:['sys:user:delete']
},
{
label: '编辑',
icon:'Edit',
type: 'warning',
onClick: handleEdit.bind(null, record),
auth:['sys:user:update']
},
{
label: '删除',
icon:'Delete',
type: 'danger',
onClick: handleDelete.bind(null, record),
auth:['sys:user:delete']
},
{
label: '重置密码',
type: 'warning',