diff --git a/src/api/pszc/hrelongatordata90/index.ts b/src/api/pszc/hrelongatordata90/index.ts index b244133..ee6dc32 100644 --- a/src/api/pszc/hrelongatordata90/index.ts +++ b/src/api/pszc/hrelongatordata90/index.ts @@ -9,7 +9,7 @@ export interface HrElongatordata90VO { mname: string } -// 查询热轧90-延伸机列表 +// 查询热轧90-延伸机钢针支数列表 export const getHrElongatordata90Page = async (params) => { if (params.isSearch) { delete params.isSearch @@ -20,6 +20,28 @@ export const getHrElongatordata90Page = async (params) => { } } +// 查询热轧90-延伸机运行时间列表 +export const getHrElongatordata90Page1 = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hrelongatordata90/senior', data }) + } else { + return await request.get({ url: `/pszc/hrelongatordata90/page1`, params }) + } +} + +// 查询热轧90-延伸机轧制时间列表 +export const getHrElongatordata90Page2 = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hrelongatordata90/senior', data }) + } else { + return await request.get({ url: `/pszc/hrelongatordata90/page2`, params }) + } +} + // 查询热轧90-延伸机详情 export const getHrElongatordata90 = async (id: number) => { return await request.get({ url: `/pszc/hrelongatordata90/get?id=` + id }) diff --git a/src/views/pszc/hrelongatordata90/operationtimedata90/hrelongator90data.ts b/src/views/pszc/hrelongatordata90/operationtimedata90/hrelongator90data.ts new file mode 100644 index 0000000..869b1c2 --- /dev/null +++ b/src/views/pszc/hrelongatordata90/operationtimedata90/hrelongator90data.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.selectHr90Pros({flag: '3' , 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/hrelongatordata90/operationtimedata90/index.vue b/src/views/pszc/hrelongatordata90/operationtimedata90/index.vue new file mode 100644 index 0000000..8fe0183 --- /dev/null +++ b/src/views/pszc/hrelongatordata90/operationtimedata90/index.vue @@ -0,0 +1,238 @@ + + + diff --git a/src/views/pszc/hrelongatordata90/rollcountdata90/hrelongator90data.ts b/src/views/pszc/hrelongatordata90/rollcountdata90/hrelongator90data.ts new file mode 100644 index 0000000..f949ce1 --- /dev/null +++ b/src/views/pszc/hrelongatordata90/rollcountdata90/hrelongator90data.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: '3' , type: '1'}) +// 仪器仪表 +const yqbList = await PszcCommonApi.selectHr90Pros({flag: '3' , 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/hrelongatordata90/rollcountdata90/index.vue b/src/views/pszc/hrelongatordata90/rollcountdata90/index.vue new file mode 100644 index 0000000..bef633a --- /dev/null +++ b/src/views/pszc/hrelongatordata90/rollcountdata90/index.vue @@ -0,0 +1,238 @@ + + + diff --git a/src/views/pszc/hrelongatordata90/rolltimedata90/hrelongator90data.ts b/src/views/pszc/hrelongatordata90/rolltimedata90/hrelongator90data.ts new file mode 100644 index 0000000..49cfca1 --- /dev/null +++ b/src/views/pszc/hrelongatordata90/rolltimedata90/hrelongator90data.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: '3' , 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/hrelongatordata90/rolltimedata90/index.vue b/src/views/pszc/hrelongatordata90/rolltimedata90/index.vue new file mode 100644 index 0000000..504bb69 --- /dev/null +++ b/src/views/pszc/hrelongatordata90/rolltimedata90/index.vue @@ -0,0 +1,238 @@ + + +