diff --git a/src/api/basedata/marketplaceData/index.ts b/src/api/basedata/marketplaceData/index.ts new file mode 100644 index 0000000..3e71444 --- /dev/null +++ b/src/api/basedata/marketplaceData/index.ts @@ -0,0 +1,57 @@ +import request from '@/config/axios' + +export interface MarketplaceDataVO { + id: number + type: string + name: string + describes: string + price: number + amountIncrease: string + field1: string + field2: string + field3: string + field4: string + available: string + concurrencyStamp: number +} + +// 查询市场数据管理列表 +export const getMarketplaceDataPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/basic/marketplace-data/senior', data }) + } else { + return await request.get({ url: `/basic/marketplace-data/page`, params }) + } +} + +// 查询市场数据管理详情 +export const getMarketplaceData = async (id: number) => { + return await request.get({ url: `/basic/marketplace-data/get?id=` + id }) +} + +// 新增市场数据管理 +export const createMarketplaceData = async (data: MarketplaceDataVO) => { + return await request.post({ url: `/basic/marketplace-data/create`, data }) +} + +// 修改市场数据管理 +export const updateMarketplaceData = async (data: MarketplaceDataVO) => { + return await request.put({ url: `/basic/marketplace-data/update`, data }) +} + +// 删除市场数据管理 +export const deleteMarketplaceData = async (id: number) => { + return await request.delete({ url: `/basic/marketplace-data/delete?id=` + id }) +} + +// 导出市场数据管理 Excel +export const exportMarketplaceData = async (params) => { + return await request.download({ url: `/basic/marketplace-data/export-excel`, params }) +} + +// 下载导入模板 +export const importTemplate = () => { + return request.download({ url: '/basic/marketplace-data/get-import-template' }) +} \ No newline at end of file diff --git a/src/api/tjanalysis/index.ts b/src/api/tjanalysis/index.ts index e4414aa..38beeb1 100644 --- a/src/api/tjanalysis/index.ts +++ b/src/api/tjanalysis/index.ts @@ -5,11 +5,31 @@ export const queryIrealdataTj = async (params) => { return await request.get({ url: `/tjanalysis/queryIrealdataTj`, params }) } +// 导出一次主表日统计报表 +export const exportIrealdataTj = async (params) => { + return await request.download({ url: `/tjanalysis/exportIrealdataTj`, params}) +} + +// 获取一次主表时间范围统计报表数据 +export const queryIrealdataTimeTj = async (params) => { + return await request.get({ url: `/tjanalysis/queryIrealdataTimeTj`, params }) +} + +// 导出一次主表时间范围统计报表数据 +export const exportIrealdataTimeTj = async (params) => { + return await request.download({ url: `/tjanalysis/exportIrealdataTimeTj`, params }) +} + // 获取智能电表日统计报表数据 export const queryElectricdataTj = async (params) => { return await request.get({ url: `/tjanalysis/queryElectricdataTj`, params }) } +// 导出智能电表日统计报表数据数据 +export const exportElectricdataTj = async (params) => { + return await request.download({ url: `/tjanalysis/exportElectricdataTj`, params }) +} + // 获取地衡数据统计 export const queryTjPlatScales = async (params) => { return await request.get({ url: `/tjanalysis/queryTjPlatScales`, params }) @@ -25,6 +45,11 @@ export const queryNatgasdatatotal = async (params) => { return await request.get({ url: `/tjanalysis/queryNatgasdatatotal`, params }) } +// 导出天然气总流量日统计 +export const exportNatgasDataTotal = async (params) => { + return await request.download({ url: `/tjanalysis/exportNatgasDataTotal`, params }) +} + // 智能报表统计 export const queryElectricdataAllTj = async (params) => { return await request.get({ url: `/tjanalysis/queryElectricdataAllTj`, params }) @@ -40,16 +65,31 @@ export const queryNatgasDatacdDay = async (params) => { return await request.get({ url: `/tjanalysis/queryNatgasDatacdDay`, params}) } +// 导出冷拔天然气数据日统计报表 +export const exportNatgasDatacdDay = async (params) => { + return await request.download({ url: `/tjanalysis/exportNatgasDatacdDay`, params}) +} + // 热轧天然气数据日统计报表 export const queryNatgasdataDay = async (params) => { return await request.get({ url: `/tjanalysis/queryNatgasdataDay`, params}) } +// 导出热轧天然气数据日统计报表 +export const exportNatgasDataDay = async (params) => { + return await request.download({ url: `/tjanalysis/exportNatgasDataDay`, params}) +} + // 智能水表数据日统计表 export const queryWaterDay = async (params) => { return await request.get({ url: `/tjanalysis/queryWaterDay`, params}) } +// 导出智能水表数据日统计表 +export const exportWaterDay = async (params) => { + return await request.download({ url: `/tjanalysis/exportWaterDay`, params}) +} + // 冷拔-拔机日统计报表 export const queryXcqtyDay = async (params) => { return await request.get({ url: `/tjanalysis/queryXcqtyDay`, params}) @@ -60,13 +100,38 @@ export const queryHrpuncherDay = async (params) => { return await request.get({ url: `/tjanalysis/queryHrpuncherDay`, params }) } +// 导出热轧穿孔机日统计报表 +export const exportHrpuncherDay = async (params) => { + return await request.download({ url: `/tjanalysis/exportHrpuncherDay`, params }) +} + // 获取热轧延伸机日统计报表 export const queryRzcjinfoDay = async (params) => { return await request.get({ url: `/tjanalysis/queryRzcjinfoDay`, params }) } +// 导出热轧延伸机日统计报表 +export const exportRzcjinfoDay = async (params) => { + return await request.download({ url: `/tjanalysis/exportRzcjinfoDay`, params }) +} + // 获取热轧定经机日统计报表 export const querySizingmillDay = async (params) => { return await request.get({ url: `/tjanalysis/querySizingmillDay`, params }) +} + +// 导出热轧定经机日统计报表 +export const exportSizingmillDay = async (params) => { + return await request.download({ url: `/tjanalysis/exportSizingmillDay`, params }) +} + +// 获取能耗统计报表 +export const queryEnergyConsumption = async (params) => { + return await request.get({ url: `/tjanalysis/queryEnergyConsumption`, params }) +} + +// 导出能耗统计报表 +export const exportEnergyConsumption = async (params) => { + return await request.download({ url: `/tjanalysis/exportEnergyConsumption`, params }) } \ No newline at end of file diff --git a/src/components/Pagination/index.vue b/src/components/Pagination/index.vue index b88997b..b9f4998 100644 --- a/src/components/Pagination/index.vue +++ b/src/components/Pagination/index.vue @@ -53,6 +53,8 @@ const props = defineProps({ } }) +console.log('2323',props.total); + const emit = defineEmits(['update:page', 'update:limit', 'pagination', 'pagination']) const currentPage = computed({ get() { @@ -73,8 +75,11 @@ const pageSize = computed({ } }) const handleSizeChange = (val) => { + debugger // 如果修改后超过最大页面,强制跳转到第 1 页 if (currentPage.value * val > props.total) { + console.log(currentPage.value) + console.log(props.total) currentPage.value = 1 } // 触发 pagination 事件,重新加载列表 diff --git a/src/utils/dict.ts b/src/utils/dict.ts index f62e7a7..cdd5072 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -203,5 +203,8 @@ export enum DICT_TYPE { LAB_USER_TEST_TYPE = 'test_user_type', LAB_AUDIT_STATUS = 'lab_audit_status', LAB_ASYNC_BUS_TYPE = 'lab_async_bus_type', - LAB_OPR_TYPE = 'lab_opr_type' + LAB_OPR_TYPE = 'lab_opr_type', + +// ========== 统计报表能耗单位字典 ============ +ENERGY_CONSUMPTION_TYPE = 'energy_consumption_type' } diff --git a/src/views/basedata/marketplaceData/index.vue b/src/views/basedata/marketplaceData/index.vue new file mode 100644 index 0000000..949475e --- /dev/null +++ b/src/views/basedata/marketplaceData/index.vue @@ -0,0 +1,231 @@ + + + diff --git a/src/views/basedata/marketplaceData/marketplaceData.data.ts b/src/views/basedata/marketplaceData/marketplaceData.data.ts new file mode 100644 index 0000000..f4ea32e --- /dev/null +++ b/src/views/basedata/marketplaceData/marketplaceData.data.ts @@ -0,0 +1,131 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter } from '@/utils/formatTime' + +// 表单校验 +export const MarketplaceDataRules = reactive({ + available: [required], + concurrencyStamp: [required], +}) + +export const MarketplaceData = useCrudSchemas(reactive([ + { + label: 'id', + field: 'id', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '品种', + field: 'type', + sort: 'custom', + form: { + component: 'Select' + }, + isTable: false, + isForm: false, + }, + { + label: '品种名称', + field: 'name', + sort: 'custom', + isSearch: true, + + }, + { + label: '描述', + field: 'describes', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '价格', + field: 'price', + sort: 'custom', + form:{ + component:'InputNumber', + componentProps: { + min: 0, + precision: 4 + } + + } + }, + { + label: '涨幅情况', + field: 'amountIncrease', + sort: 'custom', + }, + { + label: '预留字段1', + field: 'field1', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '预留字段2', + field: 'field2', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '预留字段3', + field: 'field3', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '预留字段4', + field: 'field4', + sort: 'custom', + isTable: false, + 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: 'available', + sort: 'custom', + isTable: false, + isForm: false, + }, + { + label: '并发乐观锁', + field: 'concurrencyStamp', + sort: 'custom', + form: { + component: 'InputNumber', + value: 0 + }, + isTable: false, + isForm: false, + }, + { + label: '操作', + field: 'action', + isForm: false, + table: { + width: 150, + fixed: 'right' + } + } +])) diff --git a/src/views/lab/platscale/index.vue b/src/views/lab/platscale/index.vue index 352115a..7e40dcb 100644 --- a/src/views/lab/platscale/index.vue +++ b/src/views/lab/platscale/index.vue @@ -113,7 +113,7 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn(null), // 新增 - defaultButtons.defaultSyncDataBtn(null), // 同步 + // defaultButtons.defaultSyncDataBtn(null), // 同步 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultSetBtn(null), // 设置 // { diff --git a/src/views/lab/platscaledata/index.vue b/src/views/lab/platscaledata/index.vue new file mode 100644 index 0000000..c9d956d --- /dev/null +++ b/src/views/lab/platscaledata/index.vue @@ -0,0 +1,259 @@ + + + diff --git a/src/views/lab/platscaledata/platscale.data.ts b/src/views/lab/platscaledata/platscale.data.ts new file mode 100644 index 0000000..5739ac6 --- /dev/null +++ b/src/views/lab/platscaledata/platscale.data.ts @@ -0,0 +1,341 @@ +import type { CrudSchema } from '@/hooks/web/useCrudSchemas' +import { dateFormatter , dateFormatter2 } from '@/utils/formatTime' + +// 表单校验 +export const PlatscaleRules = reactive({ +}) + +export const Platscale = useCrudSchemas(reactive([ + // { + // label: '主键、自增', + // field: 'id', + // sort: 'custom', + // isForm: false, + // }, + // { + // label: '批号', + // field: 'batchNo', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 150 + // } + // }, + // { + // label: '送样单位', + // field: 'sydw', + // sort: 'custom', + // isSearch: false, + // table: { + // width: 150 + // } + // }, + // { + // label: '标准', + // field: 'standard', + // sort: 'custom', + // isSearch: false, + // table: { + // width: 150 + // } + // }, + // { + // label: '材质', + // field: 'cz', + // sort: 'custom', + // isSearch: false, + // table: { + // width: 150 + // } + // }, + // { + // label: '规格', + // field: 'guig', + // sort: 'custom', + // isSearch: false, + // table: { + // width: 150 + // } + // }, + // { + // label: '实验人', + // field: 'testUser', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 150 + // }, + // dictType: DICT_TYPE.LAB_USER_TEST_TYPE, + // dictClass: 'number' + // }, + { + label: '车号', + field: 'ch', + sort: 'custom', + isSearch: true, + table: { + width: 150 + } + }, + { + label: '车型', + field: 'cx', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '品种', + field: 'pz', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '供货单位', + field: 'ghdw', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '运输单位', + field: 'ysdw', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '出入库', + field: 'crk', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '毛重', + field: 'mz', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '皮重', + field: 'pzh', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '净重', + field: 'jz', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '检斤员', + field: 'jjy', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '日期', + field: 'rq', + sort: 'custom', + isSearch: false, + formatter: dateFormatter2, + form: { + component: 'DatePicker', + componentProps: { + valueFormat: 'YYYY-MM-DD', + type: 'date' + } + }, + table: { + width: 200 + } + }, + { + label: '一次计量时间', + field: 'jlsjOne', + sort: 'custom', + isSearch: false, + form: { + component: 'TimePicker', + componentProps: { + valueFormat: 'HH:mm:ss', + type: 'time' + } + }, + table: { + width: 200 + } + }, + { + label: '二次计量时间', + field: 'jlsjTwo', + sort: 'custom', + isSearch: false, + form: { + component: 'TimePicker', + componentProps: { + valueFormat: 'HH:mm:ss', + type: 'time' + } + }, + table: { + width: 200 + } + }, + { + label: '编号', + field: 'bh', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '送货单位', + field: 'shdw', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '性质', + field: 'xz', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '防伪码', + field: 'fwm', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '抽样时间', + field: 'cysj', + sort: 'custom', + isSearch: false, + table: { + width: 200 + } + }, + { + label: '抽样编号', + field: 'cybh', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '抽样结果', + field: 'cyjg', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '报告单编号', + field: 'bgdbh', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '是否抽检', + field: 'sfcj', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + { + label: '数据源', + field: 'dataSource', + sort: 'custom', + isSearch: false, + table: { + width: 150 + } + }, + // { + // label: '审核状态', + // field: 'auditStatus', + // sort: 'custom', + // isSearch: true, + // table: { + // width: 120, + // fixed: 'right' + // }, + // dictType: DICT_TYPE.LAB_AUDIT_STATUS, + // dictClass: 'number' + // }, + { + 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, + table: { + width: 200, + fixed: 'right' + } + }, + // { + // label: '操作', + // field: 'action', + // isForm: false, + // table: { + // width: 180, + // fixed: 'right' + // } + // } +])) diff --git a/src/views/tjanalysis/electricdata/index.vue b/src/views/tjanalysis/electricdata/index.vue index 0834db1..239b596 100644 --- a/src/views/tjanalysis/electricdata/index.vue +++ b/src/views/tjanalysis/electricdata/index.vue @@ -1,6 +1,6 @@