From f07811a84dcbbb06b2cb76cef6138912cf5eb00d Mon Sep 17 00:00:00 2001 From: songguoqiang <765017469@qq.com> Date: Wed, 3 Jan 2024 15:08:56 +0800 Subject: [PATCH] =?UTF-8?q?=E7=83=AD=E8=BD=A7108=E5=BB=B6=E4=BC=B8?= =?UTF-8?q?=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/pszc/hrelongatordata108/index.ts | 24 +- .../hrelongator108data.ts | 135 ++++++++++ .../operationtimedata108/index.vue | 238 ++++++++++++++++++ .../rollcountdata108/hrelongator108data.ts | 135 ++++++++++ .../rollcountdata108/index.vue | 228 +++++++++++++++++ .../rolltimedata108/hrelongator108data.ts | 140 +++++++++++ .../rolltimedata108/index.vue | 238 ++++++++++++++++++ 7 files changed, 1137 insertions(+), 1 deletion(-) create mode 100644 src/views/pszc/hrelongatordata108/operationtimedata108/hrelongator108data.ts create mode 100644 src/views/pszc/hrelongatordata108/operationtimedata108/index.vue create mode 100644 src/views/pszc/hrelongatordata108/rollcountdata108/hrelongator108data.ts create mode 100644 src/views/pszc/hrelongatordata108/rollcountdata108/index.vue create mode 100644 src/views/pszc/hrelongatordata108/rolltimedata108/hrelongator108data.ts create mode 100644 src/views/pszc/hrelongatordata108/rolltimedata108/index.vue diff --git a/src/api/pszc/hrelongatordata108/index.ts b/src/api/pszc/hrelongatordata108/index.ts index 2bb637e..2e13411 100644 --- a/src/api/pszc/hrelongatordata108/index.ts +++ b/src/api/pszc/hrelongatordata108/index.ts @@ -9,7 +9,7 @@ export interface HrElongatordata108VO { mname: string } -// 查询热轧108-延伸机列表 +// 查询热轧108-延伸机钢针支数列表 export const getHrElongatordata108Page = async (params) => { if (params.isSearch) { delete params.isSearch @@ -20,6 +20,28 @@ export const getHrElongatordata108Page = async (params) => { } } +// 查询热轧108-延伸机运行时间列表 +export const getHrElongatordata108Page1 = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hrelongatordata108/senior', data }) + } else { + return await request.get({ url: `/pszc/hrelongatordata108/page1`, params }) + } +} + +// 查询热轧108-延伸机轧制时间列表 +export const getHrElongatordata108Page2 = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hrelongatordata108/senior', data }) + } else { + return await request.get({ url: `/pszc/hrelongatordata108/page2`, params }) + } +} + // 查询热轧108-延伸机详情 export const getHrElongatordata108 = async (id: number) => { return await request.get({ url: `/pszc/hrelongatordata108/get?id=` + id }) diff --git a/src/views/pszc/hrelongatordata108/operationtimedata108/hrelongator108data.ts b/src/views/pszc/hrelongatordata108/operationtimedata108/hrelongator108data.ts new file mode 100644 index 0000000..720e7d0 --- /dev/null +++ b/src/views/pszc/hrelongatordata108/operationtimedata108/hrelongator108data.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 sjdList1 = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108); +const sjdList = DictApi.getStrDictOptions(DICT_TYPE.pszc_hr_puncherdata108_operation); +// 仪器仪表 +const yqbList = await PszcCommonApi.selectHr108Pros({flag: '4' , type: '2'})//延伸机 + +// 表单校验 +export const HrPuncherdata108Rules = reactive({ +}) + +export const HrPuncherdata108 = 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/hrelongatordata108/operationtimedata108/index.vue b/src/views/pszc/hrelongatordata108/operationtimedata108/index.vue new file mode 100644 index 0000000..5a9a593 --- /dev/null +++ b/src/views/pszc/hrelongatordata108/operationtimedata108/index.vue @@ -0,0 +1,238 @@ + + + diff --git a/src/views/pszc/hrelongatordata108/rollcountdata108/hrelongator108data.ts b/src/views/pszc/hrelongatordata108/rollcountdata108/hrelongator108data.ts new file mode 100644 index 0000000..1c7f17f --- /dev/null +++ b/src/views/pszc/hrelongatordata108/rollcountdata108/hrelongator108data.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.selectHr108Pros({flag: '4' , type: '1'}) +// 仪器仪表 +const yqbList = await PszcCommonApi.selectHr108Pros({flag: '4' , type: '2'}) + +// 表单校验 +export const HrPuncherdata108Rules = reactive({ +}) + +export const HrPuncherdata108 = 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/hrelongatordata108/rollcountdata108/index.vue b/src/views/pszc/hrelongatordata108/rollcountdata108/index.vue new file mode 100644 index 0000000..e62c190 --- /dev/null +++ b/src/views/pszc/hrelongatordata108/rollcountdata108/index.vue @@ -0,0 +1,228 @@ + + + diff --git a/src/views/pszc/hrelongatordata108/rolltimedata108/hrelongator108data.ts b/src/views/pszc/hrelongatordata108/rolltimedata108/hrelongator108data.ts new file mode 100644 index 0000000..a337407 --- /dev/null +++ b/src/views/pszc/hrelongatordata108/rolltimedata108/hrelongator108data.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.selectHr108Pros({flag: '3' , type: '2'}) + +// 表单校验 +export const HrPuncherdata108Rules = reactive({ +}) + +export const HrPuncherdata108 = 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/hrelongatordata108/rolltimedata108/index.vue b/src/views/pszc/hrelongatordata108/rolltimedata108/index.vue new file mode 100644 index 0000000..df490d5 --- /dev/null +++ b/src/views/pszc/hrelongatordata108/rolltimedata108/index.vue @@ -0,0 +1,238 @@ + + +