diff --git a/src/api/pszc/hrpuncherdata108/index.ts b/src/api/pszc/hrpuncherdata108/index.ts index aba078f..d744f72 100644 --- a/src/api/pszc/hrpuncherdata108/index.ts +++ b/src/api/pszc/hrpuncherdata108/index.ts @@ -9,7 +9,7 @@ export interface HrPuncherdata108VO { mname: string } -// 查询热轧108-穿孔机列表 +// 查询热轧108-穿孔机钢针计数列表 export const getHrPuncherdata108Page = async (params) => { if (params.isSearch) { delete params.isSearch @@ -19,6 +19,26 @@ export const getHrPuncherdata108Page = async (params) => { return await request.get({ url: `/pszc/hrpuncherdata108/page`, params }) } } +// 查询热轧108-穿孔机运行时间列表 +export const getHrPuncherdata108Page1 = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hrpuncherdata108/senior', data }) + } else { + return await request.get({ url: `/pszc/hrpuncherdata108/page1`, params }) + } +} +// 查询热轧108-穿孔机轧制时间列表 +export const getHrPuncherdata108Page2 = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/pszc/hrpuncherdata108/senior', data }) + } else { + return await request.get({ url: `/pszc/hrpuncherdata108/page2`, params }) + } +} // 查询热轧108-穿孔机详情 export const getHrPuncherdata108 = async (id: number) => { diff --git a/src/api/tjanalysis/index.ts b/src/api/tjanalysis/index.ts index 9ec7a18..4ebd415 100644 --- a/src/api/tjanalysis/index.ts +++ b/src/api/tjanalysis/index.ts @@ -49,3 +49,8 @@ export const queryWaterDay = async (params) => { export const queryXcqtyDay = async (params) => { return await request.get({ url: `/tjanalysis/queryXcqtyDay`, params}) } + +// 获取热轧穿孔机日统计报表 +export const queryHrpuncherDay = async (params) => { + return await request.get({ url: `/tjanalysis/queryHrpuncherDay`, params }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 3d129b9..59ee2d3 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -99,6 +99,12 @@ export enum DICT_TYPE { SYSTEM_TENANT_PACKAGE_ID = 'system_tenant_package_id', TERMINAL = 'terminal', // 终端 + // ========== 热轧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穿孔机运行时间下拉组合类型数据由数据库四种类型分为两种类型,数据用逗号分隔 + + // ========== SYSTEM 模块 ========== SYSTEM_USER_SEX = 'system_user_sex', SYSTEM_MENU_TYPE = 'system_menu_type', diff --git a/src/views/pszc/hrpuncherdata108/hrPuncherdata108.data.ts b/src/views/pszc/hrpuncherdata108/hrPuncherdata108.data.ts index 4d2ea33..71d815e 100644 --- a/src/views/pszc/hrpuncherdata108/hrPuncherdata108.data.ts +++ b/src/views/pszc/hrpuncherdata108/hrPuncherdata108.data.ts @@ -2,8 +2,12 @@ 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 '@/api/system/dict/dict.data' + // 数据点 -const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1'}) +const sjdList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '1',module:'2'}) +debugger +const ll = DICT_TYPE.pszc_hr_puncherdata108 // 仪器仪表 const yqbList = await PszcCommonApi.selectHr108Pros({flag: '3' , type: '2'}) @@ -90,7 +94,7 @@ export const HrPuncherdata108 = useCrudSchemas(reactive([ }, { label: '开始时间', - field: 'createTime', + field: 'updateTime', sort: 'custom', formatter: dateFormatter, isSearch: true, @@ -106,7 +110,7 @@ export const HrPuncherdata108 = useCrudSchemas(reactive([ }, { label: '结束时间', - field: 'updateTime', + field: 'createTime', sort: 'custom', formatter: dateFormatter, isSearch: true, @@ -120,6 +124,7 @@ export const HrPuncherdata108 = useCrudSchemas(reactive([ }, isForm: false, } + // , // { // label: '操作', diff --git a/src/views/pszc/hrpuncherdata108/operationtimedata108/hrPuncherdata108.data.ts b/src/views/pszc/hrpuncherdata108/operationtimedata108/hrPuncherdata108.data.ts new file mode 100644 index 0000000..ed53984 --- /dev/null +++ b/src/views/pszc/hrpuncherdata108/operationtimedata108/hrPuncherdata108.data.ts @@ -0,0 +1,128 @@ +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: '3' , type: '2'}) + +// 表单校验 +export const HrPuncherdata108Rules = reactive({ +}) + +export const HrPuncherdata108 = useCrudSchemas(reactive([ + { + label: '数据点编号', + field: 'icode', + sort: 'custom', + isSearch: false, + }, + { + label: '数据点名称', + field: 'icode', + 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, + }, + { + 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/hrpuncherdata108/operationtimedata108/index.vue b/src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue new file mode 100644 index 0000000..9fe555a --- /dev/null +++ b/src/views/pszc/hrpuncherdata108/operationtimedata108/index.vue @@ -0,0 +1,221 @@ + + + diff --git a/src/views/pszc/hrpuncherdata108/rollcountdata108/hrPuncherdata108.data.ts b/src/views/pszc/hrpuncherdata108/rollcountdata108/hrPuncherdata108.data.ts new file mode 100644 index 0000000..afa9fb6 --- /dev/null +++ b/src/views/pszc/hrpuncherdata108/rollcountdata108/hrPuncherdata108.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.selectHr108Pros({flag: '3' , type: '1'}) +// 仪器仪表 +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: 'icode', + 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/hrpuncherdata108/rollcountdata108/index.vue b/src/views/pszc/hrpuncherdata108/rollcountdata108/index.vue new file mode 100644 index 0000000..ca858b4 --- /dev/null +++ b/src/views/pszc/hrpuncherdata108/rollcountdata108/index.vue @@ -0,0 +1,211 @@ + + + diff --git a/src/views/pszc/hrpuncherdata108/rolltimedata108/hrPuncherdata108.data.ts b/src/views/pszc/hrpuncherdata108/rolltimedata108/hrPuncherdata108.data.ts new file mode 100644 index 0000000..de008b2 --- /dev/null +++ b/src/views/pszc/hrpuncherdata108/rolltimedata108/hrPuncherdata108.data.ts @@ -0,0 +1,136 @@ +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_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: 'icode', + 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, + }, + { + 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/hrpuncherdata108/rolltimedata108/index.vue b/src/views/pszc/hrpuncherdata108/rolltimedata108/index.vue new file mode 100644 index 0000000..4c6e222 --- /dev/null +++ b/src/views/pszc/hrpuncherdata108/rolltimedata108/index.vue @@ -0,0 +1,230 @@ + + + diff --git a/src/views/report/goview/index.vue b/src/views/report/goview/index.vue index d5be8d7..ff47e49 100644 --- a/src/views/report/goview/index.vue +++ b/src/views/report/goview/index.vue @@ -6,6 +6,6 @@ diff --git a/src/views/tjanalysis/rzcjinfo/index.vue b/src/views/tjanalysis/hrpuncherdata/index.vue similarity index 82% rename from src/views/tjanalysis/rzcjinfo/index.vue rename to src/views/tjanalysis/hrpuncherdata/index.vue index 131b23e..6179a9b 100644 --- a/src/views/tjanalysis/rzcjinfo/index.vue +++ b/src/views/tjanalysis/hrpuncherdata/index.vue @@ -10,8 +10,8 @@ type="date" /> - - + + -
一次计量:
一九八六年五月三日安全运行({{ dataList.days }})天
+
{{names}}
@@ -49,7 +49,7 @@ import * as TjanalysisApi from '@/api/tjanalysis' import { formatDate } from '@/utils/formatTime' -defineOptions({ name: 'Rzcjinfo' }) +defineOptions({ name: 'HrPuncherData' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -58,16 +58,16 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const loading = ref(true) -const dataList = reactive({dList: [] , days: 0}) - +const dataList = ref([]) +const names = ref("热轧108穿孔"); const queryParams = reactive({ date: formatDate(new Date() , 'YYYY-MM-DD'), flag: '1' }) const types = reactive({flagList: [ - {name: '热轧108延伸' , value: '1'}, - {name: '热轧90延伸' , value: '2'} + {name: '热轧108穿孔' , value: '1'}, + {name: '热轧90穿孔' , value: '2'} ]}) const handleQuery = async () => { @@ -80,13 +80,15 @@ const resetQuery = async () => { } const getList = async () => { - const res = await TjanalysisApi.queryIrealdataTj(queryParams) - if (res != null && res.trList != null) { - dataList.days = res.days - dataList.dList = [] - dataList.dList = res.trList - } + const res = await TjanalysisApi.queryHrpuncherDay(queryParams) + dataList.value = res.dataList loading.value = false + if(queryParams.flag=='1'){ + names.value = "热轧108穿孔" + }else{ + names.value = "热轧90穿孔" + } + } function arraySpanMethod ({ row, column, rowIndex, columnIndex }) {