From ac6ec65bccae5b086be0892d1b4e7349bbc85a5f Mon Sep 17 00:00:00 2001 From: ailanyin Date: Wed, 24 May 2023 11:07:48 +0800 Subject: [PATCH] bugfix --- src/api/config.js | 31 ++++ src/components/CityOptions/index.vue | 202 +++++++++++++++++++++++++++ src/components/MapSelect/index.vue | 2 +- src/router/index.js | 4 + src/views/iot/device/detail.vue | 101 +++++++++----- src/views/iot/device/index.vue | 160 ++++++++++----------- src/views/product/product/edit.vue | 2 +- src/views/product/product/index.vue | 10 +- src/views/test/index.vue | 73 ++++++++++ vite.config.js | 3 +- 10 files changed, 466 insertions(+), 122 deletions(-) create mode 100644 src/api/config.js create mode 100644 src/components/CityOptions/index.vue create mode 100644 src/views/test/index.vue diff --git a/src/api/config.js b/src/api/config.js new file mode 100644 index 0000000..8fa3dfd --- /dev/null +++ b/src/api/config.js @@ -0,0 +1,31 @@ +// 省列表 +import request from "@/utils/request"; + +export function provinceList() { + return request({ + url: "/system/region/allProvince", + method: "get", + }); +} + +// 市列表 +export function cityList(provinceCode) { + return request({ + url: "/system/region/allCity", + method: "get", + params: { + provinceCode, + }, + }); +} + +// 县区列表 +export function districtList(cityCode) { + return request({ + url: "/system/region/allArea", + method: "get", + params: { + cityCode, + }, + }); +} \ No newline at end of file diff --git a/src/components/CityOptions/index.vue b/src/components/CityOptions/index.vue new file mode 100644 index 0000000..58cbd87 --- /dev/null +++ b/src/components/CityOptions/index.vue @@ -0,0 +1,202 @@ + + diff --git a/src/components/MapSelect/index.vue b/src/components/MapSelect/index.vue index 0079bbe..df13d02 100644 --- a/src/components/MapSelect/index.vue +++ b/src/components/MapSelect/index.vue @@ -187,7 +187,7 @@ onMounted(async () => { left: 0; top: 10px; padding: 0 10px; - z-index: 202333; + z-index: 120; } } diff --git a/src/router/index.js b/src/router/index.js index ab780bc..d0b4d77 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -57,6 +57,10 @@ export const constantRoutes = [ component: () => import("@/views/sign_in_with.vue"), hidden: true, }, + { + path: "/test", + component: () => import("@/views/test/index.vue"), + }, { path: "/:pathMatch(.*)*", component: () => import("@/views/error/404"), diff --git a/src/views/iot/device/detail.vue b/src/views/iot/device/detail.vue index 4bc5cf7..131ce15 100644 --- a/src/views/iot/device/detail.vue +++ b/src/views/iot/device/detail.vue @@ -15,6 +15,7 @@ diff --git a/vite.config.js b/vite.config.js index eb300ca..86fae18 100644 --- a/vite.config.js +++ b/vite.config.js @@ -31,7 +31,8 @@ export default defineConfig(({ mode, command }) => { proxy: { // https://cn.vitejs.dev/config/#server-proxy "/dev-api": { - target: "http://117.72.16.89/api", + target: "http://192.168.1.201:1616", + // target: "http://117.72.16.89/api", changeOrigin: true, rewrite: (p) => p.replace(/^\/dev-api/, ""), },