From 25864fb449272ee9cb28b4bb384f843f50feb5d3 Mon Sep 17 00:00:00 2001 From: gxwebsoft Date: Thu, 22 Feb 2024 13:48:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E4=B8=80=E6=9C=BA?= =?UTF-8?q?=E4=B8=80=E6=A1=A3=E7=9A=84=E8=AF=A6=E6=83=85=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/tower/equipment/index.ts | 14 +- src/views/passport/login/index.vue | 32 +- .../machine/components/equipment-edit.vue | 5 + src/views/tower/machine/components/search.vue | 12 +- .../detail/components/app-about-edit.vue | 247 +++++++++ .../machine/detail/components/app-about.vue | 60 +++ .../detail/components/app-annex-edit.vue | 221 ++++++++ .../machine/detail/components/app-annex.vue | 302 +++++++++++ .../detail/components/app-field-edit.vue | 177 +++++++ .../detail/components/app-field-search.vue | 13 + .../machine/detail/components/app-field.vue | 208 ++++++++ .../detail/components/app-info-edit.vue | 500 ++++++++++++++++++ .../machine/detail/components/app-info.vue | 194 +++++++ .../machine/detail/components/app-nenew.vue | 255 +++++++++ .../detail/components/app-photo-edit.vue | 220 ++++++++ .../machine/detail/components/app-photo.vue | 52 ++ .../detail/components/app-profile-edit.vue | 256 +++++++++ .../machine/detail/components/app-profile.vue | 66 +++ .../detail/components/app-secret-form.vue | 210 ++++++++ .../detail/components/app-task-search.vue | 34 ++ .../machine/detail/components/app-task.vue | 298 +++++++++++ .../machine/detail/components/app-users.vue | 121 +++++ src/views/tower/machine/detail/index.vue | 200 +++++++ src/views/tower/machine/index.vue | 12 +- 25 files changed, 3681 insertions(+), 32 deletions(-) create mode 100644 src/views/tower/machine/detail/components/app-about-edit.vue create mode 100644 src/views/tower/machine/detail/components/app-about.vue create mode 100644 src/views/tower/machine/detail/components/app-annex-edit.vue create mode 100644 src/views/tower/machine/detail/components/app-annex.vue create mode 100644 src/views/tower/machine/detail/components/app-field-edit.vue create mode 100644 src/views/tower/machine/detail/components/app-field-search.vue create mode 100644 src/views/tower/machine/detail/components/app-field.vue create mode 100644 src/views/tower/machine/detail/components/app-info-edit.vue create mode 100644 src/views/tower/machine/detail/components/app-info.vue create mode 100644 src/views/tower/machine/detail/components/app-nenew.vue create mode 100644 src/views/tower/machine/detail/components/app-photo-edit.vue create mode 100644 src/views/tower/machine/detail/components/app-photo.vue create mode 100644 src/views/tower/machine/detail/components/app-profile-edit.vue create mode 100644 src/views/tower/machine/detail/components/app-profile.vue create mode 100644 src/views/tower/machine/detail/components/app-secret-form.vue create mode 100644 src/views/tower/machine/detail/components/app-task-search.vue create mode 100644 src/views/tower/machine/detail/components/app-task.vue create mode 100644 src/views/tower/machine/detail/components/app-users.vue create mode 100644 src/views/tower/machine/detail/index.vue diff --git a/.env.development b/.env.development index 1af570f..537e29b 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ VITE_APP_NAME=后台管理系统 -VITE_API_URL=http://127.0.0.1:10041/api -#VITE_API_URL=http://1.14.159.185:10041/api +#VITE_API_URL=http://127.0.0.1:10041/api +VITE_API_URL=http://1.14.159.185:10041/api diff --git a/src/api/tower/equipment/index.ts b/src/api/tower/equipment/index.ts index 3d2a343..3ad2d8d 100644 --- a/src/api/tower/equipment/index.ts +++ b/src/api/tower/equipment/index.ts @@ -8,9 +8,7 @@ import type { * 设备数据 */ export async function towerEquipmentData() { - const res = await request.get( - '/tower/tower-equipment/data' - ); + const res = await request.get('/tower/tower-equipment/data'); if (res.data.code === 0) { return res.data.data; } @@ -49,6 +47,16 @@ export async function listTowerEquipment(params?: TowerEquipmentParam) { return Promise.reject(new Error(res.data.message)); } +export async function getTowerEquipment(id: number) { + const res = await request.get>( + '/tower/tower-equipment/' + id + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + /** * 添加设备 */ diff --git a/src/views/passport/login/index.vue b/src/views/passport/login/index.vue index 2c857fb..d855f74 100644 --- a/src/views/passport/login/index.vue +++ b/src/views/passport/login/index.vue @@ -23,18 +23,18 @@ > @@ -111,14 +110,15 @@ } from 'ele-admin-pro/es/ele-pro-table/types'; import { toDateString } from 'ele-admin-pro'; import Search from './components/search.vue'; + import { openUrl } from '@/utils/common'; import EquipmentEdit from './components/equipment-edit.vue'; import { pageTowerEquipment, removeBatchTowerEquipment, towerEquipmentData, + getTowerEquipment, // statusBatchTowerEquipment, - updateBatchTowerEquipment, - updateTowerEquipment + updateBatchTowerEquipment } from '@/api/tower/equipment'; import { TowerEquipment, @@ -310,6 +310,10 @@ }); }; + const openInfo = (record: TowerEquipment) => { + openUrl('/tower/machine/detail/' + record.equipmentId); + }; + /* 自定义行属性 */ const customRow = (record: TowerEquipment) => { return {