From d02e873457092df0fcacdc25347aae3c8a2131d9 Mon Sep 17 00:00:00 2001 From: wbc <942429426@qq.com> Date: Tue, 1 Jul 2025 09:50:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AD=90=E7=AB=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/station/device/addModal.vue | 169 ++++++++++++++++++++++++ src/views/station/device/api.ts | 36 ++++++ src/views/station/device/data.ts | 48 +++++++ src/views/station/device/index.vue | 124 ++++++++++++++++++ src/views/station/info/addModal.vue | 179 ++++++++++++++++++++++++++ src/views/station/info/api.ts | 36 ++++++ src/views/station/info/data.ts | 70 ++++++++++ src/views/station/info/index.vue | 124 ++++++++++++++++++ 8 files changed, 786 insertions(+) create mode 100644 src/views/station/device/addModal.vue create mode 100644 src/views/station/device/api.ts create mode 100644 src/views/station/device/data.ts create mode 100644 src/views/station/device/index.vue create mode 100644 src/views/station/info/addModal.vue create mode 100644 src/views/station/info/api.ts create mode 100644 src/views/station/info/data.ts create mode 100644 src/views/station/info/index.vue diff --git a/src/views/station/device/addModal.vue b/src/views/station/device/addModal.vue new file mode 100644 index 0000000..cb5a082 --- /dev/null +++ b/src/views/station/device/addModal.vue @@ -0,0 +1,169 @@ + + + + + diff --git a/src/views/station/device/api.ts b/src/views/station/device/api.ts new file mode 100644 index 0000000..1b81e22 --- /dev/null +++ b/src/views/station/device/api.ts @@ -0,0 +1,36 @@ +import { ID, IDS, commonExport } from '@/api/base'; +import { defHttp } from '@/utils/http/axios'; + +enum Api { + root = '/platform/matrialInfo', + list = '/platform/matrialInfo/list', + tree = '/platform/projectCategoryPoint/queryAll', + export = '/workflow/leave/export', +} + +export function list(params: any) { + return defHttp.get({ url: Api.list, params }); +} +export function tree() { + return defHttp.get({ url: Api.tree }); +} +export function exportExcel(data: any) { + return commonExport(Api.export, data); +} + +export function getInfo(id: ID) { + return defHttp.get({ url: `${Api.root}/${id}` }); +} + +export function add(data: any) { + return defHttp.post({ url: Api.root, data }); +} + +export function update(data: any) { + return defHttp.put({ url: Api.root, data }); +} + +export function removeByIds(ids: IDS) { + return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); +} + diff --git a/src/views/station/device/data.ts b/src/views/station/device/data.ts new file mode 100644 index 0000000..a19a6cd --- /dev/null +++ b/src/views/station/device/data.ts @@ -0,0 +1,48 @@ +import { BasicColumn } from '@/components/Table'; +import { FormSchema } from '@/components/Form'; + +export const formSchemas: FormSchema[] = [ + { + field: 'name', + label: '名称', + component: 'Input', + componentProps: { + placeholder: '请输入', + }, + }, +]; + +export const columns: BasicColumn[] = [ + { + title: '名称', + dataIndex: 'name', + }, + { + title: '规格', + dataIndex: 'standards', + }, + { + title: '单价(元)', + dataIndex: 'price', + }, + { + title: '数量', + dataIndex: 'amount', + }, + { + title: '单位', + dataIndex: 'unit', + }, + { + title: '状态', + dataIndex: 'status', + }, + { + title: '创建日期', + dataIndex: 'createTime', + }, + { + title: '备注', + dataIndex: 'remark', + }, +]; diff --git a/src/views/station/device/index.vue b/src/views/station/device/index.vue new file mode 100644 index 0000000..12bd060 --- /dev/null +++ b/src/views/station/device/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/src/views/station/info/addModal.vue b/src/views/station/info/addModal.vue new file mode 100644 index 0000000..2aef5bf --- /dev/null +++ b/src/views/station/info/addModal.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/src/views/station/info/api.ts b/src/views/station/info/api.ts new file mode 100644 index 0000000..1b81e22 --- /dev/null +++ b/src/views/station/info/api.ts @@ -0,0 +1,36 @@ +import { ID, IDS, commonExport } from '@/api/base'; +import { defHttp } from '@/utils/http/axios'; + +enum Api { + root = '/platform/matrialInfo', + list = '/platform/matrialInfo/list', + tree = '/platform/projectCategoryPoint/queryAll', + export = '/workflow/leave/export', +} + +export function list(params: any) { + return defHttp.get({ url: Api.list, params }); +} +export function tree() { + return defHttp.get({ url: Api.tree }); +} +export function exportExcel(data: any) { + return commonExport(Api.export, data); +} + +export function getInfo(id: ID) { + return defHttp.get({ url: `${Api.root}/${id}` }); +} + +export function add(data: any) { + return defHttp.post({ url: Api.root, data }); +} + +export function update(data: any) { + return defHttp.put({ url: Api.root, data }); +} + +export function removeByIds(ids: IDS) { + return defHttp.deleteWithMsg({ url: `${Api.root}/${ids.join(',')}` }); +} + diff --git a/src/views/station/info/data.ts b/src/views/station/info/data.ts new file mode 100644 index 0000000..6287f1f --- /dev/null +++ b/src/views/station/info/data.ts @@ -0,0 +1,70 @@ +import { BasicColumn } from '@/components/Table'; +import { FormSchema } from '@/components/Form'; + +export const formSchemas: FormSchema[] = [ + { + field: 'area', + label: '所在区域', + component: 'Select', + componentProps: { + options: [], + }, + }, + { + field: 'status', + label: '当前状态', + component: 'Select', + componentProps: { + options: [ + { + value: '正常', + }, + { + value: '预警', + }, + { + value: '报警', + }, + ], + }, + }, +]; + +export const columns: BasicColumn[] = [ + { + title: '子站名称', + dataIndex: 'station', + }, + { + title: '所属区域', + dataIndex: 'area', + }, + { + title: '地址', + dataIndex: 'address', + }, + { + title: '经度', + dataIndex: 'longitude', + }, + { + title: '纬度', + dataIndex: 'latitude', + }, + { + title: '运维公司', + dataIndex: 'ioCompany', + }, + { + title: '运维人员', + dataIndex: 'ioPerson', + }, + { + title: '监理公司', + dataIndex: 'superviseCompany', + }, + { + title: '状态', + dataIndex: 'status', + }, +]; diff --git a/src/views/station/info/index.vue b/src/views/station/info/index.vue new file mode 100644 index 0000000..12bd060 --- /dev/null +++ b/src/views/station/info/index.vue @@ -0,0 +1,124 @@ + + + + +