From aa56030cbd67a93b5dfbe45a6e976ff42a4a13b5 Mon Sep 17 00:00:00 2001 From: gxwebsoft Date: Sun, 25 Feb 2024 19:33:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=EF=BC=9A=E4=BF=9D=E5=85=BB?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=92=8C=E5=8E=82=E5=86=85=E7=BB=B4=E4=BF=AE?= =?UTF-8?q?=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/tower/accessory/model/index.ts | 68 +- src/api/tower/security-plant/index.ts | 109 +++ src/api/tower/security-plant/model/index.ts | 39 ++ src/api/tower/security-record/model/index.ts | 6 + src/api/tower/security/model/index.ts | 6 +- .../TowerAccessory/components/select-data.vue | 157 +++++ src/components/TowerAccessory/index.vue | 61 ++ src/views/tower/accessory/index.vue | 626 +++++++++--------- .../components/security-plant-edit.vue | 237 +++++++ .../maintenance/security-plant/index.vue | 251 +++++++ .../components/security-record-edit.vue | 83 ++- .../maintenance/security-record/index.vue | 60 +- .../security/components/security-edit.vue | 99 ++- .../tower/maintenance/security/index.vue | 34 +- .../tower/maintenance/security2/index.vue | 2 +- 16 files changed, 1442 insertions(+), 400 deletions(-) create mode 100644 src/api/tower/security-plant/index.ts create mode 100644 src/api/tower/security-plant/model/index.ts create mode 100644 src/components/TowerAccessory/components/select-data.vue create mode 100644 src/components/TowerAccessory/index.vue create mode 100644 src/views/tower/maintenance/security-plant/components/security-plant-edit.vue create mode 100644 src/views/tower/maintenance/security-plant/index.vue diff --git a/.env.development b/.env.development index 537e29b..1af570f 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/accessory/model/index.ts b/src/api/tower/accessory/model/index.ts index 367d63e..d48a655 100644 --- a/src/api/tower/accessory/model/index.ts +++ b/src/api/tower/accessory/model/index.ts @@ -1,43 +1,43 @@ -import type { PageParam } from "@/api"; -import { Dayjs } from "dayjs"; +import type { PageParam } from '@/api'; +import { Dayjs } from 'dayjs'; export interface Accessory { - accessoryId?: undefined; - accessoryName?: string; - accessoryNo?: string; - accessoryCategory?: object; - accessoryModel?: string; - accessoryModelMultiple?: string[]; - accessorySpecs?: string; - accessoryPrice?: number; - accessoryNum?: number; - accessoryUnit?: string; - accessoryStock?: string; - companyNo?: string; - companyName?: string; - manufactor?: string; - manufactorNo?: string; - accessoryWeight?: string; - lifeYear?: number; - factoryDate?: string; - scrapDate?: string; - status?: number; - comments?: string; - sortNumber?: number; - userId?: number; - deleted?: number; - tenantId?: number; - createTime?: string; - updateTime?: string; - buyDate?: string | Dayjs; + accessoryId?: undefined; + accessoryName?: string; + accessoryNo?: string; + accessoryCategory?: object; + accessoryModel?: string; + accessoryModelMultiple?: string[]; + accessorySpecs?: string; + accessoryPrice?: number; + accessoryNum?: number; + accessoryUnit?: string; + accessoryStock?: string; + companyNo?: string; + companyName?: string; + manufactor?: string; + manufactorNo?: string; + accessoryWeight?: string; + lifeYear?: number; + factoryDate?: string; + scrapDate?: string; + status?: number; + comments?: string; + sortNumber?: number; + userId?: number; + deleted?: number; + tenantId?: number; + createTime?: string; + updateTime?: string; + buyDate?: string | Dayjs; } /** * 搜索条件 */ export interface AccessoryParam extends PageParam { - accessoryId?: number; - accessoryName?: string; - status?: number; - keywords?: string; + accessoryId?: number; + accessoryName?: string; + status?: number; + keywords?: string; } diff --git a/src/api/tower/security-plant/index.ts b/src/api/tower/security-plant/index.ts new file mode 100644 index 0000000..e2b4365 --- /dev/null +++ b/src/api/tower/security-plant/index.ts @@ -0,0 +1,109 @@ +import request from '@/utils/request'; +import type { ApiResult, PageResult } from '@/api'; +import type { + SecurityPlant, + SecurityPlantParam +} from '@/api/tower/security-plant/model'; + +/** + * 分页查询仓库 + */ +export async function pageSecurityPlant(params: SecurityPlantParam) { + const res = await request.get>>( + '/tower/tower-security-plant/page', + { + params + } + ); + if (res.data.code === 0) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 查询仓库列表 + */ +export async function listSecurityPlant(params?: SecurityPlantParam) { + const res = await request.get>( + '/tower/tower-security-plant', + { + params + } + ); + if (res.data.code === 0 && res.data.data) { + return res.data.data; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 添加仓库 + */ +export async function addSecurityPlant(data: SecurityPlant) { + const res = await request.post>( + '/tower/tower-security-plant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 修改仓库 + */ +export async function updateSecurityPlant(data: SecurityPlant) { + const res = await request.put>( + '/tower/tower-security-plant', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 绑定仓库 + */ +export async function bindSecurityPlant(data: SecurityPlant) { + const res = await request.put>( + '/tower/tower-security-plant/bind', + data + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 删除仓库 + */ +export async function removeSecurityPlant(id?: number) { + const res = await request.delete>( + '/tower/tower-security-plant/' + id + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} + +/** + * 批量删除仓库 + */ +export async function removeBatchSecurityPlant(data: (number | undefined)[]) { + const res = await request.delete>( + '/tower/tower-security-plant/batch', + { + data + } + ); + if (res.data.code === 0) { + return res.data.message; + } + return Promise.reject(new Error(res.data.message)); +} diff --git a/src/api/tower/security-plant/model/index.ts b/src/api/tower/security-plant/model/index.ts new file mode 100644 index 0000000..870a7d9 --- /dev/null +++ b/src/api/tower/security-plant/model/index.ts @@ -0,0 +1,39 @@ +import type { PageParam } from '@/api'; + +export interface SecurityPlant { + securityPlantId?: number; + securityId?: number; + projectName?: string; + projectId?: number; + securityCode?: string; + regionName?: string; + longitude?: string; + latitude?: string; + country?: string; + province?: string; + city?: string; + region?: string; + address?: string; + status?: number; + confirmStatus?: number; + userId?: number; + confirmId?: number; + comments?: string; + sortNumber?: number; + accessoryName?: string; + accessoryCategory?: object; + accessoryNo?: string; + accessorySpecs?: string; + accessoryModel?: string; +} + +/** + * 搜索条件 + */ +export interface SecurityPlantParam extends PageParam { + securityId?: number; + projectId?: number; + projectName?: string; + status?: number; + keywords?: string; +} diff --git a/src/api/tower/security-record/model/index.ts b/src/api/tower/security-record/model/index.ts index 961e091..6709db1 100644 --- a/src/api/tower/security-record/model/index.ts +++ b/src/api/tower/security-record/model/index.ts @@ -2,6 +2,7 @@ import type { PageParam } from '@/api'; export interface SecurityRecord { securityRecordId?: number; + securityId?: number; projectName?: string; projectId?: number; securityCode?: string; @@ -17,6 +18,11 @@ export interface SecurityRecord { userId?: number; comments?: string; sortNumber?: number; + accessoryName?: string; + accessoryCategory?: object; + accessoryNo?: string; + accessorySpecs?: string; + accessoryModel?: string; } /** diff --git a/src/api/tower/security/model/index.ts b/src/api/tower/security/model/index.ts index 727166f..20b0ba9 100644 --- a/src/api/tower/security/model/index.ts +++ b/src/api/tower/security/model/index.ts @@ -1,7 +1,7 @@ import type { PageParam } from '@/api'; export interface Security { - type: number; + type?: number; securityId?: number; projectName?: string; projectId?: number; @@ -22,6 +22,10 @@ export interface Security { userId?: number; comments?: string; sortNumber?: number; + accessoryNo?: string; + accessoryCategory?: object; + accessoryModel?: string; + accessorySpecs?: string; } /** diff --git a/src/components/TowerAccessory/components/select-data.vue b/src/components/TowerAccessory/components/select-data.vue new file mode 100644 index 0000000..bdd3065 --- /dev/null +++ b/src/components/TowerAccessory/components/select-data.vue @@ -0,0 +1,157 @@ + + + + diff --git a/src/components/TowerAccessory/index.vue b/src/components/TowerAccessory/index.vue new file mode 100644 index 0000000..b4d482c --- /dev/null +++ b/src/components/TowerAccessory/index.vue @@ -0,0 +1,61 @@ + + + diff --git a/src/views/tower/accessory/index.vue b/src/views/tower/accessory/index.vue index 7b7d8d2..a2a3350 100644 --- a/src/views/tower/accessory/index.vue +++ b/src/views/tower/accessory/index.vue @@ -1,406 +1,406 @@ diff --git a/src/views/tower/maintenance/security-plant/components/security-plant-edit.vue b/src/views/tower/maintenance/security-plant/components/security-plant-edit.vue new file mode 100644 index 0000000..e445964 --- /dev/null +++ b/src/views/tower/maintenance/security-plant/components/security-plant-edit.vue @@ -0,0 +1,237 @@ + + + + + + diff --git a/src/views/tower/maintenance/security-plant/index.vue b/src/views/tower/maintenance/security-plant/index.vue new file mode 100644 index 0000000..fa99885 --- /dev/null +++ b/src/views/tower/maintenance/security-plant/index.vue @@ -0,0 +1,251 @@ + + + + + diff --git a/src/views/tower/maintenance/security-record/components/security-record-edit.vue b/src/views/tower/maintenance/security-record/components/security-record-edit.vue index 0f45eaf..668b2e4 100644 --- a/src/views/tower/maintenance/security-record/components/security-record-edit.vue +++ b/src/views/tower/maintenance/security-record/components/security-record-edit.vue @@ -1,10 +1,10 @@ -