diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts new file mode 100644 index 00000000..7d8a9d7c --- /dev/null +++ b/src/api/system/area/index.ts @@ -0,0 +1,15 @@ +import request from '@/config/axios/request' + +// 获得地区树 +export const getAreaTree = async (content?: any) => { + return await request.get({ + url: '/system/area/tree', + params: content + }) +} +// 获得 IP 对应的地区名 +export const getAreaByIp = async (ip) => { + return await request.get({ + url: '/system/area/get-by-ip?ip=' + ip + }) +} diff --git a/src/components/XTable/src/XTable.vue b/src/components/XTable/src/XTable.vue index 55c7b129..fac292d4 100644 --- a/src/components/XTable/src/XTable.vue +++ b/src/components/XTable/src/XTable.vue @@ -128,7 +128,7 @@ const getColumnsConfig = (options: XTableProps) => { proxyForm = true options.formConfig = { enabled: true, - titleWidth: 180, + titleWidth: 110, titleAlign: 'right', items: allSchemas.searchSchema } diff --git a/src/layout/components/UserInfo/src/UserInfo.vue b/src/layout/components/UserInfo/src/UserInfo.vue index 73e048ab..7ccadb57 100644 --- a/src/layout/components/UserInfo/src/UserInfo.vue +++ b/src/layout/components/UserInfo/src/UserInfo.vue @@ -66,9 +66,9 @@ const toDocument = () => {
{{ t('common.document') }}
- + -
{{ t('common.loginOut') }}
+
{{ t('common.loginOut') }}
diff --git a/src/views/system/area/area.data.ts b/src/views/system/area/area.data.ts new file mode 100644 index 00000000..008e8a41 --- /dev/null +++ b/src/views/system/area/area.data.ts @@ -0,0 +1,23 @@ +import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' + +// CrudSchema +const crudSchemas = reactive({ + primaryKey: 'id', + primaryType: null, + action: false, + columns: [ + { + title: '编号', + field: 'id', + table: { + treeNode: true, + align: 'left' + } + }, + { + title: '名字', + field: 'name' + } + ] +}) +export const { allSchemas } = useVxeCrudSchemas(crudSchemas) diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue new file mode 100644 index 00000000..e5a6a682 --- /dev/null +++ b/src/views/system/area/index.vue @@ -0,0 +1,126 @@ + + +