From 2451b2a8f265f04cf6924911f8246349e83d6a3f Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Wed, 17 Apr 2024 14:27:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B0=94=E4=BD=93=E6=A3=80=E6=B5=8B=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6=E7=AE=A1=E7=90=86=E6=A8=A1=E5=9D=97=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pszc/cdgasalarm/index.ts | 50 ++++ src/api/pszc/hrgasalarm108/index.ts | 51 ++++ src/api/pszc/hrgasalarm90/index.ts | 51 ++++ src/api/pszc/pszccommon/index.ts | 2 +- src/views/pszc/cdgasalarm/cdGasalarm.data.ts | 114 +++++++++ src/views/pszc/cdgasalarm/index.vue | 231 ++++++++++++++++++ .../pszc/hrgasalarm108/hrGasalarm.data.ts | 90 +++++++ src/views/pszc/hrgasalarm108/index.vue | 230 +++++++++++++++++ .../pszc/hrgasalarm90/hrGasalarm.data.ts | 90 +++++++ src/views/pszc/hrgasalarm90/index.vue | 230 +++++++++++++++++ 10 files changed, 1138 insertions(+), 1 deletion(-) create mode 100644 src/api/pszc/cdgasalarm/index.ts create mode 100644 src/api/pszc/hrgasalarm108/index.ts create mode 100644 src/api/pszc/hrgasalarm90/index.ts create mode 100644 src/views/pszc/cdgasalarm/cdGasalarm.data.ts create mode 100644 src/views/pszc/cdgasalarm/index.vue create mode 100644 src/views/pszc/hrgasalarm108/hrGasalarm.data.ts create mode 100644 src/views/pszc/hrgasalarm108/index.vue create mode 100644 src/views/pszc/hrgasalarm90/hrGasalarm.data.ts create mode 100644 src/views/pszc/hrgasalarm90/index.vue diff --git a/src/api/pszc/cdgasalarm/index.ts b/src/api/pszc/cdgasalarm/index.ts new file mode 100644 index 0000000..b3101d8 --- /dev/null +++ b/src/api/pszc/cdgasalarm/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface CdGasalarmVO { + icode: string + iname: string + ivalue: string + mcode: string + mname: string +} + +// 查询冷拔气体报警器列表 +export const getCdGasalarmPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/cd-gasalarm/senior', data }) + } else { + return await request.get({ url: `/pszc/cd-gasalarm/page`, params }) + } +} + +// 查询冷拔气体报警器详情 +export const getCdGasalarm = async (id: number) => { + return await request.get({ url: `/pszc/cd-gasalarm/get?id=` + id }) +} + +// 新增冷拔气体报警器 +export const createCdGasalarm = async (data: CdGasalarmVO) => { + return await request.post({ url: `/pszc/cd-gasalarm/create`, data }) +} + +// 修改冷拔气体报警器 +export const updateCdGasalarm = async (data: CdGasalarmVO) => { + return await request.put({ url: `/pszc/cd-gasalarm/update`, data }) +} + +// 删除冷拔气体报警器 +export const deleteCdGasalarm = async (id: number) => { + return await request.delete({ url: `/pszc/cd-gasalarm/delete?id=` + id }) +} + +// 导出冷拔气体报警器 Excel +export const exportCdGasalarm = async (params) => { + return await request.download({ url: `/pszc/cd-gasalarm/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/pszc/cd-gasalarm/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/pszc/hrgasalarm108/index.ts b/src/api/pszc/hrgasalarm108/index.ts new file mode 100644 index 0000000..c2381e4 --- /dev/null +++ b/src/api/pszc/hrgasalarm108/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface HrGasalarmVO { + icode: string + iname: string + ivalue: string + mcode: string + mname: string +} + +// 查询热轧气体报警器列表 +export const getHrGasalarmPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hr-gasalarm/senior', data }) + } else { + params.mcode="108_alarm_001" + return await request.get({ url: `/pszc/hr-gasalarm/page`, params }) + } +} + +// 查询热轧气体报警器详情 +export const getHrGasalarm = async (id: number) => { + return await request.get({ url: `/pszc/hr-gasalarm/get?id=` + id }) +} + +// 新增热轧气体报警器 +export const createHrGasalarm = async (data: HrGasalarmVO) => { + return await request.post({ url: `/pszc/hr-gasalarm/create`, data }) +} + +// 修改热轧气体报警器 +export const updateHrGasalarm = async (data: HrGasalarmVO) => { + return await request.put({ url: `/pszc/hr-gasalarm/update`, data }) +} + +// 删除热轧气体报警器 +export const deleteHrGasalarm = async (id: number) => { + return await request.delete({ url: `/pszc/hr-gasalarm/delete?id=` + id }) +} + +// 导出热轧气体报警器 Excel +export const exportHrGasalarm = async (params) => { + return await request.download({ url: `/pszc/hr-gasalarm/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/pszc/hr-gasalarm/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/pszc/hrgasalarm90/index.ts b/src/api/pszc/hrgasalarm90/index.ts new file mode 100644 index 0000000..2714ba3 --- /dev/null +++ b/src/api/pszc/hrgasalarm90/index.ts @@ -0,0 +1,51 @@ +import request from '@/config/axios' + +export interface HrGasalarmVO { + icode: string + iname: string + ivalue: string + mcode: string + mname: string +} + +// 查询热轧气体报警器列表 +export const getHrGasalarmPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hr-gasalarm/senior', data }) + } else { + params.mcode="90_alarm_001" + return await request.get({ url: `/pszc/hr-gasalarm/page`, params }) + } +} + +// 查询热轧气体报警器详情 +export const getHrGasalarm = async (id: number) => { + return await request.get({ url: `/pszc/hr-gasalarm/get?id=` + id }) +} + +// 新增热轧气体报警器 +export const createHrGasalarm = async (data: HrGasalarmVO) => { + return await request.post({ url: `/pszc/hr-gasalarm/create`, data }) +} + +// 修改热轧气体报警器 +export const updateHrGasalarm = async (data: HrGasalarmVO) => { + return await request.put({ url: `/pszc/hr-gasalarm/update`, data }) +} + +// 删除热轧气体报警器 +export const deleteHrGasalarm = async (id: number) => { + return await request.delete({ url: `/pszc/hr-gasalarm/delete?id=` + id }) +} + +// 导出热轧气体报警器 Excel +export const exportHrGasalarm = async (params) => { + return await request.download({ url: `/pszc/hr-gasalarm/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/pszc/hr-gasalarm/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/pszc/pszccommon/index.ts b/src/api/pszc/pszccommon/index.ts index 06a18ea..801d03a 100644 --- a/src/api/pszc/pszccommon/index.ts +++ b/src/api/pszc/pszccommon/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' // 动态获取下拉数据 -// flag 1 冷拔-步进炉 ;2 冷拔-固熔炉 ; 3 冷拔-缝式炉 ; 4 冷拔-水表 ; 5 冷拔-智能电表 ; 6 冷拔-穿孔机 ; 7 冷拔-天然气总量8 冷拔-拔机9冷拔-退火炉 +// flag 1 冷拔-步进炉 ;2 冷拔-固熔炉 ; 3 冷拔-缝式炉 ; 4 冷拔-水表 ; 5 冷拔-智能电表 ; 6 冷拔-穿孔机 ; 7 冷拔-天然气总量8 冷拔-拔机9冷拔-退火炉10冷拔-气体检测报警管理 // type 1 数据点数据 ; 2 仪表数据 export const selectCdPros = async (params) => { return await request.get({ url: `/pszccommon/selectCdPros`, params }) diff --git a/src/views/pszc/cdgasalarm/cdGasalarm.data.ts b/src/views/pszc/cdgasalarm/cdGasalarm.data.ts new file mode 100644 index 0000000..d1ac6d6 --- /dev/null +++ b/src/views/pszc/cdgasalarm/cdGasalarm.data.ts @@ -0,0 +1,114 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as PszcCommonApi from '@/api/pszc/pszccommon' +import { TableColumn } from '@/types/table' +// 数据点 +const sjdList = await PszcCommonApi.selectCdPros({flag: '10' , type: '1'}) +// 仪器仪表 +const yqbList = await PszcCommonApi.selectCdPros({flag: '10' , type: '2'}) + +// 表单校验 +export const CdGasalarmRules = reactive({ +}) + +export const CdGasalarm = useCrudSchemas(reactive([ + { + label: '数据点编号', + field: 'icode', + sort: 'custom', + }, + { + label: '数据点名称', + field: 'icode', + isSearch:false, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return sjdList.find((obj) => obj.code === cellValue)?.label + }, + search: {//数据有重复暂时不需要查询 + show: false, + component: 'Select', + api: () => sjdList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + }, + form: { + component: 'Select', + api: () => sjdList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + } + }, + { + label: '采集值', + field: 'ivalue', + sort: 'custom', + }, + { + label: '仪表的编号', + field: 'mcode', + sort: 'custom', + }, + { + label: '仪表的名称', + field: 'mcode', + isTable: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return yqbList.find((obj) => obj.code === cellValue)?.label + }, + search: { + show: true, + component: 'Select', + api: () => yqbList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + }, + form: { + component: 'Select', + api: () => yqbList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + isTable:false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/pszc/cdgasalarm/index.vue b/src/views/pszc/cdgasalarm/index.vue new file mode 100644 index 0000000..79526eb --- /dev/null +++ b/src/views/pszc/cdgasalarm/index.vue @@ -0,0 +1,231 @@ + + + diff --git a/src/views/pszc/hrgasalarm108/hrGasalarm.data.ts b/src/views/pszc/hrgasalarm108/hrGasalarm.data.ts new file mode 100644 index 0000000..2642881 --- /dev/null +++ b/src/views/pszc/hrgasalarm108/hrGasalarm.data.ts @@ -0,0 +1,90 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as PszcCommonApi from '@/api/pszc/pszccommon' +import { TableColumn } from '@/types/table' +// 数据点 +const sjdList = await PszcCommonApi.selectCdPros({flag: '12' , type: '1'}) +// 仪器仪表 +const yqbList = await PszcCommonApi.selectCdPros({flag: '12' , type: '2'}) + +// 表单校验 +export const HrGasalarmRules = reactive({ +}) + +export const HrGasalarm = useCrudSchemas(reactive([ + { + label: '数据点编号', + field: 'icode', + sort: 'custom', + }, + { + label: '数据点名称', + field: 'iname', + sort: 'custom', + }, + { + label: '采集值', + field: 'ivalue', + sort: 'custom', + }, + { + label: '仪表的编号', + field: 'mcode', + sort: 'custom', + }, + { + label: '仪表的名称', + field: 'mcode', + isTable: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return yqbList.find((obj) => obj.code === cellValue)?.label + }, + search: { + show: true, + component: 'Select', + api: () => yqbList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + }, + form: { + component: 'Select', + api: () => yqbList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + isTable:false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/pszc/hrgasalarm108/index.vue b/src/views/pszc/hrgasalarm108/index.vue new file mode 100644 index 0000000..566ed5b --- /dev/null +++ b/src/views/pszc/hrgasalarm108/index.vue @@ -0,0 +1,230 @@ + + + diff --git a/src/views/pszc/hrgasalarm90/hrGasalarm.data.ts b/src/views/pszc/hrgasalarm90/hrGasalarm.data.ts new file mode 100644 index 0000000..e256469 --- /dev/null +++ b/src/views/pszc/hrgasalarm90/hrGasalarm.data.ts @@ -0,0 +1,90 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' +import * as PszcCommonApi from '@/api/pszc/pszccommon' +import { TableColumn } from '@/types/table' +// 数据点 +const sjdList = await PszcCommonApi.selectCdPros({flag: '11' , type: '1'}) +// 仪器仪表 +const yqbList = await PszcCommonApi.selectCdPros({flag: '11' , type: '2'}) + +// 表单校验 +export const HrGasalarmRules = reactive({ +}) + +export const HrGasalarm = useCrudSchemas(reactive([ + { + label: '数据点编号', + field: 'icode', + sort: 'custom', + }, + { + label: '数据点名称', + field: 'iname', + sort: 'custom', + }, + { + label: '采集值', + field: 'ivalue', + sort: 'custom', + }, + { + label: '仪表的编号', + field: 'mcode', + sort: 'custom', + }, + { + label: '仪表的名称', + field: 'mcode', + isTable: true, + formatter: (_: Recordable, __: TableColumn, cellValue: number) => { + return yqbList.find((obj) => obj.code === cellValue)?.label + }, + search: { + show: true, + component: 'Select', + api: () => yqbList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + }, + form: { + component: 'Select', + api: () => yqbList, + componentProps: { + optionsAlias: { + labelField: 'label', + valueField: 'code' + } + } + } + }, + { + label: '创建时间', + field: 'createTime', + sort: 'custom', + formatter: dateFormatter, + isSearch: true, + search: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD HH:mm:ss', + type: 'daterange', + defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] + } + }, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + isTable:false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/pszc/hrgasalarm90/index.vue b/src/views/pszc/hrgasalarm90/index.vue new file mode 100644 index 0000000..df8b888 --- /dev/null +++ b/src/views/pszc/hrgasalarm90/index.vue @@ -0,0 +1,230 @@ + + +