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(() => { onMounted(() => {
document.addEventListener('mousedown', timekeeping); // document.addEventListener('mousedown', timekeeping);
}); });
onUnmounted(() => { onUnmounted(() => {
document.removeEventListener('mousedown', timekeeping); // document.removeEventListener('mousedown', timekeeping);
}); });
</script> </script>

View File

@ -59,3 +59,13 @@ export function tenantBatchDelete(data:any) {
data 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: * @description:
*/ */
export function changePassword(params, uid) { export function changePassword(data) {
return http.request( return http.request(
{ {
url: `/user/u${uid}/changepw`, url: `/index/updatePassword`,
method: 'POST', method: 'PUT',
params, data
}, }
{
isTransformResponse: false,
},
); );
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -95,11 +95,13 @@ const editVisible=ref(false)
}, },
{ {
label: '详情', label: '详情',
icon:'View',
type: 'warning', type: 'warning',
onClick: handleInfo.bind(null, record), onClick: handleInfo.bind(null, record),
}, },
{ {
label: '删除', label: '删除',
icon:'Delete',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), 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="cityCode" min-width="100"/>
<el-table-column align="center" label="行政编码" prop="areaCode" 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="城市邮编" 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 }"> <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>
<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>
<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> </el-button>
</template> </template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,6 +1,14 @@
<template> <template>
<PageWrapper> <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 :data="tabledata" :show-header="false">
<el-table-column width="150" align="center">Redis版本</el-table-column> <el-table-column width="150" align="center">Redis版本</el-table-column>
<el-table-column>{{ baseInfo.redis_version }}</el-table-column> <el-table-column>{{ baseInfo.redis_version }}</el-table-column>
@ -36,10 +44,26 @@
</el-table> </el-table>
</el-card> </el-card>
<div class="cache-box"> <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" /> <pie-box :pieData="commandStats" v-if="commandStats.length > 0" />
</el-card> </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"/> <gauge-box :data="gaugeValue" v-if="gaugeValue"/>
</el-card> </el-card>
</div> </div>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -85,6 +85,7 @@ const selectionData = ref([])
actions: [ actions: [
{ {
label: '详情', label: '详情',
icon:'View',
type: 'warning', type: 'warning',
onClick: handleDetail.bind(null, record), onClick: handleDetail.bind(null, record),
ifShow: () => { ifShow: () => {
@ -94,6 +95,7 @@ const selectionData = ref([])
}, },
{ {
label: '删除', label: '删除',
icon:'Delete',
type: 'danger', type: 'danger',
onClick: handleDelete.bind(null, record), onClick: handleDelete.bind(null, record),
// isShow auth // 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="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="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="创建时间" 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 }"> <template #default="{ row }">
<el-button type="primary" link <el-button type="primary" icon="Plus"
@click="handleAdd(row.id)" v-perm="['sys:dept:addz']"> @click="handleAdd(row.id)" v-perm="['sys:dept:addz']">
新增 新增
</el-button> </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>
<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> </el-button>
</template> </template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

@ -19,8 +19,14 @@
<el-table-column label="菜单名称" prop="name" min-width="150" show-overflow-tooltip/> <el-table-column label="菜单名称" prop="name" min-width="150" show-overflow-tooltip/>
<el-table-column align="center" label="类型" prop="type" min-width="80"> <el-table-column align="center" label="类型" prop="type" min-width="80">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.type ==0">菜单</div> <el-tag v-if="row.type ==0">菜单</el-tag>
<div v-else-if="row.type == 1">按钮</div> <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> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="图标" prop="icon" min-width="80"> <el-table-column align="center" label="图标" prop="icon" min-width="80">
@ -37,16 +43,16 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="排序" prop="sort" min-width="100"/> <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="更新时间" 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 }"> <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']"> @click="handleAdd(row.id)" v-perm="['sys:menu:addz']">
新增 新增
</el-button> </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>
<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> </el-button>
</template> </template>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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