From f0c60db9a0af308243615f305ee007a2de4a7546 Mon Sep 17 00:00:00 2001
From: songguoqiang <765017469@qq.com>
Date: Wed, 3 Jan 2024 13:24:16 +0800
Subject: [PATCH] =?UTF-8?q?=E7=83=AD=E8=BD=A790=E7=A9=BF=E5=AD=94=E6=9C=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/pszc/hrpuncherdata90/index.ts | 23 +-
src/utils/dict.ts | 4 +-
.../operationtimedata108/index.vue | 2 +-
.../hrPuncherdata90.data.ts | 135 ++++++++++
.../operationtimedata90/index.vue | 238 ++++++++++++++++++
.../rollcountdata90/hrPuncherdata90.data.ts | 135 ++++++++++
.../hrpuncherdata90/rollcountdata90/index.vue | 238 ++++++++++++++++++
.../rolltimedata90/hrPuncherdata90.data.ts | 140 +++++++++++
.../hrpuncherdata90/rolltimedata90/index.vue | 238 ++++++++++++++++++
9 files changed, 1149 insertions(+), 4 deletions(-)
create mode 100644 src/views/pszc/hrpuncherdata90/operationtimedata90/hrPuncherdata90.data.ts
create mode 100644 src/views/pszc/hrpuncherdata90/operationtimedata90/index.vue
create mode 100644 src/views/pszc/hrpuncherdata90/rollcountdata90/hrPuncherdata90.data.ts
create mode 100644 src/views/pszc/hrpuncherdata90/rollcountdata90/index.vue
create mode 100644 src/views/pszc/hrpuncherdata90/rolltimedata90/hrPuncherdata90.data.ts
create mode 100644 src/views/pszc/hrpuncherdata90/rolltimedata90/index.vue
diff --git a/src/api/pszc/hrpuncherdata90/index.ts b/src/api/pszc/hrpuncherdata90/index.ts
index c745b31..8084b80 100644
--- a/src/api/pszc/hrpuncherdata90/index.ts
+++ b/src/api/pszc/hrpuncherdata90/index.ts
@@ -9,7 +9,7 @@ export interface HrPuncherdata90VO {
mname: string
}
-// 查询热轧90-穿孔机列表
+// 查询热轧90-穿孔机列表钢针支数
export const getHrPuncherdata90Page = async (params) => {
if (params.isSearch) {
delete params.isSearch
@@ -19,6 +19,27 @@ export const getHrPuncherdata90Page = async (params) => {
return await request.get({ url: `/pszc/hrpuncherdata90/page`, params })
}
}
+// 查询热轧90-穿孔机列表运行时间
+export const getHrPuncherdata90Page1 = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/pszc/hrpuncherdata90/senior', data })
+ } else {
+ return await request.get({ url: `/pszc/hrpuncherdata90/page1`, params })
+ }
+}
+
+// 查询热轧90-穿孔机列表轧制时间
+export const getHrPuncherdata90Page2 = async (params) => {
+ if (params.isSearch) {
+ delete params.isSearch
+ const data = {...params}
+ return await request.post({ url: '/pszc/hrpuncherdata90/senior', data })
+ } else {
+ return await request.get({ url: `/pszc/hrpuncherdata90/page2`, params })
+ }
+}
// 查询热轧90-穿孔机详情
export const getHrPuncherdata90 = async (id: number) => {
diff --git a/src/utils/dict.ts b/src/utils/dict.ts
index c157b5f..74bc0bf 100644
--- a/src/utils/dict.ts
+++ b/src/utils/dict.ts
@@ -101,10 +101,10 @@ export enum DICT_TYPE {
//===============智能水表统计模块===================
Water_Module = 'Water_Module',
- // ========== 热轧108穿孔机 模块 ==========
+ // ========== 热轧108 模块 ==========
pszc_hr_puncherdata108 ='pszc_hr_puncherdata108',//热轧108运行时间类型
pszc_hr_puncherdata108_roll ='pszc_hr_puncherdata108_roll',//热轧108轧制时间类型
- pszc_hr_puncherdata108_operation ='pszc_hr_puncherdata108_operation',//热轧108穿孔机运行时间下拉组合类型数据由数据库四种类型分为两种类型,数据用逗号分隔
+ pszc_hr_puncherdata108_operation ='pszc_hr_puncherdata108_operation',//热轧108运行时间下拉组合类型数据由数据库四种类型分为两种类型,数据用逗号分隔
// ========== SYSTEM 模块 ==========
diff --git a/src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue b/src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue
index 1d5366f..10dc6a6 100644
--- a/src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue
+++ b/src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue
@@ -28,7 +28,7 @@
v-model:sort="tableObject.sort"
>
-
+
{{ row.iname}}
diff --git a/src/views/pszc/hrpuncherdata90/operationtimedata90/hrPuncherdata90.data.ts b/src/views/pszc/hrpuncherdata90/operationtimedata90/hrPuncherdata90.data.ts
new file mode 100644
index 0000000..5cb1dd9
--- /dev/null
+++ b/src/views/pszc/hrpuncherdata90/operationtimedata90/hrPuncherdata90.data.ts
@@ -0,0 +1,135 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+import { TableColumn } from '@/types/table'
+import * as PszcCommonApi from '@/api/pszc/pszccommon'
+import * as DictApi from '@/utils/dict'
+// 数据点
+//const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1',module:'2'})
+
+const sjdList = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108_operation);
+// 仪器仪表
+const yqbList = await PszcCommonApi.selectHr90Pros({flag: '2' , type: '2'})
+
+// 表单校验
+export const HrPuncherdata90Rules = reactive({
+})
+
+export const HrPuncherdata90 = useCrudSchemas(reactive([
+ {
+ label: '数据点编号',
+ field: 'icode',
+ sort: 'custom',
+ isSearch: false,
+ },
+ {
+ label: '数据点名称',
+ field: 'iname',
+ isTable: true,
+ // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ // return sjdList1.find((obj) => obj.value === cellValue)?.label
+ // },
+ // dictType: DICT_TYPE.pszc_hr_puncherdata108,
+ search: {
+ show: true,
+ component: 'Select',
+ api: () => sjdList,
+ componentProps: {
+ optionsAlias: {
+ labelField: 'label',
+ valueField: 'value'
+ }
+ }
+ },
+ },
+ {
+ label: '采集值',
+ field: 'ivalue',
+ sort: 'custom',
+ isSearch: false,
+ // formatter: (row,column, cellValue) => {
+ // const hourTime = parseInt(time.slice(0,2));
+ // const minuteTime = parseInt(time.slice(3,5));
+ // const secondTime = parseInt(time.slice(6,8));
+ // return hourTime*3600+minuteTime*60+secondTime;
+
+ // },
+ },
+ {
+ label: '仪表的编号',
+ field: 'mcode',
+ sort: 'custom',
+ isSearch: false,
+ },
+ {
+ 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: 'updateTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: false,
+ 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: '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,
+ // table: {
+ // width: 150,
+ // fixed: 'right'
+ // }
+ // }
+]))
diff --git a/src/views/pszc/hrpuncherdata90/operationtimedata90/index.vue b/src/views/pszc/hrpuncherdata90/operationtimedata90/index.vue
new file mode 100644
index 0000000..e736bbf
--- /dev/null
+++ b/src/views/pszc/hrpuncherdata90/operationtimedata90/index.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.iname}}
+
+
+
+
+ {{ timesFormatter(row.ivalue)}}
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pszc/hrpuncherdata90/rollcountdata90/hrPuncherdata90.data.ts b/src/views/pszc/hrpuncherdata90/rollcountdata90/hrPuncherdata90.data.ts
new file mode 100644
index 0000000..b06deb4
--- /dev/null
+++ b/src/views/pszc/hrpuncherdata90/rollcountdata90/hrPuncherdata90.data.ts
@@ -0,0 +1,135 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+import { TableColumn } from '@/types/table'
+import * as PszcCommonApi from '@/api/pszc/pszccommon'
+
+// 数据点
+//const sjdList = await PszcCommonApi.selectHr90Pros({flag: '2' , type: '1'})
+// 仪器仪表
+const yqbList = await PszcCommonApi.selectHr90Pros({flag: '2' , type: '2'})
+
+// 表单校验
+export const HrPuncherdata90Rules = reactive({
+})
+
+export const HrPuncherdata90 = useCrudSchemas(reactive([
+ {
+ label: '数据点编号',
+ field: 'icode',
+ sort: 'custom',
+ isSearch: false,
+ },
+ {
+ label: '数据点名称',
+ field: 'iname',
+ isTable: true,
+ // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ // return sjdList.find((obj) => obj.code === cellValue)?.label
+ // },
+ // search: {
+ // show: true,
+ // 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',
+ isSearch: false,
+ },
+ {
+ label: '仪表的编号',
+ field: 'mcode',
+ sort: 'custom',
+ isSearch: false,
+ },
+ {
+ 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: 'updateTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: false,
+ 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: '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,
+ // table: {
+ // width: 150,
+ // fixed: 'right'
+ // }
+ // }
+]))
diff --git a/src/views/pszc/hrpuncherdata90/rollcountdata90/index.vue b/src/views/pszc/hrpuncherdata90/rollcountdata90/index.vue
new file mode 100644
index 0000000..bf050b4
--- /dev/null
+++ b/src/views/pszc/hrpuncherdata90/rollcountdata90/index.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pszc/hrpuncherdata90/rolltimedata90/hrPuncherdata90.data.ts b/src/views/pszc/hrpuncherdata90/rolltimedata90/hrPuncherdata90.data.ts
new file mode 100644
index 0000000..6f60e97
--- /dev/null
+++ b/src/views/pszc/hrpuncherdata90/rolltimedata90/hrPuncherdata90.data.ts
@@ -0,0 +1,140 @@
+import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
+import { dateFormatter } from '@/utils/formatTime'
+import { TableColumn } from '@/types/table'
+import * as PszcCommonApi from '@/api/pszc/pszccommon'
+import * as DictApi from '@/utils/dict'
+import { number } from 'echarts'
+// 数据点
+// const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1',module:'2'})
+const sjdList = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108_roll);
+// 仪器仪表
+const yqbList = await PszcCommonApi.selectHr90Pros({flag: '2' , type: '2'})
+
+// 表单校验
+export const HrPuncherdata90Rules = reactive({
+})
+
+export const HrPuncherdata90 = useCrudSchemas(reactive([
+ {
+ label: '数据点编号',
+ field: 'icode',
+ sort: 'custom',
+ isSearch: false,
+ },
+ {
+ label: '数据点名称',
+ field: 'iname',
+ isTable: true,
+ // formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
+ // return sjdList.find((obj) => obj.value === cellValue)?.label
+ // },
+ search: {
+ show: true,
+ component: 'Select',
+ api: () => sjdList,
+ componentProps: {
+ optionsAlias: {
+ labelField: 'label',
+ valueField: 'value'
+ }
+ }
+ },
+ form: {
+ component: 'Select',
+ api: () => sjdList,
+ componentProps: {
+ optionsAlias: {
+ labelField: 'label',
+ valueField: 'code'
+ }
+ }
+ }
+ },
+ {
+ label: '采集值',
+ field: 'ivalue',
+ sort: 'custom',
+ isSearch: false,
+ formatter: (row,column,cellValue) => {
+ return cellValue+"秒"
+ },
+ },
+ {
+ label: '仪表的编号',
+ field: 'mcode',
+ sort: 'custom',
+ isSearch: false,
+ },
+ {
+ 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: 'updateTime',
+ sort: 'custom',
+ formatter: dateFormatter,
+ isSearch: false,
+ 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: '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,
+ // table: {
+ // width: 150,
+ // fixed: 'right'
+ // }
+ // }
+]))
diff --git a/src/views/pszc/hrpuncherdata90/rolltimedata90/index.vue b/src/views/pszc/hrpuncherdata90/rolltimedata90/index.vue
new file mode 100644
index 0000000..bd0d649
--- /dev/null
+++ b/src/views/pszc/hrpuncherdata90/rolltimedata90/index.vue
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ timesFormatter(row.ivalue)}}
+
+
+
+
+ {{ row.code }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+