From b583be5465970411153abad0ae85661059818f14 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Thu, 16 Mar 2023 13:51:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E5=9C=B0=E5=8C=BA=E7=AE=A1=E7=90=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/area/index.ts | 15 ++++ src/views/system/area/area.data.ts | 23 ++++++ src/views/system/area/index.vue | 126 +++++++++++++++++++++++++++++ 3 files changed, 164 insertions(+) create mode 100644 src/api/system/area/index.ts create mode 100644 src/views/system/area/area.data.ts create mode 100644 src/views/system/area/index.vue 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/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 @@ + + + From 23b23f920011e0b890972f3fcb5c506a228ad730 Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Fri, 24 Mar 2023 17:05:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?xTable=E6=9F=A5=E8=AF=A2=E6=A1=86=E5=89=8D?= =?UTF-8?q?=E9=97=B4=E9=9A=94=EF=BC=8C=E9=80=80=E5=87=BA=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E7=82=B9=E5=87=BB=E6=9C=89=E6=97=B6=E4=BC=9A?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/XTable/src/XTable.vue | 2 +- src/layout/components/UserInfo/src/UserInfo.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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') }}