diff --git a/src/api/admin/tenant-menu.ts b/src/api/admin/tenant-menu.ts new file mode 100644 index 00000000..8cc987bf --- /dev/null +++ b/src/api/admin/tenant-menu.ts @@ -0,0 +1,57 @@ +import request from "/@/utils/request" + +export function fetchList(query?: Object) { + return request({ + url: '/admin/tenant-menu/page', + method: 'get', + params: query + }) +} + + +export function addObj (obj: object) { + return request({ + url: '/admin/tenant-menu', + method: 'post', + data: obj + }) +} + +export function getObj(id: string) { + return request({ + url: '/admin/tenant-menu/', + method: 'get', + params: { + id: id + } + }) +} + +export function delObj(id: string) { + return request({ + url: '/admin/tenant-menu/' + id, + method: 'delete' + }) +} + +export function putObj(obj:Object) { + return request({ + url: '/admin/tenant-menu', + method: 'put', + data: obj + }) +} + +export function menuList() { + return request({ + url: '/admin/tenant-menu/list', + method: 'get' + }) +} + +export function treemenu(){ + return request({ + url: '/admin/tenant-menu/tree/menu', + method: 'get' + }) +} diff --git a/src/utils/request.ts b/src/utils/request.ts index b311092c..3c3260a9 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,4 +1,4 @@ -import axios, {AxiosInstance, AxiosRequestConfig, InternalAxiosRequestConfig} from 'axios'; +import axios, {AxiosInstance, InternalAxiosRequestConfig} from 'axios'; import errorCode from './errorCode' import {ElMessage, ElMessageBox} from 'element-plus'; import {Session} from '/@/utils/storage'; diff --git a/src/views/admin/tenant/i18n/en.ts b/src/views/admin/tenant/i18n/en.ts index d61e5822..c93beed9 100644 --- a/src/views/admin/tenant/i18n/en.ts +++ b/src/views/admin/tenant/i18n/en.ts @@ -28,5 +28,7 @@ export default { inputcreateTimeTip: 'input createTime', inputupdateTimeTip: 'input updateTime', inputmenuIdTip: 'input menuId', - } + }, tenantmenu: { + name: 'tenantmenu', index: 'index', status: 'status', createTime: 'createTime', + } } diff --git a/src/views/admin/tenant/i18n/zh-cn.ts b/src/views/admin/tenant/i18n/zh-cn.ts index d2b218e8..ee484ae5 100644 --- a/src/views/admin/tenant/i18n/zh-cn.ts +++ b/src/views/admin/tenant/i18n/zh-cn.ts @@ -28,5 +28,11 @@ export default { inputcreateTimeTip: '请输入创建', inputupdateTimeTip: '请输入更新时间', inputmenuIdTip: '请输入menuId', + }, + tenantmenu: { + name: '租户套餐', + index: '序号', + status: '状态', + createTime: '创建', } } diff --git a/src/views/admin/tenant/index.vue b/src/views/admin/tenant/index.vue index ee61ce09..7b46654e 100644 --- a/src/views/admin/tenant/index.vue +++ b/src/views/admin/tenant/index.vue @@ -29,10 +29,15 @@ v-auth="'admin_systenant_add'"> {{ $t('common.exportBtn') }} + {{ $t('common.delBtn') }} + + + {{ $t('tenantmenu.name') }} + @@ -80,6 +85,8 @@ + + @@ -92,11 +99,13 @@ import { useDict } from "/@/hooks/dict"; // 引入组件 const FormDialog = defineAsyncComponent(() => import('./form.vue')); +const TenantMenu = defineAsyncComponent(() => import('./tenantMenu/index.vue')) const { t } = useI18n() // 定义变量内容 const formDialogRef = ref() const excelUploadRef = ref() +const TenantMenuRef = ref() // 搜索变量 const queryRef = ref() const showSearch = ref(true) @@ -157,4 +166,9 @@ const handleDelete = (row: any) => { }) }) }; + +const handleTenantMenu = () => { + TenantMenuRef.value.open() +} + diff --git a/src/views/admin/tenant/tenantMenu/form.vue b/src/views/admin/tenant/tenantMenu/form.vue new file mode 100644 index 00000000..c74edd29 --- /dev/null +++ b/src/views/admin/tenant/tenantMenu/form.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/views/admin/tenant/tenantMenu/index.vue b/src/views/admin/tenant/tenantMenu/index.vue new file mode 100644 index 00000000..b14d1211 --- /dev/null +++ b/src/views/admin/tenant/tenantMenu/index.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/src/views/admin/user/index.vue b/src/views/admin/user/index.vue index a2e705f4..7b0d5025 100644 --- a/src/views/admin/user/index.vue +++ b/src/views/admin/user/index.vue @@ -134,7 +134,7 @@ const state: BasicTableProps = reactive({ username: '', phone: '' }, - pageList: pageList // H + pageList: pageList }); // 部门树使用的数据