daikun1@bosssoft.com.cn
12 months ago
66 changed files with 6968 additions and 25 deletions
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdElectricdataVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询冷拔-智能电列表
|
|||
export const getCdElectricdataPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdelectricdata/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdelectricdata/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询冷拔-智能电详情
|
|||
export const getCdElectricdata = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdelectricdata/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增冷拔-智能电
|
|||
export const createCdElectricdata = async (data: CdElectricdataVO) => { |
|||
return await request.post({ url: `/pszc/cdelectricdata/create`, data }) |
|||
} |
|||
|
|||
// 修改冷拔-智能电
|
|||
export const updateCdElectricdata = async (data: CdElectricdataVO) => { |
|||
return await request.put({ url: `/pszc/cdelectricdata/update`, data }) |
|||
} |
|||
|
|||
// 删除冷拔-智能电
|
|||
export const deleteCdElectricdata = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdelectricdata/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出冷拔-智能电 Excel
|
|||
export const exportCdElectricdata = async (params) => { |
|||
return await request.download({ url: `/pszc/cdelectricdata/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdelectricdata/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdNatgasdataVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询冷拔-天然气总量列表
|
|||
export const getCdNatgasdataPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdnatgasdata/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdnatgasdata/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询冷拔-天然气总量详情
|
|||
export const getCdNatgasdata = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdnatgasdata/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增冷拔-天然气总量
|
|||
export const createCdNatgasdata = async (data: CdNatgasdataVO) => { |
|||
return await request.post({ url: `/pszc/cdnatgasdata/create`, data }) |
|||
} |
|||
|
|||
// 修改冷拔-天然气总量
|
|||
export const updateCdNatgasdata = async (data: CdNatgasdataVO) => { |
|||
return await request.put({ url: `/pszc/cdnatgasdata/update`, data }) |
|||
} |
|||
|
|||
// 删除冷拔-天然气总量
|
|||
export const deleteCdNatgasdata = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdnatgasdata/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出冷拔-天然气总量 Excel
|
|||
export const exportCdNatgasdata = async (params) => { |
|||
return await request.download({ url: `/pszc/cdnatgasdata/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdnatgasdata/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdPuncherdataVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询冷拔-穿孔机列表
|
|||
export const getCdPuncherdataPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdpuncherdata/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdpuncherdata/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询冷拔-穿孔机详情
|
|||
export const getCdPuncherdata = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdpuncherdata/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增冷拔-穿孔机
|
|||
export const createCdPuncherdata = async (data: CdPuncherdataVO) => { |
|||
return await request.post({ url: `/pszc/cdpuncherdata/create`, data }) |
|||
} |
|||
|
|||
// 修改冷拔-穿孔机
|
|||
export const updateCdPuncherdata = async (data: CdPuncherdataVO) => { |
|||
return await request.put({ url: `/pszc/cdpuncherdata/update`, data }) |
|||
} |
|||
|
|||
// 删除冷拔-穿孔机
|
|||
export const deleteCdPuncherdata = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdpuncherdata/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出冷拔-穿孔机 Excel
|
|||
export const exportCdPuncherdata = async (params) => { |
|||
return await request.download({ url: `/pszc/cdpuncherdata/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdpuncherdata/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdSlotfurnaceVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询缝式炉列表
|
|||
export const getCdSlotfurnacePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdslotfurnace/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdslotfurnace/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询缝式炉详情
|
|||
export const getCdSlotfurnace = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdslotfurnace/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增缝式炉
|
|||
export const createCdSlotfurnace = async (data: CdSlotfurnaceVO) => { |
|||
return await request.post({ url: `/pszc/cdslotfurnace/create`, data }) |
|||
} |
|||
|
|||
// 修改缝式炉
|
|||
export const updateCdSlotfurnace = async (data: CdSlotfurnaceVO) => { |
|||
return await request.put({ url: `/pszc/cdslotfurnace/update`, data }) |
|||
} |
|||
|
|||
// 删除缝式炉
|
|||
export const deleteCdSlotfurnace = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdslotfurnace/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出缝式炉 Excel
|
|||
export const exportCdSlotfurnace = async (params) => { |
|||
return await request.download({ url: `/pszc/cdslotfurnace/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdslotfurnace/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdSmelterfurnaceVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询固熔炉列表
|
|||
export const getCdSmelterfurnacePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdsmelterfurnace/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdsmelterfurnace/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询固熔炉详情
|
|||
export const getCdSmelterfurnace = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdsmelterfurnace/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增固熔炉
|
|||
export const createCdSmelterfurnace = async (data: CdSmelterfurnaceVO) => { |
|||
return await request.post({ url: `/pszc/cdsmelterfurnace/create`, data }) |
|||
} |
|||
|
|||
// 修改固熔炉
|
|||
export const updateCdSmelterfurnace = async (data: CdSmelterfurnaceVO) => { |
|||
return await request.put({ url: `/pszc/cdsmelterfurnace/update`, data }) |
|||
} |
|||
|
|||
// 删除固熔炉
|
|||
export const deleteCdSmelterfurnace = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdsmelterfurnace/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出固熔炉 Excel
|
|||
export const exportCdSmelterfurnace = async (params) => { |
|||
return await request.download({ url: `/pszc/cdsmelterfurnace/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdsmelterfurnace/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdStepfurnaceVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询步进炉列表
|
|||
export const getCdStepfurnacePage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdstepfurnace/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdstepfurnace/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询步进炉详情
|
|||
export const getCdStepfurnace = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdstepfurnace/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增步进炉
|
|||
export const createCdStepfurnace = async (data: CdStepfurnaceVO) => { |
|||
return await request.post({ url: `/pszc/cdstepfurnace/create`, data }) |
|||
} |
|||
|
|||
// 修改步进炉
|
|||
export const updateCdStepfurnace = async (data: CdStepfurnaceVO) => { |
|||
return await request.put({ url: `/pszc/cdstepfurnace/update`, data }) |
|||
} |
|||
|
|||
// 删除步进炉
|
|||
export const deleteCdStepfurnace = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdstepfurnace/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出步进炉 Excel
|
|||
export const exportCdStepfurnace = async (params) => { |
|||
return await request.download({ url: `/pszc/cdstepfurnace/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdstepfurnace/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface CdWatermeterVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询冷拔-水列表
|
|||
export const getCdWatermeterPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/cdwatermeter/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/cdwatermeter/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询冷拔-水详情
|
|||
export const getCdWatermeter = async (id: number) => { |
|||
return await request.get({ url: `/pszc/cdwatermeter/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增冷拔-水
|
|||
export const createCdWatermeter = async (data: CdWatermeterVO) => { |
|||
return await request.post({ url: `/pszc/cdwatermeter/create`, data }) |
|||
} |
|||
|
|||
// 修改冷拔-水
|
|||
export const updateCdWatermeter = async (data: CdWatermeterVO) => { |
|||
return await request.put({ url: `/pszc/cdwatermeter/update`, data }) |
|||
} |
|||
|
|||
// 删除冷拔-水
|
|||
export const deleteCdWatermeter = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/cdwatermeter/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出冷拔-水 Excel
|
|||
export const exportCdWatermeter = async (params) => { |
|||
return await request.download({ url: `/pszc/cdwatermeter/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/cdwatermeter/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrAnnularfurnace108VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧108-环形加热炉列表
|
|||
export const getHrAnnularfurnace108Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrannularfurnace108/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrannularfurnace108/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧108-环形加热炉详情
|
|||
export const getHrAnnularfurnace108 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrannularfurnace108/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧108-环形加热炉
|
|||
export const createHrAnnularfurnace108 = async (data: HrAnnularfurnace108VO) => { |
|||
return await request.post({ url: `/pszc/hrannularfurnace108/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧108-环形加热炉
|
|||
export const updateHrAnnularfurnace108 = async (data: HrAnnularfurnace108VO) => { |
|||
return await request.put({ url: `/pszc/hrannularfurnace108/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧108-环形加热炉
|
|||
export const deleteHrAnnularfurnace108 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrannularfurnace108/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧108-环形加热炉 Excel
|
|||
export const exportHrAnnularfurnace108 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrannularfurnace108/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrannularfurnace108/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrAnnularfurnace90VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧90-环形加热炉列表
|
|||
export const getHrAnnularfurnace90Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrannularfurnace90/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrannularfurnace90/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧90-环形加热炉详情
|
|||
export const getHrAnnularfurnace90 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrannularfurnace90/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧90-环形加热炉
|
|||
export const createHrAnnularfurnace90 = async (data: HrAnnularfurnace90VO) => { |
|||
return await request.post({ url: `/pszc/hrannularfurnace90/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧90-环形加热炉
|
|||
export const updateHrAnnularfurnace90 = async (data: HrAnnularfurnace90VO) => { |
|||
return await request.put({ url: `/pszc/hrannularfurnace90/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧90-环形加热炉
|
|||
export const deleteHrAnnularfurnace90 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrannularfurnace90/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧90-环形加热炉 Excel
|
|||
export const exportHrAnnularfurnace90 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrannularfurnace90/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrannularfurnace90/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrAnnularfurnacegas108VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧108-环形加热炉天然气列表
|
|||
export const getHrAnnularfurnacegas108Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrannularfurnacegas108/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrannularfurnacegas108/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧108-环形加热炉天然气详情
|
|||
export const getHrAnnularfurnacegas108 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrannularfurnacegas108/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧108-环形加热炉天然气
|
|||
export const createHrAnnularfurnacegas108 = async (data: HrAnnularfurnacegas108VO) => { |
|||
return await request.post({ url: `/pszc/hrannularfurnacegas108/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧108-环形加热炉天然气
|
|||
export const updateHrAnnularfurnacegas108 = async (data: HrAnnularfurnacegas108VO) => { |
|||
return await request.put({ url: `/pszc/hrannularfurnacegas108/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧108-环形加热炉天然气
|
|||
export const deleteHrAnnularfurnacegas108 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrannularfurnacegas108/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧108-环形加热炉天然气 Excel
|
|||
export const exportHrAnnularfurnacegas108 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrannularfurnacegas108/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrannularfurnacegas108/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrElongatordata108VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧108-延伸机列表
|
|||
export const getHrElongatordata108Page = 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/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧108-延伸机详情
|
|||
export const getHrElongatordata108 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrelongatordata108/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧108-延伸机
|
|||
export const createHrElongatordata108 = async (data: HrElongatordata108VO) => { |
|||
return await request.post({ url: `/pszc/hrelongatordata108/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧108-延伸机
|
|||
export const updateHrElongatordata108 = async (data: HrElongatordata108VO) => { |
|||
return await request.put({ url: `/pszc/hrelongatordata108/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧108-延伸机
|
|||
export const deleteHrElongatordata108 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrelongatordata108/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧108-延伸机 Excel
|
|||
export const exportHrElongatordata108 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrelongatordata108/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrelongatordata108/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrElongatordata90VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧90-延伸机列表
|
|||
export const getHrElongatordata90Page = 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/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧90-延伸机详情
|
|||
export const getHrElongatordata90 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrelongatordata90/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧90-延伸机
|
|||
export const createHrElongatordata90 = async (data: HrElongatordata90VO) => { |
|||
return await request.post({ url: `/pszc/hrelongatordata90/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧90-延伸机
|
|||
export const updateHrElongatordata90 = async (data: HrElongatordata90VO) => { |
|||
return await request.put({ url: `/pszc/hrelongatordata90/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧90-延伸机
|
|||
export const deleteHrElongatordata90 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrelongatordata90/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧90-延伸机 Excel
|
|||
export const exportHrElongatordata90 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrelongatordata90/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrelongatordata90/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrNatgasdataVO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧-天然气总量列表
|
|||
export const getHrNatgasdataPage = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrnatgasdata/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrnatgasdata/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧-天然气总量详情
|
|||
export const getHrNatgasdata = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrnatgasdata/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧-天然气总量
|
|||
export const createHrNatgasdata = async (data: HrNatgasdataVO) => { |
|||
return await request.post({ url: `/pszc/hrnatgasdata/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧-天然气总量
|
|||
export const updateHrNatgasdata = async (data: HrNatgasdataVO) => { |
|||
return await request.put({ url: `/pszc/hrnatgasdata/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧-天然气总量
|
|||
export const deleteHrNatgasdata = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrnatgasdata/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧-天然气总量 Excel
|
|||
export const exportHrNatgasdata = async (params) => { |
|||
return await request.download({ url: `/pszc/hrnatgasdata/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrnatgasdata/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrPuncherdata108VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧108-穿孔机列表
|
|||
export const getHrPuncherdata108Page = 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/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧108-穿孔机详情
|
|||
export const getHrPuncherdata108 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrpuncherdata108/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧108-穿孔机
|
|||
export const createHrPuncherdata108 = async (data: HrPuncherdata108VO) => { |
|||
return await request.post({ url: `/pszc/hrpuncherdata108/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧108-穿孔机
|
|||
export const updateHrPuncherdata108 = async (data: HrPuncherdata108VO) => { |
|||
return await request.put({ url: `/pszc/hrpuncherdata108/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧108-穿孔机
|
|||
export const deleteHrPuncherdata108 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrpuncherdata108/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧108-穿孔机 Excel
|
|||
export const exportHrPuncherdata108 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrpuncherdata108/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrpuncherdata108/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrPuncherdata90VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧90-穿孔机列表
|
|||
export const getHrPuncherdata90Page = 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/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧90-穿孔机详情
|
|||
export const getHrPuncherdata90 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrpuncherdata90/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧90-穿孔机
|
|||
export const createHrPuncherdata90 = async (data: HrPuncherdata90VO) => { |
|||
return await request.post({ url: `/pszc/hrpuncherdata90/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧90-穿孔机
|
|||
export const updateHrPuncherdata90 = async (data: HrPuncherdata90VO) => { |
|||
return await request.put({ url: `/pszc/hrpuncherdata90/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧90-穿孔机
|
|||
export const deleteHrPuncherdata90 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrpuncherdata90/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧90-穿孔机 Excel
|
|||
export const exportHrPuncherdata90 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrpuncherdata90/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrpuncherdata90/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrSizingmilldata108VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧108-定经机列表
|
|||
export const getHrSizingmilldata108Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrsizingmilldata108/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrsizingmilldata108/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧108-定经机详情
|
|||
export const getHrSizingmilldata108 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrsizingmilldata108/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧108-定经机
|
|||
export const createHrSizingmilldata108 = async (data: HrSizingmilldata108VO) => { |
|||
return await request.post({ url: `/pszc/hrsizingmilldata108/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧108-定经机
|
|||
export const updateHrSizingmilldata108 = async (data: HrSizingmilldata108VO) => { |
|||
return await request.put({ url: `/pszc/hrsizingmilldata108/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧108-定经机
|
|||
export const deleteHrSizingmilldata108 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrsizingmilldata108/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧108-定经机 Excel
|
|||
export const exportHrSizingmilldata108 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrsizingmilldata108/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrsizingmilldata108/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrSizingmilldata90VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧90-定经机列表
|
|||
export const getHrSizingmilldata90Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrsizingmilldata90/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrsizingmilldata90/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧90-定经机详情
|
|||
export const getHrSizingmilldata90 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrsizingmilldata90/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧90-定经机
|
|||
export const createHrSizingmilldata90 = async (data: HrSizingmilldata90VO) => { |
|||
return await request.post({ url: `/pszc/hrsizingmilldata90/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧90-定经机
|
|||
export const updateHrSizingmilldata90 = async (data: HrSizingmilldata90VO) => { |
|||
return await request.put({ url: `/pszc/hrsizingmilldata90/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧90-定经机
|
|||
export const deleteHrSizingmilldata90 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrsizingmilldata90/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧90-定经机 Excel
|
|||
export const exportHrSizingmilldata90 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrsizingmilldata90/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrsizingmilldata90/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrWatermeter108VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧108-水列表
|
|||
export const getHrWatermeter108Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrwatermeter108/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrwatermeter108/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧108-水详情
|
|||
export const getHrWatermeter108 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrwatermeter108/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧108-水
|
|||
export const createHrWatermeter108 = async (data: HrWatermeter108VO) => { |
|||
return await request.post({ url: `/pszc/hrwatermeter108/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧108-水
|
|||
export const updateHrWatermeter108 = async (data: HrWatermeter108VO) => { |
|||
return await request.put({ url: `/pszc/hrwatermeter108/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧108-水
|
|||
export const deleteHrWatermeter108 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrwatermeter108/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧108-水 Excel
|
|||
export const exportHrWatermeter108 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrwatermeter108/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrwatermeter108/get-import-template' }) |
|||
} |
@ -0,0 +1,51 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
export interface HrWatermeter90VO { |
|||
id: number |
|||
icode: string |
|||
iname: string |
|||
ivalue: string |
|||
mcode: string |
|||
mname: string |
|||
} |
|||
|
|||
// 查询热轧90-水列表
|
|||
export const getHrWatermeter90Page = async (params) => { |
|||
if (params.isSearch) { |
|||
delete params.isSearch |
|||
const data = {...params} |
|||
return await request.post({ url: '/pszc/hrwatermeter90/senior', data }) |
|||
} else { |
|||
return await request.get({ url: `/pszc/hrwatermeter90/page`, params }) |
|||
} |
|||
} |
|||
|
|||
// 查询热轧90-水详情
|
|||
export const getHrWatermeter90 = async (id: number) => { |
|||
return await request.get({ url: `/pszc/hrwatermeter90/get?id=` + id }) |
|||
} |
|||
|
|||
// 新增热轧90-水
|
|||
export const createHrWatermeter90 = async (data: HrWatermeter90VO) => { |
|||
return await request.post({ url: `/pszc/hrwatermeter90/create`, data }) |
|||
} |
|||
|
|||
// 修改热轧90-水
|
|||
export const updateHrWatermeter90 = async (data: HrWatermeter90VO) => { |
|||
return await request.put({ url: `/pszc/hrwatermeter90/update`, data }) |
|||
} |
|||
|
|||
// 删除热轧90-水
|
|||
export const deleteHrWatermeter90 = async (id: number) => { |
|||
return await request.delete({ url: `/pszc/hrwatermeter90/delete?id=` + id }) |
|||
} |
|||
|
|||
// 导出热轧90-水 Excel
|
|||
export const exportHrWatermeter90 = async (params) => { |
|||
return await request.download({ url: `/pszc/hrwatermeter90/export-excel`, params }) |
|||
} |
|||
|
|||
// 下载导入模板
|
|||
export const importTemplate = () => { |
|||
return request.download({ url: '/pszc/hrwatermeter90/get-import-template' }) |
|||
} |
@ -0,0 +1,21 @@ |
|||
import request from '@/config/axios' |
|||
|
|||
// 获取一次主表日统计报表数据
|
|||
export const queryIrealdataTj = async (params) => { |
|||
return await request.get({ url: `/tjanalysis/queryIrealdataTj`, params }) |
|||
} |
|||
|
|||
// 获取智能电表日统计报表数据
|
|||
export const queryElectricdataTj = async (params) => { |
|||
return await request.get({ url: `/tjanalysis/queryElectricdataTj`, params }) |
|||
} |
|||
|
|||
// 获取地衡数据统计
|
|||
export const queryTjPlatScales = async (params) => { |
|||
return await request.get({ url: `/tjanalysis/queryTjPlatScales`, params }) |
|||
} |
|||
|
|||
// 导出地衡数据
|
|||
export const exportPsales = async (params) => { |
|||
return await request.download({ url: `/tjanalysis/exportPsales`, params}) |
|||
} |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdElectricdataRules = reactive({ |
|||
}) |
|||
|
|||
export const CdElectricdata = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdElectricdata.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdElectricdata.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdElectricdataRules" |
|||
:formAllSchemas="CdElectricdata.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdElectricdataApi.updateCdElectricdata" |
|||
:apiCreate="CdElectricdataApi.createCdElectricdata" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdElectricdata,CdElectricdataRules } from './cdElectricdata.data' |
|||
import * as CdElectricdataApi from '@/api/pszc/cdElectricdata' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdElectricdata' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdElectricdata.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdElectricdataApi.getCdElectricdataPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdElectricdata:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdElectricdata:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdElectricdata:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdElectricdata:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdElectricdata') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdElectricdataApi.deleteCdElectricdata(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdElectricdataApi.exportCdElectricdata(setSearchParams) |
|||
download.excel(data, '冷拔-智能电.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '冷拔-智能电导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdElectricdataApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdNatgasdataRules = reactive({ |
|||
}) |
|||
|
|||
export const CdNatgasdata = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdNatgasdata.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdNatgasdata.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdNatgasdataRules" |
|||
:formAllSchemas="CdNatgasdata.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdNatgasdataApi.updateCdNatgasdata" |
|||
:apiCreate="CdNatgasdataApi.createCdNatgasdata" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdNatgasdata,CdNatgasdataRules } from './cdNatgasdata.data' |
|||
import * as CdNatgasdataApi from '@/api/pszc/cdNatgasdata' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdNatgasdata' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdNatgasdata.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdNatgasdataApi.getCdNatgasdataPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdNatgasdata:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdNatgasdata:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdNatgasdata:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdNatgasdata:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdNatgasdata') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdNatgasdataApi.deleteCdNatgasdata(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdNatgasdataApi.exportCdNatgasdata(setSearchParams) |
|||
download.excel(data, '冷拔-天然气总量.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '冷拔-天然气总量导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdNatgasdataApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdPuncherdataRules = reactive({ |
|||
}) |
|||
|
|||
export const CdPuncherdata = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdPuncherdata.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdPuncherdata.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdPuncherdataRules" |
|||
:formAllSchemas="CdPuncherdata.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdPuncherdataApi.updateCdPuncherdata" |
|||
:apiCreate="CdPuncherdataApi.createCdPuncherdata" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdPuncherdata,CdPuncherdataRules } from './cdPuncherdata.data' |
|||
import * as CdPuncherdataApi from '@/api/pszc/cdPuncherdata' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdPuncherdata' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdPuncherdata.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdPuncherdataApi.getCdPuncherdataPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdPuncherdata:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdPuncherdata:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdPuncherdata:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdPuncherdata:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdPuncherdata') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdPuncherdataApi.deleteCdPuncherdata(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdPuncherdataApi.exportCdPuncherdata(setSearchParams) |
|||
download.excel(data, '冷拔-穿孔机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '冷拔-穿孔机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdPuncherdataApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdSlotfurnaceRules = reactive({ |
|||
}) |
|||
|
|||
export const CdSlotfurnace = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdSlotfurnace.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdSlotfurnace.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdSlotfurnaceRules" |
|||
:formAllSchemas="CdSlotfurnace.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdSlotfurnaceApi.updateCdSlotfurnace" |
|||
:apiCreate="CdSlotfurnaceApi.createCdSlotfurnace" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdSlotfurnace,CdSlotfurnaceRules } from './cdSlotfurnace.data' |
|||
import * as CdSlotfurnaceApi from '@/api/pszc/cdSlotfurnace' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdSlotfurnace' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdSlotfurnace.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdSlotfurnaceApi.getCdSlotfurnacePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdSlotfurnace:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdSlotfurnace:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdSlotfurnace:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdSlotfurnace:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdSlotfurnace') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdSlotfurnaceApi.deleteCdSlotfurnace(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdSlotfurnaceApi.exportCdSlotfurnace(setSearchParams) |
|||
download.excel(data, '缝式炉.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '缝式炉导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdSlotfurnaceApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdSmelterfurnaceRules = reactive({ |
|||
}) |
|||
|
|||
export const CdSmelterfurnace = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdSmelterfurnace.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdSmelterfurnace.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdSmelterfurnaceRules" |
|||
:formAllSchemas="CdSmelterfurnace.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdSmelterfurnaceApi.updateCdSmelterfurnace" |
|||
:apiCreate="CdSmelterfurnaceApi.createCdSmelterfurnace" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdSmelterfurnace,CdSmelterfurnaceRules } from './cdSmelterfurnace.data' |
|||
import * as CdSmelterfurnaceApi from '@/api/pszc/cdSmelterfurnace' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdSmelterfurnace' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdSmelterfurnace.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdSmelterfurnaceApi.getCdSmelterfurnacePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdSmelterfurnace:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdSmelterfurnace:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdSmelterfurnace:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdSmelterfurnace:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdSmelterfurnace') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdSmelterfurnaceApi.deleteCdSmelterfurnace(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdSmelterfurnaceApi.exportCdSmelterfurnace(setSearchParams) |
|||
download.excel(data, '固熔炉.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '固熔炉导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdSmelterfurnaceApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdStepfurnaceRules = reactive({ |
|||
}) |
|||
|
|||
export const CdStepfurnace = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdStepfurnace.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdStepfurnace.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdStepfurnaceRules" |
|||
:formAllSchemas="CdStepfurnace.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdStepfurnaceApi.updateCdStepfurnace" |
|||
:apiCreate="CdStepfurnaceApi.createCdStepfurnace" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdStepfurnace,CdStepfurnaceRules } from './cdStepfurnace.data' |
|||
import * as CdStepfurnaceApi from '@/api/pszc/cdStepfurnace' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdStepfurnace' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdStepfurnace.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdStepfurnaceApi.getCdStepfurnacePage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdStepfurnace:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdStepfurnace:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdStepfurnace:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdStepfurnace:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdStepfurnace') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdStepfurnaceApi.deleteCdStepfurnace(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdStepfurnaceApi.exportCdStepfurnace(setSearchParams) |
|||
download.excel(data, '步进炉.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '步进炉导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdStepfurnaceApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const CdWatermeterRules = reactive({ |
|||
}) |
|||
|
|||
export const CdWatermeter = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="CdWatermeter.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="CdWatermeter.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="CdWatermeterRules" |
|||
:formAllSchemas="CdWatermeter.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="CdWatermeterApi.updateCdWatermeter" |
|||
:apiCreate="CdWatermeterApi.createCdWatermeter" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { CdWatermeter,CdWatermeterRules } from './cdWatermeter.data' |
|||
import * as CdWatermeterApi from '@/api/pszc/cdWatermeter' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'CdWatermeter' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(CdWatermeter.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: CdWatermeterApi.getCdWatermeterPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:cdWatermeter:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:cdWatermeter:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:cdWatermeter:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:cdWatermeter:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicCdWatermeter') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await CdWatermeterApi.deleteCdWatermeter(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await CdWatermeterApi.exportCdWatermeter(setSearchParams) |
|||
download.excel(data, '冷拔-水.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '冷拔-水导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await CdWatermeterApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrAnnularfurnace108Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrAnnularfurnace108 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrAnnularfurnace108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrAnnularfurnace108.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrAnnularfurnace108Rules" |
|||
:formAllSchemas="HrAnnularfurnace108.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrAnnularfurnace108Api.updateHrAnnularfurnace108" |
|||
:apiCreate="HrAnnularfurnace108Api.createHrAnnularfurnace108" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrAnnularfurnace108,HrAnnularfurnace108Rules } from './hrAnnularfurnace108.data' |
|||
import * as HrAnnularfurnace108Api from '@/api/pszc/hrannularfurnace108' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrAnnularfurnace108' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrAnnularfurnace108.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrAnnularfurnace108Api.getHrAnnularfurnace108Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrAnnularfurnace108:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrAnnularfurnace108:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrAnnularfurnace108:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrAnnularfurnace108:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrAnnularfurnace108') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrAnnularfurnace108Api.deleteHrAnnularfurnace108(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrAnnularfurnace108Api.exportHrAnnularfurnace108(setSearchParams) |
|||
download.excel(data, '热轧108-环形加热炉.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧108-环形加热炉导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrAnnularfurnace108Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrAnnularfurnace90Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrAnnularfurnace90 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrAnnularfurnace90.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrAnnularfurnace90.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrAnnularfurnace90Rules" |
|||
:formAllSchemas="HrAnnularfurnace90.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrAnnularfurnace90Api.updateHrAnnularfurnace90" |
|||
:apiCreate="HrAnnularfurnace90Api.createHrAnnularfurnace90" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrAnnularfurnace90,HrAnnularfurnace90Rules } from './hrAnnularfurnace90.data' |
|||
import * as HrAnnularfurnace90Api from '@/api/pszc/hrAnnularfurnace90' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrAnnularfurnace90' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrAnnularfurnace90.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrAnnularfurnace90Api.getHrAnnularfurnace90Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrAnnularfurnace90:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrAnnularfurnace90:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrAnnularfurnace90:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrAnnularfurnace90:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrAnnularfurnace90') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrAnnularfurnace90Api.deleteHrAnnularfurnace90(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrAnnularfurnace90Api.exportHrAnnularfurnace90(setSearchParams) |
|||
download.excel(data, '热轧90-环形加热炉.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧90-环形加热炉导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrAnnularfurnace90Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrAnnularfurnacegas108Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrAnnularfurnacegas108 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrAnnularfurnacegas108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrAnnularfurnacegas108.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrAnnularfurnacegas108Rules" |
|||
:formAllSchemas="HrAnnularfurnacegas108.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrAnnularfurnacegas108Api.updateHrAnnularfurnacegas108" |
|||
:apiCreate="HrAnnularfurnacegas108Api.createHrAnnularfurnacegas108" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrAnnularfurnacegas108,HrAnnularfurnacegas108Rules } from './hrAnnularfurnacegas108.data' |
|||
import * as HrAnnularfurnacegas108Api from '@/api/pszc/hrannularfurnacegas108' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrAnnularfurnacegas108' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrAnnularfurnacegas108.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrAnnularfurnacegas108Api.getHrAnnularfurnacegas108Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrAnnularfurnacegas108:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrAnnularfurnacegas108:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrAnnularfurnacegas108:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrAnnularfurnacegas108:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrAnnularfurnacegas108') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrAnnularfurnacegas108Api.deleteHrAnnularfurnacegas108(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrAnnularfurnacegas108Api.exportHrAnnularfurnacegas108(setSearchParams) |
|||
download.excel(data, '热轧108-环形加热炉天然气.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧108-环形加热炉天然气导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrAnnularfurnacegas108Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrElongatordata108Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrElongatordata108 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrElongatordata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrElongatordata108.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrElongatordata108Rules" |
|||
:formAllSchemas="HrElongatordata108.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrElongatordata108Api.updateHrElongatordata108" |
|||
:apiCreate="HrElongatordata108Api.createHrElongatordata108" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrElongatordata108,HrElongatordata108Rules } from './hrElongatordata108.data' |
|||
import * as HrElongatordata108Api from '@/api/pszc/hrelongatordata108' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrElongatordata108' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrElongatordata108.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrElongatordata108Api.getHrElongatordata108Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrElongatordata108:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrElongatordata108:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrElongatordata108:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrElongatordata108:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrElongatordata108') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrElongatordata108Api.deleteHrElongatordata108(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrElongatordata108Api.exportHrElongatordata108(setSearchParams) |
|||
download.excel(data, '热轧108-延伸机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧108-延伸机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrElongatordata108Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrElongatordata90Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrElongatordata90 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrElongatordata90.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrElongatordata90.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrElongatordata90Rules" |
|||
:formAllSchemas="HrElongatordata90.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrElongatordata90Api.updateHrElongatordata90" |
|||
:apiCreate="HrElongatordata90Api.createHrElongatordata90" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrElongatordata90,HrElongatordata90Rules } from './hrElongatordata90.data' |
|||
import * as HrElongatordata90Api from '@/api/pszc/hrElongatordata90' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrElongatordata90' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrElongatordata90.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrElongatordata90Api.getHrElongatordata90Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrElongatordata90:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrElongatordata90:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrElongatordata90:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrElongatordata90:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrElongatordata90') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrElongatordata90Api.deleteHrElongatordata90(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrElongatordata90Api.exportHrElongatordata90(setSearchParams) |
|||
download.excel(data, '热轧90-延伸机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧90-延伸机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await HrElongatordata90Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrNatgasdataRules = reactive({ |
|||
}) |
|||
|
|||
export const HrNatgasdata = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,215 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrNatgasdata.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrNatgasdata.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrNatgasdataRules" |
|||
:formAllSchemas="HrNatgasdata.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrNatgasdataApi.updateHrNatgasdata" |
|||
:apiCreate="HrNatgasdataApi.createHrNatgasdata" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrNatgasdata,HrNatgasdataRules } from './hrNatgasdata.data' |
|||
import * as HrNatgasdataApi from '@/api/pszc/hrNatgasdata' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrNatgasdata' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrNatgasdata.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrNatgasdataApi.getHrNatgasdataPage // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrNatgasdata:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrNatgasdata:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrNatgasdata:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrNatgasdata:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrNatgasdata') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrNatgasdataApi.deleteHrNatgasdata(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrNatgasdataApi.exportHrNatgasdata(setSearchParams) |
|||
download.excel(data, '热轧-天然气总量.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧-天然气总量导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await HrNatgasdataApi.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrPuncherdata108Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrPuncherdata108 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,215 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrPuncherdata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrPuncherdata108.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrPuncherdata108Rules" |
|||
:formAllSchemas="HrPuncherdata108.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrPuncherdata108Api.updateHrPuncherdata108" |
|||
:apiCreate="HrPuncherdata108Api.createHrPuncherdata108" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrPuncherdata108,HrPuncherdata108Rules } from './hrPuncherdata108.data' |
|||
import * as HrPuncherdata108Api from '@/api/pszc/hrpuncherdata108' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrPuncherdata108' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrPuncherdata108.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrPuncherdata108Api.getHrPuncherdata108Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrPuncherdata108:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrPuncherdata108:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrPuncherdata108:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrPuncherdata108:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrPuncherdata108') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrPuncherdata108Api.deleteHrPuncherdata108(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrPuncherdata108Api.exportHrPuncherdata108(setSearchParams) |
|||
download.excel(data, '热轧108-穿孔机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧108-穿孔机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrPuncherdata108Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrPuncherdata90Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrPuncherdata90 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrPuncherdata90.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrPuncherdata90.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrPuncherdata90Rules" |
|||
:formAllSchemas="HrPuncherdata90.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrPuncherdata90Api.updateHrPuncherdata90" |
|||
:apiCreate="HrPuncherdata90Api.createHrPuncherdata90" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrPuncherdata90,HrPuncherdata90Rules } from './hrPuncherdata90.data' |
|||
import * as HrPuncherdata90Api from '@/api/pszc/hrPuncherdata90' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrPuncherdata90' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrPuncherdata90.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrPuncherdata90Api.getHrPuncherdata90Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrPuncherdata90:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrPuncherdata90:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
defaultButtons.mainListEditBtn({hasPermi:'wms:hrPuncherdata90:update'}), // 编辑 |
|||
defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrPuncherdata90:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrPuncherdata90') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrPuncherdata90Api.deleteHrPuncherdata90(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrPuncherdata90Api.exportHrPuncherdata90(setSearchParams) |
|||
download.excel(data, '热轧90-穿孔机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧90-穿孔机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await HrPuncherdata90Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrSizingmilldata108Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrSizingmilldata108 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrSizingmilldata108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrSizingmilldata108.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrSizingmilldata108Rules" |
|||
:formAllSchemas="HrSizingmilldata108.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrSizingmilldata108Api.updateHrSizingmilldata108" |
|||
:apiCreate="HrSizingmilldata108Api.createHrSizingmilldata108" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrSizingmilldata108,HrSizingmilldata108Rules } from './hrSizingmilldata108.data' |
|||
import * as HrSizingmilldata108Api from '@/api/pszc/hrsizingmilldata108' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrSizingmilldata108' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrSizingmilldata108.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrSizingmilldata108Api.getHrSizingmilldata108Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrSizingmilldata108:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrSizingmilldata108:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrSizingmilldata108:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrSizingmilldata108:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrSizingmilldata108') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrSizingmilldata108Api.deleteHrSizingmilldata108(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrSizingmilldata108Api.exportHrSizingmilldata108(setSearchParams) |
|||
download.excel(data, '热轧108-定经机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧108-定经机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrSizingmilldata108Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrSizingmilldata90Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrSizingmilldata90 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrSizingmilldata90.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrSizingmilldata90.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrSizingmilldata90Rules" |
|||
:formAllSchemas="HrSizingmilldata90.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrSizingmilldata90Api.updateHrSizingmilldata90" |
|||
:apiCreate="HrSizingmilldata90Api.createHrSizingmilldata90" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrSizingmilldata90,HrSizingmilldata90Rules } from './hrSizingmilldata90.data' |
|||
import * as HrSizingmilldata90Api from '@/api/pszc/hrSizingmilldata90' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrSizingmilldata90' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrSizingmilldata90.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrSizingmilldata90Api.getHrSizingmilldata90Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrSizingmilldata90:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrSizingmilldata90:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrSizingmilldata90:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrSizingmilldata90:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrSizingmilldata90') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrSizingmilldata90Api.deleteHrSizingmilldata90(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrSizingmilldata90Api.exportHrSizingmilldata90(setSearchParams) |
|||
download.excel(data, '热轧90-定经机.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧90-定经机导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await HrSizingmilldata90Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrWatermeter108Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrWatermeter108 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: 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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrWatermeter108.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrWatermeter108.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrWatermeter108Rules" |
|||
:formAllSchemas="HrWatermeter108.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrWatermeter108Api.updateHrWatermeter108" |
|||
:apiCreate="HrWatermeter108Api.createHrWatermeter108" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrWatermeter108,HrWatermeter108Rules } from './hrWatermeter108.data' |
|||
import * as HrWatermeter108Api from '@/api/pszc/hrwatermeter108' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrWatermeter108' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrWatermeter108.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrWatermeter108Api.getHrWatermeter108Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrWatermeter108:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrWatermeter108:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrWatermeter108:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrWatermeter108:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrWatermeter108') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrWatermeter108Api.deleteHrWatermeter108(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrWatermeter108Api.exportHrWatermeter108(setSearchParams) |
|||
download.excel(data, '热轧108-水.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧108-水导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
// importTemplateData.templateUrl = await HrWatermeter108Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,71 @@ |
|||
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|||
import { dateFormatter } from '@/utils/formatTime' |
|||
|
|||
// 表单校验
|
|||
export const HrWatermeter90Rules = reactive({ |
|||
}) |
|||
|
|||
export const HrWatermeter90 = useCrudSchemas(reactive<CrudSchema[]>([ |
|||
// {
|
|||
// label: '主键、自增',
|
|||
// field: 'id',
|
|||
// sort: 'custom',
|
|||
// isForm: false,
|
|||
// },
|
|||
{ |
|||
label: '数据点编号', |
|||
field: 'icode', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
label: '数据点名称', |
|||
field: 'iname', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '采集值', |
|||
field: 'ivalue', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的编号', |
|||
field: 'mcode', |
|||
sort: 'custom', |
|||
isSearch: false, |
|||
}, |
|||
{ |
|||
label: '仪表的名称', |
|||
field: 'mname', |
|||
sort: 'custom', |
|||
isSearch: true, |
|||
}, |
|||
{ |
|||
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'
|
|||
// }
|
|||
// }
|
|||
])) |
@ -0,0 +1,223 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<Search :schema="HrWatermeter90.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表头部 --> |
|||
<TableHead |
|||
:HeadButttondata="HeadButttondata" |
|||
@button-base-click="buttonBaseClick" |
|||
:routeName="routeName" |
|||
@updataTableColumns="updataTableColumns" |
|||
@searchFormClick="searchFormClick" |
|||
:allSchemas="HrWatermeter90.allSchemas" |
|||
/> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<Table |
|||
:columns="tableColumns" |
|||
:data="tableObject.tableList" |
|||
:loading="tableObject.loading" |
|||
:pagination="{ |
|||
total: tableObject.total |
|||
}" |
|||
v-model:pageSize="tableObject.pageSize" |
|||
v-model:currentPage="tableObject.currentPage" |
|||
v-model:sort="tableObject.sort" |
|||
> |
|||
<template #code="{row}"> |
|||
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> |
|||
<span>{{ row.code }}</span> |
|||
</el-button> |
|||
</template> |
|||
<template #action="{ row }"> |
|||
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" /> |
|||
</template> |
|||
</Table> |
|||
</ContentWrap> |
|||
|
|||
<!-- 表单弹窗:添加/修改 --> |
|||
<BasicForm |
|||
ref="basicFormRef" |
|||
@success="getList" |
|||
:rules="HrWatermeter90Rules" |
|||
:formAllSchemas="HrWatermeter90.allSchemas" |
|||
:searchTableParams="searchTableParams" |
|||
:apiUpdate="HrWatermeter90Api.updateHrWatermeter90" |
|||
:apiCreate="HrWatermeter90Api.createHrWatermeter90" |
|||
@searchTableSuccess="searchTableSuccess" |
|||
:isBusiness="false" |
|||
/> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import download from '@/utils/download' |
|||
import { HrWatermeter90,HrWatermeter90Rules } from './hrWatermeter90.data' |
|||
import * as HrWatermeter90Api from '@/api/pszc/hrwatermeter90' |
|||
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|||
|
|||
defineOptions({ name: 'HrWatermeter90' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const tableColumns = ref(HrWatermeter90.allSchemas.tableColumns) |
|||
|
|||
// 字段设置 更新主列表字段 |
|||
const updataTableColumns = (val) => { |
|||
tableColumns.value = val |
|||
} |
|||
|
|||
// 查询列表页面参数设置 |
|||
const searchTableParams = ref([ |
|||
//{ |
|||
// formField: 'productItemCode', |
|||
// searchTableTitle: '物料信息', |
|||
// searchTableAllSchemas: Itembasic.allSchemas, |
|||
// searchTablePage: ItembasicApi.getItembasicPage |
|||
//} |
|||
]) |
|||
|
|||
const { tableObject, tableMethods } = useTable({ |
|||
getListApi: HrWatermeter90Api.getHrWatermeter90Page // 分页接口 |
|||
}) |
|||
|
|||
// 获得表格的各种操作 |
|||
const { getList, setSearchParams } = tableMethods |
|||
|
|||
// 列表头部按钮 |
|||
const HeadButttondata = [ |
|||
// defaultButtons.defaultAddBtn(null), // 新增 |
|||
// defaultButtons.defaultImportBtn({hasPermi:'wms:hrWatermeter90:import'}), // 导入 |
|||
// defaultButtons.defaultExportBtn({hasPermi:'wms:hrWatermeter90:export'}), // 导出 |
|||
// defaultButtons.defaultFreshBtn(null), // 刷新 |
|||
// defaultButtons.defaultFilterBtn(null), // 筛选 |
|||
defaultButtons.defaultSetBtn(null), // 设置 |
|||
// { |
|||
// label: '自定义扩展按钮', |
|||
// name: 'zdy', |
|||
// hide: false, |
|||
// type: 'primary', |
|||
// icon: 'Select', |
|||
// color: '' |
|||
// }, |
|||
] |
|||
|
|||
// 头部按钮事件 |
|||
const buttonBaseClick = (val, item) => { |
|||
if (val == 'add') { // 新增 |
|||
openForm('create') |
|||
} else if (val == 'import') { // 导入 |
|||
handleImport() |
|||
} else if (val == 'export') { // 导出 |
|||
handleExport() |
|||
} else if (val == 'refresh') { // 刷新 |
|||
getList() |
|||
} else if (val == 'filtrate') { // 筛选 |
|||
} else { // 其他按钮 |
|||
console.log('其他按钮', item) |
|||
} |
|||
} |
|||
|
|||
// 列表-操作按钮 |
|||
const butttondata = [ |
|||
// defaultButtons.mainListEditBtn({hasPermi:'wms:hrWatermeter90:update'}), // 编辑 |
|||
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:hrWatermeter90:delete'}), // 删除 |
|||
] |
|||
|
|||
// 列表-操作按钮事件 |
|||
const buttonTableClick = async (val, row) => { |
|||
if (val == 'edit') { // 编辑 |
|||
openForm('update', row) |
|||
} else if (val == 'delete') { // 删除 |
|||
handleDelete(row.id) |
|||
} |
|||
} |
|||
|
|||
/** 添加/修改操作 */ |
|||
const basicFormRef = ref() |
|||
const openForm = (type: string, row?: any) => { |
|||
basicFormRef.value.open(type, row) |
|||
} |
|||
|
|||
// 查询页面返回 |
|||
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|||
nextTick(() => { |
|||
const setV = {} |
|||
setV[formField] = val[0][searchField] |
|||
formRef.setValues(setV) |
|||
}) |
|||
} |
|||
|
|||
/** 详情操作 */ |
|||
const detailRef = ref() |
|||
const openDetail = (row: any, titleName: any, titleValue: any) => { |
|||
detailRef.value.openDetail(row, titleName, titleValue, 'basicHrWatermeter90') |
|||
} |
|||
|
|||
/** 删除按钮操作 */ |
|||
const handleDelete = async (id: number) => { |
|||
try { |
|||
// 删除的二次确认 |
|||
await message.delConfirm() |
|||
// 发起删除 |
|||
await HrWatermeter90Api.deleteHrWatermeter90(id) |
|||
message.success(t('common.delSuccess')) |
|||
// 刷新列表 |
|||
await getList() |
|||
} catch {} |
|||
} |
|||
|
|||
/** 导出按钮操作 */ |
|||
const exportLoading = ref(false) // 导出的加载中 |
|||
const handleExport = async () => { |
|||
try { |
|||
// 导出的二次确认 |
|||
await message.exportConfirm() |
|||
// 发起导出 |
|||
exportLoading.value = true |
|||
const data = await HrWatermeter90Api.exportHrWatermeter90(setSearchParams) |
|||
download.excel(data, '热轧90-水.xls') |
|||
} catch { |
|||
} finally { |
|||
exportLoading.value = false |
|||
} |
|||
} |
|||
|
|||
/** 导入 */ |
|||
const importFormRef = ref() |
|||
const handleImport = () => { |
|||
importFormRef.value.open() |
|||
} |
|||
// 导入附件弹窗所需的参数 |
|||
const importTemplateData = reactive({ |
|||
templateUrl: '', |
|||
templateTitle: '热轧90-水导入模版.xls' |
|||
}) |
|||
// 导入成功之后 |
|||
const importSuccess = () => { |
|||
getList() |
|||
} |
|||
|
|||
// 筛选提交 |
|||
const searchFormClick = (searchData) => { |
|||
tableObject.params = { |
|||
isSearch: true, |
|||
filters: searchData.filters |
|||
} |
|||
getList() // 刷新当前列表 |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
importTemplateData.templateUrl = await HrWatermeter90Api.importTemplate() |
|||
}) |
|||
|
|||
</script> |
@ -0,0 +1,138 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|||
<el-form-item label="日期" prop="date"> |
|||
<el-date-picker |
|||
v-model="queryParams.date" |
|||
style="width: 240px; height: 30px" |
|||
value-format="YYYY-MM-DD" |
|||
type="date" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> |
|||
<el-button size="mini" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>二次计量:</b></div><div style="float: left">一九八六年五月三日安全运行({{ dataList.days }})天</div></el-divider> |
|||
<el-table |
|||
v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true" |
|||
header-row-style="height: 50px; text-align: center" :span-method="arraySpanMethod" |
|||
:row-class-name="tableRowClassName" :cell-class-name="tableCellClassName"> |
|||
<el-table-column label="" prop="mname" align="right" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="" prop="name" align="right" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="00:00" prop="num0" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="06:00" prop="num6" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="08:00" prop="num8" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="12:00" prop="num12" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="16:00" prop="num16" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="18:00" prop="num18" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="20:00" prop="num20" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="22:00" prop="num22" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="24:00" prop="num24" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
<el-table-column label="08:00-00:00" prop="num0008" align="center" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="16:00-08:00" prop="num0816" align="center" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="24:00-16:00" prop="num1624" align="center" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="12:00-00:00" prop="num0012" align="center" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="24:00-12:00" prop="num1224" align="center" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="总(24:00-00:00)" prop="num0024" align="center" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="电量" prop="numTj" align="center" :show-overflow-tooltip="true" width="100" /> |
|||
</el-table> |
|||
</ContentWrap> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import * as TjanalysisApi from '@/api/tjanalysis' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
|
|||
defineOptions({ name: 'Irealanalysis' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const loading = ref(true) |
|||
const dataList = reactive({dList: [] , days: 0}) |
|||
|
|||
const queryParams = reactive({ |
|||
date: formatDate(new Date() , 'YYYY-MM-DD'), |
|||
flag: '2' |
|||
}) |
|||
|
|||
const handleQuery = async () => { |
|||
getList() |
|||
} |
|||
|
|||
const resetQuery = async () => { |
|||
queryParams.date = formatDate(new Date() , 'YYYY-MM-DD') |
|||
getList() |
|||
} |
|||
|
|||
const getList = async () => { |
|||
const res = await TjanalysisApi.queryElectricdataTj(queryParams) |
|||
if (res != null && res.trList != null) { |
|||
dataList.days = res.days |
|||
dataList.dList = res.trList |
|||
} |
|||
loading.value = false |
|||
} |
|||
|
|||
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) { |
|||
if (rowIndex == 7) { |
|||
if (columnIndex == 0) { |
|||
return { |
|||
rowspan: 1, |
|||
colspan: 10 |
|||
} |
|||
} else if (columnIndex == 10) { |
|||
return { |
|||
rowspan: 1, |
|||
colspan: 2 |
|||
} |
|||
} else { |
|||
return { |
|||
rowspan: 0, |
|||
colspan: 0 |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
function tableRowClassName({row, rowIndex}) { |
|||
if (rowIndex === 7) { |
|||
return 'success-row' |
|||
} |
|||
return '' |
|||
} |
|||
|
|||
function tableCellClassName({row, column, rowIndex, columnIndex}) { |
|||
if (columnIndex == 0) { |
|||
return 'success-cols' |
|||
} |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
</script> |
|||
|
|||
<style> |
|||
.el-table .success-row { |
|||
background: #f0f9eb; |
|||
} |
|||
|
|||
.el-table .success-cols { |
|||
font-weight: bold; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,132 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|||
<el-form-item label="日期" prop="date"> |
|||
<el-date-picker |
|||
v-model="queryParams.date" |
|||
style="width: 240px; height: 30px" |
|||
value-format="YYYY-MM-DD" |
|||
type="date" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> |
|||
<el-button size="mini" @click="resetQuery">重置</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<el-divider content-position="left"><div style="font-size:16px; float: left"><b>一次计量:</b></div><div style="float: left">一九八六年五月三日安全运行({{ dataList.days }})天</div></el-divider> |
|||
<el-table |
|||
v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true" |
|||
header-row-style="height: 50px; text-align: center" :span-method="arraySpanMethod" |
|||
:row-class-name="tableRowClassName" :cell-class-name="tableCellClassName"> |
|||
<el-table-column label="" prop="name" align="right" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="00:00" prop="num0" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="06:00" prop="num6" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="08:00" prop="num8" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="12:00" prop="num12" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="16:00" prop="num16" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="18:00" prop="num18" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="20:00" prop="num20" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="22:00" prop="num22" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="24:00" prop="num24" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="总(24:00-00:00)" prop="num0024" :show-overflow-tooltip="true" width="150" /> |
|||
<el-table-column label="电量" prop="numTj" :show-overflow-tooltip="true" /> |
|||
</el-table> |
|||
</ContentWrap> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import * as TjanalysisApi from '@/api/tjanalysis' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
|
|||
defineOptions({ name: 'Irealanalysis' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const loading = ref(true) |
|||
const dataList = reactive({dList: [] , days: 0}) |
|||
|
|||
const queryParams = reactive({ |
|||
date: formatDate(new Date() , 'YYYY-MM-DD'), |
|||
flag: '1' |
|||
}) |
|||
|
|||
const handleQuery = async () => { |
|||
getList() |
|||
} |
|||
|
|||
const resetQuery = async () => { |
|||
queryParams.date = formatDate(new Date() , 'YYYY-MM-DD') |
|||
getList() |
|||
} |
|||
|
|||
const getList = async () => { |
|||
const res = await TjanalysisApi.queryIrealdataTj(queryParams) |
|||
if (res != null && res.trList != null) { |
|||
dataList.days = res.days |
|||
dataList.dList = res.trList |
|||
} |
|||
loading.value = false |
|||
} |
|||
|
|||
function arraySpanMethod ({ row, column, rowIndex, columnIndex }) { |
|||
if (rowIndex == 7) { |
|||
if (columnIndex == 0) { |
|||
return { |
|||
rowspan: 1, |
|||
colspan: 10 |
|||
} |
|||
} else if (columnIndex == 10) { |
|||
return { |
|||
rowspan: 1, |
|||
colspan: 2 |
|||
} |
|||
} else { |
|||
return { |
|||
rowspan: 0, |
|||
colspan: 0 |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
function tableRowClassName({row, rowIndex}) { |
|||
if (rowIndex === 7) { |
|||
return 'success-row' |
|||
} |
|||
return '' |
|||
} |
|||
|
|||
function tableCellClassName({row, column, rowIndex, columnIndex}) { |
|||
if (columnIndex == 0) { |
|||
return 'success-cols' |
|||
} |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
</script> |
|||
|
|||
<style> |
|||
.el-table .success-row { |
|||
background: #f0f9eb; |
|||
} |
|||
|
|||
.el-table .success-cols { |
|||
font-weight: bold; |
|||
} |
|||
</style> |
|||
|
@ -0,0 +1,109 @@ |
|||
<template> |
|||
<ContentWrap> |
|||
<!-- 搜索工作栏 --> |
|||
<el-form :model="queryParams" ref="queryForm" :inline="true"> |
|||
<el-form-item label="使用单位" prop="ghdw"> |
|||
<el-input |
|||
v-model="queryParams.ghdw" |
|||
placeholder="请输入使用单位" |
|||
clearable |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="日期" prop="dateRange"> |
|||
<el-date-picker |
|||
v-model="queryParams.dateRange" |
|||
style="width: 240px; height: 30px" |
|||
value-format="YYYY-MM-DD" |
|||
end-placeholder="结束日期" |
|||
start-placeholder="开始日期" |
|||
type="daterange" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<el-button type="primary" size="mini" @click="handleQuery">搜索</el-button> |
|||
<el-button size="mini" @click="resetQuery">重置</el-button> |
|||
<el-button type="success" @click="exportPlatScate" size="mini">导出</el-button> |
|||
</el-form-item> |
|||
</el-form> |
|||
</ContentWrap> |
|||
|
|||
<!-- 列表 --> |
|||
<ContentWrap> |
|||
<el-table v-loading="loading" :data="dataList.dList" border="true" highlight-current-row="true"> |
|||
<el-table-column label="序号" type="index" width="80" align="center" /> |
|||
<el-table-column label="供货单位(使用单位)" prop="ghdw" align="center" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="品种" prop="pz" align="center" :show-overflow-tooltip="true" /> |
|||
<el-table-column label="总净重(t)" prop="jz" align="center" :show-overflow-tooltip="true" /> |
|||
</el-table> |
|||
<pagination |
|||
v-show="dataList.total>0" |
|||
:total="dataList.total" |
|||
:page="queryParams.pageNo" |
|||
:limit="queryParams.pageSize" |
|||
@pagination="getList" |
|||
/> |
|||
</ContentWrap> |
|||
|
|||
</template> |
|||
|
|||
<script setup lang="ts"> |
|||
import * as TjanalysisApi from '@/api/tjanalysis' |
|||
import { formatDate } from '@/utils/formatTime' |
|||
|
|||
defineOptions({ name: 'Irealanalysis' }) |
|||
|
|||
const message = useMessage() // 消息弹窗 |
|||
const { t } = useI18n() // 国际化 |
|||
|
|||
const route = useRoute() // 路由信息 |
|||
const routeName = ref() |
|||
routeName.value = route.name |
|||
const loading = ref(true) |
|||
const dataList = reactive({dList: [] , total: 0}) |
|||
|
|||
const queryParams = reactive({ |
|||
pageNo: 1, |
|||
pageSize: 10, |
|||
dateRange: [], |
|||
ghdw: '' |
|||
}) |
|||
|
|||
const handleQuery = async () => { |
|||
getList() |
|||
} |
|||
|
|||
const resetQuery = async () => { |
|||
queryParams.dateRange = [] |
|||
queryParams.ghdw = '' |
|||
getList() |
|||
} |
|||
|
|||
const getList = async () => { |
|||
const res = await TjanalysisApi.queryTjPlatScales(queryParams) |
|||
if (res != null && res.list != null) { |
|||
dataList.dList = res.list |
|||
dataList.total = res.total |
|||
} |
|||
loading.value = false |
|||
} |
|||
|
|||
const exportPlatScate = async () => { |
|||
const res = await TjanalysisApi.exportPsales(queryParams) |
|||
if (res != null) { |
|||
let url = window.URL.createObjectURL(new Blob([res])); |
|||
let link = document.createElement("a"); |
|||
link.style.display = "none"; |
|||
link.href = url; |
|||
link.setAttribute("download", "地衡统计数据.xlsx"); |
|||
document.body.appendChild(link); |
|||
link.click(); |
|||
} |
|||
} |
|||
|
|||
/** 初始化 **/ |
|||
onMounted(async () => { |
|||
getList() |
|||
}) |
|||
|
|||
</script> |
|||
|
Loading…
Reference in new issue