From 0d3bb25e86e74f544652fa67b09ea95aba5c35b5 Mon Sep 17 00:00:00 2001 From: Zy <1448159279@qq.com> Date: Wed, 13 May 2026 18:07:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=AB=E6=8D=B7=E5=85=A5=E5=8F=A3=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 25 +++- src/components/RightToolbar/index.vue | 2 +- src/views/system/ComplaintType/index.vue | 22 +++- src/views/system/HouseFacilities/index.vue | 2 +- src/views/system/Repair/addRepairlist.vue | 1 + src/views/system/Repair/repairlist.vue | 2 +- src/views/system/Sdb/SdbWaterDevice/index.vue | 2 +- src/views/system/equipment/Category/index.vue | 1 + src/views/system/role/index.vue | 2 +- src/views/system/user/index.vue | 2 +- src/views/workbench/index2.vue | 109 +++++++++++++++++- 11 files changed, 157 insertions(+), 13 deletions(-) diff --git a/.env.development b/.env.development index 32502d1..e09aa48 100644 --- a/.env.development +++ b/.env.development @@ -9,9 +9,9 @@ VITE_APP_ENV = 'development' # 开发环境 VITE_APP_BASE_API = '/dev-api' # # 开发环境 接口代理地址 -VITE_APP_PROXY_API = 'http://192.168.1.222:8080' +# VITE_APP_PROXY_API = 'http://192.168.1.222:8080' # 开发环境 接口代理地址 -# VITE_APP_PROXY_API = 'http://192.168.1.215:8080' +VITE_APP_PROXY_API = 'http://192.168.0.239:8080' # 图片基础地址 VITE_IMG_URL = 'http://192.168.1.222:8080' @@ -27,6 +27,26 @@ VITE_APP_SNAILJOB_ADMIN = 'http://192.168.1.215/snail-job' VITE_APP_PORT = 5173 +# 登录成功跳转地址 +VITE_LOGIN_BACK_URL = '/equipment/WaterDevice' +# 是否展示工作台 +VITE_APP_SHOW_WORK_PLATFORM = true + + +# 地图类型 天地图 or 高德地图 天地图 WGS84 高德地图 GCJ02, 高德地图 需要在高德地图官网申请key +# 高德地图 GCJ02 +# 天地图 WGS84 +VITE_APP_MAP_TYPE = 'GCJ02' + +# 高德地图key 建议放入环境变量中,避免泄露 +VITE_GCJ02_KEY_GD = '8e302fe1be5f4db62bc734db23dca149' +VITE_GCJ02_JS_CODE_GD = '09534b3534d8da53968529a9ce164118' + +# 天地图key 建议放入环境变量中,避免泄露 +VITE_TIANDITU_KEY = 'f71689f9e22158947ebf64ad95e0a595' +VITE_TIANDITU_JS_CODE = '' + + # 接口加密功能开关(如需关闭 后端也必须对应关闭) VITE_APP_ENCRYPT = true # 接口加密传输 RSA 公钥与后端解密私钥对应 如更换需前后端一同更换 @@ -42,3 +62,4 @@ VITE_APP_WEBSOCKET = false # sse 开关 VITE_APP_SSE = false + diff --git a/src/components/RightToolbar/index.vue b/src/components/RightToolbar/index.vue index f147018..b9d158d 100644 --- a/src/components/RightToolbar/index.vue +++ b/src/components/RightToolbar/index.vue @@ -1,6 +1,6 @@ --> - + - + - + @@ -236,6 +268,7 @@ import summicon from '@/assets/images/index/summer.png'; import repairEcharts from './components/repairEcharts.vue'; import { delResident, listResident } from '@/api/system/resident'; import { useHouseStore } from '@/store/modules/house'; +import { usePermissionStore } from '@/store/modules/permission'; const houseStore = useHouseStore(); @@ -258,12 +291,14 @@ import info from './assets/info.png'; import profile from './assets/profile.png'; import star from './assets/star.png'; +import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index'; import { UploadUserFile } from 'element-plus'; import { getVillageByIdAPI } from '@/api/system/community'; import { getLast7Days, numToWeek2 } from '@/utils/time'; import { EChartsOption } from 'echarts'; import { workSpaceIncomeTrendListApi, workSpaceTotalListApi, workSpaceWeatherApi } from '@/api/workflow'; import { getWeatherIcon } from '@/utils/weather'; +import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const { com_resident_type } = toRefs(proxy?.useDict('com_resident_type')); @@ -504,6 +539,78 @@ function handleRouter(val: string) { path: val }); } + +const dialog = reactive({ + visible: false, + title: '添加快捷入口' +}); +const menuOptions = ref([]); +const form = ref({ + name: '', + path: '', + icon: '' +}); +const rules = { + name: [{ required: true, trigger: 'blur', message: '请输入快捷入口名称' }], + path: [{ required: true, trigger: 'blur', message: '请选择快捷入口页面' }] +}; +function addQuieckDialog() { + form.value = { + name: '', + path: '', + icon: '' + }; + const permissionStore = usePermissionStore(); + const routes = permissionStore.getDefaultRoutes(); + console.log(routes); + handleroutestoshowlist(routes); + dialog.visible = true; +} +function handleroutestoshowlist(rotues) { + function _hanle(parentRoute, currentroute, level) { + console.log(currentroute, level); + let obj: { + name: string; + icon: string; + path: string; + level: number; + children: unknown[]; + } = {}; + // 非页面路由和 二级路由 + if (currentroute.hidden || level === 2) { + return null; + } + if (currentroute.meta) { + obj = { + name: currentroute.meta.title, + icon: currentroute.meta.icon, + path: currentroute.path, + level: level, + children: [] + }; + } else if (currentroute.path === '/') { + obj = { + name: '', + icon: currentroute.meta.icon, + path: currentroute.path, + level: level, + children: [] + }; + } + // 传过来父级path 拼接 + if (parentRoute) { + obj.path = parentRoute.path + '/' + currentroute.path; + } + // 没有按钮第三级 普遍是 删除按钮操作 + if (level < 2) { + obj.children = currentroute.children.map((item) => _hanle(obj, item, level + 1)).filter((item) => item); + } + + return obj; + } + // const arr = rotues.map((ele) => _hanle(null, ele, 1)).filter((item) => item); + // console.log(arr); +} // ! 快捷入口 // ! 创建办事记录